:root {
  --surface: rgba(255, 255, 255, 0.8);
  --text: #162033;
  --muted: #5f6b84;
  --line: rgba(105, 122, 148, 0.18);
  --line-strong: rgba(105, 122, 148, 0.28);
  --blue: #2b6ef2;
  --cyan: #16a6b6;
  --green: #0f9f6e;
  --amber: #dc8b18;
  --red: #dc4c64;
  --shadow-lg: 0 24px 60px rgba(24, 39, 75, 0.12);
  --shadow-sm: 0 14px 34px rgba(24, 39, 75, 0.08);
  --quote-ink: #172033;
  --quote-muted: #6a758b;
  --quote-saffron: #f36b2d;
  --quote-saffron-deep: #d94712;
  --quote-sun: #ffb454;
  --quote-indigo: #2456d6;
  --quote-sky: #eaf3ff;
  --quote-teal: #0f9f8d;
  --quote-mint: #e8fbf4;
  --quote-cream: #fff8ef;
  --quote-card: rgba(255, 255, 255, 0.9);
  --quote-border: rgba(82, 104, 145, 0.15);
  --quote-shadow-soft: 0 18px 42px rgba(40, 52, 86, 0.1);
  --quote-shadow-lift: 0 26px 62px rgba(36, 86, 214, 0.16);
}

/* Sightseeing Master stays separate from vendor-priced activities. */
.sightseeing-master-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .destination-master-toolbar.sightseeing-master-filters {
  display: grid;
}

.sightseeing-pricing-builder {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border-color, #dbe3ef);
  border-radius: 16px;
  background: #f8fbff;
}

.sightseeing-pricing-components {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.sightseeing-pricing-row {
  display: grid;
  grid-template-columns: 130px minmax(170px, 1fr) 120px 150px minmax(140px, auto) auto;
  gap: 10px;
  align-items: center;
}

.sightseeing-pricing-row input,
.sightseeing-pricing-row select {
  min-width: 0;
}

.sightseeing-included-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  white-space: nowrap;
}

.sightseeing-master-table td:nth-child(3) span {
  display: block;
  max-width: 320px;
  color: var(--muted, #64748b);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .sightseeing-master-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sightseeing-pricing-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #fff;
  }
}

@media (max-width: 640px) {
  .sightseeing-master-filters,
  .sightseeing-pricing-row {
    grid-template-columns: 1fr;
  }

  .sightseeing-master-table,
  .sightseeing-master-table tbody,
  .sightseeing-master-table tr,
  .sightseeing-master-table td {
    display: block;
    width: 100%;
  }

  .sightseeing-master-table thead {
    display: none;
  }

  .sightseeing-master-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
  }
}

#vendorCityIdInput[hidden],
#vendorServiceCityIdInput[hidden] {
  display: none !important;
}

#vendorCreateForm .search-select,
#vendorServiceCreateForm .search-select {
  position: relative;
  z-index: 40;
}

#vendorCreateForm .search-select-menu,
#vendorServiceCreateForm .search-select-menu {
  z-index: 1400;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

#vendorCreateForm .search-select-option,
#vendorServiceCreateForm .search-select-option {
  color: #0f172a;
}

#vendorCreateForm .search-select-option:hover,
#vendorCreateForm .search-select-option:focus-visible,
#vendorServiceCreateForm .search-select-option:hover,
#vendorServiceCreateForm .search-select-option:focus-visible {
  background: rgba(241, 245, 249, 0.95);
}

#vendorCreateForm .search-select-option-meta,
#vendorServiceCreateForm .search-select-option-meta {
  color: #475569;
}

.lead-modal.quote-costing-modal {
  inset: 0;
  top: 0;
  left: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  transform: none;
  box-shadow: none;
  z-index: 2147483001 !important;
  display: flex;
  flex-direction: column;
}

body.quote-costing-takeover-open {
  overflow: hidden;
}

body.quote-costing-takeover-open > .app-shell {
  display: none !important;
}

body.quote-costing-takeover-open #assistantWidget,
body.quote-costing-takeover-open #chatFloatingWidget,
body.quote-costing-takeover-open #saleCelebrationHost {
  display: none !important;
}

/* Quote package customer preview modal. */
.quote-package-mini-preview {
  display: grid;
  gap: 8px;
}

.quote-package-mini-preview h4,
.quote-package-mini-preview p {
  margin: 0;
}

.quote-package-mini-preview strong {
  color: #f15a29;
  font-size: 1.35rem;
}

.quote-package-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 22px;
}

.quote-package-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.quote-package-preview-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  max-height: min(92dvh, 980px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.quote-package-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.quote-package-preview-toolbar-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quote-package-preview-toolbar-main strong {
  color: #0f172a;
  font-size: 1.02rem;
}

.quote-package-preview-toolbar-main small,
.quote-package-preview-share-note {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.quote-package-preview-kicker {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-package-preview-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quote-package-preview-toolbar-actions .ghost-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 13px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.quote-package-preview-toolbar-actions [data-quote-package-share-action="generate"] {
  border-color: rgba(249, 115, 22, 0.36);
  background: linear-gradient(135deg, #ff7a2f, #ef4444);
  color: #fff;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.18);
}

.quote-package-preview-toolbar-actions .ghost-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.quote-package-preview-share-note {
  grid-column: 1 / -1;
  margin: -4px 0 0;
}

.quote-package-preview-share-note[data-state="success"] {
  color: #047857;
}

.quote-package-preview-share-note[data-state="error"] {
  color: #b91c1c;
}

.quote-package-preview-share-note[data-state="loading"] {
  color: #c2410c;
}

.quote-package-preview-hero {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 26px;
  background:
    radial-gradient(circle at 82% 10%, rgba(245, 99, 36, 0.18), transparent 32%),
    linear-gradient(135deg, #fff7ed, #fff);
}

.quote-package-preview-logo {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff7a2f, #ef2e43);
  color: #fff;
  font-weight: 900;
}

.quote-package-preview-hero span,
.quote-package-preview-section-head span,
.quote-package-preview-strip span,
.quote-package-preview-price span,
.quote-package-preview-day-head span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-package-preview-hero h2,
.quote-package-preview-hero p {
  margin: 0;
}

.quote-package-preview-hero h2 {
  color: #0f172a;
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  line-height: 1.05;
}

.quote-package-preview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 26px 0;
}

.quote-package-preview-strip article,
.quote-package-preview-price,
.quote-package-preview-route,
.quote-package-preview-day,
.quote-package-preview-policies article {
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 18px;
  background: #fff;
}

.quote-package-preview-strip article {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 14px;
}

.quote-package-preview-strip strong {
  color: #0f172a;
}

.quote-package-preview-price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 18px 26px 0;
  padding: 18px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

.quote-package-preview-price strong {
  display: block;
  margin: 5px 0;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
}

.quote-package-preview-price small,
.quote-package-preview-price span {
  color: rgba(255, 255, 255, 0.78);
}

.quote-package-preview-tax {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.quote-package-preview-timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.5fr);
  gap: 14px;
  align-items: center;
  margin: 18px 26px 0;
  padding: 18px 20px;
  border-radius: 8px;
  border: 1px solid rgba(245, 114, 43, 0.22);
  background: linear-gradient(135deg, rgba(255, 248, 239, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 40px rgba(181, 86, 31, 0.09);
}

.quote-package-preview-timer span,
.quote-package-preview-breakup .quote-package-preview-section-head span,
.quote-package-preview-cta span {
  display: block;
  color: #b95616;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quote-package-preview-timer strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1;
}

.quote-package-preview-timer small,
.quote-package-preview-timer p {
  color: #64748b;
  font-weight: 700;
  margin: 0;
}

.quote-package-preview-timer.is-expired {
  border-color: rgba(220, 38, 38, 0.24);
  background: linear-gradient(135deg, #fff1f2, #fff);
}

.quote-package-preview-timer.is-expired span {
  color: #be123c;
}

.quote-package-preview-breakup,
.quote-package-preview-cta {
  margin: 18px 26px 0;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.quote-package-preview-breakup-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.quote-package-preview-breakup-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5edf6;
}

.quote-package-preview-breakup-list article strong,
.quote-package-preview-breakup-list article b {
  color: #0f172a;
  font-weight: 900;
}

.quote-package-preview-breakup-list article span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-weight: 700;
}

.quote-package-preview-breakup-list article.is-discount {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.quote-package-preview-breakup-list article.is-discount b {
  color: #047857;
}

.quote-package-preview-breakup-list article.is-total {
  background: #0b1b3f;
  border-color: #0b1b3f;
}

.quote-package-preview-breakup-list article.is-total strong,
.quote-package-preview-breakup-list article.is-total span,
.quote-package-preview-breakup-list article.is-total b {
  color: #ffffff;
}

.quote-package-preview-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-color: rgba(245, 114, 43, 0.24);
  background: linear-gradient(135deg, #fff, #fff7ed);
}

.quote-package-preview-cta strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 1.15rem;
}

.quote-package-preview-terms-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #475569;
  font-weight: 800;
}

.quote-package-preview-terms-check input {
  width: 18px;
  height: 18px;
}

.quote-package-preview-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.quote-package-preview-cta-actions .primary-button,
.quote-package-preview-cta-actions .ghost-button {
  min-height: 42px;
  text-decoration: none;
}

.quote-package-preview-terms-panel[hidden] {
  display: none;
}

.quote-package-preview-terms-panel {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 24px;
}

.quote-package-preview-terms-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
}

.quote-package-preview-terms-dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: min(76vh, 760px);
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.quote-package-preview-terms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.quote-package-preview-terms-grid article {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.quote-package-preview-terms-grid h3 {
  margin: 0 0 10px;
  color: #0f172a;
}

.quote-package-preview-terms-grid ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  font-weight: 700;
}

.quote-package-preview-route {
  margin: 18px 26px 0;
  padding: 16px 18px;
  background: #f8fafc;
}

.quote-package-preview-route p {
  margin: 6px 0 0;
  color: #475569;
}

.quote-package-preview-hotel-rooms {
  display: grid;
  gap: 14px;
  margin: 18px 26px 0;
  padding: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf5 0%, #ffffff 48%, #f8fbff 100%);
}

.quote-package-preview-hotel-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.quote-package-preview-hotel-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.quote-package-preview-hotel-table th,
.quote-package-preview-hotel-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.quote-package-preview-hotel-table th {
  color: #475569;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f8fafc;
}

.quote-package-preview-hotel-table td {
  color: #0f172a;
  font-weight: 700;
}

.quote-package-preview-hotel-table tr:last-child td {
  border-bottom: 0;
}

.quote-package-preview-occupancy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.quote-package-preview-occupancy article,
.quote-package-preview-occupancy small {
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.quote-package-preview-occupancy article span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-package-preview-occupancy article strong {
  color: #0f172a;
  font-size: 1.2rem;
}

.quote-package-preview-occupancy small {
  justify-content: center;
  color: #9a3412;
  font-weight: 900;
  background: #fff7ed;
}

.quote-package-preview-days,
.quote-package-preview-policies {
  display: grid;
  gap: 14px;
  padding: 22px 26px;
}

.quote-package-preview-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.quote-package-preview-day {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.quote-package-preview-day.is-compact {
  grid-template-columns: 88px minmax(0, 1fr);
  padding: 10px;
}

.quote-package-preview-mini-days {
  display: grid;
  gap: 10px;
}

.quote-package-preview-day-media {
  display: grid;
  place-items: center;
  min-height: 180px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed, #f8fafc);
  color: #94a3b8;
  font-weight: 800;
}

.quote-package-preview-day.is-compact .quote-package-preview-day-media {
  min-height: 76px;
}

.quote-package-preview-day-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-package-preview-day-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.quote-package-preview-day-head {
  display: grid;
  gap: 3px;
}

.quote-package-preview-day-head strong {
  color: #0f172a;
  font-size: 1.15rem;
}

.quote-package-preview-day-copy p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.quote-package-preview-chips,
.quote-package-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-package-preview-chips span,
.quote-package-preview-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}

.quote-package-preview-tags span {
  background: #fff7ed;
  color: #c2410c;
}

.quote-package-preview-tags.is-service-tags span {
  background: #eff6ff;
  color: #1d4ed8;
}

.quote-package-preview-tags.is-inclusion-tags span {
  background: #ecfdf5;
  color: #047857;
}

.quote-package-preview-tags.is-exclusion-tags span {
  background: #fef2f2;
  color: #b91c1c;
}

.quote-package-preview-policies {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0;
}

.quote-package-preview-policies article {
  padding: 16px;
  background: #f8fafc;
}

.quote-package-preview-policies h3,
.quote-package-preview-policies p,
.quote-package-preview-policies ul {
  margin-top: 0;
}

.quote-package-preview-policies ul {
  padding-left: 18px;
  color: #475569;
}

@media (max-width: 860px) {
  .quote-package-preview-modal {
    padding: 10px;
  }

  .quote-package-preview-dialog {
    max-height: 94dvh;
    border-radius: 20px;
  }

  .quote-package-preview-toolbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .quote-package-preview-toolbar-actions {
    justify-content: stretch;
  }

  .quote-package-preview-toolbar-actions .ghost-button {
    flex: 1 1 130px;
  }

  .quote-package-preview-hero,
  .quote-package-preview-price,
  .quote-package-preview-timer,
  .quote-package-preview-cta,
  .quote-package-preview-day,
  .quote-package-preview-policies,
  .quote-package-preview-terms-grid {
    grid-template-columns: 1fr;
  }

  .quote-package-preview-hero {
    gap: 12px;
    padding: 18px;
  }

  .quote-package-preview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 18px;
  }

  .quote-package-preview-price,
  .quote-package-preview-timer,
  .quote-package-preview-breakup,
  .quote-package-preview-cta,
  .quote-package-preview-route,
  .quote-package-preview-hotel-rooms {
    margin-inline: 18px;
  }

  .quote-package-preview-cta-actions {
    justify-content: stretch;
  }

  .quote-package-preview-cta-actions .primary-button,
  .quote-package-preview-cta-actions .ghost-button {
    flex: 1 1 160px;
  }

  .quote-package-preview-terms-panel {
    padding: 12px;
  }

  .quote-package-preview-terms-dialog {
    max-height: 88dvh;
    padding: 16px;
  }

  .quote-package-preview-days,
  .quote-package-preview-policies {
    padding-inline: 18px;
  }

  .quote-package-preview-hotel-rooms {
    padding: 14px;
  }

  .quote-package-preview-occupancy article,
  .quote-package-preview-occupancy small {
    flex: 1 1 150px;
  }
}

@media (max-width: 520px) {
  .quote-package-preview-strip {
    grid-template-columns: 1fr;
  }

  .quote-package-preview-day.is-compact {
    grid-template-columns: 1fr;
  }

  .quote-package-preview-modal { padding: 0; }

  .quote-package-preview-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    overflow-x: hidden;
    border-radius: 0;
  }

  .quote-package-preview-hotel-rooms {
    min-width: 0;
    margin-inline: 8px;
    padding: 10px;
  }

  .quote-package-preview-hotel-rooms .quote-package-preview-section-head {
    display: grid;
    justify-content: stretch;
    align-items: start;
  }

  .quote-package-preview-hotel-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .quote-package-preview-hotel-table,
  .quote-package-preview-hotel-table tbody,
  .quote-package-preview-hotel-table tr,
  .quote-package-preview-hotel-table td {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .quote-package-preview-hotel-table { min-width: 0; }

  .quote-package-preview-hotel-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .quote-package-preview-hotel-table tbody {
    display: grid;
    gap: 10px;
  }

  .quote-package-preview-hotel-table tr {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
  }

  .quote-package-preview-hotel-table td,
  .quote-package-preview-hotel-table tr:last-child td {
    display: grid;
    grid-template-columns: minmax(82px, 0.7fr) minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #eef2f7;
    overflow-wrap: anywhere;
  }

  .quote-package-preview-hotel-table td:last-child,
  .quote-package-preview-hotel-table tr:last-child td:last-child { border-bottom: 0; }

  .quote-package-preview-hotel-table td::before {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .quote-package-preview-hotel-table td:nth-child(1)::before { content: "Destination"; }
  .quote-package-preview-hotel-table td:nth-child(2)::before { content: "Hotel / Camp"; }
  .quote-package-preview-hotel-table td:nth-child(3)::before { content: "Nights"; }
  .quote-package-preview-hotel-table td:nth-child(4)::before { content: "Meal"; }
  .quote-package-preview-hotel-table td:nth-child(5)::before { content: "Room Mix"; }
  .quote-package-preview-hotel-table td:nth-child(6)::before { content: "Kids Policy"; }

  .quote-package-preview-occupancy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-package-preview-occupancy article,
  .quote-package-preview-occupancy small {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

#quoteCostingModalBackdrop {
  z-index: 2147483000 !important;
}

.quote-costing-modal-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 14px 18px;
}

.quote-costing-back-button {
  white-space: nowrap;
}

.quote-costing-modal-heading {
  min-width: 0;
}

.quote-costing-modal-heading h3,
.quote-costing-modal-heading p {
  margin: 0;
}

.quote-costing-modal-heading .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-costing-header-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
}

.quote-costing-header-stats article {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
  padding: 8px 12px;
  display: grid;
  gap: 2px;
}

.quote-costing-header-stats span {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quote-costing-header-stats strong {
  color: var(--text);
  font-size: 0.94rem;
}

.quote-costing-header-stats progress {
  width: 100%;
  height: 5px;
  margin-top: 4px;
  accent-color: #16a34a;
}

.quote-costing-modal-body {
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(520px, 1fr) minmax(260px, 320px);
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(241, 245, 249, 0.82));
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.quote-costing-route-panel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.quote-costing-day-rail {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.quote-costing-day-rail-head {
  display: grid;
  gap: 4px;
}

.quote-costing-day-list {
  display: grid;
  gap: 8px;
  min-height: 96px;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}

.quote-costing-day-item {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: grid;
  min-height: 84px;
  gap: 5px;
  text-align: left;
  cursor: pointer;
}

.quote-costing-day-item strong {
  color: var(--text);
  font-size: 0.93rem;
}

.quote-costing-day-item em {
  font-style: normal;
  font-size: 0.78rem;
}

.quote-costing-day-item.is-active {
  border-color: rgba(243, 107, 45, 0.55);
  box-shadow: inset 3px 0 0 rgba(243, 107, 45, 0.85);
  background: linear-gradient(90deg, rgba(255, 247, 237, 0.88), rgba(255, 255, 255, 0.96));
}

.quote-costing-editor-stage {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px;
  min-height: auto;
}

.quote-costing-workspace {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 2px;
}

.quote-costing-selected-day-header {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, 0.98);
  min-height: 62px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.quote-costing-selected-day-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.quote-costing-selected-day-header > div > strong {
  color: var(--text);
  font-size: 1.12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-costing-selected-day-header > button {
  width: 42px;
  min-width: 42px;
  min-height: 40px;
  padding: 0;
  font-size: 1.2rem;
}

.quote-costing-section-tabs {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, 0.98);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: sticky;
  top: 62px;
  z-index: 3;
}

.quote-costing-section-tabs a {
  color: var(--text-muted);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 12px 8px;
  border-bottom: 3px solid transparent;
}

.quote-costing-section-tabs a:hover,
.quote-costing-section-tabs a:focus-visible,
.quote-costing-section-tabs a.is-active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
}

.quote-costing-summary-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding-right: 2px;
}

.quote-costing-side-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.quote-costing-side-card h4,
.quote-costing-side-card p {
  margin: 0;
}

.quote-costing-side-card .pill[data-tone="success"] {
  color: #166534;
  background: rgba(220, 252, 231, 0.9);
}

.quote-costing-side-card .pill[data-tone="warning"] {
  color: #9a3412;
  background: rgba(255, 237, 213, 0.92);
}

.quote-costing-side-breakdown {
  display: grid;
  gap: 8px;
}

.quote-costing-side-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.quote-costing-side-breakdown strong {
  color: var(--text);
}

.quote-costing-side-breakdown .is-total {
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  margin-top: 4px;
  padding-top: 10px;
  color: var(--text);
  font-weight: 700;
}

.quote-costing-blocker-list {
  margin: 0;
  padding-left: 20px;
  color: #9a3412;
  display: grid;
  gap: 8px;
  font-size: 0.84rem;
}

.quote-costing-ready-message {
  color: #166534;
  font-size: 0.86rem;
}

.quote-costing-trip-total-card {
  background: linear-gradient(145deg, #172554, #1e3a8a);
  color: #fff;
}

.quote-costing-trip-total-card span,
.quote-costing-trip-total-card small {
  color: rgba(255, 255, 255, 0.76);
}

.quote-costing-trip-total-card strong {
  color: #fff;
  font-size: 1.55rem;
}

.quote-costing-editor-shell {
  min-height: 320px;
}

.quote-costing-editor-card,
.quote-costing-editor-placeholder {
  display: grid;
  gap: 10px;
}

.quote-costing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-costing-meal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-costing-form-grid .field {
  margin: 0;
}

.quote-costing-form-grid .field-span-2 {
  grid-column: 1 / -1;
}

.quote-costing-room-grid {
  display: grid;
  gap: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  overflow: hidden;
}

.quote-costing-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.quote-costing-check-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.quote-costing-check-list li span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 800;
  background: #ffedd5;
  color: #c2410c;
}

.quote-costing-check-list li[data-tone="success"] {
  color: #166534;
}

.quote-costing-check-list li[data-tone="success"] span {
  background: #dcfce7;
  color: #15803d;
}

.quote-costing-room-table-head {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(90px, 0.7fr) minmax(280px, 1.6fr) minmax(90px, 0.6fr);
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quote-costing-room-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(90px, 0.7fr) minmax(280px, 1.6fr) minmax(90px, 0.6fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0;
  background: #fff;
}

.quote-costing-room-meta {
  display: grid;
  gap: 4px;
}

.quote-costing-room-meta strong {
  font-size: 0.95rem;
  color: var(--text);
}

.quote-costing-room-meta span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.quote-costing-room-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-costing-room-input {
  margin: 0;
}

.quote-costing-room-guests {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.quote-costing-room-line-total {
  color: var(--text);
  text-align: right;
  font-size: 0.92rem;
}

.quote-costing-rooming-allocation {
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.72);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quote-costing-rooming-allocation > div {
  display: grid;
  gap: 3px;
}

.quote-costing-rooming-allocation > div:last-child {
  text-align: right;
}

.quote-costing-rooming-allocation strong {
  color: var(--text);
}

.quote-costing-rooming-allocation span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.quote-costing-rooming-allocation[data-tone="match"] {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(240, 253, 244, 0.84);
}

.quote-costing-rooming-allocation[data-tone="match"] > div:last-child strong {
  color: #15803d;
}

.quote-costing-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-costing-chip-row span {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(248, 250, 252, 0.9);
}

.quote-costing-workspace-note {
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.8);
}

.quote-costing-workspace-note p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.quote-costing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quote-costing-summary-grid article,
.quote-costing-editor-section {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.quote-costing-summary-grid article {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.quote-costing-summary-grid span {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quote-costing-summary-grid strong {
  font-size: 1rem;
  color: var(--text);
}

.quote-costing-editor-section {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.quote-costing-service-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-costing-service-summary-copy {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.quote-costing-service-summary-copy strong {
  font-size: 0.95rem;
  color: var(--text);
}

.quote-costing-service-summary-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.quote-costing-occupancy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quote-costing-occupancy-grid article {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.quote-costing-occupancy-grid article span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.quote-costing-occupancy-grid article strong {
  font-size: 0.94rem;
  color: var(--text);
}

.quote-costing-occupancy-grid article.quote-costing-occupancy-children {
  grid-column: 1 / -1;
}

[data-quote-costing-occupancy-status][data-tone="match"] {
  color: #15803d;
}

[data-quote-costing-occupancy-status][data-tone="short"] {
  color: #b45309;
}

[data-quote-costing-occupancy-status][data-tone="extra"] {
  color: #1d4ed8;
}

.quote-costing-validation-list {
  display: grid;
  gap: 10px;
}

.quote-costing-validation-item {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.quote-costing-validation-item strong {
  font-size: 0.9rem;
  color: var(--text);
}

.quote-costing-validation-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.quote-costing-validation-item[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(240, 253, 244, 0.85);
}

.quote-costing-validation-item[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(255, 251, 235, 0.88);
}

.quote-costing-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.quote-costing-section-head h4 {
  margin: 2px 0 0;
}

.quote-costing-day-item small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.quote-costing-day-item[data-tone="success"] small {
  color: #15803d;
}

.quote-costing-day-item[data-tone="warning"] small {
  color: #c2410c;
  font-weight: 700;
}

.quote-costing-day-item[data-tone="info"] small {
  color: #1d4ed8;
}

.quote-costing-modal-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  padding: 10px 14px 14px;
  background: rgba(255, 255, 255, 0.96);
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 4;
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.quote-costing-modal.hidden {
  display: none !important;
}

.quote-costing-modal:not(.hidden) {
  display: flex;
}

.quote-costing-breakdown-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.72);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.quote-costing-breakdown-list {
  display: grid;
  gap: 8px;
}

.quote-costing-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.quote-costing-breakdown-row span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.quote-costing-breakdown-row strong {
  color: var(--text);
  font-size: 0.9rem;
}

.quote-costing-route-transport-shell {
  display: grid;
  gap: 10px;
}

.quote-route-transport-status,
.quote-route-transport-empty,
.quote-route-transport-option {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.78);
}

.quote-route-transport-status {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.quote-route-transport-status strong {
  color: var(--text);
  font-size: 0.95rem;
}

.quote-route-transport-status span,
.quote-route-transport-status em {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: normal;
}

.quote-route-transport-status[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(240, 253, 244, 0.84);
}

.quote-route-transport-status[data-tone="warning"],
.quote-route-transport-empty.is-warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(255, 251, 235, 0.9);
}

.quote-route-transport-empty {
  padding: 14px;
  color: var(--text-muted);
}

.quote-route-transport-options {
  display: grid;
  gap: 10px;
}

.quote-route-transport-option {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 12px;
  align-items: center;
}

.quote-route-transport-option.is-selected {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.9);
  background: rgba(239, 246, 255, 0.88);
}

.quote-route-transport-option strong {
  color: var(--text);
  font-size: 0.96rem;
}

.quote-route-transport-option p,
.quote-route-transport-option span,
.quote-route-transport-option small {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.quote-route-transport-option-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.quote-route-transport-option-meta mark {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 247, 237, 0.95);
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 700;
}

.quote-route-transport-option[data-match="exact"] .quote-route-transport-option-meta mark {
  background: rgba(220, 252, 231, 0.9);
  color: #15803d;
}

.quote-route-transport-option[data-match="partial"] .quote-route-transport-option-meta mark {
  background: rgba(254, 249, 195, 0.95);
  color: #a16207;
}

.quote-costing-modal-actions {
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 980px) {
  .lead-modal.quote-costing-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
  }

  .quote-costing-modal-body {
    grid-template-columns: minmax(170px, 210px) minmax(0, 1fr);
    align-items: start;
    overflow: auto;
  }

  .quote-costing-day-rail {
    position: sticky;
    top: 0;
    max-height: calc(100dvh - 190px);
  }

  .quote-costing-workspace,
  .quote-costing-summary-panel {
    overflow: visible;
  }

  .quote-costing-summary-panel {
    grid-column: 2;
  }

  .quote-costing-form-grid {
    grid-template-columns: 1fr;
  }

  .quote-costing-meal-grid {
    grid-template-columns: 1fr;
  }

  .quote-costing-summary-grid {
    grid-template-columns: 1fr;
  }

  .quote-costing-room-row {
    grid-template-columns: 1fr;
  }

  .quote-costing-room-table-head {
    display: none;
  }

  .quote-costing-room-line-total {
    text-align: left;
  }

  .quote-costing-service-summary {
    grid-template-columns: 1fr;
  }

  .quote-costing-occupancy-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quote-costing-breakdown-row {
    grid-template-columns: 1fr;
  }

  .quote-route-transport-option {
    grid-template-columns: 1fr;
  }

  .quote-route-transport-option-meta {
    justify-items: stretch;
  }
}

@media (max-width: 1280px) {
  .lead-modal.quote-costing-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
  }
}

@media (max-width: 640px) {
  .quote-costing-modal-header {
    padding: 12px;
    gap: 8px;
    grid-template-columns: 1fr auto;
  }

  .quote-costing-modal-heading {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .quote-costing-header-stats {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }

  .quote-costing-header-stats article {
    padding: 6px 8px;
  }

  .quote-costing-modal-heading .muted {
    white-space: normal;
  }

  .quote-costing-modal-body {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .quote-costing-day-rail {
    position: static;
    max-height: none;
  }

  .quote-costing-day-list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-height: 32vh;
  }

  .quote-costing-summary-panel {
    grid-column: 1;
  }

  .quote-costing-modal-footer {
    padding: 8px 10px 10px;
    grid-template-columns: 1fr;
  }

  .quote-costing-modal-footer .form-status {
    margin: 0 0 8px;
  }

  .quote-costing-modal-footer .quote-costing-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .quote-costing-modal-footer .quote-costing-modal-actions button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
  }

  .quote-costing-modal-footer .quote-costing-modal-actions button:last-child {
    grid-column: 1 / -1;
  }

  .quote-costing-occupancy-grid {
    grid-template-columns: 1fr;
  }

  .quote-costing-room-inputs {
    grid-template-columns: 1fr;
  }

  .quote-costing-selected-day-header,
  .quote-costing-section-tabs {
    position: static;
  }

  .quote-costing-section-tabs {
    display: flex;
    overflow-x: auto;
  }

  .quote-costing-section-tabs a {
    min-width: 132px;
  }

  .quote-costing-rooming-allocation {
    grid-template-columns: 1fr;
  }

  .quote-costing-rooming-allocation > div:last-child {
    text-align: left;
  }
}

body[data-active-section="quote-generator"] .quote-commercial-details-panel {
  overflow: hidden;
}

body[data-active-section="quote-generator"] .quote-commercial-details-panel .quote-commercial-form-grid {
  gap: 10px 12px;
  align-items: start;
}

body[data-active-section="quote-generator"] .quote-commercial-details-panel .field {
  gap: 5px;
}

body[data-active-section="quote-generator"] .quote-commercial-details-panel .field > span,
body[data-active-section="quote-generator"] .quote-payment-schedule-row .field > span {
  color: #475569;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

body[data-active-section="quote-generator"] .quote-commercial-details-panel input,
body[data-active-section="quote-generator"] .quote-commercial-details-panel select {
  min-height: 40px;
}

body[data-active-section="quote-generator"] .quote-commercial-details-panel textarea {
  min-height: 78px;
}

body[data-active-section="quote-generator"] .quote-contact-source-card {
  padding: 12px 14px;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

body[data-active-section="quote-generator"] .quote-contact-source-card > strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-contact-source-card > p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

body[data-active-section="quote-generator"] .quote-commercial-quick-summary {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 12px 12px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(12px);
}

body[data-active-section="quote-generator"] .quote-commercial-quick-summary article {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(255, 247, 237, 0.64));
}

body[data-active-section="quote-generator"] .quote-commercial-quick-summary span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-commercial-quick-summary strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-builder {
  display: grid;
  gap: 8px;
}

/* Departure Batches Ops Control Centre - isolated lazy-module surface */
body[data-active-section="departure-batches"] .departure-batch-ops-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body[data-active-section="departure-batches"] .departure-batch-ops-kpi {
  min-width: 0;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
  padding: 13px 15px;
}

body[data-active-section="departure-batches"] .departure-batch-ops-kpi span,
body[data-active-section="departure-batches"] .departure-batch-ops-kpi small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

body[data-active-section="departure-batches"] .departure-batch-ops-kpi strong {
  display: block;
  margin: 5px 0 2px;
  color: #0f172a;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
}

body[data-active-section="departure-batches"] .departure-batch-ops-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(6, minmax(116px, 0.72fr)) auto;
  gap: 8px;
  margin: 11px 0;
}

body[data-active-section="departure-batches"] .departure-batch-ops-filters input,
body[data-active-section="departure-batches"] .departure-batch-ops-filters select,
body[data-active-section="departure-batches"] .departure-batch-ops-filters button {
  min-width: 0;
  min-height: 40px;
}

body[data-active-section="departure-batches"] .departure-batch-search-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

body[data-active-section="departure-batches"] .departure-batch-search-field input {
  border-radius: 12px 0 0 12px;
}

body[data-active-section="departure-batches"] .departure-batch-search-field button {
  border: 1px solid #2563eb;
  border-radius: 0 12px 12px 0;
  background: #2563eb;
  color: #fff;
  font-weight: 850;
  padding-inline: 13px;
}

body[data-active-section="departure-batches"] .departure-batch-list-header {
  display: grid;
  grid-template-columns: 32px minmax(170px, 1.18fr) minmax(130px, 0.76fr) minmax(220px, 1.35fr) minmax(210px, 1fr) 112px;
  gap: 10px;
  align-items: center;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 9px 11px;
  text-transform: uppercase;
}

body[data-active-section="departure-batches"] .departure-batch-bulk-bar {
  position: sticky;
  top: 6px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 8px 0;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.97);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  padding: 9px 11px;
}

body[data-active-section="departure-batches"] .departure-batch-bulk-bar[hidden] {
  display: none !important;
}

body[data-active-section="departure-batches"] .departure-batch-bulk-bar strong {
  margin-right: auto;
  color: #1e3a8a;
}

body[data-active-section="departure-batches"] .departure-batch-bulk-bar button,
body[data-active-section="departure-batches"] .departure-batch-row-action {
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  padding: 7px 9px;
}

body[data-active-section="departure-batches"] .quote-batch-inventory-item.departure-batch-ops-row {
  grid-template-columns: 32px minmax(170px, 1.18fr) minmax(130px, 0.76fr) minmax(220px, 1.35fr) minmax(210px, 1fr) 112px;
  padding: 11px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

body[data-active-section="departure-batches"] .quote-batch-inventory-item.departure-batch-ops-row.is-selected {
  border-color: rgba(37, 99, 235, 0.55);
  background: #f8fbff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
}

body[data-active-section="departure-batches"] .departure-batch-select {
  display: grid;
  place-items: center;
}

body[data-active-section="departure-batches"] .departure-batch-select input,
body[data-active-section="departure-batches"] #quoteBatchInventorySelectAll {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

body[data-active-section="departure-batches"] .departure-status {
  display: inline-flex;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  text-transform: capitalize;
}

body[data-active-section="departure-batches"] .departure-status-active { background: #dcfce7; color: #166534; }
body[data-active-section="departure-batches"] .departure-status-draft { background: #ffedd5; color: #9a3412; }
body[data-active-section="departure-batches"] .departure-status-closed,
body[data-active-section="departure-batches"] .departure-status-inactive { background: #e2e8f0; color: #334155; }
body[data-active-section="departure-batches"] .departure-status-cancelled { background: #fee2e2; color: #991b1b; }
body[data-active-section="departure-batches"] .departure-status-archived { background: #f1f5f9; color: #64748b; }

body[data-active-section="departure-batches"] .departure-batch-route-cell small {
  display: block;
  margin-top: 5px;
  color: #0f766e;
  font-weight: 850;
}

body[data-active-section="departure-batches"] .departure-batch-seat-block {
  min-width: 0;
}

body[data-active-section="departure-batches"] .departure-batch-seat-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-active-section="departure-batches"] .departure-batch-seat-summary span {
  color: #475569;
  font-size: 11px;
  font-weight: 750;
}

body[data-active-section="departure-batches"] .departure-batch-seat-summary strong {
  display: inline;
  color: #0f172a;
}

body[data-active-section="departure-batches"] .departure-batch-utilization {
  height: 7px;
  margin: 8px 0 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

body[data-active-section="departure-batches"] .departure-batch-utilization i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

body[data-active-section="departure-batches"] .departure-batch-seat-block > small {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

body[data-active-section="departure-batches"] .departure-batch-actions {
  display: grid;
  gap: 6px;
  align-self: center;
}

body[data-active-section="departure-batches"] .departure-batch-actions label {
  display: block;
  min-width: 0;
}

body[data-active-section="departure-batches"] .departure-batch-actions select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  padding: 7px 8px;
}

body[data-active-section="departure-batches"] .departure-batch-actions .is-edit {
  width: 100%;
  border-color: rgba(37, 99, 235, 0.42);
  background: #eff6ff;
  color: #1d4ed8;
}

body[data-active-section="departure-batches"] .departure-batch-pagination {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

body[data-active-section="departure-batches"] .departure-batch-pagination > div {
  display: flex;
  gap: 7px;
}

body[data-active-section="departure-batches"] .departure-batch-empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  text-align: center;
}

body[data-active-section="departure-batches"] .departure-batch-empty p {
  margin: 6px 0 0;
  color: #64748b;
}

.departure-batch-action-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(8px);
  padding: 20px;
}

.departure-batch-action-modal[hidden],
.departure-batch-transport-fields[hidden],
.departure-batch-edit-fields[hidden] {
  display: none !important;
}

.departure-batch-action-modal > section {
  width: min(680px, 100%);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  padding: 20px;
}

.departure-batch-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.departure-batch-modal-head h4 {
  margin: 2px 0 0;
  font-size: 22px;
}

.departure-batch-transport-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.departure-batch-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.departure-batch-capacity-guard {
  grid-column: 1 / -1;
  margin: 0;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  font-weight: 800;
  padding: 10px;
}

.departure-batch-mobile-create {
  display: none;
}

@media (max-width: 1180px) {
  body[data-active-section="departure-batches"] .departure-batch-ops-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-active-section="departure-batches"] .departure-batch-search-field {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  body[data-active-section="departure-batches"] .departure-batch-ops-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-active-section="departure-batches"] .departure-batch-ops-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-active-section="departure-batches"] .departure-batch-list-header {
    display: none;
  }

  body[data-active-section="departure-batches"] .quote-batch-inventory-item.departure-batch-ops-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: start;
  }

  body[data-active-section="departure-batches"] .departure-batch-route-cell,
  body[data-active-section="departure-batches"] .departure-batch-seat-block {
    grid-column: 2 / -1;
  }
}

@media (max-width: 720px) {
  body[data-active-section="departure-batches"] .departure-batch-mobile-create {
    display: inline-flex;
  }

  body[data-active-section="departure-batches"] .quote-batch-inventory-form {
    display: none;
  }

  body[data-active-section="departure-batches"] .quote-batch-inventory-form.is-mobile-open {
    display: grid;
  }

  body[data-active-section="departure-batches"] .departure-batch-ops-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body[data-active-section="departure-batches"] .departure-batch-ops-kpi {
    padding: 11px;
  }

  body[data-active-section="departure-batches"] .departure-batch-ops-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-active-section="departure-batches"] .departure-batch-search-field,
  body[data-active-section="departure-batches"] .departure-batch-ops-filters #quoteBatchInventoryClearFilters {
    grid-column: 1 / -1;
  }

  body[data-active-section="departure-batches"] .quote-batch-inventory-item.departure-batch-ops-row {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="departure-batches"] .departure-batch-select {
    justify-content: start;
  }

  body[data-active-section="departure-batches"] .departure-batch-identity,
  body[data-active-section="departure-batches"] .departure-batch-route-cell,
  body[data-active-section="departure-batches"] .departure-batch-seat-block {
    grid-column: 1;
  }

  body[data-active-section="departure-batches"] .departure-batch-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-active-section="departure-batches"] .departure-batch-bulk-bar {
    position: fixed;
    right: 12px;
    left: 12px;
    top: auto;
    bottom: 12px;
    z-index: 10010;
  }

  body[data-active-section="departure-batches"] .departure-batch-bulk-bar strong {
    flex: 1 0 100%;
  }

  body[data-active-section="departure-batches"] .departure-batch-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-active-section="departure-batches"] .departure-batch-pagination > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .departure-batch-transport-fields {
    grid-template-columns: 1fr;
  }

  .departure-batch-capacity-guard {
    grid-column: 1;
  }

  .departure-batch-edit-fields {
    grid-template-columns: 1fr;
  }

  .departure-batch-action-modal {
    align-items: end;
    padding: 10px;
  }

  .departure-batch-action-modal > section {
    max-height: 88dvh;
    overflow: auto;
    border-radius: 22px 22px 12px 12px;
  }

  body[data-active-section="departure-batches"] .quote-batch-inventory-list-card {
    padding-bottom: 150px;
  }
}

body[data-active-section="quote-generator"] .quote-manual-selling-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 14px 32px rgba(120, 53, 15, 0.07);
}

body[data-active-section="quote-generator"] .quote-manual-selling-card.is-enabled {
  border-color: rgba(16, 185, 129, 0.38);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.98));
}

body[data-active-section="quote-generator"] .quote-manual-selling-card.is-readonly {
  opacity: 0.9;
}

body[data-active-section="quote-generator"] .quote-manual-selling-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

body[data-active-section="quote-generator"] .quote-manual-selling-head h5 {
  margin: 2px 0 4px;
  color: #0f172a;
  font-size: 1rem;
}

body[data-active-section="quote-generator"] .quote-manual-selling-head p:last-child,
body[data-active-section="quote-generator"] .quote-manual-selling-cost-note {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

body[data-active-section="quote-generator"] .quote-manual-selling-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  background: #fff;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-manual-traveller-context,
body[data-active-section="quote-generator"] .quote-manual-legacy-conversion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

body[data-active-section="quote-generator"] .quote-manual-traveller-context span,
body[data-active-section="quote-generator"] .quote-manual-legacy-conversion p {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
}

body[data-active-section="quote-generator"] .quote-manual-traveller-context strong,
body[data-active-section="quote-generator"] .quote-manual-legacy-conversion strong {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-manual-legacy-conversion {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(255, 251, 235, 0.94);
}

body[data-active-section="quote-generator"] .quote-manual-traveller-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-active-section="quote-generator"] .quote-manual-traveller-rate-card {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

body[data-active-section="quote-generator"] .quote-manual-traveller-rate-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-manual-traveller-rate-card header span {
  color: #0f172a;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-manual-traveller-rate-card header strong {
  color: #047857;
  font-size: 0.72rem;
}

body[data-active-section="quote-generator"] .quote-manual-traveller-rate-card .field {
  margin: 0;
}

body[data-active-section="quote-generator"] .quote-manual-selling-grid,
body[data-active-section="quote-generator"] .quote-manual-selling-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-manual-selling-grid output,
body[data-active-section="quote-generator"] .quote-manual-selling-grid input,
body[data-active-section="quote-generator"] .quote-manual-selling-grid select {
  min-height: 42px;
}

body[data-active-section="quote-generator"] .quote-manual-selling-grid output {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
  color: #0f172a;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-manual-selling-summary article {
  padding: 10px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
}

body[data-active-section="quote-generator"] .quote-manual-selling-summary span,
body[data-active-section="quote-generator"] .quote-manual-selling-summary strong {
  display: block;
}

body[data-active-section="quote-generator"] .quote-manual-selling-summary span {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-manual-selling-summary strong {
  margin-top: 4px;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-manual-selling-cost-note {
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
}

@media (max-width: 1100px) {
  body[data-active-section="quote-generator"] .quote-manual-traveller-rate-grid,
  body[data-active-section="quote-generator"] .quote-manual-selling-grid,
  body[data-active-section="quote-generator"] .quote-manual-selling-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body[data-active-section="quote-generator"] .quote-manual-selling-head {
    flex-direction: column;
  }

  body[data-active-section="quote-generator"] .quote-manual-traveller-context,
  body[data-active-section="quote-generator"] .quote-manual-legacy-conversion {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-active-section="quote-generator"] .quote-manual-traveller-rate-grid,
  body[data-active-section="quote-generator"] .quote-manual-selling-grid,
  body[data-active-section="quote-generator"] .quote-manual-selling-summary {
    grid-template-columns: 1fr;
  }
}

body[data-active-section="quote-generator"].quote-builder-template-only-mode .quote-payment-schedule-primary,
body[data-active-section="quote-generator"].quote-builder-template-only-mode .quote-builder-revision-toggle,
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="share"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="actions"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="payments"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="guests"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="web-link"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="pdf"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="invoices"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-quote-builder-top-action="documents"],
body[data-active-section="quote-generator"].quote-builder-template-only-mode #quoteGenerateShareTopButton,
body[data-active-section="quote-generator"].quote-builder-template-only-mode #quoteSubmitDraftTopLink,
body[data-active-section="quote-generator"].quote-builder-template-only-mode #quoteUpdateDraftButton,
body[data-active-section="quote-generator"].quote-builder-template-only-mode #quoteSubmitDraftButton,
body[data-active-section="quote-generator"].quote-builder-template-only-mode #quoteSaveDraftButton,
body[data-active-section="quote-generator"].quote-builder-template-only-mode .quote-builder-left-nav-card,
body[data-active-section="quote-generator"].quote-builder-template-only-mode [data-open-quote-costing-modal],
body[data-active-section="quote-generator"].quote-builder-template-only-mode #openQuoteCostingModalButton,
body[data-active-section="quote-generator"].quote-builder-template-only-mode .quote-day-linked-services,
body[data-active-section="quote-generator"].quote-builder-template-only-mode #quoteManualSellingCard,
body[data-active-section="quote-generator"].quote-builder-template-only-mode #quoteBuilderPaymentSection {
  display: none !important;
}

body[data-active-section="quote-generator"].quote-builder-template-only-mode .quote-template-workspace-message {
  grid-column: 1 / -1;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-primary {
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 247, 237, 0.72));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

body[data-active-section="quote-generator"] .quote-payment-schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 122, 48, 0.08), rgba(255, 255, 255, 0.88));
}

body[data-active-section="quote-generator"] .quote-payment-schedule-head span {
  display: block;
  font-weight: 800;
  color: #111827;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-head small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.76rem;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-head .ghost-button {
  min-height: 36px;
  padding: 8px 14px;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-rows {
  display: grid;
  gap: 7px;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(110px, 0.65fr) minmax(76px, 0.42fr) minmax(132px, 0.72fr) minmax(190px, 1fr) 86px;
  gap: 8px;
  align-items: end;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

body[data-active-section="quote-generator"] .quote-payment-schedule-balance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(255, 247, 237, 0.72));
}

body[data-active-section="quote-generator"] .quote-payment-schedule-balance article {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}

body[data-active-section="quote-generator"] .quote-payment-schedule-balance article.is-warning {
  border-color: rgba(249, 115, 22, 0.28);
  background: rgba(255, 247, 237, 0.92);
}

body[data-active-section="quote-generator"] .quote-payment-schedule-balance span,
body[data-active-section="quote-generator"] .quote-payment-schedule-row-balance {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-balance span {
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-balance strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-row-balance {
  margin-top: 4px;
  color: #0f766e;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-row .field {
  min-width: 0;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-row input,
body[data-active-section="quote-generator"] .quote-payment-schedule-row select {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 0.9rem;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-remove {
  min-height: 38px;
  padding: 8px 10px;
  border-color: rgba(239, 68, 68, 0.22);
  color: #b91c1c;
  font-size: 0.82rem;
}

body[data-active-section="quote-generator"] .quote-payment-schedule-remove:disabled {
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

body[data-active-section="quote-generator"] #quotePaymentScheduleStatus {
  margin-top: 0;
  font-size: 0.78rem;
}

body[data-active-section="quote-generator"] .quote-activity-log-builder {
  display: grid;
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-internal-note-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.35fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.78);
}

body[data-active-section="quote-generator"] .quote-internal-note-row input {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 0.9rem;
}

body[data-active-section="quote-generator"] .quote-internal-note-row .ghost-button {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-activity-log-list {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

body[data-active-section="quote-generator"] .quote-activity-log-item,
body[data-active-section="quote-generator"] .quote-activity-log-empty {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

body[data-active-section="quote-generator"] .quote-activity-log-item.is-reminder {
  border-color: rgba(249, 115, 22, 0.24);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.88), rgba(255, 255, 255, 0.9));
}

body[data-active-section="quote-generator"] .quote-activity-log-item strong {
  display: block;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-activity-log-item p,
body[data-active-section="quote-generator"] .quote-activity-log-empty {
  margin: 3px 0 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.35;
}

body[data-active-section="quote-generator"] .quote-activity-log-item small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
}

body[data-active-section="quote-generator"] .quote-activity-log-item > span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.74rem;
  font-weight: 900;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-commercial-quick-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-active-section="quote-generator"] .quote-payment-schedule-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-active-section="quote-generator"] .quote-internal-note-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-active-section="quote-generator"] .quote-payment-schedule-balance {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-active-section="quote-generator"] .quote-payment-schedule-note-field,
  body[data-active-section="quote-generator"] .quote-payment-schedule-remove {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body[data-active-section="quote-generator"] .quote-commercial-quick-summary {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 8px;
    margin-right: 8px;
  }

  body[data-active-section="quote-generator"] .quote-payment-schedule-head {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-active-section="quote-generator"] .quote-payment-schedule-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] .quote-internal-note-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] .quote-payment-schedule-balance {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] .quote-payment-schedule-note-field,
  body[data-active-section="quote-generator"] .quote-payment-schedule-remove {
    grid-column: auto;
  }
}

/* Quote reference custom picker (prevents browser-native dropdown drift/overlap). */
body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker {
  position: relative;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-source-native {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  width: 0;
  height: 0;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-toggle {
  position: relative;
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  color: #172033;
  font-weight: 700;
  text-align: left;
  padding: 0 36px 0 12px;
  cursor: pointer;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-toggle::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(71, 85, 105, 0.9);
  border-bottom: 2px solid rgba(71, 85, 105, 0.9);
  transform: translateY(-60%) rotate(45deg);
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-toggle[aria-expanded="true"] {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: #ffffff;
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.2);
  z-index: 45;
  padding: 6px;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: #172033;
  font-weight: 700;
  text-align: left;
  border-radius: 9px;
  padding: 8px 10px;
  cursor: pointer;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-option:hover {
  background: rgba(37, 99, 235, 0.1);
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-option.is-active {
  background: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}

/* Keep template picker menu above downstream cards/panels in quote builder. */
body[data-active-section="quote-generator"] .quote-builder-hero-card,
body[data-active-section="quote-generator"] .quote-builder-main-column,
body[data-active-section="quote-generator"] .quote-reference-source-panel {
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  position: relative;
  z-index: 34;
}

body[data-active-section="quote-generator"] .quote-reference-source-panel {
  position: relative;
  z-index: 35;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker {
  z-index: 40;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid .quote-reference-picker-menu {
  z-index: 1200;
}

* { box-sizing: border-box; }
html {
  width: 100%;
  min-height: 100dvh;
  scroll-behavior: smooth;
}
body {
  width: 100%;
  margin: 0;
  min-height: 100dvh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(43, 110, 242, 0.15), transparent 22%),
    radial-gradient(circle at 85% 15%, rgba(22, 166, 182, 0.14), transparent 20%),
    linear-gradient(160deg, #f6f9fc 0%, #ebf2f8 42%, #e4edf7 100%);
}

#root {
  width: 100%;
  min-height: 100dvh;
}

.app-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(43, 110, 242, 0.14), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(22, 166, 182, 0.14), transparent 22%),
    linear-gradient(160deg, rgba(246, 249, 252, 0.98) 0%, rgba(235, 242, 248, 0.98) 42%, rgba(228, 237, 247, 0.98) 100%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.app-boot-card {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84)),
    linear-gradient(135deg, rgba(43, 110, 242, 0.08), rgba(22, 166, 182, 0.08));
}

.app-boot-card h1,
.app-boot-card p {
  margin: 0;
}

.app-boot-card h1 {
  margin-top: 14px;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.08;
}

.app-boot-card p {
  margin-top: 12px;
  max-width: 46ch;
}

.app-boot-pill {
  width: fit-content;
}

button, textarea, input, select { font: inherit; }
button, input, select, textarea { border: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }
.full-width { width: 100%; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
  transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

body[data-user-access-state="pending"] .app-shell,
body[data-boot-phase="routing"] .app-shell,
body[data-user-access-state="resolved"]:not([data-boot-phase="prepaint"]):not([data-boot-phase="hydrating"]):not([data-boot-phase="ready"]) .app-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
}

body[data-user-access-state="resolved"][data-boot-phase="prepaint"] .app-shell,
body[data-user-access-state="resolved"][data-boot-phase="hydrating"] .app-shell,
body[data-user-access-state="resolved"][data-boot-phase="ready"] .app-shell {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

body[data-user-access-state="resolved"][data-boot-phase="prepaint"] .app-boot-screen,
body[data-user-access-state="resolved"][data-boot-phase="hydrating"] .app-boot-screen,
body[data-user-access-state="resolved"][data-boot-phase="ready"] .app-boot-screen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.runtime-build-identity {
  margin: 10px 0 8px;
  color: var(--muted, #64748b);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.runtime-build-identity[data-build-status="ready"] {
  color: #0f766e;
}

.runtime-build-identity[data-build-status="warning"] {
  color: #b45309;
}

.sidebar, .dashboard-main { min-width: 0; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.95);
  color: #eff5ff;
  box-shadow: var(--shadow-lg);
}

.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #2b6ef2, #16a6b6); font-weight: 800; font-size: 1.2rem;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}
.brand-block h1, .topbar h2, .hero-copy h3, .panel-header h3, .sidebar-card h2, .login-card h2, .login-showcase h1 { margin: 0; }

.nav-menu { display: grid; gap: 16px; }
.nav-group {
  display: grid;
  gap: 10px;
}
.nav-group-label {
  margin: 0;
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 245, 249, 0.5);
}
.nav-item {
  width: 100%; padding: 14px 16px; border-radius: 18px; text-align: left; color: #d7e3f7;
  background: rgba(255, 255, 255, 0.04); border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.nav-item:hover, .nav-item.active {
  transform: translateX(2px); background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-card, .hero-panel, .panel, .login-card, .login-showcase {
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card {
  margin-top: auto;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}
.sidebar-card .muted, .sidebar-card .eyebrow, .login-showcase .muted, .login-showcase .eyebrow { color: rgba(255, 255, 255, 0.82); }
.metric-inline {
  display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-main { display: flex; flex-direction: column; gap: 20px; }
.topbar, .panel-header, .chat-footer, .form-actions, .permission-header, .user-card-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar { padding: 4px 2px; }
.workspace-shell-bar {
  display: grid;
  gap: 18px;
  padding: 20px 22px;
  background:
    radial-gradient(circle at top right, rgba(43, 110, 242, 0.12), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.96));
}

.workspace-shell-bar-top,
.workspace-shell-title-row,
.workspace-shell-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.workspace-shell-copy {
  display: grid;
  gap: 8px;
}

.workspace-shell-copy h3,
.workspace-shell-copy p {
  margin: 0;
}

.workspace-shell-title-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.workspace-shell-actions {
  flex-wrap: wrap;
}

.workspace-shell-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.marketing-portal-launcher[data-launch-state="opening"] {
  cursor: progress;
  opacity: 0.78;
}

.marketing-portal-launcher[data-launch-state="opened"] {
  box-shadow: inset 3px 0 0 #0f9f8d;
}

.marketing-portal-launcher[data-launch-state="blocked"] {
  box-shadow: inset 3px 0 0 #dc4c64;
}

.marketing-launch-status {
  margin: 7px 10px 0;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
}

.workspace-shell-meta-card {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(244, 248, 255, 0.88);
}

.workspace-shell-meta-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.workspace-shell-meta-card strong {
  font-size: 0.96rem;
  line-height: 1.45;
}

.workspace-shell-state-pill[data-state-tone="pending"] {
  background: rgba(43, 110, 242, 0.14);
  color: var(--blue);
}

.workspace-shell-state-pill[data-state-tone="live"] {
  background: rgba(15, 159, 110, 0.14);
  color: var(--green);
}

.workspace-shell-state-pill[data-state-tone="blocked"] {
  background: rgba(220, 76, 100, 0.14);
  color: var(--red);
}

.workspace-shell-state-pill[data-state-tone="warning"] {
  background: rgba(220, 139, 24, 0.14);
  color: var(--amber);
}

.workspace-shell-actions .ghost-button[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.topbar-actions { display: flex; gap: 12px; }
.topbar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-profile > div:last-child {
  display: grid;
  gap: 4px;
}
.topbar-access-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255, 205, 86, 0.95), rgba(255, 238, 188, 0.98));
  border: 1px solid rgba(194, 141, 0, 0.18);
}

.hero-panel {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, rgba(43, 110, 242, 0.1), rgba(22, 166, 182, 0.12));
}
.login-greeting-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at top right, rgba(15, 159, 110, 0.15), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(25, 44, 78, 0.92));
  color: #eef6ff;
  border-color: rgba(130, 189, 255, 0.2);
}
.access-denied {
  display: grid;
  gap: 14px;
}
.login-greeting-banner .muted,
.login-greeting-banner .eyebrow {
  color: rgba(226, 236, 252, 0.78);
}
.login-greeting-copy {
  display: grid;
  gap: 10px;
}
.login-greeting-message {
  margin: 0;
  max-width: 820px;
}
.login-greeting-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sale-celebration-host {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 80;
  display: grid;
  gap: 12px;
  pointer-events: none;
}
.sale-celebration-banner {
  position: relative;
  overflow: hidden;
  min-width: min(420px, calc(100vw - 32px));
  max-width: 460px;
  padding: 18px 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 214, 102, 0.28);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 102, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(12, 19, 33, 0.96), rgba(18, 40, 63, 0.95));
  box-shadow: 0 22px 44px rgba(12, 18, 31, 0.28);
  color: #f8fbff;
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  pointer-events: auto;
}
.sale-celebration-banner.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.sale-celebration-banner strong,
.sale-celebration-banner p {
  margin: 0;
}
.sale-celebration-banner p {
  margin-top: 6px;
  color: rgba(232, 241, 255, 0.82);
}
.sale-celebration-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.sale-celebration-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.sale-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sale-confetti span {
  position: absolute;
  top: -12%;
  width: 8px;
  height: 14px;
  border-radius: 999px;
  opacity: 0.8;
  animation: saleConfettiFall 1800ms ease-out forwards;
}
@keyframes saleConfettiFall {
  0% {
    transform: translate3d(0, -10px, 0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(var(--drift, 0px), 240px, 0) rotate(420deg);
    opacity: 0;
  }
}

/* Phase 10AA: stop side rails from creating a giant blank center canvas. */
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  align-items: start !important;
  grid-auto-rows: min-content !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column,
body[data-active-section="quote-generator"] .quote-builder-right-column {
  align-self: start !important;
  align-content: start !important;
  max-height: min(560px, calc(100vh - 180px)) !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-gutter: stable;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  position: sticky;
  top: 18px;
}

body[data-active-section="quote-generator"] .quote-builder-left-column > .quote-builder-card,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-card,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  min-height: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-payment-card,
body[data-active-section="quote-generator"] .quote-builder-share-card {
  align-self: start !important;
  margin-top: 0 !important;
}

/* Phase 10.11: make Quote Desk render as its own CRM workspace, not as a card inside the generic dashboard. */
body[data-active-section="quote-generator"] {
  --quote-sidebar-width: 218px;
  --quote-header-height: 116px;
  background:
    radial-gradient(circle at 78% 0%, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%) !important;
}

body[data-active-section="quote-generator"] .app-shell {
  display: grid !important;
  grid-template-columns: var(--quote-sidebar-width) minmax(0, 1fr) !important;
  gap: 0 !important;
  min-height: 100vh !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] .sidebar {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  width: var(--quote-sidebar-width) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: auto !important;
  gap: 18px !important;
  padding: 24px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(41, 98, 255, 0.28), transparent 24%),
    linear-gradient(180deg, #071a39 0%, #031226 100%) !important;
  box-shadow: 18px 0 46px rgba(8, 24, 54, 0.22) !important;
}

body[data-active-section="quote-generator"] .brand-block {
  min-height: 54px;
  padding: 4px 0 14px !important;
}

body[data-active-section="quote-generator"] .brand-block .eyebrow {
  display: none !important;
}

body[data-active-section="quote-generator"] .brand-block h1::after {
  content: " AI CRM";
  display: block;
  color: rgba(226, 237, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

body[data-active-section="quote-generator"] .nav-menu {
  gap: 16px !important;
}

body[data-active-section="quote-generator"] .nav-group {
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .nav-group-label,
body[data-active-section="quote-generator"] .nav-item[data-nav-visibility="nested"],
body[data-active-section="quote-generator"] .nav-item[data-phase10-visibility],
body[data-active-section="quote-generator"] .nav-item[data-section="crm-dashboard"],
body[data-active-section="quote-generator"] .nav-item[data-section="hrms-dashboard"],
body[data-active-section="quote-generator"] .nav-item[data-section="vendor-dashboard"],
body[data-active-section="quote-generator"] .nav-item[data-section="operations-dashboard"],
body[data-active-section="quote-generator"] .nav-item[data-section="accounts-dashboard"],
body[data-active-section="quote-generator"] .nav-item[data-section="admin-dashboard"],
body[data-active-section="quote-generator"] .nav-item[data-section="telecalling"],
body[data-active-section="quote-generator"] .nav-item[data-section="chat-workspace"],
body[data-active-section="quote-generator"] .nav-item[data-section="support-desk"],
body[data-active-section="quote-generator"] .nav-item[data-section="follow-up"],
body[data-active-section="quote-generator"] .nav-item[data-section="archive-workspace"],
body[data-active-section="quote-generator"] .nav-item[data-section="assignment-rules"],
body[data-active-section="quote-generator"] .nav-item[data-section="guest-list"],
body[data-active-section="quote-generator"] .nav-item[data-section="manual-costing"],
body[data-active-section="quote-generator"] .nav-item[data-section="operations-masters"],
body[data-active-section="quote-generator"] .nav-item[data-section="vendor"],
body[data-active-section="quote-generator"] .nav-item[data-section="vendor-masters"],
body[data-active-section="quote-generator"] .nav-item[data-section^="marketing-"],
body[data-active-section="quote-generator"] .nav-item[data-section="invoices"],
body[data-active-section="quote-generator"] .sidebar-card .metric-inline {
  display: none !important;
}

body[data-active-section="quote-generator"] .nav-item {
  min-height: 46px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  color: rgba(237, 244, 255, 0.86) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

body[data-active-section="quote-generator"] .nav-item:hover,
body[data-active-section="quote-generator"] .nav-item.active,
body[data-active-section="quote-generator"] .nav-item[data-section="quote-generator"] {
  color: #ffffff !important;
  background: linear-gradient(135deg, #1d58f0, #1745c9) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: none !important;
}

body[data-active-section="quote-generator"] .sidebar-card {
  margin-top: auto !important;
  padding: 14px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

body[data-active-section="quote-generator"] .dashboard-main {
  display: block !important;
  min-width: 0 !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] .dashboard-main > .topbar {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection {
  display: block !important;
  min-height: 100vh !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-dashboard-hero,
body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-dashboard-grid:not(.quote-builder-reference-grid),
body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-desk-secondary-tools {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-grid {
  display: block !important;
  margin: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell {
  min-height: 100vh !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell > .panel-header {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: 216px minmax(620px, 1fr) 360px !important;
  gap: 16px !important;
  align-items: start !important;
  min-height: 100vh !important;
  padding: 0 24px 28px !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions {
  top: 0 !important;
  margin: 0 -24px 0 !important;
  padding: 24px 24px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(100, 116, 139, 0.16) !important;
  border-radius: 0 0 18px 18px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08) !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-breadcrumb {
  color: #172033 !important;
  font-size: 0.8rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title strong {
  color: #091331 !important;
  font-size: clamp(1.55rem, 1.8vw, 2rem) !important;
  letter-spacing: -0.04em !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions > * {
  min-width: 118px !important;
  min-height: 46px !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button {
  background: #061638 !important;
  box-shadow: 0 14px 28px rgba(6, 22, 56, 0.18) !important;
}

body[data-active-section="quote-generator"] #quoteGenerateShareTopButton,
body[data-active-section="quote-generator"] .quote-builder-route-links,
body[data-active-section="quote-generator"] .quote-builder-smart-buttons,
body[data-active-section="quote-generator"] .quote-builder-secondary-actions,
body[data-active-section="quote-generator"] .quote-builder-actions > .muted,
body[data-active-section="quote-generator"] .quote-builder-control-card,
body[data-active-section="quote-generator"] .quote-builder-ai-left-card,
body[data-active-section="quote-generator"] .quote-builder-left-rail-card,
body[data-active-section="quote-generator"] .quote-builder-trip-card,
body[data-active-section="quote-generator"] .quote-builder-suggestions-card,
body[data-active-section="quote-generator"] #quoteGeneratorStatus,
body[data-active-section="quote-generator"] #quoteContextSuggestion,
body[data-active-section="quote-generator"] #quoteAutomationReminders,
body[data-active-section="quote-generator"] .quote-builder-payment-card,
body[data-active-section="quote-generator"] .quote-builder-share-card {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-card {
  display: block !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  order: 0 !important;
  grid-column: 2 / 3 !important;
  padding: 18px !important;
  border-radius: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 76px !important;
  padding: 16px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  position: sticky !important;
  top: calc(var(--quote-header-height) + 16px) !important;
  grid-column: 1 !important;
  grid-row: 2 / span 3 !important;
  display: block !important;
  max-height: calc(100vh - var(--quote-header-height) - 32px) !important;
  overflow: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column {
  grid-column: 2 !important;
  display: grid !important;
  gap: 16px !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  position: sticky !important;
  top: calc(var(--quote-header-height) + 16px) !important;
  grid-column: 3 !important;
  grid-row: 2 / span 4 !important;
  display: block !important;
  max-height: calc(100vh - var(--quote-header-height) - 32px) !important;
  overflow: auto !important;
  padding-right: 4px !important;
}

body[data-active-section="quote-generator"] .quote-builder-itinerary-card {
  order: 1 !important;
  min-height: 0 !important;
  padding: 18px !important;
  border-radius: 16px !important;
  border-color: rgba(249, 115, 22, 0.18) !important;
}

body[data-active-section="quote-generator"] .quote-builder-commercial-card {
  order: 2 !important;
  padding: 18px !important;
  border-radius: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  order: 1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-pricing-card {
  order: 2 !important;
  position: static !important;
  max-height: none !important;
  margin-top: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-card,
body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  border: 1px solid rgba(111, 129, 159, 0.16) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.055) !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-card {
  min-height: 118px !important;
  padding: 16px !important;
  border-radius: 14px !important;
}

.quote-reference-action-notice {
  align-items: center;
  background: #fff7ed;
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  color: #172554;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 12px 14px;
}

.quote-reference-action-notice[hidden] {
  display: none !important;
}

.quote-reference-action-notice strong {
  color: #0f1b3d;
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quote-reference-action-notice span {
  color: #475569;
  font-weight: 700;
  text-align: right;
}

.quote-reference-action-notice.is-error {
  background: #fff1f2;
  border-color: rgba(248, 113, 113, 0.45);
}

.quote-reference-action-notice.is-success {
  background: #ecfdf5;
  border-color: rgba(34, 197, 94, 0.35);
}

.quote-reference-action-notice.is-loading {
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.35);
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column {
    position: static;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0;
  }
}
.hero-copy { max-width: 640px; }
.hero-badge, .pill, .status-badge {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700;
}
.hero-badge {
  flex-direction: column; align-items: flex-start; min-width: 180px; padding: 18px 20px;
  background: linear-gradient(135deg, #0f172a, #1b2740); color: #fff;
}
.badge-label { font-size: 0.78rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.08em; }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.stat-card {
  position: relative; padding: 22px; border-radius: 24px; background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; inset: auto -30px -30px auto; width: 120px; height: 120px; border-radius: 999px; opacity: 0.16;
}
.accent-blue::after { background: var(--blue); }
.accent-amber::after { background: var(--amber); }
.accent-green::after { background: var(--green); }
.accent-red::after { background: var(--red); }
.stat-label, .stat-card p { color: var(--muted); }
.stat-value { margin: 14px 0 10px; font-size: clamp(1.7rem, 2vw, 2.35rem); font-weight: 800; }
.stat-card p { margin: 0; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.95fr); gap: 20px; }
.quote-dashboard-workspace,
.onboarding-workspace { display: block; }
.quote-dashboard-hero {
  display: grid;
  gap: 18px;
}
.quote-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.quote-summary-card {
  min-height: 168px;
}
.quote-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: start;
}
.invoice-control-grid {
  grid-template-columns: minmax(320px, 1.02fr) minmax(360px, 0.98fr);
}
.invoice-detail-panel {
  display: grid;
  gap: 16px;
}
.invoice-detail-content,
.invoice-detail-grid,
.invoice-detail-records,
.invoice-detail-actions,
.invoice-queue-group,
.invoice-role-grid,
.invoice-summary-grid {
  display: grid;
  gap: 14px;
}
.invoice-summary-grid,
.invoice-role-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.invoice-queue-group {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(248, 250, 252, 0.82);
}
.invoice-queue-group-head,
.invoice-record-card-head,
.invoice-detail-record-head,
.invoice-action-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.invoice-record-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.invoice-record-card:hover,
.invoice-record-card.is-active {
  border-color: rgba(59, 130, 246, 0.34);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.invoice-record-card.is-blocked {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(255, 251, 235, 0.82);
}
.invoice-record-card.is-ready {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(236, 253, 245, 0.86);
}
.invoice-record-meta,
.invoice-detail-records {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.invoice-record-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.invoice-metric-chip,
.invoice-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.62);
  color: var(--text);
  font-size: 0.84rem;
}
.invoice-detail-record {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.72);
}
.invoice-status-banner {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(244, 248, 255, 0.9);
}
.invoice-status-banner.is-blocked {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(255, 247, 237, 0.92);
}
.invoice-status-banner.is-ready,
.invoice-status-banner.is-created {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(236, 253, 245, 0.9);
}
.invoice-role-card,
.invoice-summary-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.74);
}
.invoice-role-card strong,
.invoice-summary-card strong,
.invoice-status-banner strong,
.invoice-record-card strong {
  display: block;
}
.invoice-detail-actions {
  align-items: stretch;
}
.invoice-empty-state {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  background: rgba(248, 250, 252, 0.74);
  color: var(--muted);
}
.sales-order-control-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 0.9fr);
}
.sales-order-command-panel {
  display: grid;
  gap: 18px;
}
.sales-order-control-shell {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 12px;
  z-index: 3;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}
.sales-order-command-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(4, auto);
  gap: 12px;
  align-items: end;
}
.sales-order-command-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sales-order-search-field {
  display: block;
}
.sales-order-search-field input {
  width: 100%;
  min-height: 46px;
}
.sales-order-scope-shell {
  display: grid;
  gap: 6px;
}
.sales-order-scope-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sales-order-scope-toggle button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
}
.sales-order-scope-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sales-order-command-menu {
  position: relative;
}
.sales-order-command-trigger {
  min-width: 148px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sales-order-command-trigger span[aria-hidden="true"] {
  display: none;
}
.sales-order-command-trigger::after {
  content: "\25BE";
  font-size: 0.82em;
  line-height: 1;
}
.sales-order-command-menu[open] .sales-order-command-trigger {
  background: rgba(43, 110, 242, 0.1);
  border-color: rgba(43, 110, 242, 0.26);
}
.sales-order-command-menu summary {
  list-style: none;
}
.sales-order-command-menu summary::-webkit-details-marker {
  display: none;
}
.sales-order-command-panel-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 320px;
  max-width: min(92vw, 420px);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.18);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}
.sales-order-command-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.sales-order-command-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.sales-order-quick-filter-bar {
  margin-top: 0;
}
.sales-order-list-shell {
  display: grid;
  gap: 14px;
}
.sales-order-table-shell {
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.sales-order-control-table {
  min-width: 1180px;
}
.sales-order-control-table th,
.sales-order-control-table td {
  padding: 10px 12px;
}
.sales-order-control-table tbody tr {
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.sales-order-control-table tbody tr:hover {
  background: rgba(241, 245, 255, 0.92);
}
.sales-order-control-table tbody tr.is-active {
  background: rgba(43, 110, 242, 0.08);
}
.sales-order-primary-cell,
.sales-order-secondary-cell {
  display: grid;
  gap: 4px;
}
.sales-order-primary-cell strong,
.sales-order-secondary-cell strong {
  font-size: 0.95rem;
}
.sales-order-primary-cell p,
.sales-order-secondary-cell p,
.sales-order-meta-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.sales-order-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.sales-order-status-chip.status-pending {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.2);
  color: #9a3412;
}
.sales-order-status-chip.status-partial {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}
.sales-order-status-chip.status-confirmed,
.sales-order-status-chip.status-complete {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}
.sales-order-status-chip.status-cancelled {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.sales-order-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sales-order-row-actions .ghost-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}
.sales-order-group-row td {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sales-order-drawer-panel {
  position: sticky;
  top: 12px;
}
.sales-order-drawer-panel .quote-builder-preview-summary {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 255, 0.92));
}
.quote-generator-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}
.quote-template-filter-grid,
.quote-template-meta-grid {
  margin-top: 14px;
}
.quote-template-actions {
  margin-top: 14px;
}
.product-gallery-activity-lane {
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(105, 122, 148, 0.2);
  background: rgba(248, 250, 255, 0.72);
  display: grid;
  gap: 8px;
}
.product-gallery-activity-lane strong,
.product-gallery-activity-lane p {
  margin: 0;
}
.quote-template-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.quote-template-item {
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.quote-template-item.is-selected {
  border-color: rgba(43, 110, 242, 0.38);
  box-shadow: 0 0 0 1px rgba(43, 110, 242, 0.08);
}
.quote-template-item-top,
.quote-template-item-meta,
.quote-template-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quote-template-item-meta,
.quote-template-item-actions {
  flex-wrap: wrap;
}
.quote-template-item-copy {
  display: grid;
  gap: 5px;
}
.quote-template-item-copy p,
.quote-template-item-meta span {
  color: var(--muted);
}
.quote-template-item-copy p,
.quote-template-item-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}
.quote-template-item-copy strong {
  -webkit-line-clamp: 1;
}
.quote-template-item-copy p {
  -webkit-line-clamp: 2;
}
.quote-template-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quote-template-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(43, 110, 242, 0.08);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 600;
}
.quote-template-empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(105, 122, 148, 0.22);
  background: rgba(248, 250, 255, 0.72);
  color: var(--muted);
}
.quote-copilot-panel .quote-template-chip {
  border: 0;
  cursor: pointer;
}
.quote-builder-left-rail-card select,
.quote-builder-left-rail-card input,
.quote-builder-ai-left-card input,
.quote-builder-ai-left-card select {
  min-height: 38px;
}
.quote-copilot-preview-panel {
  border: 1px solid rgba(101, 132, 182, 0.16);
  box-shadow: 0 22px 50px rgba(13, 22, 38, 0.08);
}
.quote-copilot-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.quote-copilot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}
.quote-copilot-badge.is-template {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}
.quote-copilot-badge.is-edit {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
}
.quote-copilot-recommendation {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.quote-copilot-recommendation.is-priority {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.78);
}
.quote-copilot-recommendation p {
  margin: 0;
  color: var(--muted);
}
.quote-copilot-recommendation strong small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}
.quote-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}
.quote-builder-reference-grid {
  grid-template-columns: minmax(0, 1fr);
}
.quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: minmax(220px, 260px) minmax(540px, 1.75fr) minmax(300px, 360px);
  align-items: start;
  gap: 14px;
  width: 100%;
  max-width: 100%;
}
.quote-builder-reference-shell .quote-builder-actions {
  order: -2;
  grid-column: 1 / -1;
  position: sticky;
  top: 8px;
  z-index: 8;
  padding: 10px 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}
.quote-builder-reference-shell .quote-builder-topbar-card {
  display: grid;
  gap: 10px;
}
.quote-builder-topbar,
.quote-builder-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.quote-builder-breadcrumb {
  margin: 0 0 4px;
  color: #2563eb;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.quote-builder-back-link {
  color: inherit;
  text-decoration: none;
}
.quote-builder-back-link:hover {
  text-decoration: underline;
}
.quote-builder-record-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.quote-builder-record-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}
.quote-builder-topbar strong {
  display: block;
  font-size: 1rem;
}
.quote-builder-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.quote-builder-smart-buttons {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.quote-builder-smart-button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(101, 132, 182, 0.18);
  border-radius: 14px;
  color: #0f172a;
  text-decoration: none;
  background: rgba(248, 250, 252, 0.86);
}
.quote-builder-smart-button span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.quote-builder-smart-button strong {
  overflow: hidden;
  color: #1d4ed8;
  font-size: 0.86rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote-builder-smart-button:hover {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
}
.quote-builder-reference-shell .quote-builder-control-card {
  order: 0;
  grid-column: 1 / -1;
  padding: 12px;
}
.quote-builder-left-nav-card {
  order: 1;
  grid-column: 1;
}
.quote-builder-ai-left-card {
  order: 2;
  grid-column: 1;
}
.quote-builder-left-rail-card {
  order: 3;
  grid-column: 1;
}
.quote-builder-hero-card {
  order: -1;
  grid-column: 1 / -1;
  padding: 14px;
}
.quote-builder-trip-card {
  order: 4;
  grid-column: 1;
}
.quote-builder-itinerary-card {
  order: 1;
  grid-column: 2;
  min-height: 64vh;
  align-self: stretch;
  overflow: hidden;
}
.quote-builder-suggestions-card {
  order: 2;
  grid-column: 2;
}
.quote-builder-commercial-card {
  order: 3;
  grid-column: 2;
}
.quote-builder-payment-card {
  order: 4;
  grid-column: 2 / -1;
}
.quote-builder-pricing-card {
  order: 1;
  grid-column: 3;
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.quote-builder-reference-shell .quote-builder-preview-panel {
  order: 2;
  grid-column: 3;
  position: static;
  max-height: none;
  overflow: visible;
  padding: 16px;
}
.quote-builder-share-card,
.quote-builder-reference-shell #quoteGeneratorStatus,
.quote-builder-reference-shell #quoteContextSuggestion,
.quote-builder-reference-shell #quoteAutomationReminders {
  order: 5;
  grid-column: 1 / -1;
}
.quote-builder-reference-shell .quote-builder-card,
.quote-builder-reference-shell .quote-builder-visibility-card,
.quote-builder-reference-shell .quote-pricing-summary-card,
.quote-builder-reference-shell .field,
.quote-builder-reference-shell input,
.quote-builder-reference-shell textarea,
.quote-builder-reference-shell select {
  min-width: 0;
  max-width: 100%;
}
.quote-builder-reference-shell p,
.quote-builder-reference-shell strong,
.quote-builder-reference-shell span {
  overflow-wrap: anywhere;
}
.quote-builder-hero-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
.quote-builder-hero-summary article,
.quote-builder-suggestion-card {
  display: grid;
  gap: 6px;
  padding: 9px 11px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
}
.quote-builder-hero-summary article strong,
.quote-builder-suggestion-card strong,
.quote-builder-suggestion-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}
.quote-builder-hero-summary article strong,
.quote-builder-suggestion-card strong {
  -webkit-line-clamp: 1;
}
.quote-builder-suggestion-card p {
  -webkit-line-clamp: 3;
}
.quote-builder-hero-summary span,
.quote-builder-suggestion-card span {
  color: var(--muted);
  font-size: 0.78rem;
}
.quote-builder-compact-editor {
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
}
.quote-builder-compact-editor summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  list-style-position: inside;
}
.quote-builder-compact-editor[open] {
  padding-bottom: 12px;
}
.quote-builder-compact-editor[open] summary {
  border-bottom: 1px solid rgba(101, 132, 182, 0.12);
  margin-bottom: 12px;
}
.quote-builder-compact-editor .lead-form-grid {
  padding: 0 12px;
}
.quote-builder-quick-setup-button {
  border-color: rgba(251, 146, 60, 0.26);
  background: #fff3e8;
  color: #c05621;
  font-weight: 800;
  box-shadow: none;
}
.quote-builder-quick-setup-button:hover:not(:disabled) {
  border-color: rgba(251, 146, 60, 0.42);
  background: #ffead8;
  color: #9a3412;
}
.quote-reference-quick-setup-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.92));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}
.quote-reference-quick-setup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quote-reference-quick-setup-head div {
  display: grid;
  gap: 2px;
}
.quote-reference-quick-setup-head span,
.quote-reference-quick-setup-grid span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quote-reference-quick-setup-head strong {
  color: #0f172a;
  font-size: 1rem;
}
.quote-reference-quick-setup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.quote-reference-quick-setup-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.quote-reference-quick-setup-grid input {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 750;
}
.quote-reference-quick-setup-grid input:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.quote-reference-quick-setup-panel p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}
.quote-reference-source-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}
.quote-reference-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quote-reference-source-head div {
  display: grid;
  gap: 2px;
}
.quote-reference-source-head span,
.quote-reference-source-grid span {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.quote-reference-source-head strong {
  color: #0f172a;
  font-size: 1rem;
}
.quote-reference-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quote-reference-source-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.quote-reference-source-grid select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 750;
}
.quote-reference-source-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quote-reference-source-actions .ghost-button {
  min-height: 40px;
}
.quote-reference-source-panel p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}
.quote-builder-secondary-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quote-builder-secondary-summary article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.92);
}
.quote-builder-secondary-summary span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.quote-builder-secondary-summary strong,
.quote-builder-secondary-summary p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
}
.quote-builder-secondary-summary strong {
  -webkit-line-clamp: 1;
}
.quote-builder-secondary-summary p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
}
.quote-builder-secondary-details {
  margin-top: 12px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}
.quote-builder-secondary-details summary {
  cursor: pointer;
  padding: 11px 13px;
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 850;
  list-style-position: inside;
}
.quote-builder-secondary-details[open] {
  padding-bottom: 12px;
}
.quote-builder-secondary-details[open] summary {
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(101, 132, 182, 0.12);
}
.quote-builder-secondary-details .lead-form-grid,
.quote-builder-secondary-details .field,
.quote-builder-secondary-details .detail-action-row,
.quote-builder-secondary-details .form-status,
.quote-builder-secondary-details .chat-linked-card,
.quote-builder-secondary-details .quote-itinerary-result,
.quote-builder-secondary-details .quote-share-meta {
  margin-left: 12px;
  margin-right: 12px;
}
.quote-builder-preview-details .quote-itinerary-result {
  margin-top: 0;
}
.quote-builder-secondary-actions {
  flex-wrap: wrap;
}
.quote-builder-secondary-actions .detail-action-row {
  justify-content: flex-end;
}
.quote-builder-card-head,
.quote-builder-repeat-top {
  min-width: 0;
}
.quote-builder-repeat-top {
  align-items: flex-start;
}
.quote-builder-repeat-actions,
.quote-payment-action-row,
.quote-payment-quick-action-row,
.quote-share-actions {
  flex-wrap: wrap;
}
.quote-builder-repeat-actions .ghost-button,
.quote-payment-action-row .ghost-button,
.quote-payment-quick-action-row .ghost-button,
.quote-share-actions .ghost-button {
  min-width: 0;
}
.quote-builder-reference-shell .quote-builder-repeat-list {
  display: grid;
  gap: 12px;
}
.quote-builder-reference-shell .quote-builder-card {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}
.quote-builder-reference-shell .quote-builder-card:hover {
  border-color: rgba(37, 99, 235, 0.18);
}
.quote-builder-reference-shell .quote-builder-visibility-card {
  min-width: 0;
}
.quote-builder-payment-card,
.quote-builder-share-card,
.quote-builder-commercial-card,
.quote-builder-itinerary-card {
  scroll-margin-top: 110px;
}
.quote-builder-secondary-details {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.quote-builder-secondary-details[open] {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06), 0 12px 28px rgba(15, 23, 42, 0.06);
}
.quote-builder-secondary-details summary:hover {
  background: rgba(239, 246, 255, 0.72);
}
.quote-builder-pricing-card::-webkit-scrollbar,
.desk-list-shell::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.quote-builder-pricing-card::-webkit-scrollbar-thumb,
.desk-list-shell::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.32);
}
.quote-builder-pricing-card::-webkit-scrollbar-track,
.desk-list-shell::-webkit-scrollbar-track {
  background: transparent;
}
.quote-builder-section-nav {
  display: grid;
  gap: 8px;
}
.quote-builder-section-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(101, 132, 182, 0.16);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(248, 250, 252, 0.92);
}
.quote-builder-section-nav a:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(239, 246, 255, 0.96);
}
.quote-builder-section-nav a span {
  color: var(--muted);
  font-size: 0.78rem;
}
.quote-builder-action-link {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  justify-content: center;
  min-height: 38px;
}
.quote-builder-route-links {
  flex-wrap: wrap;
}
.quote-builder-route-links .quote-builder-action-link {
  min-width: 168px;
}
.quote-builder-action-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.58;
  cursor: not-allowed;
}
.quote-builder-ai-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quote-builder-ai-actions .pill {
  justify-content: center;
}
.quote-builder-ai-left-card {
  gap: 12px;
}
.quote-builder-ai-left-card .quote-builder-card-head {
  gap: 8px;
}
.quote-builder-ai-left-card .quote-builder-inline-ai-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}
.quote-builder-ai-left-card textarea {
  min-height: 74px;
  transition: min-height 0.18s ease, box-shadow 0.18s ease;
}
.quote-builder-ai-left-card textarea:focus {
  min-height: 132px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.quote-builder-suggestion-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(101, 132, 182, 0.16);
  padding-bottom: 10px;
}
.quote-builder-suggestion-tabs a {
  padding: 8px 10px;
  border-radius: 999px;
  color: #2563eb;
  text-decoration: none;
  background: rgba(239, 246, 255, 0.9);
}
.quote-transport-costing-planner {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.9);
}
.quote-transport-costing-planner,
.quote-transport-costing-planner * {
  box-sizing: border-box;
}
.quote-transport-costing-head,
.quote-transport-route-summary,
.quote-transport-mode-toggle,
.quote-transport-route-option-card {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quote-transport-costing-head,
.quote-transport-route-summary,
.quote-transport-route-option-card {
  justify-content: space-between;
}
.quote-transport-costing-head p,
.quote-transport-route-empty,
.quote-transport-route-option-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.quote-transport-mode-toggle {
  padding: 4px;
  border: 1px solid rgba(101, 132, 182, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}
.quote-transport-mode-toggle button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.quote-transport-mode-toggle button.is-active {
  color: #fff;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}
.quote-transport-route-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}
.quote-transport-route-summary span {
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}
.quote-transport-route-summary small,
.quote-transport-route-summary em,
.quote-transport-route-tabs > article > span,
.quote-transport-route-option-card span {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}
.quote-transport-route-summary em.is-success {
  color: #047857;
}
.quote-transport-route-summary em.is-warning {
  color: #c2410c;
}
.quote-transport-route-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
.quote-transport-route-tabs > article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}
.quote-transport-route-tabs > article > strong {
  overflow-wrap: anywhere;
}
.quote-transport-route-tabs > article > .ghost-button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}
.quote-transport-route-tabs > article.is-ready {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(240, 253, 244, 0.9);
}
.quote-transport-route-option-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
}
.quote-transport-route-selected {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(22, 163, 74, 0.26);
  border-radius: 14px;
  background: rgba(240, 253, 244, 0.92);
}
.quote-transport-route-selected.is-stale {
  border-color: rgba(234, 88, 12, 0.28);
  background: rgba(255, 247, 237, 0.92);
}
.quote-transport-route-selected > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.quote-transport-route-selected span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quote-transport-route-selected p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.quote-transport-route-option-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.quote-transport-route-option-card .quote-transport-route-option-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 150px;
}
.quote-transport-route-option-card strong {
  overflow-wrap: anywhere;
}
.quote-transport-route-option-card .ghost-button,
.quote-transport-route-selected .ghost-button {
  min-width: 0;
  white-space: normal;
}
.transport-route-builder {
  border: 1px dashed rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.72);
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.transport-route-saved-summary {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.92));
}
.transport-route-saved-summary-head,
.transport-route-live-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.transport-route-saved-summary-head span,
.transport-route-live-preview span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.transport-route-saved-summary-head strong,
.transport-route-live-preview strong {
  color: #0f172a;
  font-weight: 900;
}
.transport-route-saved-path {
  color: #172033;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.transport-route-saved-meta,
.transport-route-saved-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.transport-route-saved-meta span,
.transport-route-saved-stops span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.7);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}
.transport-route-builder.is-muted {
  opacity: 0.62;
}
.transport-route-builder-head,
.transport-route-stops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.transport-route-builder-head span,
.transport-route-stops-head span {
  font-weight: 800;
  color: #1f2a44;
}
.transport-route-builder-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.transport-route-builder-head small {
  color: #64748b;
  font-weight: 700;
}
.transport-route-save-button {
  white-space: nowrap;
}
.transport-route-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.transport-route-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.transport-route-summary-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
  max-width: 100%;
  min-width: 0;
}
.transport-route-summary-grid-compact {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px);
}
.transport-route-summary-grid > div,
.transport-route-summary-field,
.transport-route-leg-from {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}
.transport-route-summary-grid span,
.transport-route-leg-from span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.transport-route-summary-field {
  margin: 0;
}
.transport-route-summary-field .transport-route-location-search,
.transport-route-summary-field input {
  max-width: 100%;
  min-width: 0;
}
.transport-route-leg-from-editable {
  padding: 0;
  background: transparent;
  border: 0;
}
.transport-route-leg-from-editable > span {
  padding: 0 0 2px 2px;
}
.transport-route-leg-from-editable .transport-route-location-search {
  min-width: 0;
}
.transport-route-leg-from-editable .search-select-control {
  min-height: 42px;
}
.transport-route-summary-grid strong,
.transport-route-leg-from strong {
  color: #172033;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.transport-route-live-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}
.transport-route-live-preview > div {
  display: grid;
  gap: 4px;
  flex: 1 1 320px;
  min-width: 0;
}
.transport-route-live-preview strong {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.transport-route-live-preview small {
  flex: 0 1 260px;
  color: #64748b;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}
.transport-route-stops {
  margin-top: 12px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.transport-route-stop-row {
  display: grid;
  grid-template-columns: 82px minmax(150px, 0.65fr) minmax(220px, 1fr) minmax(124px, 150px) minmax(86px, max-content);
  gap: 10px;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 10px;
}
.transport-route-stop-row > * {
  min-width: 0;
}
.transport-route-stop-row .search-select,
.transport-route-stop-row .search-select-control,
.transport-route-stop-row .search-select-input {
  max-width: 100%;
  min-width: 0;
}
.transport-route-stop-day-label {
  align-items: center;
  background: #eef6ff;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 12px;
  color: #1d4ed8;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
}
.transport-route-stop-row select,
.transport-route-stop-remove {
  min-height: 42px;
}
.transport-route-stop-row input[type="number"] {
  display: none;
}
.transport-route-via-panel,
.transport-route-sightseeing-panel {
  grid-column: 3 / -1;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
.transport-route-via-panel {
  grid-column: 2 / 3;
}
.transport-route-via-panel .field,
.transport-route-sightseeing-panel .field {
  margin: 0;
}
.transport-route-via-panel .search-select-control,
.transport-route-sightseeing-search .search-select-control {
  background: #fff;
}
.transport-route-sightseeing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.transport-route-sightseeing-tag {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #bfd8ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 6px;
  line-height: 1;
  padding: 6px 8px;
}
.transport-route-sightseeing-tag button {
  align-items: center;
  background: #dbeafe;
  border: 0;
  border-radius: 999px;
  color: #1e3a8a;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  height: 18px;
  justify-content: center;
  padding: 0;
  width: 18px;
}
.transport-route-sightseeing-empty {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}
@media (max-width: 980px) {
  .quote-transport-costing-head {
    align-items: stretch;
    flex-direction: column;
  }
  .quote-transport-mode-toggle {
    width: 100%;
  }
  .quote-transport-mode-toggle button {
    flex: 1;
  }
  .quote-transport-route-tabs {
    grid-template-columns: 1fr;
  }
  .quote-transport-route-summary,
  .quote-transport-route-selected,
  .quote-transport-route-option-card {
    grid-template-columns: 1fr;
  }
  .quote-transport-route-option-card .quote-transport-route-option-side {
    justify-items: start;
    min-width: 0;
  }
  .transport-route-builder-grid,
  .transport-route-summary-grid,
  .transport-route-stop-row {
    grid-template-columns: 1fr;
  }
  .transport-route-builder-head,
  .transport-route-stops-head,
  .transport-route-live-preview,
  .transport-route-saved-summary-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .transport-route-live-preview small {
    text-align: left;
  }
  .transport-route-via-panel,
  .transport-route-sightseeing-panel {
    grid-column: auto;
  }
}
.quote-builder-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.quote-builder-progress-stepper {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}
.quote-builder-progress-step {
  position: relative;
  min-height: 82px;
  padding: 11px;
  border-color: rgba(101, 132, 182, 0.14);
  background: rgba(248, 250, 252, 0.74);
}
.quote-builder-progress-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 6px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
}
.quote-builder-progress-step strong,
.quote-builder-progress-step p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.quote-builder-progress-step strong {
  -webkit-line-clamp: 1;
}
.quote-builder-progress-step p {
  -webkit-line-clamp: 2;
  font-size: 0.78rem;
}
.quote-builder-progress-step.is-active {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08), 0 12px 28px rgba(37, 99, 235, 0.08);
}
.quote-builder-progress-step.is-complete {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(240, 253, 244, 0.92);
}
.quote-day-plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(101, 132, 182, 0.14);
}
.quote-day-visual-builder {
  display: grid;
  gap: 12px;
}
.quote-day-route-card {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.94));
}
.quote-day-route-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.quote-day-badge {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  font-size: 0.74rem;
  font-weight: 800;
}
.quote-day-route-meta,
.quote-day-service-strip,
.quote-day-summary-grid {
  display: grid;
  gap: 10px;
}
.quote-day-route-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quote-day-route-meta span,
.quote-day-service-strip article,
.quote-day-summary-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}
.quote-day-route-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quote-day-service-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.quote-day-service-strip article,
.quote-day-summary-grid article {
  display: grid;
  gap: 5px;
}
.quote-day-service-strip span,
.quote-day-summary-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}
.quote-day-commercial-board {
  display: grid;
  gap: 12px;
}
.quote-day-commercial-board-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}
.quote-day-commercial-board-head div,
.quote-day-commercial-board-head p {
  display: grid;
  gap: 4px;
  margin: 0;
}
.quote-day-commercial-catalog-head,
.quote-day-option-card,
.quote-day-option-side {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.quote-day-commercial-board-head span,
.quote-day-commercial-section-head span,
.quote-day-cost-strip span,
.quote-day-commercial-copy span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}
.quote-day-commercial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.quote-day-commercial-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}
.quote-day-commercial-catalog {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(101, 132, 182, 0.16);
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.88);
}
.quote-day-commercial-catalog-head {
  align-items: baseline;
}
.quote-day-service-action-card {
  display: grid;
  gap: 6px;
}
.quote-day-service-action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.quote-day-service-action-card .ghost-button {
  width: fit-content;
}
.quote-day-inline-selector {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(101, 132, 182, 0.22);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.84);
}
.quote-day-inline-selector.is-muted {
  background: rgba(250, 250, 252, 0.88);
}
.quote-day-inline-selector-head,
.quote-day-inline-selector-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.quote-day-inline-selector-head span,
.quote-day-inline-selector-actions strong {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.quote-day-inline-selector-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.quote-gt-lock-note {
  padding: 10px 12px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: 12px;
  background: rgba(255, 247, 237, 0.9);
  color: #9a3412;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}
.quote-copilot-badge.is-warning {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
}
.quote-day-overnight-toggle {
  display: grid;
  gap: 10px;
}
.quote-day-overnight-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(101, 132, 182, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}
.quote-day-overnight-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.quote-day-route-helper input[readonly] {
  color: var(--text);
  background: rgba(244, 247, 255, 0.92);
  cursor: default;
}
.quote-day-option-list {
  display: grid;
  gap: 10px;
}
.quote-day-option-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}
.quote-day-option-card.is-selected {
  border-color: rgba(34, 197, 94, 0.32);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.94));
}
.quote-day-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.quote-day-option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quote-day-option-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.quote-day-commercial-section-head,
.quote-day-commercial-row,
.quote-day-commercial-side {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.quote-day-commercial-row-list {
  display: grid;
  gap: 8px;
}
.quote-day-commercial-row {
  padding-top: 10px;
  border-top: 1px solid rgba(101, 132, 182, 0.12);
}
.quote-day-commercial-row:first-child {
  padding-top: 0;
  border-top: 0;
}
.quote-day-commercial-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.quote-day-commercial-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.quote-day-commercial-side {
  flex-direction: column;
  align-items: flex-end;
  min-width: 110px;
}
.quote-day-option-side {
  flex-direction: column;
  align-items: flex-end;
  min-width: 116px;
}
.quote-day-cost-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.quote-day-cost-strip article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}
.quote-day-service-strip strong,
.quote-day-summary-grid p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
}
.quote-day-service-strip strong {
  -webkit-line-clamp: 2;
}
.quote-day-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.quote-day-summary-grid p {
  -webkit-line-clamp: 3;
  color: var(--muted);
  line-height: 1.45;
}
.quote-builder-repeat-card-ai-updated {
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.08);
}
.quote-day-master-card {
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.quote-day-master-card.is-selected {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.46);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: 0 24px 54px rgba(37, 99, 235, 0.14);
}
.quote-day-master-card.is-selected .quote-day-plan-grid {
  display: grid;
  animation: quoteDayGridReveal 0.18s ease both;
}
.quote-day-master-card.is-collapsed-ready {
  gap: 10px;
  padding: 13px 14px;
  border-style: dashed;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 250, 252, 0.78));
  cursor: pointer;
}
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  padding: 12px;
  background: rgba(248, 250, 252, 0.9);
}
.quote-day-master-card.is-collapsed-ready .quote-day-route-card strong,
.quote-day-master-card.is-collapsed-ready .quote-builder-repeat-title,
.quote-day-master-card.is-collapsed-ready .quote-builder-repeat-top .muted {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}
.quote-day-master-card.is-collapsed-ready .quote-day-route-card strong,
.quote-day-master-card.is-collapsed-ready .quote-builder-repeat-title {
  -webkit-line-clamp: 1;
}
.quote-day-master-card.is-collapsed-ready .quote-builder-repeat-top .muted {
  -webkit-line-clamp: 2;
}
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder {
  gap: 8px;
}
.quote-day-master-card.is-collapsed-ready .quote-day-route-meta,
.quote-day-master-card.is-collapsed-ready .quote-day-service-strip {
  gap: 8px;
}
.quote-day-master-card.is-collapsed-ready .quote-day-service-strip article,
.quote-day-master-card.is-collapsed-ready .quote-day-route-meta span {
  padding: 8px;
}
.quote-day-master-card.is-collapsed-ready .quote-day-commercial-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-commercial-catalog,
.quote-day-master-card.is-collapsed-ready .quote-day-commercial-board-head p,
.quote-day-master-card.is-collapsed-ready .quote-day-commercial-row p,
.quote-day-master-card.is-collapsed-ready .quote-day-cost-strip article:nth-child(n + 3) {
  display: none;
}
.quote-day-master-card.is-collapsed-ready .quote-day-commercial-board {
  gap: 8px;
}
.quote-day-master-card.is-collapsed-ready .quote-day-commercial-board-head,
.quote-day-master-card.is-collapsed-ready .quote-day-cost-strip article {
  padding: 8px 10px;
}
.quote-day-master-card.is-collapsed-ready .quote-day-cost-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  display: none;
}
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid {
  display: none;
}
.quote-day-master-card.is-collapsed-ready:focus-within,
.quote-day-master-card.is-collapsed-ready:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}
@keyframes quoteDayGridReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1320px) {
  .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  }
  .quote-builder-itinerary-card {
    order: 1;
    grid-column: 1 / -1;
  }
  .quote-builder-pricing-card,
  .quote-builder-reference-shell .quote-builder-preview-panel {
    order: 2;
  }
  .quote-builder-left-nav-card,
  .quote-builder-ai-left-card,
  .quote-builder-left-rail-card,
  .quote-builder-trip-card {
    order: 3;
  }
  .quote-builder-suggestions-card,
  .quote-builder-commercial-card {
    order: 4;
  }
  .quote-builder-pricing-card {
    grid-column: 1 / -1;
    grid-row: auto;
    position: static;
  }
  .quote-builder-reference-shell .quote-builder-preview-panel {
    grid-column: 1 / -1;
  }
  .quote-builder-progress-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quote-builder-smart-buttons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .quote-builder-suggestion-grid,
  .quote-builder-hero-summary,
  .quote-builder-secondary-summary,
  .quote-day-commercial-grid,
  .quote-day-route-meta,
  .quote-day-service-strip,
  .quote-day-cost-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-day-commercial-head-actions,
  .quote-day-commercial-catalog-head {
    justify-items: stretch;
  }
}
@media (max-width: 900px) {
  .quote-builder-reference-shell .quote-builder-form,
  .quote-day-plan-grid,
  .quote-builder-progress-stepper,
  .quote-builder-smart-buttons,
  .quote-builder-suggestion-grid,
  .quote-builder-hero-summary,
  .quote-builder-secondary-summary,
  .quote-day-commercial-grid,
  .quote-day-route-meta,
  .quote-day-service-strip,
  .quote-day-cost-strip,
  .quote-day-summary-grid {
    grid-template-columns: 1fr;
  }
  .quote-day-commercial-board-head,
  .quote-day-commercial-catalog-head,
  .quote-day-option-card,
  .quote-day-commercial-section-head,
  .quote-day-commercial-row,
  .quote-day-service-action-card {
    flex-direction: column;
  }
  .quote-day-inline-selector-head,
  .quote-day-inline-selector-actions {
    align-items: stretch;
  }
  .quote-day-option-side,
  .quote-day-commercial-side {
    align-items: stretch;
    justify-items: stretch;
  }
  .quote-builder-left-nav-card,
  .quote-builder-ai-left-card,
  .quote-builder-left-rail-card,
  .quote-builder-hero-card,
  .quote-builder-trip-card,
  .quote-builder-itinerary-card,
  .quote-builder-suggestions-card,
  .quote-builder-commercial-card,
  .quote-builder-payment-card,
  .quote-builder-pricing-card,
  .quote-builder-reference-shell .quote-builder-preview-panel {
    grid-column: 1;
  }
  .quote-builder-reference-shell .quote-builder-actions {
    position: static;
  }
  .quote-builder-topbar,
  .quote-builder-secondary-actions,
  .quote-builder-primary-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .quote-builder-primary-actions .quote-builder-action-link,
  .quote-builder-primary-actions button,
  .quote-builder-secondary-actions button,
  .quote-builder-ai-actions .pill,
  .quote-payment-action-row button,
  .quote-share-actions button {
    width: 100%;
  }
  .quote-builder-pricing-card {
    max-height: none;
    overflow: visible;
  }
  .quote-builder-repeat-top,
  .quote-builder-repeat-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
.quote-builder-shell,
.quote-builder-preview-panel {
  border: 1px solid rgba(101, 132, 182, 0.16);
  box-shadow: 0 22px 50px rgba(13, 22, 38, 0.08);
}
.quote-builder-form {
  display: grid;
  gap: 18px;
}
.quote-builder-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.58);
}
.quote-internal-pricing-panel {
  border-color: rgba(14, 116, 144, 0.18);
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.95), rgba(248, 250, 252, 0.92));
}
.quote-builder-pricing-card {
  gap: 12px;
}
.quote-builder-pricing-card .quote-builder-card-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(14, 116, 144, 0.12);
}
.quote-builder-pricing-card .quote-builder-card-head h4 {
  letter-spacing: -0.015em;
}
.quote-share-panel {
  border-color: rgba(22, 101, 52, 0.16);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.95), rgba(248, 250, 252, 0.92));
}
.quote-share-meta {
  display: grid;
  gap: 6px;
}
.quote-share-meta p {
  margin: 0;
}

.quote-destination-sync-notice {
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 12px;
  background: rgba(255, 247, 237, 0.94);
  color: #9a4b0b;
  font-weight: 700;
  padding: 10px 12px;
}

.quote-destination-sync-notice[hidden] {
  display: none;
}
.quote-share-delivery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 12px 12px;
}
.quote-share-delivery-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(22, 101, 52, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}
.quote-share-delivery-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.quote-share-delivery-grid strong {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #166534;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.quote-share-actions {
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .quote-share-delivery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .quote-share-delivery-grid {
    grid-template-columns: 1fr;
  }
}
.quote-pricing-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quote-pricing-decision-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quote-pricing-decision-strip article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.88);
}
.quote-pricing-decision-strip span {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quote-pricing-decision-strip strong,
.quote-pricing-decision-strip p {
  margin: 0;
}
.quote-pricing-decision-strip strong {
  color: #0f172a;
  font-size: 0.92rem;
}
.quote-pricing-decision-strip p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.quote-pricing-cost-controls {
  border: 1px solid rgba(105, 122, 148, 0.14);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
}
.quote-pricing-cost-controls summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 800;
}
.quote-pricing-cost-controls .form-grid {
  padding: 0 12px 12px;
}
.quote-pricing-summary-card {
  min-width: 0;
  padding: 13px 14px;
  border-radius: 17px;
  border: 1px solid rgba(14, 116, 144, 0.13);
  background: rgba(255, 255, 255, 0.86);
}
.quote-pricing-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.quote-pricing-summary-card strong {
  display: block;
  margin-top: 7px;
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.quote-pricing-summary-card:first-child,
.quote-pricing-summary-card:last-child {
  border-color: rgba(37, 99, 235, 0.2);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 32%),
    rgba(255, 255, 255, 0.92);
}
.quote-pricing-summary-card:last-child strong {
  color: #1d4ed8;
  font-size: 1.22rem;
}
.quote-pricing-summary-details {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(105, 122, 148, 0.12);
}
.quote-pricing-summary-detail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.quote-pricing-summary-detail span:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
}
.quote-pricing-warning-list,
.quote-pricing-line-list {
  display: grid;
  gap: 10px;
}
.quote-pricing-warning {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  background: rgba(255, 247, 237, 0.92);
  color: #9a3412;
  font-size: 0.82rem;
}
.quote-pricing-line-item {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.78);
}
.quote-pricing-line-item.is-missing {
  border-style: dashed;
  background: rgba(248, 250, 252, 0.72);
}
.quote-pricing-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quote-pricing-line-copy p {
  margin: 0;
  color: var(--muted);
}
.quote-pricing-line-copy p + p {
  margin-top: 6px;
}
.quote-pricing-line-cost {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.quote-pricing-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}
.quote-pricing-pill.is-warning {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
}
.quote-pricing-pill.is-success {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}
.quote-builder-card-head,
.quote-builder-block-head,
.quote-builder-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.quote-builder-card-head h4,
.quote-builder-block-head h5 {
  margin: 4px 0 0;
}
.quote-builder-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.quote-builder-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.quote-builder-inline-ai {
  display: grid;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px dashed rgba(105, 122, 148, 0.18);
}
.quote-builder-inline-ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}
.quote-builder-block-group {
  display: grid;
  gap: 12px;
}
.quote-builder-repeat-list {
  display: grid;
  gap: 12px;
}
.quote-builder-repeat-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(111, 130, 160, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 255, 0.86));
}
.quote-builder-repeat-card.compact {
  padding: 14px;
}
.quote-builder-repeat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.quote-builder-repeat-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.quote-builder-repeat-title {
  margin: 0;
  font-size: 0.98rem;
}
.quote-builder-repeat-top .muted {
  margin: 6px 0 0;
}
.quote-builder-preview-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.quote-builder-preview-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.quote-builder-preview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.quote-builder-preview-metric {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.76);
}
.quote-builder-preview-metric span,
.quote-builder-preview-copy p,
.quote-builder-empty-state {
  color: var(--muted);
}
.quote-builder-preview-metric strong {
  display: block;
  margin-top: 6px;
}
.quote-builder-preview-copy {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(248, 250, 255, 0.9);
}
.quote-builder-preview-copy h4,
.quote-builder-preview-copy p {
  margin: 0;
}
.quote-builder-preview-copy p + p {
  margin-top: 8px;
}
.sales-order-summary-hero {
  gap: 12px;
}
.sales-order-chip-list {
  margin-top: 4px;
}
.sales-order-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sales-order-lock-card {
  border-color: rgba(14, 116, 144, 0.16);
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.94), rgba(248, 250, 252, 0.92));
}
.sales-order-detail-actions {
  align-items: center;
  flex-wrap: wrap;
}
.sales-order-section {
  border: 1px solid rgba(105, 122, 148, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
}
.sales-order-section + .sales-order-section {
  margin-top: 14px;
}
.sales-order-section-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px;
  margin: 0;
}
.sales-order-section-summary::-webkit-details-marker {
  display: none;
}
.sales-order-section[open] .sales-order-section-summary {
  border-bottom: 1px solid rgba(105, 122, 148, 0.12);
}
.sales-order-section > :not(summary) {
  padding: 18px;
}
.sales-order-section .quote-itinerary-day-list,
.sales-order-section .quote-builder-repeat-list {
  display: grid;
  gap: 12px;
}
.purchasing-workspace-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}
.purchasing-detail-grid,
.purchasing-form-panel,
.purchasing-detail-panel,
.purchasing-line-items-shell,
.purchasing-timeline-list,
.purchasing-receipt-shell {
  display: grid;
  gap: 14px;
}
.purchasing-form,
.purchasing-detail-panel {
  gap: 16px;
}
.purchasing-line-item-list {
  display: grid;
  gap: 12px;
}
.purchasing-line-item-card,
.purchasing-timeline-item,
.purchasing-receipt-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.78);
}
.purchasing-line-item-head,
.purchasing-line-item-foot,
.purchasing-summary-grid,
.purchasing-summary-row,
.purchasing-receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.purchasing-line-item-foot,
.purchasing-summary-grid,
.purchasing-summary-row,
.purchasing-receipt-row,
.purchasing-action-row {
  flex-wrap: wrap;
}
.purchasing-line-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.purchasing-line-item-card .field {
  min-width: 0;
}
.purchasing-line-item-card .field.field-span-2 {
  grid-column: span 2;
}
.purchasing-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.purchasing-totals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.purchasing-total-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(248, 250, 255, 0.86);
}
.purchasing-total-card span,
.purchasing-line-item-card p,
.purchasing-timeline-item p,
.purchasing-receipt-card p {
  margin: 0;
  color: var(--muted);
}
.purchasing-total-card strong {
  display: block;
  margin-top: 6px;
}
.purchasing-action-row .ghost-button,
.purchasing-action-row .primary-button {
  min-height: 40px;
}
.purchasing-communication-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
}
.purchasing-communication-actions button {
  min-height: 44px;
  white-space: normal;
}
.purchasing-communication-panel {
  border: 1px solid rgba(105, 122, 148, 0.18);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.86);
  padding: 14px;
  margin-bottom: 12px;
}
.purchasing-communication-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.purchasing-communication-summary article {
  border: 1px solid rgba(105, 122, 148, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
}
.purchasing-communication-summary span,
.purchasing-communication-summary strong {
  display: block;
}
.purchasing-communication-summary span {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 5px;
}
.purchasing-communication-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
}
.purchasing-costing-table {
  margin-top: 14px;
}
.purchasing-state-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(105, 122, 148, 0.24);
  background: rgba(248, 250, 255, 0.78);
}
.purchasing-state-card h4,
.purchasing-state-card p {
  margin: 0;
}
.purchasing-state-card .detail-action-row {
  margin-top: 2px;
}
.quote-recent-item.is-active {
  border-color: rgba(59, 130, 246, 0.36);
  box-shadow:
    0 12px 32px rgba(37, 99, 235, 0.12),
    inset 0 0 0 1px rgba(59, 130, 246, 0.16);
}
.quote-recent-item.is-active .quote-recent-item-top strong {
  color: #1d4ed8;
}
.status-chip.status-po-draft {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}
.status-chip.status-po-submitted {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
}
.status-chip.status-po-approved,
.status-chip.status-po-acknowledged,
.status-chip.status-po-received {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}
.status-chip.status-po-rejected,
.status-chip.status-po-cancelled {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}
.status-chip.status-po-acknowledgment_pending,
.status-chip.status-po-partially_received,
.status-chip.status-po-on_hold {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.12);
}
.purchasing-receipt-table {
  width: 100%;
  border-collapse: collapse;
}
.purchasing-receipt-table th,
.purchasing-receipt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(105, 122, 148, 0.12);
  text-align: left;
}
.purchasing-receipt-table th {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.purchasing-form-panel .form-status.is-error,
.purchasing-detail-panel .form-status.is-error {
  color: #ff8f8f;
  font-weight: 600;
}
.purchasing-form-panel .form-status.is-success,
.purchasing-detail-panel .form-status.is-success {
  color: #9ae6b4;
  font-weight: 600;
}
.purchasing-form-panel .form-status.is-loading,
.purchasing-detail-panel .form-status.is-loading {
  color: #9bb9ff;
}
.quote-builder-revision-toggle {
  max-width: 420px;
}
.quote-builder-control-card,
.quote-builder-template-card {
  gap: 16px;
}
.quote-builder-template-actions {
  justify-content: flex-start;
}
.quote-builder-visibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.quote-builder-visibility-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.8);
}
.quote-builder-visibility-card span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.quote-builder-visibility-card strong,
.quote-builder-visibility-card p {
  margin: 0;
}
.quote-builder-visibility-card p {
  color: var(--muted);
}
.quote-builder-visibility-card.is-blocked {
  border-color: rgba(234, 88, 12, 0.26);
  background: rgba(255, 247, 237, 0.92);
}
.quote-builder-empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(105, 122, 148, 0.22);
  background: rgba(248, 250, 255, 0.72);
}
.quote-builder-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quote-builder-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(43, 110, 242, 0.08);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 600;
}
.quote-builder-date-hidden {
  opacity: 0.6;
}
.quote-field-helper {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 2px;
}
.quote-builder-date-locked input {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.28);
  color: #334155;
}
.quote-builder-date-locked::after {
  color: #2563eb;
  content: "Lead date locked";
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 5px;
}
.ai-trainer-workspace {
  display: grid;
  gap: 20px;
}
.ai-trainer-hero {
  display: grid;
  gap: 18px;
}
.ai-trainer-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.ai-trainer-summary-card {
  min-height: 156px;
}
.ai-trainer-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}
.ai-trainer-action-grid,
.ai-trainer-assignment-list,
.ai-trainer-weak-area-list,
.ai-trainer-recent-list,
.ai-trainer-module-list,
.ai-trainer-transcript,
.ai-trainer-test-panel {
  display: grid;
  gap: 14px;
}
.ai-trainer-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ai-trainer-assignment-card,
.ai-trainer-weak-area-card,
.ai-trainer-recent-card,
.ai-trainer-module-card,
.ai-trainer-transcript-entry,
.ai-trainer-test-question {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.ai-trainer-module-card,
.ai-trainer-transcript-entry {
  display: grid;
  gap: 10px;
}
.ai-trainer-module-card p,
.ai-trainer-assignment-card p,
.ai-trainer-weak-area-card p,
.ai-trainer-recent-card p,
.ai-trainer-transcript-entry p,
.ai-trainer-test-question p {
  margin: 0;
  line-height: 1.6;
}
.ai-trainer-module-actions,
.ai-trainer-card-meta,
.ai-trainer-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ai-trainer-transcript {
  min-height: 280px;
  max-height: 460px;
  overflow-y: auto;
}
.ai-trainer-transcript-entry.trainer {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(27, 39, 64, 0.94));
  color: #eef6ff;
  border-color: rgba(124, 148, 189, 0.24);
}
.ai-trainer-transcript-entry.trainer .muted {
  color: rgba(224, 235, 255, 0.72);
}
.ai-trainer-transcript-entry.agent {
  background: rgba(235, 245, 255, 0.88);
}
.ai-trainer-transcript-entry.customer {
  background: rgba(255, 247, 237, 0.9);
}
.ai-trainer-test-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.ai-trainer-test-option input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
.ai-trainer-session-panel textarea {
  min-height: 108px;
}
.ai-trainer-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue);
  background: rgba(43, 110, 242, 0.1);
}
.ai-trainer-priority-tag {
  color: #8a2c0d;
  background: rgba(245, 158, 11, 0.18);
}
.ai-trainer-assignment-reason {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(105, 122, 148, 0.12);
}
.ai-trainer-assignment-why {
  flex: 1 1 220px;
  font-size: 0.82rem;
  color: rgba(15, 23, 42, 0.72);
}
.ai-trainer-queue-card-muted {
  opacity: 0.72;
  border-color: rgba(105, 122, 148, 0.24);
}
.quote-ai-summary-panel {
  background: linear-gradient(180deg, rgba(13, 19, 33, 0.96), rgba(21, 31, 52, 0.93));
  color: #ecf4ff;
  border-color: rgba(124, 148, 189, 0.24);
}
.quote-ai-summary-panel .muted,
.quote-ai-summary-panel .eyebrow {
  color: rgba(224, 235, 255, 0.72);
}
.quote-ai-summary-copy {
  margin: 0;
  line-height: 1.7;
  color: rgba(236, 244, 255, 0.9);
}
.quote-recent-list {
  display: grid;
  gap: 12px;
}
.quote-recent-item {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.quote-recent-item-top,
.quote-recent-item-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quote-recent-item-metrics {
  flex-wrap: wrap;
}
.quote-recent-item-actions {
  flex-wrap: wrap;
}
.quote-recent-metric {
  display: grid;
  gap: 4px;
}
.quote-recent-metric span {
  font-size: 0.78rem;
  color: var(--muted);
}
.quote-generator-panel .form-status.is-error,
.quote-generator-panel .form-status.is-success,
.quote-template-panel .form-status.is-error,
.quote-template-panel .form-status.is-success,
.quote-copilot-panel .form-status.is-error,
.quote-copilot-panel .form-status.is-success {
  font-weight: 600;
}
.quote-generator-panel .form-status.is-error,
.quote-template-panel .form-status.is-error,
.quote-copilot-panel .form-status.is-error {
  color: #ff8f8f;
}
.quote-generator-panel .form-status.is-success,
.quote-template-panel .form-status.is-success,
.quote-copilot-panel .form-status.is-success {
  color: #9ae6b4;
}
.quote-generator-panel .form-status.is-warning,
.quote-template-panel .form-status.is-warning,
.quote-copilot-panel .form-status.is-warning {
  color: #fbbf24;
  font-weight: 600;
}
.quote-generator-panel .form-status.is-loading,
.quote-template-panel .form-status.is-loading,
.quote-copilot-panel .form-status.is-loading {
  color: #9bb9ff;
}

.quote-payment-smart-intake-card {
  display: grid;
  gap: 8px;
}

.quote-payment-smart-intake-card .ghost-button {
  width: 100%;
}

.quote-payment-smart-intake-card small {
  color: var(--muted);
  line-height: 1.35;
}

.quote-generator-panel .primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .quote-pricing-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-share-actions,
  .quote-builder-actions,
  .quote-builder-card-head,
  .quote-builder-repeat-top,
  .quote-recent-item-top,
  .quote-recent-item-metrics {
    flex-direction: column;
    align-items: stretch;
  }
}
.quote-itinerary-result {
  display: grid;
  gap: 14px;
}
.quote-itinerary-overview {
  margin: 0;
  line-height: 1.7;
}
.quote-itinerary-day-list {
  display: grid;
  gap: 14px;
}
.quote-itinerary-day-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.quote-itinerary-day-card h4,
.quote-itinerary-day-card p {
  margin: 0;
}
.quote-itinerary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}
.quote-itinerary-highlights {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.quote-itinerary-highlights li + li {
  margin-top: 6px;
}
.quote-terms-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(43, 110, 242, 0.1);
  color: var(--blue);
}
.manual-costing-workspace {
  display: grid;
  gap: 20px;
}
.manual-costing-hero {
  display: grid;
  gap: 18px;
}
.manual-costing-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.manual-costing-summary-card {
  min-height: 164px;
}
.manual-costing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.manual-costing-detail-panel,
.manual-costing-table-panel {
  display: grid;
  gap: 16px;
}

.manual-costing-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.manual-costing-ai-feedback {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(94, 122, 255, 0.2);
  background: rgba(94, 122, 255, 0.08);
  color: var(--text);
}

.manual-costing-ai-feedback.is-error {
  border-color: rgba(218, 84, 84, 0.3);
  background: rgba(218, 84, 84, 0.1);
}

.manual-costing-ai-feedback p {
  margin: 0;
}

.manual-costing-ai-feedback p + p {
  margin-top: 8px;
}

.manual-costing-warning-box {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(220, 139, 24, 0.28);
  background: rgba(220, 139, 24, 0.08);
  color: var(--text);
}

.manual-costing-warning-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.manual-costing-warning-box li + li {
  margin-top: 6px;
}

.manual-costing-warning-title {
  margin: 0;
  font-weight: 700;
}

.policy-note-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
}

.hr-attendance-policy-panel .form-actions {
  align-items: center;
}
.manual-costing-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manual-costing-approval-actions {
  display: grid;
  gap: 14px;
}
.manual-costing-info-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.manual-costing-info-item span {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.manual-costing-info-item strong,
.manual-costing-info-item p {
  margin: 0;
}
.manual-costing-info-item p {
  color: var(--muted);
  line-height: 1.6;
}
.manual-costing-empty {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px dashed rgba(105, 122, 148, 0.24);
}
.manual-costing-table-shell {
  overflow-x: auto;
}
.manual-costing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}
.manual-costing-table th,
.manual-costing-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(105, 122, 148, 0.14);
  text-align: left;
  vertical-align: top;
}
.manual-costing-table th {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.manual-costing-table td strong,
.manual-costing-table td p {
  margin: 0;
}
.manual-costing-table td p {
  color: var(--muted);
  line-height: 1.5;
}
.manual-costing-row-input,
.manual-costing-row-notes {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(105, 122, 148, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}
.manual-costing-row-input {
  min-width: 110px;
}
.manual-costing-row-notes {
  min-width: 180px;
  min-height: 84px;
  resize: vertical;
}
.manual-costing-row-input:disabled,
.manual-costing-row-notes:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
.manual-costing-row-actions {
  display: grid;
  gap: 8px;
}
.manual-costing-row-status {
  min-height: 18px;
  font-size: 0.82rem;
}
.manual-costing-row-status.is-error {
  color: var(--red);
}
.manual-costing-row-status.is-success {
  color: var(--green);
}
.manual-costing-row-status.is-loading {
  color: var(--blue);
}
.manual-costing-readonly-value {
  font-weight: 700;
}
.manual-costing-description {
  display: grid;
  gap: 8px;
}
.manual-costing-source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue);
  background: rgba(43, 110, 242, 0.1);
}
.manual-costing-mono {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.vendor-detail-panel {
  display: grid;
  gap: 18px;
}
.vendor-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.vendor-detail-content,
.vendor-detail-grid,
.vendor-service-list {
  display: grid;
  gap: 16px;
}
.vendor-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.vendor-detail-block {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.vendor-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.vendor-detail-info-item {
  display: grid;
  gap: 6px;
}
.vendor-detail-info-item span {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.vendor-detail-info-item strong,
.vendor-service-card h4,
.vendor-detail-block h4 {
  margin: 0;
}
.vendor-detail-notes,
.vendor-service-description {
  margin: 0;
  line-height: 1.65;
}

.vendor-commercial-snapshot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(105, 122, 148, 0.16);
  display: grid;
  gap: 10px;
}

.vendor-commercial-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.vendor-commercial-snapshot-list {
  display: grid;
  gap: 12px;
}
.vendor-commercial-snapshot-service {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.76);
}
.vendor-commercial-snapshot-service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.vendor-commercial-snapshot-service-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.vendor-commercial-snapshot-service-title strong {
  overflow-wrap: anywhere;
}
.vendor-commercial-snapshot-service-title span {
  font-size: 0.74rem;
  color: #64748b;
  overflow-wrap: anywhere;
}
.vendor-commercial-snapshot-service-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.vendor-commercial-snapshot-service-meta > span:not(.pill) {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.78);
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vendor-service-list {
  gap: 14px;
}
.vendor-service-list-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vendor-service-list-body {
  display: grid;
  gap: 12px;
}
.vendor-service-row {
  display: grid;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(105, 122, 148, 0.14);
}

.vendor-service-row.is-active {
  border-color: rgba(249, 115, 22, 0.38);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2), 0 12px 26px rgba(15, 23, 42, 0.08);
}
.vendor-service-row-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}
.vendor-service-row-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  align-content: center;
}
.vendor-service-row-item span,
.vendor-service-row-detail-item span {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vendor-service-row-item strong,
.vendor-service-row-detail-item strong {
  margin: 0;
  overflow-wrap: anywhere;
}
.vendor-service-row-item small {
  margin: 0;
  font-size: 0.74rem;
  color: #64748b;
  overflow-wrap: anywhere;
}
.vendor-service-row-item-actions {
  justify-content: flex-start;
}
.vendor-service-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vendor-service-row-actions .ghost-button {
  padding: 7px 11px;
  min-height: 34px;
  border-radius: 10px;
}
.vendor-service-row-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vendor-service-row-signal {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  background: rgba(226, 232, 240, 0.7);
}
.vendor-service-row-updated {
  color: #64748b;
}
.vendor-service-row-name strong {
  font-size: 1.05rem;
}
.vendor-service-row-type strong {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-size: 0.82rem;
  line-height: 1.2;
}
.vendor-service-row-detail {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(105, 122, 148, 0.14);
}
.vendor-service-row-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.vendor-service-row-detail-item {
  display: grid;
  gap: 6px;
}
.vendor-service-row-detail-copy {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}
.vendor-service-details-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 73;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
}
.vendor-service-details-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 74;
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: clamp(12px, 1vw, 20px);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(240, 249, 255, 0.96));
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.24);
}
.vendor-detail-grid > .vendor-detail-block:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.panel { padding: 24px; background: var(--surface); }
.panel.login-greeting-banner {
  background:
    radial-gradient(circle at top right, rgba(15, 159, 110, 0.15), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(25, 44, 78, 0.92));
  color: #eef6ff;
  border-color: rgba(130, 189, 255, 0.2);
}

.panel.login-greeting-banner h3,
.panel.login-greeting-banner .login-greeting-message {
  color: #eef6ff;
}

.panel.login-greeting-banner .muted,
.panel.login-greeting-banner .eyebrow {
  color: rgba(226, 236, 252, 0.82);
}

.panel.login-greeting-banner .ghost-button {
  color: #0f172a;
  border-color: rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.94);
}
.panel-header { align-items: flex-start; margin-bottom: 18px; }
.panel-header-stack { align-items: center; }
.panel-header-tight { margin-bottom: 12px; }
.pill { padding: 10px 14px; color: var(--blue); background: rgba(43, 110, 242, 0.1); }

.tool-grid, .activity-list, .users-list, .chat-form, .login-form, .user-form, .form-grid, .checkbox-grid, .user-management-grid {
  display: grid; gap: 16px;
}
.onboarding-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field-span-2 {
  grid-column: 1 / -1;
}
.onboarding-shell {
  background: linear-gradient(180deg, rgba(13, 19, 33, 0.96), rgba(21, 31, 52, 0.93));
  color: #ecf4ff;
  border-color: rgba(124, 148, 189, 0.24);
}
.onboarding-shell .muted,
.onboarding-shell .eyebrow,
.onboarding-shell .field span {
  color: rgba(224, 235, 255, 0.72);
}
.onboarding-header {
  align-items: flex-start;
}
.onboarding-header-meta,
.onboarding-progress-copy,
.onboarding-action-buttons {
  display: grid;
  gap: 10px;
}
.onboarding-progress-card {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 148, 189, 0.16);
}
.onboarding-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.onboarding-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b6ef2, #16a6b6);
  transition: width 0.2s ease;
}
.onboarding-form .field input,
.onboarding-form .field select,
.onboarding-form .field textarea {
  color: #ecf4ff;
  background: rgba(8, 13, 24, 0.68);
  border: 1px solid rgba(124, 148, 189, 0.18);
}
.onboarding-form .field textarea {
  min-height: 112px;
  resize: vertical;
}
.onboarding-actions {
  align-items: center;
  margin-top: 6px;
}
.onboarding-action-buttons {
  grid-auto-flow: column;
  align-items: center;
}

@media (max-width: 900px) {
  .ai-trainer-summary-grid,
  .ai-trainer-grid,
  .ai-trainer-action-grid,
  .quote-summary-grid,
  .quote-dashboard-grid,
  .quote-builder-grid,
  .quote-generator-grid,
  .manual-costing-summary-grid,
  .manual-costing-grid,
  .manual-costing-info-grid,
  .onboarding-grid,
  .vendor-detail-grid,
  .vendor-detail-info-grid,
  .vendor-commercial-snapshot-grid,
  .vendor-service-detail-form-grid,
  .vendor-service-row-grid,
  .vendor-service-list-head,
  .vendor-service-row-detail-grid {
    grid-template-columns: 1fr;
  }

  .vendor-service-list-head {
    display: none;
  }

  .vendor-commercial-snapshot-service-head {
    align-items: stretch;
    flex-direction: column;
  }

  .vendor-commercial-snapshot-service-meta {
    justify-content: flex-start;
  }

  .quote-builder-preview-panel {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .onboarding-action-buttons {
    grid-auto-flow: row;
    justify-items: stretch;
  }

  .quote-builder-ops-grid,
  .quote-builder-visibility-grid,
  .quote-builder-inline-ai-grid,
  .quote-builder-preview-metrics {
    grid-template-columns: 1fr;
  }
  .quote-pricing-summary-grid,
  .quote-pricing-decision-strip {
    grid-template-columns: 1fr;
  }
}

body.onboarding-locked .stats-grid,
body.onboarding-locked .hero-panel,
body.onboarding-locked .live-grid,
body.onboarding-locked #defaultContent,
body.onboarding-locked #quoteDashboardSection,
body.onboarding-locked #leadPipelineSection,
body.onboarding-locked #reportsSection,
body.onboarding-locked #warningReportsSection,
body.onboarding-locked #assignmentRulesSection,
body.onboarding-locked #userManagementSection,
body.onboarding-locked #assistantWidget {
  display: none !important;
}

body.onboarding-locked .nav-item.hidden {
  display: none !important;
}

body.onboarding-locked .dashboard-main {
  gap: 24px;
}
.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card, .access-denied, .users-panel, .permissions-panel, .demo-card {
  padding: 18px; border-radius: 22px; background: linear-gradient(180deg, rgba(244, 248, 255, 0.95), rgba(233, 241, 252, 0.86));
  border: 1px solid rgba(86, 110, 148, 0.14);
}
.tool-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(24, 39, 75, 0.08); }
.tool-card h4, .user-card h4, .permission-header h4, .demo-card strong { margin: 0 0 10px; }
.tool-card p, .activity-item p, .assistant-intro, .chat-status, .user-card p, .demo-card p { margin: 0; color: var(--muted); }
.tool-card-meta {
  margin-top: 12px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.5;
}
.tool-card-actions,
.activity-item-actions {
  margin-top: 14px;
}

.master-data-workspace,
.master-data-grid,
.master-record-list {
  display: grid;
  gap: 20px;
}

.master-data-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.master-data-panel,
.master-data-hero,
.master-record-card {
  overflow: hidden;
}

.master-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.master-record-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.master-record-card-top,
.master-record-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.master-record-card-top p,
.master-record-empty {
  margin: 6px 0 0;
  color: var(--muted);
}

.master-record-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 0.86rem;
  word-break: break-word;
}

.destination-master-toolbar {
  margin-top: 16px;
}

.master-inline-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(241, 245, 249, 0.82);
  font-size: 0.9rem;
}

.master-inline-note.is-warning {
  color: #9a3412;
  border-color: rgba(251, 146, 60, 0.35);
  background: rgba(255, 237, 213, 0.88);
}

.master-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.master-checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.master-checkbox-chip input {
  margin: 0;
}

.master-record-chip-row,
.master-record-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.master-record-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 600;
}

.master-record-chip.is-muted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.master-record-chip.is-warning {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
}

.destination-master-card {
  gap: 14px;
}

.destination-master-card.is-selected {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.12);
}

.destination-master-card-summary {
  display: grid;
  gap: 8px;
}

.activity-item, .user-card {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 16px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(105, 122, 148, 0.14);
}
.activity-dot {
  width: 11px; height: 11px; margin-top: 7px; border-radius: 999px; background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 6px rgba(43, 110, 242, 0.1);
}

.status-badge { padding: 9px 12px; color: var(--green); background: rgba(15, 159, 110, 0.1); }
.assistant-intro {
  padding: 16px 18px; border-radius: 20px; background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(27, 39, 64, 0.94));
  color: rgba(255, 255, 255, 0.82);
}
.copilot-voice-toolbar {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(245, 248, 252, 0.92);
  border: 1px solid rgba(105, 122, 148, 0.14);
}
.copilot-voice-toolbar-main,
.copilot-voice-toolbar-actions,
.copilot-voice-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.copilot-voice-toolbar-main {
  align-items: flex-start;
}
.copilot-voice-copy {
  display: grid;
  gap: 4px;
}
.copilot-voice-copy strong,
.copilot-voice-copy p {
  margin: 0;
}
.copilot-voice-toolbar-actions,
.copilot-voice-toggle-row {
  flex-wrap: wrap;
}
.copilot-voice-indicator {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 34px;
  height: 24px;
  padding: 3px 4px;
  border-radius: 999px;
  background: rgba(43, 110, 242, 0.08);
}
.copilot-voice-indicator span {
  width: 5px;
  height: 8px;
  border-radius: 999px;
  background: rgba(43, 110, 242, 0.52);
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.copilot-voice-indicator.state-idle span {
  opacity: 0.65;
}
.copilot-voice-indicator.state-listening span,
.copilot-voice-indicator.state-passive_listening span,
.copilot-voice-indicator.state-active_listening span,
.copilot-voice-indicator.state-speaking span {
  animation: copilotVoicePulse 900ms ease-in-out infinite;
}
.copilot-voice-indicator.state-listening span {
  background: rgba(15, 159, 110, 0.72);
}
.copilot-voice-indicator.state-passive_listening span {
  background: rgba(22, 166, 182, 0.72);
  animation-duration: 1300ms;
}
.copilot-voice-indicator.state-active_listening span {
  background: rgba(15, 159, 110, 0.82);
}
.copilot-voice-indicator.state-speaking span {
  background: rgba(220, 139, 24, 0.72);
}
.copilot-voice-indicator.state-processing span {
  background: rgba(43, 110, 242, 0.72);
  animation: copilotVoicePulse 1200ms ease-in-out infinite;
}
.copilot-voice-indicator.state-error span {
  background: rgba(220, 76, 100, 0.78);
}
.copilot-voice-indicator span:nth-child(2) {
  animation-delay: 120ms;
}
.copilot-voice-indicator span:nth-child(3) {
  animation-delay: 240ms;
}
@keyframes copilotVoicePulse {
  0%, 100% {
    transform: scaleY(0.7);
  }
  50% {
    transform: scaleY(1.45);
  }
}
.copilot-voice-toolbar .ghost-button[disabled] {
  opacity: 0.56;
  cursor: not-allowed;
}
.chat-messages {
  display: flex; flex-direction: column; gap: 12px; min-height: 260px; max-height: 320px; padding-right: 4px; overflow-y: auto;
}
.chat-bubble {
  max-width: 92%; padding: 14px 16px; border-radius: 20px; border: 1px solid rgba(105, 122, 148, 0.12);
}
.chat-bubble.user { align-self: flex-end; background: linear-gradient(135deg, rgba(43, 110, 242, 0.12), rgba(22, 166, 182, 0.12)); }
.chat-bubble.assistant { align-self: flex-start; background: rgba(245, 248, 252, 0.96); }
.bubble-label {
  display: block; margin-bottom: 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.chat-bubble p { margin: 0; line-height: 1.6; }
.chat-form { margin-top: auto; }

.assistant-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 24;
}

.assistant-launcher {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 18px 12px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1f4fd8 52%, #12a4b5);
  box-shadow: 0 24px 48px rgba(20, 44, 103, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.assistant-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 54px rgba(20, 44, 103, 0.32);
}

.assistant-launcher-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.assistant-launcher-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.assistant-launcher-text {
  display: grid;
  text-align: left;
  gap: 2px;
}

.assistant-launcher-text strong {
  font-size: 0.98rem;
  font-weight: 800;
}

.assistant-launcher-text small {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.82);
}

.assistant-popup {
  position: fixed;
  right: 24px;
  bottom: 108px;
  width: min(400px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(105, 122, 148, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transform-origin: bottom right;
  animation: assistant-pop 0.24s ease;
  touch-action: none;
}

.assistant-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 56%, #11a6b7);
  cursor: move;
  user-select: none;
}

.assistant-popup-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.assistant-popup-title .eyebrow {
  opacity: 0.75;
}

.assistant-popup-title h3 {
  margin: 0;
  font-size: 1rem;
}

.assistant-popup-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.assistant-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1rem;
  font-weight: 700;
}

.assistant-popup-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.assistant-widget.assistant-widget-open .assistant-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
}

.assistant-widget.assistant-widget-minimized .assistant-launcher {
  min-height: 60px;
  width: 60px;
  padding: 8px;
  border-radius: 20px;
  justify-content: center;
}

.assistant-widget.assistant-widget-minimized .assistant-launcher-text {
  display: none;
}

@keyframes assistant-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

textarea, input, select {
  width: 100%; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(105, 122, 148, 0.18);
  background: rgba(255, 255, 255, 0.94); color: var(--text); outline: none;
}
textarea { resize: vertical; min-height: 112px; }
textarea:focus, input:focus, select:focus { border-color: rgba(43, 110, 242, 0.4); box-shadow: 0 0 0 4px rgba(43, 110, 242, 0.08); }

.primary-button, .ghost-button {
  padding: 12px 18px; border-radius: 16px; font-weight: 700; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.primary-button { color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 16px 30px rgba(43, 110, 242, 0.18); }
.ghost-button { color: var(--text); background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(105, 122, 148, 0.18); }
.danger-button { color: var(--red); }
.primary-button:hover, .ghost-button:hover { transform: translateY(-1px); }

.field { display: grid; gap: 8px; }
.field span { font-size: 0.92rem; font-weight: 600; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkbox-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checkbox-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(105, 122, 148, 0.14);
}
.checkbox-item input { width: 18px; height: 18px; margin: 0; }
.checkbox-item span {
  display: grid;
  gap: 4px;
}
.checkbox-item small {
  color: var(--muted);
  font-size: 0.78rem;
}
.user-management-workspace,
.directory-summary-grid,
.user-management-actions,
.user-management-filters,
.directory-table-shell,
.table-action-row {
  display: grid;
  gap: 16px;
}
.directory-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}
.metric-card {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.96));
  border: 1px solid rgba(251, 146, 60, 0.16);
  box-shadow: var(--shadow-sm);
}
.metric-card span,
.directory-meta {
  color: var(--muted);
}
.metric-card strong {
  font-size: 1.8rem;
}
.user-management-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1.15fr);
  align-items: start;
}
.department-management-grid {
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.2fr);
}
.user-management-actions {
  grid-auto-flow: column;
  gap: 10px;
  justify-content: end;
}
.user-management-filters {
  grid-template-columns: minmax(180px, 1.3fr) repeat(2, minmax(140px, 0.7fr));
  align-items: center;
}
.directory-table-shell {
  overflow: auto;
}
.directory-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.directory-table th,
.directory-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
  vertical-align: top;
}
.directory-table th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.directory-table tbody tr:hover {
  background: rgba(255, 247, 237, 0.78);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge-success {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
}
.status-badge-info {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
}
.status-badge-danger {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}
.status-badge-muted {
  color: #475569;
  background: rgba(148, 163, 184, 0.14);
}
.table-action-row {
  grid-auto-flow: column;
  gap: 8px;
  justify-content: start;
}
.form-status { min-height: 24px; }
.access-denied { background: linear-gradient(135deg, rgba(220, 76, 100, 0.1), rgba(255, 255, 255, 0.9)); }
.department-form {
  margin-bottom: 0;
}
.department-checkbox-field {
  min-height: 48px;
  align-self: end;
}

@media (max-width: 1100px) {
  .user-management-grid,
  .department-management-grid,
  .directory-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-management-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .user-management-actions,
  .table-action-row {
    grid-auto-flow: row;
  }

  .metric-card strong {
    font-size: 1.45rem;
  }

  .directory-table {
    min-width: 640px;
  }
}

.payment-desk-panel {
  grid-column: 1 / -1;
}

.payment-consent-checkbox {
  align-items: flex-start;
}

.payment-consent-hint {
  margin-top: -8px;
}

.payment-consent-hint.is-error,
.payment-desk-panel .form-status.is-error {
  color: #ff8f8f;
}

.payment-consent-hint.is-success,
.payment-desk-panel .form-status.is-success {
  color: #9ae6b4;
}

.payment-desk-panel .form-status.is-loading {
  color: #9bb9ff;
}

.payment-desk-panel .primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lead-workspace, .lead-layout, .lead-overview-grid, .lead-form, .lead-cards-list, .pipeline-board, .lead-detail-content, .detail-group, .detail-grid, .lead-note-form, .note-list, .activity-timeline, .lead-summary-grid, .lead-workspace-actions, .view-toggle {
  display: grid;
  gap: 18px;
}

.itinerary-builder-card,
.itinerary-day-list,
.itinerary-day-card,
.itinerary-day-card-head,
.itinerary-day-grid,
.itinerary-highlight-list,
.itinerary-highlight-item,
.itinerary-summary-row,
.itinerary-meta-strip {
  display: grid;
  gap: 14px;
}

.itinerary-builder-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: linear-gradient(180deg, rgba(244, 248, 255, 0.95), rgba(233, 241, 252, 0.86));
}

.itinerary-day-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.itinerary-day-card-head,
.itinerary-highlight-item,
.itinerary-summary-row,
.itinerary-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.itinerary-day-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.itinerary-highlight-list {
  gap: 10px;
}

.itinerary-highlight-item input {
  flex: 1 1 220px;
}

.itinerary-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(105, 122, 148, 0.24);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
}

.itinerary-overview-box {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.itinerary-overview-box p {
  margin: 0;
}

.lead-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
  margin-bottom: 20px;
}

.lead-filter-panel {
  margin-bottom: 20px;
}

.lead-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(180px, 0.7fr));
  gap: 16px;
}

.lead-filter-search {
  position: relative;
}

.lead-overview-grid {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.4fr);
}

.lead-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.deal-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(27, 39, 64, 0.95));
  color: #fff;
}

.deal-preview span {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.74;
}

.crm-strip-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.itinerary-launcher-card {
  background:
    radial-gradient(circle at top right, rgba(102, 196, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(244, 248, 255, 0.95), rgba(230, 238, 250, 0.88));
}

.lead-itinerary-modal {
  width: min(90vw, 1380px);
  max-height: 88vh;
  padding: 24px;
  border-radius: 30px;
  border: 1px solid rgba(107, 128, 161, 0.34);
  background:
    radial-gradient(circle at top right, rgba(71, 169, 255, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(7, 12, 22, 0.98), rgba(13, 20, 35, 0.98));
  color: #eef4ff;
  box-shadow: 0 34px 90px rgba(4, 8, 18, 0.58);
  animation: leadModalRise 220ms ease;
}

.lead-modal-backdrop:not(.hidden) {
  animation: leadBackdropFade 180ms ease;
}

.app-shell {
  grid-template-columns: 308px minmax(0, 1fr);
}

.sidebar {
  padding: 26px 20px;
  overflow-y: auto;
}

.lead-detail-modal {
  width: min(1220px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(82, 161, 255, 0.16), transparent 25%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.98));
}

.lead-detail-modal-header,
.lead-detail-modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lead-detail-modal-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(105, 122, 148, 0.14);
}

.lead-detail-modal-actions {
  align-items: center;
}

.lead-detail-shell {
  display: grid;
  gap: 16px;
  width: min(100%, 1040px);
  margin: 0 auto;
}

.lead-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background:
    radial-gradient(circle at top right, rgba(43, 110, 242, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 255, 0.96));
}

.lead-detail-hero-premium {
  padding: 24px;
  border-radius: 28px;
  border-color: rgba(59, 130, 246, 0.16);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.96));
}

.lead-detail-hero-premium h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.lead-detail-hero-main,
.lead-detail-hero-copy,
.lead-detail-hero-header,
.lead-detail-owner-row,
.lead-detail-priority-grid,
.lead-detail-badges,
.lead-detail-hero-stats,
.lead-detail-action-links,
.lead-detail-tab-row,
.lead-card-quick-actions,
.lead-row-quick-actions,
.lead-workspace-hook-grid,
.lead-history-card-top,
.lead-history-card-grid,
.lead-itinerary-modal-nav-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-detail-hero-main,
.lead-detail-hero-stats {
  flex-direction: column;
}

.lead-detail-hero-header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lead-detail-hero-header-actions {
  width: min(340px, 100%);
  flex: 0 0 320px;
}

.lead-detail-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lead-contact-chip {
  display: inline-grid;
  gap: 4px;
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  text-decoration: none;
}

.lead-contact-chip span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-contact-chip strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.lead-contact-chip-static {
  cursor: default;
}

.lead-detail-hero-health-note {
  margin: 2px 0 0;
  max-width: 700px;
  color: #475569;
  font-size: 0.93rem;
  line-height: 1.55;
}

.lead-detail-hero-eyebrow {
  margin-bottom: 8px;
  color: #64748b;
}

.lead-detail-hero-subtitle {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.lead-detail-owner-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lead-detail-owner-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.84);
}

.lead-detail-owner-card span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-detail-owner-card strong {
  margin: 0;
  color: #0f172a;
}

.lead-detail-owner-card-health {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.88));
}

.lead-detail-priority-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
  align-items: start;
}

.lead-detail-hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lead-detail-hero-side {
  display: grid;
}

.lead-detail-hero-side-card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 235, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lead-detail-hero-side-card .label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-detail-hero-side-card strong {
  font-size: 1.35rem;
  color: #0f172a;
}

.lead-detail-hero-side-card p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.lead-detail-hero-side-note {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.lead-detail-hero-side-note span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
}

.lead-detail-hero-side-note strong {
  font-size: 0.96rem;
}

.lead-detail-hero-stats article,
.lead-workspace-hook-card,
.lead-history-card {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.88);
}

.lead-detail-hero-stats article span,
.lead-history-card-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.lead-detail-hero-stats article strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
}

.lead-detail-tab-row {
  padding-bottom: 6px;
  overflow-x: auto;
}

.lead-premium-action-bar,
.lead-smart-assistant-top,
.lead-smart-assistant-flags,
.lead-smart-assistant-suggestions,
.lead-followup-highlight-grid,
.lead-workspace-premium-main,
.lead-workspace-premium-side,
.lead-detail-side-grid {
  display: grid;
  gap: 12px;
}

.lead-detail-action-shell {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.lead-workspace-action-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background:
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.38), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96));
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.08);
}

.lead-workspace-action-panel-top,
.lead-workspace-action-panel-meta,
.lead-workspace-action-panel-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-workspace-action-panel-top h4 {
  margin: 0;
  font-size: 1.28rem;
}

.lead-workspace-action-panel-top .eyebrow {
  margin-bottom: 4px;
}

.lead-workspace-action-panel-copy {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.lead-workspace-inline-disabled-reason {
  margin: -2px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  background: rgba(255, 247, 237, 0.92);
  font-size: 0.82rem;
  line-height: 1.4;
  color: #9a3412;
}

.lead-workspace-next-action-button {
  min-width: 180px;
  min-height: 48px;
  padding-inline: 20px;
  justify-content: center;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
}

.lead-followup-urgency-strip {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
}

.lead-followup-urgency-strip-top,
.lead-followup-urgency-pills,
.lead-followup-urgency-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-followup-urgency-strip-top h4 {
  margin: 0;
}

.lead-followup-urgency-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-followup-urgency-grid article {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.lead-followup-urgency-grid span {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-followup-urgency-grid strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
}

.lead-followup-urgency-note {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: #475569;
}

.lead-followup-urgency-strip-warning {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.92));
}

.lead-followup-urgency-strip-risk {
  border-color: rgba(239, 68, 68, 0.2);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.92));
}

.lead-followup-urgency-strip-healthy {
  border-color: rgba(34, 197, 94, 0.18);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.94), rgba(255, 255, 255, 0.9));
}

.lead-premium-action-bar {
  grid-template-columns: repeat(5, minmax(0, max-content));
  align-items: center;
  gap: 10px;
}

.lead-premium-action-bar-secondary {
  grid-template-columns: repeat(auto-fit, minmax(108px, max-content));
}

.lead-premium-call-button {
  min-width: 132px;
  justify-content: center;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
}

.lead-premium-action-secondary {
  border-color: rgba(59, 130, 246, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

.lead-premium-action-tertiary {
  border-color: rgba(148, 163, 184, 0.18);
  color: #334155;
  background: rgba(248, 250, 252, 0.88);
}

.lead-premium-action-subtle {
  color: #64748b;
  background: rgba(241, 245, 249, 0.72);
  border-color: rgba(203, 213, 225, 0.55);
}

.lead-smart-assistant-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  background:
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.45), transparent 28%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.96));
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.08);
}

.lead-smart-assistant-primary {
  display: grid;
  gap: 5px;
}

.lead-smart-assistant-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2563eb;
}

.lead-smart-assistant-primary strong {
  font-size: 1.16rem;
  color: #0f172a;
}

.lead-smart-assistant-primary p,
.lead-smart-assistant-suggestions article p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.lead-smart-flag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(254, 226, 226, 0.92);
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 700;
}

.lead-smart-assistant-suggestions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-smart-assistant-suggestions article {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.86);
}

.lead-smart-assistant-suggestions article strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1e293b;
}

.lead-insight-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.lead-insight-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.96), transparent 38%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.lead-insight-card.expanded {
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}

.lead-insight-card-top,
.lead-insight-card-heading,
.lead-insight-card-actions,
.lead-insight-card-highlights {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-insight-card-top,
.lead-insight-card-heading {
  justify-content: space-between;
  align-items: flex-start;
}

.lead-insight-card-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.lead-insight-card-heading h4 {
  margin: 0;
  font-size: 0.98rem;
}

.lead-insight-card-summary {
  margin: 0;
  color: #334155;
  line-height: 1.5;
  font-size: 0.92rem;
}

.lead-insight-card-actions {
  justify-content: flex-end;
  align-items: center;
}

.lead-insight-highlight {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.8);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.lead-insight-status {
  min-height: 28px;
}

.lead-insight-status-neutral {
  background: rgba(226, 232, 240, 0.84);
  color: #475569;
}

.lead-insight-status-live {
  background: rgba(220, 252, 231, 0.92);
  color: #166534;
}

.lead-insight-status-warning {
  background: rgba(255, 237, 213, 0.95);
  color: #c2410c;
}

.lead-insight-status-advisory {
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
}

.lead-insight-card-expanded {
  padding-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.lead-insight-card-expanded .note-list {
  gap: 10px;
}

.lead-insight-card-expanded .note-item {
  padding: 12px 13px;
  border-radius: 16px;
}

.lead-detail-tab {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(230, 236, 247, 0.92);
  border: 1px solid transparent;
  color: var(--muted);
  white-space: nowrap;
}

.lead-detail-tab.active {
  background: rgba(19, 33, 58, 0.94);
  color: #f5f8ff;
  border-color: rgba(19, 33, 58, 0.94);
}

.lead-detail-tab-panels {
  display: grid;
  gap: 16px;
}

.lead-workspace-premium-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.lead-workspace-control-center,
.lead-workspace-control-grid,
.lead-control-activity-grid,
.lead-control-metric-grid,
.lead-compact-guidance-grid,
.lead-linked-record-grid,
.lead-linked-record-meta,
.lead-commercial-stepper {
  display: grid;
  gap: 16px;
}

.lead-workspace-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.lead-control-activity-grid {
  grid-template-columns: 1.15fr minmax(0, 1fr);
  align-items: start;
}

.lead-control-activity-grid-summary {
  grid-template-columns: minmax(0, 1fr);
}

.lead-control-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-compact-guidance-grid,
.lead-linked-record-meta,
.lead-commercial-stepper {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lead-linked-record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-control-section {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.05);
}

.lead-detail-priority-grid .lead-control-section {
  height: 100%;
  padding: 18px;
}

.lead-control-metric-grid div {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.lead-control-metric-grid span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #64748b;
}

.lead-control-metric-grid strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
}

.lead-guidance-card,
.lead-linked-record-card,
.lead-commercial-step,
.lead-commercial-blocker {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.88);
}

.lead-guidance-card,
.lead-linked-record-card,
.lead-commercial-step,
.lead-commercial-blocker,
.lead-linked-record-card-top {
  display: grid;
  gap: 8px;
}

.lead-guidance-card span,
.lead-linked-record-meta span,
.lead-commercial-step-label,
.lead-commercial-blocker span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-guidance-card strong,
.lead-linked-record-card h5,
.lead-linked-record-meta strong,
.lead-commercial-step strong,
.lead-commercial-blocker strong {
  margin: 0;
  color: #0f172a;
}

.lead-guidance-card p,
.lead-linked-record-card p,
.lead-commercial-step p,
.lead-commercial-blocker p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.lead-guidance-card-warning,
.lead-commercial-blocker-warning {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.9));
}

.lead-commercial-blocker-live,
.lead-commercial-step-complete {
  border-color: rgba(34, 197, 94, 0.18);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.94), rgba(255, 255, 255, 0.9));
}

.lead-commercial-step-live {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.9));
}

.lead-commercial-step-pending {
  background: rgba(248, 250, 252, 0.96);
}

.lead-commercial-step-warning,
.lead-commercial-step-blocked {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.9));
}

.lead-commercial-progress-shell {
  display: grid;
  gap: 14px;
}

.lead-linked-record-card-top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.lead-linked-record-card h5 {
  font-size: 0.98rem;
}

.lead-linked-record-card-actionable {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lead-linked-record-card-actionable:hover,
.lead-linked-record-card-actionable:focus-within {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.lead-linked-record-actions {
  margin-top: 4px;
}

.lead-linked-record-disabled-note {
  margin: -2px 0 0;
  font-size: 0.76rem;
  color: #b45309;
}

.lead-linked-record-meta {
  gap: 12px;
}

.lead-linked-record-meta div {
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.lead-workspace-premium-main,
.lead-workspace-premium-side {
  align-items: start;
}

.lead-detail-summary-card,
.lead-detail-side-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.05);
}

.lead-detail-summary-card {
  border-color: rgba(226, 232, 240, 0.92);
}

.lead-detail-side-card-commercial {
  border-color: rgba(14, 165, 233, 0.16);
  background:
    radial-gradient(circle at top right, rgba(186, 230, 253, 0.36), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.96));
}

.lead-workspace-premium-side .lead-detail-side-card:last-child {
  opacity: 0.92;
}

.lead-detail-side-grid,
.lead-followup-highlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-followup-highlight-grid article,
.lead-detail-side-grid div {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.lead-followup-highlight-grid span,
.lead-detail-side-grid span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #64748b;
}

.lead-followup-highlight-grid strong,
.lead-detail-side-grid strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
}

.lead-followup-highlight-card {
  border-width: 1px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.lead-followup-highlight-warning {
  border-color: rgba(245, 158, 11, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.96));
}

.lead-followup-highlight-risk {
  border-color: rgba(239, 68, 68, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.96));
}

.lead-followup-highlight-healthy {
  border-color: rgba(34, 197, 94, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.96));
}

.lead-detail-core-layer,
.lead-detail-secondary-stack,
.lead-detail-core-work,
.lead-detail-work-card,
.lead-detail-work-card-grid,
.lead-detail-collapsible,
.lead-detail-collapsible-heading {
  display: grid;
  gap: 12px;
}

.lead-detail-core-work {
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
}

.lead-detail-work-card {
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.92));
  border: 1px solid rgba(251, 146, 60, 0.14);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.lead-detail-work-card-primary {
  border-color: rgba(249, 115, 22, 0.24);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.12);
}

.lead-detail-work-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-detail-collapsible {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.lead-detail-collapsible-secondary {
  background: rgba(248, 250, 252, 0.9);
}

.lead-detail-collapsible-attention {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.88));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.08);
}

.lead-detail-collapsible-attention .lead-detail-collapsible-summary,
.lead-detail-collapsible-attention .lead-detail-collapsible-chevron {
  color: #b45309;
}

.lead-detail-collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.lead-detail-collapsible-summary {
  color: rgba(71, 85, 105, 0.86);
  font-size: 0.92rem;
}

.lead-detail-collapsible-chevron {
  font-size: 1.05rem;
  color: rgba(71, 85, 105, 0.9);
}

.lead-detail-collapsible-body {
  padding-top: 8px;
}

.lead-detail-collapsible .detail-group,
.lead-detail-collapsible .detail-group-secondary {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.lead-record-shell {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.94));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.05);
}

.lead-record-shell .detail-heading-row h4 {
  margin-bottom: 4px;
}

.lead-record-operational-strip {
  margin-bottom: 10px;
}

.lead-record-operational-card {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(203, 213, 225, 0.55);
}

.lead-record-card-grid {
  gap: 14px;
}

.lead-record-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.86);
}

.lead-record-card h5 {
  margin: 0 0 10px;
  font-size: 0.94rem;
}

.lead-record-governance-card {
  background: rgba(248, 250, 252, 0.9);
}

.lead-record-form-meta {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.lead-record-lock-meta {
  margin: 2px 0 0;
}

.lead-record-shell,
.lead-record-form,
.lead-record-operational-strip,
.lead-record-card-grid,
.lead-record-card,
.lead-record-inline-form,
.lead-record-inline-actions,
.lead-record-section-grid,
.lead-record-other-contact-list,
.lead-record-other-contact-row,
.lead-record-form-meta {
  display: grid;
  gap: 14px;
}

.lead-record-card-grid,
.lead-record-section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-record-shell {
  gap: 10px;
}

.lead-record-card {
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.88));
  border: 1px solid rgba(251, 146, 60, 0.12);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.lead-record-card h5 {
  margin: 0;
}

.lead-record-operational-card,
.lead-record-governance-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.lead-record-inline-form,
.lead-record-form {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(251, 146, 60, 0.14);
}

.lead-record-inline-field input {
  min-height: 42px;
}

.lead-record-section-span-2 {
  grid-column: span 2;
}

.lead-record-other-contact-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.15fr) auto;
  align-items: end;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.lead-record-other-contact-chip {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.lead-record-other-contact-chip strong,
.lead-record-other-contact-chip em {
  font-style: normal;
}

.lead-record-contact-remove {
  min-width: 110px;
}

.lead-record-lock-pill-locked {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.lead-record-lock-pill-editing {
  background: rgba(251, 146, 60, 0.16);
  color: #c2410c;
}

.lead-record-lock-meta {
  margin: 0;
}

.lead-detail-quick-actions-shell {
  gap: 12px;
}

.lead-card {
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(43, 110, 242, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.94));
}

.lead-card-footer {
  align-items: center;
}

.lead-card-quick-actions .ghost-button,
.lead-row-quick-actions .ghost-button,
.lead-detail-action-links .ghost-button,
.lead-detail-action-links .primary-button {
  min-height: 40px;
}

.lead-card-quick-actions {
  padding-top: 4px;
  border-top: 1px solid rgba(105, 122, 148, 0.12);
}

.lead-row-quick-actions {
  justify-content: flex-end;
}

.lead-table tbody td:last-child {
  min-width: 260px;
}

.lead-history-list,
.lead-workspace-hook-grid {
  display: grid;
  gap: 14px;
}

.lead-history-card-grid {
  margin-top: 10px;
}

.lead-workspace-hook-card strong {
  display: block;
  margin-bottom: 6px;
}

.lead-itinerary-modal-body {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.lead-itinerary-modal-nav {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(114, 139, 182, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.lead-itinerary-modal-stage {
  display: grid;
  gap: 16px;
}

.lead-itinerary-nav-button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  color: #eaf2ff;
  border: 1px solid transparent;
}

.lead-itinerary-nav-button.active {
  background: rgba(77, 156, 255, 0.18);
  border-color: rgba(119, 176, 255, 0.38);
}

.lead-itinerary-modal-panel {
  min-height: 100%;
}

@media (max-width: 1100px) {
  .lead-detail-hero,
  .lead-workspace-premium-grid,
  .lead-workspace-control-grid,
  .lead-control-activity-grid,
  .lead-detail-priority-grid,
  .lead-itinerary-modal-body,
  .lead-insight-rail {
    grid-template-columns: 1fr;
  }

  .lead-detail-owner-row,
  .lead-detail-hero-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-detail-hero-header {
    flex-direction: column;
  }

  .lead-detail-hero-header-actions {
    width: 100%;
    flex: 1 1 auto;
  }

  .lead-compact-guidance-grid,
  .lead-commercial-stepper,
  .lead-linked-record-grid,
  .lead-linked-record-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    max-height: none;
  }

  .lead-detail-modal {
    width: min(100vw - 18px, 1000px);
    padding: 18px;
  }

  .lead-row-quick-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .lead-detail-modal-header,
  .lead-detail-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-detail-modal,
  .lead-itinerary-modal {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    padding: 16px;
    border-radius: 22px;
  }

  .lead-detail-hero,
  .lead-workspace-hook-grid {
    gap: 12px;
  }

  .lead-detail-hero-premium {
    padding: 18px;
  }

  .lead-premium-action-bar,
  .lead-premium-action-bar-secondary,
  .lead-smart-assistant-suggestions,
  .lead-detail-owner-row,
  .lead-detail-hero-meta-grid,
  .lead-control-metric-grid,
  .lead-compact-guidance-grid,
  .lead-commercial-stepper,
  .lead-linked-record-grid,
  .lead-linked-record-meta,
  .lead-detail-side-grid,
  .lead-followup-highlight-grid,
  .lead-followup-urgency-grid {
    grid-template-columns: 1fr;
  }

  .lead-card-quick-actions,
  .lead-row-quick-actions,
  .lead-detail-action-links,
  .lead-detail-tab-row,
  .lead-itinerary-modal-nav-list {
    gap: 8px;
  }

  .lead-dashboard-queue-grid {
    grid-template-columns: 1fr;
  }
}

.lead-itinerary-modal .muted,
.lead-itinerary-modal .eyebrow,
.lead-itinerary-modal .field span,
.lead-itinerary-modal .itinerary-meta-strip,
.lead-itinerary-modal .quote-itinerary-meta {
  color: rgba(198, 214, 243, 0.78);
}

.lead-itinerary-modal .ghost-button {
  border-color: rgba(149, 178, 226, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #eef4ff;
}

.lead-itinerary-modal .primary-button {
  box-shadow: 0 14px 34px rgba(34, 135, 215, 0.24);
}

.lead-itinerary-modal-header {
  margin-bottom: 18px;
}

.lead-itinerary-modal-body {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.45fr);
  gap: 18px;
  min-height: 0;
}

.lead-itinerary-modal-panel {
  min-height: 0;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(146, 168, 204, 0.18);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.lead-itinerary-modal-editor-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.lead-itinerary-modal-grid,
.lead-itinerary-modal-editor-grid {
  gap: 14px;
}

.lead-itinerary-modal .field input,
.lead-itinerary-modal .field select,
.lead-itinerary-modal .field textarea {
  background: rgba(8, 14, 25, 0.78);
  border-color: rgba(145, 170, 214, 0.18);
  color: #eff5ff;
}

.lead-itinerary-modal .field input::placeholder,
.lead-itinerary-modal .field textarea::placeholder {
  color: rgba(198, 214, 243, 0.42);
}

.lead-itinerary-modal-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.lead-itinerary-modal-section-head h4 {
  margin: 4px 0 0;
}

.lead-itinerary-modal-meta {
  margin-bottom: 16px;
}

.lead-itinerary-modal-day-list {
  overflow-y: auto;
  padding-right: 6px;
}

.lead-itinerary-modal-day-card {
  background: rgba(8, 14, 25, 0.76);
  border-color: rgba(145, 170, 214, 0.14);
}

.lead-itinerary-modal-actions {
  margin-top: 18px;
  padding: 18px 20px 4px;
  border-top: 1px solid rgba(145, 170, 214, 0.14);
}

.lead-itinerary-modal-action-copy {
  display: grid;
  gap: 4px;
}

.lead-itinerary-modal-action-copy strong {
  color: #eef4ff;
}

@keyframes leadBackdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes leadModalRise {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 18px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.deal-preview strong {
  font-size: 1.3rem;
}

.lead-detail-panel {
  align-self: start;
  min-height: 100%;
}

.followup-reminder-panel {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.92));
}

.followup-reminder-list,
.followup-list {
  display: grid;
  gap: 14px;
}

.followup-reminder-card,
.followup-item {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #fffaf7);
}

.followup-reminder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.followup-reminder-card p,
.followup-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.followup-reminder-card-today,
.followup-item-today,
.lead-card-followup-today,
.lead-row-followup-today {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 237, 0.96));
}

.followup-reminder-card-missed,
.followup-item-missed,
.lead-card-followup-missed,
.lead-row-followup-missed {
  border-color: rgba(220, 38, 38, 0.38);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(255, 255, 255, 0.96));
}

.lead-summary-panel {
  align-self: stretch;
}

.lead-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-tile {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}

.summary-tile span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-tile strong {
  font-size: 1.12rem;
}

.lead-summary-copy {
  margin: 0;
}

.lead-detail-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(105, 122, 148, 0.24);
}

.detail-group {
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(105, 122, 148, 0.14);
}

.detail-group h4 {
  margin: 0;
}

.detail-heading-row,
.followup-item-top,
.followup-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.followup-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(244, 248, 255, 0.92);
}

.detail-grid span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-grid strong {
  font-size: 0.98rem;
}

.followup-note {
  line-height: 1.6;
}

.followup-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.followup-type-manual {
  color: #166534;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.followup-type-auto {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.followup-item-overridden {
  opacity: 0.72;
}

.followup-status-chip {
  min-width: 88px;
}

.followup-status-pending {
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
}

.followup-status-done {
  background: rgba(15, 159, 110, 0.16);
  color: #0b815c;
}

.followup-status-missed {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.lead-cards-list {
  max-height: 680px;
  overflow-y: auto;
  padding-right: 4px;
}

.lead-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(105, 122, 148, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.lead-card.selected {
  border-color: rgba(43, 110, 242, 0.28);
  box-shadow: 0 12px 28px rgba(43, 110, 242, 0.12);
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
  border-color: rgba(105, 122, 148, 0.2);
}

.lead-card-priority {
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.14), 0 16px 34px rgba(220, 38, 38, 0.12);
}

.lead-card-compact {
  cursor: pointer;
}

.lead-card.is-opening {
  opacity: 0.72;
  pointer-events: none;
}

.lead-card-progress {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(20, 83, 45, 0.18));
  display: grid;
  gap: 8px;
}

.lead-card-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.88);
}

.lead-card-progress-top strong {
  color: #ecfdf5;
}

.lead-card-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.lead-card-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #facc15);
}

.lead-card-progress-closed .lead-card-progress-track span {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.lead-context-chip-call {
  border-color: rgba(34, 197, 94, 0.32);
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.22);
}

.lead-front-calling-update {
  display: block;
}

.lead-front-calling-update .calling-update-form {
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: linear-gradient(135deg, rgba(2, 44, 34, 0.74), rgba(15, 23, 42, 0.88));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
}

.lead-front-calling-update .calling-update-form .muted,
.lead-front-calling-update .telecalling-action-note,
.lead-front-calling-update .calling-update-mode-status,
.lead-front-calling-update .calling-update-mode-helper {
  color: rgba(226, 232, 240, 0.88);
}

.lead-front-calling-update .calling-update-form .field > span {
  color: rgba(226, 232, 240, 0.92);
}

.lead-front-calling-update .calling-update-form .calling-update-mode-pill-row .status-badge {
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.46);
  color: #e2e8f0;
}

.lead-front-calling-update .calling-update-form .calling-update-shortcut-groups,
.lead-front-calling-update .calling-update-form .calling-update-selection-summary,
.lead-front-calling-update .calling-update-form .calling-update-recommendation-card,
.lead-front-calling-update .calling-update-form .calling-update-summary-card {
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.18);
}

.lead-front-calling-update .calling-update-form .calling-update-shortcut.is-active {
  border-color: rgba(251, 146, 60, 0.55);
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.98), rgba(254, 242, 242, 0.96));
  color: #9a3412;
}

.lead-front-calling-update .calling-update-form .calling-update-save-button,
.lead-front-calling-update .calling-update-form .calling-update-save-button.is-ready {
  background: linear-gradient(135deg, #fb923c 0%, #ef4444 100%);
  box-shadow:
    0 14px 28px rgba(239, 68, 68, 0.24),
    0 0 0 0 rgba(251, 146, 60, 0.24);
}

.lead-front-calling-update .calling-update-form .calling-update-save-button:hover,
.lead-front-calling-update .calling-update-form .calling-update-save-button:focus-visible {
  box-shadow:
    0 18px 34px rgba(239, 68, 68, 0.3),
    0 0 24px rgba(251, 146, 60, 0.22);
}

.lead-rule-timeline {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(248, 250, 252, 0.92);
}

.lead-rule-timeline .lead-reference-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-rule-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.22);
}

.lead-rule-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #facc15);
}

.lead-rule-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lead-rule-meta-grid article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.lead-rule-meta-grid span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.lead-rule-timeline-warning .lead-rule-track span {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.lead-rule-timeline-urgent .lead-rule-track span {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.lead-latest-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lead-commercial-chain-table {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.lead-commercial-chain-head,
.lead-commercial-chain-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(140px, 0.8fr) minmax(240px, 1.5fr) minmax(220px, 1.2fr);
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
}

.lead-commercial-chain-head {
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.lead-commercial-chain-row + .lead-commercial-chain-row {
  border-top: 1px solid rgba(226, 232, 240, 0.72);
}

.lead-commercial-chain-row {
  font-size: 0.9rem;
  color: #1e293b;
}

.lead-commercial-chain-state {
  font-weight: 700;
}

.lead-governance-lock-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(255, 247, 237, 0.9);
  color: #9a3412;
}

@media (max-width: 980px) {
  .lead-rule-meta-grid {
    grid-template-columns: 1fr;
  }

  .lead-latest-context-grid {
    grid-template-columns: 1fr;
  }

  .lead-commercial-chain-head,
  .lead-commercial-chain-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .lead-commercial-chain-head {
    display: none;
  }

  .lead-commercial-chain-row {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 6px;
  }
}

.lead-card-top, .lead-card-footer, .pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lead-card-top {
  align-items: flex-start;
}

.lead-card-top h4, .pipeline-column-header h4 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.lead-card-name {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.lead-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.priority-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.95);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.lead-ai-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.lead-ai-chip-hot {
  color: #7f1d1d;
  background: rgba(254, 202, 202, 0.95);
  border-color: rgba(248, 113, 113, 0.34);
}

.lead-ai-chip-warm {
  color: #92400e;
  background: rgba(254, 243, 199, 0.96);
  border-color: rgba(245, 158, 11, 0.34);
}

.lead-ai-chip-cold {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.96);
  border-color: rgba(96, 165, 250, 0.36);
}

.priority-chip-today {
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(245, 158, 11, 0.28);
}

.priority-chip-missed {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(220, 38, 38, 0.28);
}

.priority-chip-inline {
  margin-top: 8px;
}

.lead-card-body {
  display: grid;
  gap: 6px;
}

.lead-card-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.lead-card-line-focus {
  color: #0f3d2e;
  font-weight: 700;
}

.lead-workflow-blocker {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(220, 139, 24, 0.12);
  border: 1px solid rgba(220, 139, 24, 0.22);
}

.lead-workflow-blocker strong {
  color: #7a4c06;
  font-size: 0.84rem;
}

.lead-workflow-blocker p {
  margin: 0;
  color: #7a4c06;
  font-size: 0.9rem;
}

.lead-signal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lead-signal-chip-alert {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.lead-card-value {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid rgba(105, 122, 148, 0.12);
  border-bottom: 1px solid rgba(105, 122, 148, 0.12);
}

.lead-card-value span {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead-card-value strong {
  display: block;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead-card-footer {
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.84rem;
}

.lead-card-primary {
  cursor: pointer;
}

.lead-card-meta-item {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(244, 248, 255, 0.95);
  border: 1px solid rgba(105, 122, 148, 0.14);
}

.view-toggle-button {
  min-width: 138px;
  border-radius: 14px;
  background: transparent;
  border-color: transparent;
}

.view-toggle-button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(43, 110, 242, 0.16);
}

.lead-workspace-actions {
  grid-auto-flow: column;
  align-items: center;
  justify-content: end;
}

.lead-view-panel {
  min-width: 0;
}

.stage-button {
  padding-inline: 14px;
}

.status-chip, .lead-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.status-chip {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
}

.status-new { background: rgba(43, 110, 242, 0.12); color: #245bc9; }
.status-contacted { background: rgba(22, 166, 182, 0.14); color: #0f7d89; }
.status-followup { background: rgba(220, 139, 24, 0.16); color: #a8690f; }
.status-interested { background: rgba(17, 153, 112, 0.15); color: #0b815c; }
.status-booked { background: rgba(15, 159, 110, 0.18); color: #0b815c; }
.status-lost { background: rgba(220, 76, 100, 0.14); color: #bb3550; }

.pipeline-board {
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  overflow-x: auto;
  gap: 16px;
  padding: 4px 4px 10px;
}

.pipeline-column {
  min-width: 260px;
  height: 700px;
  padding: 10px;
  border-radius: 20px;
  background: #f6f8fb;
  border: 1px solid rgba(105, 122, 148, 0.12);
  overflow: hidden;
}

.pipeline-column-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 12px 14px;
  background: #f6f8fb;
  border-bottom: 1px solid rgba(105, 122, 148, 0.1);
}

.pipeline-column-header h4 {
  margin-bottom: 4px;
}

.pipeline-column-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.pipeline-dropzone {
  display: grid;
  align-content: start;
  gap: 12px;
  height: calc(100% - 72px);
  padding: 12px 2px 2px;
  overflow-y: auto;
}

.pipeline-dropzone.drag-target {
  background: rgba(43, 110, 242, 0.05);
  outline: 2px dashed rgba(43, 110, 242, 0.28);
  outline-offset: -6px;
}

.pipeline-empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  border-radius: 18px;
  color: var(--muted);
  border: 1px dashed rgba(105, 122, 148, 0.22);
  background: rgba(255, 255, 255, 0.78);
}

.pipeline-column-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
}

.lead-table-shell {
  overflow: auto;
  max-height: 640px;
  border-radius: 22px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.78);
}

.lead-list-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 16px 0;
}

.lead-list-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-list-preset-chip span {
  color: #64748b;
  font-size: 0.78rem;
}

.lead-list-preset-chip.active {
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
}

.lead-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(105, 122, 148, 0.12);
}

.lead-pagination-size-field {
  min-width: 96px;
  margin: 0;
}

.lead-pagination-size-field span {
  font-size: 0.7rem;
}

.lead-pagination-size-field small {
  display: block;
  max-width: 140px;
  color: rgba(71, 85, 105, 0.78);
  font-size: 0.68rem;
  line-height: 1.2;
}

.lead-pagination-size-field input,
.lead-pagination-size-field select {
  min-height: 34px;
  padding: 6px 10px;
}

.lead-pagination-size-field input {
  width: 86px;
}

.lead-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.lead-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 14px;
  text-align: left;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(244, 248, 255, 0.98);
  border-bottom: 1px solid rgba(105, 122, 148, 0.16);
}

.lead-table tbody td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(105, 122, 148, 0.12);
  vertical-align: middle;
}

.lead-table tbody tr {
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.18s ease;
}

.lead-table tbody tr:hover {
  background: rgba(244, 248, 255, 0.96);
}

.lead-table tbody tr.selected {
  background: rgba(43, 110, 242, 0.08);
}

.lead-row-priority {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(254, 242, 242, 0.96));
}

.lead-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.lead-name-cell {
  display: grid;
  gap: 4px;
}

.lead-score-cell {
  display: grid;
  gap: 6px;
  min-width: 110px;
}

.lead-name-cell strong {
  font-size: 0.98rem;
}

.lead-name-cell span {
  color: var(--muted);
  font-size: 0.86rem;
}

.lead-name-cell-execution {
  min-width: 200px;
}

.lead-table-cell-stack {
  display: grid;
  gap: 6px;
  min-width: 140px;
}

.lead-table-cell-stack strong {
  font-size: 0.94rem;
  color: #0f172a;
}

.lead-table-cell-stack span {
  color: #64748b;
  font-size: 0.82rem;
}

.lead-row-chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lead-row-followup-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(226, 232, 240, 0.94);
  color: #334155;
}

.lead-row-followup-state-missed {
  background: rgba(254, 226, 226, 0.96);
  color: #991b1b;
}

.lead-row-followup-state-today {
  background: rgba(255, 237, 213, 0.96);
  color: #c2410c;
}

.lead-row-followup-state-neutral {
  background: rgba(226, 232, 240, 0.94);
  color: #334155;
}

.lead-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(4px);
  z-index: 30;
}

.lead-drawer {
  position: fixed;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: min(460px, calc(100vw - 24px));
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  transform: translateX(calc(100% + 32px));
  transition: transform 0.24s ease;
  z-index: 31;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lead-drawer.open {
  transform: translateX(0);
}

.lead-drawer-header,
.lead-drawer-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lead-drawer-header {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(105, 122, 148, 0.14);
}

.lead-drawer-header-actions {
  align-items: center;
}

.lead-detail-content {
  overflow-y: auto;
  padding-right: 4px;
}

.note-item, .timeline-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(244, 248, 255, 0.92);
  border: 1px solid rgba(105, 122, 148, 0.14);
}

.note-item p, .timeline-item strong, .timeline-item span, .note-item span {
  margin: 0;
}

.note-item span, .timeline-item span {
  display: block;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

body[data-active-section="lead-pipeline"] .hero-panel,
body[data-active-section="lead-pipeline"] .stats-grid {
  display: none;
}

body[data-boot-phase="routing"] #crmHeroPanel,
body[data-boot-phase="routing"] #crmStatsGrid,
body[data-boot-phase="routing"] #aiOpsDeck,
body[data-boot-phase="routing"] #crmLiveAgentBoardPanel,
body[data-boot-phase="routing"] #proactiveAssistantSection,
body[data-boot-phase="routing"] #intelligenceSection,
body[data-boot-phase="routing"] #roleAwareInsightSection,
body[data-boot-phase="routing"] #optimizationSection,
body[data-boot-phase="routing"] #aiHealthSection,
body[data-boot-phase="routing"] #defaultContent,
body[data-boot-phase="routing"] #moduleDashboardSection,
body[data-boot-phase="routing"] #crmWorkspaceDashboardSection,
body[data-boot-phase="routing"] #loginGreetingBanner {
  display: none !important;
}

body[data-user-access-state="pending"] .nav-menu,
body[data-user-access-state="pending"] #moduleDashboardSection,
body[data-user-access-state="pending"] #crmWorkspaceDashboardSection,
body[data-user-access-state="pending"] #defaultContent {
  display: none !important;
}

body[data-active-section]:not([data-active-section="crm-dashboard"]) #crmHeroPanel,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #crmStatsGrid,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #aiOpsDeck,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #crmLiveAgentBoardPanel,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #proactiveAssistantSection,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #intelligenceSection,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #roleAwareInsightSection,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #optimizationSection,
body[data-active-section]:not([data-active-section="crm-dashboard"]) #aiHealthSection {
  display: none !important;
}

body[data-active-section="crm-dashboard"] #leadPipelineSection,
body[data-active-section="crm-dashboard"] #chatWorkspaceSection,
body[data-active-section="crm-dashboard"] #aiWorkspaceSection,
body[data-active-section="crm-dashboard"] #quoteDashboardSection,
body[data-active-section="crm-dashboard"] #salesOrdersSection,
body[data-active-section="crm-dashboard"] #purchasingSection,
body[data-active-section="crm-dashboard"] #invoicesSection,
body[data-active-section="crm-dashboard"] #reportsSection,
body[data-active-section="crm-dashboard"] #warningReportsSection,
body[data-active-section="crm-dashboard"] #assignmentRulesSection,
body[data-active-section="crm-dashboard"] #contactsSection,
body[data-active-section="crm-dashboard"] #documentsSection,
body[data-active-section="crm-dashboard"] #externalConfirmationsSection,
body[data-active-section="crm-dashboard"] #vendorSection,
body[data-active-section="crm-dashboard"] #vendorMastersSection,
body[data-active-section="crm-dashboard"] #hrPanelSection,
body[data-active-section="crm-dashboard"] #aiTrainerSection,
body[data-active-section="crm-dashboard"] #manualCostingSection,
body[data-active-section="crm-dashboard"] #operationsMastersSection,
body[data-active-section="crm-dashboard"] #accountingFinanceSection,
body[data-active-section="crm-dashboard"] #userManagementSection {
  display: none !important;
}

.lead-workspace {
  gap: 14px;
}

#leadPipelineSection,
#chatWorkspaceSection,
#aiWorkspaceSection,
#quoteDashboardSection,
#salesOrdersSection,
#purchasingSection,
#invoicesSection,
#reportsSection,
#warningReportsSection,
#assignmentRulesSection,
#contactsSection,
#documentsSection,
#externalConfirmationsSection,
#vendorSection,
#vendorMastersSection,
#hrPanelSection,
#aiTrainerSection,
#manualCostingSection,
#operationsMastersSection,
#accountingFinanceSection,
#userManagementSection,
#moduleDashboardSection {
  scroll-margin-top: 16px;
}

.crm-workspace-dashboard {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.crm-workspace-dashboard-shell {
  display: grid;
  gap: 20px;
}

.lead-lms-tab-shell,
.lead-dashboard-panel {
  display: grid;
  gap: 16px;
}

.crm-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.crm-dashboard-header-copy {
  display: grid;
  gap: 6px;
}

.crm-dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.crm-dashboard-kpi-strip,
.crm-dashboard-action-grid,
.crm-dashboard-quick-grid {
  display: grid;
  gap: 14px;
}

.crm-dashboard-kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-dashboard-action-grid,
.crm-dashboard-quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.crm-dashboard-kpi-card,
.crm-dashboard-action-card,
.crm-dashboard-quick-card {
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.88);
}

.crm-dashboard-kpi-card {
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.crm-dashboard-kpi-card strong {
  font-size: 1.8rem;
  line-height: 1;
}

.crm-dashboard-kpi-card span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.crm-dashboard-act-now {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(94, 177, 255, 0.24);
  background:
    radial-gradient(circle at top right, rgba(94, 177, 255, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(11, 20, 38, 0.96), rgba(15, 23, 42, 0.92));
  color: #eef4ff;
}

.crm-dashboard-act-now .eyebrow,
.crm-dashboard-act-now h4 {
  color: inherit;
}

.crm-dashboard-action-card,
.crm-dashboard-quick-card {
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.crm-dashboard-action-card {
  display: grid;
  gap: 6px;
  color: #eef4ff;
  border-color: rgba(148, 197, 255, 0.24);
  background: rgba(10, 17, 30, 0.48);
}

.crm-dashboard-action-card span,
.crm-dashboard-action-card small {
  color: rgba(226, 232, 240, 0.78);
}

.crm-dashboard-action-card strong {
  font-size: 1.7rem;
  line-height: 1;
}

.crm-dashboard-quick-card {
  display: grid;
  gap: 8px;
}

.crm-dashboard-quick-card span {
  color: var(--muted);
}

.crm-dashboard-action-card:hover,
.crm-dashboard-quick-card:hover,
.crm-dashboard-action-card:focus-visible,
.crm-dashboard-quick-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 177, 255, 0.32);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
}

.crm-dashboard-secondary {
  display: grid;
  gap: 16px;
  padding-top: 6px;
}

.crm-dashboard-secondary > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
  list-style: none;
}

.crm-dashboard-secondary > summary::-webkit-details-marker {
  display: none;
}

.lead-lms-tab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-lms-tab {
  min-width: 140px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(105, 122, 148, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 700;
}

.lead-lms-tab.active {
  background: linear-gradient(135deg, #0f172a, #1f3c88);
  color: #eef4ff;
}

.lead-dashboard-alerts,
.lead-dashboard-sections,
.lead-agent-health-grid {
  display: grid;
  gap: 14px;
}

.lead-dashboard-alerts,
.lead-agent-health-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lead-dashboard-alert,
.lead-dashboard-list-item,
.lead-agent-health-card,
.lead-dashboard-metric-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.82);
}

.lead-dashboard-alert p,
.lead-dashboard-list-item p,
.lead-agent-health-card p,
.lead-dashboard-metric-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.lead-dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.lead-dashboard-metric-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lead-dashboard-metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.6rem;
}

.lead-dashboard-list {
  display: grid;
  gap: 12px;
}

.lead-dashboard-list-item,
.lead-agent-health-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lead-dashboard-section-premium {
  background:
    radial-gradient(circle at top right, rgba(15, 159, 110, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 244, 0.98));
}

.lead-dashboard-section-secondary {
  background: rgba(255, 255, 255, 0.76);
}

.lead-dashboard-queue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lead-dashboard-queue-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(105, 122, 148, 0.14);
  background: rgba(255, 255, 255, 0.88);
}

.lead-dashboard-queue-card strong {
  display: block;
  margin-bottom: 12px;
}

.lead-agent-health-card {
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  .crm-dashboard-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .crm-dashboard-kpi-strip {
    grid-template-columns: 1fr;
  }

  .crm-dashboard-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.lead-context-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 159, 110, 0.12);
  color: #0f7f59;
  font-size: 0.72rem;
  font-weight: 700;
}

.lead-context-chip-strong {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
}

.lead-context-chip-workflow {
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
}

.lead-context-chip-stage {
  background: rgba(226, 232, 240, 0.94);
  color: #334155;
}

.lead-context-chip-health-healthy {
  background: rgba(220, 252, 231, 0.95);
  color: #166534;
}

.lead-context-chip-health-warning {
  background: rgba(255, 237, 213, 0.96);
  color: #c2410c;
}

.lead-context-chip-health-risk {
  background: rgba(254, 226, 226, 0.96);
  color: #991b1b;
}

.lead-bulk-field-wide {
  min-width: 240px;
}

.status-overloaded,
.tone-danger {
  background: rgba(220, 76, 100, 0.12);
  color: #b42318;
}

.status-underutilized,
.tone-positive {
  background: rgba(15, 159, 110, 0.12);
  color: #0f7f59;
}

.status-temporarily-unavailable,
.status-on-leave,
.tone-warning {
  background: rgba(220, 139, 24, 0.14);
  color: #b26a00;
}

.status-inactive {
  background: rgba(105, 122, 148, 0.12);
  color: #475467;
}

.crm-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.crm-strip-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
}

.crm-mini-stat {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid rgba(105, 122, 148, 0.12);
}

.crm-mini-stat span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.crm-mini-stat strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.2;
}

.crm-mini-stat-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--muted);
}

.crm-filter-panel {
  padding: 18px;
}

.lead-filter-grid {
  grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(160px, 0.72fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.lead-workspace-shell {
  position: sticky;
  top: 12px;
  z-index: 12;
  border: 1px solid rgba(123, 144, 177, 0.18);
  background:
    radial-gradient(circle at top right, rgba(84, 178, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(8, 13, 23, 0.96), rgba(15, 22, 36, 0.96));
  box-shadow: 0 18px 44px rgba(6, 10, 18, 0.26);
}

.lead-filter-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lead-filter-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.lead-topbar-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-filter-command-bar {
  align-items: flex-start;
}

.lead-filter-menu-row {
  position: relative;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
}

.lead-filter-menu-anchor {
  position: relative;
}

.lead-filter-menu-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(142, 163, 191, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #1e293b;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.lead-filter-menu-button:disabled {
  cursor: not-allowed;
  color: #94a3b8;
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: none;
}

.lead-filter-menu-button:hover,
.lead-filter-menu-button.active {
  color: #9a3412;
  border-color: rgba(255, 129, 66, 0.64);
  background: rgba(255, 237, 213, 0.96);
  box-shadow: 0 10px 24px rgba(22, 28, 45, 0.2);
}

.lead-filter-menu-button-accent {
  border-color: rgba(255, 112, 67, 0.55);
  background: linear-gradient(135deg, rgba(255, 112, 67, 0.95), rgba(239, 68, 68, 0.95));
}

.lead-filter-menu-button-create {
  order: -1;
  border-color: rgba(13, 148, 136, 0.52);
  background: #0f9f96;
  color: #ffffff;
}

.lead-filter-menu-button-create:hover,
.lead-filter-menu-button-create.active {
  border-color: rgba(15, 118, 110, 0.82);
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
}

.lead-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 34;
  width: min(680px, calc(100vw - 48px));
  max-height: min(72vh, 720px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.24);
}

.lead-filter-dropdown-compact {
  width: min(280px, calc(100vw - 48px));
}

.lead-filter-menu-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.lead-filter-menu-heading strong {
  color: #0f172a;
  font-size: 0.94rem;
}

.lead-filter-menu-heading span,
.lead-filter-dropdown .field span,
.lead-filter-dropdown .form-status {
  color: #64748b;
}

.lead-filter-preset-grid,
.lead-default-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.lead-filter-preset-button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.lead-filter-preset-button:hover {
  border-color: rgba(249, 115, 22, 0.54);
  background: #fff7ed;
}

.lead-filter-preset-button strong {
  font-size: 0.88rem;
}

.lead-filter-preset-button span {
  color: #64748b;
  font-size: 0.76rem;
}

.lead-filter-menu-grid {
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.lead-filter-dropdown .lead-inline-field,
.lead-filter-dropdown .lead-quick-field {
  min-width: 0;
}

.lead-filter-dropdown input,
.lead-filter-dropdown select {
  min-height: 38px;
  border-color: rgba(148, 163, 184, 0.52);
  background: #ffffff;
  color: #0f172a;
}

.lead-save-view-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #f8fafc;
}

.lead-save-view-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lead-active-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 30px;
}

.lead-active-filter-empty {
  color: rgba(217, 228, 245, 0.66);
  font-size: 0.78rem;
}

.lead-active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  max-width: 260px;
  padding: 0 10px;
  border: 1px solid rgba(255, 160, 122, 0.5);
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.12);
  color: #fff7ed;
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.lead-active-filter-chip-clear {
  border-color: rgba(148, 163, 184, 0.52);
  background: rgba(241, 245, 249, 0.9);
  color: #334155;
}

.lead-active-filter-chip span {
  flex: 0 0 auto;
  color: rgba(255, 214, 191, 0.9);
}

.lead-inline-field,
.lead-quick-field {
  min-width: 150px;
}

.lead-inline-field select,
.lead-quick-field select {
  min-height: 46px;
}

.lead-filter-search input,
.lead-inline-field select,
.lead-quick-field select,
.lead-advanced-filter-grid input,
.lead-advanced-filter-grid select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(140, 166, 214, 0.18);
  color: #f4f8ff;
}

.lead-filter-search input::placeholder,
.lead-advanced-filter-grid input::placeholder {
  color: rgba(214, 226, 245, 0.44);
}

.lead-workspace-shell .field span,
.lead-workspace-shell .muted,
.lead-workspace-shell .pill,
.lead-results-summary {
  color: rgba(217, 228, 245, 0.82);
}

.lead-quick-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.lead-advanced-filter-sections {
  display: grid;
  gap: 12px;
}

.lead-advanced-filter-section {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(140, 166, 214, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.lead-advanced-filter-section legend {
  padding: 0 8px;
  color: #f8fbff;
  font-weight: 900;
}

.lead-smart-filter-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-smart-chip,
.lead-segment-card {
  border: 1px solid rgba(139, 163, 203, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #eef4ff;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lead-smart-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.lead-smart-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(235, 243, 255, 0.88);
}

.lead-smart-chip:hover,
.lead-segment-card:hover,
.lead-smart-chip.active,
.lead-segment-card.active {
  transform: translateY(-1px);
  border-color: rgba(104, 201, 255, 0.42);
  background: rgba(91, 167, 255, 0.12);
  box-shadow: 0 12px 28px rgba(15, 30, 54, 0.26);
}

.lead-workspace-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.lead-filter-summary-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-results-summary {
  font-size: 0.9rem;
}

.lead-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-segment-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.lead-segment-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  text-align: left;
}

.lead-segment-card span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead-segment-card strong {
  font-size: 1.5rem;
  color: var(--text);
}

.lead-segment-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.crm-filter-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pipeline-panel {
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(121, 140, 172, 0.12);
  background:
    radial-gradient(circle at top left, rgba(117, 211, 255, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 253, 0.98));
}

.pipeline-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pipeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 2px 10px;
  border-bottom: 1px solid rgba(105, 122, 148, 0.12);
}

.pipeline-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-toolbar-group-end {
  justify-content: flex-end;
}

.lead-bulk-field {
  min-width: 170px;
}

.lead-bulk-field span {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead-bulk-field select {
  min-height: 44px;
  padding-block: 10px;
}

.toolbar-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #245bc9;
  font-size: 0.75rem;
  font-weight: 700;
}

.toolbar-chip-soft {
  background: #f4f7fb;
  color: #5f6b84;
}

.toolbar-meta {
  font-size: 0.76rem;
  color: var(--muted);
}

.pipeline-panel-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pipeline-hint {
  font-size: 0.84rem;
  color: var(--muted);
}

.pipeline-board {
  grid-template-columns: repeat(6, minmax(250px, 1fr));
  gap: 14px;
  padding: 6px 2px 8px;
}

.pipeline-column {
  min-width: 250px;
  height: calc(100vh - 260px);
  min-height: 560px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(126, 145, 176, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 248, 252, 0.98));
}

.pipeline-column-header {
  padding: 10px 10px 12px;
}

.pipeline-column-header h4 {
  font-size: 0.96rem;
  margin: 0;
}

.pipeline-column-title-row,
.pipeline-column-subtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(105, 122, 148, 0.14);
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
}

.pipeline-column-meter {
  height: 6px;
  margin: 8px 0 10px;
  border-radius: 999px;
  background: rgba(105, 122, 148, 0.14);
  overflow: hidden;
}

.pipeline-column-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e54b5d, #ef7a64);
}

.pipeline-column-subtitle p,
.pipeline-column-value {
  font-size: 0.78rem;
  margin: 0;
}

.pipeline-dropzone {
  gap: 8px;
  height: calc(100% - 64px);
  padding: 10px 0 0;
}

.lead-card {
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(124, 143, 170, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 253, 0.96));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.lead-card-top,
.lead-card-footer {
  gap: 8px;
}

.lead-card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.lead-card-title-copy {
  min-width: 0;
}

.lead-card-subtitle {
  margin: 4px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.lead-card-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #ecf3ff;
  color: #285fcf;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lead-card-top h4 {
  font-size: 0.92rem;
  line-height: 1.3;
  min-width: 0;
}

.lead-card-body {
  gap: 0;
}

.lead-card-line {
  font-size: 0.82rem;
}

.lead-card-line-accent {
  color: #245bc9;
  font-weight: 700;
}

.lead-card-footer {
  padding-top: 0;
  font-size: 0.78rem;
}

.lead-card-value-inline {
  font-size: 0.86rem;
  line-height: 1.2;
  color: #182233;
}

.status-chip {
  padding: 4px 8px;
  font-size: 0.68rem;
}

.lead-drawer {
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(420px, calc(100vw - 24px));
  padding: 18px;
  border-radius: 24px;
}

.detail-group {
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

.detail-grid {
  gap: 10px;
}

.detail-grid div {
  padding: 10px 12px;
}

.detail-action-row {
  display: flex;
  gap: 10px;
}

.marketing-action-state-row {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.marketing-action-state-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: rgba(241, 245, 249, 0.9);
}

.marketing-action-state-pill.is-queued {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(219, 234, 254, 0.88);
}

.marketing-action-state-pill.is-approved {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(220, 252, 231, 0.9);
}

.action-link {
  text-decoration: none;
}

.lead-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(3px);
  z-index: 28;
}

.lead-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 29;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 18px;
  overflow-y: auto;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
  transform: translate(-50%, -50%);
}

#postCallSummaryModal > .lead-modal-dialog {
  position: relative;
  z-index: 29;
}

.marketing-view-modal {
  width: min(880px, calc(100vw - 28px));
}

.marketing-catalog-modal {
  width: min(1080px, calc(100vw - 28px));
}

.marketing-catalog-package-grid {
  margin-top: 8px;
}

.marketing-catalog-package-grid textarea {
  resize: vertical;
}

.marketing-view-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.marketing-view-field {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
}

.marketing-view-field-label {
  font-weight: 700;
  color: #334155;
  letter-spacing: 0;
}

.marketing-view-field-value {
  color: #0f172a;
  word-break: break-word;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .marketing-view-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.lead-advanced-filter-modal {
  width: min(980px, calc(100vw - 28px));
  background:
    radial-gradient(circle at top right, rgba(88, 171, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(7, 12, 22, 0.98), rgba(11, 18, 31, 0.98));
  color: #eef4ff;
  border-color: rgba(114, 139, 182, 0.24);
}

.lead-advanced-filter-modal .field span,
.lead-advanced-filter-modal .muted {
  color: rgba(208, 221, 245, 0.8);
}

.lead-advanced-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lead-grouped-results {
  display: grid;
  gap: 16px;
}

.lead-group-card {
  border: 1px solid rgba(125, 144, 171, 0.12);
  border-radius: 22px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(242, 246, 251, 0.98));
}

.lead-group-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lead-group-card-header h4 {
  margin: 2px 0 0;
}

.lead-group-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-group-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.lead-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lead-form {
  gap: 14px;
}

.lead-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lead-form-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  padding-top: 4px;
}

.deal-preview {
  padding: 14px 16px;
  border-radius: 16px;
}

.login-body { display: grid; place-items: center; padding: 24px; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 420px); gap: 24px; width: min(1100px, 100%); }
.login-showcase, .login-card { padding: 36px; background: rgba(255, 255, 255, 0.82); }
.login-showcase {
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 540px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(43, 110, 242, 0.78)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 20%);
  color: #fff;
}

@media (max-width: 1220px) {
  .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .app-shell, .login-layout { grid-template-columns: 1fr; }
  .stats-grid, .content-grid, .tool-grid, .user-management-grid, .checkbox-grid, .lead-layout, .lead-overview-grid, .detail-grid, .lead-filter-grid { grid-template-columns: 1fr 1fr; }
  .hero-panel, .topbar, .panel-header, .chat-footer, .permission-header, .user-card, .user-card-actions { flex-direction: column; align-items: flex-start; }
  .pipeline-board { grid-template-columns: repeat(3, minmax(260px, 1fr)); }
  .lead-summary-grid { grid-template-columns: 1fr; }
  .lead-workspace-actions { grid-auto-flow: row; justify-content: stretch; }
  .lead-drawer { top: auto; right: 12px; left: 12px; bottom: 12px; width: auto; border-radius: 24px; }
    .crm-strip,
    .pipeline-panel-header,
  .lead-modal-header,
    .pipeline-toolbar { flex-direction: column; align-items: stretch; }
  .crm-strip-actions,
  .lead-itinerary-modal-section-head,
  .lead-itinerary-modal-actions,
  .quote-template-item-top,
  .quote-template-item-meta,
  .quote-template-item-actions,
  .quote-builder-card-head,
  .quote-builder-block-head,
  .quote-builder-actions,
  .quote-builder-repeat-top,
  .quote-builder-repeat-actions { flex-direction: column; align-items: stretch; }
  .lead-itinerary-modal-body { grid-template-columns: 1fr; }
  .crm-strip-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .lead-filter-grid,
  .lead-quick-filter-bar,
  .lead-segment-grid,
  .lead-advanced-filter-grid { grid-template-columns: 1fr 1fr; }
  .crm-filter-summary { justify-content: flex-start; }
  .pipeline-toolbar-group-end { justify-content: flex-start; }
  .lead-filter-topbar,
  .lead-topbar-actions,
  .lead-workspace-summary-row,
  .lead-group-card-header { flex-direction: column; align-items: stretch; }
  .lead-filter-menu-row { align-items: stretch; }
  .lead-filter-menu-anchor,
  .lead-filter-menu-button { width: 100%; }
  .lead-filter-dropdown {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 8px;
  }
  .lead-filter-preset-grid,
  .lead-default-view-grid { grid-template-columns: 1fr 1fr; }
  .lead-save-view-form { grid-template-columns: 1fr; }
  .assistant-widget {
    right: 18px;
    bottom: 18px;
  }
  .assistant-popup {
    right: 18px;
    bottom: 92px;
    width: min(420px, calc(100vw - 24px));
  }
}

@media (max-width: 680px) {
  .app-shell { padding: 14px; gap: 16px; }
  .stats-grid, .content-grid, .tool-grid, .topbar-actions, .form-grid, .user-management-grid, .checkbox-grid, .lead-layout, .lead-overview-grid, .lead-form-grid, .detail-grid, .lead-filter-grid { grid-template-columns: 1fr; }
  .lead-popup-card-grid { grid-template-columns: 1fr; }
  .lead-record-card-grid, .lead-record-section-grid { grid-template-columns: 1fr; }
  .lead-record-section-span-2 { grid-column: auto; }
  .lead-record-other-contact-row { grid-template-columns: 1fr; }
  .lead-detail-core-work,
  .lead-detail-work-card-grid { grid-template-columns: 1fr; }
  .topbar-actions { display: grid; width: 100%; }
  .sidebar, .panel, .hero-panel, .login-showcase, .login-card { border-radius: 24px; }
  .login-showcase, .login-card { padding: 24px; }
  .pipeline-board { grid-template-columns: 1fr; }
  .pipeline-column { height: 560px; }
  .view-toggle { grid-auto-flow: row; width: 100%; }
  .view-toggle-button { width: 100%; min-width: 0; }
  .panel-header-stack-mobile { flex-direction: column; align-items: flex-start; }
  .lead-drawer-header, .lead-drawer-header-actions { flex-direction: column; align-items: flex-start; }
  .lead-card-footer { gap: 10px; }
  .crm-strip-metrics,
  .lead-filter-grid,
  .lead-form-grid,
  .lead-quick-filter-bar,
  .lead-segment-grid,
  .lead-advanced-filter-grid { grid-template-columns: 1fr; }
    .lead-filter-preset-grid,
    .lead-default-view-grid,
    #leadPipelineSection.lead-workspace-priority .lead-filter-dropdown .lead-quick-filter-bar {
      grid-template-columns: 1fr;
    }
    .lead-workspace-shell {
      position: static;
    }
    .lead-smart-filter-chips {
      flex-wrap: nowrap;
      overflow-x: auto;
      padding-bottom: 4px;
    }
    .lead-smart-chip {
      flex: 0 0 auto;
    }
    .lead-itinerary-modal {
      width: min(100vw - 18px, 100%);
      max-height: calc(100vh - 18px);
      padding: 18px;
      border-radius: 24px;
    }
    .pipeline-board { grid-template-columns: repeat(6, minmax(240px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
    .pipeline-column { min-width: 240px; }
    .lead-group-card-list { grid-template-columns: 1fr; }
    .detail-action-row { flex-direction: column; }
  .assistant-widget {
    right: 12px;
    bottom: 12px;
  }
  .assistant-launcher {
    padding-right: 16px;
  }
  .assistant-popup {
    right: 12px;
    left: 12px;
    bottom: 84px;
    width: auto;
    max-height: calc(100vh - 108px);
  }
  .assistant-popup-header {
    cursor: default;
  }
  .assistant-popup-body {
    padding: 14px;
  }
  .chat-messages {
    min-height: 220px;
    max-height: 280px;
  }
}

:root {
  --surface: rgba(255, 255, 255, 0.9);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.2);
  --line-strong: rgba(148, 163, 184, 0.34);
  --blue: #0f172a;
  --cyan: #ea580c;
  --green: #f97316;
  --amber: #fb923c;
  --red: #dc2626;
  --brand-orange: #fb923c;
  --brand-red: #dc2626;
  --brand-rose: #ef4444;
  --brand-navy: #0f172a;
  --brand-slate: #1e293b;
  --brand-bg: #f8fafc;
  --brand-glow: rgba(251, 146, 60, 0.24);
  --shadow-lg: 0 30px 70px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 18px 42px rgba(15, 23, 42, 0.08);
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 146, 60, 0.18), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(220, 38, 38, 0.12), transparent 24%),
    linear-gradient(180deg, #fff8f4 0%, var(--brand-bg) 32%, #f8fafc 100%);
}

.brand-block h1,
.topbar h2,
.hero-copy h3,
.panel-header h3,
.sidebar-card h2,
.login-card h2,
.login-showcase h1,
.pipeline-panel-header h3,
.assistant-popup-title h3 {
  font-family: "Poppins", sans-serif;
}

.app-shell {
  gap: 28px;
  padding: 24px;
}

.sidebar {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(251, 146, 60, 0.2), transparent 26%),
    linear-gradient(180deg, #10182d 0%, #0f172a 52%, #172554 100%);
  box-shadow: 0 36px 75px rgba(15, 23, 42, 0.3);
}

.brand-block {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo,
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 34px rgba(220, 38, 38, 0.22);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.brand-logo-icon img {
  object-fit: cover;
  object-position: center top;
  transform: scale(1.72);
  background: transparent;
}

.brand-logo-lockup img {
  object-fit: contain;
  object-position: center;
  transform: scale(1.08);
  background: transparent;
}

.brand-logo-fallback {
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-logo-small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.brand-logo-large {
  width: 86px;
  height: 86px;
  border-radius: 24px;
}

.nav-item {
  position: relative;
  color: rgba(241, 245, 249, 0.78);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-group .nav-item {
  margin: 0;
}

.nav-item-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-item-stack {
  display: grid;
  gap: 4px;
}

.nav-item-helper {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(241, 245, 249, 0.62);
}

.nav-item.nav-item-nested {
  margin-left: 12px;
}

.nav-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-item:hover,
.nav-item.active {
  transform: translateX(4px);
  color: #fff;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.22), rgba(220, 38, 38, 0.22));
  border-color: rgba(251, 146, 60, 0.28);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.16);
}

.sidebar-card,
.hero-panel,
.panel,
.login-card,
.login-showcase,
.stat-card,
.tool-card,
.activity-item,
.users-panel,
.permissions-panel,
.demo-card,
.crm-strip,
.lead-card,
.pipeline-column,
.lead-modal,
.lead-drawer,
.assistant-popup {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
}

.sidebar-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(12px);
}

.topbar {
  padding: 14px 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.topbar-brand,
.topbar-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-actions {
  align-items: center;
}

.workspace-back-button {
  min-height: 42px;
  padding: 0 15px;
  white-space: nowrap;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--brand-navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 1);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 146, 60, 0.45);
  box-shadow: 0 14px 28px rgba(251, 146, 60, 0.18);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.topbar-profile {
  padding: 8px 10px 8px 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 1);
}

.topbar-profile strong,
.topbar-profile span {
  display: block;
}

.topbar-profile span {
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

.hero-panel {
  position: relative;
  padding: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 146, 60, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.96));
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -36px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.18), transparent 66%);
  pointer-events: none;
}

.hero-badge {
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-slate));
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.stat-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
}

.stat-card::after,
.accent-blue::after,
.accent-amber::after,
.accent-green::after,
.accent-red::after {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
}

.pill,
.toolbar-chip,
.pipeline-column-count {
  color: #b45309;
  background: rgba(251, 146, 60, 0.12);
}

.toolbar-chip-soft {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
}

textarea,
input,
select {
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: rgba(255, 255, 255, 0.96);
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.12);
}

.primary-button,
.ghost-button,
.widget-icon-button {
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  box-shadow:
    0 14px 28px rgba(220, 38, 38, 0.18),
    0 0 0 0 rgba(251, 146, 60, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow:
    0 18px 32px rgba(220, 38, 38, 0.24),
    0 0 26px rgba(251, 146, 60, 0.22);
}

.ghost-button {
  color: var(--brand-navy);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.92);
}

.ghost-button:hover {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.tool-card:hover,
.activity-item:hover,
.lead-card:hover,
.crm-mini-stat:hover {
  border-color: rgba(251, 146, 60, 0.26);
  box-shadow: 0 18px 36px rgba(251, 146, 60, 0.12);
}

.lead-card.selected,
.lead-table tbody tr.selected,
.checkbox-item:has(input:checked),
.status-chip.status-followup {
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.24), 0 0 28px rgba(251, 146, 60, 0.14);
}

.lead-card.selected,
.lead-table tbody tr.selected {
  border-color: rgba(251, 146, 60, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 247, 237, 0.96));
}

.assistant-intro,
.deal-preview,
.assistant-popup-header {
  background: linear-gradient(135deg, #111827, var(--brand-navy) 48%, #7c2d12 100%);
}

.assistant-launcher {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  box-shadow:
    0 24px 48px rgba(220, 38, 38, 0.22),
    0 0 36px rgba(251, 146, 60, 0.24);
}

.assistant-launcher-icon,
.assistant-popup-icon {
  background: rgba(255, 255, 255, 0.18);
}

.assistant-popup {
  border: 1px solid rgba(255, 237, 213, 0.88);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.2);
}

.chat-bubble.user {
  color: #7c2d12;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.16), rgba(220, 38, 38, 0.12));
  border-color: rgba(251, 146, 60, 0.16);
}

.chat-bubble.assistant {
  background: linear-gradient(180deg, #ffffff, #fff7ed);
  border-color: rgba(251, 146, 60, 0.12);
}

.pipeline-column {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.pipeline-column-meter span,
.pipeline-dropzone.drag-target,
.view-toggle-button.active {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
}

.pipeline-dropzone.drag-target {
  outline-color: rgba(251, 146, 60, 0.34);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.12);
}

.crm-mini-stat,
.detail-grid div,
.note-item,
.timeline-item,
.summary-tile,
.pipeline-empty,
.tool-card,
.activity-item,
.user-card {
  background: linear-gradient(180deg, #ffffff, #fffaf7);
}

.status-new {
  background: rgba(251, 146, 60, 0.16);
  color: #c2410c;
}

.status-contacted {
  background: rgba(249, 115, 22, 0.16);
  color: #c2410c;
}

.status-followup {
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
}

.status-interested,
.status-booked {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.status-lost {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.lead-card-avatar,
.activity-dot {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  color: #fff;
  box-shadow: 0 0 0 6px rgba(251, 146, 60, 0.12);
}

.login-body {
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 146, 60, 0.16), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(220, 38, 38, 0.12), transparent 24%),
    linear-gradient(180deg, #fff8f4 0%, #f8fafc 40%, #f8fafc 100%);
}

.login-showcase {
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at top, rgba(251, 146, 60, 0.22), transparent 28%),
    linear-gradient(160deg, #111827 0%, #0f172a 58%, #7c2d12 100%);
}

.login-brand {
  margin-bottom: 12px;
}

.login-subtitle {
  font-size: 1.06rem;
  color: rgba(255, 255, 255, 0.86);
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
}

@media (max-width: 980px) {
  .topbar-profile {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .topbar-brand,
  .topbar-profile {
    width: 100%;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .brand-logo-large {
    width: 74px;
    height: 74px;
  }
}

.reports-workspace,
.warning-reports-workspace,
.assignment-rules-workspace,
.reports-kpi-grid,
.warning-kpi-grid,
.reports-layout,
.warning-layout,
.reports-layout-bottom,
.reports-filter-grid,
.reports-activity-grid,
.reports-activity-feed,
.reports-stage-chart,
.reports-trend-chart,
.reports-insights-list {
  display: grid;
  gap: 18px;
}

.reports-filter-grid,
.reports-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reports-inline-checkbox {
  display: grid;
  align-content: end;
}

.reports-inline-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 12px;
}

.warning-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.assignment-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.assignment-rules-panel,
.assignment-hero-panel,
.assignment-rule-modal {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.88));
}

.vendor-hero-panel,
.vendor-create-panel,
.vendor-service-create-panel,
.vendor-filter-panel,
.vendor-table-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.9));
}

#vendorSection {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vendor-unified-shell-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.92));
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.vendor-unified-shell-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vendor-unified-switch-button {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  white-space: nowrap;
}

.vendor-unified-mode-pill {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.24);
}

.vendor-unified-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.vendor-unified-tabs .ghost-button {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  font-weight: 600;
}

.vendor-unified-tabs .ghost-button.is-active {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(255, 237, 213, 0.92);
  color: #c2410c;
  box-shadow: 0 10px 18px rgba(234, 88, 12, 0.12);
}

.vendor-unified-tabs .ghost-button.is-disabled,
.vendor-unified-tabs .ghost-button[aria-disabled="true"] {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

#vendorUnifiedStatus {
  margin-top: 4px;
}

#vendorSection #vendorUnifiedDirectoryPane {
  display: grid;
  gap: 18px;
}

#vendorSection .vendor-unified-master-pane {
  margin-top: 0;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-unified-shell-panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 237, 0.9));
  border-color: rgba(251, 146, 60, 0.24);
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-unified-tabs .ghost-button.is-active {
  border-color: rgba(249, 115, 22, 0.46);
  background: rgba(255, 237, 213, 0.94);
  color: #c2410c;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-unified-switch-button {
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(255, 247, 237, 0.94);
  color: #c2410c;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-hero-panel {
  border-color: rgba(125, 211, 252, 0.34);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-unified-shell-panel {
  background: linear-gradient(152deg, rgba(239, 246, 255, 0.95), rgba(226, 232, 240, 0.92));
  border-color: rgba(59, 130, 246, 0.24);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-unified-mode-pill {
  background: rgba(30, 64, 175, 0.12);
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.22);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-unified-tabs .ghost-button.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.14);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-unified-switch-button {
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(239, 246, 255, 0.94);
  color: #1d4ed8;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-unified-master-pane .master-data-hero {
  background: linear-gradient(170deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.96));
  border-color: rgba(148, 163, 184, 0.24);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-unified-master-pane .master-data-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-unified-master-pane .master-data-panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  border-radius: 16px;
  padding: 16px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 10px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-panel-toolbar .ghost-button {
  border-radius: 999px;
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(239, 246, 255, 0.86);
  color: #1d4ed8;
  font-weight: 600;
  padding: 7px 12px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .destination-master-toolbar {
  display: none;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-view-switcher {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-view-switcher .ghost-button {
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 16px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-view-switcher .ghost-button.is-active {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(96, 165, 250, 0.6);
  color: #1d4ed8;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-subview-panel {
  display: grid;
  gap: 12px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-subview-header h5 {
  margin: 4px 0 0;
  font-size: 1rem;
  color: #0f172a;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-view {
  display: grid;
  gap: 14px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-search {
  display: grid;
  gap: 6px;
  margin: 0;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-search span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-search input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 14px;
  font-size: 0.95rem;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-toolbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-toolbar-actions .ghost-button {
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 14px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-count,
#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-page-size {
  white-space: nowrap;
  font-weight: 700;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table-shell {
  overflow-x: auto;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table th,
#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  text-align: left;
  vertical-align: middle;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table th {
  background: rgba(241, 245, 249, 0.92);
  color: #64748b;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table td {
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.35;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.55);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.72);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table tbody tr[data-vendor-master-row="true"] {
  cursor: pointer;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table tbody tr.is-selected {
  background: rgba(219, 234, 254, 0.72);
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.7);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table tbody tr[data-vendor-master-row="true"]:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.38);
  outline-offset: -2px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table td strong {
  display: block;
  font-weight: 800;
  font-size: 0.96rem;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table td span {
  display: inline-block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.83rem;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-cell-stack {
  display: grid;
  gap: 2px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 520px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-actions .ghost-button {
  min-height: 34px;
  border-radius: 10px;
  padding: 6px 11px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-muted,
#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-empty {
  color: #64748b;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-location-master {
  min-width: 980px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-location-master td:nth-child(1) {
  min-width: 240px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-location-master td:nth-child(2),
#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-location-master td:nth-child(3) {
  min-width: 180px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-destination-master td:nth-child(1),
#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-package-master td:nth-child(1) {
  min-width: 220px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-destination-master td:nth-child(3),
#vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table.is-package-master td:nth-child(3) {
  min-width: 280px;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-master-config-form {
  display: none;
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-master-config-form.is-open {
  display: grid;
  position: fixed;
  top: 86px;
  right: 22px;
  width: min(540px, calc(100vw - 28px));
  max-height: calc(100vh - 112px);
  overflow: auto;
  z-index: 46;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.96));
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-master-config-form .form-actions {
  position: sticky;
  bottom: -16px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.98) 35%);
}

#vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-master-config-form .form-actions .ghost-button[data-vendor-master-form-close] {
  margin-left: 8px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] #vendorUnifiedDirectoryPane {
  gap: 14px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-hero-panel,
#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel,
#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table-panel {
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-hero-panel .panel-header {
  margin-bottom: 10px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .assignment-metrics-grid {
  gap: 10px;
  margin-top: 12px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .crm-mini-stat {
  border-radius: 14px;
  padding: 12px 14px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .lead-filter-grid {
  grid-template-columns: minmax(280px, 2.1fr) repeat(3, minmax(150px, 1fr)) auto auto;
  gap: 10px 12px;
  align-items: end;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .field span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel input,
#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel select {
  min-height: 42px;
  border-radius: 12px;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  caret-color: #0f172a;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel input::placeholder {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel input[type="search"]::-webkit-search-cancel-button {
  filter: none;
  opacity: 1;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .crm-filter-summary {
  align-items: end;
  justify-content: flex-end;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .crm-filter-summary .ghost-button {
  white-space: nowrap;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel #vendorStatusMessage {
  margin-top: 8px;
  font-size: 0.9rem;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table {
  min-width: 780px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table thead th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 14px;
  position: sticky;
  top: 0;
  z-index: 4;
  color: #5f718f;
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(235, 243, 252, 0.96));
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.34);
  box-shadow:
    inset 0 -1px 0 rgba(148, 163, 184, 0.28),
    0 5px 14px rgba(15, 23, 42, 0.08);
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody td {
  padding: 12px 14px;
  font-size: 0.95rem;
  vertical-align: middle;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody tr {
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
  cursor: pointer;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.98);
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody tr:nth-child(even) {
  background: rgba(248, 251, 255, 0.96);
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody tr:hover {
  background: rgba(219, 234, 254, 0.62);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.14), inset 0 -1px 0 rgba(148, 163, 184, 0.14);
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody tr.is-selected {
  background: rgba(191, 219, 254, 0.46);
  box-shadow: inset 2px 0 0 rgba(37, 99, 235, 0.76), inset 0 1px 0 rgba(148, 163, 184, 0.14), inset 0 -1px 0 rgba(148, 163, 184, 0.14);
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody tr:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.46);
  outline-offset: -2px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-name-cell {
  gap: 2px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-name-cell strong {
  font-size: 1.04rem;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-name-cell span {
  font-size: 0.8rem;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table tbody td:last-child {
  white-space: nowrap;
}

.vendor-action-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vendor-icon-action {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 11px;
  padding: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
}

.vendor-icon-action svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: #334155;
}

.vendor-icon-action:hover svg {
  fill: #0f172a;
}

.vendor-icon-action:hover,
.vendor-icon-action:focus-visible {
  border-color: rgba(59, 130, 246, 0.32);
  background: rgba(239, 246, 255, 0.96);
  color: #0f172a;
}

.vendor-icon-action:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.4);
  outline-offset: 2px;
}

#vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-table .status-chip {
  font-size: 0.74rem;
  padding: 4px 9px;
}

@media (max-width: 1320px) {
  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .lead-filter-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .crm-filter-summary {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .vendor-unified-shell-pills {
    justify-content: flex-start;
  }

  .vendor-unified-switch-button {
    width: fit-content;
  }

  .vendor-unified-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .vendor-unified-tabs .ghost-button {
    flex: 0 0 auto;
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .panel-header.panel-header-stack-mobile {
    gap: 12px;
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-hero-actions .primary-button {
    min-width: 180px;
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .assignment-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .lead-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .crm-filter-summary {
    justify-content: flex-start;
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-filter-panel .crm-filter-summary .ghost-button {
    width: fit-content;
  }

  #vendorSection[data-vendor-unified-mode="vendor-config"] .vendor-master-config-form.is-open {
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 84px);
    top: 70px;
    border-radius: 16px;
  }

  #vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  #vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-toolbar-actions {
    justify-content: flex-start;
  }

  #vendorSection[data-vendor-unified-mode="vendor-config"] .master-list-table {
    min-width: 760px;
  }
}

@media (max-width: 640px) {
  #vendorSection[data-vendor-unified-mode="vendor-ops"] .assignment-metrics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #vendorSection[data-vendor-unified-mode="vendor-ops"] .vendor-hero-actions .primary-button {
    width: 100%;
  }
}

#vendorSection .vendor-hero-panel {
  order: 0;
}

#vendorSection .vendor-filter-panel {
  order: 1;
}

#vendorSection .vendor-table-panel {
  order: 2;
}

#vendorSection .vendor-detail-panel {
  order: 3;
}

#vendorSection .vendor-create-panel {
  order: 4;
}

/* Service Master catalog workspace keeps the unified module switcher and
   master summary visible so users can move between related masters. */

#vendorMastersSection .service-master-workspace {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 20px;
  overflow: visible;
}

#vendorMastersSection .service-master-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

#vendorMastersSection .service-master-workspace-header h3 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

#vendorMastersSection .service-master-workspace-header .primary-button {
  min-height: 44px;
  padding-inline: 20px;
  white-space: nowrap;
}

#vendorMastersSection .service-catalog-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#vendorMastersSection .service-catalog-summary-card {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 14px;
  background: #fff;
  color: #475569;
  text-align: left;
  cursor: pointer;
}

#vendorMastersSection .service-catalog-summary-card strong {
  color: #0f172a;
  font-size: 1.45rem;
}

#vendorMastersSection .service-catalog-summary-card:hover,
#vendorMastersSection .service-catalog-summary-card.is-active {
  border-color: rgba(249, 115, 22, 0.6);
  background: rgba(255, 247, 237, 0.78);
  box-shadow: inset 0 -3px 0 rgba(249, 115, 22, 0.72);
}

#vendorMastersSection .service-master-view-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.78);
}

#vendorMastersSection .service-master-view-tabs button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #475569;
  font-weight: 750;
  cursor: pointer;
}

#vendorMastersSection .service-master-view-tabs button.is-active {
  border-bottom-color: #f97316;
  color: #c2410c;
}

#vendorMastersSection .service-master-view-panel {
  min-width: 0;
}

#vendorMastersSection [data-service-master-view-panel="types"],
#vendorMastersSection [data-service-master-view-panel="routes"] {
  display: grid;
  gap: 14px;
}

#vendorMastersSection .service-catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
  gap: 16px;
  align-items: start;
}

#vendorMastersSection .service-catalog-layout:not(:has(.service-catalog-detail-drawer)) {
  grid-template-columns: minmax(0, 1fr);
}

#vendorMastersSection .service-catalog-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

#vendorMastersSection .service-catalog-library-map {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(248, 250, 252, 0.96));
  color: #334155;
}

#vendorMastersSection .service-catalog-library-map div {
  display: grid;
  gap: 3px;
}

#vendorMastersSection .service-catalog-library-map strong {
  color: #0f172a;
}

#vendorMastersSection .service-catalog-library-map span {
  font-size: 0.86rem;
  line-height: 1.45;
}

#vendorMastersSection .service-catalog-library-map .ghost-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 760px) {
  #vendorMastersSection .service-catalog-library-map {
    align-items: stretch;
    flex-direction: column;
  }
}

#vendorMastersSection .service-catalog-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#vendorMastersSection .service-catalog-filters input,
#vendorMastersSection .service-catalog-filters select {
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: 9px 12px;
}

#vendorMastersSection .service-catalog-search {
  flex: 2 1 280px;
  min-width: 240px;
}

#vendorMastersSection .service-catalog-search input {
  width: 100%;
}

#vendorMastersSection .service-catalog-filters > select {
  flex: 1 1 135px;
  width: auto;
  min-width: 125px;
  max-width: 180px;
}

#vendorMastersSection .service-catalog-filters > .ghost-button {
  flex: 0 0 auto;
  min-height: 44px;
}

#vendorMastersSection .service-catalog-bulk-bar {
  position: fixed;
  left: calc(50% + 110px);
  bottom: 18px;
  width: min(1040px, calc(100vw - 320px));
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid rgba(96, 165, 250, 0.55);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.98);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1100px) {
  #vendorMastersSection .service-catalog-bulk-bar {
    left: 50%;
    width: calc(100vw - 32px);
    bottom: 12px;
  }
}

#vendorMastersSection .service-catalog-bulk-bar > strong {
  color: #1d4ed8;
  margin-right: auto;
}

#vendorMastersSection .service-catalog-bulk-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

#vendorMastersSection .service-catalog-bulk-actions .ghost-button,
#vendorMastersSection .service-catalog-bulk-bar > .ghost-button {
  min-height: 38px;
  padding: 7px 11px;
}

#vendorMastersSection .service-catalog-bulk-actions .is-emphasis {
  border-color: rgba(249, 115, 22, 0.6);
  color: #c2410c;
  background: #fff7ed;
}

#vendorMastersSection .service-catalog-table-shell {
  overflow: auto;
  max-height: min(64vh, 720px);
}

#vendorMastersSection .master-list-table.is-service-catalog-master {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#vendorMastersSection .master-list-table.is-service-catalog-master th,
#vendorMastersSection .master-list-table.is-service-catalog-master td {
  padding: 10px 11px;
}

#vendorMastersSection .master-list-table.is-service-catalog-master th:first-child,
#vendorMastersSection .master-list-table.is-service-catalog-master td:first-child {
  width: 40px;
  text-align: center;
}

#vendorMastersSection .master-list-table.is-service-catalog-master th:nth-child(2) { width: 20%; }
#vendorMastersSection .master-list-table.is-service-catalog-master th:nth-child(3) { width: 9%; }
#vendorMastersSection .master-list-table.is-service-catalog-master th:nth-child(4) { width: 17%; }
#vendorMastersSection .master-list-table.is-service-catalog-master th:nth-child(5) { width: 11%; }
#vendorMastersSection .master-list-table.is-service-catalog-master th:nth-child(6) { width: 12%; }
#vendorMastersSection .master-list-table.is-service-catalog-master th:nth-child(7) { width: 11%; }
#vendorMastersSection .master-list-table.is-service-catalog-master th:last-child { width: 48px; }

#vendorMastersSection .master-list-table.is-service-catalog-master th:last-child,
#vendorMastersSection .master-list-table.is-service-catalog-master td:last-child {
  padding-right: 6px;
  padding-left: 6px;
}

#vendorMastersSection .master-list-table.is-service-catalog-master td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#vendorMastersSection .master-list-table.is-service-catalog-master td:last-child {
  overflow: visible;
}

#vendorMastersSection .master-list-table.is-service-catalog-master .master-list-muted,
#vendorMastersSection .master-list-table.is-service-catalog-master .master-list-cell-stack,
#vendorMastersSection .master-list-table.is-service-catalog-master .master-list-cell-stack > * {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#vendorMastersSection .master-list-table.is-service-catalog-master tbody tr {
  cursor: pointer;
}

#vendorMastersSection .master-list-table.is-service-catalog-master tbody tr.is-selected {
  background: rgba(219, 234, 254, 0.72);
}

#vendorMastersSection .master-list-table.is-service-catalog-master tbody tr.is-viewed {
  box-shadow: inset 3px 0 0 #f97316;
}

#vendorMastersSection .service-catalog-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 800;
}

#vendorMastersSection .service-catalog-status-pill.is-active {
  background: #dcfce7;
  color: #166534;
}

#vendorMastersSection .service-catalog-status-pill.is-ops_setup_pending {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

#vendorMastersSection .service-catalog-status-pill.is-inactive {
  background: #ffedd5;
  color: #9a3412;
}

#vendorMastersSection .service-catalog-status-pill.is-archived {
  background: #f3e8ff;
  color: #6b21a8;
}

#vendorMastersSection .service-catalog-row-menu {
  position: relative;
}

#vendorMastersSection .service-catalog-row-menu > summary {
  width: 36px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 9px;
  color: #334155;
  cursor: pointer;
  list-style: none;
  letter-spacing: 0.08em;
}

#vendorMastersSection .service-catalog-row-menu > summary::-webkit-details-marker {
  display: none;
}

#vendorMastersSection .service-catalog-row-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 20;
  width: 170px;
  display: grid;
  padding: 6px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

#vendorMastersSection .service-catalog-row-menu-popover button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  padding: 7px 10px;
  cursor: pointer;
}

#vendorMastersSection .service-catalog-row-menu-popover button:hover,
#vendorMastersSection .service-catalog-row-menu-popover button:focus-visible {
  background: #f1f5f9;
}

#vendorMastersSection .service-catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
}

#vendorMastersSection .service-catalog-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

#vendorMastersSection .service-catalog-detail-drawer {
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
}

#vendorMastersSection .service-catalog-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#vendorMastersSection .service-catalog-detail-head h3 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 1.15rem;
}

#vendorMastersSection .service-catalog-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

#vendorMastersSection .service-catalog-detail-list > div,
#vendorMastersSection .service-catalog-linked-rates > div {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

#vendorMastersSection .service-catalog-detail-list dt,
#vendorMastersSection .service-catalog-linked-rates span {
  color: #64748b;
  font-size: 0.77rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#vendorMastersSection .service-catalog-detail-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
  overflow-wrap: anywhere;
}

#vendorMastersSection .service-catalog-linked-rates h4 {
  margin: 0 0 4px;
}

#vendorMastersSection .service-catalog-linked-rates > div {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

#vendorMastersSection .service-catalog-detail-actions {
  display: grid;
  gap: 8px;
}

.service-catalog-detail-modal-open {
  overflow: hidden;
}

#vendorMastersSection .service-catalog-detail-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

#vendorMastersSection .service-catalog-detail-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 151;
  width: min(1240px, calc(100vw - 48px));
  max-height: calc(100dvh - 40px);
  transform: translate(-50%, -50%);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 20px;
  background: #f8fafc;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34);
}

#vendorMastersSection .service-catalog-detail-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

#vendorMastersSection .service-catalog-detail-modal-head h3 {
  margin: 3px 0 2px;
  color: #0f172a;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

#vendorMastersSection .service-catalog-detail-modal-head p:last-child {
  margin: 0;
  color: #64748b;
}

#vendorMastersSection .service-catalog-detail-modal-body {
  min-width: 0;
  overflow: auto;
  padding: 18px 22px 24px;
}

#vendorMastersSection .service-catalog-detail-modal .vendor-service-row-detail {
  margin: 0;
  width: 100%;
  min-width: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

#vendorMastersSection .service-catalog-detail-modal .vendor-service-row-detail-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

#vendorMastersSection .service-catalog-detail-modal .vendor-service-row-detail-grid {
  min-width: 260px;
}

#vendorMastersSection .service-catalog-detail-modal [data-vendor-service-action="close-details"] {
  display: none;
}

#vendorMastersSection .service-catalog-detail-modal .vendor-service-detail-section {
  background: #fff;
}

#vendorMastersSection .service-catalog-detail-modal .vendor-service-detail-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#vendorMastersSection .service-catalog-detail-modal .transport-route-builder {
  grid-column: 1 / -1;
}

#vendorMastersSection .service-catalog-detail-modal .transport-route-stop-row {
  grid-template-columns: 82px minmax(160px, 0.72fr) minmax(240px, 1fr) minmax(130px, 160px) auto;
}

.vendor-service-bulk-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: #0f172a;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
}

.vendor-service-bulk-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}

.vendor-service-bulk-dialog form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.vendor-service-bulk-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.vendor-service-bulk-dialog-head h3 {
  margin: 4px 0 0;
}

@media (max-width: 1500px) {
  #vendorMastersSection .service-catalog-layout {
    display: block;
  }

  #vendorMastersSection .service-catalog-detail-drawer {
    position: fixed;
    top: 82px;
    right: 18px;
    bottom: 18px;
    z-index: 42;
    width: min(440px, calc(100vw - 36px));
    max-height: none;
  }

  #vendorMastersSection .master-list-table.is-service-catalog-master .master-list-cell-stack > span {
    display: none;
  }
}

@media (max-width: 760px) {
  #vendorMastersSection .service-master-workspace {
    padding: 14px;
  }

  #vendorMastersSection .service-master-workspace-header,
  #vendorMastersSection .service-catalog-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  #vendorMastersSection .service-master-workspace-header .primary-button {
    width: 100%;
  }

  #vendorMastersSection .service-catalog-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #vendorMastersSection .service-master-view-tabs {
    overflow-x: auto;
  }

  #vendorMastersSection .service-master-view-tabs button {
    flex: 0 0 auto;
  }

  #vendorMastersSection .service-catalog-filters > *,
  #vendorMastersSection .service-catalog-search {
    flex: 1 1 100%;
    width: 100%;
  }

  #vendorMastersSection .service-catalog-bulk-actions,
  #vendorMastersSection .service-catalog-bulk-actions .ghost-button {
    width: 100%;
  }

  #vendorMastersSection .service-catalog-detail-drawer {
    inset: 64px 8px 8px;
    width: auto;
  }

  #vendorMastersSection .service-catalog-detail-modal {
    inset: 8px;
    width: auto;
    max-height: none;
    transform: none;
    border-radius: 16px;
  }

  #vendorMastersSection .service-catalog-detail-modal-head {
    padding: 14px 16px;
  }

  #vendorMastersSection .service-catalog-detail-modal-body {
    padding: 14px;
  }

  #vendorMastersSection .service-catalog-detail-modal .vendor-service-row-detail-head,
  #vendorMastersSection .service-catalog-detail-modal .vendor-service-row-detail-grid,
  #vendorMastersSection .service-catalog-detail-modal .vendor-service-detail-form-grid,
  #vendorMastersSection .service-catalog-detail-modal .transport-route-stop-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #vendorMastersSection .service-catalog-detail-modal .vendor-service-row-detail-grid {
    min-width: 0;
  }
}

.vendor-master-form-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.vendor-create-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vendor-create-step-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.vendor-create-step-tabs .ghost-button {
  border-radius: 999px;
  padding: 8px 14px;
}

.vendor-create-step-tabs .ghost-button.is-active {
  border-color: rgba(36, 86, 214, 0.45);
  background: rgba(36, 86, 214, 0.09);
  color: #1d4ed8;
  font-weight: 700;
}

.vendor-service-create-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#vendorServiceCreatePanel.is-transport-builder {
  width: min(1320px, calc(100vw - 24px));
}

.vendor-service-transport-stepper {
  position: sticky;
  top: 88px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 4px 0 18px;
  padding: 14px 18px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.vendor-service-transport-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  text-align: left;
}

.vendor-service-transport-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  right: 12px;
  left: 52px;
  height: 2px;
  background: #dbe4ea;
}

.vendor-service-transport-step > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 2px solid #dbe4ea;
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
}

.vendor-service-transport-step > strong {
  position: relative;
  z-index: 1;
  padding-right: 14px;
  background: #fff;
  white-space: nowrap;
}

.vendor-service-transport-step.is-active {
  color: #0f766e;
}

.vendor-service-transport-step.is-active > span,
.vendor-service-transport-step.is-complete > span {
  border-color: #0f8b83;
  background: #0f8b83;
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 139, 131, 0.24);
}

.vendor-service-transport-step.is-complete::after {
  background: #0f8b83;
}

.vendor-service-selection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.vendor-service-selection-clear {
  min-width: 136px;
  white-space: nowrap;
}

.vendor-service-area-field {
  border: 1px dashed rgba(37, 99, 235, 0.2);
  border-radius: 18px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.74);
}

.vendor-service-area-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vendor-service-area-head > span {
  font-weight: 800;
  color: var(--text);
}

.vendor-service-area-head > small {
  color: var(--muted);
  font-weight: 650;
  text-align: right;
}

.vendor-service-area-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vendor-service-create-hotel-section {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.9));
}

.vendor-service-create-hotel-head {
  margin-bottom: 12px;
}

.vendor-service-create-hotel-head h4 {
  margin: 4px 0 6px;
  font-size: 1rem;
}

.vendor-service-create-hotel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vendor-service-transport-builder {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 22px;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(14, 165, 164, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(248, 253, 252, 0.98), rgba(236, 248, 247, 0.9));
}

.vendor-service-transport-builder-head,
.vendor-service-transport-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vendor-service-transport-builder-head h4 {
  margin: 4px 0 5px;
  font-size: 1.05rem;
}

.vendor-service-transport-builder-head p,
.vendor-service-transport-section-head small {
  margin: 0;
}

.vendor-service-transport-section-head > div {
  display: grid;
  gap: 3px;
}

.vendor-service-transport-route-basics {
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
}

.vendor-service-transport-day-rows,
.vendor-service-transport-variant-rows {
  display: grid;
  gap: 10px;
}

.vendor-service-transport-day-row,
.vendor-service-transport-variant-row {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.vendor-service-transport-day-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vendor-service-transport-variant-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vendor-service-transport-day-number,
.vendor-service-transport-variant-number {
  grid-column: 1 / -1;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: #e6f6f3;
  color: #0f766e;
  font-weight: 900;
}

.vendor-service-transport-day-number {
  grid-column: 1 / -1;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 14px;
}

.vendor-service-transport-day-row > *,
.vendor-service-transport-variant-row > *,
.vendor-service-transport-day-row .field,
.vendor-service-transport-variant-row .field {
  min-width: 0;
  max-width: 100%;
}

.vendor-service-transport-day-row input,
.vendor-service-transport-day-row select,
.vendor-service-transport-variant-row input,
.vendor-service-transport-variant-row select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.vendor-service-transport-day-sightseeing {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px dashed rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: rgba(240, 253, 250, 0.72);
}

.vendor-service-transport-day-sightseeing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vendor-service-transport-day-sightseeing-head > div {
  display: grid;
  gap: 3px;
}

.vendor-service-transport-day-sightseeing-head small {
  color: var(--muted);
}

.vendor-service-transport-day-sightseeing .search-select {
  width: 100%;
  min-width: 0;
}

.vendor-service-transport-day-sightseeing-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vendor-service-transport-day-sightseeing-suggestions .ghost-button {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #0f766e;
}

.vendor-service-transport-review {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 184, 166, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f0fdfa);
}

.vendor-service-transport-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.vendor-service-transport-review-head h4 {
  margin: 4px 0;
  font-size: 1.2rem;
}

.vendor-service-transport-review-head p {
  margin: 0;
  color: var(--muted);
}

.vendor-service-transport-review .pill.is-ready {
  background: #dcfce7;
  color: #166534;
}

.vendor-service-transport-review-route {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.vendor-service-transport-review-route > span,
.vendor-service-transport-review-vehicle span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.vendor-service-transport-review-route > strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.vendor-service-transport-review-vehicles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vendor-service-transport-review-vehicle {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.vendor-service-transport-review-vehicle > div {
  display: grid;
  gap: 3px;
}

.vendor-service-transport-review-vehicle dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.vendor-service-transport-review-vehicle dl > div {
  display: grid;
  gap: 2px;
}

.vendor-service-transport-review-vehicle dt {
  color: #64748b;
  font-size: 0.75rem;
}

.vendor-service-transport-review-vehicle dd {
  margin: 0;
  font-weight: 800;
}

.vendor-service-transport-ticket-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.86rem;
  font-weight: 650;
}

@media (max-width: 1120px) {
  .vendor-service-transport-day-row,
  .vendor-service-transport-variant-row,
  .vendor-service-transport-route-basics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .vendor-service-transport-stepper {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .vendor-service-transport-step::after {
    display: none;
  }

  .vendor-service-transport-step > strong {
    white-space: normal;
  }

  .vendor-service-transport-builder-head,
  .vendor-service-transport-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .vendor-service-transport-day-row,
  .vendor-service-transport-variant-row,
  .vendor-service-transport-route-basics {
    grid-template-columns: minmax(0, 1fr);
  }

  .vendor-service-transport-review-head {
    flex-direction: column;
  }

  .vendor-service-transport-review-vehicles,
  .vendor-service-transport-review-vehicle dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

.vendor-service-hotel-stack {
  display: grid;
  gap: 14px;
}

.vendor-service-hotel-block {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  overflow: visible;
}

.vendor-service-hotel-block[open] {
  box-shadow: 0 16px 36px rgba(148, 163, 184, 0.12);
  z-index: 3;
}

.vendor-service-hotel-block-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
}

.vendor-service-hotel-block-summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #64748b;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  font-weight: 700;
}

.vendor-service-hotel-block[open] .vendor-service-hotel-block-summary::after {
  content: "−";
}

.vendor-service-hotel-block-summary::-webkit-details-marker {
  display: none;
}

.vendor-service-hotel-block-summary span {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.vendor-service-hotel-block-summary small {
  display: block;
  margin-left: auto;
  max-width: 440px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: right;
}

.vendor-service-hotel-block-body {
  padding: 16px;
  overflow: visible;
}

.vendor-service-hotel-block .vendor-service-hotel-rate-cards,
.vendor-service-hotel-block .vendor-service-hotel-seasonal-slabs,
.vendor-service-hotel-block [data-hotel-seasonal-slabs="true"] {
  margin-top: 8px;
}

.vendor-service-hotel-block .checkbox-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
}

.vendor-service-hotel-block .checkbox-field span {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.vendor-service-hotel-block .checkbox-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #f97316;
  flex: 0 0 auto;
}

.vendor-service-hotel-seasonal-slabs {
  display: grid;
  gap: 10px;
}

.vendor-service-hotel-rate-cards {
  display: grid;
  gap: 12px;
}

.vendor-service-rate-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.9);
}

.vendor-service-rate-card-row.is-inactive {
  opacity: 0.7;
  background: rgba(241, 245, 249, 0.75);
}

.vendor-service-rate-card-action {
  align-self: end;
}

.vendor-service-amenities-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 8px;
}

.vendor-service-amenities-custom-row {
  margin-top: 8px;
  margin-bottom: 0;
}

.vendor-service-amenities-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
}

.vendor-service-amenities-empty {
  color: #64748b;
  font-size: 0.92rem;
}

.vendor-service-amenity-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: 999px;
  background: rgba(255, 237, 213, 0.9);
  color: #9a3412;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.vendor-service-amenity-chip:hover,
.vendor-service-amenity-chip:focus-visible {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(255, 237, 213, 1);
  transform: translateY(-1px);
}

.vendor-service-amenity-chip strong {
  font-size: 0.88rem;
  line-height: 1;
}

.vendor-service-amenities-picker .ghost-button {
  min-width: 88px;
}

.vendor-service-create-hotel-section .hotel-slab-row {
  margin-top: 8px;
}

@media (max-width: 1120px) {
  .vendor-service-rate-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vendor-service-hotel-block-summary {
    flex-direction: column;
  }

  .vendor-service-hotel-block-summary small {
    margin-left: 0;
    max-width: none;
    text-align: left;
  }
}

.vendor-create-panel .form-status.is-error {
  color: #ff8f8f;
  font-weight: 600;
}

.vendor-create-panel .form-status.is-success {
  color: #9ae6b4;
  font-weight: 600;
}

.vendor-create-panel .form-status.is-loading {
  color: #9bb9ff;
}

.vendor-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vendor-create-form-backdrop {
  position: fixed;
  inset: 0;
  z-index: 93;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.vendor-create-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 94;
  width: min(1400px, calc(100vw - 52px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.vendor-create-modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.vendor-service-create-panel .form-status.is-error {
  color: #ff8f8f;
  font-weight: 600;
}

.vendor-service-form-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
}

.vendor-service-draft-preview {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  background: #f8fbff;
  color: #172033;
}

.vendor-service-draft-preview h4 {
  margin: 2px 0 4px;
  font-size: 1rem;
}

.vendor-service-draft-preview p {
  margin: 0;
  color: #52627a;
}

.vendor-service-draft-preview-meta,
.vendor-service-draft-preview-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.vendor-service-draft-preview-meta span,
.vendor-service-draft-preview-stops span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

#vendorServiceCreatePanel.vendor-service-create-panel {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 121;
  width: min(1080px, calc(100vw - 72px));
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 0;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

/* Department-grouped role and permission control */
.permission-control-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #dbe5f2;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 107, 61, 0.08), transparent 26%),
    linear-gradient(145deg, #ffffff, #f8fbff);
}

.permission-control-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-control-summary > span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  color: #53657e;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.76rem;
}

.permission-control-summary strong {
  color: #14213b;
}

.permission-control-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(310px, 1.15fr) minmax(240px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.permission-control-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce6f2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(30, 52, 84, 0.06);
}

.permission-control-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.permission-control-card-head h5 {
  margin: 0 0 4px;
  color: #15213a;
  font-size: 0.94rem;
}

.permission-control-card-head p {
  margin: 0;
  font-size: 0.74rem;
}

.role-default-permission-list,
.permission-group-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.role-default-permission-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e5ebf4;
  border-radius: 12px;
  background: #f7f9fc;
}

.role-default-permission-row > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.role-default-permission-row strong,
.permission-option strong {
  color: #1a2943;
  font-size: 0.78rem;
  line-height: 1.25;
}

.role-default-permission-row small,
.permission-option small {
  color: #718198;
  font-size: 0.68rem;
  line-height: 1.3;
}

.permission-lock {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #e8f7ef;
  font-size: 0.72rem;
}

.permission-search-field {
  margin-bottom: 10px;
}

.permission-search-field input {
  min-height: 42px;
}

.permission-group {
  border: 1px solid #dce5f1;
  border-radius: 13px;
  background: #fbfcfe;
  overflow: hidden;
}

.permission-group > summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  color: #20304c;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 800;
}

.permission-group > summary::-webkit-details-marker {
  display: none;
}

.permission-group > summary::before {
  content: "+";
  color: #ff5c35;
  font-weight: 900;
}

.permission-group[open] > summary::before {
  content: "−";
}

.permission-group > summary span {
  flex: 1;
}

.permission-group > summary em {
  color: #7c8ba1;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 700;
}

.permission-group-options {
  display: grid;
  gap: 7px;
  padding: 0 9px 9px;
}

.permission-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid #e6ebf3;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.permission-option:has(input:checked) {
  border-color: #75cfa6;
  background: #f1fbf6;
}

.permission-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #0c9d70;
}

.permission-option > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.permission-extra-badge,
.permission-risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.59rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.permission-extra-badge {
  color: #087553;
  background: #dff7eb;
}

.permission-risk-badge {
  color: #a6471b;
  background: #fff0e5;
}

.effective-access-card {
  background: linear-gradient(155deg, #111d35, #203451);
  border-color: #203451;
}

.effective-access-card h5,
.effective-access-card .muted {
  color: #fff;
}

.effective-access-card .muted {
  opacity: 0.7;
}

.effective-access-preview {
  display: grid;
  gap: 12px;
}

.effective-access-metric {
  display: flex;
  align-items: end;
  gap: 8px;
  color: #d9e6f7;
}

.effective-access-metric strong {
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.effective-access-metric span {
  font-size: 0.72rem;
}

.effective-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.access-chip {
  padding: 5px 8px;
  color: #d4e2f5;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
}

.access-chip.primary {
  color: #15213a;
  border-color: #ffd9ca;
  background: #ffeadf;
}

.effective-group-list {
  display: grid;
  gap: 6px;
}

.effective-group-list > div,
.effective-module-extras {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  color: #c9d8ea;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
}

.effective-group-list strong,
.effective-module-extras strong {
  color: #fff;
}

.permission-sensitive-warning {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding: 10px;
  color: #8b3c18;
  border-radius: 11px;
  background: #fff0e5;
  font-size: 0.67rem;
}

.permission-module-overrides {
  padding: 12px 14px;
  border: 1px dashed #cdd9e8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.permission-module-overrides summary {
  color: #1b2c47;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

#additionalRoleCodesInput {
  min-height: 118px;
}

.workspace-drawer .permission-control-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-drawer .effective-access-card {
  grid-column: 1 / -1;
}

.user-access-approval-panel {
  margin: 0 0 18px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.98));
}

.user-access-approval-list,
.user-access-approval-card,
.user-access-approval-card-head > div,
.user-access-approval-change {
  display: grid;
  gap: 12px;
}

.user-access-approval-card {
  padding: 16px;
  border: 1px solid var(--border-color, #dbe3ef);
  border-radius: 16px;
  background: #fff;
}

.user-access-approval-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.user-access-approval-changes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.user-access-approval-change {
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f9fc;
}

.user-access-approval-change span,
.user-access-approval-change small {
  color: #64748b;
}

.user-access-approval-note-field {
  margin: 2px 0 0;
}

.user-access-approval-note-field input {
  width: 100%;
}

.access-approval-pending-label {
  color: #b45309;
  font-weight: 700;
}

@media (max-width: 1320px) {
  .permission-control-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .effective-access-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  .permission-control-panel {
    padding: 14px;
    border-radius: 16px;
  }

  .permission-control-layout {
    grid-template-columns: 1fr;
  }

  .effective-access-card {
    grid-column: auto;
  }

  .permission-control-card-head {
    flex-direction: column;
  }

  .role-default-permission-list,
  .permission-group-list {
    max-height: 360px;
  }
}

#vendorServiceCreatePanel.vendor-service-create-panel > .panel-header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 0 18px;
  padding: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, #ffffff, #f0f9ff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

#vendorServiceCreatePanel.vendor-service-create-panel > #vendorServiceDraftPreview,
#vendorServiceCreatePanel.vendor-service-create-panel > #vendorServiceTransportStepper,
#vendorServiceCreatePanel.vendor-service-create-panel > #vendorServiceCreateForm {
  margin-right: 24px;
  margin-left: 24px;
}

#vendorServiceCreatePanel.vendor-service-create-panel > #vendorServiceCreateForm.vendor-service-create-form {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible !important;
  padding: 0 0 24px;
}

.vendor-service-modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.vendor-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 91;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
}

.vendor-detail-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 92;
  width: clamp(1220px, 92vw, 1780px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  overflow-anchor: none;
  padding: clamp(14px, 1.2vw, 24px);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.96));
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
  font-size: clamp(15px, 0.9vw, 17px);
  line-height: 1.45;
}

.vendor-detail-panel .panel-header h4 {
  font-size: clamp(1.12rem, 1.1vw, 1.32rem);
}

.vendor-detail-panel .eyebrow,
.vendor-detail-panel .vendor-detail-info-item span,
.vendor-detail-panel .vendor-service-list-head {
  font-size: 0.78rem !important;
}

.vendor-detail-panel .vendor-detail-info-item strong,
.vendor-detail-panel .vendor-service-row-item strong {
  font-size: 1.08rem;
}

.vendor-detail-panel .ghost-button,
.vendor-detail-panel .primary-button {
  min-height: 38px;
  font-size: 0.92rem;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1320px) {
  .vendor-service-create-panel {
    top: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  #vendorServiceCreatePanel.vendor-service-create-panel > .panel-header {
    padding: 20px;
  }

  #vendorServiceCreatePanel.vendor-service-create-panel > #vendorServiceDraftPreview,
  #vendorServiceCreatePanel.vendor-service-create-panel > #vendorServiceTransportStepper,
  #vendorServiceCreatePanel.vendor-service-create-panel > #vendorServiceCreateForm {
    margin-right: 20px;
    margin-left: 20px;
  }

  .vendor-detail-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 12px;
    font-size: 15px;
  }
}

/* Premium lead pipeline refresh */
.lead-pipeline-section .pipeline-board,
#leadPipelineSection .pipeline-board {
  grid-template-columns: repeat(6, minmax(282px, 1fr));
  gap: 18px;
  padding: 10px 4px 14px;
}

.lead-pipeline-section .pipeline-column,
#leadPipelineSection .pipeline-column {
  min-width: 282px;
  height: calc(100vh - 248px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.92), transparent 45%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.94));
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.lead-pipeline-section .pipeline-column-header,
#leadPipelineSection .pipeline-column-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
}

.lead-pipeline-section .pipeline-column-title-row,
.lead-pipeline-section .pipeline-column-subtitle,
#leadPipelineSection .pipeline-column-title-row,
#leadPipelineSection .pipeline-column-subtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-pipeline-section .pipeline-column-header h4,
#leadPipelineSection .pipeline-column-header h4 {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.lead-pipeline-section .pipeline-column-count,
#leadPipelineSection .pipeline-column-count {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lead-pipeline-section .pipeline-column-meter,
#leadPipelineSection .pipeline-column-meter {
  height: 8px;
  margin: 10px 0 12px;
  background: rgba(148, 163, 184, 0.18);
}

.lead-pipeline-section .pipeline-column-subtitle p,
.lead-pipeline-section .pipeline-column-value,
#leadPipelineSection .pipeline-column-subtitle p,
#leadPipelineSection .pipeline-column-value {
  font-size: 0.77rem;
  color: #475569;
}

.lead-pipeline-section .pipeline-column-value,
#leadPipelineSection .pipeline-column-value {
  font-weight: 800;
  color: #0f172a;
}

.lead-pipeline-section .pipeline-dropzone,
#leadPipelineSection .pipeline-dropzone {
  gap: 10px;
  height: calc(100% - 86px);
  padding: 12px;
  overflow-y: auto;
}

.lead-pipeline-section .pipeline-empty,
#leadPipelineSection .pipeline-empty {
  min-height: 112px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  color: #64748b;
}

.lead-pipeline-section .pipeline-column-new .pipeline-column-header,
#leadPipelineSection .pipeline-column-new .pipeline-column-header {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.98), rgba(255, 255, 255, 0.94));
}

.lead-pipeline-section .pipeline-column-contacted .pipeline-column-header,
#leadPipelineSection .pipeline-column-contacted .pipeline-column-header {
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.98), rgba(255, 255, 255, 0.94));
}

.lead-pipeline-section .pipeline-column-followup .pipeline-column-header,
#leadPipelineSection .pipeline-column-followup .pipeline-column-header {
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.98), rgba(255, 255, 255, 0.94));
}

.lead-pipeline-section .pipeline-column-interested .pipeline-column-header,
#leadPipelineSection .pipeline-column-interested .pipeline-column-header,
.lead-pipeline-section .pipeline-column-booked .pipeline-column-header,
#leadPipelineSection .pipeline-column-booked .pipeline-column-header {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.98), rgba(255, 255, 255, 0.94));
}

.lead-pipeline-section .pipeline-column-lost .pipeline-column-header,
#leadPipelineSection .pipeline-column-lost .pipeline-column-header {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.98), rgba(255, 255, 255, 0.94));
}

.lead-pipeline-section .pipeline-column-new .pipeline-column-meter span,
#leadPipelineSection .pipeline-column-new .pipeline-column-meter span {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.lead-pipeline-section .pipeline-column-contacted .pipeline-column-meter span,
#leadPipelineSection .pipeline-column-contacted .pipeline-column-meter span {
  background: linear-gradient(90deg, #ea580c, #fb923c);
}

.lead-pipeline-section .pipeline-column-followup .pipeline-column-meter span,
#leadPipelineSection .pipeline-column-followup .pipeline-column-meter span {
  background: linear-gradient(90deg, #eab308, #facc15);
}

.lead-pipeline-section .pipeline-column-interested .pipeline-column-meter span,
#leadPipelineSection .pipeline-column-interested .pipeline-column-meter span {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.lead-pipeline-section .pipeline-column-booked .pipeline-column-meter span,
#leadPipelineSection .pipeline-column-booked .pipeline-column-meter span {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.lead-pipeline-section .pipeline-column-lost .pipeline-column-meter span,
#leadPipelineSection .pipeline-column-lost .pipeline-column-meter span {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

.lead-pipeline-section .lead-card,
#leadPipelineSection .lead-card {
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.88), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.lead-pipeline-section .lead-card--warning,
#leadPipelineSection .lead-card--warning {
  border-color: rgba(245, 158, 11, 0.34);
  box-shadow:
    inset 4px 0 0 rgba(245, 158, 11, 0.92),
    0 10px 24px rgba(15, 23, 42, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.lead-pipeline-section .lead-card--stuck,
#leadPipelineSection .lead-card--stuck {
  border-color: rgba(220, 38, 38, 0.34);
  box-shadow:
    inset 4px 0 0 rgba(220, 38, 38, 0.92),
    0 10px 24px rgba(15, 23, 42, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.lead-pipeline-section .lead-card:hover,
#leadPipelineSection .lead-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 146, 60, 0.3);
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.lead-pipeline-section .lead-card-top,
#leadPipelineSection .lead-card-top {
  align-items: flex-start;
  gap: 8px;
}

.lead-pipeline-section .lead-card-title-group,
#leadPipelineSection .lead-card-title-group {
  gap: 10px;
  min-width: 0;
}

.lead-pipeline-section .lead-card-avatar,
#leadPipelineSection .lead-card-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 0.72rem;
  box-shadow: none;
}

.lead-pipeline-section .lead-card-name,
#leadPipelineSection .lead-card-name {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.lead-pipeline-section .lead-card-subtitle,
#leadPipelineSection .lead-card-subtitle {
  margin-top: 3px;
  font-size: 0.72rem;
  color: #64748b;
}

.lead-pipeline-section .lead-card-badges,
#leadPipelineSection .lead-card-badges {
  gap: 6px;
  flex-shrink: 0;
}

.lead-pipeline-section .lead-card-body,
#leadPipelineSection .lead-card-body {
  display: grid;
  gap: 6px;
}

.lead-pipeline-section .lead-card-chip-row,
#leadPipelineSection .lead-card-chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lead-pipeline-section .lead-card-line,
#leadPipelineSection .lead-card-line {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #475569;
}

.lead-pipeline-section .lead-card-line-focus,
#leadPipelineSection .lead-card-line-focus {
  color: #065f46;
}

.lead-pipeline-section .lead-signal-chip,
#leadPipelineSection .lead-signal-chip {
  padding: 4px 8px;
  font-size: 0.64rem;
  background: rgba(226, 232, 240, 0.95);
}

.lead-pipeline-section .lead-card-line-strong,
#leadPipelineSection .lead-card-line-strong {
  font-weight: 700;
  color: #0f172a;
}

.lead-pipeline-section .lead-card-footer,
#leadPipelineSection .lead-card-footer {
  padding-top: 2px;
  font-size: 0.74rem;
}

.lead-pipeline-section .lead-card-value-inline,
#leadPipelineSection .lead-card-value-inline {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
}

.lead-pipeline-section .lead-card-meta-item,
#leadPipelineSection .lead-card-meta-item {
  color: #64748b;
}

.lead-pipeline-section .lead-card-stage-age,
#leadPipelineSection .lead-card-stage-age {
  font-weight: 700;
}

.lead-pipeline-section .lead-card-stage-age--warning,
#leadPipelineSection .lead-card-stage-age--warning {
  color: #b45309;
}

.lead-pipeline-section .lead-card-stage-age--stuck,
#leadPipelineSection .lead-card-stage-age--stuck {
  color: #b91c1c;
}

.lead-pipeline-section .lead-card-quick-actions,
#leadPipelineSection .lead-card-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
  border-top: none;
}

.lead-pipeline-section .lead-card-quick-actions .ghost-button,
#leadPipelineSection .lead-card-quick-actions .ghost-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  font-size: 0.73rem;
  font-weight: 700;
  justify-content: center;
  white-space: nowrap;
}

.lead-pipeline-section .lead-card-quick-actions .ghost-button:hover:not(:disabled),
#leadPipelineSection .lead-card-quick-actions .ghost-button:hover:not(:disabled) {
  border-color: rgba(251, 146, 60, 0.38);
  background: rgba(255, 247, 237, 0.96);
}

.lead-pipeline-section .status-chip,
#leadPipelineSection .status-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lead-pipeline-section .priority-chip,
#leadPipelineSection .priority-chip,
.lead-pipeline-section .lead-context-chip,
#leadPipelineSection .lead-context-chip {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .lead-pipeline-section .pipeline-board,
  #leadPipelineSection .pipeline-board {
    grid-template-columns: repeat(3, minmax(272px, 1fr));
  }
}

@media (max-width: 760px) {
  .lead-pipeline-section .pipeline-board,
  #leadPipelineSection .pipeline-board {
    grid-template-columns: 1fr;
  }

  .lead-pipeline-section .pipeline-column,
  #leadPipelineSection .pipeline-column {
    min-width: 0;
    height: 540px;
  }
}

/* Lead workspace color correction */
.lead-workspace-shell,
#leadPipelineSection {
  color: #0f172a;
}

.lead-workspace-shell .field span,
.lead-workspace-shell .muted,
.lead-workspace-shell .pill,
.lead-results-summary,
.pipeline-hint,
.toolbar-meta,
.lead-bulk-field span,
#leadPipelineSection .field span,
#leadPipelineSection .muted {
  color: #64748b;
}

.lead-workspace-shell .eyebrow,
#leadPipelineSection .eyebrow {
  color: #b45309;
}

#leadPipelineSection .panel.login-greeting-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: #0f172a;
}

#leadPipelineSection .panel.login-greeting-banner h3,
#leadPipelineSection .panel.login-greeting-banner .login-greeting-message {
  color: #0f172a;
}

#leadPipelineSection .panel.login-greeting-banner .muted,
#leadPipelineSection .panel.login-greeting-banner .eyebrow {
  color: #64748b;
}

.lead-workspace-shell h3,
.lead-workspace-shell strong,
.lead-workspace-shell .crm-mini-stat strong,
.lead-workspace-shell .summary-tile strong,
#leadPipelineSection h3,
#leadPipelineSection strong {
  color: #0f172a;
}

.lead-workspace-shell .crm-strip,
.lead-workspace-shell .lead-workspace-shell,
.lead-workspace-shell .summary-tile,
#leadPipelineSection .crm-strip,
#leadPipelineSection .summary-tile {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border-color: rgba(226, 232, 240, 0.95);
}

.lead-workspace-shell .crm-mini-stat,
#leadPipelineSection .crm-mini-stat {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.lead-workspace-shell .crm-mini-stat span,
#leadPipelineSection .crm-mini-stat span {
  color: #94a3b8;
}

.lead-workspace-shell .lead-filter-search input,
.lead-workspace-shell .lead-inline-field select,
.lead-workspace-shell .lead-quick-field select,
.lead-workspace-shell .lead-advanced-filter-grid input,
.lead-workspace-shell .lead-advanced-filter-grid select,
.lead-workspace-shell .lead-bulk-field select,
#leadPipelineSection .lead-filter-search input,
#leadPipelineSection .lead-inline-field select,
#leadPipelineSection .lead-quick-field select,
#leadPipelineSection .lead-advanced-filter-grid input,
#leadPipelineSection .lead-advanced-filter-grid select,
#leadPipelineSection .lead-bulk-field select {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.95);
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.lead-workspace-shell .lead-filter-search input::placeholder,
.lead-workspace-shell .lead-advanced-filter-grid input::placeholder,
#leadPipelineSection .lead-filter-search input::placeholder,
#leadPipelineSection .lead-advanced-filter-grid input::placeholder {
  color: #94a3b8;
}

.lead-workspace-shell .lead-smart-chip,
.lead-workspace-shell .lead-segment-card,
#leadPipelineSection .lead-smart-chip,
#leadPipelineSection .lead-segment-card {
  border-color: rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.lead-workspace-shell .lead-smart-chip span,
#leadPipelineSection .lead-smart-chip span {
  background: #eff6ff;
  color: #1d4ed8;
}

.lead-workspace-shell .lead-smart-chip:hover,
.lead-workspace-shell .lead-segment-card:hover,
.lead-workspace-shell .lead-smart-chip.active,
.lead-workspace-shell .lead-segment-card.active,
#leadPipelineSection .lead-smart-chip:hover,
#leadPipelineSection .lead-segment-card:hover,
#leadPipelineSection .lead-smart-chip.active,
#leadPipelineSection .lead-segment-card.active {
  border-color: rgba(251, 146, 60, 0.32);
  background: #fff7ed;
  color: #9a3412;
}

.lead-workspace-shell .toolbar-chip,
#leadPipelineSection .toolbar-chip {
  background: #fff7ed;
  color: #c2410c;
}

.lead-workspace-shell .toolbar-chip-soft,
#leadPipelineSection .toolbar-chip-soft {
  background: #e2e8f0;
  color: #475569;
}

.lead-workspace-shell .pill,
#leadPipelineSection .pill {
  background: #fff7ed;
  color: #c2410c;
}

.lead-workspace-shell .ghost-button,
#leadPipelineSection .ghost-button {
  color: #1e293b;
  border-color: rgba(203, 213, 225, 0.95);
  background: rgba(255, 255, 255, 0.92);
}

.lead-workspace-shell .ghost-button:hover:not(:disabled),
#leadPipelineSection .ghost-button:hover:not(:disabled) {
  background: #fff7ed;
  border-color: rgba(251, 146, 60, 0.32);
}

.lead-workspace-shell .lead-filter-menu-button,
#leadPipelineSection .lead-filter-menu-button {
  color: #1e293b;
  border-color: rgba(203, 213, 225, 0.95);
  background: rgba(255, 255, 255, 0.96);
}

.lead-workspace-shell .lead-filter-menu-button:hover,
.lead-workspace-shell .lead-filter-menu-button.active,
#leadPipelineSection .lead-filter-menu-button:hover,
#leadPipelineSection .lead-filter-menu-button.active {
  color: #9a3412;
  border-color: rgba(251, 146, 60, 0.5);
  background: #fff7ed;
}

.lead-workspace-shell .lead-filter-menu-button-accent,
#leadPipelineSection .lead-filter-menu-button-accent {
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.24);
  background: linear-gradient(135deg, #ff7a45, #ef4444);
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.18);
}

.lead-workspace-shell .lead-filter-menu-button-accent:hover,
#leadPipelineSection .lead-filter-menu-button-accent:hover {
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.34);
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.lead-workspace-shell .lead-active-filter-empty,
#leadPipelineSection .lead-active-filter-empty {
  color: #64748b;
}

.vendor-service-create-panel .form-status.is-success {
  color: #9ae6b4;
  font-weight: 600;
}

.vendor-service-create-panel .form-status.is-loading {
  color: #9bb9ff;
}

.vendor-service-detail-section {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.vendor-service-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.vendor-service-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.vendor-service-summary-pills .pill {
  min-height: 28px;
  padding: 6px 10px;
  font-size: 0.76rem;
}

.vendor-service-inline-view-shell {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.vendor-service-inline-view-shell .vendor-service-row-detail {
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.vendor-service-inline-drawer {
  padding: 16px;
}

.vendor-service-inline-drawer .field,
.vendor-service-inline-drawer .field input,
.vendor-service-inline-drawer .field select,
.vendor-service-inline-drawer .field textarea {
  min-width: 0;
}

.vendor-service-drawer-title {
  display: grid;
  gap: 2px;
}

.vendor-service-drawer-title strong {
  font-size: 1rem;
}

.vendor-service-drawer-title span {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.vendor-service-row-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 0 8px;
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.98), rgba(240, 249, 255, 0.92));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  margin-bottom: 8px;
}

@media (max-width: 1220px) {
  .vendor-service-details-modal {
    width: min(980px, calc(100vw - 24px));
    max-height: calc(100vh - 20px);
  }

  .vendor-service-inline-drawer .vendor-service-detail-form-grid {
    grid-template-columns: 1fr;
  }
}

.vendor-service-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.vendor-service-detail-section-head h5 {
  margin: 0;
  font-size: 0.95rem;
}

.vendor-service-detail-caption {
  margin: 0 0 14px;
  color: #64748b;
}

.vendor-service-detail-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vendor-service-detail-form,
.vendor-service-hotel-block-body,
.vendor-service-detail-form .field {
  position: relative;
}

.vendor-service-detail-form .field {
  z-index: 1;
}

.vendor-service-detail-form .checkbox-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
}

.vendor-service-detail-form .checkbox-field span {
  margin: 0;
}

.vendor-service-detail-form .checkbox-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #f97316;
  flex: 0 0 auto;
}

.vendor-service-detail-form .field.has-open-search-select {
  z-index: 18;
}

.vendor-service-detail-form .search-select-menu {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 8px;
  max-height: 220px;
}

.vendor-service-detail-form select,
.vendor-service-detail-form input,
.vendor-service-detail-form textarea,
.vendor-service-detail-form button {
  pointer-events: auto;
}

.vendor-service-detail-form select {
  position: relative;
  z-index: 6;
  appearance: auto;
  -webkit-appearance: menulist;
}

.vendor-service-detail-form .form-actions {
  align-items: center;
  position: static;
  margin-top: 12px;
  padding: 0;
  background: transparent;
}

.vendor-service-detail-form-status {
  text-align: left;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.vendor-service-transport-season-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
}

.vendor-service-transport-season-head {
  padding: 0;
}

.vendor-service-transport-season-head .ghost-button {
  min-width: 112px;
}

.vendor-service-transport-seasonal-slabs {
  display: grid;
  gap: 10px;
}

.vendor-service-transport-season-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

@media (max-width: 1120px) {
  .vendor-service-transport-season-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.vendor-service-inline-drawer .search-select-input {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.35);
}

.vendor-service-inline-drawer .search-select-input::placeholder {
  color: rgba(100, 116, 139, 0.72);
}

.vendor-service-inline-drawer .search-select-clear {
  background: rgba(255, 255, 255, 0.96);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.vendor-service-inline-drawer .search-select-clear:hover,
.vendor-service-inline-drawer .search-select-clear:focus-visible {
  background: rgba(241, 245, 249, 0.98);
  color: #0f172a;
}

.vendor-service-inline-drawer .search-select-menu {
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.92);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  overflow-x: hidden;
}

.vendor-service-inline-drawer .search-select-option {
  color: #0f172a;
  background: #ffffff;
}

.vendor-service-inline-drawer .search-select-option:hover,
.vendor-service-inline-drawer .search-select-option:focus-visible {
  background: rgba(241, 245, 249, 0.98);
}

.vendor-service-inline-drawer .search-select-option-meta,
.vendor-service-inline-drawer .search-select-empty,
.vendor-service-inline-drawer .search-select-helper {
  color: #64748b;
}

.vendor-service-inline-drawer .search-select-empty {
  background: #ffffff;
}

.vendor-service-detail-form .search-select-input {
  background: #ffffff;
  color: #0f172a;
}

.vendor-service-detail-form .search-select-input::placeholder {
  color: rgba(100, 116, 139, 0.72);
}

.vendor-service-detail-form .search-select-menu {
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.92);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  overflow-x: hidden;
}

.vendor-service-detail-form .search-select-option {
  color: #0f172a;
  background: #ffffff;
}

.vendor-service-detail-form .search-select-option:hover,
.vendor-service-detail-form .search-select-option:focus-visible {
  background: rgba(241, 245, 249, 0.98);
}

.vendor-service-detail-form .search-select-option-meta,
.vendor-service-detail-form .search-select-option-label,
.vendor-service-detail-form .search-select-empty,
.vendor-service-detail-form .search-select-helper {
  color: #64748b;
}

.vendor-service-detail-form .search-select-empty {
  background: #ffffff;
}

.vendor-ledger-inline-panel {
  margin-top: 14px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.vendor-ledger-table-shell {
  overflow-x: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
}

.vendor-ledger-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.vendor-ledger-table th,
.vendor-ledger-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  text-align: left;
  vertical-align: top;
}

.vendor-ledger-table th {
  background: rgba(241, 245, 249, 0.92);
  color: #64748b;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.vendor-ledger-table td {
  color: #0f172a;
  font-size: 0.92rem;
}

.star-rating-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-rating-btn {
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: #ffffff;
  color: #94a3b8;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  line-height: 1;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.star-rating-btn.is-active {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(251, 191, 36, 0.14);
}

.star-rating-btn:hover {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.48);
}

.hotel-slab-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.hotel-slab-field {
  display: grid;
  gap: 4px;
  margin: 0;
}

.hotel-slab-field span {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.95);
  font-weight: 700;
}

.hotel-slab-row input {
  min-width: 0;
}

.hotel-slab-action {
  display: flex;
  align-items: flex-end;
}

.hotel-slab-action .ghost-button {
  width: 100%;
}

@media (max-width: 1220px) {
  .hotel-slab-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hotel-slab-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .vendor-service-details-modal {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100vw;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .vendor-service-row-detail-head {
    top: 0;
    flex-wrap: wrap;
  }

  .vendor-service-row-detail-head .ghost-button {
    width: 100%;
  }
}

.vendor-detail-panel .field-hint {
  margin-top: 6px;
  color: rgba(148, 163, 184, 0.82);
}

.vendor-detail-panel .vendor-service-detail-form-status.is-error {
  color: #ff8f8f;
  font-weight: 600;
}

.vendor-detail-panel .vendor-service-detail-form-status.is-success {
  color: #9ae6b4;
  font-weight: 600;
}

.vendor-detail-panel .vendor-service-detail-form-status.is-loading {
  color: #9bb9ff;
}

.vendor-table-shell {
  max-height: none;
}

.vendor-table {
  min-width: 720px;
}

.vendor-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef3fb;
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.28);
}

.vendor-table tbody tr {
  transition: background-color 0.16s ease;
}

.vendor-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

.vendor-name-cell,
.vendor-meta-cell {
  display: grid;
  gap: 4px;
}

.vendor-name-cell span,
.vendor-meta-cell span {
  color: var(--muted);
  font-size: 0.86rem;
}

.vendor-email-missing {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #52607a;
  font-size: 0.78rem;
  font-weight: 600;
}

.assignment-rules-table-shell {
  overflow-x: auto;
}

.assignment-rules-table {
  width: 100%;
  border-collapse: collapse;
}

.assignment-rules-table th,
.assignment-rules-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  vertical-align: top;
}

.assignment-rules-table th {
  font-size: 0.77rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.assignment-rules-table td p {
  margin: 6px 0 0;
}

.assignment-rule-actions {
  display: flex;
  gap: 10px;
}

.assignment-rule-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 4px;
}

.assignment-rule-toggle-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.status-badge-muted {
  color: #475467;
  background: rgba(148, 163, 184, 0.14);
}

.status-requested {
  color: #b45309;
  background: rgba(251, 146, 60, 0.16);
}

.status-approved,
.status-applied {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
}

.status-rejected {
  color: #b42318;
  background: rgba(220, 38, 38, 0.12);
}

.reports-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-apply-button {
  align-self: end;
  min-height: 52px;
}

.reports-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.reports-loading-state {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.reports-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  align-items: start;
}

.warning-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  align-items: start;
}

.reports-layout-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reports-unified-hub {
  display: grid;
  gap: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.9));
  border-color: rgba(59, 130, 246, 0.18);
}

.reports-hub-tabs {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.reports-unified-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.reports-unified-actions .ghost-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
}

.reports-hub-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-weight: 750;
  cursor: pointer;
}

.reports-hub-tab:hover,
.reports-hub-tab:focus-visible {
  border-color: rgba(37, 99, 235, 0.5);
  color: #1d4ed8;
}

.reports-hub-tab.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.reports-unified-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.reports-unified-metric {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
}

.reports-unified-metric span {
  display: block;
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reports-unified-metric strong {
  display: block;
  margin-top: 7px;
  color: #0f172a;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  overflow-wrap: anywhere;
}

.reports-unified-alerts {
  display: grid;
  gap: 8px;
}

.reports-unified-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: rgba(255, 251, 235, 0.85);
  color: #92400e;
}

.reports-unified-alert.is-critical {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(254, 242, 242, 0.9);
  color: #b91c1c;
}

.reports-unified-table-wrap {
  min-height: 220px;
  border: 1px solid rgba(203, 213, 225, 0.65);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.reports-unified-table {
  min-width: 760px;
}

.reports-unified-table td {
  max-width: 280px;
  overflow-wrap: anywhere;
}

.reports-row-link {
  display: inline-flex;
  margin-left: 6px;
  color: #2563eb;
  font-weight: 750;
  text-decoration: none;
}

.reports-event-ledger {
  border-top: 1px solid rgba(203, 213, 225, 0.7);
  padding-top: 14px;
}

.reports-event-ledger summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #0f172a;
  font-weight: 800;
}

.reports-event-ledger-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.reports-event-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 1fr) minmax(150px, 0.8fr);
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(248, 250, 252, 0.92);
  color: #475569;
  font-size: 0.86rem;
}

.reports-finance-catalog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-radius: 14px;
  background: rgba(236, 254, 255, 0.72);
}

.reports-finance-catalog p {
  margin: 5px 0 0;
}

.reports-product-panel {
  display: grid;
  gap: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.88));
}

.reports-product-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.reports-product-kpi-grid .report-kpi-card {
  padding: 18px;
}

.reports-product-kpi-grid .report-kpi-card strong {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.reports-product-ranking-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-product-ranking-card {
  display: grid;
  gap: 10px;
}

.reports-product-ranking-card strong {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1f2937;
}

.reports-product-ranking-list {
  display: grid;
  gap: 8px;
}

.reports-product-ranking-list p {
  margin: 0;
  color: var(--muted);
}

.warning-layout-bottom {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.reports-filter-panel,
.reports-table-panel,
.reports-chart-panel,
.reports-insights-panel,
.reports-activity-panel,
.warning-filter-panel,
.warning-table-panel,
.warning-chart-panel,
.warning-activity-panel,
.report-kpi-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.88));
}

.warning-kpi-card {
  position: relative;
  overflow: hidden;
}

.warning-kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -24px auto;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.18), transparent 70%);
}

.report-kpi-card {
  padding: 22px;
}

.report-kpi-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.report-kpi-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 2.4vw, 2.6rem);
  line-height: 1.1;
}

.report-kpi-card p {
  margin: 0;
  color: var(--muted);
}

.reports-table-wrap {
  overflow-x: auto;
}

.live-agent-board-panel {
  display: grid;
  gap: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.78));
}

.live-agent-board-actions,
.live-status-toggle,
.live-agent-card-head,
.live-agent-card-meta,
.live-alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-agent-board-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.live-status-toggle {
  flex-wrap: wrap;
}

.live-status-toggle .ghost-button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  border-color: transparent;
}

.live-agent-board-grid,
.live-alert-feed {
  display: grid;
  gap: 14px;
}

.live-agent-board-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.live-agent-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #fff7ed);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.live-agent-card strong,
.live-agent-card span {
  display: block;
}

.live-agent-card-head {
  justify-content: space-between;
  align-items: flex-start;
}

.live-agent-card-role {
  color: var(--muted);
  font-size: 0.84rem;
}

.live-agent-card-meta {
  margin-top: 14px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

.live-agent-presence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-agent-presence-active {
  color: #166534;
  background: rgba(34, 197, 94, 0.15);
}

.live-agent-presence-idle {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
}

.live-agent-presence-break {
  color: #7c3aed;
  background: rgba(196, 181, 253, 0.26);
}

.live-agent-presence-offline {
  color: #475569;
  background: rgba(148, 163, 184, 0.18);
}

.live-alert-feed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.live-alert-item {
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: #fff;
}

.live-alert-item-copy {
  min-width: 0;
}

.live-alert-item-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.live-alert-severity-high {
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.live-alert-severity-medium {
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.12);
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.live-alert-severity-low {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
}

.reports-table th,
.reports-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.reports-table th {
  font-size: 0.77rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.reports-agent-cell {
  display: grid;
  gap: 4px;
}

.reports-agent-cell span {
  color: var(--muted);
  font-size: 0.86rem;
}

.reports-productivity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  color: #9a3412;
  background: rgba(251, 146, 60, 0.14);
}

.reports-activity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reports-activity-stat {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: #fff;
}

.reports-activity-stat span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.reports-activity-stat strong {
  font-size: 1.8rem;
}

.reports-activity-stat.active {
  background: linear-gradient(180deg, #ffffff, #fff7ed);
}

.reports-activity-stat.idle {
  background: linear-gradient(180deg, #ffffff, #fffaf0);
}

.reports-activity-stat.break {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.reports-activity-item,
.reports-insight-card {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.92);
}

.reports-activity-item p,
.reports-insight-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.reports-stage-row {
  display: grid;
  gap: 10px;
}

.reports-stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reports-stage-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.92);
  overflow: hidden;
}

.reports-stage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
}

.reports-trend-chart {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  min-height: 260px;
}

.reports-trend-point {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.reports-trend-value {
  font-size: 0.76rem;
  color: var(--muted);
}

.reports-trend-bar {
  display: flex;
  align-items: end;
  width: 100%;
  min-height: 160px;
  padding: 0 10px;
}

.reports-trend-bar span {
  display: block;
  width: 100%;
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, rgba(251, 146, 60, 0.4), rgba(220, 38, 38, 0.95));
  box-shadow: 0 18px 30px rgba(220, 38, 38, 0.16);
}

.reports-trend-point strong {
  font-size: 0.82rem;
}

.warning-type-chart,
.warning-daily-chart,
.warning-recent-list {
  display: grid;
  gap: 16px;
}

.warning-type-row {
  display: grid;
  gap: 10px;
}

.warning-type-meta,
.warning-recent-head,
.warning-recent-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.warning-type-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.92);
  overflow: hidden;
}

.warning-type-bar span,
.warning-daily-bar span {
  display: block;
  border-radius: inherit;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.warning-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.warning-daily-chart {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  min-height: 260px;
}

.warning-daily-point {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.warning-daily-bar {
  display: flex;
  align-items: end;
  width: 100%;
  min-height: 160px;
  padding: 0 10px;
}

.warning-daily-bar span {
  width: 100%;
  border-radius: 16px 16px 6px 6px;
  box-shadow: 0 18px 30px rgba(220, 38, 38, 0.16);
}

.warning-recent-item {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #fff7ed);
}

.warning-recent-item p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.6;
}

.warning-recent-meta {
  color: var(--muted);
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.onboarding-workspace {
  display: grid;
  gap: 20px;
}

.onboarding-workspace .panel,
.onboarding-workspace .report-kpi-card,
.onboarding-workspace .attendance-kpi-card {
  position: relative;
  border-color: rgba(71, 85, 105, 0.52);
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.96), rgba(15, 23, 42, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 22px 46px rgba(2, 6, 23, 0.34);
}

.onboarding-workspace .panel::before,
.onboarding-workspace .report-kpi-card::before,
.onboarding-workspace .attendance-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%);
  pointer-events: none;
}

.onboarding-workspace .panel-header h3,
.onboarding-workspace .report-kpi-card strong,
.onboarding-workspace .attendance-kpi-card strong,
.onboarding-workspace .document-card h4,
.onboarding-workspace .document-history-item strong,
.onboarding-workspace .hr-summary-tile strong,
.onboarding-workspace .hr-role-ai-card strong {
  color: #f8fafc;
}

.onboarding-workspace .muted,
.onboarding-workspace .eyebrow,
.onboarding-workspace .field span,
.onboarding-workspace .report-kpi-card span,
.onboarding-workspace .report-kpi-card p,
.onboarding-workspace .attendance-team-card-grid span,
.onboarding-workspace .attendance-history-metrics span,
.onboarding-workspace .attendance-overtime-item-meta span,
.onboarding-workspace .attendance-overtime-item-metrics span,
.onboarding-workspace .leave-history-metrics span,
.onboarding-workspace .leave-balance-metrics span,
.onboarding-workspace .assignment-rules-table th,
.onboarding-workspace .assignment-rules-table td,
.onboarding-workspace .hr-overtime-cell-meta,
.onboarding-workspace .leave-review-cell-meta,
.onboarding-workspace .leave-review-stage-copy {
  color: rgba(203, 213, 225, 0.78);
}

.onboarding-workspace .pill {
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.22);
}

.onboarding-workspace .status-badge {
  border: 1px solid transparent;
}

.onboarding-workspace .status-badge-muted {
  color: #e2e8f0;
  background: rgba(71, 85, 105, 0.38);
  border-color: rgba(148, 163, 184, 0.22);
}

.onboarding-workspace .primary-button {
  box-shadow:
    0 16px 30px rgba(220, 38, 38, 0.24),
    0 0 24px rgba(251, 146, 60, 0.18);
}

.onboarding-workspace .ghost-button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(100, 116, 139, 0.5);
}

.onboarding-workspace .ghost-button:hover {
  border-color: rgba(251, 146, 60, 0.3);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.3);
}

.onboarding-workspace input,
.onboarding-workspace select,
.onboarding-workspace textarea {
  color: #e2e8f0;
  background: rgba(8, 13, 24, 0.84);
  border-color: rgba(71, 85, 105, 0.7);
}

.onboarding-workspace input::placeholder,
.onboarding-workspace textarea::placeholder {
  color: rgba(148, 163, 184, 0.74);
}

.onboarding-documents-panel,
.hr-documents-hero,
.hr-document-types-panel,
.hr-document-queue-panel,
.hr-document-detail-panel,
.hr-policy-hero,
.hr-policy-directory-panel,
.hr-policy-audit-panel {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.97), rgba(15, 23, 42, 0.94));
}

.onboarding-document-summary,
.document-card,
.document-upload-row,
.document-history-list,
.hr-document-types-list,
.hr-pending-documents-list,
.hr-employee-documents-list,
.hr-documents-workspace,
.hr-document-review-grid,
.hr-policy-workspace,
.hr-policy-grid,
.hr-policy-directory-list,
.hr-policy-employee-list,
.hr-policy-audit-list,
.hr-policy-consent-history,
.policy-checklist,
.policy-consent-shell,
.policy-summary-grid,
.policy-consent-declaration,
.policy-audit-history {
  display: grid;
  gap: 16px;
}

.onboarding-document-list,
.document-action-row {
  display: grid;
  gap: 12px;
}

.document-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.document-card-head,
.document-meta-row,
.document-action-row,
.hr-review-queue-card,
.hr-review-queue-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.document-card h4,
.document-history-item strong {
  margin: 0;
}

.document-meta-row,
.document-history-item span {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.84rem;
}

.document-upload-row textarea,
.hr-document-type-grid textarea,
.hr-review-document-card textarea {
  min-height: 88px;
}

.document-ai-note,
.document-history-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.5);
  background: rgba(8, 13, 24, 0.74);
}

.document-ai-note p,
.document-history-item p,
.document-type-card p,
.hr-review-queue-card p {
  margin: 6px 0 0;
  color: rgba(203, 213, 225, 0.72);
}

.document-reason {
  margin: 0;
  color: #b42318;
  font-weight: 600;
}

.document-type-card {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.7));
}

.employee-attendance-hero,
.hr-attendance-hero,
.hr-attendance-shifts-panel,
.hr-holiday-panel,
.hr-attendance-team-panel,
.hr-attendance-overtime-panel,
.leave-balance-panel,
.leave-form-panel,
.leave-history-panel {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.97), rgba(15, 23, 42, 0.94));
}

.employee-attendance-workspace,
.hr-attendance-workspace,
.attendance-kpi-grid,
.hr-attendance-insight-grid,
.attendance-history-list,
.leave-workspace-grid,
.leave-balance-grid,
.leave-history-list,
.attendance-overtime-grid,
.attendance-shift-list,
.hr-holiday-form-grid,
.attendance-team-list {
  display: grid;
  gap: 16px;
}

.leave-workspace-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
}

.leave-balance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.attendance-overtime-grid {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
}

.attendance-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-alert-card,
.hr-attendance-insight-panel {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(12, 18, 32, 0.97), rgba(15, 23, 42, 0.94));
}

.attendance-alert-card {
  position: relative;
  overflow: hidden;
}

.attendance-alert-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -38px auto;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(43, 110, 242, 0.14), transparent 72%);
}

.attendance-alert-meta,
.tl-alert-list {
  display: grid;
  gap: 12px;
}

.attendance-alert-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.attendance-alert-chip,
.hr-summary-tile,
.tl-alert-item {
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.68));
}

.attendance-alert-chip {
  padding: 14px 16px;
  border-radius: 18px;
}

.attendance-alert-chip span,
.hr-summary-tile span,
.tl-alert-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.attendance-alert-chip strong,
.hr-summary-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}

.hr-attendance-insight-grid {
  grid-template-columns: minmax(320px, 1.12fr) minmax(280px, 0.88fr);
  align-items: start;
}

.tl-alert-item {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
}

.tl-alert-head,
.tl-alert-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tl-alert-item p,
.hr-summary-note {
  margin: 0;
  line-height: 1.6;
}

.tl-alert-item p {
  color: rgba(203, 213, 225, 0.74);
}

.tl-alert-item.tl-alert-high {
  background: linear-gradient(180deg, rgba(69, 10, 10, 0.76), rgba(30, 41, 59, 0.86));
}

.tl-alert-item.tl-alert-medium {
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.58), rgba(30, 41, 59, 0.86));
}

.tl-alert-item.tl-alert-low {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.86));
}

.hr-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hr-summary-tile {
  padding: 16px 18px;
  border-radius: 20px;
}

.hr-summary-note {
  margin-top: 16px;
}

.attendance-action-bar,
.attendance-team-controls,
.attendance-export-actions,
.attendance-team-card-header,
.attendance-team-card-actions,
.attendance-history-metrics,
.attendance-weekoff-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.attendance-team-controls {
  justify-content: flex-end;
}

.attendance-export-toolbar {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(8, 13, 24, 0.84), rgba(15, 23, 42, 0.72));
}

.attendance-export-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-export-actions {
  justify-content: flex-end;
}

.attendance-date-field {
  min-width: 180px;
}

.attendance-history-item,
.attendance-overtime-item,
.leave-balance-card,
.leave-history-item,
.attendance-shift-card,
.attendance-team-card,
.hr-holiday-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.68));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.hr-holiday-form-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hr-holiday-checkbox-field {
  align-self: end;
}

.attendance-shift-grid,
.attendance-team-card-grid,
.attendance-export-grid,
.hr-salary-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-team-card-grid {
  margin: 16px 0;
}

.attendance-team-card-grid span,
.hr-salary-summary-grid span,
.attendance-history-metrics span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hr-salary-employee-list,
.hr-salary-card {
  display: grid;
  gap: 16px;
}

.hr-salary-toolbar,
.hr-salary-workflow-grid,
.hr-salary-history-list {
  display: grid;
  gap: 16px;
}

.hr-salary-toolbar {
  margin-top: 20px;
  margin-bottom: 10px;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) minmax(220px, 320px);
  align-items: end;
}

.hr-salary-toolbar-note {
  padding: 0 0 10px;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.hr-salary-employee-list {
  margin-top: 24px;
}

.hr-salary-shell,
.hr-salary-main-grid,
.hr-salary-overview-grid,
.hr-salary-directory-list,
.hr-salary-tabs,
.hr-salary-tab-panel,
.hr-salary-history-layout,
.hr-salary-timeline-list {
  display: grid;
  gap: 16px;
}

.hr-salary-main-grid {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.55fr);
  align-items: start;
}

.hr-salary-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-salary-overview-card,
.hr-salary-directory-card,
.hr-salary-history-card,
.hr-salary-timeline-item {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.7));
}

.hr-salary-overview-card strong,
.hr-salary-directory-row strong,
.hr-salary-timeline-item strong {
  color: #f8fafc;
}

.hr-salary-overview-card p,
.hr-salary-timeline-item p {
  margin: 0;
  color: rgba(203, 213, 225, 0.74);
  line-height: 1.55;
}

.hr-salary-overview-label {
  font-size: 0.76rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hr-salary-directory-card {
  position: sticky;
  top: 24px;
}

.hr-salary-directory-list {
  max-height: 920px;
  overflow: auto;
}

.hr-salary-directory-row {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  background: rgba(8, 15, 30, 0.52);
  text-align: left;
}

.hr-salary-directory-row.active {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(96, 165, 250, 0.16),
    0 16px 28px rgba(30, 64, 175, 0.16);
}

.hr-salary-directory-row-head,
.hr-salary-directory-row-meta,
.hr-salary-directory-row-metrics,
.hr-salary-history-head-actions,
.hr-salary-timeline-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hr-salary-directory-row-meta,
.hr-salary-directory-row-metrics {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.88rem;
}

.hr-salary-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-salary-tab {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  background: rgba(8, 15, 30, 0.52);
  color: #cbd5e1;
  font-weight: 700;
}

.hr-salary-tab.active {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 64, 175, 0.24);
  color: #eff6ff;
}

.hr-salary-tab-panel {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(124, 148, 189, 0.14);
  background: rgba(8, 15, 30, 0.42);
}

.hr-salary-history-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
}

.hr-salary-history-table-shell {
  overflow-x: auto;
}

.hr-salary-history-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.hr-salary-history-table th,
.hr-salary-history-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.28);
  text-align: left;
  vertical-align: top;
}

.hr-salary-history-table th {
  color: #94a3b8;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hr-salary-history-empty {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(124, 148, 189, 0.2);
  color: rgba(203, 213, 225, 0.76);
  background: rgba(8, 15, 30, 0.36);
}

.hr-salary-card {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.7));
}

.hr-salary-workspace-card {
  gap: 24px;
}

.hr-salary-card-header,
.hr-salary-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hr-salary-card-header-spacious {
  margin-bottom: 4px;
}

.hr-salary-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hr-salary-meta-strip .pill {
  color: var(--text);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.16);
}

.hr-salary-section {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(124, 148, 189, 0.14);
  background: rgba(8, 15, 30, 0.42);
}

.hr-salary-section + .hr-salary-section {
  margin-top: 6px;
}

.hr-salary-section-header {
  align-items: flex-start;
}

.hr-salary-summary-grid-relaxed {
  gap: 16px;
}

.hr-salary-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hr-salary-workflow-block {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 0;
}

.hr-salary-workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.hr-salary-action-row,
.hr-salary-action-groups,
.hr-salary-workflow-actions,
.hr-salary-primary-actions,
.hr-salary-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hr-salary-action-row,
.hr-salary-action-groups {
  justify-content: space-between;
}

.hr-salary-secondary-actions {
  justify-content: flex-end;
}

.hr-salary-history-list {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(124, 148, 189, 0.12);
  background: rgba(8, 15, 30, 0.42);
}

.hr-salary-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.attendance-overtime-panel {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.97), rgba(15, 23, 42, 0.94));
}

.attendance-overtime-form,
.leave-request-form,
.attendance-overtime-history-list {
  display: grid;
  gap: 16px;
}

.attendance-overtime-form-grid,
.leave-request-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leave-request-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.attendance-overtime-history-list {
  min-height: 120px;
}

.attendance-overtime-item,
.leave-history-item,
.leave-balance-card {
  display: grid;
  gap: 14px;
}

.attendance-overtime-item-header,
.attendance-overtime-item-meta,
.attendance-overtime-item-metrics,
.leave-history-item-head,
.leave-history-metrics,
.leave-balance-card-head,
.leave-balance-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.attendance-overtime-item-header {
  justify-content: space-between;
}

.leave-history-item-head,
.leave-balance-card-head {
  justify-content: space-between;
  align-items: flex-start;
}

.attendance-overtime-item-meta span,
.attendance-overtime-item-metrics span,
.leave-history-metrics span,
.leave-balance-metrics span {
  color: var(--muted);
  font-size: 0.92rem;
}

.attendance-overtime-reason,
.leave-history-reason,
.leave-balance-card p {
  margin: 0;
  color: rgba(203, 213, 225, 0.74);
  line-height: 1.55;
}

.hr-overtime-table-shell {
  overflow-x: auto;
  padding: 8px;
  border-radius: 24px;
  border: 1px solid rgba(71, 85, 105, 0.48);
  background: rgba(8, 13, 24, 0.54);
}

.hr-overtime-table td {
  min-width: 140px;
}

.hr-overtime-table td p {
  margin: 6px 0 0;
}

.leave-review-table td {
  vertical-align: top;
}

.hr-overtime-cell-meta {
  font-size: 0.86rem;
}

.leave-review-cell-meta,
.leave-review-stage-copy {
  font-size: 0.86rem;
}

.hr-overtime-reason-copy {
  min-width: 220px;
  line-height: 1.55;
}

.hr-overtime-inline-field {
  min-width: 180px;
}

.hr-overtime-inline-field textarea,
.hr-overtime-inline-field input {
  width: 100%;
}

.hr-overtime-inline-field textarea {
  min-height: 92px;
  resize: vertical;
}

.hr-overtime-actions {
  flex-wrap: wrap;
}

.leave-review-actions {
  min-width: 160px;
}

.attendance-shift-weekoffs {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.attendance-weekoff-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.5);
  background: rgba(15, 23, 42, 0.76);
  color: #e2e8f0;
}

.hr-document-review-grid {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
}

.hr-review-queue-card {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.7));
  text-align: left;
  cursor: pointer;
}

.hr-review-queue-card.active {
  border-color: rgba(251, 146, 60, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(251, 146, 60, 0.16),
    0 16px 28px rgba(251, 146, 60, 0.12);
}

.status-positive {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
}

.status-negative {
  color: #b42318;
  background: rgba(220, 38, 38, 0.12);
}

.status-warning {
  color: #b45309;
  background: rgba(251, 146, 60, 0.16);
}

.status-info {
  color: #1d4ed8;
  background: rgba(96, 165, 250, 0.16);
}

.status-neutral {
  color: #475467;
  background: rgba(148, 163, 184, 0.14);
}

.status-muted {
  color: #475467;
  background: rgba(148, 163, 184, 0.14);
}

.hr-policy-grid {
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.9fr);
}

.policy-card,
.policy-employee-card,
.policy-audit-card,
.policy-consent-card,
.policy-history-item {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.7));
}

.policy-card-head,
.policy-card-meta,
.policy-employee-card-head,
.policy-audit-head,
.policy-consent-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.policy-card p,
.policy-employee-card p,
.policy-audit-card p,
.policy-consent-card p,
.policy-history-item p {
  margin: 6px 0 0;
  color: rgba(203, 213, 225, 0.72);
}

.policy-card h4,
.policy-audit-card h4,
.policy-consent-card h4,
.policy-history-item h4 {
  margin: 0;
}

.policy-card-meta,
.policy-summary-grid,
.policy-consent-history-head {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.86rem;
}

.policy-card-content,
.policy-consent-declaration {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.5);
  background: rgba(10, 16, 30, 0.88);
  color: rgba(236, 244, 255, 0.92);
  line-height: 1.65;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.policy-card-content strong,
.policy-card-content b,
.policy-consent-declaration strong,
.policy-consent-declaration b {
  color: #f8fafc;
}

.policy-card-content small,
.policy-consent-declaration small {
  color: rgba(203, 213, 225, 0.82);
}

.policy-checklist .checkbox-item,
.policy-consent-shell .checkbox-item {
  align-items: flex-start;
}

.policy-employee-card {
  width: 100%;
  text-align: left;
}

.policy-employee-card.active {
  border-color: rgba(251, 146, 60, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(251, 146, 60, 0.16),
    0 16px 28px rgba(251, 146, 60, 0.12);
}

.policy-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.policy-summary-grid strong {
  display: block;
  color: #f8fafc;
  font-size: 1.05rem;
}

.policy-audit-history {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.policy-step-note {
  margin: 0;
  color: rgba(236, 244, 255, 0.82);
}

.title-with-help,
.hr-help-toolbar,
.hr-inline-help-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.title-with-help h3,
.title-with-help h4,
.title-with-help h5 {
  margin: 0;
}

.hr-help-toolbar {
  justify-content: flex-end;
}

.hr-ai-help-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.hr-ai-help-trigger:hover,
.hr-ai-help-trigger:focus-visible,
.hr-ai-help-trigger.is-open {
  border-color: rgba(251, 146, 60, 0.56);
  background: rgba(30, 41, 59, 0.92);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.28);
  transform: translateY(-1px);
}

.hr-ai-help-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.28), rgba(248, 113, 113, 0.24));
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hr-ai-help-trigger-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.8rem;
  transition: max-width 0.18s ease, opacity 0.18s ease;
  opacity: 0;
}

.hr-help-mode-active .hr-ai-help-trigger-label,
.hr-ai-help-trigger:hover .hr-ai-help-trigger-label,
.hr-ai-help-trigger:focus-visible .hr-ai-help-trigger-label,
.hr-ai-help-trigger.is-open .hr-ai-help-trigger-label {
  max-width: 72px;
  opacity: 1;
}

.hr-help-mode-toggle {
  min-width: 140px;
}

.hr-help-mode-active .hr-help-mode-toggle {
  border-color: rgba(251, 146, 60, 0.44);
  box-shadow: 0 12px 22px rgba(251, 146, 60, 0.14);
}

.hr-inline-help-tooltip,
.hr-inline-help-popover {
  position: fixed;
  z-index: 1200;
  width: min(320px, calc(100vw - 24px));
  border-radius: 18px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.14), transparent 35%),
    linear-gradient(180deg, rgba(8, 13, 24, 0.98), rgba(15, 23, 42, 0.96));
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(14px);
}

.hr-inline-help-tooltip {
  padding: 12px 14px;
  pointer-events: none;
}

.hr-inline-help-tooltip strong,
.hr-inline-help-popover h4 {
  display: block;
  margin: 0 0 6px;
  color: #f8fafc;
}

.hr-inline-help-tooltip p,
.hr-inline-help-popover p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.55;
}

.hr-inline-help-popover {
  padding: 16px 18px;
}

.hr-inline-help-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hr-inline-help-popover-head .pill {
  flex-shrink: 0;
}

.hr-inline-help-popover-grid {
  display: grid;
  gap: 12px;
}

.hr-inline-help-copy-block {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.46);
  background: rgba(15, 23, 42, 0.68);
}

.hr-inline-help-copy-block span {
  display: block;
  margin-bottom: 5px;
  color: #fde68a;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hr-inline-help-copy-block.is-caution span {
  color: #fca5a5;
}

@media (max-width: 900px) {
  .hr-help-toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .hr-inline-help-tooltip,
  .hr-inline-help-popover {
    width: min(320px, calc(100vw - 20px));
  }
}

.policy-step-shell {
  display: grid;
  gap: 18px;
}

.policy-step-shell .field input,
.policy-step-shell .field textarea {
  color: #ecf4ff;
  background: rgba(8, 13, 24, 0.68);
  border: 1px solid rgba(124, 148, 189, 0.18);
}

.policy-step-shell .checkbox-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(124, 148, 189, 0.18);
}

@media (max-width: 980px) {
  .reports-filter-grid,
  .reports-kpi-grid,
  .reports-product-kpi-grid,
  .reports-product-ranking-grid,
  .warning-kpi-grid,
  .attendance-kpi-grid,
  .attendance-alert-meta,
  .hr-attendance-insight-grid,
  .leave-workspace-grid,
  .leave-balance-grid,
  .attendance-overtime-grid,
  .attendance-overtime-form-grid,
  .leave-request-form-grid,
  .hr-salary-toolbar,
  .hr-salary-form-grid,
  .hr-salary-workflow-grid,
  .assignment-metrics-grid,
  .hr-document-review-grid,
  .attendance-export-grid,
  .hr-holiday-form-grid,
  .attendance-shift-grid,
  .attendance-team-card-grid,
  .hr-salary-overview-grid,
  .hr-salary-main-grid,
  .hr-salary-history-layout,
  .hr-salary-summary-grid,
  .hr-policy-grid,
  .policy-summary-grid,
  .policy-audit-history,
  .reports-layout,
  .warning-layout,
  .warning-layout-bottom,
  .reports-layout-bottom,
  .reports-activity-grid,
  .reports-trend-chart,
  .live-agent-board-grid,
  .live-alert-feed,
  .warning-daily-chart {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .hr-salary-directory-card {
    position: static;
  }

  .hr-salary-tabs,
  .hr-salary-toolbar,
  .hr-salary-form-grid,
  .hr-salary-workflow-grid,
  .hr-salary-summary-grid {
    grid-template-columns: 1fr;
  }

  .hr-salary-action-row,
  .hr-salary-action-groups,
  .hr-salary-secondary-actions {
    justify-content: flex-start;
  }
}

.hr-role-ai-panel,
.employee-draft-assistant-card,
.employee-draft-output-card {
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.97), rgba(15, 23, 42, 0.94));
}

.hr-role-ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.hr-role-ai-card {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 18px;
  border-radius: 22px;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(71, 85, 105, 0.55);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hr-role-ai-card:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 146, 60, 0.34);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.hr-role-ai-card.active {
  background: rgba(251, 146, 60, 0.09);
  border-color: rgba(251, 146, 60, 0.34);
  box-shadow: 0 18px 34px rgba(251, 146, 60, 0.12);
}

.hr-role-ai-card-head,
.employee-draft-presets {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hr-role-ai-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.84);
}

.hr-role-ai-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hr-role-ai-tips span {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.18);
  font-size: 0.84rem;
}

.hr-role-ai-detail {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.hr-role-ai-detail strong {
  color: #fed7aa;
}

.hr-role-ai-detail p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
}

.employee-draft-presets {
  margin-top: 12px;
  justify-content: flex-start;
}

.employee-draft-presets .ghost-button {
  border-radius: 999px;
  padding: 10px 14px;
}

.employee-draft-modal {
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.99), rgba(15, 23, 42, 0.98));
  color: #e2e8f0;
}

.employee-draft-modal .muted {
  color: rgba(203, 213, 225, 0.78);
}

.employee-draft-modal .panel {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(71, 85, 105, 0.5);
}

.employee-draft-modal .ghost-button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(100, 116, 139, 0.5);
}

.employee-draft-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-draft-modal-presets {
  margin: 14px 0 6px;
}

.employee-draft-output {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.employee-draft-copy {
  padding: 16px 18px;
  border-radius: 18px;
  white-space: pre-wrap;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(71, 85, 105, 0.55);
}

.employee-draft-body-copy {
  min-height: 180px;
}

.location-master-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.search-select {
  position: relative;
}

.search-select-input {
  width: 100%;
  min-height: 44px;
  padding: 12px 80px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search-select-input::placeholder {
  color: #64748b;
}

.search-select-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.7);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.search-select.is-disabled .search-select-input {
  cursor: not-allowed;
  opacity: 0.7;
}

.search-select-clear {
  position: absolute;
  top: 9px;
  right: 10px;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(226, 232, 240, 0.88);
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.search-select-clear:hover,
.search-select-clear:focus-visible {
  color: #0f172a;
  background: rgba(203, 213, 225, 0.95);
  outline: none;
}

.search-select.is-disabled .search-select-clear {
  cursor: not-allowed;
  opacity: 0.55;
}

.search-select-menu {
  position: absolute;
  z-index: 18;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.search-select-option,
.search-select-empty {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
}

.search-select-option {
  background: transparent;
  color: #0f172a;
  cursor: pointer;
}

.search-select-option:hover,
.search-select-option:focus-visible {
  background: rgba(241, 245, 249, 0.95);
  outline: none;
}

.search-select-option-label {
  display: block;
  font-weight: 600;
}

.search-select-option-meta {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.search-select-extra-row {
  width: 100%;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  margin-top: 8px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  background: #ffffff;
  color: #475569;
}

.search-select-extra-row.is-action {
  cursor: pointer;
}

.search-select-extra-row.is-action:hover,
.search-select-extra-row.is-action:focus-visible {
  background: #f8fbff;
  outline: none;
}

.search-select-extra-row.is-disabled,
.search-select-extra-row.is-info {
  color: #64748b;
}

.search-select-extra-row.is-success {
  border-color: rgba(45, 212, 191, 0.25);
  color: #0f766e;
}

.search-select-empty {
  background: #ffffff;
  color: #64748b;
}

.search-select-empty.is-error {
  background: rgba(254, 242, 242, 0.96);
  color: #991b1b;
}

.search-select-helper {
  margin: 10px 0 0;
  font-size: 13px;
}

.search-select-helper.is-error {
  color: #fca5a5;
}

.search-select-helper.is-info {
  color: #7dd3fc;
}

.lead-origin-state-stack {
  display: grid;
  gap: 8px;
}

.lead-modal .search-select-input {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.lead-form .search-select-input {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--text);
}

.lead-modal .search-select-input::placeholder {
  color: rgba(71, 85, 105, 0.52);
}

.lead-modal .search-select.is-disabled .search-select-input {
  background: rgba(248, 250, 252, 0.94);
  color: rgba(100, 116, 139, 0.92);
}

.lead-modal .search-select-clear {
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.lead-modal .search-select-clear:hover,
.lead-modal .search-select-clear:focus-visible {
  background: rgba(241, 245, 249, 0.98);
  color: var(--text);
}

.lead-modal .search-select-menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.92);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.lead-modal .search-select-extra-row,
.lead-form .search-select-extra-row {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(148, 163, 184, 0.24);
  color: var(--text);
}

.lead-modal .search-select-extra-row.is-action:hover,
.lead-modal .search-select-extra-row.is-action:focus-visible,
.lead-form .search-select-extra-row.is-action:hover,
.lead-form .search-select-extra-row.is-action:focus-visible {
  background: rgba(241, 245, 249, 0.98);
}

.lead-modal .search-select-extra-row.is-disabled,
.lead-modal .search-select-extra-row.is-info,
.lead-form .search-select-extra-row.is-disabled,
.lead-form .search-select-extra-row.is-info {
  color: #64748b;
}

.lead-form .search-select-menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.92);
}

.lead-modal .search-select-option {
  color: var(--text);
}

.lead-modal .search-select-option:hover,
.lead-modal .search-select-option:focus-visible {
  background: rgba(241, 245, 249, 0.96);
}

.lead-modal .search-select-option-meta,
.lead-modal .search-select-empty,
.lead-modal .search-select-helper {
  color: #64748b;
}

.lead-modal .search-select-empty {
  background: rgba(248, 250, 252, 0.96);
}

.lead-modal .search-select-helper.is-error {
  color: #dc2626;
}

.lead-modal .search-select-helper.is-info {
  color: #0369a1;
}

@media (max-width: 680px) {
  .reports-filter-grid,
  .reports-kpi-grid,
  .reports-product-kpi-grid,
  .reports-product-ranking-grid,
  .warning-kpi-grid,
  .attendance-kpi-grid,
  .attendance-alert-meta,
  .hr-attendance-insight-grid,
  .hr-role-ai-grid,
  .leave-workspace-grid,
  .leave-balance-grid,
  .attendance-overtime-grid,
  .attendance-overtime-form-grid,
  .leave-request-form-grid,
  .assignment-metrics-grid,
  .hr-document-review-grid,
  .attendance-export-grid,
  .hr-holiday-form-grid,
  .attendance-shift-grid,
  .attendance-team-card-grid,
  .hr-salary-overview-grid,
  .hr-salary-main-grid,
  .hr-salary-history-layout,
  .hr-salary-toolbar,
  .hr-policy-grid,
  .policy-summary-grid,
  .policy-audit-history,
  .reports-layout,
  .warning-layout,
  .warning-layout-bottom,
  .reports-layout-bottom,
  .reports-activity-grid,
  .reports-trend-chart,
  .live-agent-board-grid,
  .live-alert-feed,
  .warning-daily-chart {
    grid-template-columns: 1fr;
  }

  .reports-trend-bar {
    min-height: 120px;
  }

  .attendance-action-bar,
  .attendance-team-controls,
  .attendance-export-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-draft-form-grid {
    grid-template-columns: 1fr;
  }

  .master-form-grid,
  .location-master-grid,
  .itinerary-day-grid {
    grid-template-columns: 1fr;
  }

  .lead-itinerary-modal-actions {
    padding-left: 0;
    padding-right: 0;
  }

  .hr-summary-grid {
    grid-template-columns: 1fr;
  }
}

.module-dashboard-section {
  display: grid;
  gap: 24px;
}

.lead-workspace .pipeline-panel {
  border: 1px solid rgba(110, 198, 255, 0.16);
  box-shadow: 0 24px 60px rgba(4, 10, 20, 0.34);
}

.module-dashboard-widget-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.module-dashboard-detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.module-dashboard-marketing-premium .module-dashboard-hero {
  border: 1px solid rgba(93, 122, 169, 0.22);
  background:
    radial-gradient(circle at top right, rgba(35, 99, 186, 0.22), transparent 45%),
    linear-gradient(140deg, rgba(4, 12, 26, 0.96), rgba(8, 21, 42, 0.95));
}

.module-dashboard-marketing-premium .module-dashboard-audit-panel {
  border-color: rgba(88, 112, 154, 0.2);
  background: rgba(6, 17, 34, 0.88);
}

.marketing-premium-kpi {
  min-height: 146px;
}

.marketing-premium-kpi-violet::after {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), rgba(139, 92, 246, 0));
}

.marketing-premium-kpi-cyan::after {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.32), rgba(34, 211, 238, 0));
}

.marketing-premium-kpi-amber::after {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.3), rgba(251, 191, 36, 0));
}

.marketing-premium-kpi-blue::after {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0));
}

.marketing-premium-kpi-green::after {
  background: radial-gradient(circle, rgba(52, 211, 153, 0.3), rgba(52, 211, 153, 0));
}

.module-dashboard-marketing-premium .module-dashboard-detail-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.module-dashboard-marketing-premium .marketing-premium-panel {
  min-height: 0;
  border: 1px solid rgba(88, 112, 154, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(8, 19, 37, 0.9);
}

.module-dashboard-marketing-premium .marketing-premium-chart-panel {
  grid-column: span 7;
}

.module-dashboard-marketing-premium .marketing-premium-destination-panel {
  grid-column: span 5;
}

.module-dashboard-marketing-premium .marketing-premium-ai-panel,
.module-dashboard-marketing-premium .marketing-premium-trend-panel {
  grid-column: span 4;
}

.module-dashboard-marketing-premium .marketing-premium-source-panel,
.module-dashboard-marketing-premium .marketing-premium-funnel-panel {
  grid-column: span 6;
}

.module-dashboard-marketing-premium .marketing-premium-leads-panel {
  grid-column: span 8;
}

.module-dashboard-marketing-premium .module-dashboard-detail-grid > .panel:last-child {
  grid-column: span 12;
}

.marketing-premium-package-table {
  display: grid;
  gap: 10px;
}

.marketing-premium-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(14, 30, 54, 0.52);
  border: 1px solid rgba(98, 126, 171, 0.2);
}

.marketing-premium-row p,
.marketing-premium-bar-row p,
.marketing-premium-ai-row p,
.marketing-premium-trend-row p {
  margin: 0;
  color: #f4f8ff;
}

.marketing-premium-row span,
.marketing-premium-bar-row span,
.marketing-premium-ai-row strong,
.marketing-premium-trend-row span {
  color: rgba(210, 224, 246, 0.82);
  font-size: 0.9rem;
}

.marketing-premium-bars,
.marketing-premium-ai-list,
.marketing-premium-trend-list {
  display: grid;
  gap: 10px;
}

.marketing-premium-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
}

.marketing-premium-bar-track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(104, 128, 169, 0.24);
  overflow: hidden;
}

.marketing-premium-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.9), rgba(59, 130, 246, 0.95));
}

.marketing-premium-ai-row,
.marketing-premium-trend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(13, 28, 50, 0.48);
  border: 1px solid rgba(87, 111, 150, 0.18);
}

.marketing-premium-source-list,
.marketing-premium-funnel-list {
  display: grid;
  gap: 10px;
}

.marketing-premium-source-row,
.marketing-premium-funnel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(13, 28, 50, 0.46);
  border: 1px solid rgba(87, 111, 150, 0.18);
}

.marketing-premium-source-row p,
.marketing-premium-funnel-row p {
  margin: 0;
  color: #f4f8ff;
}

.marketing-premium-source-row span,
.marketing-premium-funnel-row span {
  color: rgba(210, 224, 246, 0.82);
  font-size: 0.88rem;
}

.marketing-premium-source-row i,
.marketing-premium-funnel-row i {
  grid-column: 1 / -1;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.9), rgba(59, 130, 246, 0.95));
}

.marketing-premium-empty {
  color: rgba(210, 224, 246, 0.72);
  font-size: 0.92rem;
}

.module-dashboard-detail-grid .panel {
  min-width: 0;
  overflow: hidden;
}

.module-dashboard-detail-grid .activity-list {
  min-width: 0;
}

.module-dashboard-detail-grid .activity-item {
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
}

.module-dashboard-detail-grid .activity-item p,
.module-dashboard-detail-grid .activity-item span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.module-dashboard-detail-grid .detail-action-row {
  flex-wrap: wrap;
  min-width: 0;
}

.marketing-subpanel-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(62vh, 760px);
}

.marketing-subpanel-scroll .activity-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.marketing-subpanel-scroll .activity-list::-webkit-scrollbar {
  width: 8px;
}

.marketing-subpanel-scroll .activity-list::-webkit-scrollbar-thumb {
  background: rgba(107, 122, 151, 0.42);
  border-radius: 999px;
}

.marketing-catalog-search-input {
  min-width: 220px;
  flex: 1 1 260px;
  max-width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(105, 122, 148, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0 12px;
}

.marketing-catalog-scroll-list {
  height: clamp(260px, 46vh, 420px);
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 6px;
}

.marketing-catalog-scroll-list::-webkit-scrollbar {
  width: 8px;
}

.marketing-catalog-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(107, 122, 151, 0.42);
  border-radius: 999px;
}

.marketing-package-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.module-dashboard-detail-grid .marketing-packages-detail-panel {
  grid-column: 1 / -1;
}

.marketing-package-editor-pane {
  min-width: 0;
  border: 1px solid rgba(120, 139, 170, 0.2);
  border-radius: 8px;
  padding: 14px;
  background: rgba(246, 250, 255, 0.52);
}

.marketing-package-editor-form {
  display: grid;
  gap: 10px;
}

.marketing-package-row-selected {
  border-color: rgba(59, 130, 246, 0.44) !important;
  background: rgba(219, 234, 254, 0.46) !important;
}

.marketing-packages-kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.marketing-packages-kpi-card {
  min-height: 88px;
  padding: 12px 14px;
  border-radius: 12px;
}

.marketing-packages-kpi-card p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(214, 224, 243, 0.78);
}

.marketing-packages-kpi-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  color: #f4f8ff;
}

.marketing-packages-filter-select {
  min-width: 160px;
  width: auto;
  max-width: 220px;
  flex: 0 0 180px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(105, 122, 148, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0 10px;
}

.marketing-packages-filters-bar .marketing-catalog-search-input {
  flex: 1 1 320px;
  min-width: 260px;
}

.marketing-packages-table-wrap {
  margin-bottom: 12px;
  max-height: min(560px, calc(100vh - 430px));
  min-height: 360px;
  overflow: auto;
  border: 1px solid rgba(120, 139, 170, 0.22);
  border-radius: 12px;
  background: rgba(12, 20, 36, 0.58);
  scrollbar-color: rgba(148, 163, 184, 0.42) rgba(8, 18, 34, 0.52);
  scrollbar-width: thin;
}

.marketing-packages-table-wrap::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.marketing-packages-table-wrap::-webkit-scrollbar-track {
  background: rgba(8, 18, 34, 0.52);
  border-radius: 999px;
}

.marketing-packages-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.42);
  border-radius: 999px;
}

.marketing-packages-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(203, 213, 225, 0.58);
}

.marketing-packages-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1260px;
}

.marketing-packages-table th,
.marketing-packages-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(128, 150, 184, 0.16);
  text-align: left;
  vertical-align: top;
}

.marketing-packages-table th {
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: rgba(212, 226, 248, 0.74);
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(6, 16, 31, 0.98);
}

.marketing-packages-table td {
  font-size: 0.84rem;
  color: #ebf3ff;
}

.marketing-packages-table td .muted {
  font-size: 0.73rem;
}

.marketing-packages-table-row-selected {
  background: rgba(59, 130, 246, 0.14);
}

.marketing-governance-row {
  margin-top: 10px;
}

.marketing-packages-detail-panel.is-package-builder-open {
  max-height: none !important;
  overflow: visible;
  padding: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(14, 165, 233, 0.12), transparent 28%),
    radial-gradient(circle at 84% 6%, rgba(249, 115, 22, 0.13), transparent 26%),
    linear-gradient(135deg, #06111f 0%, #0a1627 48%, #091423 100%) !important;
  border-color: rgba(69, 91, 126, 0.42);
}

.marketing-packages-detail-panel.is-package-builder-open .marketing-packages-titlebar {
  display: none;
}

.marketing-packages-detail-panel.is-package-builder-open .marketing-packages-command-shell {
  display: none !important;
}

.marketing-package-builder-open-shell {
  padding: 16px 24px 24px;
}

.marketing-package-builder-open-shell .marketing-package-editor-form {
  display: grid;
  gap: 14px;
  color: #ecf6ff;
}

.marketing-package-builder-open-shell .marketing-package-builder-head {
  margin: 0;
  padding: 0 0 8px;
  align-items: center;
}

.marketing-package-builder-open-shell .marketing-package-builder-head h3 {
  margin: 4px 0 2px;
  color: #f8fbff;
  font-size: clamp(1.35rem, 1.45vw, 1.9rem);
  letter-spacing: 0;
}

.marketing-package-builder-open-shell .marketing-package-builder-head .muted,
.marketing-package-builder-open-shell .eyebrow {
  color: rgba(205, 219, 241, 0.78);
}

.marketing-package-builder-open-shell .marketing-package-builder-action-stack .detail-action-row {
  justify-content: flex-end;
}

.marketing-package-builder-open-shell .marketing-package-builder-action-stack .primary-button {
  min-height: 42px;
  padding-inline: 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7a1a, #f15b22);
  color: #fff8ef;
  box-shadow: 0 16px 34px rgba(241, 91, 34, 0.26);
}

.marketing-package-builder-open-shell .marketing-package-builder-action-stack .ghost-button {
  min-height: 40px;
  border-radius: 10px;
  border-color: rgba(128, 149, 184, 0.38);
  background: rgba(5, 15, 29, 0.76);
  color: #ecf6ff;
}

.marketing-package-builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.marketing-package-builder-action-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(100%, 520px);
}

.marketing-package-autosave-pill {
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: #bbf7d0;
  background: rgba(12, 74, 110, 0.18);
  font-size: 0.75rem;
}

.marketing-package-builder-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: 12px;
  overflow-x: auto;
  border: 1px solid rgba(73, 92, 122, 0.34);
  border-radius: 12px;
  background: rgba(4, 13, 25, 0.72);
  scrollbar-width: thin;
}

.marketing-package-builder-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1 0 max-content;
  min-width: 142px;
  justify-content: center;
  border: 0;
  border-right: 1px solid rgba(111, 135, 170, 0.16);
  border-radius: 0;
  padding: 13px 18px;
  font-size: 0.78rem;
  color: rgba(210, 224, 246, 0.78);
  background: transparent;
  cursor: pointer;
}

.marketing-package-builder-step::after {
  content: "→";
  position: absolute;
  right: -7px;
  color: rgba(139, 156, 185, 0.42);
  z-index: 1;
}

.marketing-package-builder-step:last-child::after {
  content: "";
}

.marketing-package-builder-step strong {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 211, 153, 0.14);
  color: #9ff4d4;
  font-size: 0.72rem;
}

.marketing-package-builder-step.is-active {
  border-color: rgba(249, 115, 22, 0.28);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.16), rgba(249, 115, 22, 0.04));
  color: #ffe0c1;
}

.marketing-package-builder-step.is-active::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #f97316;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.62);
}

.marketing-package-builder-step.is-active strong {
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #fff7ed;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

.marketing-package-builder-step.is-complete strong {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.marketing-package-overview-highlight-panel {
  border: 1px solid rgba(105, 128, 166, 0.22);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(8, 17, 32, 0.82), rgba(21, 30, 52, 0.58));
}

.marketing-package-highlight-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
  margin-top: 8px;
}

.marketing-package-highlight-row article {
  border: 1px solid rgba(105, 128, 166, 0.22);
  border-radius: 12px;
  padding: 10px;
  background: rgba(3, 10, 22, 0.48);
}

.marketing-package-highlight-row strong,
.marketing-package-highlight-row small {
  display: block;
}

.marketing-package-highlight-row small {
  margin-top: 4px;
  color: rgba(203, 218, 240, 0.72);
}

.marketing-package-editor-form.is-builder-step-overview .marketing-itinerary-tab-host,
.marketing-package-editor-form.is-builder-step-overview .marketing-gallery-tab-host,
.marketing-package-editor-form.is-builder-step-overview .marketing-policies-tab-host,
.marketing-package-editor-form.is-builder-step-overview .marketing-itinerary-raw-field {
  display: none;
}

.marketing-package-editor-form.is-builder-step-overview .marketing-catalog-assist-actions,
.marketing-package-editor-form.is-builder-step-itinerary .marketing-catalog-assist-actions {
  display: none !important;
}

.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="inclusions"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="exclusions"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="faq_entries"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="focus_keywords"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="meta_title"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="meta_description"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="canonical_url"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="package_images"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > label:has([data-editor-field="story_cards"]),
.marketing-package-editor-form.is-builder-step-overview .marketing-package-builder-grid > div:has([data-editor-field="media_source_url"]) {
  display: none;
}

.marketing-package-editor-form.is-builder-step-itinerary .marketing-package-builder-sidebar {
  display: none;
}

.marketing-package-editor-form.is-builder-step-itinerary .marketing-package-builder-layout {
  grid-template-columns: 1fr;
}

.marketing-package-editor-form.is-builder-step-itinerary .marketing-package-builder-grid {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
}

.marketing-package-editor-form.is-builder-step-itinerary .marketing-package-builder-grid > *:not(.marketing-itinerary-tab-host) {
  display: none;
}

.marketing-package-editor-form.is-builder-step-itinerary .marketing-itinerary-tab-host {
  display: block;
}

.marketing-package-editor-form.is-builder-step-gallery .marketing-package-builder-sidebar {
  display: none;
}

.marketing-package-editor-form.is-builder-step-gallery .marketing-package-builder-layout {
  grid-template-columns: 1fr;
}

.marketing-package-editor-form.is-builder-step-gallery .marketing-package-builder-grid {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.marketing-package-editor-form.is-builder-step-gallery .marketing-package-builder-grid > *:not(.marketing-gallery-tab-host) {
  display: none;
}

.marketing-package-editor-form.is-builder-step-gallery .marketing-gallery-tab-host {
  display: block;
}

.marketing-package-editor-form.is-builder-step-policies .marketing-package-builder-sidebar {
  display: none;
}

.marketing-package-editor-form.is-builder-step-policies .marketing-package-builder-layout {
  grid-template-columns: 1fr;
}

.marketing-package-editor-form.is-builder-step-policies .marketing-package-builder-grid {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.marketing-package-editor-form.is-builder-step-policies .marketing-package-builder-grid > *:not(.marketing-policies-tab-host) {
  display: none;
}

.marketing-package-editor-form.is-builder-step-policies .marketing-policies-tab-host {
  display: block;
}

.marketing-package-editor-form:not(.is-builder-step-policies) .marketing-policies-tab-host {
  display: none;
}

.marketing-package-editor-form:not(.is-builder-step-gallery) .marketing-gallery-tab-host {
  display: none;
}

.marketing-gallery-builder {
  color: #eef6ff;
}

.marketing-gallery-hero,
.marketing-gallery-section,
.marketing-gallery-ai-card,
.marketing-gallery-summary-card {
  border: 1px solid rgba(91, 116, 154, 0.3);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 146, 60, 0.08), transparent 26%),
    radial-gradient(circle at 94% 0%, rgba(99, 102, 241, 0.12), transparent 28%),
    rgba(5, 16, 31, 0.9);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.marketing-gallery-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  margin-bottom: 14px;
}

.marketing-gallery-hero h3,
.marketing-gallery-section h4,
.marketing-gallery-ai-card h4,
.marketing-gallery-summary-card h4 {
  margin: 0;
  color: #fff7ed;
}

.marketing-gallery-hero p,
.marketing-gallery-section-head p,
.marketing-gallery-card-copy span,
.marketing-gallery-upload-card span,
.marketing-gallery-saved-note {
  color: rgba(205, 219, 241, 0.72);
}

.marketing-gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.marketing-gallery-tabs,
.marketing-gallery-ai-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.marketing-gallery-tabs button,
.marketing-gallery-ai-tabs button {
  border: 1px solid rgba(91, 116, 154, 0.34);
  border-radius: 10px;
  padding: 9px 14px;
  color: rgba(226, 236, 251, 0.86);
  background: rgba(3, 10, 22, 0.62);
}

.marketing-gallery-tabs button.is-active,
.marketing-gallery-ai-tabs button.is-active {
  border-color: rgba(251, 146, 60, 0.72);
  color: #fff7ed;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.82), rgba(251, 146, 60, 0.28));
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.2);
}

.marketing-gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.32fr);
  gap: 14px;
}

.marketing-gallery-main {
  display: grid;
  gap: 14px;
}

.marketing-gallery-section {
  padding: 16px;
}

.marketing-gallery-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.marketing-gallery-section-head p {
  margin: 4px 0 0;
}

.marketing-gallery-hero-strip,
.marketing-gallery-grid {
  display: grid;
  gap: 12px;
}

.marketing-gallery-hero-strip {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  overflow-x: auto;
  padding-bottom: 4px;
}

.marketing-gallery-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.marketing-gallery-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(91, 116, 154, 0.28);
  border-radius: 14px;
  background: rgba(3, 10, 22, 0.72);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.marketing-gallery-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 146, 60, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.marketing-gallery-card-hero:first-child {
  border-color: rgba(251, 191, 36, 0.86);
}

.marketing-gallery-card-media {
  position: relative;
  min-height: 132px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88));
}

.marketing-gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marketing-gallery-empty-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(226, 236, 251, 0.58);
}

.marketing-gallery-card-tools {
  position: absolute;
  inset: 8px 8px auto 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.marketing-gallery-card-tools span,
.marketing-gallery-badge {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.marketing-gallery-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  color: #fde68a;
}

.marketing-gallery-card-copy {
  padding: 10px 10px 4px;
}

.marketing-gallery-card-copy strong,
.marketing-gallery-card-copy span {
  display: block;
}

.marketing-gallery-mini-actions {
  display: flex;
  gap: 6px;
  padding: 8px 10px 10px;
}

.marketing-gallery-mini-actions button {
  flex: 1;
  border: 1px solid rgba(91, 116, 154, 0.28);
  border-radius: 9px;
  padding: 6px 8px;
  color: rgba(226, 236, 251, 0.88);
  background: rgba(15, 23, 42, 0.82);
}

.marketing-gallery-upload-card,
.marketing-gallery-dropzone {
  border: 1px dashed rgba(148, 163, 184, 0.38);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  background: rgba(3, 10, 22, 0.46);
}

.marketing-gallery-dropzone {
  display: grid;
  gap: 10px;
  min-height: 130px;
  align-content: center;
}

.marketing-gallery-dropzone strong {
  font-size: 18px;
}

.marketing-gallery-hidden-input {
  display: none;
}

.marketing-gallery-rail {
  display: grid;
  gap: 14px;
  align-content: start;
}

.marketing-gallery-ai-card,
.marketing-gallery-summary-card {
  padding: 16px;
}

.marketing-gallery-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.marketing-gallery-card-head span {
  color: #c4b5fd;
  font-size: 12px;
}

.marketing-gallery-suggestion {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.marketing-gallery-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.marketing-gallery-summary-grid > div {
  border: 1px solid rgba(91, 116, 154, 0.24);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.62);
}

.marketing-gallery-summary-grid strong,
.marketing-gallery-summary-grid span {
  display: block;
}

.marketing-gallery-summary-grid span {
  margin-top: 6px;
  color: #93c5fd;
  font-size: 20px;
  font-weight: 800;
}

.marketing-gallery-saved-note {
  margin: 12px 0 0;
}

.marketing-package-builder-open-shell .marketing-package-builder-layout {
  grid-template-columns: minmax(0, 2.08fr) minmax(330px, 0.9fr);
  gap: 14px;
}

.marketing-package-builder-open-shell .marketing-package-builder-grid {
  border: 1px solid rgba(81, 103, 137, 0.32);
  border-radius: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.08), transparent 30%),
    rgba(6, 17, 32, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.marketing-package-builder-open-shell .marketing-package-builder-sidebar .detail-card,
.marketing-package-builder-open-shell .marketing-package-overview-highlight-panel {
  border-radius: 14px;
  border-color: rgba(81, 103, 137, 0.32);
  background:
    radial-gradient(circle at 100% 0%, rgba(88, 80, 236, 0.11), transparent 26%),
    rgba(7, 18, 34, 0.84);
}

.marketing-package-builder-open-shell .field {
  gap: 7px;
}

.marketing-package-builder-open-shell .field span {
  color: rgba(220, 233, 255, 0.74);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.marketing-package-builder-open-shell .field input,
.marketing-package-builder-open-shell .field select,
.marketing-package-builder-open-shell .field textarea {
  width: 100%;
  border: 1px solid rgba(91, 113, 148, 0.34);
  border-radius: 10px;
  background: rgba(3, 10, 22, 0.78);
  color: #f3f8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.marketing-package-builder-open-shell .field input,
.marketing-package-builder-open-shell .field select {
  min-height: 40px;
}

.marketing-package-builder-open-shell .field textarea {
  min-height: 112px;
  resize: vertical;
}

.marketing-package-builder-open-shell .field input::placeholder,
.marketing-package-builder-open-shell .field textarea::placeholder {
  color: rgba(177, 194, 222, 0.42);
}

.marketing-package-editor-form.is-builder-step-overview .marketing-package-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marketing-package-editor-form.is-builder-step-itinerary .marketing-package-builder-grid {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.marketing-itinerary-builder {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(105, 128, 166, 0.28);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 18% 0%, rgba(59, 130, 246, 0.16), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(124, 58, 237, 0.14), transparent 30%),
    rgba(4, 12, 24, 0.72);
}

.marketing-itinerary-topline,
.marketing-itinerary-mood-row,
.marketing-itinerary-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.marketing-itinerary-topline {
  border: 1px solid rgba(105, 128, 166, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 20, 38, 0.68);
}

.marketing-itinerary-topline p {
  margin: 0;
  color: rgba(221, 235, 255, 0.82);
}

.marketing-itinerary-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(560px, 1.75fr) minmax(320px, 0.94fr);
  gap: 12px;
  align-items: start;
}

.marketing-itinerary-days-panel,
.marketing-itinerary-day-editor,
.marketing-itinerary-ai-panel,
.marketing-itinerary-section-grid article,
.marketing-itinerary-gallery-card {
  border: 1px solid rgba(105, 128, 166, 0.24);
  border-radius: 12px;
  background: rgba(7, 18, 34, 0.72);
  padding: 12px;
}

.marketing-itinerary-days-panel,
.marketing-itinerary-ai-panel {
  position: sticky;
  top: 12px;
}

.marketing-policies-builder {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(105, 128, 166, 0.26);
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.16), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(249, 115, 22, 0.14), transparent 34%),
    rgba(4, 12, 24, 0.82);
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.38);
}

.marketing-policies-hero,
.marketing-policy-trust-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(105, 128, 166, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(9, 22, 40, 0.92), rgba(15, 28, 52, 0.72));
}

.marketing-policies-hero h3,
.marketing-policy-card h4 {
  margin: 0;
  color: #f8fbff;
}

.marketing-policies-hero p,
.marketing-policy-card p,
.marketing-policy-trust-banner span {
  margin: 4px 0 0;
  color: rgba(203, 218, 240, 0.74);
}

.marketing-policy-language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(220, 233, 255, 0.72);
}

.marketing-policy-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.marketing-policy-tabs article,
.marketing-policy-card,
.marketing-policy-empty {
  border: 1px solid rgba(105, 128, 166, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(88, 80, 236, 0.1), transparent 28%),
    rgba(7, 18, 34, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.marketing-policy-tabs article {
  padding: 14px;
}

.marketing-policy-tabs article.is-active {
  border-color: rgba(251, 146, 60, 0.72);
  background:
    linear-gradient(135deg, rgba(251, 146, 60, 0.14), rgba(14, 165, 233, 0.08)),
    rgba(7, 18, 34, 0.86);
}

.marketing-policy-tabs strong,
.marketing-policy-tabs span {
  display: block;
}

.marketing-policy-tabs span {
  margin-top: 4px;
  color: rgba(203, 218, 240, 0.68);
}

.marketing-policy-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.marketing-policy-card {
  padding: 14px;
}

.marketing-policy-card-large {
  min-height: 520px;
}

.marketing-policy-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.marketing-rich-toolbar,
.marketing-policy-note,
.marketing-policy-ai-box {
  border: 1px solid rgba(105, 128, 166, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(3, 10, 22, 0.52);
}

.marketing-rich-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(221, 235, 255, 0.82);
  margin-bottom: 10px;
}

.marketing-policy-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.marketing-policy-entry {
  display: grid;
  grid-template-columns: 26px minmax(150px, 0.45fr) minmax(220px, 1fr);
  gap: 8px;
  align-items: stretch;
}

.marketing-policy-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.42);
}

.marketing-policy-entry input,
.marketing-policy-entry textarea,
.marketing-cancellation-row input,
.marketing-policy-language select {
  border: 1px solid rgba(91, 113, 148, 0.34);
  border-radius: 10px;
  background: rgba(3, 10, 22, 0.76);
  color: #f3f8ff;
}

.marketing-cancellation-table {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.marketing-cancellation-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.marketing-cancellation-row.is-head {
  color: rgba(203, 218, 240, 0.72);
  font-size: 0.78rem;
}

.marketing-refund-badge.is-success {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
}

.marketing-refund-badge.is-warning {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.marketing-refund-badge.is-danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
}

.marketing-policy-ai-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.18), rgba(15, 23, 42, 0.72));
}

.marketing-policy-ai-box span {
  color: #c4b5fd;
}

.marketing-policy-empty {
  min-height: 172px;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(203, 218, 240, 0.74);
  border-style: dashed;
}

.marketing-policy-empty strong,
.marketing-policy-empty span {
  display: block;
}

@media (max-width: 1280px) {
  .marketing-policy-grid,
  .marketing-policy-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.marketing-itinerary-panel-head,
.marketing-itinerary-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.marketing-itinerary-panel-head h4,
.marketing-itinerary-editor-head h4 {
  margin: 0;
  color: #f7fbff;
}

.marketing-itinerary-editor-head .muted {
  margin: 4px 0 0;
}

.marketing-itinerary-day-list,
.marketing-itinerary-ai-panel .activity-list {
  display: grid;
  gap: 8px;
}

.marketing-itinerary-day-list {
  max-height: min(54vh, 680px);
  overflow: auto;
  padding-right: 2px;
}

.marketing-itinerary-day-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(105, 128, 166, 0.22);
  border-radius: 10px;
  padding: 8px;
  background: rgba(9, 21, 40, 0.72);
}

.marketing-itinerary-day-card.is-active {
  border-color: rgba(249, 115, 22, 0.62);
  background: linear-gradient(135deg, rgba(67, 56, 202, 0.45), rgba(91, 33, 182, 0.2));
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.18), 0 14px 36px rgba(15, 23, 42, 0.32);
}

.marketing-itinerary-day-card img,
.marketing-itinerary-day-thumb {
  width: 72px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(30, 64, 98, 0.68);
  display: grid;
  place-items: center;
  color: rgba(218, 232, 255, 0.72);
  font-size: 0.68rem;
}

.marketing-itinerary-day-card .detail-action-row {
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 5px;
}

.marketing-itinerary-day-card strong,
.marketing-itinerary-day-card span {
  display: block;
}

.marketing-itinerary-day-card span {
  margin-top: 3px;
  color: rgba(203, 218, 240, 0.72);
  font-size: 0.72rem;
}

.marketing-itinerary-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.marketing-itinerary-summary span,
.marketing-itinerary-mood-row label,
.marketing-itinerary-check {
  border: 1px solid rgba(105, 128, 166, 0.24);
  border-radius: 999px;
  padding: 5px 9px;
  color: rgba(225, 236, 255, 0.82);
  background: rgba(8, 20, 38, 0.72);
  font-size: 0.76rem;
}

.marketing-itinerary-summary span {
  border-radius: 12px;
  text-align: center;
}

.marketing-itinerary-summary strong {
  display: block;
  color: #f8fbff;
  font-size: 0.98rem;
}

.marketing-itinerary-editor-grid {
  margin-bottom: 10px;
}

.marketing-itinerary-route-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.55fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 14px;
  margin: 10px 0;
  background:
    linear-gradient(135deg, rgba(8, 47, 73, 0.62), rgba(20, 83, 45, 0.22)),
    radial-gradient(circle at 82% 34%, rgba(250, 204, 21, 0.12), transparent 26%);
}

.marketing-itinerary-route-map strong {
  color: #f8fbff;
}

.marketing-route-line {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.marketing-route-line::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  border-top: 1px dashed rgba(250, 204, 21, 0.72);
}

.marketing-route-line span {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f1300;
  background: #f8b84e;
  font-weight: 800;
  font-size: 0.72rem;
  box-shadow: 0 0 0 4px rgba(248, 184, 78, 0.16);
}

.marketing-itinerary-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.marketing-itinerary-section-grid h5,
.marketing-itinerary-gallery-card h5 {
  margin: 0 0 8px;
  color: #f4f8ff;
}

.marketing-itinerary-section,
.marketing-itinerary-gallery {
  display: grid;
  gap: 8px;
}

.marketing-itinerary-item,
.marketing-itinerary-media-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) minmax(160px, 1.3fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(105, 128, 166, 0.18);
  border-radius: 10px;
  padding: 8px;
  background: rgba(4, 12, 24, 0.48);
}

.marketing-itinerary-media-row {
  grid-template-columns: 72px repeat(5, minmax(90px, 1fr));
}

.marketing-itinerary-drag-handle {
  color: rgba(203, 218, 240, 0.48);
  font-weight: 800;
  letter-spacing: 1px;
}

.marketing-itinerary-media-preview {
  width: 64px;
  height: 54px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(125, 159, 205, 0.32);
  color: rgba(203, 218, 240, 0.62);
  background: rgba(3, 10, 22, 0.62);
  overflow: hidden;
}

.marketing-itinerary-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketing-itinerary-item input,
.marketing-itinerary-media-row input,
.marketing-itinerary-media-row select,
.marketing-itinerary-day-editor input,
.marketing-itinerary-day-editor textarea,
.marketing-itinerary-day-editor select {
  width: 100%;
  border: 1px solid rgba(105, 128, 166, 0.28);
  border-radius: 9px;
  background: rgba(3, 10, 22, 0.72);
  color: #eef6ff;
  padding: 8px 9px;
}

.marketing-itinerary-empty-row {
  border: 1px dashed rgba(105, 128, 166, 0.28);
  border-radius: 10px;
  padding: 10px;
  color: rgba(203, 218, 240, 0.68);
}

.marketing-ai-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 7px;
  margin-bottom: 8px;
}

.marketing-ai-tabs span {
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  padding: 5px 2px;
  color: rgba(203, 218, 240, 0.72);
  font-size: 0.74rem;
}

.marketing-ai-tabs span.is-active {
  color: #e9d5ff;
  border-color: #8b5cf6;
}

.marketing-ai-suggestion-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(105, 128, 166, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(3, 10, 22, 0.42);
}

.marketing-ai-suggestion-card p,
.marketing-ai-suggestion-card span {
  margin: 0;
}

.marketing-ai-suggestion-card p {
  color: #f8fbff;
  font-weight: 800;
}

.marketing-ai-suggestion-card span {
  display: block;
  margin-top: 3px;
  color: rgba(203, 218, 240, 0.68);
  font-size: 0.75rem;
}

.marketing-itinerary-insights,
.marketing-itinerary-overview {
  border: 1px solid rgba(105, 128, 166, 0.22);
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  background: rgba(8, 20, 38, 0.64);
}

.marketing-itinerary-insights {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.marketing-score-ring {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 8px solid rgba(34, 197, 94, 0.82);
  color: #f8fbff;
  font-size: 1.55rem;
  font-weight: 800;
  background: rgba(3, 10, 22, 0.72);
}

.marketing-score-ring small {
  display: block;
  margin-top: -18px;
  font-size: 0.62rem;
  color: rgba(203, 218, 240, 0.72);
}

.marketing-itinerary-insights p {
  margin: 4px 0;
  color: rgba(221, 235, 255, 0.8);
}

.marketing-itinerary-overview h4 {
  margin: 0 0 8px;
}

.marketing-itinerary-overview p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid rgba(105, 128, 166, 0.16);
  color: rgba(203, 218, 240, 0.76);
}

.marketing-itinerary-overview strong {
  color: #f8fbff;
}

.marketing-itinerary-bottom-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(105, 128, 166, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: rgba(8, 20, 38, 0.7);
}

.marketing-package-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 12px;
}

.marketing-package-builder-main {
  min-width: 0;
}

.marketing-package-builder-grid {
  border: 1px solid rgba(120, 139, 170, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(6, 14, 28, 0.44);
}

.marketing-package-builder-sidebar {
  display: grid;
  gap: 10px;
}

.marketing-package-builder-sidebar .detail-card {
  border: 1px solid rgba(115, 137, 173, 0.22);
  border-radius: 12px;
  background: rgba(8, 17, 32, 0.72);
}

.marketing-package-builder-sidebar h4 {
  margin: 0 0 8px;
  color: #f4f8ff;
}

.marketing-package-builder-readiness-score {
  font-size: 1.45rem;
  font-weight: 700;
  color: #f4f8ff;
  margin-bottom: 8px;
}

@media (max-width: 1220px) {
  .marketing-packages-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .marketing-package-builder-layout {
    grid-template-columns: 1fr;
  }

  .marketing-package-highlight-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-itinerary-layout,
  .marketing-itinerary-section-grid {
    grid-template-columns: 1fr;
  }

  .marketing-itinerary-days-panel,
  .marketing-itinerary-ai-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .marketing-packages-kpi-grid {
    grid-template-columns: 1fr;
  }

  .marketing-package-builder-head,
  .marketing-itinerary-topline,
  .marketing-itinerary-bottom-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-package-builder-action-stack {
    justify-items: stretch;
    min-width: 0;
  }

  .marketing-package-highlight-row,
  .marketing-itinerary-summary,
  .marketing-itinerary-route-map,
  .marketing-itinerary-insights {
    grid-template-columns: 1fr;
  }

  .marketing-itinerary-item,
  .marketing-itinerary-media-row {
    grid-template-columns: 1fr;
  }

  .marketing-itinerary-media-preview {
    width: 100%;
  }
}

body[data-active-section="marketing-packages"] #moduleDashboardSection.module-dashboard-packages-premium {
  gap: 14px;
}

body[data-active-section="marketing-packages"] #workspaceShellBar {
  display: none;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection.module-dashboard-packages-premium .module-dashboard-widget-grid {
  display: none;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection.module-dashboard-packages-premium .module-dashboard-hero {
  display: none;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection.module-dashboard-packages-premium .module-dashboard-detail-grid,
body[data-active-section="marketing-packages"] #moduleDashboardSection.module-dashboard-packages-premium .module-dashboard-detail-grid.module-dashboard-detail-grid-single {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .panel {
  border: 1px solid rgba(83, 109, 150, 0.24);
  background:
    radial-gradient(circle at top right, rgba(35, 99, 186, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(8, 20, 39, 0.94);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .panel .eyebrow {
  color: rgba(196, 213, 240, 0.72);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .panel h4,
body[data-active-section="marketing-packages"] #moduleDashboardSection .panel h3,
body[data-active-section="marketing-packages"] #moduleDashboardSection .panel strong,
body[data-active-section="marketing-packages"] #moduleDashboardSection .panel p,
body[data-active-section="marketing-packages"] #moduleDashboardSection .panel th,
body[data-active-section="marketing-packages"] #moduleDashboardSection .panel td {
  color: #ecf4ff;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .panel .muted {
  color: rgba(203, 218, 240, 0.78);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .activity-item {
  background: rgba(11, 27, 51, 0.74);
  border-color: rgba(96, 126, 172, 0.22);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .activity-item span {
  color: rgba(196, 213, 240, 0.82);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-detail-panel {
  grid-column: 1 / -1;
  max-height: none !important;
  overflow: visible;
  padding: 0;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-command-shell {
  border-bottom: 1px solid rgba(105, 128, 166, 0.2);
  display: grid;
  gap: 18px;
  padding: 22px 24px 0;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-topbar,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-titlebar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-width: 0;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-menu-button,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-top-actions button {
  align-items: center;
  background: rgba(8, 19, 37, 0.92);
  border: 1px solid rgba(105, 128, 166, 0.26);
  border-radius: 14px;
  color: #eaf3ff;
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  position: relative;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-global-search {
  align-items: center;
  background: rgba(5, 14, 29, 0.82);
  border: 1px solid rgba(105, 128, 166, 0.3);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: grid;
  flex: 1 1 520px;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  max-width: 760px;
  min-height: 46px;
  min-width: 240px;
  padding: 0 12px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-global-search span {
  color: rgba(203, 218, 240, 0.76);
  font-size: 1.18rem;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-global-search input {
  background: transparent;
  border: 0;
  color: #ecf4ff;
  font-weight: 750;
  min-width: 0;
  outline: 0;
  width: 100%;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-global-search input::placeholder {
  color: rgba(195, 211, 233, 0.64);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-global-search kbd {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: rgba(218, 231, 249, 0.7);
  font-size: 0.72rem;
  padding: 4px 7px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-top-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-top-actions button span {
  align-items: center;
  background: #ef4424;
  border-radius: 999px;
  color: #fff7ed;
  display: inline-flex;
  font-size: 0.63rem;
  font-weight: 900;
  height: 17px;
  justify-content: center;
  min-width: 17px;
  padding: 0 4px;
  position: absolute;
  right: -5px;
  top: -6px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-user-chip {
  align-items: center;
  display: grid;
  gap: 0 9px;
  grid-template-columns: 36px auto;
  min-width: 154px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-user-chip span {
  align-items: center;
  background: linear-gradient(135deg, #ff6b35, #f3b562);
  border-radius: 50%;
  color: #fffaf0;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 950;
  grid-row: span 2;
  height: 36px;
  justify-content: center;
  width: 36px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-user-chip strong {
  color: #f7fbff;
  font-size: 0.9rem;
  line-height: 1.1;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-user-chip small {
  color: rgba(203, 218, 240, 0.68);
  font-size: 0.72rem;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-titlebar {
  padding-bottom: 20px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-breadcrumb {
  color: rgba(203, 218, 240, 0.68);
  font-size: 0.82rem;
  font-weight: 850;
  margin-bottom: 8px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-breadcrumb span {
  color: rgba(244, 161, 80, 0.86);
  padding: 0 8px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-titlebar h3 {
  color: #f8fbff;
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  line-height: 1.05;
  margin: 0;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-titlebar p {
  color: rgba(221, 233, 249, 0.78);
  font-size: 0.96rem;
  margin: 8px 0 0;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-title-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-title-actions .ghost-button,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-title-actions .primary-button {
  border-radius: 12px;
  min-height: 44px;
  padding: 0 20px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-title-actions .primary-button {
  background: linear-gradient(135deg, #ff7136, #f4511e);
  box-shadow: 0 16px 32px rgba(244, 81, 30, 0.18);
  color: #fffaf5;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-kpi-grid,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-filters-bar,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table-wrap,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-detail-panel > .muted,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-layout,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-governance-row {
  margin-left: 24px;
  margin-right: 24px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-kpi-card {
  border: 1px solid rgba(110, 136, 177, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(10, 22, 42, 0.92);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-kpi-card strong {
  font-size: 1.6rem;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-filters-bar .ghost-button {
  border-color: rgba(105, 128, 166, 0.34);
  background: rgba(9, 20, 38, 0.72);
  color: #d8e7ff;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-catalog-search-input,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-filter-select {
  background: rgba(7, 17, 34, 0.9);
  border-color: rgba(105, 128, 166, 0.34);
  color: #eaf3ff;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-catalog-search-input::placeholder {
  color: rgba(177, 200, 233, 0.66);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table-wrap {
  display: block;
  max-height: min(560px, calc(100vh - 430px));
  min-height: 360px;
  overflow: auto;
  border-color: rgba(96, 126, 172, 0.34);
  background: rgba(6, 16, 31, 0.88);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table {
  display: table;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table thead {
  display: table-header-group;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table tbody {
  display: table-row-group;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table tr {
  display: table-row;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table th,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table td {
  display: table-cell;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table th {
  color: rgba(178, 201, 234, 0.8);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table tr:hover td {
  background: rgba(36, 94, 178, 0.1);
}

@media (max-width: 1180px) {
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-topbar,
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-titlebar {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-global-search,
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-title-actions {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 760px) {
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-command-shell {
    padding: 18px 14px 0;
  }

  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-kpi-grid,
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-filters-bar,
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-table-wrap,
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-detail-panel > .muted,
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-layout,
  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-governance-row {
    margin-left: 14px;
    margin-right: 14px;
  }

  body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-packages-top-actions {
    flex-wrap: wrap;
  }
}


.module-dashboard-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(14, 18, 28, 0.92);
  border: 1px solid rgba(132, 157, 199, 0.18);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.module-dashboard-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -48px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.22), rgba(79, 172, 254, 0));
  pointer-events: none;
}

.module-dashboard-card-head,
.module-dashboard-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.module-dashboard-card-head strong,
.module-dashboard-owner-card strong {
  font-size: 1rem;
  color: #f4f8ff;
}

.module-dashboard-card p,
.module-dashboard-owner-card p {
  margin: 0;
  color: rgba(214, 224, 243, 0.74);
}

.assistant-widget {
  z-index: 40;
}

.assistant-widget[data-assistant-mode="listening"] .assistant-launcher,
.assistant-widget[data-assistant-mode="active_listening"] .assistant-launcher,
.assistant-widget[data-assistant-mode="passive_listening"] .assistant-launcher {
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.28),
    0 0 42px rgba(34, 211, 238, 0.28);
}

.assistant-widget[data-assistant-mode="processing"] .assistant-launcher {
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.28),
    0 0 42px rgba(59, 130, 246, 0.3);
}

.assistant-widget[data-assistant-mode="speaking"] .assistant-launcher {
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.28),
    0 0 42px rgba(251, 146, 60, 0.3);
}

.assistant-widget[data-assistant-mode="error"] .assistant-launcher {
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.28),
    0 0 42px rgba(239, 68, 68, 0.3);
}

.assistant-launcher {
  position: relative;
  overflow: hidden;
  min-width: 248px;
  padding-left: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.2), transparent 28%),
    linear-gradient(135deg, #08111f 0%, #0f1b2d 42%, #102e4a 100%);
}

.assistant-launcher::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.16), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.assistant-launcher-ping {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #67e8f9;
  box-shadow: 0 0 0 0 rgba(103, 232, 249, 0.55);
  animation: assistantLauncherPulse 1800ms ease-out infinite;
}

.assistant-widget[data-assistant-mode="processing"] .assistant-launcher-ping {
  background: #60a5fa;
}

.assistant-widget[data-assistant-mode="speaking"] .assistant-launcher-ping {
  background: #fb923c;
}

.assistant-widget[data-assistant-mode="error"] .assistant-launcher-ping {
  background: #f87171;
}

.assistant-launcher-icon,
.assistant-popup-icon {
  position: relative;
  border: 1px solid rgba(125, 211, 252, 0.16);
  background:
    radial-gradient(circle at 30% 30%, rgba(125, 211, 252, 0.32), rgba(125, 211, 252, 0.08)),
    rgba(255, 255, 255, 0.06);
}

.assistant-launcher-icon::after,
.assistant-popup-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.assistant-launcher-text {
  gap: 4px;
}

.assistant-launcher-text strong {
  letter-spacing: 0.04em;
}

.assistant-launcher-text small {
  color: rgba(191, 219, 254, 0.86);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.assistant-popup {
  width: min(460px, calc(100vw - 32px));
  border-radius: 32px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.1), transparent 26%),
    radial-gradient(circle at 85% 12%, rgba(59, 130, 246, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(5, 14, 26, 0.98), rgba(9, 22, 39, 0.97));
  box-shadow:
    0 34px 90px rgba(2, 8, 23, 0.44),
    inset 0 1px 0 rgba(191, 219, 254, 0.08);
}

.assistant-popup-header {
  background:
    linear-gradient(135deg, rgba(5, 14, 26, 0.94), rgba(14, 40, 68, 0.92)),
    linear-gradient(90deg, rgba(34, 211, 238, 0.18), transparent);
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

.assistant-popup-title .eyebrow {
  color: rgba(125, 211, 252, 0.74);
}

.assistant-popup-title h3 {
  color: #e0f2fe;
}

.assistant-popup-body {
  gap: 18px;
  padding: 18px;
  color: #dbeafe;
}

.assistant-command-deck,
.assistant-system-bar,
.assistant-quick-actions-shell,
.assistant-transcript-shell,
.assistant-chat-form,
.assistant-confirmation-panel,
.copilot-voice-toolbar {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background: rgba(7, 19, 33, 0.72);
  box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.04);
}

.assistant-command-deck {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
}

.assistant-command-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-self: stretch;
}

.assistant-command-grid::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.22);
  box-shadow: 0 0 0 8px rgba(14, 165, 233, 0.04);
}

.assistant-command-grid span {
  min-height: 34px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.14), rgba(14, 165, 233, 0.03));
}

.assistant-command-copy {
  display: grid;
  gap: 8px;
}

.assistant-command-copy h4,
.assistant-section-heading h4 {
  margin: 0;
  color: #f8fafc;
}

.assistant-intro {
  padding: 0;
  background: transparent;
  color: rgba(191, 219, 254, 0.82);
  line-height: 1.6;
}

.assistant-command-meta,
.assistant-system-bar,
.assistant-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.assistant-system-bar {
  padding: 14px;
  border-radius: 22px;
}

.assistant-system-card {
  flex: 1 1 120px;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.1);
  background: linear-gradient(180deg, rgba(15, 31, 51, 0.84), rgba(8, 18, 31, 0.88));
}

.assistant-system-card span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.66);
}

.assistant-system-card strong {
  color: #f8fafc;
  font-size: 0.92rem;
}

.copilot-voice-toolbar {
  padding: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 26%),
    rgba(7, 19, 33, 0.76);
}

.copilot-voice-copy strong,
.copilot-voice-copy p,
.bubble-label,
.assistant-input-hint,
.chat-status,
.assistant-section-heading .eyebrow {
  color: rgba(191, 219, 254, 0.74);
}

.copilot-voice-indicator {
  min-width: 46px;
  height: 30px;
  padding: 5px 7px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: rgba(14, 165, 233, 0.08);
}

.copilot-voice-toolbar .ghost-button,
.assistant-chip-grid .ghost-button,
.assistant-confirmation-panel .ghost-button {
  color: #dbeafe;
  border-color: rgba(125, 211, 252, 0.14);
  background: rgba(15, 31, 51, 0.82);
}

.copilot-voice-toolbar .ghost-button:hover:not(:disabled),
.assistant-chip-grid .ghost-button:hover:not(:disabled),
.assistant-confirmation-panel .ghost-button:hover:not(:disabled) {
  background: rgba(14, 40, 68, 0.92);
  border-color: rgba(125, 211, 252, 0.28);
}

.assistant-quick-actions-shell,
.assistant-transcript-shell,
.assistant-chat-form,
.assistant-confirmation-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
}

.assistant-chip-grid {
  flex-wrap: wrap;
}

.assistant-chip-grid .ghost-button {
  min-height: 40px;
  border-radius: 999px;
}

.assistant-confirmation-panel {
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.1), transparent 24%),
    rgba(7, 19, 33, 0.82);
}

.assistant-transcript-shell {
  padding-bottom: 10px;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background: rgba(14, 30, 48, 0.74);
  color: #e0f2fe;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.chat-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #67e8f9;
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.45);
}

.assistant-widget[data-assistant-mode="error"] .chat-status::before {
  background: #f87171;
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.45);
}

.assistant-widget[data-assistant-mode="speaking"] .chat-status::before {
  background: #fb923c;
  box-shadow: 0 0 14px rgba(251, 146, 60, 0.45);
}

.assistant-widget[data-assistant-mode="processing"] .chat-status::before {
  background: #60a5fa;
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.45);
}

.chat-messages {
  min-height: 300px;
  max-height: 360px;
  padding-right: 6px;
}

.chat-bubble {
  max-width: 100%;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  backdrop-filter: blur(10px);
}

.chat-bubble.assistant {
  background:
    linear-gradient(180deg, rgba(8, 24, 39, 0.95), rgba(10, 30, 49, 0.9));
  color: #eff6ff;
}

.chat-bubble.user {
  color: #f8fafc;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.34), rgba(37, 99, 235, 0.22));
  border-color: rgba(103, 232, 249, 0.14);
}

.chat-bubble p {
  color: inherit;
}

.assistant-chat-form textarea {
  min-height: 112px;
  color: #f8fafc;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background:
    linear-gradient(180deg, rgba(4, 12, 23, 0.96), rgba(8, 20, 35, 0.94));
  box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.05);
}

.assistant-chat-form textarea::placeholder {
  color: rgba(191, 219, 254, 0.42);
}

.assistant-chat-form textarea:focus {
  outline: none;
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, 0.12),
    inset 0 1px 0 rgba(191, 219, 254, 0.05);
}

.assistant-chat-form .chat-footer {
  align-items: flex-end;
}

.assistant-input-hint {
  max-width: 250px;
  margin: 0;
  line-height: 1.5;
}

.assistant-chat-form .primary-button {
  min-width: 152px;
  background:
    linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow:
    0 16px 30px rgba(37, 99, 235, 0.2),
    0 0 30px rgba(14, 165, 233, 0.14);
}

.assistant-chat-form .primary-button:hover,
.assistant-chat-form .primary-button:focus-visible {
  box-shadow:
    0 18px 34px rgba(37, 99, 235, 0.24),
    0 0 34px rgba(14, 165, 233, 0.18);
}

.assistant-widget .pill {
  color: #e0f2fe;
  background: rgba(15, 31, 51, 0.82);
  border: 1px solid rgba(125, 211, 252, 0.14);
}

.assistant-widget[data-assistant-mode="speaking"] .pill,
.assistant-widget[data-assistant-mode="speaking"] .chat-status {
  border-color: rgba(251, 146, 60, 0.24);
}

.assistant-widget[data-assistant-mode="processing"] .pill,
.assistant-widget[data-assistant-mode="processing"] .chat-status {
  border-color: rgba(96, 165, 250, 0.24);
}

.assistant-widget[data-assistant-mode="error"] .pill,
.assistant-widget[data-assistant-mode="error"] .chat-status {
  border-color: rgba(248, 113, 113, 0.24);
}

@keyframes assistantLauncherPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(103, 232, 249, 0.48);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(103, 232, 249, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(103, 232, 249, 0);
  }
}

@media (max-width: 680px) {
  .assistant-popup {
    width: auto;
  }

  .assistant-command-deck {
    grid-template-columns: 1fr;
  }

  .assistant-command-grid {
    min-height: 76px;
  }

  .assistant-system-card {
    flex-basis: 100%;
  }

  .assistant-chat-form .chat-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .assistant-input-hint {
    max-width: none;
  }

  .chat-messages {
    min-height: 240px;
    max-height: 300px;
  }
}

.assistant-widget {
  --assistant-bg: rgba(8, 12, 24, 0.82);
  --assistant-bg-strong: rgba(6, 10, 21, 0.94);
  --assistant-glass: rgba(15, 22, 40, 0.7);
  --assistant-line: rgba(103, 232, 249, 0.16);
  --assistant-line-strong: rgba(168, 85, 247, 0.2);
  --assistant-text: #eef8ff;
  --assistant-muted: rgba(201, 222, 255, 0.72);
  --assistant-cyan: #67e8f9;
  --assistant-cyan-strong: #22d3ee;
  --assistant-blue: #60a5fa;
  --assistant-purple: #a855f7;
  --assistant-purple-soft: rgba(168, 85, 247, 0.22);
  --assistant-orange: #fb923c;
  --assistant-red: #f87171;
}

.assistant-launcher {
  min-width: 224px;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.16), transparent 24%),
    radial-gradient(circle at 82% 24%, rgba(168, 85, 247, 0.16), transparent 26%),
    linear-gradient(135deg, rgba(7, 11, 22, 0.98), rgba(14, 20, 36, 0.96) 58%, rgba(16, 27, 48, 0.98));
  box-shadow:
    0 26px 60px rgba(2, 6, 23, 0.38),
    0 0 40px rgba(34, 211, 238, 0.08);
  backdrop-filter: blur(22px);
}

.assistant-launcher::before {
  background:
    linear-gradient(120deg, transparent 20%, rgba(103, 232, 249, 0.14) 50%, transparent 78%);
}

.assistant-launcher-orb-shell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.assistant-launcher-ping {
  inset: auto;
  top: 4px;
  right: 4px;
}

.assistant-launcher-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(103, 232, 249, 0.2);
  background:
    radial-gradient(circle at 30% 30%, rgba(103, 232, 249, 0.28), transparent 34%),
    radial-gradient(circle at 70% 72%, rgba(168, 85, 247, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(11, 18, 33, 0.95), rgba(6, 10, 21, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(224, 242, 254, 0.08),
    0 0 26px rgba(34, 211, 238, 0.12);
}

.assistant-orb-core,
.assistant-orb-ring,
.assistant-orb-waveform {
  position: absolute;
}

.assistant-orb-core {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(224, 242, 254, 0.96) 0%, rgba(103, 232, 249, 0.94) 42%, rgba(34, 211, 238, 0.42) 78%, transparent 100%);
  box-shadow:
    0 0 22px rgba(34, 211, 238, 0.42),
    0 0 42px rgba(168, 85, 247, 0.14);
}

.assistant-orb-ring {
  border-radius: 50%;
  border: 1px solid rgba(103, 232, 249, 0.18);
}

.assistant-orb-ring-a {
  width: 34px;
  height: 34px;
}

.assistant-orb-ring-b {
  width: 48px;
  height: 48px;
  border-color: rgba(168, 85, 247, 0.16);
}

.assistant-orb-waveform {
  bottom: 9px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 13px;
}

.assistant-orb-waveform span {
  width: 3px;
  height: 5px;
  border-radius: 999px;
  background: rgba(224, 242, 254, 0.82);
  opacity: 0.7;
  transform-origin: bottom;
}

.assistant-widget[data-orb-state="idle"] .assistant-launcher-orb {
  animation: assistantOrbBreath 4.4s ease-in-out infinite;
}

.assistant-widget[data-orb-state="idle"] .assistant-orb-core {
  animation: assistantCoreBreath 4.4s ease-in-out infinite;
}

.assistant-widget[data-orb-state="listening"] .assistant-launcher-orb {
  animation: assistantOrbListening 1.8s ease-in-out infinite;
}

.assistant-widget[data-orb-state="listening"] .assistant-orb-core,
.assistant-widget[data-orb-state="speaking"] .assistant-orb-core {
  box-shadow:
    0 0 26px rgba(34, 211, 238, 0.55),
    0 0 48px rgba(168, 85, 247, 0.24);
}

.assistant-widget[data-orb-state="listening"] .assistant-orb-waveform span,
.assistant-widget[data-orb-state="speaking"] .assistant-orb-waveform span {
  animation: assistantWaveform 900ms ease-in-out infinite;
}

.assistant-widget[data-orb-state="listening"] .assistant-orb-waveform span:nth-child(2),
.assistant-widget[data-orb-state="speaking"] .assistant-orb-waveform span:nth-child(2) {
  animation-delay: 90ms;
}

.assistant-widget[data-orb-state="listening"] .assistant-orb-waveform span:nth-child(3),
.assistant-widget[data-orb-state="speaking"] .assistant-orb-waveform span:nth-child(3) {
  animation-delay: 180ms;
}

.assistant-widget[data-orb-state="listening"] .assistant-orb-waveform span:nth-child(4),
.assistant-widget[data-orb-state="speaking"] .assistant-orb-waveform span:nth-child(4) {
  animation-delay: 270ms;
}

.assistant-widget[data-orb-state="thinking"] .assistant-orb-ring-a {
  animation: assistantAuraSpin 2.6s linear infinite;
}

.assistant-widget[data-orb-state="thinking"] .assistant-orb-ring-b {
  animation: assistantAuraSpinReverse 3.6s linear infinite;
}

.assistant-widget[data-orb-state="thinking"] .assistant-launcher-orb {
  box-shadow:
    inset 0 1px 0 rgba(224, 242, 254, 0.08),
    0 0 30px rgba(96, 165, 250, 0.16);
}

.assistant-widget[data-orb-state="speaking"] .assistant-launcher-orb {
  animation: assistantSpeakingPulse 1.25s ease-in-out infinite;
}

.assistant-widget[data-orb-state="speaking"] .assistant-orb-waveform span {
  background: rgba(251, 191, 36, 0.96);
}

.assistant-widget[data-orb-state="error"] .assistant-launcher-orb,
.assistant-widget[data-orb-state="error"] .assistant-popup {
  box-shadow:
    0 26px 60px rgba(2, 6, 23, 0.38),
    0 0 36px rgba(248, 113, 113, 0.12);
}

.assistant-widget[data-orb-state="error"] .assistant-orb-core {
  background:
    radial-gradient(circle, rgba(255, 226, 226, 0.98) 0%, rgba(248, 113, 113, 0.88) 44%, rgba(248, 113, 113, 0.16) 78%, transparent 100%);
}

.assistant-launcher-text strong,
.assistant-popup-title h3,
.assistant-section-heading h4,
.assistant-command-copy h4 {
  font-family: "Poppins", sans-serif;
}

.assistant-launcher-text small {
  color: rgba(207, 250, 254, 0.78);
}

.assistant-popup {
  width: min(420px, calc(100vw - 28px));
  border-radius: 28px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.1), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(168, 85, 247, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(8, 12, 24, 0.92), rgba(9, 14, 27, 0.94));
  box-shadow:
    0 30px 80px rgba(2, 6, 23, 0.5),
    0 0 44px rgba(34, 211, 238, 0.08),
    inset 0 1px 0 rgba(224, 242, 254, 0.06);
  backdrop-filter: blur(24px);
}

.assistant-popup-header {
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(6, 10, 21, 0.84), rgba(15, 23, 42, 0.68)),
    linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(168, 85, 247, 0.1));
}

.assistant-popup-body {
  gap: 14px;
  padding: 14px;
}

.assistant-command-deck,
.assistant-system-bar,
.assistant-response-panel,
.assistant-quick-actions-shell,
.assistant-transcript-shell,
.assistant-chat-form,
.assistant-confirmation-panel,
.copilot-voice-toolbar {
  border-radius: 22px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.62), rgba(9, 14, 27, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(224, 242, 254, 0.04),
    0 12px 24px rgba(2, 6, 23, 0.18);
}

.assistant-command-deck {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.assistant-command-grid::before {
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow:
    0 0 0 7px rgba(34, 211, 238, 0.04),
    0 0 0 14px rgba(168, 85, 247, 0.03);
}

.assistant-command-grid span {
  min-height: 28px;
  border-color: rgba(103, 232, 249, 0.1);
  background:
    linear-gradient(180deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.05));
}

.assistant-intro,
.assistant-response-preview {
  margin: 0;
  color: var(--assistant-text);
  line-height: 1.58;
}

.assistant-command-copy .eyebrow,
.assistant-section-heading .eyebrow,
.assistant-popup-title .eyebrow {
  color: rgba(167, 243, 255, 0.72);
}

.assistant-command-meta,
.assistant-section-heading {
  gap: 10px;
}

.assistant-system-bar {
  padding: 10px;
  gap: 10px;
}

.assistant-system-card {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(103, 232, 249, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 28, 48, 0.74), rgba(10, 15, 28, 0.84));
}

.assistant-system-card span,
.bubble-label,
.assistant-input-hint,
.copilot-voice-copy p {
  color: var(--assistant-muted);
}

.assistant-system-card strong,
.copilot-voice-copy strong {
  color: var(--assistant-text);
}

.assistant-response-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.08), transparent 20%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.08), transparent 20%),
    linear-gradient(180deg, rgba(15, 22, 40, 0.76), rgba(8, 13, 24, 0.84));
}

.assistant-response-preview {
  min-height: 52px;
  max-height: 120px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(103, 232, 249, 0.1);
  background: rgba(7, 12, 23, 0.68);
  white-space: pre-wrap;
}

.copilot-voice-toolbar {
  gap: 12px;
  padding: 14px;
}

.copilot-voice-indicator {
  min-width: 42px;
  height: 28px;
  background: rgba(34, 211, 238, 0.08);
}

.copilot-voice-toolbar .ghost-button,
.assistant-chip-grid .ghost-button,
.assistant-confirmation-panel .ghost-button,
.assistant-chat-form .primary-button,
.widget-icon-button {
  min-height: 38px;
  border-radius: 14px;
}

.copilot-voice-toolbar .ghost-button,
.assistant-chip-grid .ghost-button,
.assistant-confirmation-panel .ghost-button {
  color: #e0f2fe;
  background: rgba(12, 18, 34, 0.74);
  border-color: rgba(103, 232, 249, 0.12);
}

.assistant-chip-grid .ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
}

.assistant-training-insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assistant-training-card {
  background: rgba(103, 232, 249, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.16);
}

.assistant-training-receipt-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assistant-training-receipt-card {
  background: rgba(14, 116, 144, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.16);
}

.assistant-training-receipt-card .detail-action-row {
  margin-top: 12px;
}

.assistant-training-receipt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.assistant-training-receipt-note {
  margin-top: 10px;
  color: rgba(226, 232, 240, 0.84);
}

.assistant-confirmation-panel {
  gap: 12px;
  padding: 14px;
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.08), transparent 20%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.7), rgba(11, 18, 31, 0.8));
}

.assistant-transcript-shell,
.assistant-chat-form {
  gap: 12px;
  padding: 14px;
}

.chat-status {
  padding: 7px 11px;
  border-radius: 999px;
  border-color: rgba(103, 232, 249, 0.14);
  background: rgba(11, 17, 31, 0.72);
  color: #dff9ff;
  font-size: 0.78rem;
}

.chat-status::before {
  background: var(--assistant-cyan);
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.4);
}

.assistant-response-panel .chat-status {
  color: var(--assistant-text);
}

.chat-messages {
  min-height: 248px;
  max-height: 300px;
  gap: 10px;
}

.chat-bubble {
  padding: 13px 14px;
  border-radius: 18px;
}

.chat-bubble.assistant {
  border-color: rgba(103, 232, 249, 0.1);
  background:
    linear-gradient(180deg, rgba(15, 24, 42, 0.92), rgba(11, 19, 33, 0.92));
}

.chat-bubble.user {
  border-color: rgba(168, 85, 247, 0.14);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.16));
}

.assistant-chat-form textarea {
  min-height: 84px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    linear-gradient(180deg, rgba(5, 10, 21, 0.94), rgba(8, 13, 24, 0.98));
  color: var(--assistant-text);
}

.assistant-input-row {
  align-items: center;
}

.assistant-input-hint {
  max-width: 230px;
  font-size: 0.84rem;
}

.assistant-chat-form .primary-button {
  min-width: 146px;
  color: #effbff;
  border: 1px solid rgba(103, 232, 249, 0.18);
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.94) 55%, rgba(147, 51, 234, 0.88));
  box-shadow:
    0 16px 30px rgba(34, 211, 238, 0.14),
    0 0 22px rgba(168, 85, 247, 0.12);
}

.assistant-widget .pill {
  color: #dff9ff;
  background: rgba(12, 18, 34, 0.72);
  border-color: rgba(103, 232, 249, 0.12);
}

.widget-icon-button {
  color: #dff9ff;
  background: rgba(18, 28, 48, 0.7);
  border-color: rgba(103, 232, 249, 0.12);
}

@keyframes assistantOrbBreath {
  0%, 100% {
    transform: scale(0.98);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes assistantCoreBreath {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes assistantOrbListening {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(224, 242, 254, 0.08),
      0 0 26px rgba(34, 211, 238, 0.14);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      inset 0 1px 0 rgba(224, 242, 254, 0.08),
      0 0 36px rgba(34, 211, 238, 0.24);
  }
}

@keyframes assistantAuraSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes assistantAuraSpinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes assistantSpeakingPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(224, 242, 254, 0.08),
      0 0 30px rgba(251, 146, 60, 0.18);
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      inset 0 1px 0 rgba(224, 242, 254, 0.08),
      0 0 40px rgba(251, 146, 60, 0.3);
  }
}

@keyframes assistantWaveform {
  0%, 100% {
    transform: scaleY(0.55);
    opacity: 0.58;
  }
  50% {
    transform: scaleY(1.6);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .assistant-popup {
    width: min(100vw - 20px, 420px);
  }

  .assistant-launcher {
    min-width: 0;
  }

  .assistant-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .assistant-input-hint {
    max-width: none;
  }

  .assistant-training-insight-grid {
    grid-template-columns: 1fr;
  }

  .assistant-training-receipt-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .assistant-widget {
    right: 12px;
    bottom: 12px;
  }

  .assistant-launcher {
    width: auto;
    padding-right: 14px;
  }

  .assistant-launcher-text strong {
    font-size: 0.92rem;
  }

  .assistant-launcher-text small {
    font-size: 0.68rem;
  }

  .assistant-popup {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 86px;
    max-height: calc(100vh - 104px);
  }

  .assistant-popup-body {
    padding: 12px;
  }

  .assistant-command-deck {
    grid-template-columns: 1fr;
  }

  .assistant-system-bar {
    flex-direction: column;
  }

  .assistant-system-card {
    width: 100%;
  }

  .copilot-voice-toolbar-main,
  .assistant-section-heading {
    align-items: flex-start;
  }
}

.proactive-assistant-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
}

.proactive-briefing-panel,
.proactive-notification-panel,
.proactive-suggestion-panel,
.proactive-alert-panel {
  display: grid;
  gap: 16px;
}

.proactive-notification-panel,
.proactive-suggestion-panel,
.proactive-alert-panel {
  height: 100%;
}

.proactive-briefing-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.proactive-briefing-grid,
.proactive-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.proactive-briefing-card,
.proactive-alert-card,
.proactive-notification-item {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.proactive-briefing-card span,
.proactive-alert-card span,
.proactive-notification-copy span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.proactive-briefing-card strong,
.proactive-alert-card strong,
.proactive-notification-copy strong {
  display: block;
  margin-top: 6px;
}

.proactive-briefing-card p,
.proactive-alert-card p,
.proactive-notification-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.proactive-notification-list {
  display: grid;
  gap: 12px;
}

.proactive-notification-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proactive-notification-copy {
  min-width: 0;
}

.proactive-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proactive-suggestion-chip {
  min-height: 42px;
  border-radius: 999px;
}

.proactive-alert-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proactive-severity-high {
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.proactive-severity-medium {
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.12);
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.proactive-severity-low {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.intelligence-section {
  display: grid;
  gap: 20px;
}

.intelligence-summary-panel,
.intelligence-card {
  display: grid;
  gap: 16px;
}

.intelligence-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.intelligence-performance-grid,
.intelligence-badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.intelligence-metric-card,
.intelligence-agent-item,
.intelligence-list-item,
.intelligence-badge {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.intelligence-metric-card span,
.intelligence-list-item span,
.intelligence-agent-item span,
.intelligence-badge span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.intelligence-metric-card strong,
.intelligence-list-item strong,
.intelligence-agent-item strong,
.intelligence-badge strong {
  display: block;
  margin-top: 6px;
}

.intelligence-list,
.intelligence-agent-list {
  display: grid;
  gap: 12px;
}

.intelligence-agent-item {
  display: grid;
  gap: 10px;
}

.intelligence-agent-head,
.intelligence-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.intelligence-agent-meta,
.intelligence-list-copy {
  min-width: 0;
}

.intelligence-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intelligence-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 600;
}

.intelligence-badge {
  position: relative;
  overflow: hidden;
}

.intelligence-badge::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 68%);
  pointer-events: none;
}

.intelligence-tone-positive {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.intelligence-tone-danger {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.16);
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.intelligence-tone-warning {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.intelligence-tone-neutral {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.14);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.optimization-section {
  display: grid;
  gap: 20px;
}

.optimization-summary-panel,
.optimization-card {
  display: grid;
  gap: 16px;
}

.optimization-header-actions,
.optimization-confirm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.optimization-suggestion-grid,
.optimization-grid {
  display: grid;
  gap: 20px;
}

.optimization-suggestion-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.optimization-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.optimization-suggestion-card,
.optimization-list-item,
.optimization-action-chip {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.optimization-suggestion-card strong,
.optimization-list-item strong {
  display: block;
}

.optimization-suggestion-card p,
.optimization-list-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.optimization-action-grid,
.optimization-list {
  display: grid;
  gap: 12px;
}

.optimization-action-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.optimization-confirm-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px));
  z-index: 80;
}

.optimization-confirm-card {
  gap: 18px;
}

.optimization-severity-high {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.16);
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.optimization-severity-medium {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.optimization-severity-low {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.ai-health-section {
  display: grid;
  gap: 20px;
}

.ai-health-summary-panel,
.ai-health-card {
  display: grid;
  gap: 16px;
}

.ai-health-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-health-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ai-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ai-health-metric-card,
.ai-health-list-item {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.ai-health-metric-card span,
.ai-health-list-item span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.ai-health-metric-card strong,
.ai-health-list-item strong {
  display: block;
  margin-top: 6px;
}

.ai-health-list {
  display: grid;
  gap: 12px;
}

.ai-health-list-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.ai-health-tone-live {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.ai-health-tone-timeout,
.ai-health-tone-offline {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.ai-health-tone-error {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.16);
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.role-aware-section {
  display: grid;
  gap: 20px;
}

.role-aware-summary-panel {
  display: grid;
  gap: 16px;
}

.role-aware-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.role-aware-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.role-aware-card {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(12, 18, 34, 0.74);
  border: 1px solid rgba(84, 126, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.role-aware-card span {
  display: block;
  color: var(--muted);
}

.role-aware-card strong {
  display: block;
  margin-top: 6px;
}

.role-aware-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.role-aware-tone-positive {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
}

.role-aware-tone-warning {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
}

.role-aware-tone-danger {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.16);
}

.role-aware-tone-neutral {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.14);
}

.role-aware-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-aware-suggestion-chip {
  min-height: 40px;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .proactive-assistant-section {
    grid-template-columns: 1fr;
  }

  .intelligence-grid {
    grid-template-columns: 1fr;
  }

  .optimization-suggestion-grid,
  .optimization-grid,
  .ai-health-grid {
    grid-template-columns: 1fr;
  }
  .ai-health-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .role-aware-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sales-order-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .purchasing-workspace-grid {
    grid-template-columns: 1fr;
  }
  .purchasing-line-item-grid,
  .purchasing-totals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .purchasing-header-actions {
    width: 100%;
  }
  .purchasing-communication-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .purchasing-communication-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .proactive-briefing-grid,
  .proactive-alert-grid {
    grid-template-columns: 1fr 1fr;
  }

  .intelligence-performance-grid,
  .intelligence-badge-grid {
    grid-template-columns: 1fr 1fr;
  }

  .optimization-suggestion-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ai-health-metric-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .proactive-briefing-grid,
  .proactive-alert-grid {
    grid-template-columns: 1fr;
  }

  .proactive-notification-item {
    flex-direction: column;
  }

  .intelligence-performance-grid,
  .intelligence-badge-grid {
    grid-template-columns: 1fr;
  }

  .intelligence-agent-head,
  .intelligence-list-head {
    flex-direction: column;
  }

  .optimization-action-chip,
  .optimization-confirm-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .optimization-suggestion-grid {
    grid-template-columns: 1fr;
  }
  .ai-health-metric-grid {
    grid-template-columns: 1fr;
  }
  .role-aware-card-grid {
    grid-template-columns: 1fr;
  }
  .role-aware-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .sales-order-summary-grid,
  .quote-pricing-summary-grid {
    grid-template-columns: 1fr;
  }
  .purchasing-line-item-grid,
  .purchasing-totals-grid {
    grid-template-columns: 1fr;
  }
  .purchasing-communication-actions,
  .purchasing-communication-summary {
    grid-template-columns: 1fr;
  }
  .purchasing-header-actions .ghost-button,
  .purchasing-header-actions .pill {
    width: 100%;
    justify-content: center;
  }
  .sales-order-detail-actions,
  .quote-share-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .sales-order-section-summary,
  .sales-order-section > :not(summary) {
    padding: 14px;
  }
  .purchasing-line-item-head,
  .purchasing-line-item-foot,
  .purchasing-summary-grid,
  .purchasing-summary-row,
  .purchasing-receipt-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.module-dashboard-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: #f4f8ff;
  letter-spacing: -0.03em;
}

.module-dashboard-card-meta {
  color: rgba(214, 224, 243, 0.78);
  font-size: 0.92rem;
}

.module-dashboard-owner-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(14, 18, 28, 0.7);
  border: 1px solid rgba(132, 157, 199, 0.14);
}

.module-dashboard-ownership-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.module-dashboard-detail-panel {
  display: grid;
  gap: 16px;
}

.module-dashboard-detail-list {
  display: grid;
  gap: 12px;
}

.module-dashboard-detail-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(9, 18, 34, 0.72);
  border: 1px solid rgba(120, 160, 255, 0.14);
}

.module-dashboard-detail-main,
.module-dashboard-detail-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.module-dashboard-detail-main strong {
  color: #f4f8ff;
}

.module-dashboard-detail-main span,
.module-dashboard-detail-meta span {
  color: rgba(214, 224, 243, 0.74);
  font-size: 0.92rem;
}

.legacy-nav-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .module-dashboard-widget-grid,
  .module-dashboard-detail-grid,
  .module-dashboard-ownership-list {
    grid-template-columns: 1fr;
  }

  .module-dashboard-marketing-premium .module-dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

  .module-dashboard-marketing-premium .marketing-premium-chart-panel,
  .module-dashboard-marketing-premium .marketing-premium-destination-panel,
  .module-dashboard-marketing-premium .marketing-premium-ai-panel,
  .module-dashboard-marketing-premium .marketing-premium-trend-panel,
  .module-dashboard-marketing-premium .marketing-premium-leads-panel,
  .module-dashboard-marketing-premium .module-dashboard-detail-grid > .panel:last-child {
    grid-column: 1;
  }

  .module-dashboard-card {
    padding: 20px;
  }
}

.app-shell {
  grid-template-columns: 308px minmax(0, 1fr);
}

.sidebar {
  overflow-y: auto;
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

.mobile-nav-toggle {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  background: rgba(2, 6, 23, 0.52);
  backdrop-filter: blur(4px);
}

button,
input,
select,
textarea {
  max-width: 100%;
}

.nav-item,
.primary-button,
.ghost-button,
.widget-icon-button,
.lead-lms-tab,
.view-toggle-button {
  min-height: 48px;
}

.form-actions,
.panel-header,
.lead-card-quick-actions,
.lead-row-quick-actions,
.lead-detail-action-links,
.lead-workspace-actions,
.table-action-row,
.user-management-actions {
  flex-wrap: wrap;
}

.form-actions > .primary-button,
.form-actions > .ghost-button,
.lead-card-quick-actions > .primary-button,
.lead-card-quick-actions > .ghost-button,
.lead-row-quick-actions > .primary-button,
.lead-row-quick-actions > .ghost-button,
.lead-detail-action-links > .primary-button,
.lead-detail-action-links > .ghost-button {
  min-width: 140px;
}

.action-final-button {
  box-shadow: 0 12px 24px rgba(30, 64, 175, 0.22);
}

.action-final-button:disabled {
  opacity: 0.72;
  box-shadow: none;
}

.ghost-button.danger-button {
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.42);
  background: rgba(254, 242, 242, 0.9);
}

.ghost-button.danger-button:hover:not(:disabled) {
  background: rgba(254, 226, 226, 0.98);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: min(320px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    margin: 0;
    z-index: 80;
    overflow-y: auto;
    transform: translateX(calc(-100% - 28px));
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 26px 72px rgba(15, 23, 42, 0.34);
  }

  .sidebar-card {
    margin-top: 0;
  }

  .dashboard-main {
    min-width: 0;
    overflow: hidden;
  }

  .topbar {
    position: sticky;
    top: 12px;
    z-index: 35;
    padding: 16px;
  }

  .topbar,
  .topbar-actions,
  .topbar-brand {
    min-width: 0;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .topbar-profile {
    min-width: 0;
  }

  .topbar-profile > div:last-child {
    min-width: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .hero-panel,
  .login-greeting-banner,
  .crm-strip,
  .module-dashboard-hero,
  .crm-workspace-dashboard-hero,
  .quote-dashboard-hero {
    padding: 22px;
  }

  .quote-dashboard-grid,
  .reports-layout,
  .warning-layout,
  .leave-workspace-grid,
  .attendance-overtime-grid,
  .module-dashboard-widget-grid,
  .module-dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

  .sales-order-control-grid {
    grid-template-columns: 1fr;
  }

  .sales-order-control-shell,
  .sales-order-drawer-panel {
    position: static;
  }

  .sales-order-command-bar {
    grid-template-columns: 1fr;
  }

  .sales-order-command-trigger {
    width: 100%;
  }

  .sales-order-command-panel-menu {
    position: static;
    min-width: 0;
    max-width: none;
    margin-top: 10px;
  }

  .sales-order-command-panel-grid {
    grid-template-columns: 1fr;
  }

  .assignment-metrics-grid,
  .reports-kpi-grid,
  .reports-product-kpi-grid,
  .warning-kpi-grid,
  .attendance-kpi-grid,
  .directory-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-drawer,
  .lead-modal,
  .lead-itinerary-modal,
  .assignment-rule-modal,
  .employee-draft-modal,
  .optimization-confirm-modal {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .panel,
  .hero-panel,
  .sidebar,
  .lead-drawer,
  .lead-modal,
  .lead-itinerary-modal {
    border-radius: 22px;
  }

  .topbar,
  .topbar-actions,
  .topbar-brand,
  .panel-header,
  .form-actions,
  .lead-topbar-actions,
  .lead-drawer-header,
  .lead-drawer-header-actions,
  .lead-detail-modal-header,
  .lead-detail-modal-actions,
  .user-card-actions,
  .purchasing-action-row,
  .quote-builder-actions,
  .quote-template-item-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions .icon-button,
  .topbar-actions .mobile-nav-toggle {
    width: 48px;
  }

  .topbar-profile {
    width: 100%;
  }

  .form-grid,
  .lead-form-grid,
  .master-form-grid,
  .vendor-create-form-grid,
  .vendor-service-create-form-grid,
  .leave-request-form-grid,
  .attendance-overtime-form-grid,
  .hr-holiday-form-grid,
  .hr-salary-form-grid,
  .hr-policy-grid,
  .policy-summary-grid,
  .attendance-shift-grid,
  .attendance-team-card-grid,
  .directory-summary-grid,
  .assignment-metrics-grid,
  .reports-kpi-grid,
  .reports-product-kpi-grid,
  .reports-product-ranking-grid,
  .warning-kpi-grid,
  .attendance-kpi-grid {
    grid-template-columns: 1fr;
  }

  .field span,
  .checkbox-item,
  .pill,
  .status-badge {
    word-break: break-word;
  }

  .directory-table-shell,
  .lead-table-shell,
  .assignment-rules-table-shell,
  .manual-costing-table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .responsive-table-cardized {
    width: 100%;
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  .responsive-table-cardized thead {
    display: none;
  }

  .responsive-table-cardized tbody,
  .responsive-table-cardized tr,
  .responsive-table-cardized td {
    display: block;
    width: 100%;
  }

  .responsive-table-cardized tbody tr {
    margin-bottom: 12px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(105, 122, 148, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  }

  .responsive-table-cardized tbody td {
    display: grid;
    grid-template-columns: minmax(96px, 42%) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border: 0 !important;
    text-align: left;
  }

  .responsive-table-cardized tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .responsive-table-cardized tbody td[data-label=""]::before {
    content: "";
  }

  .responsive-table-cardized tbody td:last-child {
    padding-bottom: 0;
  }

  .lead-drawer,
  .lead-modal,
  .lead-itinerary-modal,
  .assignment-rule-modal,
  .employee-draft-modal,
  .optimization-confirm-modal {
    inset: 12px !important;
    width: auto !important;
    max-width: none !important;
    transform: none;
  }
}

.chat-workspace-shell {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(260px, 300px);
  gap: 20px;
  align-items: start;
}

.chat-sidebar,
.chat-thread-panel,
.chat-info-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-sidebar-header,
.chat-thread-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

body.mobile-embed .app-shell {
  grid-template-columns: 1fr !important;
  min-height: 100vh;
  min-height: 100svh;
  padding: 12px;
  gap: 12px;
}

body.mobile-embed .sidebar,
body.mobile-embed .sidebar-backdrop,
body.mobile-embed .topbar,
body.mobile-embed .mobile-nav-toggle,
body.mobile-embed #assistantWidget {
  display: none !important;
}

body.mobile-embed .dashboard-main {
  min-width: 0;
  gap: 12px;
  overflow: visible;
  padding:
    calc(4px + env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}

body.mobile-embed .dashboard-main > * {
  min-width: 0;
}

body.mobile-embed .workspace-shell-bar {
  gap: 8px;
  padding: 14px 16px;
}

body.mobile-embed .workspace-shell-bar-top {
  align-items: flex-start;
}

body.mobile-embed .workspace-shell-copy {
  gap: 4px;
}

body.mobile-embed .workspace-shell-copy h3 {
  font-size: 1.12rem;
}

body.mobile-embed .workspace-shell-summary,
body.mobile-embed .workspace-shell-actions,
body.mobile-embed .workspace-shell-meta-grid {
  display: none !important;
}

body.mobile-embed .panel,
body.mobile-embed .hero-panel,
body.mobile-embed .login-greeting-banner,
body.mobile-embed .module-dashboard-card,
body.mobile-embed .module-dashboard-owner-card,
body.mobile-embed .module-dashboard-detail-item {
  border-radius: 20px;
}

body.mobile-embed .detail-action-row,
body.mobile-embed .view-toggle,
body.mobile-embed .lead-quick-filter-bar,
body.mobile-embed .crm-strip-metrics,
body.mobile-embed .control-tower-filter-strip {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.mobile-embed .detail-action-row::-webkit-scrollbar,
body.mobile-embed .view-toggle::-webkit-scrollbar,
body.mobile-embed .lead-quick-filter-bar::-webkit-scrollbar,
body.mobile-embed .crm-strip-metrics::-webkit-scrollbar,
body.mobile-embed .control-tower-filter-strip::-webkit-scrollbar {
  display: none;
}

body.mobile-embed .detail-action-row > *,
body.mobile-embed .view-toggle > *,
body.mobile-embed .lead-quick-filter-bar > *,
body.mobile-embed .crm-strip-metrics > *,
body.mobile-embed .control-tower-filter-strip > * {
  flex: 0 0 auto;
}

body.mobile-embed[data-active-section="lead-pipeline"] .app-shell {
  padding: 8px;
}

body.mobile-embed[data-active-section="lead-pipeline"] .dashboard-main {
  gap: 10px;
  overflow-x: hidden;
  padding: 8px;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection {
  width: 100%;
  min-width: 0;
  gap: 10px;
  overflow: visible;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-filter-panel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .followup-reminder-panel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  overflow: hidden;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip-metrics,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .followup-reminder-list,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-segment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-mini-stat,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .followup-reminder-card,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-segment-card {
  min-width: 0;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-filter-topbar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-workspace-summary-row,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-panel-header,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  overflow: visible;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-filter-search,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-inline-field,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-quick-field,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-filter-summary-block {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-topbar-actions,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-quick-filter-bar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-smart-filter-chips,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-panel-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-topbar-actions::-webkit-scrollbar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-quick-filter-bar::-webkit-scrollbar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-smart-filter-chips::-webkit-scrollbar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-panel-meta::-webkit-scrollbar {
  display: none;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-topbar-actions > *,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-quick-filter-bar > *,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-smart-filter-chips > *,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-panel-meta > * {
  flex: 0 0 auto;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-mobile-hidden-action {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-board {
  display: flex;
  gap: 10px;
  min-height: 0;
  height: auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-column {
  flex: 0 0 min(86vw, 320px);
  min-width: min(86vw, 320px);
  min-height: 420px;
  height: auto;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-dropzone {
  height: auto;
  max-height: 64svh;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-table-shell {
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  border-radius: 16px;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-table {
  min-width: 640px;
}

@media (max-width: 420px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip-metrics,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .followup-reminder-list,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-segment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  body.mobile-embed .app-shell {
    padding: 10px;
    gap: 10px;
  }

  body.mobile-embed .dashboard-main {
    gap: 10px;
    padding:
      calc(2px + env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      calc(14px + env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  body.mobile-embed .panel,
  body.mobile-embed .hero-panel,
  body.mobile-embed .login-greeting-banner {
    padding: 18px;
    border-radius: 18px;
  }
}

.chat-filter-row,
.chat-thread-actions,
.chat-participant-list,
.chat-linked-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-composer-card,
.chat-info-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 245, 239, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.chat-create-grid,
.chat-composer,
.chat-attachment-grid {
  display: grid;
  gap: 12px;
}

.chat-create-grid,
.chat-attachment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-conversation-list,
.chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-conversation-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 245, 239, 0.98));
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.chat-conversation-card:hover,
.chat-conversation-card.active {
  transform: translateY(-1px);
  border-color: rgba(18, 140, 126, 0.28);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, rgba(235, 255, 246, 0.98), rgba(220, 248, 198, 0.88));
}

.chat-conversation-card header,
.chat-message-bubble header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.chat-conversation-card p,
.chat-message-bubble p {
  margin: 6px 0 0;
  color: #334155;
}

.chat-conversation-card strong,
.chat-message-bubble strong,
.chat-thread-panel h3,
.chat-info-card h4,
.chat-composer-card h4 {
  color: #0f172a;
}

.chat-conversation-meta,
.chat-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.82rem;
}

.chat-unread-badge,
.chat-priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(123, 212, 168, 0.18);
  color: #9be7c2;
  font-weight: 700;
  font-size: 0.78rem;
}

.chat-message-list {
  min-height: 520px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
  padding: 8px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.48) 0, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 80% 10%, rgba(223, 242, 214, 0.38) 0, rgba(223, 242, 214, 0) 18%),
    linear-gradient(180deg, rgba(239, 234, 226, 0.88) 0%, rgba(233, 229, 221, 0.92) 100%);
}

.chat-message-row {
  display: flex;
}

.chat-message-row.outbound {
  justify-content: flex-end;
}

.chat-message-bubble {
  max-width: min(72ch, 78%);
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.chat-quoted-block {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-left: 3px solid rgba(18, 140, 126, 0.72);
  border-radius: 12px;
  background: rgba(220, 248, 198, 0.52);
}

.chat-image-preview {
  display: block;
  max-width: 240px;
  border-radius: 12px;
  margin-top: 10px;
}

.chat-message-row.outbound .chat-message-bubble {
  background: linear-gradient(180deg, rgba(220, 248, 198, 0.98), rgba(198, 242, 174, 0.98));
  border-color: rgba(18, 140, 126, 0.16);
}

.chat-date-separator {
  align-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  font-size: 0.8rem;
}

.chat-participant-chip,
.chat-linked-card {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #334155;
}

.chat-info-panel .detail-action-row {
  margin-top: 14px;
}

@media (max-width: 1240px) {
  .chat-workspace-shell {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  .chat-info-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .chat-workspace-shell,
  .chat-create-grid,
  .chat-attachment-grid {
    grid-template-columns: 1fr;
  }

  .chat-message-bubble {
    max-width: 100%;
  }
}

body[data-active-section="chat-workspace"] .chat-composer-card,
body[data-active-section="chat-workspace"] .chat-info-card,
body[data-active-section="chat-workspace"] .chat-conversation-card,
body[data-active-section="chat-workspace"] .chat-message-bubble,
body[data-active-section="chat-workspace"] .chat-participant-chip,
body[data-active-section="chat-workspace"] .chat-linked-card {
  color: #0f172a !important;
}

body[data-active-section="chat-workspace"] .chat-composer-card,
body[data-active-section="chat-workspace"] .chat-info-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 245, 239, 0.99)) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08) !important;
}

body[data-active-section="chat-workspace"] .chat-conversation-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 245, 239, 0.99)) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body[data-active-section="chat-workspace"] .chat-conversation-card:hover,
body[data-active-section="chat-workspace"] .chat-conversation-card.active {
  background: linear-gradient(180deg, rgba(235, 255, 246, 0.99), rgba(220, 248, 198, 0.92)) !important;
  border-color: rgba(18, 140, 126, 0.28) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12) !important;
}

body[data-active-section="chat-workspace"] .chat-message-list {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.48) 0, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 80% 10%, rgba(223, 242, 214, 0.38) 0, rgba(223, 242, 214, 0) 18%),
    linear-gradient(180deg, rgba(239, 234, 226, 0.88) 0%, rgba(233, 229, 221, 0.92) 100%) !important;
}

body[data-active-section="chat-workspace"] .chat-message-bubble {
  background: rgba(255, 255, 255, 0.99) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
}

body[data-active-section="chat-workspace"] .chat-message-row.outbound .chat-message-bubble {
  background: linear-gradient(180deg, rgba(220, 248, 198, 0.99), rgba(198, 242, 174, 0.99)) !important;
  border-color: rgba(18, 140, 126, 0.16) !important;
}

body[data-active-section="chat-workspace"] .chat-message-bubble p,
body[data-active-section="chat-workspace"] .chat-conversation-card p,
body[data-active-section="chat-workspace"] .chat-linked-card,
body[data-active-section="chat-workspace"] .chat-participant-chip,
body[data-active-section="chat-workspace"] .chat-thread-panel .muted,
body[data-active-section="chat-workspace"] .chat-info-card .muted,
body[data-active-section="chat-workspace"] .chat-conversation-meta,
body[data-active-section="chat-workspace"] .chat-message-meta {
  color: #64748b !important;
}

.chat-workspace .chat-composer-card,
.chat-workspace .chat-info-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 245, 239, 0.99)) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08) !important;
}

.chat-workspace .chat-conversation-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 245, 239, 0.99)) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

.chat-workspace .chat-conversation-card:hover,
.chat-workspace .chat-conversation-card.active {
  background: linear-gradient(180deg, rgba(235, 255, 246, 0.99), rgba(220, 248, 198, 0.92)) !important;
}

.chat-workspace .chat-message-list {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.48) 0, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 80% 10%, rgba(223, 242, 214, 0.38) 0, rgba(223, 242, 214, 0) 18%),
    linear-gradient(180deg, rgba(239, 234, 226, 0.88) 0%, rgba(233, 229, 221, 0.92) 100%) !important;
}

.chat-workspace .chat-message-bubble {
  background: rgba(255, 255, 255, 0.99) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

.chat-workspace .chat-message-row.outbound .chat-message-bubble {
  background: linear-gradient(180deg, rgba(220, 248, 198, 0.99), rgba(198, 242, 174, 0.99)) !important;
}

.chat-workspace .chat-linked-card,
.chat-workspace .chat-participant-chip {
  background: rgba(248, 250, 252, 0.96) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  color: #334155 !important;
}

.contacts-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.contacts-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contacts-detail-grid {
  display: grid;
  gap: 16px;
}

.contacts-link-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.contacts-link-summary .pill {
  background: rgba(123, 212, 168, 0.12);
}

.contacts-smart-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.contacts-smart-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contacts-smart-filter-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
}

.contacts-smart-filter-chip.active {
  background: rgba(43, 110, 242, 0.18);
  border-color: rgba(43, 110, 242, 0.42);
  color: var(--text);
}
.sales-order-quick-filter-bar .contacts-smart-filter-chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
}

.contacts-summary-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.contacts-summary-card small {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
}

.contacts-summary-card.active {
  border-color: rgba(43, 110, 242, 0.32);
  box-shadow: 0 18px 36px rgba(43, 110, 242, 0.12);
  background: rgba(43, 110, 242, 0.08);
}

.telecalling-workspace-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255, 247, 237, 0.9), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.lead-workspace-detail-panel {
  min-height: calc(100vh - 220px);
}

.lead-workspace-detail-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(219, 234, 254, 0.72), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.lead-workspace-detail-panel.hidden {
  display: none;
}

.lead-workspace-detail-panel #leadDetailContent {
  min-height: 640px;
}

#leadWorkspaceSection:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.14), transparent 28%),
    rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(14px);
}

#leadWorkspaceSection .lead-workspace-detail-panel {
  width: min(1240px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  min-height: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
  box-shadow: 0 34px 100px rgba(15, 23, 42, 0.34);
}

#leadWorkspaceSection #leadDetailContent {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.lead-popup-card-workspace {
  display: grid;
  gap: 12px;
}

.lead-popup-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lead-popup-detail-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.lead-popup-detail-card:hover,
.lead-popup-detail-card:focus-visible,
.lead-popup-detail-card.active {
  transform: translateY(-1px);
  border-color: rgba(251, 146, 60, 0.38);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.94));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.lead-popup-detail-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.lead-popup-detail-card-summary,
.lead-popup-detail-card-blocked,
.lead-popup-detail-card-next {
  display: block;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #475569;
}

.lead-popup-detail-card-blocked {
  color: #b45309;
  font-weight: 700;
}

.lead-popup-detail-card-next {
  color: #0369a1;
  font-weight: 700;
}

.lead-popup-expanded-panel {
  display: grid;
  gap: 14px;
}

/* Lead Control Center reference redesign: compact, action-first, read-only by default. */
.lead-reference-shell {
  gap: 12px;
  color: #111827;
}

.lead-reference-topbar,
.lead-reference-hero,
.lead-reference-quick-actions,
.lead-followup-urgency-strip,
.lead-reference-commercial-flow,
.lead-reference-edit-rail,
.lead-detail-tab-panels .detail-group,
.lead-detail-tab-panels .detail-group-secondary {
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.lead-reference-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

.lead-reference-breadcrumb,
.lead-reference-topbar-actions,
.lead-reference-name-row,
.lead-reference-action-row,
.lead-reference-section-title,
.lead-followup-urgency-actions,
.lead-reference-edit-rail-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-reference-breadcrumb {
  color: #0f172a;
  font-size: 0.86rem;
}

.lead-reference-breadcrumb span {
  color: #94a3b8;
}

.lead-reference-topbar-actions {
  justify-content: flex-end;
}

.lead-reference-lock-state {
  font-weight: 800;
}

.lead-reference-unlock-button {
  min-width: 136px;
}

.lead-reference-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.lead-reference-layout-editing {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  column-gap: 18px;
}

#leadWorkspaceSection .lead-reference-shell {
  width: min(100%, 1180px);
}

.lead-reference-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lead-reference-hero {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(320px, 1.15fr) minmax(260px, 0.72fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px 18px;
  border-radius: 20px;
}

.lead-reference-identity,
.lead-reference-name-block,
.lead-reference-contact-list,
.lead-reference-trip-grid,
.lead-reference-owner-grid {
  display: grid;
  gap: 10px;
}

.lead-reference-identity {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
}

.lead-reference-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #6d28d9, #2563eb);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.lead-reference-name-block h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.08;
}

.lead-reference-name-block p,
.lead-reference-contact-list span,
.lead-reference-trip-grid span,
.lead-reference-owner-grid span,
.lead-followup-urgency-row span {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.lead-reference-contact-list {
  grid-column: 1 / -1;
  gap: 8px;
}

.lead-reference-contact-list strong,
.lead-reference-trip-grid strong,
.lead-reference-owner-grid strong,
.lead-followup-urgency-row strong {
  color: #0f172a;
  font-size: 0.88rem;
}

.lead-reference-trip-grid,
.lead-reference-owner-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid rgba(226, 232, 240, 0.8);
  padding-left: 14px;
}

.lead-reference-owner-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-reference-trip-grid > div,
.lead-reference-owner-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lead-reference-trip-wide,
.lead-reference-owner-wide {
  grid-column: 1 / -1;
}

.lead-reference-service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-reference-service-chips span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.72rem;
  font-weight: 800;
}

.lead-reference-section-title {
  justify-content: space-between;
  flex-wrap: wrap;
}

.lead-reference-section-title strong {
  color: #0f172a;
}

.lead-reference-section-title > span:not(.pill) {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.lead-reference-quick-actions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}

.lead-reference-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.lead-reference-action-row-secondary {
  padding-top: 4px;
  border-top: 1px dashed rgba(226, 232, 240, 0.95);
}

.lead-reference-action-row .primary-button,
.lead-reference-action-row .ghost-button {
  flex: 1 1 118px;
  min-width: 0;
  max-width: 100%;
  min-height: 38px;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-reference-action-row .lead-workspace-next-action-button {
  flex: 1.5 1 180px;
  min-width: min(180px, 100%);
}

.lead-reference-action-row-secondary .lead-premium-action-subtle {
  flex: 0 1 148px;
}

.lead-followup-urgency-strip {
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}

.lead-followup-urgency-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) minmax(150px, 1fr) minmax(90px, 0.6fr) minmax(180px, 1.1fr) minmax(150px, 0.9fr);
  gap: 10px;
  align-items: stretch;
}

.lead-followup-urgency-row article,
.lead-followup-urgency-actions {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.86);
}

.lead-followup-risk-cell {
  border-color: rgba(248, 113, 113, 0.24) !important;
  background: rgba(254, 242, 242, 0.9) !important;
}

.lead-followup-urgency-actions {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.lead-followup-urgency-actions .primary-button,
.lead-followup-urgency-actions .ghost-button {
  min-height: 36px;
}

.lead-followup-urgency-note {
  margin: 0;
  padding: 0 2px;
}

.lead-reference-commercial-flow {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

.lead-reference-commercial-flow .lead-commercial-progress-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lead-reference-commercial-flow .lead-commercial-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  overflow: visible;
}

.lead-reference-commercial-flow .lead-commercial-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 8px;
  min-width: 0;
  min-height: 70px;
  padding: 12px;
  border-radius: 16px;
  overflow: hidden;
}

.lead-reference-commercial-flow .lead-commercial-step:not(:last-child)::after {
  display: none;
}

.lead-reference-commercial-flow .lead-commercial-step-label,
.lead-reference-commercial-flow .lead-commercial-step strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-reference-commercial-flow .lead-commercial-step p {
  grid-column: 1 / -1;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 0.78rem;
  line-height: 1.35;
}

.lead-reference-commercial-flow .lead-commercial-blocker {
  min-width: 0;
  width: 100%;
}

.lead-reference-commercial-flow .lead-commercial-blocker strong,
.lead-reference-commercial-flow .lead-commercial-blocker p {
  overflow-wrap: anywhere;
}

.lead-quote-report-shell {
  gap: 14px;
}

.lead-quote-report-control-row,
.lead-quote-report-kpi-grid,
.lead-quote-report-state-grid,
.lead-quote-report-list {
  display: grid;
  gap: 12px;
}

.lead-quote-report-control-row {
  grid-template-columns: minmax(220px, 1.6fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) auto;
  align-items: end;
}

.lead-quote-report-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lead-quote-report-kpi-grid > div,
.lead-quote-report-state-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
}

.lead-quote-report-kpi-grid span,
.lead-quote-report-state-grid span,
.lead-quote-report-blocker span,
.lead-quote-report-intelligence span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-quote-report-kpi-grid strong,
.lead-quote-report-state-grid strong,
.lead-quote-report-blocker strong,
.lead-quote-report-intelligence strong {
  min-width: 0;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.lead-quote-report-intelligence,
.lead-quote-report-card,
.lead-quote-report-empty {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.lead-quote-report-management {
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.lead-quote-report-agent {
  border-color: rgba(16, 185, 129, 0.18);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.92));
}

.lead-quote-report-card {
  border-style: solid;
}

.lead-quote-report-card-high {
  border-color: rgba(16, 185, 129, 0.28);
}

.lead-quote-report-card-medium {
  border-color: rgba(245, 158, 11, 0.26);
}

.lead-quote-report-card-low {
  border-color: rgba(239, 68, 68, 0.26);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.78), rgba(255, 255, 255, 0.94));
}

.lead-quote-report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.lead-quote-report-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lead-quote-report-card-head span:not(.pill) {
  color: #64748b;
  font-size: 0.86rem;
}

.lead-quote-report-state-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lead-quote-report-blocker {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
}

.lead-quote-report-blocker p,
.lead-quote-report-intelligence p,
.lead-quote-report-empty p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.lead-quote-report-result-count {
  margin: 0;
}

.lead-quote-report-filter-empty {
  border-style: dashed;
}

.lead-commercial-step-index {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #f8fafc;
  color: #64748b;
  font-weight: 900;
}

.lead-commercial-step-active {
  border-color: rgba(37, 99, 235, 0.38) !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.lead-commercial-step-active .lead-commercial-step-index {
  border-color: rgba(37, 99, 235, 0.45);
  background: #eff6ff;
  color: #1d4ed8;
}

.lead-reference-tabs-shell {
  gap: 0;
}

.lead-reference-tabs {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  padding: 0 4px;
}

.lead-reference-tab {
  min-height: 44px;
  min-width: auto;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lead-reference-tab .lead-popup-detail-card-top {
  gap: 8px;
  align-items: center;
}

.lead-reference-tab .pill,
.lead-reference-tab .lead-popup-detail-card-summary,
.lead-reference-tab .lead-popup-detail-card-blocked,
.lead-reference-tab .lead-popup-detail-card-next {
  display: none;
}

.lead-reference-tab:hover,
.lead-reference-tab:focus-visible,
.lead-reference-tab.active {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.lead-reference-tab.active {
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
}

.lead-reference-edit-rail {
  position: sticky;
  top: 64px;
  display: grid;
  gap: 14px;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 164px);
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
}

.lead-reference-edit-rail.hidden {
  display: none;
}

.lead-reference-edit-rail-header {
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.lead-reference-edit-rail-header h3 {
  margin: 0;
  font-size: 1rem;
}

.lead-reference-unlock-card,
.lead-reference-why-unlock {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
}

.lead-reference-unlock-card .field {
  margin: 0;
}

.lead-reference-unlock-card-blocked {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(254, 242, 242, 0.9);
}

.lead-reference-unlock-card-editing {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.9);
}

.lead-reference-edit-rail-unlocked {
  gap: 10px;
  padding: 12px;
}

.lead-reference-edit-rail-unlocked .lead-reference-edit-rail-header {
  padding-bottom: 8px;
}

.lead-reference-edit-rail-unlocked .lead-reference-unlock-card-editing {
  padding: 12px;
}

.lead-reference-edit-rail-unlocked .lead-reference-why-unlock,
.lead-reference-edit-rail-unlocked .lead-reference-edit-footnote {
  display: none;
}

.lead-reference-why-unlock ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #475569;
  font-size: 0.84rem;
}

.lead-reference-edit-footnote {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eff6ff;
  color: #475569;
  font-size: 0.78rem;
}

.lead-record-unlock-relocated {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.78);
}

@media (max-width: 1180px) {
  .lead-reference-layout,
  .lead-reference-hero {
    grid-template-columns: 1fr;
  }

  .lead-reference-trip-grid,
  .lead-reference-owner-grid {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    padding-top: 12px;
  }

  .lead-reference-action-row,
  .lead-followup-urgency-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-reference-commercial-flow .lead-commercial-stepper {
    grid-auto-flow: column;
    grid-auto-columns: minmax(158px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .lead-reference-commercial-flow .lead-commercial-step {
    scroll-snap-align: start;
  }

  .lead-reference-edit-rail {
    position: static;
    max-height: none;
    overflow: visible;
    width: 100%;
  }

  .lead-quote-report-control-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-quote-report-control-row .ghost-button {
    align-self: stretch;
  }

  .lead-quote-report-kpi-grid,
  .lead-quote-report-state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .lead-reference-topbar,
  .lead-reference-section-title,
  .lead-reference-name-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .lead-reference-topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .lead-reference-identity,
  .lead-reference-trip-grid,
  .lead-reference-owner-grid,
  .lead-reference-action-row,
  .lead-followup-urgency-row {
    grid-template-columns: 1fr;
  }

  .lead-reference-commercial-flow .lead-commercial-stepper {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .lead-quote-report-control-row,
  .lead-quote-report-kpi-grid,
  .lead-quote-report-state-grid {
    grid-template-columns: 1fr;
  }

  .lead-quote-report-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.telecalling-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.telecalling-kanban-board {
  grid-template-columns: repeat(4, minmax(282px, 1fr));
  gap: 18px;
  padding: 8px 4px 14px;
}

.telecalling-column {
  min-width: 282px;
  height: calc(100vh - 300px);
  min-height: 560px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.94), transparent 42%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.95));
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.telecalling-column .pipeline-column-header {
  padding: 14px 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
}

.telecalling-column-fresh .pipeline-column-header {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.9), rgba(255, 255, 255, 0.94));
}

.telecalling-column-recovery .pipeline-column-header {
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.92), rgba(255, 255, 255, 0.94));
}

.telecalling-column-callback_due .pipeline-column-header {
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.92), rgba(255, 255, 255, 0.94));
}

.telecalling-column-archive_watch .pipeline-column-header {
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.92), rgba(255, 255, 255, 0.94));
}

.telecalling-column .pipeline-column-meter span {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.telecalling-column-fresh .pipeline-column-meter span {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.telecalling-column-recovery .pipeline-column-meter span {
  background: linear-gradient(90deg, #eab308, #facc15);
}

.telecalling-column-callback_due .pipeline-column-meter span {
  background: linear-gradient(90deg, #ea580c, #fb923c);
}

.telecalling-column-archive_watch .pipeline-column-meter span {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.telecalling-dropzone {
  gap: 10px;
  height: calc(100% - 86px);
  padding: 12px;
  overflow-y: auto;
}

.telecalling-card {
  gap: 10px;
}

.telecalling-list-shell {
  max-height: none;
}

.telecalling-list-table {
  min-width: 1380px;
}

.telecalling-list-table tbody td {
  vertical-align: top;
}

.telecalling-list-table tbody td:last-child {
  min-width: 460px;
}

.telecalling-inline-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.telecalling-inline-form .field textarea {
  min-height: 72px;
}

.telecalling-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.telecalling-action-note {
  margin: 10px 0 0;
  color: #52627a;
  font-size: 0.9rem;
  line-height: 1.45;
}

.calling-update-form {
  gap: 12px;
}

.calling-update-call-evidence {
  display: grid;
  gap: 12px;
  padding: 4px 0 14px;
  border-bottom: 1px solid rgba(123, 145, 173, 0.22);
}

.calling-update-call-evidence-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.calling-update-call-evidence-heading div,
.calling-update-recording-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.calling-update-call-evidence-heading p {
  margin: 4px 0 0;
  color: #52627a;
  font-size: 0.88rem;
  line-height: 1.45;
}

.calling-update-recording-fields .checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 0.86rem;
}

@media (max-width: 640px) {
  .calling-update-call-evidence-heading {
    display: grid;
  }
}

/* Guided all-destination itinerary builder */
.quote-guided-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 12020;
  display: grid;
  place-items: center;
  padding: 20px;
}

.quote-guided-ai-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(7px);
}

.quote-guided-ai-card {
  position: relative;
  width: min(1480px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
}

.quote-guided-ai-head,
.quote-guided-ai-footer,
.quote-guided-section-head,
.quote-guided-brief-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quote-guided-ai-head,
.quote-guided-ai-footer {
  position: sticky;
  z-index: 2;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.quote-guided-ai-head {
  top: 0;
  border-bottom: 1px solid #e2e8f0;
}

.quote-guided-ai-footer {
  bottom: 0;
  border-top: 1px solid #e2e8f0;
}

.quote-guided-ai-head h3,
.quote-guided-ai-head p,
.quote-guided-ai-footer p,
.quote-guided-section-head p {
  margin: 0;
}

.quote-guided-ai-head .eyebrow {
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.quote-guided-basics,
.quote-guided-brief-section,
.quote-guided-grid-section {
  margin: 18px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  padding: 18px;
}

.quote-guided-basics {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(105px, 1fr));
  gap: 12px;
}

.quote-guided-basics label,
.quote-guided-day-row label,
.quote-guided-brief-section label {
  display: grid;
  gap: 6px;
}

.quote-guided-basics label > span,
.quote-guided-day-row label > span,
.quote-guided-brief-section label > span {
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.quote-guided-basics input,
.quote-guided-basics select,
.quote-guided-day-row input,
.quote-guided-day-row select,
.quote-guided-day-row textarea,
.quote-guided-brief-section textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  padding: 10px 11px;
  color: #0f172a;
  font: inherit;
}

.quote-guided-brief-section {
  display: grid;
  gap: 12px;
}

.quote-guided-brief-actions small,
.quote-guided-day-number small,
.quote-guided-section-head p,
.quote-guided-row-meta,
.quote-copilot-day-compare small {
  color: #64748b;
}

.quote-guided-section-head > span {
  border-radius: 999px;
  background: #eff6ff;
  padding: 8px 12px;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
}

[data-quote-guided-rows] {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quote-guided-day-row {
  display: grid;
  grid-template-columns: 84px repeat(3, minmax(115px, 1fr)) minmax(140px, 1.1fr) minmax(140px, 1.1fr) minmax(150px, 1.2fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
}

.quote-guided-day-number {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 64px;
}

.quote-guided-day-summary {
  grid-column: span 2;
}

.quote-guided-row-meta {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.76rem;
}

.quote-guided-pending-button {
  border: 1px solid #fdba74;
  border-radius: 999px;
  background: #fff7ed;
  padding: 6px 10px;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.quote-guided-ai-footer > div {
  display: flex;
  gap: 10px;
}

.quote-copilot-day-comparison {
  display: grid;
  gap: 9px;
  margin: 18px 0;
}

.quote-copilot-day-comparison > div {
  display: grid;
  gap: 3px;
}

.quote-copilot-day-compare {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(140px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  padding: 11px 12px;
}

.quote-copilot-day-compare > span {
  display: grid;
  gap: 2px;
}

.quote-copilot-day-compare em {
  color: #475569;
  font-size: 0.78rem;
  font-style: normal;
  text-align: right;
}

.quote-copilot-soft-warning-ack {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #fde68a;
  border-radius: 13px;
  background: #fffbeb;
  padding: 12px;
  color: #92400e;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .quote-guided-basics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-guided-day-row {
    grid-template-columns: 72px repeat(3, minmax(0, 1fr));
  }

  .quote-guided-day-summary {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .quote-guided-ai-modal {
    padding: 8px;
  }

  .quote-guided-ai-card {
    max-height: calc(100vh - 16px);
    border-radius: 18px;
  }

  .quote-guided-ai-head,
  .quote-guided-ai-footer,
  .quote-guided-brief-actions,
  .quote-guided-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-guided-basics,
  .quote-guided-day-row {
    grid-template-columns: 1fr;
  }

  .quote-guided-day-summary,
  .quote-guided-row-meta {
    grid-column: auto;
  }

  .quote-guided-basics,
  .quote-guided-brief-section,
  .quote-guided-grid-section {
    margin: 12px;
  }

  .quote-guided-ai-footer > div,
  .quote-guided-ai-footer button {
    width: 100%;
  }

  .quote-copilot-day-compare {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quote-copilot-day-compare em {
    grid-column: 2;
    text-align: left;
  }
}

.calling-update-shortcut-shell {
  display: grid;
  gap: 10px;
}

.calling-update-shortcut-groups {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(123, 145, 173, 0.22);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
}

.calling-update-shortcut-group {
  display: grid;
  gap: 8px;
}

.calling-update-shortcut-group > span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #52627a;
}

.calling-update-shortcut-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calling-update-shortcut {
  border: 1px solid rgba(123, 145, 173, 0.24);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: #1f2c3d;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.calling-update-shortcut.is-active {
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(239, 246, 255, 0.95);
  color: #1d4ed8;
}

.calling-update-rare-select {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(123, 145, 173, 0.24);
  background: #fff;
  color: #1f2c3d;
  font-size: 0.84rem;
  padding: 0 12px;
}

.calling-update-hidden-outcome {
  display: none;
}

.calling-update-selection-summary {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(123, 145, 173, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

.calling-update-selection-summary strong,
.calling-update-selection-summary p {
  margin: 0;
}

.calling-update-selection-summary p {
  color: #52627a;
  font-size: 0.85rem;
}

.calling-update-recommendation-card,
.calling-update-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(123, 145, 173, 0.22);
  background: linear-gradient(180deg, rgba(246, 249, 253, 0.98), rgba(238, 244, 251, 0.96));
  box-shadow: 0 16px 32px rgba(18, 38, 63, 0.08);
}

.calling-update-recommendation-card strong,
.calling-update-summary-card strong {
  color: #16324f;
}

.calling-update-recommendation-meta {
  margin: 0;
  color: #37516e;
  font-size: 0.9rem;
}

.calling-update-warning-list {
  margin: 0;
  padding-left: 18px;
  color: #8a5a14;
  font-size: 0.88rem;
}

.calling-update-warning-list li + li {
  margin-top: 4px;
}

.calling-update-mode-row {
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid rgba(21, 72, 133, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(236, 242, 250, 0.92));
}

.calling-update-mode-pill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calling-update-mode-button {
  min-width: 132px;
  border-radius: 14px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.calling-update-mode-button.is-active {
  border-color: rgba(34, 94, 168, 0.36);
  background: linear-gradient(180deg, rgba(34, 94, 168, 0.16), rgba(34, 94, 168, 0.08));
  color: #173a61;
  box-shadow: 0 8px 18px rgba(28, 76, 137, 0.12);
  transform: translateY(-1px);
}

.calling-update-mode-button.is-disabled,
.calling-update-mode-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.calling-update-mode-status,
.calling-update-mode-helper {
  margin: 0;
  font-size: 0.9rem;
  color: #4f6782;
}

.calling-update-mode-status {
  padding: 0 2px;
}

.calling-update-save-button.is-disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.calling-update-save-button.is-ready {
  cursor: pointer;
}

.calling-update-save-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(20, 184, 166, 0.26);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(240, 249, 255, 0.96));
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.12);
  color: #102338;
}

.calling-update-save-feedback div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.calling-update-save-feedback strong {
  font-size: 1rem;
  color: #0f766e;
}

.calling-update-save-feedback span,
.calling-update-save-feedback small {
  color: #48617d;
  line-height: 1.35;
}

.calling-update-save-feedback button {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f766e;
  font-weight: 800;
  padding: 8px 12px;
  cursor: pointer;
}

.telecalling-inline-form.calling-update-form {
  gap: 10px;
}

.telecalling-inline-form .calling-update-recommendation-card,
.telecalling-inline-form .calling-update-summary-card {
  padding: 12px 14px;
  border-radius: 14px;
}

@media (max-width: 1180px) {
  .lead-workspace-detail-panel {
    min-height: auto;
  }

  .lead-popup-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .telecalling-filter-grid,
  .telecalling-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .telecalling-kanban-board {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 760px) {
  .telecalling-kanban-board {
    grid-template-columns: 1fr;
  }

  .telecalling-column {
    min-width: 0;
    height: 540px;
  }

  .telecalling-filter-grid,
  .telecalling-inline-grid {
    grid-template-columns: 1fr;
  }

  .telecalling-list-table {
    min-width: 0;
  }
}

.contacts-ops-lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.contacts-ops-lane-card {
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.contacts-ops-lane-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.contacts-ops-lane-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.contacts-ops-lane-card.active {
  border-color: rgba(251, 146, 60, 0.28);
  background: rgba(251, 146, 60, 0.08);
  box-shadow: 0 18px 36px rgba(251, 146, 60, 0.1);
}

.contacts-handoff-panel {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.contacts-handoff-panel p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.contacts-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.contacts-health-card {
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contacts-health-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.contacts-health-card p {
  margin: 8px 0 0;
}

.contacts-health-list {
  display: grid;
  gap: 8px;
}

.contacts-readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.contacts-readiness-card {
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contacts-readiness-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.contacts-readiness-card p {
  margin: 10px 0 0;
}

.contacts-escalation-strip {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.contacts-escalation-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  background: rgba(251, 146, 60, 0.08);
}

.contacts-escalation-item p {
  margin: 0;
}

.contacts-activity-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.contacts-activity-item {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contacts-activity-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.contacts-activity-item p {
  margin: 8px 0 0;
}

.contacts-activity-item span:last-child {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.contacts-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.contacts-quick-action-card {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contacts-quick-action-card strong {
  display: block;
}

.contacts-quick-action-card p {
  margin: 6px 0 0;
}

.contacts-detail-section {
  display: grid;
  gap: 10px;
}

.contacts-detail-section + .contacts-detail-section {
  margin-top: 12px;
}

.contacts-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contacts-info-item {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.contacts-info-item span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.contacts-row-counts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.contacts-table-primary {
  display: grid;
  gap: 6px;
}

.contacts-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.contacts-row-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contacts-row-sources .pill {
  background: rgba(255, 255, 255, 0.06);
}

.contacts-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contacts-record-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 27, 45, 0.72);
  border-radius: 18px;
  padding: 14px;
}

.contacts-record-card strong {
  display: block;
}

.contacts-record-card p {
  margin: 6px 0 0;
}

.record-audit-history-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.72)),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.16);
}

.record-audit-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.record-audit-history-head h4 {
  margin: 2px 0 4px;
}

.record-audit-history-state {
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  text-align: right;
}

.record-audit-history-state span,
.record-audit-change span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.record-audit-history-state strong,
.record-audit-change strong {
  color: var(--text);
}

.record-audit-history-list {
  display: grid;
  gap: 10px;
}

.record-audit-history-item,
.record-audit-history-empty {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.48);
}

.record-audit-history-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.record-audit-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.record-audit-history-meta span {
  color: var(--muted);
  font-size: 0.78rem;
}

.record-audit-change-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.record-audit-change {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.record-audit-change span {
  grid-column: 1 / -1;
}

.record-audit-change em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.record-audit-history-empty {
  color: var(--muted);
}

/* Phase 12 workspace polish: compact chrome, make list/kanban the working surface. */
.workspace-pagination-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 0.95fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.workspace-pagination-summary,
.workspace-pagination-search,
.workspace-pagination-size,
.workspace-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-pagination-summary {
  min-width: 0;
}

.workspace-pagination-summary strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.workspace-pagination-summary span,
.workspace-pagination-search span,
.workspace-pagination-size span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.workspace-pagination-search input,
.workspace-pagination-size select {
  min-height: 34px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 0.84rem;
}

.workspace-pagination-search input {
  width: min(320px, 34vw);
  padding: 0 12px;
}

.workspace-pagination-size select {
  padding: 0 28px 0 10px;
}

.workspace-pagination-actions {
  justify-content: flex-end;
}

#leadPipelineSection .crm-strip,
#leadPipelineSection .lead-workspace-shell,
#leadPipelineSection .lead-lms-tab-shell,
#leadPipelineSection .lead-filter-panel,
#quoteDashboardSection .quote-dashboard-grid,
#quoteDashboardSection .quote-summary-grid,
#salesOrdersSection .sales-order-command-panel,
#invoicesSection .invoice-control-grid,
#purchasingSection .purchasing-workspace-grid {
  gap: 12px;
}

#leadPipelineSection .crm-strip,
#leadPipelineSection .summary-tile,
#quoteDashboardSection .quote-summary-card,
#salesOrdersSection .sales-order-summary-card,
#invoicesSection .invoice-summary-card,
#purchasingSection .purchasing-total-card {
  padding: 12px 14px;
  min-height: auto;
}

#leadPipelineSection .pipeline-board {
  min-height: calc(100vh - 260px);
  padding-top: 4px;
}

#leadPipelineSection .pipeline-column {
  min-height: 560px;
  height: calc(100vh - 252px);
}

#leadPipelineSection .lead-card,
#quoteDashboardSection .quote-recent-item,
#purchasingSection .quote-recent-item,
#invoicesSection .invoice-record-card {
  padding: 12px 14px;
}

/* Lead Pipeline priority patch: keep the backend-fed board/list primary. */
body[data-active-section="lead-pipeline"] #workspaceShellBar {
  display: none !important;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-bar-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-copy {
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-copy > .eyebrow {
  display: none;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-title-row {
  grid-column: 1 / 3;
  gap: 8px;
  min-width: 0;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-copy h3 {
  font-size: 1rem;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-copy p {
  grid-column: 3 / 4;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-actions {
  justify-content: flex-end;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-actions .ghost-button,
body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-actions .primary-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar .workspace-shell-meta-grid {
  display: none !important;
}

#leadPipelineSection.lead-workspace-priority {
  gap: 10px;
  align-content: start;
}

#leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 8px 12px;
}

#leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy {
  gap: 2px;
}

#leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy h3,
#leadPipelineSection.lead-workspace-priority .pipeline-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

#leadPipelineSection.lead-workspace-priority .lead-results-summary {
  margin: 0;
  font-size: 0.78rem;
}

#leadPipelineSection.lead-workspace-priority .crm-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 12px;
}

#leadPipelineSection.lead-workspace-priority .crm-strip-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 8px;
}

#leadPipelineSection.lead-workspace-priority .crm-mini-stat {
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 14px;
}

#leadPipelineSection.lead-workspace-priority .crm-mini-stat strong {
  font-size: 1.05rem;
}

#leadPipelineSection.lead-workspace-priority .crm-strip-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#leadPipelineSection.lead-workspace-priority .crm-strip-actions .ghost-button,
#leadPipelineSection.lead-workspace-priority .crm-strip-actions .primary-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
}

#leadPipelineSection.lead-workspace-priority #leadImportExportStatus {
  grid-column: 1 / -1;
  margin-top: 0 !important;
  font-size: 0.74rem;
}

#leadPipelineSection.lead-workspace-priority .followup-reminder-panel {
  padding: 10px 12px;
}

#leadPipelineSection.lead-workspace-priority .followup-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#leadPipelineSection.lead-workspace-priority .followup-reminder-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

#leadPipelineSection.lead-workspace-priority .followup-reminder-card {
  min-height: auto;
  padding: 10px;
  border-radius: 14px;
}

#leadPipelineSection.lead-workspace-priority .followup-reminder-card p {
  margin: 4px 0 0;
  font-size: 0.76rem;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-panel {
  position: sticky;
  top: 12px;
  z-index: 8;
  margin: 0;
  padding: 10px 12px;
  border-radius: 18px;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-shell {
  gap: 8px;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-topbar,
#leadPipelineSection.lead-workspace-priority .lead-quick-filter-bar,
#leadPipelineSection.lead-workspace-priority .lead-topbar-actions,
#leadPipelineSection.lead-workspace-priority .lead-workspace-summary-row {
  display: flex;
  align-items: end;
  gap: 8px;
  overflow-x: auto;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-command-bar,
#leadPipelineSection.lead-workspace-priority .lead-filter-menu-row {
  overflow: visible;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-menu-row {
  flex-wrap: wrap;
  align-items: center;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-dropdown {
  color: #0f172a;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-dropdown .lead-quick-filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-dropdown .lead-inline-field,
#leadPipelineSection.lead-workspace-priority .lead-filter-dropdown .lead-quick-field {
  flex: initial;
  min-width: 0;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-dropdown input,
#leadPipelineSection.lead-workspace-priority .lead-filter-dropdown select {
  min-height: 38px;
  color: #0f172a;
}

#leadPipelineSection.lead-workspace-priority .lead-active-filter-chips {
  gap: 6px;
}

#leadPipelineSection.lead-workspace-priority .lead-active-filter-chip {
  min-height: 28px;
  max-width: 220px;
  padding: 0 9px;
  font-size: 0.74rem;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-search {
  flex: 1 0 280px;
}

#leadPipelineSection.lead-workspace-priority .lead-inline-field,
#leadPipelineSection.lead-workspace-priority .lead-quick-field {
  flex: 0 0 150px;
  min-width: 150px;
}

#leadPipelineSection.lead-workspace-priority .lead-topbar-actions .ghost-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-search input,
#leadPipelineSection.lead-workspace-priority .lead-inline-field select,
#leadPipelineSection.lead-workspace-priority .lead-quick-field select {
  min-height: 34px;
}

#leadPipelineSection.lead-workspace-priority .lead-smart-filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

#leadPipelineSection.lead-workspace-priority .lead-smart-chip {
  flex: 0 0 auto;
  padding: 6px 9px;
  font-size: 0.74rem;
}

#leadPipelineSection.lead-workspace-priority .lead-workspace-summary-row {
  justify-content: space-between;
  align-items: center;
}

#leadPipelineSection.lead-workspace-priority .lead-filter-summary-block {
  flex: 1 1 auto;
  min-width: 260px;
}

#leadPipelineSection.lead-workspace-priority .lead-segment-grid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

#leadPipelineSection.lead-workspace-priority .lead-segment-card {
  min-height: auto;
  padding: 9px 10px;
  border-radius: 14px;
}

#leadPipelineSection.lead-workspace-priority .lead-segment-card p {
  margin: 4px 0 0;
  font-size: 0.74rem;
}

#leadPipelineSection.lead-workspace-priority .pipeline-panel {
  padding: 12px;
}

#leadPipelineSection.lead-workspace-priority .pipeline-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#leadPipelineSection.lead-workspace-priority .pipeline-panel-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#leadPipelineSection.lead-workspace-priority .pipeline-toolbar {
  position: sticky;
  top: 86px;
  z-index: 7;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(14px);
}

#leadPipelineSection.lead-workspace-priority .pipeline-board {
  min-height: 65vh;
  height: calc(100vh - 232px);
  gap: 10px;
  padding: 4px 2px 8px;
}

#leadPipelineSection.lead-workspace-priority .pipeline-column {
  min-height: 65vh;
  height: 100%;
  min-width: 266px;
}

#leadPipelineSection.lead-workspace-priority .pipeline-column-header {
  padding: 10px;
}

#leadPipelineSection.lead-workspace-priority .pipeline-dropzone {
  height: calc(100% - 78px);
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

#leadPipelineSection.lead-workspace-priority .lead-card {
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
}

#leadPipelineSection.lead-workspace-priority .lead-card-body {
  gap: 5px;
}

#leadPipelineSection.lead-workspace-priority .lead-card-line {
  font-size: 0.73rem;
  line-height: 1.35;
}

#leadPipelineSection.lead-workspace-priority .lead-card-quick-actions {
  gap: 6px;
}

#leadPipelineSection.lead-workspace-priority .lead-card-quick-actions .ghost-button,
#leadPipelineSection.lead-workspace-priority .lead-row-quick-actions .ghost-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.7rem;
}

#leadPipelineSection.lead-workspace-priority .lead-table-shell {
  min-height: 65vh;
  max-height: calc(100vh - 232px);
  overflow: auto;
  border-radius: 18px;
}

#leadPipelineSection.lead-workspace-priority .lead-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

#leadPipelineSection.lead-workspace-priority .lead-table tbody td {
  padding: 9px 10px;
}

#leadPipelineSection.lead-workspace-priority .lead-table-cell-stack {
  gap: 3px;
}

#leadPipelineSection.lead-workspace-priority .lead-row-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1120px) {
  #leadPipelineSection.lead-workspace-priority .crm-strip,
  #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell {
    grid-template-columns: 1fr;
  }

  #leadPipelineSection.lead-workspace-priority .crm-strip-actions,
  #leadPipelineSection.lead-workspace-priority .pipeline-panel-meta {
    justify-content: flex-start;
  }

  #leadPipelineSection.lead-workspace-priority .followup-reminder-list,
  #leadPipelineSection.lead-workspace-priority .lead-segment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #leadPipelineSection.lead-workspace-priority .crm-strip-metrics,
  #leadPipelineSection.lead-workspace-priority .followup-reminder-list,
  #leadPipelineSection.lead-workspace-priority .lead-segment-grid {
    grid-template-columns: 1fr;
  }

  #leadPipelineSection.lead-workspace-priority .pipeline-toolbar,
  #leadPipelineSection.lead-workspace-priority .lead-filter-panel {
    position: static;
  }

  #leadPipelineSection.lead-workspace-priority .pipeline-board,
  #leadPipelineSection.lead-workspace-priority .lead-table-shell {
    min-height: 60vh;
    height: auto;
    max-height: none;
  }
}

/* Lead Pipeline desktop priority: keep the actual lead board/list as the hero area. */
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority {
  gap: 8px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell {
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 16px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy {
  min-width: 0;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy .eyebrow,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy .lead-results-summary {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy h3 {
  font-size: 0.92rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip {
  padding: 7px 10px;
  border-radius: 16px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip-metrics {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-mini-stat {
  flex: 0 0 150px;
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 12px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-mini-stat span {
  font-size: 0.55rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-mini-stat strong {
  font-size: 0.86rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip-actions .ghost-button,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip-actions .primary-button,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip-actions .checkbox-item {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 12px;
  font-size: 0.66rem;
  white-space: nowrap;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority #leadImportExportStatus {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .followup-reminder-panel,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-segment-grid {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-panel {
  position: static;
  padding: 8px 10px;
  border-radius: 16px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-shell {
  gap: 5px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-topbar {
  align-items: center;
  gap: 6px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-search {
  flex: 1 1 520px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-search span,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-active-filter-chips,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-workspace-summary-row {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-search input {
  min-height: 34px;
  border-radius: 12px;
  font-size: 0.72rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-menu-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 0.72rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-smart-filter-chips {
  gap: 4px;
  padding: 0;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-smart-chip {
  min-height: 26px;
  padding: 0 8px;
  font-size: 0.64rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 280px);
  padding: 10px 12px 12px;
  gap: 6px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-toolbar {
  position: static;
  margin-bottom: 4px;
  padding: 4px 0 6px;
  gap: 6px;
  border-bottom-color: rgba(105, 122, 148, 0.08);
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel-header {
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel-header .eyebrow,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-hint,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-bulk-stage-note,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority #leadPaginationControls,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority #leadListPresetBar {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel-header h3 {
  font-size: 0.92rem;
  line-height: 1.15;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel-meta {
  gap: 6px;
  margin-left: auto;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-toolbar-group {
  gap: 5px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-toolbar-group-end {
  margin-left: auto;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .view-toggle {
  min-height: 28px;
  padding: 2px;
  border-radius: 12px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .view-toggle-button {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.68rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .toolbar-chip,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .toolbar-meta {
  min-height: 20px;
  padding: 0 7px;
  font-size: 0.62rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-bulk-field {
  min-width: 120px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-bulk-field span {
  display: none;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-bulk-field select,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-bulk-field input {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.7rem;
  border-radius: 10px;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority #applyBulkAssignmentButton {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.7rem;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-table-shell,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-board {
  flex: 1 1 auto;
  min-height: calc(100dvh - 320px);
  max-height: none;
}

/* Lead Pipeline desktop priority v3: keep existing lead list design, make it the page hero. */
body[data-active-section="lead-pipeline"] #workspaceShellBar {
  display: none !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority {
  gap: 5px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell,
body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-strip,
body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #followupReminderPanel,
body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .followup-reminder-panel,
body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #leadSmartSegments,
body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-segment-grid {
  display: none !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-panel {
  margin: 0 !important;
  border-radius: 12px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-panel {
  padding: 4px 8px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-shell {
  gap: 4px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-search input,
body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-menu-button {
  min-height: 28px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-smart-filter-chips {
  min-height: 20px !important;
  gap: 4px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-smart-filter-chip {
  min-height: 20px !important;
  padding: 0 8px !important;
  font-size: 0.62rem !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel {
  flex: 1 1 auto !important;
  min-height: calc(100dvh - 128px) !important;
  padding: 7px 10px 10px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-toolbar {
  margin-bottom: 2px !important;
  padding: 0 0 3px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-table-shell,
body[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-board {
  min-height: calc(100dvh - 200px) !important;
}

/* Mobile LMS app shell: compact only the pre-pipeline header chrome. */
body.mobile-embed[data-active-section="lead-pipeline"] {
  overflow-x: hidden;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority {
  gap: 8px;
  max-width: 100%;
  overflow-x: hidden;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell {
  padding: 10px 12px;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-lms-tab-row {
  display: none;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy .eyebrow {
  margin-bottom: 2px;
  font-size: 0.68rem;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-lms-tab-copy h3 {
  font-size: 1.05rem;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-results-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-strip {
  gap: 8px;
  padding: 10px;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-strip-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-mini-stat {
  min-height: 48px;
  padding: 7px 9px;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-mini-stat span {
  font-size: 0.62rem;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-mini-stat strong {
  font-size: 1rem;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #leadImportExportStatus {
  display: none !important;
}

/* Mobile app lead pipeline priority: lead work first, status chrome second. */
body.mobile-embed[data-active-section="lead-pipeline"] #workspaceShellBar {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] .dashboard-main {
  min-height: 100dvh;
  gap: 6px !important;
  padding: 6px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 12px);
  gap: 6px !important;
  padding: 0 !important;
  overflow-x: hidden;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-strip,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #followupReminderPanel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .followup-reminder-panel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #leadSmartSegments,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-segment-grid {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-panel {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 8px !important;
  border-radius: 14px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-shell {
  gap: 6px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-topbar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-workspace-summary-row {
  gap: 6px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-search input,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-menu-button {
  min-height: 38px !important;
  border-radius: 12px !important;
  font-size: 0.88rem !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-topbar-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px !important;
  overflow: visible !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-topbar-actions .ghost-button,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-topbar-actions .primary-button {
  width: 100%;
  min-height: 34px !important;
  padding: 0 8px !important;
  border-radius: 11px !important;
  font-size: 0.78rem !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-smart-filter-chips {
  min-height: 26px !important;
  gap: 5px !important;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-smart-filter-chip,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-smart-chip {
  min-height: 24px !important;
  padding: 0 8px !important;
  font-size: 0.68rem !important;
  white-space: nowrap;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel {
  flex: 1 1 auto !important;
  min-height: calc(100dvh - 142px) !important;
  padding: 8px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding-bottom: 6px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel-header .eyebrow,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel-header .muted,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-hint,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-bulk-stage-note,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #leadPaginationControls {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel-header h3 {
  margin: 0 !important;
  font-size: 1rem !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-toolbar {
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 0 6px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-table-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-board {
  min-height: calc(100dvh - 250px) !important;
  max-height: none !important;
  overflow: auto !important;
}

.quote-dashboard-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.82fr);
}

.quote-summary-grid {
  gap: 10px;
}

.sales-order-control-grid {
  grid-template-columns: minmax(0, 1.9fr) minmax(340px, 0.78fr);
  align-items: start;
}

.sales-order-command-panel,
.sales-order-control-shell,
.sales-order-list-shell {
  min-width: 0;
}

.sales-order-command-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.sales-order-search-field {
  flex: 1 1 320px;
  min-width: 220px;
}

.sales-order-scope-shell {
  flex: 0 1 260px;
  min-width: 180px;
}

.sales-order-scope-toggle {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sales-order-scope-toggle button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sales-order-command-menu {
  flex: 0 0 auto;
}

.sales-order-command-trigger,
.sales-order-export-button {
  min-height: 44px;
  white-space: nowrap;
}

.sales-order-export-button {
  padding: 0 14px;
}

.sales-order-command-panel-menu {
  z-index: 12;
}

.invoice-control-grid {
  grid-template-columns: minmax(0, 1.58fr) minmax(330px, 0.82fr);
}

.purchasing-workspace-grid {
  grid-template-columns: minmax(0, 1.56fr) minmax(330px, 0.82fr);
}

.sales-order-table-shell,
.directory-table-shell {
  max-height: calc(100vh - 310px);
  max-width: 100%;
  overflow: auto;
}

.sales-order-control-table {
  width: max-content;
  min-width: 1120px;
}

@media (max-width: 1400px) {
  .sales-order-control-grid {
    grid-template-columns: 1fr;
  }

  .sales-order-drawer-panel {
    position: static;
  }

  .sales-order-command-menu,
  .sales-order-export-button {
    flex: 1 1 160px;
  }

  .sales-order-command-trigger,
  .sales-order-export-button {
    width: 100%;
  }
}

@media (max-width: 1060px) {
  .sales-order-search-field,
  .sales-order-scope-shell {
    flex: 1 1 100%;
    min-width: 0;
  }

  .sales-order-scope-toggle {
    flex-wrap: wrap;
  }
}

/* Phase 2 quote cleanup: keep the route intact but make the builder the primary workspace. */
#quoteDashboardSection {
  display: grid;
  gap: 12px;
  overflow-x: hidden;
}

#quoteDashboardSection > .quote-dashboard-hero {
  order: 2;
  gap: 10px;
  padding: 14px;
}

#quoteDashboardSection > .quote-builder-grid {
  order: 1;
  margin-top: 0;
}

#quoteDashboardSection > .quote-dashboard-grid {
  order: 3;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 12px;
  max-height: min(52vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

#quoteDashboardSection .quote-dashboard-hero .panel-header {
  margin-bottom: 0;
}

#quoteDashboardSection .quote-dashboard-hero .quote-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#quoteDashboardSection .quote-dashboard-hero .quote-summary-card {
  padding: 10px 12px;
  min-height: 0;
  border-radius: 16px;
}

#quoteDashboardSection .quote-dashboard-hero .quote-summary-card strong {
  margin: 4px 0 2px;
  font-size: clamp(1.2rem, 1.4vw, 1.6rem);
  line-height: 1;
}

#quoteDashboardSection .quote-dashboard-hero .quote-summary-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

#quoteDashboardSection .quote-ai-summary-panel {
  grid-column: 1 / -1;
  max-height: 72px;
  overflow: hidden;
}

#quoteDashboardSection .quote-ai-summary-copy {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#quoteDashboardSection .quote-recent-panel,
#quoteDashboardSection .quote-template-panel,
#quoteDashboardSection .quote-ai-summary-panel {
  padding: 14px;
  border-radius: 20px;
}

#quoteDashboardSection .quote-recent-panel .panel-header,
#quoteDashboardSection .quote-template-panel .panel-header,
#quoteDashboardSection .quote-ai-summary-panel .panel-header {
  margin-bottom: 10px;
}

#quoteDashboardSection .quote-dashboard-grid .quote-summary-grid,
#quoteDashboardSection .quote-template-filter-grid,
#quoteDashboardSection .quote-template-meta-grid,
#quoteDashboardSection .desk-filter-grid {
  gap: 8px;
}

#quoteDashboardSection .quote-response-summary-card,
#quoteDashboardSection .quote-template-panel .field,
#quoteDashboardSection .quote-recent-panel .field {
  min-height: 0;
}

#quoteDashboardSection .quote-dashboard-grid .quote-summary-card {
  padding: 10px 12px;
  min-height: 0;
}

#quoteDashboardSection .desk-list-shell {
  max-height: min(34vh, 340px);
  overflow: auto;
}

#quoteDashboardSection > .quote-desk-secondary-tools {
  display: block;
  grid-template-columns: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
}

#quoteDashboardSection > .quote-desk-secondary-tools > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(101, 132, 182, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.86), rgba(255, 255, 255, 0.94));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

#quoteDashboardSection > .quote-desk-secondary-tools > summary::-webkit-details-marker {
  display: none;
}

#quoteDashboardSection > .quote-desk-secondary-tools > summary span {
  color: #c2410c;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#quoteDashboardSection > .quote-desk-secondary-tools > summary strong {
  color: #0f172a;
}

#quoteDashboardSection > .quote-desk-secondary-tools[open] > summary {
  border-color: rgba(234, 88, 12, 0.28);
}

#quoteDashboardSection .quote-desk-secondary-tools-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 12px;
  max-height: min(46vh, 500px);
  overflow: auto;
  padding-top: 12px;
  padding-right: 2px;
}

@media (max-width: 1320px) {
  #quoteDashboardSection > .quote-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #quoteDashboardSection .quote-dashboard-hero .quote-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phase 5-9 quote cleanup: make the builder the route hero, then keep desk tools secondary. */
#quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 28%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
}

.quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: minmax(210px, 248px) minmax(620px, 1fr) minmax(280px, 330px);
  gap: 12px;
}

.quote-builder-hero-card,
.quote-builder-reference-shell .quote-builder-control-card,
.quote-builder-itinerary-card,
.quote-builder-pricing-card,
.quote-builder-left-nav-card,
.quote-builder-gallery-card,
.quote-builder-ai-left-card,
.quote-builder-left-rail-card,
.quote-builder-trip-card {
  border-radius: 20px;
}

.quote-builder-gallery-card {
  padding: 14px;
  border-color: rgba(37, 99, 235, 0.16);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.94);
}

.quote-builder-gallery-lanes {
  display: grid;
  gap: 10px;
}

.quote-builder-gallery-lane {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(101, 132, 182, 0.16);
  border-radius: 15px;
  background: rgba(248, 250, 255, 0.84);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.quote-builder-gallery-lane:hover,
.quote-builder-gallery-lane:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

.quote-builder-gallery-lane span {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-builder-gallery-lane strong,
.quote-builder-gallery-lane small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-builder-gallery-lane small {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.quote-builder-hero-card {
  padding: 12px;
}

.quote-builder-itinerary-card {
  min-height: 70vh;
  border-color: rgba(37, 99, 235, 0.18);
}

.quote-builder-suggestions-card {
  padding: 12px;
}

.quote-builder-suggestions-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-builder-suggestions-details .quote-builder-suggestion-tabs,
.quote-builder-suggestions-details .quote-builder-suggestion-grid {
  margin-left: 12px;
  margin-right: 12px;
}

.quote-builder-suggestions-details .quote-builder-suggestion-tabs {
  margin-bottom: 12px;
}

.quote-builder-reference-shell #quoteGeneratorStatus,
.quote-builder-reference-shell #quoteContextSuggestion,
.quote-builder-reference-shell #quoteAutomationReminders {
  order: 6;
  grid-column: 1 / -1;
  margin: 0;
}

.quote-builder-reference-shell #quoteContextSuggestion,
.quote-builder-reference-shell #quoteAutomationReminders {
  max-height: 76px;
  overflow: hidden;
  padding: 12px 14px;
  opacity: 0.88;
}

.quote-day-master-detail-shell {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.quote-day-count-tools {
  position: relative;
  display: inline-block;
}

.quote-day-count-tools summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(101, 132, 182, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
}

.quote-day-count-tools[open] summary {
  border-color: rgba(245, 108, 63, 0.36);
  color: #c2410c;
  box-shadow: 0 12px 28px rgba(245, 108, 63, 0.12);
}

.quote-day-count-tools p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.quote-day-count-tools[open] {
  z-index: 8;
}

.quote-day-count-tools[open]::after {
  content: "";
  position: absolute;
  inset: 34px auto auto 0;
  width: min(280px, 78vw);
  min-height: 112px;
  border: 1px solid rgba(245, 108, 63, 0.18);
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.98);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
  pointer-events: none;
  z-index: -1;
}

.quote-day-count-tools[open] p,
.quote-day-count-tools[open] #quoteSyncDayPlanButton {
  position: relative;
  z-index: 1;
  width: min(248px, 68vw);
  margin-left: 16px;
}

.quote-day-navigator {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  max-height: min(70vh, 760px);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(101, 132, 182, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.78));
}

.quote-day-navigator-head,
.quote-day-nav-item {
  min-width: 0;
}

.quote-day-navigator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 4px 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-day-navigator-head strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.quote-day-nav-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(101, 132, 182, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.quote-day-nav-item span,
.quote-day-nav-item small {
  color: var(--muted);
  font-size: 0.74rem;
}

.quote-day-nav-item strong,
.quote-day-nav-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-nav-item.is-selected,
.quote-day-nav-item:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

.quote-day-nav-item.is-selected {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 40%),
    rgba(239, 246, 255, 0.96);
}

.quote-day-detail-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.quote-builder-pricing-card {
  padding: 14px;
  border-color: rgba(34, 197, 94, 0.2);
}

.quote-builder-ai-left-card textarea {
  min-height: 56px;
}

.quote-builder-ai-left-card textarea:focus {
  min-height: 112px;
}

.quote-day-master-card.is-selected {
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(420px, 1.38fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.quote-day-master-card.is-selected .quote-builder-repeat-top {
  grid-column: 1 / -1;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(101, 132, 182, 0.14);
}

.quote-day-master-card.is-selected .quote-day-visual-builder {
  grid-column: 1;
  position: sticky;
  top: 96px;
  align-self: start;
}

.quote-day-master-card.is-selected .quote-day-plan-grid {
  grid-column: 2;
  max-height: min(62vh, 720px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(101, 132, 182, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.quote-day-master-card.is-selected .quote-day-plan-grid .field-span-2 {
  grid-column: 1 / -1;
}

.quote-day-master-card.is-selected .quote-day-route-card {
  min-height: 132px;
}

.quote-day-master-card.is-collapsed-ready {
  min-height: 116px;
}

.quote-day-master-card.is-collapsed-ready .quote-builder-repeat-actions {
  opacity: 0.92;
}

/* Phase 10B quote visual foundation: premium travel theme without changing logic or DOM contracts. */
#quoteDashboardSection {
  background:
    radial-gradient(circle at 12% 4%, rgba(243, 107, 45, 0.11), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(36, 86, 214, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255, 249, 242, 0.7), rgba(245, 249, 255, 0.42));
  border-radius: 28px;
}

#quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
  border-color: rgba(243, 107, 45, 0.18);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 180, 84, 0.16), transparent 28%),
    radial-gradient(circle at 100% 8%, rgba(36, 86, 214, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(250, 252, 255, 0.94));
  box-shadow: 0 28px 76px rgba(36, 44, 74, 0.13);
}

.quote-builder-reference-shell .quote-builder-actions {
  border-color: rgba(243, 107, 45, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 248, 239, 0.96), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at top right, rgba(36, 86, 214, 0.1), transparent 34%);
  box-shadow: 0 18px 44px rgba(35, 48, 84, 0.1);
  backdrop-filter: blur(18px);
}

.quote-builder-reference-shell .quote-builder-action-link.primary-button,
.quote-builder-reference-shell .primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--quote-saffron), #ef3f28);
  box-shadow: 0 16px 32px rgba(239, 63, 40, 0.24);
}

.quote-builder-reference-shell .quote-builder-action-link.primary-button:hover,
.quote-builder-reference-shell .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(239, 63, 40, 0.28);
}

.quote-builder-reference-shell .ghost-button,
.quote-builder-reference-shell .quote-builder-action-link.ghost-button {
  border-color: rgba(82, 104, 145, 0.18);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 22px rgba(35, 48, 84, 0.06);
}

.quote-builder-reference-shell .quote-builder-card,
.quote-builder-reference-shell .quote-builder-visibility-card,
.quote-builder-reference-shell .quote-pricing-summary-card,
.quote-builder-reference-shell .field,
.quote-builder-reference-shell input,
.quote-builder-reference-shell textarea,
.quote-builder-reference-shell select {
  border-color: var(--quote-border);
}

.quote-builder-reference-shell .quote-builder-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(255, 252, 248, 0.82));
  box-shadow: var(--quote-shadow-soft);
}

.quote-builder-reference-shell .quote-builder-card:hover {
  border-color: rgba(243, 107, 45, 0.2);
  box-shadow: 0 22px 54px rgba(35, 48, 84, 0.11);
}

.quote-builder-hero-card {
  background:
    radial-gradient(circle at left top, rgba(243, 107, 45, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92));
}

.quote-builder-hero-summary article {
  border-color: rgba(243, 107, 45, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 242, 0.76));
  box-shadow: 0 10px 22px rgba(35, 48, 84, 0.05);
}

.quote-builder-smart-button,
.quote-builder-section-nav a,
.quote-builder-gallery-lane {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(35, 48, 84, 0.05);
}

.quote-builder-smart-button:hover,
.quote-builder-section-nav a:hover,
.quote-builder-gallery-lane:hover,
.quote-builder-gallery-lane:focus-visible {
  border-color: rgba(243, 107, 45, 0.32);
  box-shadow: 0 14px 30px rgba(243, 107, 45, 0.11);
}

.quote-builder-smart-button strong,
.quote-builder-gallery-lane span,
.quote-builder-section-nav a:hover {
  color: var(--quote-saffron-deep);
}

.quote-builder-progress-stepper {
  padding: 8px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 248, 239, 0.9), rgba(239, 246, 255, 0.86));
}

.quote-builder-progress-step {
  border-color: rgba(82, 104, 145, 0.13);
  background: rgba(255, 255, 255, 0.82);
}

.quote-builder-progress-step b {
  color: var(--quote-indigo);
  background: rgba(36, 86, 214, 0.1);
}

.quote-builder-progress-step.is-active {
  border-color: rgba(243, 107, 45, 0.42);
  background:
    radial-gradient(circle at top left, rgba(255, 180, 84, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(255, 248, 239, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: 0 16px 34px rgba(243, 107, 45, 0.13);
}

.quote-builder-progress-step.is-active b {
  color: #fff;
  background: linear-gradient(135deg, var(--quote-saffron), #ef3f28);
}

.quote-builder-progress-step.is-complete {
  border-color: rgba(15, 159, 141, 0.26);
  background: linear-gradient(180deg, rgba(232, 251, 244, 0.92), rgba(255, 255, 255, 0.92));
}

.quote-builder-itinerary-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(36, 86, 214, 0.11), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.92));
  border-color: rgba(36, 86, 214, 0.2);
}

.quote-day-navigator {
  border-color: rgba(36, 86, 214, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.quote-day-nav-item {
  background: rgba(255, 255, 255, 0.9);
}

.quote-day-nav-item.is-selected,
.quote-day-nav-item:hover {
  border-color: rgba(243, 107, 45, 0.38);
  box-shadow: 0 13px 28px rgba(243, 107, 45, 0.11);
}

.quote-day-nav-item.is-selected {
  background:
    radial-gradient(circle at top left, rgba(243, 107, 45, 0.15), transparent 38%),
    rgba(255, 248, 239, 0.96);
}

.quote-day-master-card.is-selected {
  border-color: rgba(243, 107, 45, 0.48);
  background:
    radial-gradient(circle at 0% 0%, rgba(243, 107, 45, 0.16), transparent 30%),
    radial-gradient(circle at 100% 4%, rgba(36, 86, 214, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: 0 28px 64px rgba(243, 107, 45, 0.16);
}

.quote-day-master-card.is-selected .quote-day-plan-grid {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 251, 255, 0.86));
}

.quote-day-master-card.is-collapsed-ready {
  border-color: rgba(82, 104, 145, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(249, 251, 255, 0.74));
}

.quote-day-route-card {
  border-color: rgba(36, 86, 214, 0.18);
  background:
    radial-gradient(circle at top left, rgba(36, 86, 214, 0.12), transparent 35%),
    radial-gradient(circle at bottom right, rgba(243, 107, 45, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.94));
}

.quote-day-badge {
  color: #fff;
  background: linear-gradient(135deg, var(--quote-indigo), #4f7bff);
}

.quote-builder-ai-left-card,
.quote-builder-gallery-card {
  border-color: rgba(243, 107, 45, 0.16);
  background:
    radial-gradient(circle at top left, rgba(255, 180, 84, 0.15), transparent 40%),
    rgba(255, 255, 255, 0.92);
}

.quote-builder-ai-actions .pill {
  color: #b3390c;
  background: rgba(255, 237, 213, 0.88);
}

.quote-builder-ai-actions .pill:first-child {
  color: #fff;
  background: linear-gradient(135deg, var(--quote-saffron), #ef3f28);
  box-shadow: 0 14px 26px rgba(239, 63, 40, 0.18);
}

.quote-builder-pricing-card {
  border-color: rgba(15, 159, 141, 0.24);
  background:
    radial-gradient(circle at top left, rgba(15, 159, 141, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(246, 255, 251, 0.96), rgba(255, 255, 255, 0.94));
  box-shadow: 0 22px 52px rgba(15, 159, 141, 0.12);
}

.quote-pricing-summary-card {
  border-color: rgba(15, 159, 141, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 255, 251, 0.78));
}

.quote-pricing-summary-card:first-child,
.quote-pricing-summary-card:last-child {
  border-color: rgba(243, 107, 45, 0.22);
  background:
    radial-gradient(circle at top right, rgba(243, 107, 45, 0.13), transparent 34%),
    rgba(255, 255, 255, 0.94);
}

.quote-pricing-summary-card:last-child strong {
  color: var(--quote-saffron-deep);
}

.quote-pricing-warning {
  border-color: rgba(243, 107, 45, 0.28);
  background: rgba(255, 248, 239, 0.95);
}

.quote-share-panel {
  border-color: rgba(15, 159, 141, 0.18);
  background:
    radial-gradient(circle at top left, rgba(15, 159, 141, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(242, 255, 248, 0.96), rgba(255, 255, 255, 0.92));
}

/* Phase 10C: tighten quote above-the-fold hierarchy so itinerary appears sooner. */
#quoteDashboardSection .quote-generator-panel > .panel-header {
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

#quoteDashboardSection .quote-generator-panel > .panel-header h3 {
  margin-top: 2px;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
}

#quoteDashboardSection .quote-generator-panel > .panel-header .muted {
  display: -webkit-box;
  max-width: 92ch;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.quote-builder-reference-shell .quote-builder-form {
  gap: 10px;
}

.quote-builder-reference-shell .quote-builder-actions {
  gap: 8px;
  padding: 8px 10px;
  border-radius: 18px;
}

.quote-builder-reference-shell .quote-builder-actions > p.muted {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.quote-builder-topbar {
  align-items: flex-start;
}

.quote-builder-breadcrumb {
  margin-bottom: 2px;
  font-size: 0.82rem;
}

.quote-builder-record-title {
  gap: 6px 10px;
}

.quote-builder-record-title strong {
  font-size: 0.98rem;
}

.quote-builder-record-chip {
  font-size: 0.76rem;
}

.quote-builder-smart-buttons {
  gap: 6px;
}

.quote-builder-smart-button {
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 12px;
}

.quote-builder-smart-button span {
  font-size: 0.66rem;
}

.quote-builder-smart-button strong {
  font-size: 0.78rem;
}

.quote-builder-secondary-actions {
  align-items: center;
  padding-top: 2px;
  border-top: 1px solid rgba(82, 104, 145, 0.1);
}

.quote-builder-secondary-actions .detail-action-row {
  gap: 6px;
}

.quote-builder-secondary-actions .ghost-button,
.quote-builder-secondary-actions .primary-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 0.82rem;
}

.quote-builder-revision-toggle {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 12px;
}

body[data-active-section="quote-generator"] .quote-builder-revision-toggle.is-active {
  border-color: rgba(251, 113, 35, 0.34);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(254, 226, 226, 0.72));
  color: #9a3412;
}

.quote-revision-modal {
  width: min(620px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 48px));
  overflow: auto;
}

.quote-revision-modal .lead-modal-body {
  display: grid;
  gap: 14px;
}

.quote-revision-modal textarea {
  resize: vertical;
}

.quote-transport-route-preview-modal {
  width: min(860px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 48px));
  overflow: auto;
  z-index: 10001;
}

#quoteTransportRoutePreviewBackdrop {
  z-index: 10000;
}

.quote-transport-route-preview-body,
.quote-transport-route-preview-list {
  display: grid;
  gap: 14px;
}

.quote-transport-route-preview-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: #f8fbff;
}

.quote-transport-route-preview-card.is-created,
.quote-transport-route-preview-card.is-reused {
  border-color: #86efac;
  background: #f0fdf4;
}

.quote-transport-route-preview-card.is-needs_review {
  border-color: #fdba74;
  background: #fff7ed;
}

.quote-transport-route-preview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quote-transport-route-preview-card-head strong {
  color: #9a3412;
}

.quote-transport-route-preview-card h4,
.quote-transport-route-preview-card p {
  margin: 0;
}

.quote-transport-route-preview-card code {
  user-select: all;
}

.quote-transport-route-card-actions {
  display: flex;
  justify-content: flex-end;
}

.quote-transport-route-card-actions .primary-button {
  min-height: 40px;
}

.quote-transport-route-ai-locations {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 700;
}

.quote-transport-route-skipped {
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #475569;
}

.quote-builder-reference-shell .quote-builder-hero-card {
  gap: 8px;
  padding: 9px 10px;
}

.quote-builder-reference-shell .quote-builder-hero-card .quote-builder-card-head {
  margin-bottom: 0;
}

.quote-builder-hero-summary {
  gap: 6px;
}

.quote-builder-hero-summary article {
  gap: 3px;
  padding: 7px 9px;
  border-radius: 13px;
}

.quote-builder-hero-summary span {
  font-size: 0.7rem;
}

.quote-builder-hero-summary article strong {
  font-size: 0.86rem;
}

.quote-builder-compact-editor summary {
  padding: 7px 10px;
  font-size: 0.78rem;
}

.quote-builder-reference-shell .quote-builder-control-card {
  gap: 8px;
  padding: 9px 10px;
}

.quote-builder-reference-shell .quote-builder-control-card .quote-builder-card-head {
  margin-bottom: 0;
}

.quote-builder-reference-shell .quote-builder-control-card .quote-builder-card-head p.muted {
  display: -webkit-box;
  max-width: 96ch;
  overflow: hidden;
  font-size: 0.82rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.quote-builder-visibility-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quote-builder-visibility-card {
  gap: 3px;
  min-height: 66px;
  padding: 9px 10px;
  border-radius: 14px;
}

.quote-builder-visibility-card span {
  font-size: 0.68rem;
}

.quote-builder-visibility-card strong {
  font-size: 0.88rem;
}

.quote-builder-visibility-card p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.quote-builder-progress-stepper {
  gap: 7px;
  padding: 6px;
  border-radius: 18px;
}

.quote-builder-progress-step {
  min-height: 58px;
  padding: 8px 9px;
  border-radius: 14px;
}

.quote-builder-progress-step b {
  width: 21px;
  height: 21px;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.quote-builder-progress-step strong {
  font-size: 0.82rem;
}

.quote-builder-progress-step p {
  -webkit-line-clamp: 1;
  font-size: 0.72rem;
}

.quote-builder-reference-shell .quote-builder-card-head {
  gap: 8px;
}

.quote-builder-reference-shell .quote-builder-card-head h4 {
  margin-top: 2px;
}

.quote-builder-reference-shell .quote-builder-card-head .eyebrow {
  margin-bottom: 3px;
}

@media (max-width: 900px) {
  .quote-builder-visibility-grid {
    grid-template-columns: 1fr;
  }

  .quote-builder-reference-shell .quote-builder-actions > p.muted,
  #quoteDashboardSection .quote-generator-panel > .panel-header .muted,
  .quote-builder-reference-shell .quote-builder-control-card .quote-builder-card-head p.muted {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 1500px) {
  .quote-day-master-detail-shell {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  }

  .quote-day-master-card.is-selected {
    grid-template-columns: 1fr;
  }

  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-plan-grid {
    grid-column: 1;
    position: static;
    max-height: none;
  }
}

@media (max-width: 1320px) {
  .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 1fr;
  }

  .quote-builder-itinerary-card {
    order: 1;
  }

  .quote-builder-pricing-card,
  .quote-builder-reference-shell .quote-builder-preview-panel {
    order: 2;
  }

  .quote-builder-left-nav-card,
  .quote-builder-ai-left-card,
  .quote-builder-left-rail-card,
  .quote-builder-trip-card {
    order: 3;
  }
}

@media (max-width: 900px) {
  #quoteDashboardSection > .quote-dashboard-grid {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  #quoteDashboardSection .quote-desk-secondary-tools-body,
  .quote-builder-suggestions-summary {
    grid-template-columns: 1fr;
  }

  #quoteDashboardSection .quote-dashboard-hero .quote-summary-grid {
    grid-template-columns: 1fr;
  }

  .quote-day-master-card.is-selected {
    padding: 12px;
  }

  .quote-day-master-detail-shell {
    grid-template-columns: 1fr;
  }

  .quote-day-count-tools {
    width: 100%;
  }

  .quote-day-count-tools summary,
  .quote-day-count-tools[open] p,
  .quote-day-count-tools[open] #quoteSyncDayPlanButton {
    width: 100%;
  }

  .quote-day-count-tools[open]::after {
    width: 100%;
  }

  .quote-day-navigator {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-height: none;
  }
}

/* Phase 10D: compact quote side rails so itinerary remains the primary workspace. */
.quote-builder-reference-shell .quote-builder-left-nav-card,
.quote-builder-reference-shell .quote-builder-gallery-card,
.quote-builder-reference-shell .quote-builder-ai-left-card,
.quote-builder-reference-shell .quote-builder-template-card,
.quote-builder-reference-shell .quote-builder-trip-card {
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
}

.quote-builder-reference-shell .quote-builder-left-nav-card .quote-builder-card-head,
.quote-builder-reference-shell .quote-builder-gallery-card .quote-builder-card-head,
.quote-builder-reference-shell .quote-builder-ai-left-card .quote-builder-card-head,
.quote-builder-reference-shell .quote-builder-template-card .quote-builder-card-head,
.quote-builder-reference-shell .quote-builder-trip-card .quote-builder-card-head {
  gap: 5px;
  margin-bottom: 0;
}

.quote-builder-reference-shell .quote-builder-left-nav-card .quote-builder-card-head p,
.quote-builder-reference-shell .quote-builder-gallery-card .quote-builder-card-head p,
.quote-builder-reference-shell .quote-builder-ai-left-card .quote-builder-card-head p,
.quote-builder-reference-shell .quote-builder-template-card .quote-builder-card-head p,
.quote-builder-reference-shell .quote-builder-trip-card p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-builder-section-nav {
  gap: 5px;
}

.quote-builder-section-nav a {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 11px;
  font-size: 0.8rem;
}

.quote-builder-section-nav a span {
  max-width: 9ch;
  overflow: hidden;
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-builder-gallery-list {
  gap: 7px;
}

.quote-builder-gallery-lane {
  gap: 4px;
  padding: 8px;
  border-radius: 13px;
}

.quote-builder-gallery-lane p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-builder-ai-left-card textarea {
  min-height: 48px;
  font-size: 0.82rem;
}

.quote-builder-ai-left-card textarea:focus {
  min-height: 96px;
}

.quote-builder-ai-actions {
  gap: 6px;
}

.quote-builder-ai-actions .pill {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 13px;
  font-size: 0.74rem;
}

.quote-builder-ai-left-card .quote-builder-inline-ai-grid {
  gap: 7px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.quote-builder-ai-left-card .quote-copilot-preview-panel {
  max-height: 88px;
  overflow: auto;
}

.quote-builder-ai-left-card .quote-copilot-recommendations {
  gap: 6px;
}

.quote-builder-ai-left-card .quote-copilot-recommendation {
  padding: 7px 8px;
  border-radius: 12px;
}

.quote-builder-template-card .form-grid {
  gap: 7px;
}

.quote-builder-lead-destination-panel {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 2fr);
  gap: 10px 14px;
  align-items: center;
  margin: 2px 0 10px;
  padding: 10px;
  border: 1px solid rgba(255, 92, 42, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 247, 241, 0.95), rgba(255, 255, 255, 0.92));
}

.quote-builder-lead-destination-panel.hidden {
  display: none;
}

.quote-builder-lead-destination-panel h5 {
  margin: 2px 0 0;
  color: var(--ink, #111827);
  font-size: 0.94rem;
  line-height: 1.2;
}

.quote-builder-lead-destination-panel .muted {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
}

.quote-builder-lead-destination-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.quote-builder-lead-destination-chip {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid rgba(30, 64, 175, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #172033;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.quote-builder-lead-destination-chip.active {
  border-color: rgba(255, 92, 42, 0.42);
  background: linear-gradient(135deg, #ff6b2b, #ef2f2f);
  color: #fff;
  box-shadow: 0 12px 26px rgba(239, 69, 30, 0.22);
}

.quote-builder-template-card .ghost-button,
.quote-builder-trip-card .ghost-button {
  min-height: 34px;
  padding: 0 9px;
  border-radius: 12px;
}

.quote-builder-template-card #quoteBuilderTemplateSelectionStatus {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-builder-pricing-card {
  gap: 10px;
  padding: 12px;
}

.quote-builder-pricing-card .quote-builder-card-head p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.quote-builder-pricing-card .quote-pricing-summary-grid {
  gap: 7px;
}

.quote-builder-pricing-card .quote-pricing-summary-card {
  padding: 8px;
  border-radius: 13px;
}

.quote-builder-pricing-card .quote-pricing-decision-strip {
  grid-template-columns: 1fr;
  gap: 7px;
}

.quote-builder-pricing-card .quote-pricing-decision-strip article {
  padding: 8px 9px;
  border-radius: 13px;
}

.quote-builder-pricing-card .quote-pricing-cost-controls,
.quote-builder-pricing-card .quote-pricing-warning,
.quote-builder-pricing-card .quote-pricing-audit-log {
  padding: 8px;
  border-radius: 13px;
}

.quote-builder-pricing-card .quote-pricing-internal-note {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
}

.quote-builder-reference-shell .quote-builder-preview-panel {
  gap: 9px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding: 11px;
  border-radius: 18px;
}

.quote-builder-preview-summary {
  gap: 8px;
}

.quote-builder-preview-summary .quote-preview-snapshot-card {
  padding: 9px;
  border-radius: 13px;
}

.quote-builder-preview-summary .quote-preview-snapshot-grid {
  gap: 7px;
}

.quote-builder-preview-summary .quote-preview-snapshot-grid article {
  min-height: 62px;
  padding: 8px;
  border-radius: 13px;
}

.quote-builder-suggestions-card {
  gap: 8px;
  padding: 10px;
}

.quote-builder-suggestions-card .quote-builder-card-head p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.quote-builder-suggestion-tabs {
  gap: 5px;
}

.quote-builder-suggestion-tabs button {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
}

.quote-builder-suggestions-summary {
  gap: 8px;
}

.quote-builder-suggestions-summary article {
  gap: 6px;
  padding: 9px;
  border-radius: 14px;
}

.quote-builder-suggestions-summary article p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 1320px) {
  .quote-builder-reference-shell .quote-builder-preview-panel {
    max-height: none;
  }
}

@media (max-width: 900px) {
  .quote-builder-reference-shell .quote-builder-left-nav-card,
  .quote-builder-reference-shell .quote-builder-gallery-card,
  .quote-builder-reference-shell .quote-builder-ai-left-card,
  .quote-builder-reference-shell .quote-builder-template-card,
  .quote-builder-reference-shell .quote-builder-trip-card,
  .quote-builder-pricing-card,
  .quote-builder-suggestions-card {
    padding: 12px;
  }

  .quote-builder-lead-destination-panel {
    grid-template-columns: 1fr;
  }

  .quote-builder-section-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-builder-ai-left-card .quote-builder-inline-ai-grid {
    max-height: none;
  }
}

/* Phase 10E: destination visual preview and honest AI image readiness. */
.quote-day-image-preview {
  position: relative;
  display: grid;
  min-height: 128px;
  overflow: hidden;
  border: 1px solid rgba(82, 104, 145, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(243, 107, 45, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(255, 248, 239, 0.96), rgba(239, 246, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.quote-day-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 128px;
  object-fit: cover;
}

.quote-day-image-preview.is-empty {
  place-items: center;
  padding: 14px;
  text-align: left;
}

.quote-day-image-preview.is-empty > div {
  display: grid;
  gap: 5px;
  width: 100%;
}

.quote-day-image-preview span {
  color: var(--quote-saffron-deep);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-day-image-preview strong,
.quote-day-image-preview p {
  margin: 0;
}

.quote-day-image-preview p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--quote-muted);
  font-size: 0.76rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.quote-day-image-preview.has-image::after {
  content: "Image URL";
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.quote-builder-image-readiness-card {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px dashed rgba(243, 107, 45, 0.34);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 180, 84, 0.16), transparent 40%),
    rgba(255, 248, 239, 0.86);
}

.quote-builder-image-readiness-card span {
  color: var(--quote-saffron-deep);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-builder-image-readiness-card strong,
.quote-builder-image-readiness-card p {
  margin: 0;
}

.quote-builder-image-readiness-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--quote-muted);
  font-size: 0.75rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (max-width: 900px) {
  .quote-day-image-preview,
  .quote-day-image-preview img {
    min-height: 150px;
  }
}

/* Phase 10F: final responsive visual QA guardrails for the quote workspace. */
#quoteDashboardSection {
  overflow-x: clip;
}

#quoteDashboardSection > .quote-builder-grid,
.quote-builder-reference-shell,
.quote-builder-reference-shell .quote-builder-form,
.quote-builder-reference-shell .quote-builder-card,
.quote-builder-reference-shell .quote-day-master-detail-shell,
.quote-builder-reference-shell .quote-day-detail-column,
.quote-builder-reference-shell .quote-day-master-card,
.quote-builder-reference-shell .quote-day-plan-grid {
  min-width: 0;
  max-width: 100%;
}

.quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: minmax(180px, 228px) minmax(0, 1fr) minmax(260px, 310px);
}

.quote-builder-reference-shell .quote-builder-actions,
.quote-builder-reference-shell .quote-builder-topbar,
.quote-builder-reference-shell .quote-builder-secondary-actions,
.quote-builder-reference-shell .detail-action-row,
.quote-builder-reference-shell .quote-template-actions {
  min-width: 0;
}

.quote-builder-reference-shell .quote-builder-topbar,
.quote-builder-reference-shell .quote-builder-secondary-actions,
.quote-builder-reference-shell .detail-action-row {
  flex-wrap: wrap;
}

.quote-builder-reference-shell .quote-builder-primary-actions {
  justify-content: flex-end;
}

.quote-builder-reference-shell .quote-builder-primary-actions .ghost-button,
.quote-builder-reference-shell .quote-builder-primary-actions .primary-button {
  flex: 0 1 auto;
}

.quote-day-master-card.is-selected {
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1fr);
}

.quote-day-master-card.is-selected .quote-day-plan-grid {
  scrollbar-gutter: stable;
}

.quote-day-master-card.is-selected .quote-day-plan-grid input,
.quote-day-master-card.is-selected .quote-day-plan-grid textarea,
.quote-day-master-card.is-selected .quote-day-plan-grid select {
  width: 100%;
}

.quote-day-master-card.is-collapsed-ready .quote-builder-repeat-actions {
  justify-content: flex-end;
}

.quote-builder-reference-shell .quote-builder-preview-panel,
.quote-builder-pricing-card {
  align-self: start;
}

@media (max-width: 1180px) {
  .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 1fr;
  }

  .quote-builder-itinerary-card {
    order: 1;
  }

  .quote-builder-pricing-card {
    order: 2;
  }

  .quote-builder-reference-shell .quote-builder-preview-panel {
    order: 3;
  }

  .quote-builder-left-nav-card,
  .quote-builder-gallery-card,
  .quote-builder-ai-left-card,
  .quote-builder-template-card,
  .quote-builder-trip-card {
    order: 4;
  }

  .quote-builder-suggestions-card,
  .quote-builder-commercial-card,
  .quote-builder-payment-card,
  .quote-builder-share-card {
    order: 5;
  }
}

@media (max-width: 720px) {
  #quoteDashboardSection {
    border-radius: 18px;
  }

  #quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
    border-radius: 18px;
  }

  .quote-builder-reference-shell .quote-builder-actions {
    border-radius: 16px;
  }

  .quote-builder-reference-shell .quote-builder-primary-actions,
  .quote-builder-reference-shell .quote-builder-primary-actions .ghost-button,
  .quote-builder-reference-shell .quote-builder-primary-actions .primary-button,
  .quote-builder-reference-shell .quote-builder-secondary-actions .ghost-button,
  .quote-builder-reference-shell .quote-builder-secondary-actions .primary-button,
  .quote-builder-reference-shell .quote-template-actions .ghost-button,
  .quote-builder-reference-shell .quote-template-actions .primary-button {
    width: 100%;
  }

  .quote-builder-reference-shell .quote-builder-primary-actions,
  .quote-builder-reference-shell .quote-builder-secondary-actions,
  .quote-builder-reference-shell .quote-template-actions {
    justify-content: stretch;
  }

  .quote-day-master-card.is-selected {
    grid-template-columns: 1fr;
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.12);
  }

  .quote-day-master-card.is-selected .quote-day-plan-grid {
    max-height: none;
    padding: 10px;
  }

  .quote-day-master-card.is-collapsed-ready .quote-builder-repeat-actions {
    justify-content: stretch;
  }

  .quote-day-master-card.is-collapsed-ready .quote-builder-repeat-actions .ghost-button {
    flex: 1 1 140px;
  }

  .quote-builder-reference-shell .quote-builder-preview-panel,
  .quote-builder-pricing-card,
  .quote-builder-suggestions-card {
    border-radius: 16px;
  }
}

/* Phase 10G: visual rescue for the quote builder canvas after screenshot QA. */
.quote-builder-reference-shell .quote-builder-card {
  align-content: start;
}

.quote-builder-itinerary-card {
  min-height: auto;
  align-self: start;
  align-content: start;
  overflow: visible;
}

.quote-builder-reference-shell #quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-detail-column {
  align-content: start;
}

.quote-day-master-detail-shell {
  min-height: 0;
}

.quote-day-navigator {
  top: 76px;
  max-height: min(58vh, 620px);
}

.quote-day-master-card.is-selected {
  min-height: 0;
  align-content: start;
}

.quote-day-master-card.is-selected .quote-builder-repeat-top {
  gap: 10px;
}

.quote-day-master-card.is-selected .quote-day-visual-builder {
  top: 76px;
}

.quote-day-master-card.is-selected .quote-day-plan-grid {
  max-height: none;
  overflow: visible;
  align-content: start;
}

.quote-day-master-card.is-collapsed-ready {
  min-height: auto;
}

.quote-builder-reference-shell .quote-builder-repeat-list {
  align-content: start;
}

@media (max-width: 1500px) {
  .quote-day-navigator,
  .quote-day-master-card.is-selected .quote-day-visual-builder {
    position: static;
  }
}

/* Phase 10H: remove quote record header overlay after screenshot QA. */
.quote-builder-reference-shell .quote-builder-actions {
  position: static;
  top: auto;
  z-index: auto;
}

.quote-builder-pricing-card {
  top: 18px;
  max-height: calc(100vh - 36px);
}

.quote-builder-suggestions-card,
.quote-builder-commercial-card,
.quote-builder-payment-card,
.quote-builder-share-card {
  scroll-margin-top: 24px;
}

/* Phase 10I: quote focus pass - keep the route shell visible but stop it from stealing the builder canvas. */
body[data-active-section="quote-generator"] .workspace-shell-bar {
  gap: 8px;
  padding: 10px 12px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 248, 239, 0.9), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.08), transparent 36%);
}

body[data-active-section="quote-generator"] .workspace-shell-bar-top {
  align-items: center;
}

body[data-active-section="quote-generator"] .workspace-shell-copy p {
  display: none;
}

body[data-active-section="quote-generator"] .workspace-shell-copy h3 {
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
}

body[data-active-section="quote-generator"] .workspace-shell-meta-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

body[data-active-section="quote-generator"] .workspace-shell-meta-card {
  min-height: 0;
  padding: 8px 10px;
  border-radius: 14px;
}

body[data-active-section="quote-generator"] .workspace-shell-meta-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body[data-active-section="quote-generator"] .workspace-shell-meta-label {
  font-size: 0.68rem;
}

body[data-active-section="quote-generator"] .workspace-shell-actions .ghost-button,
body[data-active-section="quote-generator"] .workspace-shell-actions .primary-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 14px;
}

/* Phase 1D backend pass: premium marketing dashboard shell */
body[data-active-section="marketing-dashboard"] {
  color: #dce8fb;
  background:
    radial-gradient(circle at 8% 8%, rgba(37, 99, 235, 0.2), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(249, 115, 22, 0.15), transparent 30%),
    linear-gradient(165deg, #020817 0%, #071224 48%, #020b1a 100%);
}

/* Hidden by default; enabled only for marketing dashboard premium header */
.marketing-topbar-search,
.marketing-topbar-icons {
  display: none;
}

body[data-active-section="marketing-dashboard"] .dashboard-main {
  gap: 16px;
}

body[data-active-section="marketing-dashboard"] .app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
}

body[data-active-section="marketing-dashboard"] .sidebar {
  padding: 16px 12px;
  border-radius: 24px;
  border-color: rgba(94, 126, 175, 0.28);
  background:
    linear-gradient(180deg, rgba(4, 12, 24, 0.98), rgba(7, 17, 33, 0.96));
}

body[data-active-section="marketing-dashboard"] .brand-block h1 {
  font-size: 1.9rem;
  line-height: 1.06;
  color: #f3f8ff;
}

body[data-active-section="marketing-dashboard"] .brand-block .eyebrow {
  color: rgba(192, 210, 237, 0.84);
}

body[data-active-section="marketing-dashboard"] .brand-logo {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 18px 34px rgba(34, 197, 94, 0.16);
}

body[data-active-section="marketing-dashboard"] .nav-group-label {
  color: rgba(182, 204, 236, 0.62);
}

body[data-active-section="marketing-dashboard"] .nav-item {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border-color: rgba(89, 121, 168, 0.22);
  background: rgba(9, 24, 46, 0.56);
  color: rgba(223, 236, 255, 0.9);
}

body[data-active-section="marketing-dashboard"] .nav-item:hover,
body[data-active-section="marketing-dashboard"] .nav-item.active {
  transform: translateX(0);
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.22), rgba(245, 158, 11, 0.2));
  color: #fff4df;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.24);
}

body[data-active-section="marketing-dashboard"] .topbar {
  display: grid;
  grid-template-columns: auto minmax(360px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(4, 13, 28, 0.9);
  border-color: rgba(80, 108, 152, 0.35);
  box-shadow: 0 18px 44px rgba(2, 8, 22, 0.42);
}

body[data-active-section="marketing-dashboard"] .topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body[data-active-section="marketing-dashboard"] .topbar-brand h2 {
  font-size: 1.36rem;
  line-height: 1.05;
}

body[data-active-section="marketing-dashboard"] .topbar-brand .eyebrow {
  font-size: 0.64rem;
  margin-bottom: 4px;
}

body[data-active-section="marketing-dashboard"] .topbar-profile {
  border-radius: 12px;
  border: 1px solid rgba(91, 122, 167, 0.34);
  background: rgba(12, 30, 56, 0.75);
  padding: 8px 10px;
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(94, 129, 180, 0.34);
  background: rgba(8, 22, 44, 0.86);
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-search-icon {
  width: 18px;
  height: 18px;
  color: rgba(188, 208, 238, 0.9);
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-search-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #eef4ff;
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-search input::placeholder {
  color: rgba(188, 208, 238, 0.68);
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-shortcut {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  color: rgba(206, 222, 245, 0.9);
  border: 1px solid rgba(94, 129, 180, 0.35);
  background: rgba(16, 35, 63, 0.8);
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-icons .icon-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(94, 129, 180, 0.34);
  background: rgba(10, 25, 48, 0.8);
  color: rgba(226, 237, 255, 0.94);
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-icons .icon-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body[data-active-section="marketing-dashboard"] .marketing-topbar-icons .icon-button:hover {
  background: rgba(18, 41, 76, 0.92);
}

body[data-active-section="marketing-dashboard"] .topbar h2,
body[data-active-section="marketing-dashboard"] .topbar .eyebrow,
body[data-active-section="marketing-dashboard"] .topbar-profile strong,
body[data-active-section="marketing-dashboard"] .topbar-profile span {
  color: #eef4ff;
}

body[data-active-section="marketing-dashboard"] .workspace-shell-bar {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(82, 112, 158, 0.32);
  background:
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.24), transparent 46%),
    linear-gradient(145deg, rgba(5, 16, 34, 0.96), rgba(8, 22, 44, 0.96));
  box-shadow: 0 20px 50px rgba(2, 8, 24, 0.4);
}

body[data-active-section="marketing-dashboard"] .workspace-shell-copy h3 {
  font-size: 1.92rem;
  line-height: 1.02;
}

body[data-active-section="marketing-dashboard"] .workspace-shell-copy .muted {
  margin-top: 4px;
  max-width: 72ch;
}

body[data-active-section="marketing-dashboard"] .workspace-shell-copy h3,
body[data-active-section="marketing-dashboard"] .workspace-shell-copy p,
body[data-active-section="marketing-dashboard"] .workspace-shell-meta-label,
body[data-active-section="marketing-dashboard"] .workspace-shell-meta-card strong {
  color: #e9f2ff;
}

body[data-active-section="marketing-dashboard"] .workspace-shell-summary,
body[data-active-section="marketing-dashboard"] .workspace-shell-copy .muted {
  color: rgba(209, 223, 247, 0.84);
}

body[data-active-section="marketing-dashboard"] .workspace-shell-meta-grid {
  display: none;
}

body[data-active-section="marketing-dashboard"] .workspace-shell-actions .ghost-button {
  height: 42px;
  border-color: rgba(126, 160, 211, 0.42);
  color: #deebff;
  background: rgba(15, 35, 66, 0.64);
}

body[data-active-section="marketing-dashboard"] .workspace-shell-actions .ghost-button:hover {
  background: rgba(23, 49, 90, 0.78);
}

body[data-active-section="marketing-dashboard"] .workspace-shell-actions .primary-button {
  height: 42px;
  border-color: rgba(245, 158, 11, 0.68);
  color: #231607;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
}

body[data-active-section="marketing-dashboard"] .workspace-shell-actions .primary-button:hover {
  filter: brightness(1.04);
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(74, 102, 145, 0.24);
  background:
    linear-gradient(180deg, rgba(7, 18, 37, 0.86), rgba(4, 12, 26, 0.86)),
    rgba(4, 12, 26, 0.8);
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection.module-dashboard-marketing-premium {
  gap: 14px;
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection.module-dashboard-marketing-premium .module-dashboard-widget-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection.module-dashboard-marketing-premium .module-dashboard-card {
  padding: 16px;
  border-radius: 14px;
  gap: 8px;
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection.module-dashboard-marketing-premium .module-dashboard-card-value {
  font-size: 2.05rem;
  letter-spacing: 0;
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection.module-dashboard-marketing-premium .module-dashboard-detail-grid {
  gap: 12px;
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection .panel {
  border-color: rgba(83, 109, 150, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    rgba(8, 20, 39, 0.92);
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection .panel .eyebrow {
  color: rgba(196, 213, 240, 0.72);
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection .panel h4,
body[data-active-section="marketing-dashboard"] #moduleDashboardSection .panel h3,
body[data-active-section="marketing-dashboard"] #moduleDashboardSection .panel strong,
body[data-active-section="marketing-dashboard"] #moduleDashboardSection .panel p {
  color: #ecf4ff;
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection .panel .muted {
  color: rgba(203, 218, 240, 0.78);
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection .activity-item {
  background: rgba(11, 27, 51, 0.72);
  border-color: rgba(96, 126, 172, 0.22);
}

body[data-active-section="marketing-dashboard"] #moduleDashboardSection .activity-item span {
  color: rgba(196, 213, 240, 0.82);
}

body[data-active-section="marketing-dashboard"] .module-dashboard-marketing-premium .marketing-premium-panel {
  border-radius: 14px;
}

body[data-active-section="marketing-dashboard"] .module-dashboard-marketing-premium .marketing-premium-row,
body[data-active-section="marketing-dashboard"] .module-dashboard-marketing-premium .marketing-premium-ai-row,
body[data-active-section="marketing-dashboard"] .module-dashboard-marketing-premium .marketing-premium-trend-row,
body[data-active-section="marketing-dashboard"] .module-dashboard-marketing-premium .marketing-premium-source-row,
body[data-active-section="marketing-dashboard"] .module-dashboard-marketing-premium .marketing-premium-funnel-row {
  border-radius: 10px;
}

@media (max-width: 1280px) {
  body[data-active-section="marketing-dashboard"] .app-shell {
    grid-template-columns: 1fr;
  }

  body[data-active-section="marketing-dashboard"] .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-section="marketing-dashboard"] .marketing-topbar-search,
  body[data-active-section="marketing-dashboard"] .marketing-topbar-icons {
    display: none;
  }

  body[data-active-section="marketing-dashboard"] #moduleDashboardSection.module-dashboard-marketing-premium .module-dashboard-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-active-section="marketing-dashboard"] #moduleDashboardSection.module-dashboard-marketing-premium .module-dashboard-widget-grid {
    grid-template-columns: 1fr;
  }
}

#quoteBuilderControlCards.quote-builder-progress-stepper {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#quotePaymentVisibilityGrid.quote-builder-visibility-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#quoteBuilderControlCards .quote-builder-progress-step,
#quotePaymentVisibilityGrid .quote-builder-visibility-card {
  min-height: 56px;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .workspace-shell-meta-grid,
  #quoteBuilderControlCards.quote-builder-progress-stepper,
  #quotePaymentVisibilityGrid.quote-builder-visibility-grid {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  body[data-active-section="quote-generator"] .workspace-shell-meta-card,
  #quoteBuilderControlCards .quote-builder-progress-step,
  #quotePaymentVisibilityGrid .quote-builder-visibility-card {
    scroll-snap-align: start;
  }
}

@media (max-width: 720px) {
  body[data-active-section="quote-generator"] .workspace-shell-bar {
    padding: 10px;
  }

  body[data-active-section="quote-generator"] .workspace-shell-meta-grid,
  #quoteBuilderControlCards.quote-builder-progress-stepper,
  #quotePaymentVisibilityGrid.quote-builder-visibility-grid {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
}

/* Phase 10J: day cards stay compact; the selected day opens in a same-builder editor drawer. */
.quote-day-master-detail-shell {
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
}

.quote-day-master-detail-shell.has-editor-open {
  grid-template-columns: minmax(140px, 180px) minmax(280px, 0.72fr) minmax(420px, 1.12fr);
}

.quote-day-detail-column {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  grid-template-columns: 1fr;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding-right: 3px;
}

.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  grid-template-columns: 1fr;
  min-height: auto;
}

.quote-day-master-card.is-selected .quote-builder-repeat-top,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-plan-grid {
  grid-column: auto;
  position: static;
}

.quote-day-master-card.is-selected .quote-day-plan-grid {
  display: none;
}

.quote-day-master-card.is-selected .quote-day-summary-grid {
  display: grid;
}

.quote-day-master-card.is-editor-open {
  border-color: rgba(243, 107, 45, 0.46);
  box-shadow: 0 16px 34px rgba(243, 107, 45, 0.12);
}

.quote-day-editor-drawer {
  display: grid;
  gap: 14px;
  align-self: start;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(243, 107, 45, 0.26);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(243, 107, 45, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 239, 0.9));
  box-shadow: 0 22px 48px rgba(36, 52, 86, 0.12);
}

.quote-day-editor-head,
.quote-day-editor-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-day-editor-head strong,
.quote-day-editor-head p {
  margin: 0;
}

.quote-day-editor-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quote-day-editor-drawer .quote-day-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  padding: 0;
  border-top: 0;
  animation: quoteDayGridReveal 0.18s ease both;
}

.quote-day-editor-drawer .quote-day-plan-grid .field-span-2 {
  grid-column: 1 / -1;
}

.quote-day-editor-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--quote-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(82, 104, 145, 0.18);
}

@media (max-width: 1500px) {
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  }

  .quote-day-editor-drawer {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: 1fr;
  }

  .quote-day-detail-column,
  .quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .quote-day-editor-drawer .quote-day-plan-grid {
    grid-template-columns: 1fr;
  }

  .quote-day-editor-head,
  .quote-day-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Phase 10K: split the quote builder into real columns so side rails cannot create a blank center canyon. */
.quote-builder-reference-shell .quote-builder-form {
  grid-auto-rows: min-content;
}

.quote-builder-column {
  display: grid;
  align-content: start;
  align-self: start;
  gap: 12px;
  min-width: 0;
}

.quote-builder-left-column {
  order: 1;
  grid-column: 1;
}

.quote-builder-main-column {
  order: 1;
  grid-column: 2;
}

.quote-builder-right-column {
  order: 1;
  grid-column: 3;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding-right: 2px;
}

.quote-builder-left-column > .quote-builder-card,
.quote-builder-main-column > .quote-builder-card,
.quote-builder-right-column > .quote-builder-card,
.quote-builder-right-column > .quote-builder-preview-panel {
  grid-column: auto;
  width: 100%;
  min-width: 0;
}

.quote-builder-main-column > .quote-builder-itinerary-card {
  min-height: 0;
  height: auto;
  align-self: start;
  align-content: start;
  overflow: visible;
}

.quote-builder-main-column #quoteDayPlanList,
.quote-builder-main-column .quote-day-master-detail-shell,
.quote-builder-main-column .quote-day-detail-column {
  min-height: 0;
  align-content: start;
}

.quote-builder-main-column > .quote-builder-suggestions-card,
.quote-builder-main-column > .quote-builder-commercial-card {
  margin-top: 0;
}

.quote-builder-right-column > .quote-builder-pricing-card,
.quote-builder-right-column > .quote-builder-preview-panel {
  position: static;
  top: auto;
  max-height: none;
  overflow: visible;
}

@media (max-width: 1180px) {
  .quote-builder-left-column,
  .quote-builder-main-column,
  .quote-builder-right-column,
  .quote-builder-payment-card,
  .quote-builder-share-card {
    grid-column: 1;
  }

  .quote-builder-main-column {
    order: 1;
  }

  .quote-builder-right-column {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .quote-builder-left-column {
    order: 3;
  }

  .quote-builder-payment-card,
  .quote-builder-share-card {
    order: 4;
  }
}

/* Phase 10L: day-wise horizontal summary rows with a popup-style details editor. */
.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open {
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
}

.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column,
.quote-day-detail-column {
  grid-template-columns: 1fr;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  display: grid;
  grid-template-columns: minmax(88px, 112px) minmax(0, 0.92fr) minmax(0, 1.4fr) minmax(220px, auto);
  align-items: center;
  gap: 10px 14px;
  min-height: 92px;
  padding: 12px 14px;
  border-radius: 20px;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents;
  padding: 0;
  border-bottom: 0;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  display: grid;
  grid-column: 1;
  gap: 4px;
  min-width: 0;
}

.quote-day-master-card .quote-builder-repeat-title,
.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.quote-day-master-card .quote-builder-repeat-title {
  -webkit-line-clamp: 1;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-builder-repeat-actions {
  display: grid;
  grid-column: 4;
  grid-template-columns: repeat(2, minmax(92px, auto));
  justify-content: end;
  gap: 6px;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  line-height: 1.1;
}

.quote-day-master-card .quote-day-visual-builder {
  display: grid;
  grid-column: 2 / 4;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 10px;
  position: static;
}

.quote-day-master-card .quote-day-image-preview {
  display: none;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  min-height: 0;
  padding: 10px;
}

.quote-day-master-card .quote-day-route-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.quote-day-master-card .quote-day-route-meta span,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  min-height: 0;
  padding: 7px 8px;
  border-radius: 12px;
}

.quote-day-master-card .quote-day-service-strip {
  grid-template-columns: minmax(0, 1fr);
}

.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid {
  display: none;
}

.quote-day-master-card.is-selected {
  transform: none;
  border-color: rgba(243, 107, 45, 0.5);
  box-shadow: 0 14px 30px rgba(243, 107, 45, 0.1);
}

.quote-day-master-card.is-editor-open {
  box-shadow: 0 18px 38px rgba(243, 107, 45, 0.14);
}

.quote-day-editor-drawer {
  position: fixed;
  z-index: 55;
  top: 86px;
  right: clamp(16px, 3vw, 38px);
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 118px);
  overflow: auto;
}

.quote-day-editor-drawer .quote-day-plan-grid {
  display: grid;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.3fr);
  }

  .quote-day-master-card .quote-day-visual-builder {
    grid-column: 1 / -1;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: 1fr;
  }

  .quote-day-master-card .quote-builder-repeat-actions,
  .quote-day-master-card .quote-day-visual-builder {
    grid-column: 1;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    justify-content: stretch;
  }

  .quote-day-master-card .quote-builder-repeat-actions .ghost-button {
    width: 100%;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    grid-template-columns: 1fr;
  }

  .quote-day-editor-drawer {
    inset: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
  }
}

/* Phase 10M: repair day summary rows into a readable table-like itinerary list. */
.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  gap: 8px;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(190px, auto);
  align-items: stretch;
  gap: 10px 14px;
  min-height: 0;
  padding: 12px;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  align-content: start;
  padding: 6px 0;
}

.quote-day-master-card .quote-builder-repeat-title {
  font-size: 0.98rem;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  max-width: 16ch;
  line-height: 1.35;
}

.quote-day-master-card .quote-day-visual-builder {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(210px, 0.62fr) minmax(0, 1fr);
  gap: 8px 10px;
  width: 100%;
  min-width: 0;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 10px;
}

.quote-day-master-card .quote-day-badge {
  writing-mode: horizontal-tb;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  overflow-wrap: anywhere;
  word-break: normal;
}

.quote-day-master-card .quote-day-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quote-day-master-card .quote-day-route-meta span {
  flex: 1 1 88px;
  min-width: 82px;
  width: auto;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-service-strip {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  flex: 1 1 160px;
  max-width: none;
  min-width: 150px;
  padding: 8px 9px;
}

.quote-day-master-card .quote-builder-repeat-actions {
  grid-column: 3;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 230px;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  flex: 1 1 88px;
  min-width: 88px;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid {
  display: none;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
  }

  .quote-day-master-card .quote-day-visual-builder {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-day-master-card .quote-day-service-strip {
    grid-column: 1;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1 / -1;
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: 1fr;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1;
  }

  .quote-day-master-card .quote-builder-repeat-top .muted {
    max-width: none;
  }

  .quote-day-master-card .quote-builder-repeat-actions .ghost-button {
    flex: 1 1 130px;
  }
}

/* Phase 10N: make each itinerary day a long, thin operational row. */
.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  grid-template-columns: minmax(130px, 170px) minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  padding: 10px 12px;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  align-content: center;
  padding: 0;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  max-width: 18ch;
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-day-visual-builder {
  grid-template-columns: minmax(210px, 0.78fr) minmax(140px, 0.38fr) minmax(0, 1.2fr);
  align-items: stretch;
  gap: 8px;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  min-height: 88px;
  max-height: 116px;
  overflow: hidden;
}

.quote-day-master-card .quote-day-service-strip {
  grid-column: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  grid-column: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  min-width: 0;
  min-height: 70px;
  max-height: 92px;
  overflow: hidden;
}

.quote-day-master-card .quote-day-summary-grid p {
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.quote-day-master-card .quote-builder-repeat-actions {
  align-self: center;
}

@media (max-width: 1500px) {
  .quote-day-master-card .quote-day-visual-builder {
    grid-template-columns: minmax(210px, 0.9fr) minmax(140px, 0.5fr) minmax(0, 1fr);
  }

  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1320px) {
  .quote-day-master-card .quote-day-visual-builder {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    padding: 12px;
  }

  .quote-day-master-card .quote-day-visual-builder {
    grid-template-columns: 1fr;
  }

  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    grid-template-columns: 1fr;
  }

  .quote-day-master-card .quote-day-route-card,
  .quote-day-master-card.is-selected .quote-day-route-card,
  .quote-day-master-card.is-collapsed-ready .quote-day-route-card,
  .quote-day-master-card .quote-day-service-strip article,
  .quote-day-master-card .quote-day-summary-grid article {
    max-height: none;
  }
}

/* Phase 10O: force day summaries to consume the full middle lane instead of squeezing into slivers. */
.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(190px, auto);
}

.quote-day-master-card .quote-day-visual-builder {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  flex: 0 0 clamp(260px, 24%, 380px);
  max-width: 380px;
}

.quote-day-master-card .quote-day-service-strip {
  flex: 0 0 clamp(150px, 14%, 210px);
  max-width: 220px;
}

.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  flex: 1 1 auto;
  min-width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-day-master-card .quote-day-summary-grid article {
  min-width: 0;
}

@media (max-width: 1500px) {
  .quote-day-master-card .quote-day-visual-builder {
    flex-wrap: wrap;
  }

  .quote-day-master-card .quote-day-route-card,
  .quote-day-master-card.is-selected .quote-day-route-card,
  .quote-day-master-card.is-collapsed-ready .quote-day-route-card {
    flex-basis: min(360px, 45%);
  }

  .quote-day-master-card .quote-day-service-strip {
    flex-basis: min(210px, 25%);
  }

  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    min-width: 100%;
  }
}

@media (max-width: 900px) {
  .quote-day-master-card .quote-day-route-card,
  .quote-day-master-card.is-selected .quote-day-route-card,
  .quote-day-master-card.is-collapsed-ready .quote-day-route-card,
  .quote-day-master-card .quote-day-service-strip,
  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
}

/* Phase 10P: zoom-safe compact day ledger rows with protected summary widths. */
.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  grid-template-columns: minmax(132px, 170px) minmax(0, 1fr) minmax(150px, 176px);
  gap: 8px 12px;
  overflow: visible;
}

.quote-day-master-card .quote-day-visual-builder {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(101, 132, 182, 0.34) transparent;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  flex: 0 0 300px;
  min-height: 82px;
  max-height: 104px;
}

.quote-day-master-card .quote-day-service-strip {
  flex: 0 0 170px;
  max-width: 170px;
}

.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  flex: 0 0 540px;
  min-width: 540px;
  max-width: 540px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  min-height: 66px;
  max-height: 84px;
  padding: 7px 8px;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  font-size: 0.66rem;
  letter-spacing: 0.045em;
}

.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  font-size: 0.86rem;
  line-height: 1.25;
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-builder-repeat-actions {
  max-width: 176px;
  gap: 5px;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  flex: 1 1 72px;
  min-width: 72px;
  min-height: 29px;
  padding: 5px 7px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.05;
}

@media (max-width: 1180px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1 / -1;
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .quote-day-master-card .quote-day-visual-builder {
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .quote-day-master-card .quote-day-route-card,
  .quote-day-master-card.is-selected .quote-day-route-card,
  .quote-day-master-card.is-collapsed-ready .quote-day-route-card,
  .quote-day-master-card .quote-day-service-strip,
  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
}

/* Phase 10Q: final one-row day ledger that removes the giant blank canvas and squeezed chips. */
.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  display: grid;
  grid-template-columns: minmax(142px, 180px) minmax(0, 1fr) minmax(132px, 162px);
  align-items: center;
  gap: 10px 14px;
  min-height: 116px;
  padding: 12px 14px;
  overflow: visible;
}

.quote-day-master-card .quote-builder-repeat-top {
  min-width: 0;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  min-height: 0;
  max-width: 180px;
}

.quote-day-master-card .quote-builder-repeat-title {
  font-size: 0.96rem;
  line-height: 1.15;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box;
  max-width: 17ch;
  overflow: hidden;
  color: #60718f;
  font-size: 0.86rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-day-visual-builder {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(128px, 0.82fr) repeat(3, minmax(128px, 0.9fr));
  grid-column: 2;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
}

.quote-day-master-card .quote-day-image-preview {
  display: none;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  display: contents;
  flex: initial;
  min-width: 0;
  max-width: none;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  width: auto;
  min-width: 0;
  min-height: 70px;
  max-height: 86px;
  padding: 8px 10px;
  overflow: hidden;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  display: flex;
  flex: initial;
  flex-direction: column;
  justify-content: center;
  max-width: none;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0;
  max-width: none;
  padding: 5px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  white-space: normal;
}

.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-builder-repeat-actions {
  display: grid;
  grid-column: 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: center;
  gap: 5px;
  width: 100%;
  max-width: 162px;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 10px;
  font-size: 0.76rem;
  line-height: 1.05;
  white-space: normal;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: minmax(128px, 160px) minmax(0, 1fr);
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    max-width: none;
  }

  .quote-day-master-card .quote-builder-repeat-actions .ghost-button {
    flex: 1 1 88px;
  }
}

@media (max-width: 980px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .quote-day-master-card .quote-day-visual-builder {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .quote-day-master-card .quote-day-service-strip,
  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quote-day-master-card .quote-day-route-card,
  .quote-day-master-card.is-selected .quote-day-route-card,
  .quote-day-master-card.is-collapsed-ready .quote-day-route-card,
  .quote-day-master-card .quote-day-service-strip article,
  .quote-day-master-card .quote-day-summary-grid article {
    max-height: none;
  }
}

/* Phase 10R: final compact horizontal day rows. Details stay in the editor drawer. */
.quote-builder-main-column #quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-detail-column {
  min-height: 0;
  align-content: start;
}

.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open {
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 12px;
}

.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  display: grid;
  grid-template-columns: minmax(112px, 146px) minmax(0, 1fr) minmax(112px, 140px);
  align-items: center;
  gap: 8px 12px;
  min-height: 96px;
  padding: 10px 12px;
  overflow: hidden;
}

.quote-day-master-card.is-selected {
  transform: none;
  box-shadow: 0 14px 34px rgba(243, 107, 45, 0.12);
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents;
  min-width: 0;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  display: grid;
  grid-column: 1;
  gap: 5px;
  min-width: 0;
  max-width: none;
  align-self: center;
}

.quote-day-master-card .quote-builder-repeat-title {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 0.94rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box;
  max-width: none;
  overflow: hidden;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-copilot-badge.is-template {
  width: max-content;
  max-width: 100%;
  padding: 4px 9px;
  overflow: hidden;
  font-size: 0.66rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-visual-builder {
  display: flex;
  grid-column: 2;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.quote-day-master-card .quote-day-image-preview {
  display: none;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  display: grid;
  flex: 0 1 260px;
  grid-template-columns: 1fr;
  justify-content: start;
  min-width: 180px;
  max-width: 280px;
  min-height: 72px;
  max-height: 88px;
  padding: 8px 10px;
  overflow: hidden;
}

.quote-day-master-card .quote-day-badge {
  width: max-content;
  writing-mode: horizontal-tb;
}

.quote-day-master-card .quote-day-route-card strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0;
  max-width: none;
  padding: 5px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.quote-day-master-card .quote-day-service-strip {
  display: flex;
  flex: 0 1 185px;
  min-width: 130px;
  max-width: 210px;
  gap: 8px;
}

.quote-day-master-card .quote-day-service-strip article {
  flex: 1 1 auto;
}

.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  display: grid;
  flex: 1 1 360px;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
  min-width: 300px;
  max-width: none;
}

.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  min-width: 0;
  min-height: 64px;
  max-height: 82px;
  padding: 8px 9px;
  overflow: hidden;
  writing-mode: horizontal-tb;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block;
  overflow: hidden;
  font-size: 0.64rem;
  letter-spacing: 0.045em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  writing-mode: horizontal-tb;
}

.quote-day-master-card .quote-builder-repeat-actions {
  display: grid;
  grid-column: 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  max-width: 140px;
  align-self: center;
  justify-self: end;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0;
  min-height: 28px;
  padding: 5px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  line-height: 1.05;
  white-space: normal;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid {
  display: none;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: minmax(100px, 128px) minmax(0, 1fr) minmax(96px, 116px);
  }

  .quote-day-master-card .quote-day-visual-builder {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .quote-day-master-card .quote-day-route-card,
  .quote-day-master-card.is-selected .quote-day-route-card,
  .quote-day-master-card.is-collapsed-ready .quote-day-route-card {
    flex-basis: 210px;
    min-width: 170px;
  }

  .quote-day-master-card .quote-day-service-strip {
    flex-basis: 145px;
    min-width: 120px;
  }

  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    flex-basis: 330px;
    min-width: 330px;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: 1fr;
    max-width: 116px;
  }
}

@media (max-width: 900px) {
  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: 1fr;
  }

  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .quote-day-master-card .quote-builder-repeat-top > div:first-child,
  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1;
  }

  .quote-day-master-card .quote-day-visual-builder {
    overflow-x: auto;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    justify-self: stretch;
  }
}

/* Phase 10S: browser-verified thin day rows. Full details stay behind Edit Details. */
.quote-builder-main-column > .quote-builder-itinerary-card,
.quote-builder-reference-shell .quote-builder-main-column > .quote-builder-itinerary-card {
  min-height: 0;
  height: auto;
  align-content: start;
}

.quote-builder-main-column #quoteDayPlanList,
.quote-builder-main-column .quote-day-master-detail-shell,
.quote-builder-main-column .quote-day-detail-column,
.quote-day-master-detail-shell,
.quote-day-detail-column {
  min-height: 0;
  max-height: none;
}

.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  display: grid;
  grid-template-columns: minmax(118px, 172px) minmax(0, 1fr) minmax(112px, 136px);
  gap: 8px 12px;
  align-items: center;
  min-height: 106px;
  max-height: 132px;
  padding: 10px 12px;
  overflow: hidden;
  contain: layout paint;
}

.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready {
  transform: none;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  grid-column: 1;
  min-width: 0;
  max-width: none;
  align-self: center;
}

.quote-day-master-card .quote-builder-repeat-title,
.quote-day-master-card .quote-builder-repeat-top .muted,
.quote-day-master-card .quote-copilot-badge,
.quote-day-master-card .quote-day-badge,
.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-route-meta span,
.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.quote-day-master-card .quote-builder-repeat-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-copilot-badge.is-template {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder {
  display: grid;
  grid-column: 2;
  grid-template-columns: minmax(190px, 1.25fr) minmax(132px, 0.78fr) repeat(3, minmax(118px, 0.82fr));
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  max-height: 92px;
  padding: 0;
  overflow: hidden;
  position: static;
  top: auto;
}

.quote-day-master-card .quote-day-image-preview {
  display: none;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  display: contents;
  min-width: 0;
  max-width: none;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  width: auto;
  min-width: 0;
  min-height: 70px;
  max-height: 88px;
  padding: 8px 10px;
  overflow: hidden;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card {
  display: grid;
  align-content: center;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid;
  align-content: center;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block;
  overflow: hidden;
  font-size: 0.63rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  font-size: 0.82rem;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-day-master-card .quote-builder-repeat-actions {
  grid-column: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  max-width: 136px;
  justify-self: end;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0;
  min-height: 28px;
  padding: 5px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  line-height: 1.05;
  white-space: normal;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid {
  display: none;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: minmax(105px, 132px) minmax(0, 1fr) minmax(96px, 116px);
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder {
    grid-template-columns: 190px 132px 118px 118px 118px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    max-width: 116px;
  }
}

@media (max-width: 900px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .quote-day-master-card .quote-builder-repeat-top > div:first-child,
  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder {
    max-height: none;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }
}

/* Phase 10T: final compact day ledger rows. Full editing stays behind Edit Details. */
.quote-builder-main-column > .quote-builder-itinerary-card,
.quote-builder-reference-shell .quote-builder-main-column > .quote-builder-itinerary-card {
  min-height: 0 !important;
  height: auto !important;
  align-content: start !important;
  padding-bottom: 14px !important;
}

.quote-builder-main-column #quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open,
.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  min-height: 0 !important;
  max-height: none !important;
  align-content: start !important;
  overflow: visible !important;
}

.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open {
  display: grid !important;
  grid-template-columns: minmax(146px, 190px) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12px !important;
}

.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready,
.quote-day-master-card.is-editor-open {
  display: grid !important;
  grid-template-columns: minmax(132px, 172px) minmax(0, 1fr) minmax(118px, 142px) !important;
  align-items: center !important;
  gap: 8px 12px !important;
  min-height: 112px !important;
  max-height: 138px !important;
  height: auto !important;
  padding: 10px 12px !important;
  overflow: hidden !important;
  contain: layout paint !important;
  transform: none !important;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents !important;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  display: grid !important;
  grid-column: 1 !important;
  align-content: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.quote-day-master-card .quote-builder-repeat-title,
.quote-day-master-card .quote-builder-repeat-top .muted,
.quote-day-master-card .quote-copilot-badge,
.quote-day-master-card .quote-day-badge,
.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-route-meta span,
.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.quote-day-master-card .quote-builder-repeat-title,
.quote-day-master-card .quote-copilot-badge,
.quote-day-master-card .quote-day-badge {
  width: max-content !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
  line-height: 1.24 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
.quote-day-master-card.is-editor-open .quote-day-visual-builder {
  display: grid !important;
  grid-column: 2 !important;
  grid-template-columns: minmax(190px, 1.05fr) minmax(136px, 0.72fr) minmax(280px, 1.35fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: 92px !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: static !important;
  top: auto !important;
}

.quote-day-master-card .quote-day-image-preview {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  display: grid !important;
  min-width: 0 !important;
  max-width: none !important;
}

.quote-day-master-card .quote-day-service-strip {
  grid-template-columns: 1fr !important;
}

.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
  grid-template-columns: repeat(3, minmax(82px, 1fr)) !important;
  gap: 8px !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid !important;
  align-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 66px !important;
  max-height: 86px !important;
  padding: 7px 8px !important;
  overflow: hidden !important;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin-top: 7px !important;
}

.quote-day-master-card .quote-day-route-meta span,
.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  font-size: 0.62rem !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box !important;
  overflow: hidden !important;
  margin: 4px 0 0 !important;
  font-size: 0.82rem !important;
  line-height: 1.2 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-builder-repeat-actions {
  display: grid !important;
  grid-column: 3 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 100% !important;
  max-width: 142px !important;
  justify-self: end !important;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 6px !important;
  border-radius: 11px !important;
  font-size: 0.72rem !important;
  line-height: 1.05 !important;
  white-space: normal !important;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid,
.quote-day-master-card.is-editor-open .quote-day-plan-grid {
  display: none !important;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(112px, 138px) minmax(0, 1fr) minmax(96px, 116px) !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: 190px 132px 300px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin !important;
  }

  .quote-day-master-card .quote-day-summary-grid,
  .quote-day-master-card.is-selected .quote-day-summary-grid,
  .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid {
    min-width: 300px !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: 1fr !important;
    max-width: 116px !important;
  }
}

@media (max-width: 900px) {
  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: 1fr !important;
  }

  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: 1fr !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-builder-repeat-top > div:first-child,
  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1 !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: minmax(180px, 1fr) minmax(128px, 0.75fr) minmax(280px, 1.2fr) !important;
    max-height: none !important;
    overflow-x: auto !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-width: none !important;
  }
}

/* Phase 10U: horizontal day summary rail. Full editing remains behind Edit Details. */
.quote-builder-itinerary-card,
.quote-builder-reference-shell .quote-builder-itinerary-card {
  align-content: start !important;
}

.quote-builder-repeat-list,
.quote-day-detail-column {
  align-content: start !important;
  gap: 10px !important;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready,
.quote-day-master-card.is-editor-open {
  display: grid !important;
  grid-template-columns: minmax(148px, 184px) minmax(0, 1fr) minmax(116px, 136px) !important;
  align-items: center !important;
  gap: 8px 12px !important;
  min-height: 104px !important;
  max-height: 126px !important;
  padding: 12px 14px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents !important;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  grid-column: 1 !important;
  align-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
}

.quote-day-master-card .quote-builder-repeat-title,
.quote-day-master-card .quote-builder-repeat-top .muted {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.quote-day-master-card .quote-builder-repeat-title {
  display: block !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box !important;
  line-height: 1.22 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-copilot-badge.is-template {
  justify-self: start !important;
  max-width: 100% !important;
  height: 24px !important;
  padding: 4px 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
.quote-day-master-card.is-editor-open .quote-day-visual-builder {
  display: grid !important;
  grid-column: 2 !important;
  grid-template-columns: minmax(220px, 1.15fr) repeat(4, minmax(144px, 0.72fr)) !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: 82px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
  position: static !important;
  top: auto !important;
}

.quote-day-master-card .quote-day-image-preview {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
.quote-day-master-card.is-editor-open .quote-day-summary-grid {
  display: contents !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card.is-editor-open .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid !important;
  align-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
  padding: 8px 10px !important;
  overflow: hidden !important;
  border-radius: 14px !important;
}

.quote-day-master-card .quote-day-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 22px !important;
  padding: 3px 9px !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(64px, 1fr)) !important;
  gap: 5px !important;
  margin-top: 7px !important;
  min-width: 0 !important;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0 !important;
  padding: 5px 7px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  font-size: 0.64rem !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box !important;
  overflow: hidden !important;
  margin: 4px 0 0 !important;
  font-size: 0.84rem !important;
  line-height: 1.18 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p,
.quote-day-master-card .quote-day-badge {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.quote-day-master-card .quote-builder-repeat-actions {
  display: grid !important;
  grid-column: 3 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 136px !important;
  justify-self: end !important;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 6px !important;
  border-radius: 11px !important;
  font-size: 0.72rem !important;
  line-height: 1.08 !important;
  white-space: normal !important;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid,
.quote-day-master-card.is-editor-open .quote-day-plan-grid {
  display: none !important;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(126px, 154px) minmax(0, 1fr) minmax(102px, 122px) !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: 220px repeat(4, 144px) !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    max-width: 122px !important;
  }
}

@media (max-width: 900px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: 1fr !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-builder-repeat-top > div:first-child,
  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card .quote-builder-repeat-actions {
    grid-column: 1 !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: 220px repeat(4, 144px) !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    max-width: none !important;
  }
}

/* Phase 10V: stable horizontal day ledger rows. Full editing stays behind Edit Details. */
.quote-builder-main-column > .quote-builder-itinerary-card,
.quote-builder-reference-shell .quote-builder-main-column > .quote-builder-itinerary-card {
  min-height: 0 !important;
  height: auto !important;
  padding-bottom: 16px !important;
}

.quote-builder-main-column #quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-detail-column {
  min-height: 0 !important;
  height: auto !important;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready,
.quote-day-master-card.is-editor-open {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 112px !important;
  max-height: 128px !important;
  padding: 12px 14px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents !important;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  display: grid !important;
  flex: 0 0 clamp(142px, 13vw, 190px) !important;
  min-width: 0 !important;
  align-content: center !important;
  gap: 7px !important;
  padding: 0 !important;
}

.quote-day-master-card .quote-builder-repeat-title,
.quote-day-master-card .quote-builder-repeat-top .muted {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.quote-day-master-card .quote-builder-repeat-title {
  white-space: nowrap !important;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box !important;
  line-height: 1.2 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
.quote-day-master-card.is-editor-open .quote-day-visual-builder {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  max-height: 88px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  grid-column: auto !important;
  grid-template-columns: none !important;
  position: static !important;
  top: auto !important;
  scrollbar-width: thin !important;
}

.quote-day-master-card .quote-day-image-preview {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
.quote-day-master-card.is-editor-open .quote-day-summary-grid {
  display: contents !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card.is-editor-open .quote-day-route-card {
  flex: 0 0 clamp(230px, 28%, 340px) !important;
}

.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  flex: 0 0 clamp(138px, 15%, 190px) !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid !important;
  align-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
  padding: 8px 10px !important;
  overflow: hidden !important;
  border-radius: 14px !important;
}

.quote-day-master-card .quote-day-route-meta {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.quote-day-master-card .quote-day-route-meta span {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 5px 7px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 22px !important;
  padding: 3px 9px !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 4px 0 0 !important;
  font-size: 0.84rem !important;
  line-height: 1.16 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p,
.quote-day-master-card .quote-day-badge,
.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-route-meta span {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.quote-day-master-card .quote-builder-repeat-actions {
  display: grid !important;
  flex: 0 0 132px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 132px !important;
  max-width: 132px !important;
  justify-self: auto !important;
  align-self: center !important;
  grid-column: auto !important;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 6px !important;
  border-radius: 11px !important;
  font-size: 0.72rem !important;
  line-height: 1.08 !important;
  white-space: normal !important;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid,
.quote-day-master-card.is-editor-open .quote-day-plan-grid {
  display: none !important;
}

@media (max-width: 980px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    flex-wrap: wrap !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    order: 3 !important;
    flex: 1 0 100% !important;
    max-height: none !important;
    padding-bottom: 4px !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    margin-left: auto !important;
  }
}

@media (max-width: 640px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    align-items: stretch !important;
  }

  .quote-day-master-card .quote-builder-repeat-top > div:first-child,
  .quote-day-master-card .quote-builder-repeat-actions {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    flex-direction: row !important;
  }
}

.quote-recent-list,
.invoice-detail-content {
  max-height: calc(100vh - 340px);
  overflow: auto;
  padding-right: 4px;
}

.sales-order-control-table th,
.directory-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

@media (max-width: 1180px) {
  .contacts-guide-grid,
  .contacts-workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .contacts-ops-lane-grid,
  .contacts-health-grid,
  .contacts-readiness-grid,
  .contacts-info-grid {
    grid-template-columns: 1fr;
  }
}

body[data-active-section="contacts"] #contactsSection:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100dvh - 48px);
  max-width: 100%;
  overflow-x: hidden;
}

body[data-active-section="contacts"] .contacts-guide-panel {
  display: none;
}

body[data-active-section="contacts"] #contactsSection.hidden {
  display: none !important;
}

body[data-active-section="contacts"] .vendor-hero-panel {
  order: 1;
}

body[data-active-section="contacts"] .contacts-filter-panel {
  order: 2;
}

body[data-active-section="contacts"] .contacts-workspace-grid {
  order: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

body[data-active-section="contacts"] .contacts-workspace-grid:has(#contactsDetailPanel:not(.hidden)) {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

body[data-active-section="contacts"] .vendor-hero-panel,
body[data-active-section="contacts"] .contacts-filter-panel,
body[data-active-section="contacts"] .contacts-directory-panel,
body[data-active-section="contacts"] #contactsDetailPanel,
body[data-active-section="contacts"] .contacts-guide-panel {
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

body[data-active-section="contacts"] .vendor-hero-panel {
  padding: 18px 22px;
}

body[data-active-section="contacts"] .vendor-hero-panel > .panel-header {
  margin-bottom: 12px;
}

body[data-active-section="contacts"] .vendor-hero-panel .form-status {
  margin-top: 10px;
}

body[data-active-section="contacts"] .assignment-metrics-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

body[data-active-section="contacts"] .contacts-summary-card {
  min-height: 76px;
  padding: 12px;
}

body[data-active-section="contacts"] .contacts-filter-panel {
  padding: 16px 18px;
}

body[data-active-section="contacts"] .contacts-filter-panel .panel-header {
  margin-bottom: 10px;
}

body[data-active-section="contacts"] .contacts-filter-panel h4 {
  margin: 0;
}

body[data-active-section="contacts"] .contacts-smart-filter-bar {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

body[data-active-section="contacts"] .contacts-filter-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

body[data-active-section="contacts"] .contacts-filter-grid .field {
  gap: 5px;
  min-width: 0;
}

body[data-active-section="contacts"] .contacts-filter-grid input,
body[data-active-section="contacts"] .contacts-filter-grid select {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 0.86rem;
}

body[data-active-section="contacts"] .contacts-smart-filter-bar,
body[data-active-section="contacts"] .contacts-filter-actions {
  gap: 8px;
}

body[data-active-section="contacts"] .contacts-smart-filter-chip,
body[data-active-section="contacts"] .contacts-filter-actions .ghost-button,
body[data-active-section="contacts"] .contacts-filter-actions .check-toggle {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

body[data-active-section="contacts"] .contacts-filter-actions {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px !important;
}

body[data-active-section="contacts"] .contacts-directory-panel {
  display: flex;
  flex-direction: column;
  min-height: min(720px, calc(100dvh - 300px));
  padding: 16px 18px;
}

body[data-active-section="contacts"] .contacts-directory-panel .panel-header {
  margin-bottom: 10px;
}

body[data-active-section="contacts"] .contacts-ops-lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

body[data-active-section="contacts"] .contacts-ops-lane-card {
  min-height: 74px;
  padding: 12px;
}

body[data-active-section="contacts"] .contacts-ops-lane-card p {
  margin: 4px 0 0;
  overflow: hidden;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

body[data-active-section="contacts"] .contacts-handoff-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

body[data-active-section="contacts"] .contacts-handoff-panel .panel-header {
  display: contents;
}

body[data-active-section="contacts"] .contacts-handoff-panel h4,
body[data-active-section="contacts"] .contacts-handoff-panel .eyebrow,
body[data-active-section="contacts"] #contactsHandoffSummary {
  margin: 0;
}

body[data-active-section="contacts"] #contactsHandoffSummary {
  grid-column: 1 / 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="contacts"] .contacts-handoff-panel .detail-action-row {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

body[data-active-section="contacts"] .contacts-handoff-panel .ghost-button {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

body[data-active-section="contacts"] .contacts-table-shell {
  flex: 1;
  min-height: 420px;
  max-height: min(72dvh, 920px);
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

body[data-active-section="contacts"] .contacts-directory-table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

body[data-active-section="contacts"] .contacts-detail-close-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
}

body[data-active-section="contacts"] .contacts-directory-table th {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: inset 0 -1px rgba(226, 232, 240, 0.9);
}

body[data-active-section="contacts"] .contacts-directory-table th,
body[data-active-section="contacts"] .contacts-directory-table td {
  padding: 8px 10px;
  font-size: 0.83rem;
}

body[data-active-section="contacts"] .contacts-directory-table tbody tr {
  min-height: 42px;
}

body[data-active-section="contacts"] .contacts-row-meta {
  gap: 4px 8px;
}

body[data-active-section="contacts"] .contacts-row-meta strong {
  color: #0f172a;
}

body[data-active-section="contacts"] .contacts-row-sources,
body[data-active-section="contacts"] .contacts-row-counts,
body[data-active-section="contacts"] .contacts-table-actions {
  gap: 5px;
}

body[data-active-section="contacts"] .contacts-row-sources .label,
body[data-active-section="contacts"] .contacts-row-counts span,
body[data-active-section="contacts"] .contacts-table-actions .ghost-button {
  font-size: 0.72rem;
  line-height: 1.1;
}

body[data-active-section="contacts"] .contacts-table-actions .ghost-button {
  min-height: 30px;
  padding: 6px 9px;
}

@media (max-width: 1280px) {
  body[data-active-section="contacts"] .contacts-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-active-section="contacts"] .assignment-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body[data-active-section="contacts"] #contactsSection:not(.hidden) {
    min-height: auto;
    gap: 12px;
  }

  body[data-active-section="contacts"] .contacts-workspace-grid,
  body[data-active-section="contacts"] .contacts-workspace-grid:has(#contactsDetailPanel:not(.hidden)) {
    grid-template-columns: 1fr;
  }

  body[data-active-section="contacts"] .contacts-directory-panel {
    min-height: auto;
  }

  body[data-active-section="contacts"] .contacts-table-shell {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body[data-active-section="contacts"] .vendor-hero-panel,
  body[data-active-section="contacts"] .contacts-filter-panel,
  body[data-active-section="contacts"] .contacts-directory-panel,
  body[data-active-section="contacts"] #contactsDetailPanel,
  body[data-active-section="contacts"] .contacts-guide-panel {
    border-radius: 16px;
    padding: 14px;
  }

  body[data-active-section="contacts"] .contacts-detail-close-button {
    width: 100%;
    justify-content: center;
  }

  body[data-active-section="contacts"] .assignment-metrics-grid,
  body[data-active-section="contacts"] .contacts-filter-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-section="contacts"] .contacts-filter-actions {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
  }

  body[data-active-section="contacts"] .contacts-filter-actions > * {
    flex: 0 0 auto;
  }

  body[data-active-section="contacts"] .contacts-smart-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  body[data-active-section="contacts"] .contacts-smart-filter-chip {
    flex: 0 0 auto;
  }

  body[data-active-section="contacts"] .contacts-ops-lane-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-section="contacts"] .contacts-table-shell {
    min-height: 0;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  body[data-active-section="contacts"] .contacts-directory-table {
    min-width: 0;
  }

  body[data-active-section="contacts"] .contacts-directory-table thead {
    display: none;
  }

  body[data-active-section="contacts"] .contacts-directory-table,
  body[data-active-section="contacts"] .contacts-directory-table tbody,
  body[data-active-section="contacts"] .contacts-directory-table tr,
  body[data-active-section="contacts"] .contacts-directory-table td {
    display: block;
    width: 100%;
  }

  body[data-active-section="contacts"] .contacts-directory-table tbody {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-active-section="contacts"] .contacts-directory-table tbody tr {
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  }

  body[data-active-section="contacts"] .contacts-directory-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  body[data-active-section="contacts"] .contacts-directory-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body[data-active-section="contacts"] .contacts-directory-table td[colspan] {
    display: block;
  }

  body[data-active-section="contacts"] .contacts-directory-table td[colspan]::before {
    content: none;
  }
}

@media (max-width: 1100px) {
  .workspace-shell-bar-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-shell-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px;
  }

  .app-boot-card,
  .workspace-shell-bar {
    padding: 18px;
  }

  .workspace-shell-actions,
  .workspace-shell-actions .ghost-button,
  .workspace-shell-actions .primary-button {
    width: 100%;
  }

  .workspace-shell-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-audit-history-head,
  .record-audit-history-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .record-audit-history-state {
    width: 100%;
    text-align: left;
  }

  .workspace-pagination-control {
    grid-template-columns: 1fr;
  }

  .workspace-pagination-search,
  .workspace-pagination-search input,
  .workspace-pagination-size,
  .workspace-pagination-actions {
    width: 100%;
  }

  .workspace-pagination-search input {
    width: 100%;
  }
}

/* Phase 10W: final stable day rows. Details stay in the Edit Details drawer. */
.quote-builder-main-column > .quote-builder-itinerary-card,
.quote-builder-reference-shell .quote-builder-main-column > .quote-builder-itinerary-card {
  min-height: 0 !important;
  height: auto !important;
  align-content: start !important;
  padding-bottom: 14px !important;
}

.quote-builder-main-column #quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open,
.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  align-content: start !important;
}

.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open {
  display: grid !important;
  grid-template-columns: minmax(156px, 194px) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready,
.quote-day-master-card.is-editor-open {
  display: grid !important;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(132px, 158px) !important;
  grid-template-areas: "day visual actions" !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 102px !important;
  max-height: 118px !important;
  padding: 12px 13px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  transform: none !important;
}

.quote-day-master-card *,
.quote-day-master-card.is-selected *,
.quote-day-master-card.is-collapsed-ready *,
.quote-day-master-card.is-editor-open * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents !important;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  grid-area: day !important;
  display: grid !important;
  align-content: center !important;
  gap: 5px !important;
  min-width: 0 !important;
}

.quote-day-master-card .quote-builder-repeat-title,
.quote-day-master-card .quote-builder-repeat-top .muted {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.quote-day-master-card .quote-builder-repeat-title {
  white-space: nowrap !important;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box !important;
  line-height: 1.2 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-copilot-badge {
  width: max-content !important;
  max-width: 100% !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
.quote-day-master-card.is-editor-open .quote-day-visual-builder {
  grid-area: visual !important;
  display: grid !important;
  grid-template-columns: minmax(228px, 1.15fr) repeat(4, minmax(150px, 0.72fr)) !important;
  align-items: stretch !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: 82px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0 2px 3px !important;
  position: static !important;
  top: auto !important;
}

.quote-day-master-card .quote-day-visual-builder::-webkit-scrollbar {
  height: 5px;
}

.quote-day-master-card .quote-day-image-preview {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
.quote-day-master-card.is-editor-open .quote-day-summary-grid {
  display: contents !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card.is-editor-open .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid !important;
  align-content: center !important;
  min-width: 0 !important;
  width: auto !important;
  height: 78px !important;
  min-height: 0 !important;
  max-height: 78px !important;
  padding: 9px 10px !important;
  overflow: hidden !important;
}

.quote-day-master-card .quote-day-route-card {
  grid-template-rows: auto auto 1fr !important;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  min-width: 0 !important;
  margin-top: 7px !important;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0 !important;
  padding: 5px 7px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.quote-day-master-card .quote-day-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  padding: 4px 8px !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  font-size: 0.64rem !important;
  line-height: 1.1 !important;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 4px 0 0 !important;
  font-size: 0.82rem !important;
  line-height: 1.16 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-builder-repeat-actions {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 5px 6px !important;
  border-radius: 11px !important;
  font-size: 0.72rem !important;
  line-height: 1.05 !important;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid,
.quote-day-master-card.is-editor-open .quote-day-plan-grid {
  display: none !important;
}

.quote-day-editor-drawer .quote-day-plan-grid {
  display: grid !important;
}

@media (max-width: 1320px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(132px, 164px) minmax(0, 1fr) minmax(118px, 138px) !important;
    max-height: 116px !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: 220px repeat(4, 142px) !important;
  }
}

@media (max-width: 900px) {
  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: 1fr !important;
  }

  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "visual"
      "actions" !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: 220px repeat(4, 142px) !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 821px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    position: relative !important;
    grid-template-columns: minmax(126px, 158px) minmax(0, 1fr) !important;
    grid-template-areas: "day visual" !important;
    padding-right: 154px !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    position: absolute !important;
    top: 9px !important;
    right: 10px !important;
    bottom: 9px !important;
    width: 132px !important;
    max-width: 132px !important;
  }
}

/* Phase 10Y: SaaS day ledger rows. Summary stays horizontal; full editing stays in the drawer. */
#quoteDashboardSection,
#quoteDashboardSection > .quote-builder-grid,
.quote-builder-reference-shell,
.quote-builder-reference-shell .quote-builder-form,
.quote-builder-column,
.quote-builder-main-column,
.quote-builder-main-column > .quote-builder-itinerary-card,
#quoteBuilderItinerarySection,
#quoteBuilderItinerarySection .quote-builder-card-body,
#quoteDayPlanList {
  min-width: 0 !important;
  max-width: 100% !important;
}

#quoteDashboardSection > .quote-builder-grid,
.quote-builder-reference-shell {
  overflow-x: hidden !important;
}

.quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: minmax(176px, 224px) minmax(0, 1fr) minmax(238px, 300px) !important;
}

#quoteBuilderItinerarySection .quote-builder-card-head,
#quoteBuilderItinerarySection .detail-action-row {
  min-width: 0 !important;
  max-width: 100% !important;
  flex-wrap: wrap !important;
}

.quote-builder-main-column > .quote-builder-itinerary-card,
.quote-builder-reference-shell .quote-builder-main-column > .quote-builder-itinerary-card,
#quoteBuilderItinerarySection,
#quoteBuilderItinerarySection .quote-builder-card-body,
#quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open,
.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  align-content: start !important;
  overflow-x: hidden !important;
}

.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open {
  display: grid !important;
  grid-template-columns: minmax(132px, 168px) minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

.quote-day-navigator {
  min-width: 0 !important;
  max-height: min(52vh, 520px) !important;
  padding: 8px !important;
  border-radius: 16px !important;
}

.quote-day-nav-item {
  min-width: 0 !important;
  min-height: 58px !important;
  padding: 9px 10px !important;
  border-radius: 13px !important;
}

.quote-day-nav-item span,
.quote-day-nav-item strong,
.quote-day-nav-item small {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.quote-day-nav-item strong,
.quote-day-nav-item small {
  display: block !important;
  white-space: nowrap !important;
}

.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready,
.quote-day-master-card.is-editor-open {
  display: grid !important;
  grid-template-columns: minmax(126px, 158px) minmax(0, 1fr) minmax(108px, 136px) !important;
  grid-template-areas: "day visual actions" !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 84px !important;
  max-height: 98px !important;
  padding: 9px 10px !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  cursor: default !important;
  transform: none !important;
}

.quote-day-master-card.is-selected,
.quote-day-master-card.is-editor-open {
  border-color: rgba(243, 107, 45, 0.54) !important;
  background:
    linear-gradient(90deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.96)) !important;
  box-shadow: inset 3px 0 0 rgba(243, 107, 45, 0.82), 0 12px 26px rgba(243, 107, 45, 0.1) !important;
}

.quote-day-master-card *,
.quote-day-master-card.is-selected *,
.quote-day-master-card.is-collapsed-ready *,
.quote-day-master-card.is-editor-open * {
  min-width: 0 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents !important;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  grid-area: day !important;
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.quote-day-master-card .quote-builder-repeat-title {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
  line-height: 1.08 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 0.68rem !important;
  line-height: 1.16 !important;
  text-overflow: ellipsis !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-copilot-badge {
  width: max-content !important;
  max-width: 100% !important;
  min-height: 21px !important;
  padding: 3px 8px !important;
  overflow: hidden !important;
  font-size: 0.62rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
.quote-day-master-card.is-editor-open .quote-day-visual-builder {
  grid-area: visual !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  max-height: 68px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: static !important;
  top: auto !important;
}

.quote-day-master-card .quote-day-image-preview {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
.quote-day-master-card.is-editor-open .quote-day-summary-grid {
  display: contents !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card.is-editor-open .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid !important;
  align-content: center !important;
  gap: 3px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 66px !important;
  min-height: 0 !important;
  max-height: 66px !important;
  padding: 7px 8px !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}

.quote-day-master-card .quote-day-route-card {
  grid-template-rows: auto auto 1fr !important;
}

.quote-day-master-card .quote-day-route-meta {
  display: none !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  min-width: 0 !important;
  margin-top: 4px !important;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0 !important;
  padding: 3px 5px !important;
  overflow: hidden !important;
  font-size: 0.62rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-badge,
.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 0.6rem !important;
  line-height: 1.04 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  padding: 3px 7px !important;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 2px 0 0 !important;
  font-size: 0.76rem !important;
  line-height: 1.12 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-builder-repeat-actions {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 25px !important;
  padding: 4px 5px !important;
  overflow: hidden !important;
  border-radius: 9px !important;
  font-size: 0.66rem !important;
  line-height: 1.02 !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid,
.quote-day-master-card.is-editor-open .quote-day-plan-grid {
  display: none !important;
}

.quote-day-editor-drawer .quote-day-plan-grid {
  display: grid !important;
}

@media (max-width: 1180px) {
  .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .quote-day-navigator {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
    max-height: none !important;
  }

  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(118px, 148px) minmax(0, 1fr) minmax(104px, 132px) !important;
    min-height: 88px !important;
    max-height: 112px !important;
  }
}

@media (max-width: 820px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "visual"
      "actions" !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-day-route-card {
    grid-column: 1 / -1 !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Phase 10X: authoritative slim day ledger rows. Full edit fields stay in the drawer. */
.quote-builder-reference-shell .quote-builder-main-column > .quote-builder-itinerary-card,
.quote-builder-main-column > .quote-builder-itinerary-card,
#quoteBuilderItinerarySection,
#quoteBuilderItinerarySection .quote-builder-card-body,
#quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open,
.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  align-content: start !important;
}

#quoteBuilderItinerarySection,
.quote-builder-main-column > .quote-builder-itinerary-card {
  padding-bottom: 12px !important;
}

.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open {
  display: grid !important;
  grid-template-columns: minmax(150px, 188px) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 9px !important;
  overflow: visible !important;
  padding: 0 !important;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready,
.quote-day-master-card.is-editor-open {
  display: grid !important;
  grid-template-columns: minmax(140px, 174px) minmax(0, 1fr) minmax(112px, 142px) !important;
  grid-template-areas: "day visual actions" !important;
  align-items: center !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 88px !important;
  max-height: 104px !important;
  padding: 10px 12px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  transform: none !important;
}

.quote-day-master-card * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents !important;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  grid-area: day !important;
  display: grid !important;
  align-content: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.quote-day-master-card .quote-builder-repeat-title {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.9rem !important;
  line-height: 1.1 !important;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.15 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-copilot-badge {
  width: max-content !important;
  max-width: 100% !important;
  min-height: 23px !important;
  padding: 4px 10px !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
.quote-day-master-card.is-editor-open .quote-day-visual-builder {
  grid-area: visual !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  max-height: 72px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 0 2px 3px !important;
  position: static !important;
  top: auto !important;
}

.quote-day-master-card .quote-day-visual-builder::-webkit-scrollbar {
  height: 4px;
}

.quote-day-master-card .quote-day-image-preview {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
.quote-day-master-card.is-editor-open .quote-day-summary-grid {
  display: contents !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card.is-editor-open .quote-day-route-card {
  flex: 0 0 clamp(210px, 32%, 300px) !important;
}

.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  flex: 0 0 clamp(122px, 16%, 166px) !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card.is-editor-open .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid !important;
  align-content: center !important;
  min-width: 0 !important;
  width: auto !important;
  height: 66px !important;
  min-height: 0 !important;
  max-height: 66px !important;
  padding: 8px 9px !important;
  overflow: hidden !important;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  min-width: 0 !important;
  margin-top: 6px !important;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0 !important;
  padding: 4px 6px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.quote-day-master-card .quote-day-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  padding: 3px 8px !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  font-size: 0.62rem !important;
  line-height: 1.08 !important;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 3px 0 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.12 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-builder-repeat-actions {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 5px 6px !important;
  border-radius: 11px !important;
  font-size: 0.7rem !important;
  line-height: 1.02 !important;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid,
.quote-day-master-card.is-editor-open .quote-day-plan-grid {
  display: none !important;
}

.quote-day-editor-drawer .quote-day-plan-grid {
  display: grid !important;
}

@media (max-width: 1180px) {
  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: minmax(132px, 168px) minmax(0, 1fr) !important;
  }

  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(126px, 156px) minmax(0, 1fr) minmax(106px, 132px) !important;
    max-height: 110px !important;
  }
}

@media (max-width: 900px) {
  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "visual"
      "actions" !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    max-height: none !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Phase 10Z: final quote-day ledger authority after legacy phase overrides. */
#quoteBuilderItinerarySection,
#quoteBuilderItinerarySection .quote-builder-card-body,
#quoteDayPlanList,
.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open,
.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  align-content: start !important;
  overflow-x: hidden !important;
}

#quoteBuilderItinerarySection .quote-builder-card-head,
#quoteBuilderItinerarySection .detail-action-row {
  position: relative !important;
  z-index: 6 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex-wrap: wrap !important;
}

#quoteBuilderItinerarySection .detail-action-row {
  align-items: center !important;
}

#addQuoteDayPlanButton,
#quoteSyncDayPlanButton {
  position: relative !important;
  z-index: 8 !important;
  pointer-events: auto !important;
}

#quoteDayPlanList {
  position: relative !important;
  z-index: 1 !important;
}

.quote-day-master-detail-shell,
.quote-day-master-detail-shell.has-editor-open {
  display: grid !important;
  grid-template-columns: minmax(132px, 168px) minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
}

.quote-day-navigator {
  min-width: 0 !important;
  max-height: min(52vh, 520px) !important;
  padding: 8px !important;
  border-radius: 16px !important;
}

.quote-day-nav-item {
  min-width: 0 !important;
  min-height: 58px !important;
  padding: 9px 10px !important;
  border-radius: 13px !important;
}

.quote-day-nav-item span,
.quote-day-nav-item strong,
.quote-day-nav-item small {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.quote-day-nav-item strong,
.quote-day-nav-item small {
  display: block !important;
  white-space: nowrap !important;
}

.quote-day-detail-column,
.quote-day-master-detail-shell.has-editor-open .quote-day-detail-column {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.quote-day-master-card,
.quote-day-master-card.is-selected,
.quote-day-master-card.is-collapsed-ready,
.quote-day-master-card.is-editor-open {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(126px, 158px) minmax(0, 1fr) !important;
  grid-template-areas: "day visual" !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 84px !important;
  max-height: 98px !important;
  padding: 9px 170px 9px 10px !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  cursor: default !important;
  transform: none !important;
}

.quote-day-master-card.is-selected,
.quote-day-master-card.is-editor-open {
  border-color: rgba(243, 107, 45, 0.54) !important;
  background:
    linear-gradient(90deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.96)) !important;
  box-shadow: inset 3px 0 0 rgba(243, 107, 45, 0.82), 0 12px 26px rgba(243, 107, 45, 0.1) !important;
}

.quote-day-master-card *,
.quote-day-master-card.is-selected *,
.quote-day-master-card.is-collapsed-ready *,
.quote-day-master-card.is-editor-open * {
  min-width: 0 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.quote-day-master-card .quote-builder-repeat-top {
  display: contents !important;
}

.quote-day-master-card .quote-builder-repeat-top > div:first-child {
  grid-area: day !important;
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.quote-day-master-card .quote-builder-repeat-title {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--text) !important;
  font-size: 0.9rem !important;
  line-height: 1.08 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-builder-repeat-top .muted {
  display: -webkit-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 0.68rem !important;
  line-height: 1.16 !important;
  text-overflow: ellipsis !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-copilot-badge {
  width: max-content !important;
  max-width: 100% !important;
  min-height: 21px !important;
  padding: 3px 8px !important;
  overflow: hidden !important;
  font-size: 0.62rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-visual-builder,
.quote-day-master-card.is-selected .quote-day-visual-builder,
.quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
.quote-day-master-card.is-editor-open .quote-day-visual-builder {
  grid-area: visual !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr) repeat(3, minmax(0, 0.82fr)) !important;
  align-items: stretch !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  max-height: 68px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: static !important;
  top: auto !important;
}

.quote-day-master-card .quote-day-image-preview {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip,
.quote-day-master-card .quote-day-summary-grid,
.quote-day-master-card.is-selected .quote-day-summary-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
.quote-day-master-card.is-editor-open .quote-day-summary-grid {
  display: contents !important;
}

.quote-day-master-card .quote-day-route-card,
.quote-day-master-card.is-selected .quote-day-route-card,
.quote-day-master-card.is-collapsed-ready .quote-day-route-card,
.quote-day-master-card.is-editor-open .quote-day-route-card,
.quote-day-master-card .quote-day-service-strip article,
.quote-day-master-card .quote-day-summary-grid article {
  display: grid !important;
  align-content: center !important;
  gap: 3px !important;
  width: auto !important;
  min-width: 0 !important;
  height: 66px !important;
  min-height: 0 !important;
  max-height: 66px !important;
  padding: 7px 8px !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}

.quote-day-master-card .quote-day-route-card {
  grid-template-rows: auto auto 1fr !important;
}

.quote-day-master-card .quote-day-route-meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  min-width: 0 !important;
  margin-top: 4px !important;
}

.quote-day-master-card .quote-day-route-meta span {
  min-width: 0 !important;
  padding: 3px 5px !important;
  overflow: hidden !important;
  font-size: 0.62rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-badge,
.quote-day-master-card .quote-day-service-strip span,
.quote-day-master-card .quote-day-summary-grid span {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 0.6rem !important;
  line-height: 1.04 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.quote-day-master-card .quote-day-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: 100% !important;
  padding: 3px 7px !important;
}

.quote-day-master-card .quote-day-route-card strong,
.quote-day-master-card .quote-day-service-strip strong,
.quote-day-master-card .quote-day-summary-grid p {
  display: -webkit-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  margin: 2px 0 0 !important;
  font-size: 0.76rem !important;
  line-height: 1.12 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.quote-day-master-card .quote-builder-repeat-actions {
  position: absolute !important;
  top: 9px !important;
  right: 10px !important;
  bottom: 9px !important;
  grid-area: auto !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: 148px !important;
  max-width: 148px !important;
  min-width: 0 !important;
}

.quote-day-master-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 27px !important;
  padding: 4px 6px !important;
  overflow: hidden !important;
  border-radius: 9px !important;
  font-size: 0.7rem !important;
  line-height: 1.14 !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.quote-day-master-card .quote-day-service-strip article:nth-child(n + 3),
.quote-day-master-card .quote-day-summary-grid {
  display: none !important;
}

.quote-day-master-card .quote-day-service-strip {
  display: none !important;
}

.quote-day-master-card .quote-day-plan-grid,
.quote-day-master-card.is-selected .quote-day-plan-grid,
.quote-day-master-card.is-collapsed-ready .quote-day-plan-grid,
.quote-day-master-card.is-editor-open .quote-day-plan-grid {
  display: none !important;
}

.quote-day-editor-drawer {
  pointer-events: auto !important;
}

.quote-day-editor-drawer .quote-day-plan-grid {
  display: grid !important;
}

#quoteDayPlanList .quote-day-editor-drawer,
.quote-day-master-detail-shell .quote-day-editor-drawer,
.quote-day-master-detail-shell.has-editor-open .quote-day-editor-drawer {
  position: relative !important;
  z-index: 24 !important;
  isolation: isolate !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(255, 251, 246, 0.992)) !important;
  backdrop-filter: none !important;
}

#quoteDayPlanList .quote-day-editor-drawer::before,
.quote-day-master-detail-shell .quote-day-editor-drawer::before,
.quote-day-master-detail-shell.has-editor-open .quote-day-editor-drawer::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: inherit !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.998), rgba(255, 250, 244, 0.996)) !important;
  z-index: -1 !important;
}

@media (max-width: 1180px) {
  .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .quote-day-master-detail-shell,
  .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .quote-day-navigator {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
    max-height: none !important;
  }

  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(118px, 148px) minmax(0, 1fr) !important;
    min-height: 88px !important;
    max-height: 112px !important;
    padding-right: 148px !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    width: 126px !important;
    max-width: 126px !important;
  }
}

@media (max-width: 820px) {
  .quote-day-master-card,
  .quote-day-master-card.is-selected,
  .quote-day-master-card.is-collapsed-ready,
  .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "visual"
      "actions" !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 9px 10px !important;
  }

  .quote-day-master-card .quote-day-visual-builder,
  .quote-day-master-card.is-selected .quote-day-visual-builder,
  .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-height: none !important;
  }

  .quote-day-master-card .quote-day-route-card {
    grid-column: 1 / -1 !important;
  }

  .quote-day-master-card .quote-builder-repeat-actions {
    position: static !important;
    grid-area: actions !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
  }
}

/* Phase 11A: quote builder becomes a single day-first workspace.
   Existing IDs and data handlers stay mounted; duplicated side guidance is visually retired. */
body[data-active-section="quote-generator"] {
  overflow-x: hidden !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell,
body[data-active-section="quote-generator"] .quote-builder-reference-shell * {
  box-sizing: border-box;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  align-items: start !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 1380px !important;
  margin: 0 auto !important;
  overflow-x: hidden !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column,
body[data-active-section="quote-generator"] .quote-builder-main-column,
body[data-active-section="quote-generator"] .quote-builder-right-column {
  display: contents !important;
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-nav-card,
body[data-active-section="quote-generator"] .quote-builder-gallery-card,
body[data-active-section="quote-generator"] .quote-builder-ai-left-card,
body[data-active-section="quote-generator"] #quoteBuilderSuggestionsSection {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-card,
body[data-active-section="quote-generator"] .quote-builder-trip-card,
body[data-active-section="quote-generator"] .quote-builder-itinerary-card,
body[data-active-section="quote-generator"] .quote-builder-commercial-card,
body[data-active-section="quote-generator"] .quote-builder-pricing-card,
body[data-active-section="quote-generator"] .quote-builder-preview-panel,
body[data-active-section="quote-generator"] .quote-builder-payment-card,
body[data-active-section="quote-generator"] .quote-builder-share-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-card {
  order: 1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-trip-card {
  order: 2 !important;
}

body[data-active-section="quote-generator"] .quote-builder-itinerary-card {
  order: 3 !important;
}

body[data-active-section="quote-generator"] .quote-builder-commercial-card {
  order: 4 !important;
}

body[data-active-section="quote-generator"] .quote-builder-pricing-card {
  order: 5 !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  order: 9 !important;
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-payment-card {
  order: 6 !important;
}

body[data-active-section="quote-generator"] .quote-builder-share-card {
  order: 7 !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-card,
body[data-active-section="quote-generator"] .quote-builder-trip-card {
  padding: 14px !important;
  border-radius: 18px !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-grid {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) !important;
  align-items: end !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-grid .field-span-2 {
  grid-column: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-actions {
  justify-content: flex-start !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-strip {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto minmax(240px, 0.95fr) minmax(240px, 1.05fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: end !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] #quoteProductStatus {
  align-self: center !important;
  margin: 0 !important;
  min-height: 48px !important;
  display: grid !important;
  align-content: center !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-assist,
body[data-active-section="quote-generator"] .quote-builder-inventory-card {
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 10px 12px !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-assist {
  border-style: dashed !important;
  background: rgba(248, 250, 252, 0.74) !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-assist strong {
  font-size: 0.78rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-assist p {
  margin: 4px 0 0 !important;
  font-size: 0.78rem !important;
  line-height: 1.35 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card.hidden {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-header {
  align-items: center !important;
  display: flex !important;
  gap: 10px !important;
  justify-content: space-between !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-header > div {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-section-eyebrow {
  color: var(--muted) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-header strong {
  color: var(--text) !important;
  font-size: 0.92rem !important;
  line-height: 1.15 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-pill {
  align-items: center !important;
  border: 1px solid rgba(96, 165, 250, 0.26) !important;
  border-radius: 999px !important;
  color: #bfdbfe !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  min-height: 28px !important;
  padding: 5px 9px !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metrics {
  margin-top: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics .quote-builder-preview-metric {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics .quote-builder-preview-metric strong {
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics .quote-builder-preview-metric.is-ready {
  background: rgba(20, 83, 45, 0.12) !important;
  border-color: rgba(74, 222, 128, 0.24) !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics .quote-builder-preview-metric.is-warning {
  background: rgba(120, 53, 15, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.28) !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics .quote-builder-preview-metric.is-error {
  background: rgba(127, 29, 29, 0.14) !important;
  border-color: rgba(248, 113, 113, 0.32) !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .muted {
  margin-top: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-picker {
  display: grid !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-picker.is-review-only {
  border-left: 2px solid rgba(148, 163, 184, 0.26) !important;
  padding-left: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-picker.is-sales-guided {
  border-left: 2px solid rgba(96, 165, 250, 0.34) !important;
  padding-left: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-picker.is-ops-control {
  border-left: 2px solid rgba(74, 222, 128, 0.3) !important;
  padding-left: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-picker .field {
  margin: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-strip {
  align-items: end !important;
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: minmax(170px, 0.8fr) minmax(0, 2fr) !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary {
  align-items: stretch !important;
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary span {
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 8px !important;
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  line-height: 1.25 !important;
  min-width: 0 !important;
  padding: 6px 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-active,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-available {
  background: rgba(20, 83, 45, 0.12) !important;
  border-color: rgba(74, 222, 128, 0.22) !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-draft,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-warning {
  background: rgba(120, 53, 15, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.24) !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-closed,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-error {
  background: rgba(127, 29, 29, 0.14) !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary strong {
  color: var(--text) !important;
  display: block !important;
  font-size: 0.8rem !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-link-row {
  align-items: end !important;
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: 1fr !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-link-row .field,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-row .field {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] #quoteBatchSelectInput,
body[data-active-section="quote-generator"] #quoteBatchLifecycleActionInput {
  max-width: 100% !important;
  min-width: 0 !important;
  width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-picker-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-link-row .quote-builder-inventory-picker-actions {
  display: grid !important;
  flex-wrap: nowrap !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-link-row .ghost-button {
  min-width: 82px !important;
  width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-link-row .ghost-button:disabled,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-row .ghost-button:disabled {
  background: rgba(248, 250, 252, 0.86) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.72 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-header {
  align-items: center !important;
  border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
  display: flex !important;
  gap: 8px !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  padding-top: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-header span {
  color: var(--text) !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-header small {
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-grid {
  align-items: end !important;
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
  padding-top: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-grid .field {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-transport-field {
  grid-column: span 2 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-transport-meta {
  border: 1px solid rgba(37, 99, 235, 0.18) !important;
  border-radius: 8px !important;
  color: #475569 !important;
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  line-height: 1.3 !important;
  min-height: 32px !important;
  padding: 8px 10px !important;
  background: rgba(248, 250, 252, 0.96) !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-transport-meta[data-status-tone="ready"] {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(240, 253, 250, 0.94)) !important;
  border-color: rgba(16, 185, 129, 0.22) !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-transport-meta[data-status-tone="error"] {
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(255, 247, 247, 0.94)) !important;
  border-color: rgba(248, 113, 113, 0.34) !important;
  color: #991b1b !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-transport-meta span {
  min-width: 0 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-transport-meta strong {
  color: #172033 !important;
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-grid .ghost-button {
  align-self: end !important;
  min-height: 38px !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .assistant-widget.assistant-widget-closed {
  bottom: 12px !important;
  right: 8px !important;
  width: 48px !important;
}

body[data-active-section="quote-generator"] .assistant-widget.assistant-widget-closed .assistant-launcher {
  bottom: 12px !important;
  gap: 0 !important;
  justify-content: center !important;
  left: auto !important;
  min-height: 48px !important;
  min-width: 48px !important;
  padding: 3px !important;
  right: 8px !important;
  width: 48px !important;
}

body[data-active-section="quote-generator"] .assistant-widget.assistant-widget-closed .assistant-launcher-text {
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

body[data-active-section="quote-generator"] .assistant-widget.assistant-widget-closed .assistant-launcher-ping {
  right: 6px !important;
  top: 6px !important;
}

body[data-active-section="quote-generator"] .assistant-popup {
  max-height: min(680px, calc(100vh - 112px)) !important;
}

body[data-active-section="quote-generator"] .quote-generator-panel {
  padding-bottom: 76px !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-hints {
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-hint {
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 8px !important;
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  line-height: 1.25 !important;
  min-width: 0 !important;
  padding: 6px 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-hint.is-neutral {
  background: rgba(148, 163, 184, 0.08) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: rgba(203, 213, 225, 0.82) !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-hint strong {
  color: var(--text) !important;
  display: block !important;
  font-size: 0.78rem !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-hint.is-error {
  background: rgba(127, 29, 29, 0.16) !important;
  border-color: rgba(248, 113, 113, 0.32) !important;
  color: #fecaca !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-hint.is-ready {
  background: rgba(20, 83, 45, 0.14) !important;
  border-color: rgba(74, 222, 128, 0.24) !important;
  color: #bbf7d0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-grid input.is-invalid,
body[data-active-section="quote-generator"] .quote-builder-batch-create-grid select.is-invalid,
body[data-active-section="quote-generator"] #quoteProductSelect.is-invalid,
body[data-active-section="quote-generator"] #quotePackageTypeInput.is-invalid {
  border-color: rgba(248, 113, 113, 0.72) !important;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.14) !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-actions .ghost-button {
  min-height: 34px !important;
  padding: 7px 10px !important;
  white-space: nowrap !important;
}

/* Phase UI-4: GT inventory uses the app theme without squeezing text into columns. */
body[data-active-section="quote-generator"] .quote-builder-source-strip .quote-builder-inventory-card {
  grid-column: 1 / -1 !important;
  border: 1px solid rgba(37, 99, 235, 0.14) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95)) !important;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06) !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hints {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary span,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint {
  min-width: 0 !important;
  border-radius: 8px !important;
  color: #334155 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary span,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric {
  display: grid !important;
  gap: 3px !important;
  align-content: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric span,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric strong,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary span,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary strong,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint strong {
  word-break: normal !important;
  overflow-wrap: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric span,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint strong {
  line-height: 1.25 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric strong,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary strong,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint strong {
  color: #172033 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary em,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary small,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric small {
  display: block !important;
  font-style: normal !important;
  line-height: 1.25 !important;
  min-width: 0 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary em,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric span {
  color: #475569 !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary small,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric small {
  color: #64748b !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-row {
  align-items: end !important;
  border: 1px solid rgba(37, 99, 235, 0.14) !important;
  border-radius: 8px !important;
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1fr) auto !important;
  padding: 10px !important;
  background: rgba(248, 250, 252, 0.94) !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-row.hidden {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-quick-actions {
  display: grid !important;
  gap: 6px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-chip {
  align-items: center !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #334155 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  justify-content: center !important;
  min-height: 36px !important;
  min-width: 0 !important;
  padding: 7px 8px !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-chip.is-selected {
  border-color: rgba(37, 99, 235, 0.34) !important;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
  color: #1d4ed8 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-chip.is-current {
  border-color: rgba(16, 185, 129, 0.34) !important;
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(240, 253, 250, 0.94)) !important;
  color: #166534 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-chip:disabled {
  cursor: not-allowed !important;
  opacity: 0.72 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-row .form-status {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-ready,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-active,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-available,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint.is-ready {
  border-color: rgba(16, 185, 129, 0.28) !important;
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(240, 253, 250, 0.92)) !important;
  color: #166534 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-warning,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-draft,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-warning,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-blocked,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-blocked,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint.is-warning {
  border-color: rgba(245, 158, 11, 0.32) !important;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 237, 0.94)) !important;
  color: #92400e !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-capacity,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-view,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-capacity,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-source,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-cost {
  border-color: rgba(37, 99, 235, 0.22) !important;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
  color: #1d4ed8 !important;
}

body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-sold,
body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-sold {
  border-color: rgba(99, 102, 241, 0.22) !important;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
  color: #3730a3 !important;
}

body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-preview-metric.is-error,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-closed,
body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary .quote-builder-lifecycle-chip.is-error,
body[data-active-section="quote-generator"] .quote-builder-batch-create-hint.is-error {
  border-color: rgba(248, 113, 113, 0.34) !important;
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(255, 247, 247, 0.94)) !important;
  color: #991b1b !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-hint.is-neutral {
  border-color: rgba(148, 163, 184, 0.24) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  color: #475569 !important;
}

body[data-active-section="quote-generator"] .quote-builder-batch-create-header small {
  white-space: normal !important;
}

#quoteBatchSummaryCard .quote-builder-batch-create-hints {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)) !important;
}

#quoteBatchSummaryCard .quote-builder-batch-create-hint {
  align-content: start !important;
  align-items: start !important;
  display: grid !important;
  gap: 2px 8px !important;
  grid-template-columns: minmax(68px, max-content) minmax(0, 1fr) !important;
  min-height: 54px !important;
  padding: 8px 10px !important;
}

#quoteBatchSummaryCard .quote-builder-batch-create-hint strong {
  display: block !important;
  font-size: 0.74rem !important;
  line-height: 1.2 !important;
  min-width: 0 !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
  word-break: normal !important;
}

#quoteBatchSummaryCard #quoteBatchCreateStatus {
  line-height: 1.35 !important;
  max-width: 72ch !important;
}

#quoteBatchSummaryCard #quoteBatchCreateStatus.is-warning {
  background: rgba(255, 251, 235, 0.86) !important;
  border: 1px solid rgba(245, 158, 11, 0.24) !important;
  border-radius: 8px !important;
  color: #92400e !important;
  padding: 7px 9px !important;
}

@media (max-width: 720px) {
  body[data-active-section="quote-generator"] .quote-builder-inventory-header,
  body[data-active-section="quote-generator"] .quote-builder-batch-create-header {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-inventory-pill {
    justify-content: center !important;
    width: 100% !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics,
  body[data-active-section="quote-generator"] .quote-builder-batch-link-row,
  body[data-active-section="quote-generator"] .quote-builder-lifecycle-action-row,
  body[data-active-section="quote-generator"] .quote-builder-lifecycle-strip,
  body[data-active-section="quote-generator"] .quote-builder-lifecycle-summary,
  body[data-active-section="quote-generator"] .quote-builder-batch-create-hints,
  body[data-active-section="quote-generator"] .quote-builder-batch-create-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-batch-transport-field {
    grid-column: auto !important;
  }

  #quoteBatchSummaryCard .quote-builder-batch-create-hints,
  #quoteBatchSummaryCard .quote-builder-batch-create-hint {
    grid-template-columns: 1fr !important;
  }

  #quoteBatchSummaryCard .quote-builder-batch-create-hint {
    min-height: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-batch-link-row .quote-builder-inventory-picker-actions,
  body[data-active-section="quote-generator"] .quote-builder-inventory-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-batch-link-row .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-inventory-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-batch-create-grid .ghost-button {
    min-width: 0 !important;
    width: 100% !important;
  }

  body[data-active-section="quote-generator"] .assistant-widget.assistant-widget-closed {
    bottom: 8px !important;
    right: 8px !important;
    width: 46px !important;
  }

  body[data-active-section="quote-generator"] .assistant-widget.assistant-widget-closed .assistant-launcher {
    bottom: 8px !important;
    left: auto !important;
    min-height: 46px !important;
    min-width: 46px !important;
    padding: 2px !important;
    right: 8px !important;
    width: 46px !important;
  }

  body[data-active-section="quote-generator"] .assistant-widget.assistant-widget-closed .assistant-launcher-orb-shell {
    height: 42px !important;
    width: 42px !important;
  }

  body[data-active-section="quote-generator"] .assistant-popup {
    bottom: 72px !important;
    max-height: calc(100vh - 92px) !important;
  }

  body[data-active-section="quote-generator"] .quote-generator-panel {
    padding-bottom: 84px !important;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  body[data-active-section="quote-generator"] .quote-builder-inventory-card .quote-builder-inventory-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

body[data-active-section="quote-generator"] .quote-builder-advanced-trip-editor {
  margin-top: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-advanced-trip-editor > summary {
  width: max-content !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection {
  border-color: rgba(243, 107, 45, 0.24) !important;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08) !important;
}

body[data-active-section="quote-generator"] .quote-day-image-prompt-card {
  display: grid !important;
  gap: 6px !important;
  margin-top: 10px !important;
  padding: 10px 12px !important;
  border: 1px dashed rgba(37, 99, 235, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(248, 250, 252, 0.88) !important;
}

body[data-active-section="quote-generator"] .quote-day-image-prompt-card span {
  color: #1d4ed8 !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

body[data-active-section="quote-generator"] .quote-day-image-prompt-card p {
  margin: 0 !important;
  color: #334155 !important;
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  border-color: rgba(15, 23, 42, 0.08) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel .panel-header {
  margin-bottom: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-details {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-details > summary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 36px !important;
  padding: 8px 12px !important;
  border: 1px solid rgba(37, 99, 235, 0.18) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #1d4ed8 !important;
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-builder-template-grid,
  body[data-active-section="quote-generator"] .quote-builder-source-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-builder-template-grid,
  body[data-active-section="quote-generator"] .quote-builder-source-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-source-actions {
    align-items: stretch !important;
  }
}

/* Phase UI-3: Quote Desk command chrome stays compact and readable. */
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions {
  gap: 7px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: grid !important;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr) !important;
  grid-template-areas:
    "title actions"
    "routes routes" !important;
  align-items: start !important;
  gap: 8px 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar > div:first-child {
  grid-area: title !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar > div:first-child > .muted,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions > p.muted {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
  justify-content: end !important;
  gap: 6px !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link,
body[data-active-section="quote-generator"] .quote-builder-route-links .quote-builder-action-link {
  min-height: 34px !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 0.78rem !important;
  line-height: 1.15 !important;
  text-align: center !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-route-links {
  grid-area: routes !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-route-links .quote-builder-action-link {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-smart-buttons {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important;
  gap: 6px !important;
}

body[data-active-section="quote-generator"] .quote-builder-smart-button {
  min-height: 43px !important;
  padding: 7px 8px !important;
  border-radius: 8px !important;
  align-content: center !important;
}

body[data-active-section="quote-generator"] .quote-builder-smart-button span,
body[data-active-section="quote-generator"] .quote-builder-smart-button strong,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link,
body[data-active-section="quote-generator"] .quote-builder-route-links .quote-builder-action-link {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-smart-button span {
  letter-spacing: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-smart-button strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-secondary-actions {
  display: grid !important;
  grid-template-columns: minmax(240px, 1fr) auto !important;
  gap: 7px 10px !important;
  align-items: center !important;
}

body[data-active-section="quote-generator"] .quote-builder-revision-toggle {
  max-width: 520px !important;
  min-width: 0 !important;
  border-radius: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-revision-toggle span {
  display: block !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.22 !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
  gap: 6px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 50px !important;
  border-radius: 8px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderControlCards.quote-builder-visibility-grid,
body[data-active-section="quote-generator"] #quoteBuilderControlCards.quote-builder-progress-stepper {
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)) !important;
  overflow-x: visible !important;
  gap: 7px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderControlCards .quote-builder-visibility-card,
body[data-active-section="quote-generator"] #quoteBuilderControlCards .quote-builder-progress-step {
  min-height: 58px !important;
  border-radius: 8px !important;
}

@media (max-width: 900px) {
  body[data-active-section="quote-generator"] .quote-builder-topbar {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "title"
      "actions"
      "routes" !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link[href="#quoteBuilderPaymentSection"] {
    grid-column: 1 / -1 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-secondary-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-revision-toggle {
    max-width: none !important;
  }
}

@media (max-width: 720px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions {
    position: static !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderControlCards.quote-builder-visibility-grid,
  body[data-active-section="quote-generator"] #quoteBuilderControlCards.quote-builder-progress-stepper {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-route-links {
    grid-template-columns: repeat(3, minmax(126px, 1fr)) !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
    scroll-snap-type: x proximity !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-smart-buttons {
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(118px, 132px) !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
    scroll-snap-type: x proximity !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-smart-button,
  body[data-active-section="quote-generator"] .quote-builder-route-links .quote-builder-action-link {
    scroll-snap-align: start !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-hero-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-secondary-actions .detail-action-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(118px, 1fr)) !important;
    gap: 6px !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
    scroll-snap-type: x proximity !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-secondary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-secondary-actions .primary-button {
    width: auto !important;
    min-height: 34px !important;
    border-radius: 8px !important;
    scroll-snap-align: start !important;
    white-space: normal !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
    width: 100% !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-revision-toggle span {
    white-space: normal !important;
  }
}

.support-desk-card {
  margin-top: 12px;
  border-radius: 8px;
  padding: 14px;
}

.support-desk-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.support-desk-column {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
}

.support-desk-column h5 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.support-desk-ticket-list {
  display: grid;
  gap: 7px;
  min-height: 52px;
}

.support-desk-ticket-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(10, 14, 24, 0.7);
  padding: 8px 9px;
  cursor: pointer;
}

.support-desk-ticket-card.active {
  border-color: rgba(43, 110, 242, 0.6);
  box-shadow: 0 0 0 1px rgba(43, 110, 242, 0.35) inset;
}

.support-desk-ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.support-desk-ticket-head strong {
  font-size: 0.82rem;
  line-height: 1.3;
}

.support-desk-ticket-state {
  padding: 4px 6px;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
}

.support-desk-ticket-description {
  margin: 4px 0 0;
  font-size: 0.77rem;
  line-height: 1.34;
  color: rgba(226, 232, 240, 0.92);
}

.support-desk-ticket-card .chat-conversation-meta {
  margin-top: 6px;
  gap: 6px;
  font-size: 0.68rem;
}

.support-desk-ticket-preview {
  margin-top: 4px;
  font-size: 0.72rem;
  line-height: 1.28;
}

.support-desk-empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.36);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.46);
  padding: 8px;
}

.support-desk-empty-state strong {
  display: block;
  font-size: 0.78rem;
}

.support-desk-empty-state p {
  margin: 4px 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
}

.support-desk-actions {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 9px;
}

.support-desk-actions .field span {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.support-desk-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.support-desk-actions .detail-action-row {
  gap: 8px;
}

#supportDeskApplyButton,
#supportDeskOpenLinkedButton {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
}

#supportDeskStatus {
  margin-top: 6px;
  font-size: 0.74rem;
  line-height: 1.3;
}

@media (max-width: 960px) {
  .support-desk-columns,
  .support-desk-actions-grid {
    grid-template-columns: 1fr;
  }

  .support-desk-card {
    padding: 12px;
  }

  .support-desk-actions .detail-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  #supportDeskApplyButton,
  #supportDeskOpenLinkedButton {
    width: 100%;
  }
}

/* Phase 20A-1: shell and navigation polish (visual only) */
.topbar {
  padding: 8px 4px 12px;
  margin-bottom: 2px;
}

.topbar-brand h2 {
  font-size: clamp(1.08rem, 1.4vw, 1.26rem);
  line-height: 1.2;
}

.topbar-brand .eyebrow {
  margin-bottom: 4px;
  opacity: 0.76;
}

.workspace-shell-bar {
  padding: 18px 20px;
}

.workspace-shell-copy h3 {
  font-size: clamp(1.08rem, 1.25vw, 1.26rem);
  line-height: 1.24;
}

.workspace-shell-summary,
#workspaceShellSummary {
  max-width: 76ch;
}

.nav-menu {
  gap: 12px;
}

.nav-group {
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.nav-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 4px;
  font-size: 0.69rem;
  letter-spacing: 0.16em;
  color: rgba(241, 245, 249, 0.64);
}

.nav-group-meta {
  margin: -2px 4px 2px;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: rgba(241, 245, 249, 0.58);
}

.nav-group-active {
  border-color: rgba(96, 165, 250, 0.34);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.16);
}

.nav-item {
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 12px;
  line-height: 1.25;
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-item.active {
  transform: translateX(0);
  color: #fff;
  border-color: rgba(251, 146, 60, 0.42);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.32), rgba(220, 38, 38, 0.24));
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.2);
}

.nav-item-stack {
  gap: 2px;
}

.nav-item-helper {
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.nav-item[data-nav-state="restricted"] .nav-item-helper {
  color: #fbbf24;
}

.nav-item[data-nav-state="dependency"] .nav-item-helper {
  color: #93c5fd;
}

.nav-item[data-nav-state="staged"] {
  border-style: dashed;
  border-color: rgba(248, 113, 113, 0.44);
}

@media (max-width: 980px) {
  .nav-group {
    padding: 9px;
  }

  .nav-item {
    min-height: 42px;
    padding: 10px 12px;
  }

  .workspace-shell-bar {
    padding: 16px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 6px 2px 10px;
  }

  .nav-group-label {
    letter-spacing: 0.14em;
  }

  .nav-group-meta {
    font-size: 0.65rem;
  }
}

/* Phase A: Quote Desk lower sections stay readable across desktop and narrow browser passes. */
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head > div,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head .quote-builder-header-actions,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head .detail-action-row {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head .quote-builder-header-actions,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head .detail-action-row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-builder-card-head {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-builder-card-head > div,
body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-builder-card-head .quote-builder-header-actions {
  width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-builder-card-head h3,
body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-builder-card-head h4 {
  word-break: normal !important;
  overflow-wrap: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary,
body[data-active-section="quote-generator"] #quoteBuilderControlCards.quote-builder-visibility-grid,
body[data-active-section="quote-generator"] #quotePaymentVisibilityGrid.quote-builder-visibility-grid,
body[data-active-section="quote-generator"] .quote-builder-secondary-summary,
body[data-active-section="quote-generator"] .quote-pricing-decision-strip,
body[data-active-section="quote-generator"] .quote-pricing-summary-grid,
body[data-active-section="quote-generator"] .quote-share-delivery-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-grid,
body[data-active-section="quote-generator"] .quote-builder-source-strip,
body[data-active-section="quote-generator"] .quote-payment-entry-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-template-grid .field-span-2,
body[data-active-section="quote-generator"] .quote-payment-entry-grid .field-span-2 {
  grid-column: span 2 !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-actions,
body[data-active-section="quote-generator"] .quote-payment-quick-action-row,
body[data-active-section="quote-generator"] .quote-payment-action-row,
body[data-active-section="quote-generator"] .quote-share-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)) !important;
  gap: 7px !important;
  align-items: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-source-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-payment-quick-action-row .ghost-button,
body[data-active-section="quote-generator"] .quote-payment-action-row .ghost-button,
body[data-active-section="quote-generator"] .quote-payment-action-row .primary-button,
body[data-active-section="quote-generator"] .quote-share-actions .ghost-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding-left: 9px !important;
  padding-right: 9px !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-visibility-card,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-pricing-summary-card,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-share-delivery-grid article,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-secondary-summary article,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-pricing-decision-strip article,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-master-card,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-route-card,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-summary-grid article,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-service-strip article,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .chat-linked-card {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card h4,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card h3,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card p,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card span,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card strong,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card small,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-preview-panel p,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-preview-panel span,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-preview-panel strong {
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-secondary-summary strong,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-visibility-card strong,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-pricing-decision-strip strong,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-share-delivery-grid strong {
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-secondary-details > summary,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-pricing-cost-controls > summary,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-count-tools > summary {
  max-width: 100% !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-share-meta,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-pricing-warning-list,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-pricing-line-list,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .note-list {
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell {
    border-radius: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head .quote-builder-header-actions,
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-card-head .detail-action-row {
    justify-content: stretch !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-hero-summary,
  body[data-active-section="quote-generator"] #quoteBuilderControlCards.quote-builder-visibility-grid,
  body[data-active-section="quote-generator"] #quotePaymentVisibilityGrid.quote-builder-visibility-grid,
  body[data-active-section="quote-generator"] .quote-builder-secondary-summary,
  body[data-active-section="quote-generator"] .quote-pricing-decision-strip,
  body[data-active-section="quote-generator"] .quote-pricing-summary-grid,
  body[data-active-section="quote-generator"] .quote-share-delivery-grid,
  body[data-active-section="quote-generator"] .quote-builder-template-grid,
  body[data-active-section="quote-generator"] .quote-builder-source-strip,
  body[data-active-section="quote-generator"] .quote-payment-entry-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-template-grid .field-span-2,
  body[data-active-section="quote-generator"] .quote-payment-entry-grid .field-span-2 {
    grid-column: auto !important;
  }

  body[data-active-section="quote-generator"] .quote-payment-action-row,
  body[data-active-section="quote-generator"] .quote-share-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-detail-shell,
  body[data-active-section="quote-generator"] .quote-day-master-detail-shell.has-editor-open,
  body[data-active-section="quote-generator"] .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-plan-grid,
  body[data-active-section="quote-generator"] .quote-day-route-meta,
  body[data-active-section="quote-generator"] .quote-day-service-strip,
  body[data-active-section="quote-generator"] .quote-day-cost-strip,
  body[data-active-section="quote-generator"] .quote-day-summary-grid,
  body[data-active-section="quote-generator"] .quote-day-commercial-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-builder-repeat-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-builder-repeat-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-builder-repeat-actions .primary-button {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 520px) {
  body[data-active-section="quote-generator"] .quote-payment-action-row,
  body[data-active-section="quote-generator"] .quote-share-actions,
  body[data-active-section="quote-generator"] .quote-payment-quick-action-row,
  body[data-active-section="quote-generator"] .quote-builder-source-actions,
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-builder-repeat-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.chat-floating-widget {
  position: fixed;
  right: 24px;
  bottom: 118px;
  /* Keep chat above Quote Desk sticky rails (10070-10090), but below full-screen modals. */
  z-index: 11030;
  width: min(640px, calc(100vw - 56px));
  color: #0f172a;
  font-family: inherit;
}

.chat-floating-widget.hidden {
  display: none !important;
}

.chat-floating-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  max-width: 232px;
  margin-left: auto;
  padding: 10px 14px 10px 12px;
  color: #f8fafc;
  background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(18, 140, 126, 0.34);
  cursor: pointer;
}

.chat-floating-launcher:hover,
.chat-floating-launcher:focus-visible {
  outline: none;
  transform: translateY(-1px) scale(1.01);
}

.chat-floating-launcher-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: #128c7e;
  font-weight: 800;
  background: #f8fffb;
  border-radius: 999px;
}

.chat-floating-launcher-copy {
  display: grid;
  min-width: 0;
  text-align: left;
}

.chat-floating-launcher-copy strong {
  font-size: 0.95rem;
  line-height: 1.1;
}

.chat-floating-launcher-copy small {
  max-width: 132px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-floating-badge,
.chat-floating-conversation-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 800;
  background: #128c7e;
  border-radius: 999px;
}

.chat-floating-badge {
  position: absolute;
  top: -8px;
  right: -8px;
}

.chat-floating-open .chat-floating-launcher {
  display: none;
}

.chat-floating-closed .chat-floating-panel {
  display: none;
}

.chat-floating-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: min(660px, calc(100vh - 164px));
  overflow: hidden;
  background: #efeae2;
  border: 1px solid rgba(18, 140, 126, 0.22);
  border-radius: 20px;
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
}

.chat-floating-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: #f8fafc;
  background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
}

.chat-floating-eyebrow {
  margin: 0 0 4px;
  color: rgba(220, 252, 231, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-floating-header h3 {
  max-width: 260px;
  margin: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-floating-header span {
  display: block;
  max-width: 300px;
  overflow: hidden;
  color: rgba(240, 253, 250, 0.82);
  font-size: 0.78rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-floating-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.chat-floating-icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
}

.chat-floating-icon-button:hover,
.chat-floating-icon-button:focus-visible {
  color: #075e54;
  background: #dcf8c6;
  outline: none;
}

.chat-floating-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px;
  background: #f7f5ef;
  border-bottom: 1px solid rgba(18, 140, 126, 0.1);
}

.chat-floating-filters button {
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  overflow: hidden;
  color: #52656d;
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid rgba(18, 140, 126, 0.14);
  border-radius: 999px;
  cursor: pointer;
}

.chat-floating-filters button.active,
.chat-floating-filters button:hover,
.chat-floating-filters button:focus-visible {
  color: #075e54;
  background: #dcf8c6;
  border-color: #a7e89d;
  outline: none;
}

.chat-floating-body {
  display: grid;
  grid-template-columns: minmax(232px, 268px) minmax(0, 1fr);
  min-height: 0;
}

.chat-floating-conversation-list {
  min-width: 0;
  overflow: auto;
  background: #f7f5ef;
  border-right: 1px solid rgba(18, 140, 126, 0.1);
}

.chat-floating-conversation {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  width: 100%;
  gap: 5px;
  min-height: 102px;
  padding: 12px 38px 12px 12px;
  color: #0f172a;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.chat-floating-conversation:hover,
.chat-floating-conversation:focus-visible,
.chat-floating-conversation.active {
  background: rgba(220, 248, 198, 0.92);
  outline: none;
}

.chat-floating-avatar,
.chat-floating-message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #075e54;
  font-size: 0.74rem;
  font-weight: 800;
  background: #d9fdd3;
  border-radius: 999px;
}

.chat-floating-conversation-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chat-floating-conversation-top,
.chat-floating-conversation-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.chat-floating-conversation-top strong,
.chat-floating-conversation-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-floating-conversation-top strong {
  color: #111827;
  font-size: 0.8rem;
}

.chat-floating-conversation-top small,
.chat-floating-conversation-meta {
  color: #52656d;
  font-size: 0.68rem;
}

.chat-floating-conversation-preview {
  color: #52656d;
  font-size: 0.74rem;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.chat-floating-conversation-unread {
  position: absolute;
  top: 14px;
  right: 8px;
}

.chat-floating-thread {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.chat-floating-message-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 16px;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.45) 0, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 80% 10%, rgba(223, 242, 214, 0.42) 0, rgba(223, 242, 214, 0) 18%),
    linear-gradient(180deg, rgba(239, 234, 226, 0.96) 0%, rgba(233, 229, 221, 0.98) 100%);
}

.chat-floating-message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-floating-message-row.own {
  justify-content: flex-end;
}

.chat-floating-message {
  width: fit-content;
  max-width: min(90%, 360px);
  padding: 10px 12px;
  color: #111827;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 12px 12px 12px 4px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.chat-floating-message.own {
  color: #0b3b2e;
  background: #dcf8c6;
  border-color: rgba(18, 140, 126, 0.08);
  border-radius: 12px 12px 4px 12px;
}

.chat-floating-message.system {
  max-width: 94%;
  color: #5b5342;
  background: rgba(255, 248, 220, 0.96);
  border-color: rgba(202, 138, 4, 0.12);
  border-radius: 999px;
  margin: 0 auto;
}

.chat-floating-message.pending {
  opacity: 0.75;
}

.chat-floating-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: #52656d;
  font-size: 0.66rem;
  opacity: 0.92;
}

.chat-floating-message-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-floating-message-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  letter-spacing: -0.04em;
  font-size: 0.76rem;
  font-weight: 800;
}

.chat-floating-message-status-sending,
.chat-floating-message-status-sent,
.chat-floating-message-status-delivered {
  color: #64748b;
}

.chat-floating-message-status-read {
  color: #0ea5e9;
}

.chat-floating-message p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  line-height: 1.45;
}

.chat-floating-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  background: #f0f2f5;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.chat-floating-composer textarea {
  min-height: 38px;
  max-height: 92px;
  padding: 10px 14px;
  resize: none;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(18, 140, 126, 0.14);
  border-radius: 18px;
}

.chat-floating-composer textarea:focus {
  border-color: rgba(18, 140, 126, 0.4);
  outline: none;
}

.chat-floating-composer button {
  min-width: 72px;
  min-height: 42px;
  color: #f8fafc;
  font-weight: 800;
  background: #128c7e;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.chat-floating-composer button:disabled,
.chat-floating-composer textarea:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

/* Floating chat composer tools: stable, compact, and attachment-aware. */
.chat-floating-composer {
  position: relative;
  display: block;
}

.chat-floating-composer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
}

.chat-floating-composer-tools {
  position: relative;
  display: flex;
  gap: 4px;
}

.chat-floating-composer .chat-floating-send-button {
  min-width: 72px;
}

.chat-floating-composer .chat-floating-tool-button {
  display: grid;
  place-items: center;
  min-width: 36px;
  width: 36px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  color: #52656d;
  font-size: 1.05rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid rgba(18, 140, 126, 0.14);
  border-radius: 14px;
}

.chat-floating-composer .chat-floating-tool-button:hover,
.chat-floating-composer .chat-floating-tool-button:focus-visible {
  color: #0f766e;
  background: #ffffff;
  border-color: rgba(18, 140, 126, 0.42);
  outline: none;
}

.chat-floating-emoji-picker {
  position: absolute;
  left: 0;
  bottom: 50px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 38px);
  gap: 5px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.chat-floating-emoji-picker.hidden {
  display: none;
}

.chat-floating-emoji-picker button {
  display: grid;
  place-items: center;
  min-width: 38px;
  width: 38px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  color: inherit;
  font-size: 1.08rem;
  background: transparent;
  border: 0;
  border-radius: 10px;
}

.chat-floating-emoji-picker button:hover,
.chat-floating-emoji-picker button:focus-visible {
  background: #ecfdf5;
  outline: none;
}

.chat-floating-attachment-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 7px 9px;
  color: #334155;
  font-size: 0.74rem;
  background: #ffffff;
  border: 1px solid rgba(18, 140, 126, 0.16);
  border-radius: 12px;
}

.chat-floating-attachment-preview.hidden {
  display: none;
}

.chat-floating-attachment-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-floating-attachment-preview button {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  padding: 4px 8px;
  color: #b42318;
  background: transparent;
  border: 0;
}

.chat-floating-message-attachment {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.chat-floating-message-attachment img {
  display: block;
  width: min(240px, 100%);
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.chat-floating-message-attachment a {
  color: #0f766e;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 640px) {
  .chat-floating-composer-tools {
    flex-direction: column;
  }

  .chat-floating-emoji-picker {
    bottom: 0;
    left: 43px;
  }
}

.chat-floating-status,
.chat-floating-empty {
  color: #52656d;
  font-size: 0.76rem;
}

.chat-floating-status {
  min-height: 28px;
  margin: 0;
  padding: 7px 12px;
  background: #f7f5ef;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.chat-floating-status[data-tone="error"] {
  color: #b42318;
}

.chat-floating-status[data-tone="typing"] {
  color: #128c7e;
}

.chat-floating-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}

.chat-floating-typing-dots span {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 999px;
  opacity: 0.32;
  animation: chatFloatingTypingPulse 1.1s infinite ease-in-out;
}

.chat-floating-typing-dots span:nth-child(2) {
  animation-delay: 0.14s;
}

.chat-floating-typing-dots span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes chatFloatingTypingPulse {
  0%,
  80%,
  100% {
    opacity: 0.24;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.chat-floating-empty {
  margin: auto;
  padding: 18px;
  text-align: center;
}

body.chat-floating-widget-open .assistant-widget.assistant-widget-closed,
body.chat-floating-widget-open .assistant-widget.assistant-widget-minimized,
body:has(#chatFloatingWidget.chat-floating-open) .assistant-widget.assistant-widget-closed,
body:has(#chatFloatingWidget.chat-floating-open) .assistant-widget.assistant-widget-minimized,
.assistant-widget.chat-floating-assistant-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(18px) scale(0.94) !important;
  transition: opacity 180ms ease, transform 180ms ease;
}

@media (min-width: 901px) {
  body:has(#assistantWidget.assistant-widget-open) #chatFloatingWidget.chat-floating-closed {
    right: calc(min(640px, calc(100vw - 28px)) + 48px);
  }
}

@media (max-width: 900px) {
  body:has(#assistantWidget.assistant-widget-open) #chatFloatingWidget.chat-floating-closed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.94);
  }
}

body[data-active-section="chat-workspace"] #chatFloatingWidget,
body[data-active-section="support-desk"] #chatFloatingWidget {
  display: none !important;
}

body[data-active-section="chat-workspace"] #assistantWidget,
body[data-active-section="support-desk"] #assistantWidget {
  display: none !important;
}

@media (max-width: 760px) {
  .chat-floating-widget {
    right: 12px;
    bottom: 84px;
    width: calc(100vw - 24px);
  }

  .chat-floating-panel {
    height: min(620px, calc(100vh - 108px));
  }

  .chat-floating-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(128px, 158px) minmax(0, 1fr);
  }

  .chat-floating-conversation-list {
    border-right: 0;
    border-bottom: 1px solid rgba(18, 140, 126, 0.12);
  }

  .chat-floating-conversation {
    min-height: 72px;
  }

  .chat-floating-header h3,
  .chat-floating-header span {
    max-width: 210px;
  }

  .chat-floating-message {
    max-width: min(94%, 300px);
  }
}

/* Keep the main chat workspace on a light surface even if older global theme rules load later. */
.chat-workspace .chat-composer-card,
.chat-workspace .chat-info-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 245, 239, 0.99)) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08) !important;
}

.chat-workspace .chat-conversation-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 245, 239, 0.99)) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

.chat-workspace .chat-conversation-card:hover,
.chat-workspace .chat-conversation-card.active {
  background: linear-gradient(180deg, rgba(235, 255, 246, 0.99), rgba(220, 248, 198, 0.92)) !important;
  border-color: rgba(18, 140, 126, 0.28) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12) !important;
}

.chat-workspace .chat-conversation-card p,
.chat-workspace .chat-conversation-meta,
.chat-workspace .chat-message-meta,
.chat-workspace .chat-linked-card,
.chat-workspace .chat-participant-chip,
.chat-workspace .chat-thread-panel .muted,
.chat-workspace .chat-info-card .muted {
  color: #64748b !important;
}

.chat-workspace .chat-message-list {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.48) 0, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 80% 10%, rgba(223, 242, 214, 0.38) 0, rgba(223, 242, 214, 0) 18%),
    linear-gradient(180deg, rgba(239, 234, 226, 0.88) 0%, rgba(233, 229, 221, 0.92) 100%) !important;
}

.chat-workspace .chat-message-bubble {
  background: rgba(255, 255, 255, 0.99) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

.chat-workspace .chat-message-bubble p,
.chat-workspace .chat-message-bubble strong,
.chat-workspace .chat-conversation-card strong,
.chat-workspace .chat-info-card h4,
.chat-workspace .chat-composer-card h4,
.chat-workspace .chat-thread-panel h3 {
  color: #0f172a !important;
}

.chat-workspace .chat-message-row.outbound .chat-message-bubble {
  background: linear-gradient(180deg, rgba(220, 248, 198, 0.99), rgba(198, 242, 174, 0.99)) !important;
  border-color: rgba(18, 140, 126, 0.16) !important;
}

.chat-workspace .chat-linked-card,
.chat-workspace .chat-participant-chip {
  background: rgba(248, 250, 252, 0.96) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.chat-workspace .chat-sidebar-header,
.chat-workspace .chat-thread-header {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.chat-workspace .eyebrow {
  color: #64748b;
  letter-spacing: 0.08em;
}

.chat-workspace .chat-thread-panel {
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 245, 239, 0.96));
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.chat-workspace .chat-filter-row .ghost-button,
.chat-workspace .chat-thread-actions .ghost-button,
.chat-workspace .detail-action-row .ghost-button {
  min-height: 38px;
  padding: 0 16px;
  color: #52656d;
  background: #ffffff;
  border: 1px solid rgba(18, 140, 126, 0.14);
  border-radius: 999px;
  box-shadow: none;
}

.chat-workspace .chat-filter-row .ghost-button.active,
.chat-workspace .chat-filter-row .ghost-button:hover,
.chat-workspace .chat-filter-row .ghost-button:focus-visible,
.chat-workspace .chat-thread-actions .ghost-button:hover,
.chat-workspace .chat-thread-actions .ghost-button:focus-visible,
.chat-workspace .detail-action-row .ghost-button:hover,
.chat-workspace .detail-action-row .ghost-button:focus-visible {
  color: #075e54;
  background: #dcf8c6;
  border-color: #a7e89d;
}

.chat-workspace #chatWorkspaceSummaryPill,
.chat-workspace #chatActionQueueSummaryPill {
  color: #b86b1d;
  background: rgba(255, 237, 213, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.16);
}

.chat-workspace input[type="search"],
.chat-workspace input[type="text"],
.chat-workspace select,
.chat-workspace textarea {
  min-height: 42px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(18, 140, 126, 0.14);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.chat-workspace textarea {
  min-height: 116px;
  padding: 12px 14px;
  border-radius: 22px;
  resize: vertical;
}

.chat-workspace input::placeholder,
.chat-workspace textarea::placeholder {
  color: #94a3b8;
}

.chat-workspace .field span {
  color: #334155;
  font-weight: 700;
}

.chat-workspace .form-actions {
  gap: 10px;
}

.chat-workspace .form-actions .primary-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
  box-shadow: 0 16px 32px rgba(18, 140, 126, 0.18);
}

.chat-workspace #chatCreateConversationButton,
.chat-workspace #chatSendButton {
  background: linear-gradient(135deg, #ff8a3d 0%, #ff5a36 100%);
  box-shadow: 0 16px 30px rgba(255, 106, 54, 0.22);
}

.chat-workspace .chat-message-list {
  min-height: 560px;
  padding: 14px;
}

.chat-workspace .chat-participant-list,
.chat-workspace .chat-linked-summary {
  gap: 12px;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection:has(.marketing-packages-detail-panel.is-package-builder-open) > .module-dashboard-hero,
body[data-active-section="marketing-packages"] #moduleDashboardSection:has(.marketing-packages-detail-panel.is-package-builder-open) > .module-dashboard-widget-grid,
body[data-active-section="marketing-packages"] #moduleDashboardSection:has(.marketing-packages-detail-panel.is-package-builder-open) > .module-dashboard-audit-panel {
  display: none !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection:has(.marketing-packages-detail-panel.is-package-builder-open) {
  gap: 0 !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .field input,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .field select,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .field textarea,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .marketing-itinerary-day-editor input,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .marketing-itinerary-day-editor select,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .marketing-itinerary-day-editor textarea {
  border-color: rgba(91, 113, 148, 0.42) !important;
  background: rgba(3, 10, 22, 0.82) !important;
  color: #f3f8ff !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .field input::placeholder,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .field textarea::placeholder {
  color: rgba(177, 194, 222, 0.42) !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .marketing-catalog-assist-actions {
  display: none !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .marketing-package-builder-layout {
  align-items: start !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-builder-open-shell .marketing-package-builder-sidebar {
  align-self: start !important;
}

.marketing-builder-future-tab-host {
  display: none;
}

.marketing-builder-future-tab {
  display: grid;
  gap: 18px;
  min-height: 420px;
  border: 1px solid rgba(81, 103, 137, 0.32);
  border-radius: 16px;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(59, 130, 246, 0.14), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(249, 115, 22, 0.12), transparent 30%),
    rgba(5, 15, 29, 0.88);
}

.marketing-builder-future-tab h4 {
  margin: 4px 0;
  color: #f8fbff;
  font-size: clamp(1.25rem, 1.3vw, 1.65rem);
}

.marketing-builder-future-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.marketing-builder-future-grid article {
  border: 1px solid rgba(91, 113, 148, 0.3);
  border-radius: 14px;
  padding: 14px;
  background: rgba(3, 10, 22, 0.58);
}

.marketing-builder-future-grid strong,
.marketing-builder-future-grid span {
  display: block;
}

.marketing-builder-future-grid span {
  margin-top: 6px;
  color: rgba(205, 219, 241, 0.72);
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form:not(.is-builder-step-overview):not(.is-builder-step-itinerary):not(.is-builder-step-gallery):not(.is-builder-step-policies) .marketing-package-builder-layout {
  grid-template-columns: 1fr !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form:not(.is-builder-step-overview):not(.is-builder-step-itinerary):not(.is-builder-step-gallery):not(.is-builder-step-policies) .marketing-package-builder-sidebar {
  display: none !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form:not(.is-builder-step-overview):not(.is-builder-step-itinerary):not(.is-builder-step-gallery):not(.is-builder-step-policies) .marketing-package-builder-grid {
  display: block !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form:not(.is-builder-step-overview):not(.is-builder-step-itinerary):not(.is-builder-step-gallery):not(.is-builder-step-policies) .marketing-package-builder-grid > *:not(.marketing-builder-future-tab-host) {
  display: none !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form:not(.is-builder-step-overview):not(.is-builder-step-itinerary):not(.is-builder-step-gallery):not(.is-builder-step-policies) .marketing-builder-future-tab-host {
  display: block !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form.is-builder-step-overview .marketing-builder-future-tab-host,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form.is-builder-step-itinerary .marketing-builder-future-tab-host,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form.is-builder-step-gallery .marketing-builder-future-tab-host,
body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form.is-builder-step-policies .marketing-builder-future-tab-host {
  display: none !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form.is-builder-step-itinerary .marketing-package-builder-grid > *:not(.marketing-itinerary-tab-host) {
  display: none !important;
}

body[data-active-section="marketing-packages"] #moduleDashboardSection .marketing-package-editor-form.is-builder-step-gallery .marketing-package-builder-grid > *:not(.marketing-gallery-tab-host) {
  display: none !important;
}

@media (max-width: 920px) {
  .marketing-gallery-layout {
    grid-template-columns: 1fr;
  }

  .marketing-gallery-hero {
    display: block;
  }

  .marketing-gallery-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .marketing-gallery-hero-strip,
  .marketing-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-builder-future-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .marketing-gallery-hero-strip,
  .marketing-gallery-grid,
  .marketing-gallery-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase UI parity: restore reference 3-column Quote Desk workspace shell on desktop */
@media (min-width: 1240px) {
  body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid,
  body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
    width: 100% !important;
    max-width: none !important;
  }

  body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
    margin: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr) 320px !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    align-items: start !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-main-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    padding: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    grid-column: 1 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column {
    grid-column: 2 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    grid-column: 3 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column > .quote-builder-card,
  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-card,
  body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-card,
  body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
    grid-column: auto !important;
    order: initial !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-nav-card,
  body[data-active-section="quote-generator"] .quote-builder-gallery-card,
  body[data-active-section="quote-generator"] .quote-builder-ai-left-card,
  body[data-active-section="quote-generator"] #quoteBuilderSuggestionsSection {
    display: block !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-itinerary-card {
    min-height: 620px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-panel {
    position: sticky !important;
    top: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-payment-card,
  body[data-active-section="quote-generator"] .quote-builder-share-card {
    grid-column: 1 / -1 !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-payment-card {
    order: 20 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-share-card {
    order: 21 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-card {
    grid-column: 1 / -1 !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar {
    grid-template-columns: minmax(320px, 1fr) auto !important;
    grid-template-areas:
      "title actions"
      "routes routes" !important;
    align-items: start !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    max-width: 760px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
    flex: 0 0 auto !important;
    min-width: 126px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-record-title strong {
    font-size: 1.35rem !important;
    letter-spacing: 0 !important;
    color: #0f172a !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-hero-card,
  body[data-active-section="quote-generator"] .quote-builder-control-card {
    grid-column: 1 / -1 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-record-chip,
  body[data-active-section="quote-generator"] #quoteBuilderSelectionLabel {
    border-radius: 999px !important;
    border: 1px solid rgba(37, 99, 235, 0.24) !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 800 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav a {
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    min-height: 42px !important;
    font-weight: 700 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav a:hover {
    border-color: rgba(37, 99, 235, 0.34) !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-itinerary-card {
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 14px 30px rgba(30, 41, 59, 0.08) !important;
    border-radius: 16px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-panel {
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button {
    background: #0b2a6f !important;
    border-color: #0b2a6f !important;
    color: #ffffff !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-template-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-template-grid .field-span-2,
  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-template-grid .field {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column input,
  body[data-active-section="quote-generator"] .quote-builder-left-column select,
  body[data-active-section="quote-generator"] .quote-builder-left-column textarea {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav {
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav a[aria-current="true"] {
    border-color: rgba(37, 99, 235, 0.42) !important;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
    color: #1e3a8a !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-day-master-card.is-editor-open {
    border: 1px solid rgba(148, 163, 184, 0.26) !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
    padding: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-builder-repeat-title {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-builder-repeat-top .muted {
    color: #475569 !important;
    font-weight: 600 !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-service-strip article,
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-summary-grid article {
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-visual-builder,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-selected .quote-day-visual-builder,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-collapsed-ready .quote-day-visual-builder,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-editor-open .quote-day-visual-builder {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-selected .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-collapsed-ready .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-editor-open .quote-day-route-card {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 76px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-service-strip,
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-summary-grid,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-selected .quote-day-summary-grid,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-editor-open .quote-day-summary-grid {
    display: grid !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-summary-grid,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-selected .quote-day-summary-grid,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-collapsed-ready .quote-day-summary-grid,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-editor-open .quote-day-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-service-strip article,
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-summary-grid article {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 72px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-badge {
    border: 1px solid rgba(37, 99, 235, 0.26) !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 800 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-panel .panel-header h3 {
    font-size: 1.05rem !important;
    color: #0f172a !important;
    letter-spacing: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-summary {
    display: grid !important;
    gap: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-copy {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    padding: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-copy h4 {
    font-size: 1.02rem !important;
    margin-bottom: 6px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-copy p {
    color: #475569 !important;
    font-size: 0.83rem !important;
    margin: 0 0 4px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-panel .quote-builder-visibility-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-metric {
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    padding: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-metric span {
    font-size: 0.73rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    letter-spacing: 0.04em !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-metric strong {
    font-size: 0.95rem !important;
    color: #0f172a !important;
    margin-top: 2px !important;
  }
}

/* Phase 10.6: strict reference structure (hide legacy desk blocks inside quote-generator). */
body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-dashboard-hero,
body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-desk-secondary-tools {
  display: none !important;
}

body[data-active-section="quote-generator"] #workspaceShellBar,
body[data-active-section="quote-generator"] #crmWorkspaceDashboardSection,
body[data-active-section="quote-generator"] #aiWorkspaceSection,
body[data-active-section="quote-generator"] #defaultContent {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid {
  margin-top: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell {
  background: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
}

@media (min-width: 1240px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 236px minmax(0, 1fr) 340px !important;
    gap: 16px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-gallery-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-ai-left-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-template-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-trip-card {
    display: none !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-left-nav-card {
    display: block !important;
    position: sticky !important;
    top: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column > #quoteBuilderSuggestionsSection {
    display: none !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column > #quoteBuilderCommercialSection {
    margin-top: 4px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-payment-card,
  body[data-active-section="quote-generator"] .quote-builder-share-card {
    grid-column: 2 / 4 !important;
  }
}

/* Phase 10.5: reference lock pass (final cascade override). */
@media (min-width: 1240px) {
  body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid {
    max-width: 1480px !important;
    margin: 0 auto !important;
    padding: 0 8px !important;
  }

  body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
    max-width: 1460px !important;
    margin: 0 auto !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 220px minmax(0, 1fr) 320px !important;
    gap: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    gap: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column {
    gap: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    gap: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar {
    grid-template-columns: minmax(280px, 1fr) auto !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
    min-height: 34px !important;
    min-width: 112px !important;
    font-size: 0.8rem !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel {
    border-radius: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card-head h4,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel .panel-header h3 {
    font-size: 0.98rem !important;
    font-weight: 700 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card-head .muted,
  body[data-active-section="quote-generator"] .quote-builder-card p,
  body[data-active-section="quote-generator"] .quote-builder-card span,
  body[data-active-section="quote-generator"] .quote-builder-card small {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav a {
    min-height: 36px !important;
    padding: 8px 10px !important;
    font-size: 0.74rem !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderControlCards.quote-builder-visibility-grid,
  body[data-active-section="quote-generator"] #quotePaymentVisibilityGrid.quote-builder-visibility-grid,
  body[data-active-section="quote-generator"] .quote-builder-secondary-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-visibility-card {
    min-height: 74px !important;
    padding: 8px 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-visibility-card strong {
    font-size: 0.84rem !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-payment-card,
  body[data-active-section="quote-generator"] .quote-builder-share-card {
    margin-top: 8px !important;
  }
}

/* Phase 10.4b hotfix: restore readable desktop density for Quote Builder */
@media (min-width: 1240px) {
  body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
    max-width: 1580px !important;
    margin: 0 auto !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 250px minmax(0, 1fr) 320px !important;
    gap: 16px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card-head h4,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel .panel-header h3 {
    font-size: 1.08rem !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card-head .muted,
  body[data-active-section="quote-generator"] .quote-builder-preview-copy p,
  body[data-active-section="quote-generator"] .quote-builder-visibility-card p {
    font-size: 0.88rem !important;
    line-height: 1.45 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-visibility-card strong,
  body[data-active-section="quote-generator"] .quote-builder-preview-metric strong {
    font-size: 1rem !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-visibility-card span,
  body[data-active-section="quote-generator"] .quote-builder-preview-metric span {
    font-size: 0.78rem !important;
  }

  body[data-active-section="quote-generator"] #quotePaymentVisibilityGrid.quote-builder-visibility-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-payment-action-row .ghost-button,
  body[data-active-section="quote-generator"] .quote-payment-action-row .primary-button,
  body[data-active-section="quote-generator"] .quote-payment-quick-action-row .ghost-button,
  body[data-active-section="quote-generator"] .quote-payment-quick-action-row .primary-button {
    min-height: 38px !important;
    font-size: 0.86rem !important;
  }
}


/* Phase 10.3: wide-screen density polish for the approved Quote Desk shell. */
@media (min-width: 1240px) {
  body[data-active-section="quote-generator"] .quote-builder-topbar,
  body[data-active-section="quote-generator"] .quote-builder-route-links,
  body[data-active-section="quote-generator"] .quote-builder-smart-buttons,
  body[data-active-section="quote-generator"] .quote-builder-secondary-actions {
    width: 100% !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar {
    grid-template-columns: minmax(320px, 1fr) minmax(720px, auto) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions {
    max-width: none !important;
    width: auto !important;
    justify-self: end !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
    min-width: 118px !important;
    min-height: 36px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link[href="#quoteBuilderPaymentSection"] {
    min-width: 178px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-smart-buttons {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-secondary-actions {
    grid-template-columns: minmax(360px, 1fr) auto !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-itinerary-card {
    min-height: 460px !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-builder-card-head {
    align-items: center !important;
  }

  body[data-active-section="quote-generator"] .quote-day-count-tools[open] {
    max-width: 300px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-count-tools[open] p {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }

  body[data-active-section="quote-generator"] .quote-day-count-tools[open] #quoteSyncDayPlanButton {
    min-height: 34px !important;
    padding: 6px 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-navigator {
    max-width: 190px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-selected .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-collapsed-ready .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-master-card.is-editor-open .quote-day-route-card {
    min-height: 64px !important;
    padding: 9px 11px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-service-strip article,
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-summary-grid article {
    min-height: 60px !important;
    padding: 9px 11px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-route-meta span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-builder-card-head,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel .panel-header {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-pricing-decision-strip,
  body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-pricing-summary-grid {
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-pricing-decision-strip article,
  body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-pricing-summary-card {
    min-height: 0 !important;
    padding: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-pricing-card .quote-pricing-decision-strip article p,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel p {
    line-height: 1.35 !important;
  }
}

/* Phase 10.7 final reference override: keep this at the end of the file. */
body[data-active-section="quote-generator"] #workspaceShellBar,
body[data-active-section="quote-generator"] #crmWorkspaceDashboardSection,
body[data-active-section="quote-generator"] #aiWorkspaceSection,
body[data-active-section="quote-generator"] #defaultContent,
body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-dashboard-hero,
body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-desk-secondary-tools {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection {
  padding: 0 !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection > .quote-builder-grid .quote-builder-reference-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

@media (min-width: 1240px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    display: grid !important;
    grid-template-columns: 240px minmax(680px, 1fr) 340px !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: start !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-main-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    min-width: 0 !important;
    position: relative !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    grid-column: 1 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column {
    grid-column: 2 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    grid-column: 3 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-gallery-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-ai-left-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-template-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-trip-card,
  body[data-active-section="quote-generator"] .quote-builder-main-column > #quoteBuilderSuggestionsSection {
    display: none !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-left-nav-card {
    display: block !important;
    position: sticky !important;
    top: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-payment-card,
  body[data-active-section="quote-generator"] .quote-builder-share-card {
    grid-column: 2 / 4 !important;
    width: 100% !important;
    max-width: none !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-card,
  body[data-active-section="quote-generator"] .quote-builder-hero-card,
  body[data-active-section="quote-generator"] .quote-builder-control-card {
    grid-column: 1 / -1 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel {
    border-radius: 8px !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card-head h4,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel h3 {
    font-size: 1rem !important;
    letter-spacing: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-card p,
  body[data-active-section="quote-generator"] .quote-builder-card span,
  body[data-active-section="quote-generator"] .quote-builder-card small,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel p,
  body[data-active-section="quote-generator"] .quote-builder-preview-panel span {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav a {
    min-height: 42px !important;
    padding: 9px 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-preview-panel {
    position: sticky !important;
    top: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-hero-card {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-control-card {
    grid-column: 2 !important;
    grid-row: 3 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    grid-row: 2 / span 4 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column {
    grid-row: 3 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    grid-row: 2 / span 4 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
    order: 1 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
    order: 2 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-hero-card details[open],
  body[data-active-section="quote-generator"] .quote-builder-hero-card .quote-builder-secondary-details[open] {
    max-height: 52px !important;
    overflow: hidden !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-hero-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-control-card {
    display: none !important;
  }
}

/* Phase 10.8: align Quote Desk surface with approved SO-gate reference. */
body[data-active-section="quote-generator"] .quote-builder-reference-shell > .panel-header {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-card > .muted,
body[data-active-section="quote-generator"] .quote-builder-route-links,
body[data-active-section="quote-generator"] .quote-builder-smart-buttons,
body[data-active-section="quote-generator"] #quoteGenerateShareTopButton {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteSubmitDraftTopLink {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[data-active-section="quote-generator"] #quoteSubmitDraftTopLink[aria-disabled="true"],
body[data-active-section="quote-generator"] #quoteSubmitDraftTopLink.is-disabled-action {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-card {
  border-radius: 0 0 14px 14px !important;
  border-width: 0 0 1px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  width: 100% !important;
  padding: 4px 6px !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title strong {
  color: #071334 !important;
  font-size: 1.72rem !important;
  line-height: 1.05 !important;
  letter-spacing: -0.04em !important;
}

body[data-active-section="quote-generator"] .quote-builder-breadcrumb {
  color: #33415f !important;
  font-weight: 800 !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-chip .pill {
  border-color: rgba(37, 99, 235, 0.28) !important;
  color: #1d4ed8 !important;
  background: #eef4ff !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button {
  min-height: 44px !important;
  padding: 0 22px !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button {
  background: #061643 !important;
  box-shadow: 0 12px 22px rgba(6, 22, 67, 0.25) !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .is-disabled-action {
  color: #98a2b3 !important;
  background: #f5f7fb !important;
  pointer-events: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-card-head .eyebrow,
body[data-active-section="quote-generator"] .quote-builder-preview-panel .eyebrow {
  color: #64748b !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  border-color: rgba(37, 99, 235, 0.12) !important;
  background: #ffffff !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 86px !important;
  padding: 15px !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article strong {
  color: #172554 !important;
  font-size: 0.9rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card details {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav {
  counter-reset: quote-workflow-step !important;
  display: grid !important;
  gap: 13px !important;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav a {
  counter-increment: quote-workflow-step !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: 50px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav a::before {
  content: counter(quote-workflow-step);
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 999px;
  color: #334155;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav a:nth-child(-n+4)::before {
  border-color: #16a34a;
  color: #fff;
  background: #16a34a;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav a:nth-child(5)::before,
body[data-active-section="quote-generator"] .quote-builder-section-nav a:nth-child(6)::before {
  border-color: #f97316;
  color: #f97316;
  background: #fff7ed;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav a#quoteWorkflowGuestStep.is-complete::before {
  border-color: #16a34a !important;
  color: #fff !important;
  background: #16a34a !important;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav a#quoteWorkflowGuestStep.is-complete span {
  color: #15803d !important;
  font-weight: 800 !important;
}

body[data-active-section="quote-generator"] .quote-builder-section-nav a span {
  grid-column: 2 !important;
  color: #64748b !important;
  font-size: 0.72rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  overflow: hidden !important;
  background: #fff !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-summary::before {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-hero {
  display: block;
  min-height: 130px;
  margin-bottom: 2px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(5, 18, 50, 0.08), rgba(249, 115, 22, 0.18)),
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.95) 0 3%, transparent 4%),
    linear-gradient(155deg, #12345f 0%, #4f8fbd 48%, #f6b56e 100%);
  box-shadow: inset 0 -32px 44px rgba(6, 22, 67, 0.26);
  overflow: hidden;
}

body[data-active-section="quote-generator"] .quote-builder-preview-hero img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}

body[data-active-section="quote-generator"] .quote-builder-preview-copy h4 {
  color: #0f172a !important;
  font-size: 1.15rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-metric {
  min-height: 66px !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .quote-right-rail-section {
  display: grid;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 13px;
  background: #ffffff;
}

body[data-active-section="quote-generator"] .quote-right-rail-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

body[data-active-section="quote-generator"] .quote-right-rail-head h4 {
  margin: 0;
  color: #172554;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-right-rail-head span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #15803d;
  background: #dcfce7;
  font-size: 0.68rem !important;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-right-rail-head .ghost-button,
body[data-active-section="quote-generator"] .quote-gate-status-row .ghost-button {
  min-height: 28px !important;
  padding: 0 9px !important;
  border-radius: 8px !important;
  font-size: 0.7rem !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-list {
  display: grid;
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-gate-status-row {
  display: grid;
  grid-template-columns: minmax(74px, 0.9fr) minmax(92px, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body[data-active-section="quote-generator"] .quote-gate-status-row:last-child {
  border-bottom: 0;
}

body[data-active-section="quote-generator"] .quote-gate-status-row span {
  color: #475569;
  font-weight: 800;
}

body[data-active-section="quote-generator"] .quote-gate-status-row strong {
  color: #0f172a;
  font-size: 0.78rem;
}

body[data-active-section="quote-generator"] .quote-gate-status-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: #64748b;
}

body[data-active-section="quote-generator"] .quote-gate-status-row.is-success strong {
  color: #15803d;
}

body[data-active-section="quote-generator"] .quote-gate-status-row.is-warning strong {
  color: #f97316;
}

body[data-active-section="quote-generator"] .quote-ask-ai-button {
  min-height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 9px;
  color: #1d4ed8;
  background: #f8fbff;
  font-weight: 900;
  cursor: pointer;
}

body[data-active-section="quote-generator"] .quote-pipeline-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

body[data-active-section="quote-generator"] .quote-pipeline-step {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: #64748b;
  text-align: center;
}

body[data-active-section="quote-generator"] .quote-pipeline-step b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 0.68rem;
}

body[data-active-section="quote-generator"] .quote-pipeline-step.is-success b {
  border-color: #16a34a;
  color: #ffffff;
  background: #16a34a;
}

body[data-active-section="quote-generator"] .quote-pipeline-step.is-warning b,
body[data-active-section="quote-generator"] .quote-pipeline-step.is-active b {
  border-color: #f97316;
  color: #ffffff;
  background: #f97316;
}

body[data-active-section="quote-generator"] .quote-pipeline-step.is-locked b {
  color: #94a3b8;
}

body[data-active-section="quote-generator"] .quote-pipeline-step span {
  font-size: 0.66rem !important;
  font-weight: 800;
  line-height: 1.2 !important;
}

body[data-active-section="quote-generator"] .quote-vendor-review-grid {
  display: grid;
  grid-template-columns: minmax(84px, 0.8fr) minmax(0, 1fr);
  gap: 8px 10px;
}

body[data-active-section="quote-generator"] .quote-vendor-review-grid span {
  color: #64748b;
  font-weight: 800;
}

body[data-active-section="quote-generator"] .quote-vendor-review-grid strong {
  color: #0f172a;
  font-size: 0.78rem;
}

body[data-active-section="quote-generator"] .quote-ops-vendor-card > p {
  margin: 0;
  color: #64748b;
}

body[data-active-section="quote-generator"] .quote-finance-actions {
  display: grid;
  gap: 9px;
}

body[data-active-section="quote-generator"] .quote-finance-actions article {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  background: #f8fafc;
}

body[data-active-section="quote-generator"] .quote-finance-actions span {
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-finance-actions strong {
  color: #172554;
}

body[data-active-section="quote-generator"] .quote-finance-actions div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body[data-active-section="quote-generator"] .quote-builder-itinerary-card {
  background: #ffffff !important;
}

body[data-active-section="quote-generator"] .quote-builder-itinerary-card .quote-builder-card-head {
  align-items: center !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
  padding-bottom: 12px !important;
}

body[data-active-section="quote-generator"] .quote-day-count-tools {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-reference-itinerary-list {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 4px 0 0 0;
}

body[data-active-section="quote-generator"] .quote-reference-itinerary-list::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 42px;
  left: 32px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(#bfdbfe, #dbeafe);
}

body[data-active-section="quote-generator"] .quote-reference-day-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 68px 150px minmax(0, 1fr) 128px;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 12px 14px 12px 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

body[data-active-section="quote-generator"] .quote-reference-day-pin {
  display: grid;
  width: 56px;
  height: 56px;
  margin-left: 4px;
  place-items: center;
  border: 2px solid #bfdbfe;
  border-radius: 999px;
  color: #172554;
  background: #f8fbff;
}

body[data-active-section="quote-generator"] .quote-reference-day-pin span {
  font-size: 0.6rem !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-reference-day-pin strong {
  margin-top: -8px;
  font-size: 1.2rem;
}

body[data-active-section="quote-generator"] .quote-reference-day-image {
  min-height: 86px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(5, 18, 50, 0.06), rgba(249, 115, 22, 0.18)),
    linear-gradient(155deg, #1e3a5f 0%, #3787b8 48%, #f4a261 100%);
}

body[data-active-section="quote-generator"] .quote-reference-day-image img {
  display: block;
  width: 100%;
  height: 86px;
  object-fit: cover;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body[data-active-section="quote-generator"] .quote-reference-day-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

body[data-active-section="quote-generator"] .quote-reference-day-title-row strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-reference-day-title-row span,
body[data-active-section="quote-generator"] .quote-reference-day-chips em {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem !important;
  font-style: normal;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-reference-day-title-row span {
  color: #c2410c;
  background: #fff7ed;
}

body[data-active-section="quote-generator"] .quote-reference-day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body[data-active-section="quote-generator"] .quote-reference-day-chips em:nth-child(1) {
  color: #7c3aed;
  background: #f3e8ff;
}

body[data-active-section="quote-generator"] .quote-reference-day-chips em:nth-child(2) {
  color: #15803d;
  background: #dcfce7;
}

body[data-active-section="quote-generator"] .quote-reference-day-chips em:nth-child(3) {
  color: #1d4ed8;
  background: #dbeafe;
}

body[data-active-section="quote-generator"] .quote-reference-day-chips em:nth-child(4) {
  color: #c2410c;
  background: #ffedd5;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy p {
  margin: 0;
  overflow: hidden;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy i {
  color: #cbd5e1;
  font-style: normal;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions {
  display: grid;
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions .ghost-button {
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
}

body[data-active-section="quote-generator"] .quote-reference-add-day {
  min-height: 42px;
  border: 1px dashed rgba(37, 99, 235, 0.45);
  border-radius: 12px;
  color: #1d4ed8;
  background: #f8fbff;
  font-weight: 900;
  cursor: pointer;
}

body[data-active-section="quote-generator"] .quote-day-editor-drawer {
  margin-top: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

body[data-active-section="quote-generator"] .quote-day-image-intake {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 247, 237, 0.86));
}

body[data-active-section="quote-generator"] .quote-day-image-intake-head,
body[data-active-section="quote-generator"] .quote-day-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

body[data-active-section="quote-generator"] .quote-day-image-intake-head strong {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.76rem;
}

body[data-active-section="quote-generator"] .quote-day-image-intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr);
  gap: 10px;
}

body[data-active-section="quote-generator"] .quote-day-ai-optimize-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  color: #1d4ed8;
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-day-gallery-browser {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px dashed rgba(37, 99, 235, 0.2);
}

body[data-active-section="quote-generator"] .quote-day-gallery-browser-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-day-gallery-browser-head span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-day-gallery-browser-head strong {
  color: #172554;
  font-size: 0.84rem;
}

body[data-active-section="quote-generator"] .quote-day-inline-selector-actions strong {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.45;
}

body[data-active-section="quote-generator"] .quote-day-location-search .search-select-control {
  min-height: 44px;
}

body[data-active-section="quote-generator"] .quote-day-location-search .search-select-menu {
  max-height: 260px;
  overflow: auto;
}

body[data-active-section="quote-generator"] .quote-day-option-empty-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

body[data-active-section="quote-generator"] .quote-day-option-empty-actions small {
  color: #c2410c;
  font-weight: 800;
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-list {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 16px;
  background: rgba(255, 247, 237, 0.78);
}

body[data-active-section="quote-generator"] .quote-draft-service-card-actions,
body[data-active-section="quote-generator"] .quote-draft-service-ops-controls {
  display: grid;
  gap: 8px;
  min-width: min(360px, 100%);
}

body[data-active-section="quote-generator"] .quote-draft-service-ops-controls label {
  display: grid;
  gap: 5px;
}

body[data-active-section="quote-generator"] .quote-draft-service-ops-controls label span {
  margin: 0;
  color: #475569;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

body[data-active-section="quote-generator"] .quote-draft-service-ops-controls select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-weight: 750;
  padding: 8px 10px;
}

body[data-active-section="quote-generator"] .quote-draft-service-ops-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-draft-service-ops-buttons .danger {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.8);
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card[data-tone="success"] {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(240, 253, 244, 0.82);
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card[data-tone="danger"] {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(254, 242, 242, 0.82);
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card span {
  display: block;
  margin-bottom: 3px;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card[data-tone="success"] span {
  color: #15803d;
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card[data-tone="danger"] span {
  color: #dc2626;
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card strong {
  display: block;
  color: var(--quote-ink, #0f172a);
  font-size: 0.95rem;
}

body[data-active-section="quote-generator"] .quote-draft-service-approval-card p {
  margin: 4px 0 0;
  color: var(--quote-muted, #64748b);
  font-size: 0.82rem;
}

body[data-active-section="quote-generator"] .quote-draft-ops-queue-card .quote-draft-ops-summary {
  margin: 2px 0 8px;
  color: var(--quote-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 700;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-draft-ops-queue-card .quote-draft-service-approval-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-draft-ops-queue-card .quote-draft-service-approval-card {
  flex-direction: column;
  align-items: stretch;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-draft-ops-queue-card .quote-draft-service-card-actions,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-draft-ops-queue-card .quote-draft-service-ops-controls {
  min-width: 0;
}

body[data-active-section="quote-generator"] .quote-draft-ops-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

body[data-active-section="quote-generator"] .quote-draft-ops-filter-chips .ghost-button {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
}

body[data-active-section="quote-generator"] .quote-draft-ops-filter-chips .ghost-button.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.38);
  color: #1d4ed8;
  font-weight: 800;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 34%),
    #ffffff;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-head strong {
  display: block;
  color: #172554;
  font-size: 1rem;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-head p {
  margin: 5px 0 0;
  color: #64748b;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-head > span {
  flex: 0 0 auto;
  max-width: 160px;
  padding: 6px 9px;
  overflow: hidden;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 0.7rem !important;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  color: #172554;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-item span {
  display: grid;
  min-height: 74px;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  color: #94a3b8;
  background:
    linear-gradient(135deg, rgba(5, 18, 50, 0.08), rgba(249, 115, 22, 0.16)),
    linear-gradient(155deg, #1e3a5f 0%, #3787b8 48%, #f4a261 100%);
  font-weight: 900;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-item img {
  display: block;
  width: 100%;
  height: 74px;
  object-fit: cover;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-item strong,
body[data-active-section="quote-generator"] .quote-gallery-sync-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-item strong {
  font-size: 0.8rem;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-item small {
  color: #64748b;
  font-size: 0.68rem;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-empty {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed rgba(37, 99, 235, 0.24);
  border-radius: 12px;
  color: #64748b;
  background: #f8fbff;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-status {
  margin: 0;
  color: #64748b;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-status[data-tone="success"] {
  color: #15803d;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-status[data-tone="warning"] {
  color: #c2410c;
}

body[data-active-section="quote-generator"] .quote-gallery-sync-status[data-tone="error"] {
  color: #dc2626;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-day-image-intake-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-section="quote-generator"] .quote-gallery-sync-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-section="quote-generator"] .quote-gallery-sync-head {
    display: grid;
  }
}

@media (max-width: 980px) {
  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: 58px 110px minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] .quote-reference-day-actions {
    grid-column: 2 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.quote-so-readiness-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.quote-so-readiness-modal[aria-hidden="true"] {
  display: none !important;
  pointer-events: none !important;
}

.quote-so-readiness-modal.is-open {
  display: flex;
}

.quote-so-readiness-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(3px);
}

.quote-so-readiness-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(560px, 96vw);
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.26);
}

.quote-so-readiness-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  cursor: pointer;
  pointer-events: auto;
}

.quote-so-readiness-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.quote-so-readiness-title > span,
.quote-so-readiness-ai b {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #f97316;
  font-weight: 900;
}

.quote-so-readiness-title h3,
.quote-so-readiness-title p {
  margin: 0;
}

.quote-so-readiness-title h3 {
  color: #0f172a;
  font-size: 1.35rem;
}

.quote-so-readiness-title p:last-child {
  margin-top: 6px;
  color: #475569;
}

.quote-so-readiness-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quote-so-readiness-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.quote-so-readiness-list b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #f97316;
  font-size: 0.78rem;
}

.quote-so-readiness-list strong,
.quote-so-readiness-list small {
  display: block;
}

.quote-so-readiness-list strong {
  color: #172554;
}

.quote-so-readiness-list small {
  margin-top: 3px;
  color: #64748b;
  line-height: 1.4;
}

.quote-so-readiness-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-so-readiness-ai {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
}

.quote-so-readiness-ai b {
  background: #2563eb;
}

.quote-so-readiness-ai p {
  margin: 0;
  color: #334155;
  line-height: 1.5;
}

/* Phase 10.11/10.12 final cascade lock: reference screenshot parity for Quote Desk shell. */
body[data-active-section="quote-generator"] {
  --quote-sidebar-width: 260px;
  --quote-content-max: 1760px;
  --quote-header-height: 116px;
}

body[data-active-section="quote-generator"] .app-shell {
  grid-template-columns: var(--quote-sidebar-width) minmax(0, min(calc(100vw - var(--quote-sidebar-width)), var(--quote-content-max))) !important;
  justify-content: start !important;
  background:
    linear-gradient(90deg, #061632 0 var(--quote-sidebar-width), transparent var(--quote-sidebar-width)),
    #f4f7fb !important;
}

body[data-active-section="quote-generator"] .sidebar {
  width: var(--quote-sidebar-width) !important;
}

body[data-active-section="quote-generator"] .dashboard-main {
  width: min(calc(100vw - var(--quote-sidebar-width)), var(--quote-content-max)) !important;
  max-width: var(--quote-content-max) !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection,
body[data-active-section="quote-generator"] .quote-builder-reference-grid,
body[data-active-section="quote-generator"] .quote-builder-reference-shell {
  width: 100% !important;
  max-width: var(--quote-content-max) !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) 360px !important;
  grid-auto-rows: min-content !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: var(--quote-content-max) !important;
  min-height: 100vh !important;
  padding: 0 24px 28px !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions {
  grid-column: 1 / -1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  margin: 0 !important;
  padding: 24px 24px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(100, 116, 139, 0.16) !important;
  border-radius: 0 0 18px 18px !important;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08) !important;
}

body[data-active-section="quote-generator"] .quote-builder-column {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  display: block !important;
  position: sticky !important;
  top: calc(var(--quote-header-height, 116px) + 16px) !important;
  grid-column: 1 !important;
  grid-row: 2 / span 3 !important;
  width: 220px !important;
  max-height: calc(100vh - var(--quote-header-height, 116px) - 32px) !important;
  overflow: auto !important;
  padding-right: 0 !important;
  align-self: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column {
  display: grid !important;
  grid-column: 2 !important;
  grid-row: 3 !important;
  gap: 16px !important;
  align-self: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  position: sticky !important;
  top: calc(var(--quote-header-height, 116px) + 16px) !important;
  grid-column: 3 !important;
  grid-row: 2 / span 4 !important;
  width: 360px !important;
  max-height: calc(100vh - var(--quote-header-height, 116px) - 32px) !important;
  overflow: auto !important;
  padding-right: 4px !important;
  align-self: start !important;
  scrollbar-gutter: stable !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  order: 1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  margin: 0 0 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  order: 2 !important;
  position: static !important;
  margin: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column .quote-builder-left-nav-card,
body[data-active-section="quote-generator"] .quote-builder-itinerary-card,
body[data-active-section="quote-generator"] .quote-builder-commercial-card,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  border-radius: 16px !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column .quote-builder-itinerary-card {
  min-height: 0 !important;
}

body[data-active-section="quote-generator"] #quoteBuilderSuggestionsSection,
body[data-active-section="quote-generator"] #quoteBuilderPaymentSection,
body[data-active-section="quote-generator"] #quoteBuilderShareSection,
body[data-active-section="quote-generator"] #quoteGeneratorStatus,
body[data-active-section="quote-generator"] #quoteContextSuggestion,
body[data-active-section="quote-generator"] #quoteAutomationReminders {
  display: none !important;
}

body[data-active-section="quote-generator"].quote-builder-show-payment-workflow #quoteBuilderPaymentSection,
body[data-active-section="quote-generator"] #quoteBuilderPaymentSection.quote-builder-action-revealed {
  display: block !important;
}

body[data-active-section="quote-generator"].quote-builder-show-share-workflow #quoteBuilderShareSection,
body[data-active-section="quote-generator"] #quoteBuilderShareSection.quote-builder-action-revealed {
  display: block !important;
}

body[data-active-section="quote-generator"].quote-builder-show-payment-workflow #quoteGeneratorStatus,
body[data-active-section="quote-generator"].quote-builder-show-trip-setup #quoteGeneratorStatus,
body[data-active-section="quote-generator"].quote-builder-show-share-workflow #quoteGeneratorStatus {
  display: block !important;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-main-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column,
  body[data-active-section="quote-generator"] .quote-builder-hero-card {
    position: static !important;
    grid-column: 1 !important;
    grid-row: auto !important;
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (min-width: 2200px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 240px minmax(0, 1020px) 380px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 240px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 380px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
}

/* Phase 10.13 polish: bring the live shell closer to the approved reference visual. */
body[data-active-section="quote-generator"] .sidebar {
  padding: 28px 18px !important;
}

body[data-active-section="quote-generator"] .brand-logo {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

body[data-active-section="quote-generator"] .brand-block h1 {
  color: #ffffff !important;
  font-size: 1.52rem !important;
  letter-spacing: -0.04em !important;
}

body[data-active-section="quote-generator"] .nav-group {
  padding: 8px 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-active-section="quote-generator"] .nav-item[data-section="contacts"],
body[data-active-section="quote-generator"] .nav-item[data-section="documents"],
body[data-active-section="quote-generator"] .nav-item[data-section="external-confirmations"],
body[data-active-section="quote-generator"] .nav-item[data-section="hr-panel"],
body[data-active-section="quote-generator"] .nav-item[data-section="user-management"] {
  display: none !important;
}

body[data-active-section="quote-generator"] .nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 48px !important;
  margin: 1px 0 !important;
  color: rgba(236, 244, 255, 0.78) !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
}

body[data-active-section="quote-generator"] .nav-item::before {
  content: "";
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 7px;
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.9;
}

body[data-active-section="quote-generator"] .nav-item[data-section="lead-pipeline"]::before { content: "L"; }
body[data-active-section="quote-generator"] .nav-item[data-section="quote-generator"]::before { content: "Q"; }
body[data-active-section="quote-generator"] .nav-item[data-section="product-gallery"]::before { content: "P"; }
body[data-active-section="quote-generator"] .nav-item[data-section="sales-orders"]::before { content: "S"; }
body[data-active-section="quote-generator"] .nav-item[data-section="purchasing-dashboard"]::before { content: "PO"; font-size: 0.58rem; }
body[data-active-section="quote-generator"] .nav-item[data-section="accounting-finance"]::before { content: "₹"; }
body[data-active-section="quote-generator"] .nav-item[data-section="reports"]::before { content: "R"; }

body[data-active-section="quote-generator"] .nav-item:hover,
body[data-active-section="quote-generator"] .nav-item.active,
body[data-active-section="quote-generator"] .nav-item[data-section="quote-generator"] {
  box-shadow: 0 16px 34px rgba(29, 88, 240, 0.3) !important;
}

body[data-active-section="quote-generator"] .sidebar-card {
  border: 1px solid rgba(209, 224, 255, 0.32) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18) !important;
}

body[data-active-section="quote-generator"] .sidebar-card h2 {
  color: #ffffff !important;
  font-size: 1.05rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions {
  min-height: 98px !important;
  padding-top: 18px !important;
  padding-bottom: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-breadcrumb {
  margin-bottom: 6px !important;
  font-size: 0.78rem !important;
  color: #1f3157 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar > div:first-child > .muted {
  display: inline-flex !important;
  max-width: 760px !important;
  overflow: hidden !important;
  color: #64748b !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] #quoteBuilderSelectionLabel {
  padding: 9px 15px !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions > * {
  min-width: 122px !important;
  min-height: 44px !important;
  padding-inline: 18px !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-generator"] .quote-builder-card-head h4,
body[data-active-section="quote-generator"] .quote-builder-preview-panel h3,
body[data-active-section="quote-generator"] .quote-right-rail-head h4 {
  color: #101a33 !important;
  letter-spacing: -0.02em !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card,
body[data-active-section="quote-generator"] .quote-builder-itinerary-card,
body[data-active-section="quote-generator"] .quote-builder-commercial-card,
body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  background: rgba(255, 255, 255, 0.96) !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article strong {
  display: -webkit-box !important;
  min-height: 2.5em !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-card {
  grid-template-columns: 70px 160px minmax(0, 1fr) 130px !important;
  gap: 16px !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-image {
  height: 90px !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-title strong,
body[data-active-section="quote-generator"] .quote-reference-day-copy strong {
  font-size: 1.05rem !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions {
  display: grid !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  padding: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-summary {
  display: grid !important;
  gap: 12px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-hero {
  min-height: 132px !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-hero img {
  height: 132px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-copy {
  gap: 5px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-copy h4 {
  font-size: 1.18rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-copy p {
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-metric {
  min-height: 68px !important;
  padding: 10px !important;
  border-radius: 9px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-metric strong {
  font-size: 0.9rem !important;
}

body[data-active-section="quote-generator"] .quote-right-rail-section {
  padding: 12px !important;
  border-radius: 13px !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-row {
  grid-template-columns: 72px minmax(0, 1fr) 92px !important;
  gap: 7px !important;
  padding: 9px 0 !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-row p {
  font-size: 0.74rem !important;
  line-height: 1.35 !important;
}

body[data-active-section="quote-generator"] .quote-ask-ai-button {
  min-height: 38px !important;
  border-radius: 8px !important;
}

body[data-active-section="quote-generator"] .quote-pipeline-steps {
  gap: 6px !important;
}

body[data-active-section="quote-generator"] .quote-pipeline-step b {
  width: 30px !important;
  height: 30px !important;
}

body[data-active-section="quote-generator"] .quote-pipeline-step span {
  font-size: 0.66rem !important;
  line-height: 1.1 !important;
}

body[data-active-section="quote-generator"] .quote-vendor-review-grid {
  gap: 8px 10px !important;
  font-size: 0.8rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  max-height: 360px !important;
  overflow: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card .quote-pricing-decision-strip {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card .quote-builder-card-head {
  display: grid !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card .quote-builder-card-head p {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card .quote-builder-header-actions {
  justify-content: flex-start !important;
}

/* Phase 10.14: reference-grade actual reason modal and denser Quote Desk rails. */
.quote-so-readiness-dialog {
  width: min(900px, 96vw) !important;
  gap: 14px !important;
  padding: 20px !important;
}

.quote-so-readiness-title {
  align-items: center !important;
}

.quote-so-readiness-title > span {
  color: #ffffff !important;
  background: #f97316 !important;
}

.quote-so-readiness-title .eyebrow {
  color: #64748b !important;
  letter-spacing: 0.08em !important;
}

.quote-so-readiness-list {
  max-height: 430px !important;
  overflow: auto !important;
  padding-right: 4px !important;
}

.quote-so-readiness-list li {
  grid-template-columns: 28px minmax(0, 1fr) !important;
  padding: 10px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

.quote-so-readiness-list li.is-blocked b,
.quote-so-readiness-list li.is-warning b {
  background: #fb5b24 !important;
}

.quote-so-readiness-list li.is-success b {
  background: #16a34a !important;
}

.quote-so-readiness-facts {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 8px !important;
}

.quote-so-readiness-facts em {
  display: inline-flex !important;
  min-height: 24px !important;
  align-items: center !important;
  padding: 4px 8px !important;
  border: 1px solid rgba(226, 232, 240, 0.94) !important;
  border-radius: 8px !important;
  color: #fb5b24 !important;
  background: #fff7ed !important;
  font-size: 0.72rem !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

.quote-so-readiness-ai {
  border: 1px solid rgba(37, 99, 235, 0.16) !important;
  background: linear-gradient(135deg, #eff6ff, #ffffff) !important;
}

.quote-so-readiness-ai p {
  font-weight: 700 !important;
}

.quote-so-readiness-actions .primary-button {
  background: #071944 !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-row {
  grid-template-columns: 86px minmax(0, 1fr) 86px !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-row strong {
  color: #fb5b24 !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-row.is-success strong {
  color: #15803d !important;
}

body[data-active-section="quote-generator"] .quote-pipeline-step b {
  font-size: 0 !important;
}

body[data-active-section="quote-generator"] .quote-pipeline-step.is-success b::after {
  content: "\2713";
  font-size: 0.8rem;
}

body[data-active-section="quote-generator"] .quote-pipeline-step.is-warning b::after,
body[data-active-section="quote-generator"] .quote-pipeline-step.is-active b::after {
  content: "!";
  font-size: 0.8rem;
}

body[data-active-section="quote-generator"] .quote-pipeline-step.is-locked b::after {
  content: "L";
  font-size: 0.7rem;
}

/* Phase 10.15: setup overview should read like the approved compact command strip. */
body[data-active-section="quote-generator"] .quote-builder-hero-card {
  padding: 14px 16px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card .quote-builder-card-head {
  margin-bottom: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card .quote-builder-card-head h4 {
  font-size: 1rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: 1fr 0.92fr 1.06fr 1.06fr 0.9fr 1fr 1.08fr !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 74px !important;
  padding: 12px 13px !important;
  border-radius: 11px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article span {
  font-size: 0.72rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article strong {
  min-height: auto !important;
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article:nth-child(3) strong,
body[data-active-section="quote-generator"] .quote-builder-hero-summary article:nth-child(4) strong {
  display: inline-flex !important;
  width: fit-content !important;
  min-height: 26px !important;
  align-items: center !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  background: #1d4ed8 !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article:nth-child(6) strong {
  color: #fb5b24 !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article:nth-child(7) strong {
  color: #0f766e !important;
}

/* Phase 10.16: final parity pass for SO blocker modal and global quote shell chrome. */
.quote-so-readiness-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
}

.quote-so-readiness-ai-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 90%);
}

.quote-so-readiness-ai-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.quote-so-readiness-ai-head b {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 900;
}

.quote-so-readiness-ai-head span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.quote-so-readiness-language-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quote-so-readiness-language-row .ghost-button {
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  color: #334155;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.36);
}

.quote-so-readiness-language-row .ghost-button.is-active {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.46);
  background: #eaf2ff;
}

.quote-so-readiness-ai {
  display: block;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(191, 219, 254, 0.74);
  background: #f8fbff;
}

.quote-so-readiness-ai p {
  margin: 0;
  color: #243b63;
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .quote-so-readiness-layout {
    grid-template-columns: 1fr;
  }
}

body[data-active-section="quote-generator"] .dashboard-main > .topbar {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 42px !important;
  padding: 6px 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.34) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search span {
  color: #64748b !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search input {
  width: 190px !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: #0f172a !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-icon {
  width: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-profile {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 42px !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: 12px !important;
  color: #0f172a !important;
  background: #ffffff !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-profile span {
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  place-items: center !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #fb923c, #f97316) !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-profile small {
  color: #1e293b !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
}

/* Phase 10.17: tighten geometry toward the approved Quote Desk reference. */
body[data-active-section="quote-generator"] {
  --quote-sidebar-width: 220px;
  --quote-header-height: 104px;
}

body[data-active-section="quote-generator"] .app-shell {
  grid-template-columns: var(--quote-sidebar-width) minmax(0, calc(100vw - var(--quote-sidebar-width))) !important;
}

body[data-active-section="quote-generator"] .sidebar {
  width: var(--quote-sidebar-width) !important;
  padding: 22px 14px !important;
}

body[data-active-section="quote-generator"] .brand-logo {
  width: 40px !important;
  height: 40px !important;
}

body[data-active-section="quote-generator"] .brand-block h1 {
  font-size: 1.3rem !important;
}

body[data-active-section="quote-generator"] .nav-item {
  min-height: 42px !important;
  padding: 10px 12px !important;
  font-size: 0.86rem !important;
}

body[data-active-section="quote-generator"] .dashboard-main {
  width: calc(100vw - var(--quote-sidebar-width)) !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection,
body[data-active-section="quote-generator"] .quote-builder-reference-grid,
body[data-active-section="quote-generator"] .quote-builder-reference-shell {
  max-width: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: 220px minmax(0, 1fr) 360px !important;
  gap: 16px !important;
  padding: 0 20px 28px !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions {
  min-height: 116px !important;
  padding: 16px 20px 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  display: block !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  position: absolute !important;
  top: 14px !important;
  right: 20px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search {
  min-height: 36px !important;
  padding: 4px 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search input {
  width: 128px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-icon,
body[data-active-section="quote-generator"] .quote-builder-utility-profile {
  min-height: 36px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-icon {
  width: 36px !important;
  min-width: 36px !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  align-self: end !important;
  padding-top: 34px !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button {
  min-width: 112px !important;
  min-height: 40px !important;
  padding: 0 18px !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  width: 220px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  width: 360px !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column {
  gap: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 64px !important;
  padding: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-itinerary-card {
  padding: 14px 16px !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-card {
  grid-template-columns: 64px 150px minmax(0, 1fr) 132px !important;
  min-height: 104px !important;
  padding: 10px 12px 10px 0 !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy p {
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  padding: 12px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-hero {
  min-height: 120px !important;
  margin-bottom: 12px !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-image,
body[data-active-section="quote-generator"] .quote-builder-preview-hero {
  position: relative !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 76% 28%, rgba(255, 255, 255, 0.95) 0 4px, transparent 5px),
    linear-gradient(160deg, #18385e 0%, #327ea9 48%, #d69a66 100%) !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-image::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 44%;
  background:
    linear-gradient(to top, rgba(6, 22, 67, 0.52), transparent 68%),
    linear-gradient(90deg,
      transparent 0 4%,
      rgba(7, 25, 68, 0.5) 4% 8%,
      transparent 8% 14%,
      rgba(7, 25, 68, 0.58) 14% 18%,
      transparent 18% 24%,
      rgba(7, 25, 68, 0.62) 24% 29%,
      transparent 29% 36%,
      rgba(7, 25, 68, 0.72) 36% 40%,
      transparent 40% 48%,
      rgba(7, 25, 68, 0.64) 48% 54%,
      transparent 54% 62%,
      rgba(7, 25, 68, 0.7) 62% 66%,
      transparent 66% 76%,
      rgba(7, 25, 68, 0.56) 76% 82%,
      transparent 82% 100%);
  opacity: 0.78;
  pointer-events: none;
}

body[data-active-section="quote-generator"] .quote-reference-day-image.has-image::before {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-summary::after {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-image img {
  position: relative !important;
  z-index: 1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-hero img {
  height: 120px !important;
  position: relative !important;
  z-index: 1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search input {
  width: 164px !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title strong,
body[data-active-section="quote-generator"] .brand-block h1 {
  letter-spacing: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar > div:first-child > .muted {
  max-width: 820px !important;
}

/* Phase 10.22: header and SO blocker modal parity polish. */
body[data-active-section="quote-generator"] .quote-builder-topbar-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 0 0 18px 18px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  min-height: 104px !important;
  padding: 0 6px !important;
}

body[data-active-section="quote-generator"] .quote-builder-breadcrumb {
  margin-bottom: 8px !important;
  color: #283957 !important;
  font-size: 0.78rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title {
  align-items: center !important;
  gap: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title strong {
  font-size: clamp(1.82rem, 2vw, 2.08rem) !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar > div:first-child > .muted {
  display: block !important;
  margin-top: 8px !important;
  color: #63718c !important;
  font-size: 0.96rem !important;
  line-height: 1.35 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search {
  width: 260px !important;
  min-height: 44px !important;
  border-radius: 12px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search span {
  position: relative !important;
  width: 18px !important;
  height: 18px !important;
  overflow: hidden !important;
  color: transparent !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search span::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid #27364f;
  border-radius: 999px;
  transform: rotate(-15deg);
}

body[data-active-section="quote-generator"] .quote-builder-utility-search span::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #27364f;
  transform: rotate(45deg);
}

body[data-active-section="quote-generator"] .quote-builder-utility-search input {
  width: 198px !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  gap: 10px !important;
  padding-top: 38px !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
  min-width: 126px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link[href="#quoteBuilderPaymentSection"]::before {
  content: "LOCK";
  margin-right: 6px;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.quote-so-readiness-modal.is-open {
  backdrop-filter: blur(7px);
}

.quote-so-readiness-backdrop {
  background: rgba(15, 23, 42, 0.48) !important;
}

.quote-so-readiness-dialog {
  width: min(920px, calc(100vw - 48px)) !important;
  padding: 22px !important;
  border: 1px solid rgba(226, 232, 240, 0.86) !important;
  border-radius: 18px !important;
  box-shadow: 0 32px 84px rgba(15, 23, 42, 0.34) !important;
}

.quote-so-readiness-title {
  grid-template-columns: 44px minmax(0, 1fr) !important;
  gap: 12px !important;
  margin-bottom: 4px !important;
}

.quote-so-readiness-title > span {
  width: 42px !important;
  height: 42px !important;
  font-size: 1.15rem !important;
  background: #fb5b24 !important;
}

.quote-so-readiness-title h3 {
  font-size: 1.28rem !important;
}

.quote-so-readiness-title p:last-child {
  color: #4b5d78 !important;
  font-size: 0.86rem !important;
}

.quote-so-readiness-layout {
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.92fr) !important;
  gap: 14px !important;
}

.quote-so-readiness-list {
  max-height: min(50vh, 450px) !important;
  gap: 10px !important;
}

.quote-so-readiness-list li {
  min-height: 78px !important;
  padding: 12px !important;
  border-radius: 13px !important;
}

.quote-so-readiness-ai-panel {
  position: sticky !important;
  top: 0 !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
  background: linear-gradient(150deg, #eff6ff 0%, #ffffff 74%) !important;
}

.quote-so-readiness-ai {
  min-height: 130px !important;
  display: grid !important;
  align-items: center !important;
}

.quote-so-readiness-actions {
  display: grid !important;
  grid-template-columns: 1fr 1.7fr 1.35fr 1.35fr !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

.quote-so-readiness-actions .ghost-button,
.quote-so-readiness-actions .primary-button {
  min-height: 48px !important;
  border-radius: 12px !important;
  font-weight: 900 !important;
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-main-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column,
  body[data-active-section="quote-generator"] .quote-builder-hero-card {
    position: static !important;
    grid-column: 1 !important;
    grid-row: auto !important;
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

body[data-active-section="quote-generator"].quote-builder-show-payment-workflow #quoteBuilderPaymentSection,
body[data-active-section="quote-generator"] #quoteBuilderPaymentSection.quote-builder-action-revealed {
  display: block !important;
}

body[data-active-section="quote-generator"].quote-builder-show-share-workflow #quoteBuilderShareSection,
body[data-active-section="quote-generator"] #quoteBuilderShareSection.quote-builder-action-revealed {
  display: block !important;
}

body[data-active-section="quote-generator"].quote-builder-show-trip-setup .quote-builder-left-column .quote-builder-trip-card {
  display: block !important;
}

body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection.quote-builder-action-revealed {
  display: block !important;
}

/* Quote Desk Quick Actions: centered, route-safe setup dialog. */
#quoteBuilderTripSetupSection[aria-hidden="true"] {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection {
  display: none !important;
}

body[data-active-section="quote-generator"].quote-builder-show-trip-setup {
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-quick-setup-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 8990 !important;
  display: block !important;
  background: rgba(15, 23, 42, 0.58) !important;
  backdrop-filter: blur(5px) !important;
}

body[data-active-section="quote-generator"] .quote-quick-setup-backdrop.hidden {
  display: none !important;
}

body[data-active-section="quote-generator"].quote-builder-show-trip-setup #quoteBuilderTripSetupSection,
body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection.quote-builder-action-revealed {
  position: fixed !important;
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 9000 !important;
  display: grid !important;
  width: min(960px, calc(100vw - 48px)) !important;
  max-width: 960px !important;
  max-height: calc(100dvh - 48px) !important;
  margin: 0 !important;
  padding: 0 18px 18px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  transform: translate(-50%, -50%) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32) !important;
}

body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection > .quote-quick-setup-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 3 !important;
  align-items: center !important;
  margin: 0 -18px 16px !important;
  padding: 18px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px) !important;
}

body[data-active-section="quote-generator"] .quote-quick-setup-close {
  min-width: 86px !important;
  min-height: 42px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-source-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-source-assist,
body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-inventory-card {
  grid-column: 1 / -1 !important;
}

body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-advanced-trip-editor .lead-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-advanced-trip-editor .field-span-2 {
  grid-column: span 2 !important;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"].quote-builder-show-trip-setup #quoteBuilderTripSetupSection,
  body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection.quote-builder-action-revealed {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 0 14px 14px !important;
    border-radius: 18px !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection > .quote-quick-setup-head {
    margin: 0 -14px 14px !important;
    padding: 14px !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-source-strip,
  body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-advanced-trip-editor .lead-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-source-strip,
  body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-advanced-trip-editor .lead-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderTripSetupSection .quote-builder-advanced-trip-editor .field-span-2 {
    grid-column: auto !important;
  }
}

body[data-active-section="quote-generator"].quote-builder-show-payment-workflow #quoteGeneratorStatus,
body[data-active-section="quote-generator"].quote-builder-show-trip-setup #quoteGeneratorStatus,
body[data-active-section="quote-generator"].quote-builder-show-share-workflow #quoteGeneratorStatus {
  display: block !important;
}

/* Phase 10.10 reference lock: keep Quote Desk close to the approved CRM mockup. */
body[data-active-section="quote-generator"] {
  --quote-sidebar-width: 218px !important;
  --quote-topbar-height: 126px !important;
  --quote-main-gap: 16px !important;
  background: #f4f7fb !important;
}

body[data-active-section="quote-generator"] .app-shell {
  grid-template-columns: var(--quote-sidebar-width) minmax(0, 1fr) !important;
  background:
    linear-gradient(90deg, #061936 0 var(--quote-sidebar-width), #f4f7fb var(--quote-sidebar-width) 100%) !important;
}

body[data-active-section="quote-generator"] .sidebar {
  width: var(--quote-sidebar-width) !important;
  min-width: var(--quote-sidebar-width) !important;
  max-width: var(--quote-sidebar-width) !important;
  padding: 20px 14px !important;
  gap: 18px !important;
  background: linear-gradient(180deg, #071b3a 0%, #021326 100%) !important;
}

body[data-active-section="quote-generator"] .brand-logo {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
}

body[data-active-section="quote-generator"] .brand-block h1 {
  font-size: 1.06rem !important;
  line-height: 1.08 !important;
}

body[data-active-section="quote-generator"] .nav-item {
  display: flex !important;
  align-items: center !important;
  min-height: 42px !important;
  padding: 10px 12px !important;
  gap: 10px !important;
  border-radius: 9px !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
}

body[data-active-section="quote-generator"] .nav-item::before {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 7px !important;
  font-size: 0.68rem !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

body[data-active-section="quote-generator"] .nav-item.active::before,
body[data-active-section="quote-generator"] .nav-item[data-section="quote-generator"]::before {
  background: rgba(255, 255, 255, 0.18) !important;
}

body[data-active-section="quote-generator"] .nav-item-helper,
body[data-active-section="quote-generator"] .nav-item small {
  display: none !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item:not([data-quote-desk-nav-label]) {
  display: none !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-quote-desk-nav-label] {
  display: flex !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-group > :not(.nav-item) {
  display: none !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[hidden] {
  display: none !important;
}

body[data-active-section="quote-generator"] .sidebar-card {
  padding: 12px !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .sidebar-card h2 {
  font-size: 0.92rem !important;
}

body[data-active-section="quote-generator"] .sidebar-card .muted {
  font-size: 0.72rem !important;
  line-height: 1.28 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell {
  background: #f4f7fb !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  display: grid !important;
  grid-template-columns: 220px minmax(690px, 1fr) 380px !important;
  grid-template-rows: auto auto auto !important;
  gap: var(--quote-main-gap) !important;
  align-items: start !important;
  padding: 0 18px 28px !important;
  width: 100% !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-card {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  min-height: auto !important;
  padding: 14px 18px !important;
  border-radius: 0 0 14px 14px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title strong {
  font-size: 1.55rem !important;
  line-height: 1.05 !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  justify-content: flex-end !important;
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
  min-height: 38px !important;
  min-width: 104px !important;
  padding: 0 14px !important;
  border-radius: 7px !important;
  font-size: 0.78rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-route-links,
body[data-active-section="quote-generator"] .quote-builder-smart-buttons,
body[data-active-section="quote-generator"] .quote-builder-actions > p.muted {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  padding: 14px !important;
  border-radius: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  grid-column: 1 !important;
  grid-row: 2 / span 2 !important;
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
  position: sticky !important;
  top: calc(var(--quote-topbar-height) + 14px) !important;
  max-height: calc(100vh - var(--quote-topbar-height) - 28px) !important;
  overflow: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column {
  grid-column: 2 !important;
  grid-row: 3 !important;
  gap: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  grid-column: 3 !important;
  grid-row: 2 / span 2 !important;
  width: 380px !important;
  min-width: 380px !important;
  max-width: 380px !important;
  position: sticky !important;
  top: calc(var(--quote-topbar-height) + 14px) !important;
  max-height: calc(100vh - var(--quote-topbar-height) - 28px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
  background: transparent !important;
}

body[data-active-section="quote-generator"] .quote-builder-control-card {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-card,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  border-radius: 8px !important;
  box-shadow: 0 10px 26px rgba(21, 38, 74, 0.06) !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 74px !important;
  padding: 10px 12px !important;
  border-radius: 7px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article strong {
  font-size: 0.86rem !important;
  line-height: 1.12 !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-panel {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) 148px !important;
  align-items: end !important;
  gap: 8px !important;
  min-height: 54px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head {
  grid-column: 1 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head span {
  font-size: 0.62rem !important;
  letter-spacing: 0 !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head strong {
  font-size: 0.76rem !important;
  line-height: 1.15 !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-toggle {
  min-height: 28px !important;
  width: max-content !important;
  padding: 0 10px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid {
  grid-column: 2 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-field span,
body[data-active-section="quote-generator"] .quote-reference-source-grid label > span {
  font-size: 0.62rem !important;
  letter-spacing: 0 !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid select {
  min-height: 31px !important;
  border-radius: 7px !important;
  font-size: 0.7rem !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-actions {
  grid-column: 3 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-actions button {
  min-height: 28px !important;
  border-radius: 7px !important;
  font-size: 0.64rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-itinerary-card {
  padding: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-itinerary-card > .quote-builder-card-head {
  min-height: 50px !important;
}

body[data-active-section="quote-generator"] .quote-day-master-card,
body[data-active-section="quote-generator"] .quote-day-master-card.is-selected,
body[data-active-section="quote-generator"] .quote-day-master-card.is-collapsed-ready {
  border-radius: 8px !important;
  min-height: 94px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  display: grid !important;
  gap: 10px !important;
  padding: 14px !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-hero {
  height: 118px !important;
  min-height: 118px !important;
  border-radius: 7px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-copy {
  padding: 10px !important;
  border-radius: 7px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metric {
  min-height: 54px !important;
  padding: 9px !important;
  border-radius: 7px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-section {
  padding: 12px !important;
  border-radius: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row {
  grid-template-columns: 92px minmax(0, 1fr) 72px !important;
  gap: 7px !important;
  padding: 8px 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row .ghost-button {
  min-height: 30px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .detail-action-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .detail-action-row .ghost-button:last-child {
  grid-column: 1 / -1 !important;
}

@media (max-width: 1540px) and (min-width: 1261px) {
  body[data-active-section="quote-generator"] {
    --quote-sidebar-width: 206px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 206px minmax(610px, 1fr) 348px !important;
    gap: 14px !important;
    padding-inline: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 206px !important;
    min-width: 206px !important;
    max-width: 206px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 348px !important;
    min-width: 348px !important;
    max-width: 348px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-panel {
    grid-template-columns: 160px minmax(0, 1fr) 134px !important;
  }
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 0 10px 18px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-card,
  body[data-active-section="quote-generator"] .quote-builder-hero-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-main-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-card {
    border-radius: 0 0 12px 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-head,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions,
  body[data-active-section="quote-generator"] .quote-reference-source-panel,
  body[data-active-section="quote-generator"] .quote-reference-source-grid,
  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-head,
  body[data-active-section="quote-generator"] .quote-reference-source-grid,
  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-column: 1 !important;
  }
}

/* Phase 10.20: zoom-safe reference frame. Keep the Quote Desk close to the approved
   composition on very wide/zoomed-out screens instead of stretching into a canyon. */
body[data-active-section="quote-generator"] {
  --quote-content-max: 1680px;
}

body[data-active-section="quote-generator"] .app-shell {
  grid-template-columns: var(--quote-sidebar-width) minmax(0, min(calc(100vw - var(--quote-sidebar-width)), var(--quote-content-max))) !important;
  justify-content: start !important;
}

body[data-active-section="quote-generator"] .dashboard-main,
body[data-active-section="quote-generator"] #quoteDashboardSection,
body[data-active-section="quote-generator"] .quote-builder-reference-grid,
body[data-active-section="quote-generator"] .quote-builder-reference-shell,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  width: min(calc(100vw - var(--quote-sidebar-width)), var(--quote-content-max)) !important;
  max-width: var(--quote-content-max) !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: 220px minmax(760px, 1fr) 360px !important;
}

@media (min-width: 2200px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 220px minmax(880px, 1fr) 360px !important;
  }
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  width: 360px !important;
  min-width: 360px !important;
  max-width: 360px !important;
  align-self: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column,
body[data-active-section="quote-generator"] .quote-builder-right-column * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column p,
body[data-active-section="quote-generator"] .quote-builder-right-column small {
  overflow-wrap: break-word !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-row {
  grid-template-columns: 84px minmax(96px, 1fr) 84px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-gate-status-row strong,
body[data-active-section="quote-generator"] .quote-gate-status-row span {
  white-space: normal !important;
  line-height: 1.15 !important;
}

/* Phase 10.24: compact the live right rail to match the approved reference.
   Detailed blocker reasons stay available in the modal/AI flow. */
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-detail {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-section {
  padding: 12px !important;
  border-radius: 14px !important;
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-head {
  gap: 8px !important;
  align-items: center !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-head h4 {
  font-size: 0.82rem !important;
  letter-spacing: 0.04em !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row {
  grid-template-columns: 78px minmax(0, 1fr) 72px !important;
  gap: 8px !important;
  padding: 8px 0 !important;
  align-items: center !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row .ghost-button {
  min-height: 28px !important;
  padding: 5px 8px !important;
  border-radius: 9px !important;
  font-size: 0.72rem !important;
  line-height: 1.05 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row span,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row strong {
  font-size: 0.76rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-ask-ai-button {
  min-height: 34px !important;
  border-radius: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-pipeline-steps {
  gap: 7px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-pipeline-step b {
  width: 22px !important;
  height: 22px !important;
  font-size: 0.7rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-pipeline-step span {
  font-size: 0.64rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-vendor-review-grid {
  grid-template-columns: 92px minmax(0, 1fr) !important;
  gap: 8px 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .detail-action-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .detail-action-row .ghost-button:last-child {
  grid-column: 1 / -1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-finance-actions article {
  padding: 10px !important;
  gap: 8px !important;
}

@media (max-width: 1540px) and (min-width: 1261px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 190px minmax(620px, 1fr) 320px !important;
    gap: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row {
    grid-template-columns: 70px minmax(0, 1fr) 68px !important;
    gap: 6px !important;
  }
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

/* Phase 10.21: live Browser rail repair. Right rail must stay viewport-safe
   while preserving every blocker, pricing, vendor, and finance action. */
body[data-active-section="quote-generator"] .quote-builder-right-column {
  position: sticky !important;
  top: 86px !important;
  grid-row: 2 / span 6 !important;
  height: calc(100vh - 104px) !important;
  max-height: calc(100vh - 104px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding-right: 2px !important;
  scrollbar-gutter: stable !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  position: static !important;
  top: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  order: 1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  order: 2 !important;
  margin-top: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-panel {
  display: grid !important;
  align-content: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-preview-summary {
  min-height: 0 !important;
}

body[data-active-section="quote-generator"] .quote-right-rail-section,
body[data-active-section="quote-generator"] .quote-builder-pricing-card {
  break-inside: avoid !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-pricing-summary-grid,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-pricing-decision-strip {
  max-height: none !important;
  overflow: visible !important;
}

/* Phase 10.23: reference parity rail split.
   Pricing/Home Cost belongs to the internal work canvas, not the live preview rail. */
body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] {
  order: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 18px !important;
  border: 1px solid rgba(37, 99, 235, 0.12) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06) !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-builder-card-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-builder-card-head p {
  max-width: 760px !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-builder-header-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 220px !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-pricing-decision-strip,
body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-pricing-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-pricing-line-list,
body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-pricing-warning-list {
  max-height: 190px !important;
  overflow-y: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  align-content: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  order: 1 !important;
  margin-top: 0 !important;
}

/* Phase 10.25: final right-rail fit and day-card action affordance. */
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  padding: 12px !important;
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .panel-header {
  margin-bottom: 2px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .panel-header h3 {
  font-size: 0.98rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-hero {
  height: 108px !important;
  min-height: 108px !important;
  border-radius: 12px !important;
  margin: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-copy {
  padding: 10px !important;
  border-radius: 12px !important;
  gap: 4px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-copy h4 {
  font-size: 1rem !important;
  line-height: 1.1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-copy p {
  font-size: 0.78rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metrics {
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metric {
  min-height: 54px !important;
  padding: 9px !important;
  border-radius: 11px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metric span {
  font-size: 0.68rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metric strong {
  font-size: 0.86rem !important;
  line-height: 1.08 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-section {
  padding: 10px !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row {
  padding: 6px 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-vendor-review-grid,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-finance-actions {
  gap: 7px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-ops-vendor-card > p {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions .danger-button {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.24) !important;
  background: rgba(254, 242, 242, 0.78) !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions .danger-button:hover:not(:disabled) {
  color: #ffffff !important;
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

@media (max-width: 1540px) and (min-width: 1261px) {
  body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
    padding: 10px !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-hero {
    height: 92px !important;
    min-height: 92px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-copy {
    padding: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metric {
    min-height: 48px !important;
    padding: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-section {
    padding: 9px !important;
  }
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-builder-card-head,
  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-pricing-decision-strip,
  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-pricing-summary-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-pricing-card[data-quote-desk-placement="main"] .quote-builder-header-actions {
    justify-content: flex-start !important;
    min-width: 0 !important;
  }
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-group-label {
  display: none !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-group {
  display: contents !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="ai-trainer"],
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="marketing-packages"],
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="guest-list"] {
  display: flex !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="quote-generator"] { order: 1 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="lead-pipeline"] { order: 2 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="product-gallery"] { order: 3 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="marketing-packages"] { order: 4 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="guest-list"] { order: 5 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="sales-orders"] { order: 6 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="purchasing-dashboard"] { order: 7 !important; }

/* PO workspace: the persistent sidebar reduces usable width before viewport breakpoints fire. */
#purchasingSection {
  max-width: 100%;
  overflow-x: hidden;
}

#purchasingSection .purchasing-workspace-grid,
#purchasingSection .purchasing-form-panel,
#purchasingSection .purchasing-detail-grid,
#purchasingSection .purchasing-detail-grid > * {
  min-width: 0;
}

@media (max-width: 1400px) {
  #purchasingSection .purchasing-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="accounting-finance"] { order: 8 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="reports"] { order: 9 !important; }
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="ai-trainer"] { order: 10 !important; }

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-section="ai-trainer"]::before {
  content: "AI";
  font-size: 0.58rem;
}

body[data-active-section="quote-generator"] #loginGreetingBanner,
body[data-active-section="quote-generator"] .login-greeting-banner {
  display: none !important;
}

/* Phase 10.26: visual parity pass.
   Keep the reference layout readable at browser zoom levels without nested rail scrollbars. */
body[data-active-section="quote-generator"] {
  --quote-sidebar-width: 224px;
}

body[data-active-section="quote-generator"] .sidebar {
  padding: 24px 18px !important;
}

body[data-active-section="quote-generator"] .brand-block {
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .brand-block h1 {
  font-size: 1.18rem !important;
  line-height: 1.08 !important;
}

body[data-active-section="quote-generator"] .nav-menu {
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .nav-item {
  min-height: 44px !important;
  padding: 11px 13px !important;
  gap: 11px !important;
  font-size: 0.88rem !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  grid-template-columns: 220px minmax(620px, 1fr) 380px !important;
  gap: 18px !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  width: 380px !important;
  min-width: 380px !important;
  max-width: 380px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-gutter: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-hero {
  height: 118px !important;
  min-height: 118px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row {
  grid-template-columns: 92px minmax(0, 1fr) 74px !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-section {
  border-radius: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-finance-actions {
  grid-template-columns: 1fr !important;
}

@media (max-width: 1540px) and (min-width: 1261px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 206px minmax(560px, 1fr) 348px !important;
    gap: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 206px !important;
    min-width: 206px !important;
    max-width: 206px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 348px !important;
    min-width: 348px !important;
    max-width: 348px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-hero {
    height: 104px !important;
    min-height: 104px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row {
    grid-template-columns: 82px minmax(0, 1fr) 70px !important;
  }
}
/* Phase 10.28: compact source setup visual parity pass. */
body[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 58px !important;
  padding: 9px 11px !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article strong {
  line-height: 1.18 !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 178px !important;
  gap: 10px 12px !important;
  padding: 11px 12px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(191, 212, 245, 0.95) !important;
  background: linear-gradient(135deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.99)) !important;
  box-shadow: 0 16px 40px rgba(12, 30, 68, 0.06) !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head h3 {
  font-size: 0.86rem !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head p {
  margin-top: 1px !important;
  max-width: 620px !important;
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-toggle {
  min-height: 34px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid {
  grid-column: 1 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-field {
  gap: 5px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-field span {
  font-size: 0.67rem !important;
  letter-spacing: 0.04em !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid select {
  min-height: 36px !important;
  padding: 0 32px 0 11px !important;
  border-radius: 10px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-actions {
  grid-column: 2 !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  align-self: end !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-actions button {
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 0.75rem !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-panel > p {
  grid-column: 1 / -1 !important;
  margin: -2px 0 0 !important;
  font-size: 0.7rem !important;
  line-height: 1.35 !important;
}

@media (min-width: 1261px) and (max-width: 1540px) {
  body[data-active-section="quote-generator"] .quote-reference-source-panel {
    grid-template-columns: minmax(0, 1fr) 158px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-actions button {
    font-size: 0.7rem !important;
  }
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-reference-source-panel,
  body[data-active-section="quote-generator"] .quote-reference-source-grid,
  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-grid,
  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-column: 1 / -1 !important;
  }
}

/* Route UI polish EOF guard: compact desktop quote desk stays inside the viewport. */
@media (min-width: 1261px) and (max-width: 1440px) {
  body[data-active-section="quote-generator"] {
    overflow-x: hidden !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell {
    overflow-x: clip !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 180px minmax(0, 1fr) 300px !important;
    gap: 12px !important;
    max-width: calc(100vw - 204px) !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 300px !important;
    min-width: 0 !important;
    max-width: 300px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
    min-width: 88px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body[data-active-section="quote-generator"] .assistant-widget-closed .assistant-launcher-text,
  body[data-active-section="quote-generator"] .assistant-widget-closed .assistant-launcher-text *,
  body[data-active-section="quote-generator"] .assistant-widget-closed #assistantLauncherStatus {
    max-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }
}

/* Route UI polish: compact desktop quote desk must not create a bottom horizontal scrollbar. */
@media (min-width: 1261px) and (max-width: 1440px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell {
    overflow-x: clip !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 180px minmax(0, 1fr) 300px !important;
    gap: 12px !important;
    max-width: calc(100vw - 204px) !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 300px !important;
    min-width: 0 !important;
    max-width: 300px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
    min-width: 88px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Final Quote Desk override: actual EOF guard. */
body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  padding-top: 12px !important;
  justify-content: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 12px !important;
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-builder-topbar-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-utility {
    justify-content: flex-start !important;
  }
}

/* Quote Desk EOF stability guard. This must stay at the bottom so older
   reference-lock rules cannot collapse the header or cards at browser zoom. */
body[data-active-section="quote-generator"] .quote-builder-reference-shell,
body[data-active-section="quote-generator"] .quote-builder-reference-shell * {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: minmax(168px, 0.18fr) minmax(0, 1fr) minmax(292px, 0.28fr) !important;
  gap: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 0 !important;
  justify-content: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-card {
  position: relative !important;
  z-index: 30 !important;
  isolation: isolate !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
  position: relative !important;
  z-index: 31 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search {
  width: clamp(220px, 24vw, 340px) !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search input {
  width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  padding-top: 0 !important;
  justify-content: stretch !important;
  align-self: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.15 !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column,
body[data-active-section="quote-generator"] .quote-builder-right-column {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-card {
  display: grid !important;
  grid-template-columns: 58px minmax(130px, 180px) minmax(0, 1fr) minmax(128px, 0.25fr) !important;
  gap: 14px !important;
  align-items: center !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy,
body[data-active-section="quote-generator"] .quote-reference-day-copy p,
body[data-active-section="quote-generator"] .quote-reference-day-title-row,
body[data-active-section="quote-generator"] .quote-reference-day-title-row strong,
body[data-active-section="quote-generator"] .quote-transport-route-option-card p,
body[data-active-section="quote-generator"] .quote-transport-route-option-card strong,
body[data-active-section="quote-generator"] .quote-pricing-line-copy p {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  align-self: stretch !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-reference-day-actions .danger-button {
  width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-transport-route-option-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-transport-route-option-card .ghost-button {
  position: static !important;
  min-width: 120px !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-description-grid,
body[data-active-section="quote-generator"] .quote-builder-policy-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

body[data-active-section="quote-generator"] textarea,
body[data-active-section="quote-generator"] select,
body[data-active-section="quote-generator"] input {
  max-width: 100% !important;
}

@media (max-width: 1540px) and (min-width: 1261px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(150px, 0.16fr) minmax(0, 1fr) minmax(272px, 0.27fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: 52px 128px minmax(0, 1fr) 120px !important;
    gap: 10px !important;
  }
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-head,
  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-utility {
    justify-content: flex-start !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-image {
    width: 100% !important;
    max-width: 240px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-actions {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-builder-primary-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-utility-search,
  body[data-active-section="quote-generator"] .quote-builder-utility-profile {
    width: 100% !important;
  }
}

/* Quote Desk final layout guard: keep the restored builder usable at common
   Chrome zoom levels without changing quote, vendor, or costing behavior. */
body[data-active-section="quote-generator"] .quote-builder-reference-shell,
body[data-active-section="quote-generator"] .quote-builder-reference-shell * {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: minmax(168px, 0.18fr) minmax(0, 1fr) minmax(292px, 0.28fr) !important;
  gap: 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-card {
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search {
  width: clamp(220px, 24vw, 340px) !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search input {
  width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  padding-top: 0 !important;
  align-self: stretch !important;
  justify-content: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.15 !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-card {
  display: grid !important;
  grid-template-columns: 58px minmax(130px, 180px) minmax(0, 1fr) minmax(128px, 0.25fr) !important;
  gap: 14px !important;
  align-items: center !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy,
body[data-active-section="quote-generator"] .quote-reference-day-copy p,
body[data-active-section="quote-generator"] .quote-reference-day-title-row,
body[data-active-section="quote-generator"] .quote-reference-day-title-row strong {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  align-self: stretch !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-reference-day-actions .danger-button {
  width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-transport-route-tabs,
body[data-active-section="quote-generator"] .quote-pricing-line-list,
body[data-active-section="quote-generator"] .quote-pricing-summary-grid,
body[data-active-section="quote-generator"] .quote-pricing-decision-strip {
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-transport-route-option-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-transport-route-option-card p,
body[data-active-section="quote-generator"] .quote-transport-route-option-card strong,
body[data-active-section="quote-generator"] .quote-pricing-line-copy p {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] .quote-transport-route-option-card .ghost-button {
  position: static !important;
  min-width: 120px !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-description-grid,
body[data-active-section="quote-generator"] .quote-builder-policy-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

body[data-active-section="quote-generator"] textarea,
body[data-active-section="quote-generator"] select,
body[data-active-section="quote-generator"] input {
  max-width: 100% !important;
}

@media (max-width: 1540px) and (min-width: 1261px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(150px, 0.16fr) minmax(0, 1fr) minmax(272px, 0.27fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: 52px 128px minmax(0, 1fr) 120px !important;
    gap: 10px !important;
  }
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-head,
  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-utility {
    justify-content: flex-start !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-image {
    width: 100% !important;
    max-width: 240px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-actions {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-builder-primary-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-utility-search,
  body[data-active-section="quote-generator"] .quote-builder-utility-profile {
    width: 100% !important;
  }
}

/* Compact draggable Yatra Ready launcher. Keep it small so it does not cover forms/modals. */
.assistant-widget.assistant-widget-closed,
.assistant-widget.assistant-widget-minimized {
  width: 56px !important;
  height: 56px !important;
  z-index: 1200 !important;
  cursor: grab;
  touch-action: none;
}

.assistant-widget.assistant-widget-dragging,
.assistant-widget.assistant-widget-dragging .assistant-launcher {
  cursor: grabbing !important;
  user-select: none;
}

.assistant-widget.assistant-widget-closed .assistant-launcher,
.assistant-widget.assistant-widget-minimized .assistant-launcher {
  position: static !important;
  inset: auto !important;
  justify-content: center !important;
  gap: 0 !important;
  width: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
  padding: 4px !important;
  border-radius: 18px !important;
  cursor: grab;
}

.assistant-widget.assistant-widget-closed .assistant-launcher-orb-shell,
.assistant-widget.assistant-widget-minimized .assistant-launcher-orb-shell {
  width: 48px !important;
  height: 48px !important;
}

.assistant-widget.assistant-widget-closed .assistant-launcher-text,
.assistant-widget.assistant-widget-minimized .assistant-launcher-text {
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

.assistant-widget.assistant-widget-closed .assistant-launcher-ping,
.assistant-widget.assistant-widget-minimized .assistant-launcher-ping {
  right: 6px !important;
  top: 6px !important;
}

/* Canonical Yatra Assistant v2: the clean conversation-first surface shared with Mobile App. */
.assistant-widget-v2 .assistant-popup {
  width: min(640px, calc(100vw - 28px));
  max-height: min(82vh, 760px);
  border-radius: 24px;
  background: #0b1822;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 28px 80px rgba(2, 8, 23, 0.48);
}

.assistant-widget-v2 .assistant-popup-header {
  min-height: 66px;
  padding: 14px 16px;
  background: #0b1822;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.assistant-widget-v2 .assistant-popup-title .eyebrow {
  display: none;
}

.assistant-widget-v2 .assistant-popup-title h3 {
  color: #f8fafc;
}

.assistant-widget-v2 .assistant-popup-actions {
  align-items: center;
}

.assistant-widget-v2 .assistant-popup-actions .widget-icon-button {
  min-width: 54px;
  padding-inline: 12px;
  border-radius: 14px;
}

.assistant-widget-v2 .assistant-popup-body {
  display: grid;
  gap: 0;
  max-height: calc(min(82vh, 760px) - 66px);
  padding: 0;
  overflow: hidden;
  background: #0b1822;
}

.assistant-widget-v2 .assistant-v2-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0;
  background: #0b1822;
  box-shadow: none;
}

.assistant-widget-v2 .copilot-voice-toolbar-main {
  min-width: 0;
}

.assistant-widget-v2 .copilot-voice-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-widget-v2 .copilot-voice-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  justify-content: end;
  gap: 6px;
}

.assistant-widget-v2 .copilot-voice-toolbar-actions .ghost-button {
  min-height: 32px;
  padding: 6px 9px;
  white-space: nowrap;
}

.assistant-widget-v2 .assistant-v2-suggestions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  scrollbar-width: none;
}

.assistant-widget-v2 .assistant-v2-suggestions::-webkit-scrollbar {
  display: none;
}

.assistant-widget-v2 .assistant-v2-suggestions .ghost-button {
  flex: 0 0 auto;
  min-height: 36px;
  color: #e2e8f0;
  background: transparent;
  border-color: rgba(148, 163, 184, 0.22);
}

.assistant-widget-v2 .assistant-confirmation-panel {
  margin: 10px 16px 0;
}

.assistant-widget-v2 .assistant-transcript-shell {
  min-height: 0;
  padding: 12px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0b1822;
  box-shadow: none;
}

.assistant-widget-v2 .assistant-section-heading {
  margin-bottom: 8px;
}

.assistant-widget-v2 .assistant-section-heading .eyebrow {
  color: #38d5cb;
}

.assistant-widget-v2 .chat-messages {
  min-height: 170px;
  max-height: min(34vh, 300px);
  padding-right: 4px;
  overflow-y: auto;
}

.assistant-widget-v2 .chat-bubble.assistant {
  border-color: rgba(148, 163, 184, 0.16);
  background: #1d2b35;
}

.assistant-widget-v2 .chat-bubble.user {
  border-color: rgba(56, 213, 203, 0.26);
  background: #123a3b;
}

.assistant-widget-v2 .bubble-label {
  color: #38d5cb;
}

.assistant-widget-v2 .assistant-chat-form {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0;
  background: #0b1822;
  box-shadow: none;
}

.assistant-widget-v2 .assistant-chat-form textarea {
  min-height: 108px;
  resize: vertical;
  background: #06131c;
  border-color: rgba(148, 163, 184, 0.24);
}

.assistant-widget-v2 .assistant-v2-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assistant-widget-v2 .assistant-v2-actions button {
  min-width: 0;
  min-height: 40px;
}

.assistant-widget-v2 .assistant-v2-actions .primary-button {
  color: #f8fafc;
  background: linear-gradient(135deg, #2ec4b6, #168aad);
  border-color: transparent;
}

@media (max-width: 720px) {
  .assistant-widget-v2 .assistant-popup {
    inset: auto 8px 76px 8px !important;
    width: auto;
    max-height: 76vh;
    border-radius: 20px;
  }

  .assistant-widget-v2 .assistant-popup-body {
    max-height: calc(76vh - 66px);
  }

  .assistant-widget-v2 .copilot-voice-support-hint {
    display: none;
  }

  .assistant-widget-v2 .assistant-v2-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .assistant-widget-v2 .copilot-voice-toolbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 1540px) {
  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: 58px minmax(112px, 128px) minmax(0, 1fr) !important;
    gap: 10px 12px !important;
    align-items: center !important;
    padding: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-pin {
    margin-left: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-image {
    width: 100% !important;
    height: 82px !important;
    min-height: 82px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-image img {
    height: 82px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-copy {
    min-width: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-title-row {
    min-width: 0 !important;
    justify-content: flex-start !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-title-row strong {
    min-width: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-actions .ghost-button {
    min-width: 0 !important;
    min-height: 32px !important;
    padding: 0 8px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: 56px minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-image {
    grid-column: 1 / -1 !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Final guard: template picker must render above downstream panels (no clipping). */
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-hero-card,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-hero-summary,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-reference-source-panel,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-reference-source-grid,
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-reference-picker {
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-hero-card {
  position: relative !important;
  z-index: 4200 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-reference-source-panel {
  position: relative !important;
  z-index: 4300 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-reference-picker-menu {
  z-index: 4400 !important;
}

/* Phase 10.46: popup-only guest/payment flow. */
body[data-active-section="quote-generator"] #quoteBuilderPaymentSection {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteBuilderPaymentSection.quote-builder-action-revealed,
body[data-active-section="quote-generator"].quote-builder-show-payment-workflow #quoteBuilderPaymentSection,
body[data-active-section="quote-generator"].quote-builder-show-room-config-workflow #quoteBuilderPaymentSection {
  display: block !important;
}

.quote-guest-capture-card {
  border: 1px solid rgba(209, 222, 238, 0.9);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 241, 0.72));
}

.quote-guest-accordion {
  padding: 0;
  overflow: hidden;
}

.quote-guest-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.quote-guest-accordion-summary::-webkit-details-marker {
  display: none;
}

.quote-guest-accordion-summary strong,
.quote-guest-accordion-summary small {
  display: block;
}

.quote-guest-accordion-summary small {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.quote-guest-accordion-action {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(209, 222, 238, 0.95);
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.quote-guest-accordion[open] .quote-guest-accordion-action {
  color: #b45309;
  background: rgba(255, 247, 237, 0.92);
  border-color: rgba(253, 186, 116, 0.72);
}

.quote-guest-accordion[open] .quote-guest-accordion-action::before {
  content: "Editing - ";
}

.quote-guest-accordion-body {
  padding: 0 18px 18px;
}

.quote-guest-accordion:not([open]) .quote-guest-accordion-body {
  display: none;
}

.quote-guest-accordion:not([open]) .quote-guest-accordion-summary {
  border-bottom: 0;
}

.quote-guest-capture-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-guest-owner-field {
  min-height: 58px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid rgba(209, 222, 238, 0.9);
  border-radius: 16px;
  padding: 10px 12px;
  background: #fff;
}

.quote-guest-owner-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.quote-guest-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(209, 222, 238, 0.88);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.quote-guest-list-item + .quote-guest-list-item {
  margin-top: 10px;
}

.quote-guest-list-item strong {
  display: block;
  color: #101828;
  font-weight: 800;
}

.quote-guest-list-item p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}

.quote-guest-list-item p span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.9);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.quote-guest-empty {
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.65);
  border-radius: 16px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.86);
}

@media (max-width: 1100px) {
  .quote-guest-capture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .quote-guest-accordion-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-guest-accordion-action {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .quote-guest-capture-grid {
    grid-template-columns: 1fr;
  }

  .quote-guest-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-guest-list-item .ghost-button {
    width: 100%;
  }
}

/* Phase 10.10 final sidebar guard: placed at EOF to win over older quote patches. */
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-group > :not(.nav-item),
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item:not([data-quote-desk-nav-label]),
body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[hidden] {
  display: none !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-item[data-quote-desk-nav-label]:not([hidden]) {
  display: flex !important;
}

/* Phase 10.34: final right-rail anti-overlap guard for zoom and narrow desktop. */
body[data-active-section="quote-generator"] .quote-builder-right-column {
  isolation: isolate !important;
  position: sticky !important;
  z-index: 12 !important;
  background: #f4f7fb !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-section,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-copy,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metric {
  position: relative !important;
  z-index: 2 !important;
  background: #ffffff !important;
  background-image: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  mix-blend-mode: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  overflow: hidden !important;
}

/* Route UI polish: keep the quote desk shell inside the viewport while preserving the three-column workflow. */
@media (min-width: 1181px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell {
    overflow-x: clip !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 200px minmax(0, 1fr) minmax(300px, 348px) !important;
    max-width: calc(100vw - 220px) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 348px !important;
  }
}

/* Phase 10.29: source selector should read like a compact setup strip, not a second form. */
@media (min-width: 1181px) {
  body[data-active-section="quote-generator"] .quote-reference-source-panel {
    grid-template-columns: 220px minmax(0, 1fr) 168px !important;
    align-items: end !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-head {
    grid-column: 1 !important;
    grid-template-columns: 1fr !important;
    align-self: center !important;
    gap: 6px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-head p {
    display: none !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-toggle {
    justify-self: start !important;
    min-height: 30px !important;
    padding: 0 13px !important;
    font-size: 0.74rem !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-grid {
    grid-column: 2 !important;
    align-self: end !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-column: 3 !important;
    align-self: end !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-panel > p {
    display: none !important;
  }
}

@media (min-width: 900px) {
  body[data-active-section="quote-generator"] .quote-reference-source-panel {
    grid-template-columns: 208px minmax(0, 1fr) 158px !important;
    align-items: end !important;
    gap: 9px !important;
    padding: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-head {
    grid-column: 1 !important;
    grid-template-columns: 1fr !important;
    align-self: center !important;
    gap: 6px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-head p,
  body[data-active-section="quote-generator"] .quote-reference-source-panel > p {
    display: none !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-toggle {
    justify-self: start !important;
    min-height: 30px !important;
    padding: 0 12px !important;
    font-size: 0.72rem !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-grid {
    grid-column: 2 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-self: end !important;
    gap: 7px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-column: 3 !important;
    grid-template-columns: 1fr !important;
    align-self: end !important;
    gap: 6px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-actions button {
    min-height: 32px !important;
    font-size: 0.69rem !important;
  }
}

/* Phase 10.30: final quote desk layout stabilizer.
   This block intentionally sits after older phase overrides so zoom and cache changes
   resolve to one predictable reference-style layout. */
body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) 380px !important;
  gap: 18px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  width: 380px !important;
  min-width: 380px !important;
  max-width: 380px !important;
  position: sticky !important;
  top: 86px !important;
  height: auto !important;
  max-height: calc(100vh - 104px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
  padding-right: 2px !important;
  align-content: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-pricing-card {
  overflow: visible !important;
  background: #ffffff !important;
  opacity: 1 !important;
  isolation: isolate !important;
  backdrop-filter: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 58px !important;
  padding: 9px 10px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 172px !important;
  gap: 9px 10px !important;
  align-items: end !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head h3 {
  font-size: 0.78rem !important;
  line-height: 1.15 !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-head p {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-toggle {
  min-height: 31px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid {
  grid-column: 1 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-grid select {
  min-height: 34px !important;
  max-width: 100% !important;
  padding: 0 30px 0 10px !important;
  font-size: 0.74rem !important;
  text-overflow: ellipsis !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-actions {
  grid-column: 2 !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-actions button {
  min-height: 32px !important;
  padding: 0 10px !important;
  font-size: 0.69rem !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-reference-source-panel > p {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column .quote-right-rail-section,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-copy,
body[data-active-section="quote-generator"] .quote-builder-right-column .quote-builder-preview-metric {
  background: #ffffff !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-day-row .quote-builder-day-actions,
body[data-active-section="quote-generator"] .quote-builder-itinerary-card .quote-day-actions {
  min-width: 128px !important;
}

body[data-active-section="quote-generator"] [data-quote-remove="day"],
body[data-active-section="quote-generator"] [data-quote-day-remove] {
  border-color: rgba(239, 68, 68, 0.22) !important;
  color: #dc2626 !important;
  background: rgba(254, 242, 242, 0.9) !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions [data-quote-builder-top-action="actions"].is-disabled-action {
  pointer-events: auto !important;
  cursor: not-allowed !important;
}

/* Phase 10.32: keep blocker modal explanation readable instead of vertical word wrapping. */
body[data-active-section="quote-generator"] .quote-so-readiness-dialog {
  width: min(1080px, calc(100vw - 48px)) !important;
}

body[data-active-section="quote-generator"] .quote-so-readiness-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr) !important;
}

body[data-active-section="quote-generator"] .quote-so-readiness-ai-panel,
body[data-active-section="quote-generator"] .quote-so-readiness-ai {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-so-readiness-ai p,
body[data-active-section="quote-generator"] [data-quote-so-ai-copy] {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  white-space: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* Phase 10.33: modal can be appended outside the active quote shell, so keep
   the MAI explanation readable even when body section scoping is unavailable. */
.quote-so-readiness-ai-panel {
  min-width: 360px !important;
}

.quote-so-readiness-ai,
.quote-so-readiness-ai p,
[data-quote-so-ai-copy] {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  inline-size: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: none !important;
  max-width: 100% !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}

[data-quote-so-ai-copy] {
  display: block !important;
  line-height: 1.55 !important;
}

.quote-action-target-pulse {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
  border-radius: 16px;
  transition: box-shadow 0.2s ease, outline-color 0.2s ease;
}

.quote-so-inline-workbench {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(248, 251, 255, 0.96), rgba(255, 247, 237, 0.82));
}

.quote-so-inline-panel {
  display: grid;
  gap: 12px;
}

.quote-so-inline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-so-inline-head strong {
  display: block;
  color: #0f1b3d;
  font-size: 1rem;
}

.quote-so-inline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quote-so-inline-grid label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-so-inline-grid label.quote-so-inline-wide {
  grid-column: span 2;
}

.quote-so-inline-grid input,
.quote-so-inline-grid select,
.quote-so-inline-grid textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  padding: 10px 12px;
  color: #0f1b3d;
  font: inherit;
  background: rgba(255, 255, 255, 0.94);
}

.quote-so-inline-check {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row !important;
  gap: 10px !important;
  min-height: 44px;
  color: #0f1b3d !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.quote-so-inline-check input {
  width: auto;
}

.quote-so-inline-list {
  display: grid;
  gap: 8px;
}

.quote-so-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.quote-so-inline-row strong {
  display: block;
  color: #0f1b3d;
}

.quote-so-inline-row span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.78rem;
}

.quote-so-inline-status {
  color: #64748b;
  font-weight: 800;
}

.quote-so-inline-status.success {
  color: #15803d;
}

.quote-so-inline-status.error {
  color: #dc2626;
}

.quote-day-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.quote-day-editor-modal.is-open {
  display: flex;
}

.quote-day-editor-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(14px) saturate(0.9);
}

.quote-day-editor-modal-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid rgba(191, 219, 254, 0.82);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
  isolation: isolate;
}

.quote-day-editor-modal .quote-day-editor-drawer {
  margin: 0;
  position: relative;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 16px;
  border-radius: 18px;
  box-shadow: none;
}

.quote-day-editor-modal .quote-so-readiness-close {
  position: absolute;
  top: 12px;
  right: 12px;
  float: none;
  margin: 0;
  z-index: 13050;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.quote-day-editor-modal .quote-day-editor-head {
  align-items: flex-start;
  padding-right: 44px;
}

.quote-day-editor-modal .quote-day-editor-actions {
  flex-shrink: 0;
}

.quote-day-editor-modal .quote-day-plan-grid {
  gap: 14px 16px;
}

body[data-active-section="quote-generator"] .quote-day-editor-modal .quote-day-editor-drawer {
  margin: 0;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  border-radius: 18px;
}

.quote-day-editor-modal .quote-day-image-intake {
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
}

.quote-day-editor-modal .quote-day-image-intake-head,
.quote-day-editor-modal .quote-day-image-actions {
  gap: 8px;
}

.quote-day-editor-modal .quote-day-image-intake-grid {
  gap: 10px;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
}

.quote-day-editor-modal .quote-day-image-intake input[type="url"],
.quote-day-editor-modal .quote-day-image-intake input[type="file"] {
  min-height: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.quote-day-editor-modal .quote-day-gallery-browser {
  gap: 7px;
  padding-top: 2px;
}

body[data-active-section="quote-generator"] .quote-day-editor-modal .quote-day-image-intake {
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
}

body[data-active-section="quote-generator"] .quote-day-editor-modal .quote-day-image-intake-grid {
  gap: 10px;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
}

body[data-active-section="quote-generator"] .quote-day-editor-modal .quote-day-gallery-browser {
  gap: 7px;
  padding-top: 2px;
}

body[data-active-section="quote-generator"] .quote-day-package-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

body[data-active-section="quote-generator"] .quote-day-package-gallery-item {
  display: grid;
  gap: 7px;
  padding: 0 0 8px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: #ffffff;
  color: #172554;
  text-align: left;
  cursor: pointer;
}

body[data-active-section="quote-generator"] .quote-day-package-gallery-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

body[data-active-section="quote-generator"] .quote-day-package-gallery-item span {
  padding: 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] .quote-day-editor-modal .quote-day-image-intake input[type="url"],
body[data-active-section="quote-generator"] .quote-day-editor-modal .quote-day-image-intake input[type="file"] {
  min-height: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.quote-day-editor-modal .quote-day-location-search .search-select-control,
.quote-day-editor-modal .quote-day-hotel-search .search-select-control,
.quote-day-editor-modal .quote-day-transport-search .search-select-control,
.quote-day-editor-modal .quote-day-activity-search .search-select-control {
  min-height: 50px;
}

.quote-day-editor-modal .quote-day-location-search .search-select-input,
.quote-day-editor-modal .quote-day-hotel-search .search-select-input,
.quote-day-editor-modal .quote-day-transport-search .search-select-input,
.quote-day-editor-modal .quote-day-activity-search .search-select-input {
  min-height: 50px;
  padding: 12px 46px 12px 16px;
  border-color: rgba(191, 219, 254, 0.95);
  background: #ffffff;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.38);
}

.quote-day-editor-modal .quote-day-location-search .search-select-input::placeholder,
.quote-day-editor-modal .quote-day-hotel-search .search-select-input::placeholder,
.quote-day-editor-modal .quote-day-transport-search .search-select-input::placeholder,
.quote-day-editor-modal .quote-day-activity-search .search-select-input::placeholder {
  color: #64748b;
  opacity: 1;
}

.quote-day-editor-modal .quote-day-location-search .search-select-input:focus,
.quote-day-editor-modal .quote-day-hotel-search .search-select-input:focus,
.quote-day-editor-modal .quote-day-transport-search .search-select-input:focus,
.quote-day-editor-modal .quote-day-activity-search .search-select-input:focus {
  border-color: rgba(249, 115, 22, 0.74);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.16), inset 0 0 0 1px rgba(249, 115, 22, 0.08);
}

.quote-day-editor-modal .quote-day-location-search .search-select-clear,
.quote-day-editor-modal .quote-day-hotel-search .search-select-clear,
.quote-day-editor-modal .quote-day-transport-search .search-select-clear,
.quote-day-editor-modal .quote-day-activity-search .search-select-clear {
  top: 10px;
  right: 10px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  color: #475569;
  background: #eef2f7;
}

.quote-day-editor-modal .quote-day-location-search .search-select-clear:hover,
.quote-day-editor-modal .quote-day-location-search .search-select-clear:focus-visible,
.quote-day-editor-modal .quote-day-hotel-search .search-select-clear:hover,
.quote-day-editor-modal .quote-day-hotel-search .search-select-clear:focus-visible,
.quote-day-editor-modal .quote-day-transport-search .search-select-clear:hover,
.quote-day-editor-modal .quote-day-transport-search .search-select-clear:focus-visible,
.quote-day-editor-modal .quote-day-activity-search .search-select-clear:hover,
.quote-day-editor-modal .quote-day-activity-search .search-select-clear:focus-visible {
  color: #0f172a;
  background: #dbeafe;
}

.quote-day-editor-modal .quote-day-hotel-search,
.quote-day-editor-modal .quote-day-transport-search,
.quote-day-editor-modal .quote-day-activity-search {
  display: grid;
  gap: 6px;
}

.quote-day-editor-modal .quote-day-sightseeing-tags,
.quote-day-editor-modal .quote-day-sightseeing-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-day-editor-modal .quote-day-sightseeing-tags {
  min-height: 22px;
}

.quote-day-editor-modal [data-quote-shared-gallery-region][hidden] {
  display: none !important;
}

.quote-day-editor-modal .quote-day-sightseeing-suggestions .ghost-button,
.quote-day-editor-modal .quote-day-sightseeing-tags .ghost-button {
  min-height: 30px;
  padding: 4px 10px;
}

.quote-day-editor-modal .quote-day-sightseeing-tags .transport-route-sightseeing-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 146, 60, 0.34);
  background: rgba(255, 237, 213, 0.92);
  color: #9a3412;
  font-size: 0.8rem;
  font-weight: 700;
}

.quote-day-editor-modal .quote-day-hotel-price-note {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.quote-day-editor-modal .quote-day-hotel-selected,
.quote-day-editor-modal .quote-day-hotel-options {
  display: grid;
  gap: 10px;
}

.quote-day-editor-modal .quote-day-hotel-selected-card,
.quote-day-editor-modal .quote-day-hotel-option-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

.quote-day-editor-modal .quote-day-hotel-option-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.quote-day-editor-modal .quote-day-hotel-option-card.is-selected,
.quote-day-editor-modal .quote-day-hotel-selected-card {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.94));
}

.quote-day-editor-modal .quote-day-hotel-option-copy,
.quote-day-editor-modal .quote-day-hotel-selected-card > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.quote-day-editor-modal .quote-day-hotel-option-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-day-editor-modal .quote-day-hotel-option-top strong,
.quote-day-editor-modal .quote-day-hotel-selected-card strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.quote-day-editor-modal .quote-day-hotel-option-copy p,
.quote-day-editor-modal .quote-day-hotel-selected-card p,
.quote-day-editor-modal .quote-day-hotel-selected-card span {
  margin: 0;
  color: #64748b;
  overflow-wrap: anywhere;
}

.quote-day-editor-modal .quote-day-hotel-selected-card span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

.quote-day-editor-modal .quote-day-hotel-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-day-editor-modal .quote-day-hotel-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.8);
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
}

.quote-day-editor-modal .quote-day-hotel-pill-muted {
  background: rgba(255, 247, 237, 0.9);
  color: #c2410c;
}

.quote-day-editor-modal .quote-day-hotel-pill-recommended {
  background: rgba(219, 234, 254, 0.92);
  color: #1d4ed8;
}

.quote-day-editor-modal .quote-day-hotel-pill-lowest {
  background: rgba(220, 252, 231, 0.92);
  color: #166534;
}

.quote-day-editor-modal .quote-day-hotel-empty {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  background: rgba(248, 250, 252, 0.86);
  color: #64748b;
  font-weight: 700;
}

.quote-day-editor-modal .quote-route-stop-builder {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(147, 197, 253, 0.72);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.78);
}

.quote-day-editor-modal .quote-route-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-day-editor-modal .quote-route-stop-head > span {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-day-editor-modal .quote-route-stop-list {
  display: grid;
  gap: 8px;
}

.quote-day-editor-modal .quote-route-stop-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) auto;
  gap: 8px;
  align-items: center;
}

.quote-day-editor-modal .quote-route-stop-row select {
  min-height: 50px;
}

.quote-day-editor-modal .quote-route-stop-remove {
  min-height: 46px;
  white-space: nowrap;
}

.quote-day-editor-modal .quote-route-stop-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 820px) {
  .quote-day-editor-modal .quote-route-stop-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-day-editor-modal .quote-route-stop-head {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-day-editor-modal .quote-day-hotel-option-card,
  .quote-day-editor-modal .quote-day-hotel-option-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1540px) and (min-width: 1261px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 206px minmax(560px, 1fr) 348px !important;
    gap: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 206px !important;
    min-width: 206px !important;
    max-width: 206px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 348px !important;
    min-width: 348px !important;
    max-width: 348px !important;
    position: sticky !important;
    top: 86px !important;
    max-height: calc(100vh - 104px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-panel {
    grid-template-columns: minmax(0, 1fr) 154px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-actions button {
    font-size: 0.66rem !important;
  }
}

@media (max-width: 820px) {
  .quote-so-inline-grid {
    grid-template-columns: 1fr;
  }

  .quote-so-inline-grid label.quote-so-inline-wide {
    grid-column: auto;
  }

  .quote-day-editor-modal {
    padding: 12px;
  }

  .quote-day-editor-modal-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 14px;
    border-radius: 22px;
  }
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    background: #f4f7fb !important;
  }

  body[data-active-section="quote-generator"] .sidebar {
    display: none !important;
  }

  body[data-active-section="quote-generator"] .dashboard-main,
  body[data-active-section="quote-generator"] #quoteDashboardSection,
  body[data-active-section="quote-generator"] .quote-builder-reference-grid,
  body[data-active-section="quote-generator"] .quote-builder-reference-shell {
    width: 100% !important;
    max-width: none !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 0 12px 18px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    position: static !important;
    top: auto !important;
    grid-column: 1 !important;
    grid-row: auto !important;
    max-height: none !important;
    overflow: visible !important;
    scrollbar-gutter: auto !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-main-column,
  body[data-active-section="quote-generator"] .quote-builder-hero-card {
    grid-column: 1 !important;
    grid-row: auto !important;
    position: static !important;
    margin: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-right-column {
    margin: 0 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column .quote-gate-status-row {
    grid-template-columns: minmax(86px, 0.9fr) minmax(0, 1fr) minmax(90px, 0.8fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-panel,
  body[data-active-section="quote-generator"] .quote-reference-source-grid,
  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-source-grid,
  body[data-active-section="quote-generator"] .quote-reference-source-actions {
    grid-column: 1 / -1 !important;
  }
}

/* Route UI polish EOF guard: compact desktop quote desk stays inside the viewport. */
@media (min-width: 1261px) and (max-width: 1440px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell {
    overflow-x: clip !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 180px minmax(0, 1fr) 300px !important;
    gap: 12px !important;
    max-width: calc(100vw - 204px) !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-right-column {
    width: 300px !important;
    min-width: 0 !important;
    max-width: 300px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
  body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
    min-width: 88px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Final Quote Desk override: actual EOF guard. */
body[data-active-section="quote-generator"] .quote-builder-topbar {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  padding-top: 12px !important;
  justify-content: stretch !important;
}

body[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button,
body[data-active-section="quote-generator"] .quote-builder-primary-actions .quote-builder-action-link {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 0 12px !important;
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-builder-topbar-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-utility {
    justify-content: flex-start !important;
  }
}

/* Quote Day editor recovery modal */
body[data-active-section="quote-generator"] .quote-day-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 22000 !important;
  display: grid;
  place-items: center;
  padding: 24px;
}

body[data-active-section="quote-generator"] .quote-day-editor-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  z-index: 0;
}

body[data-active-section="quote-generator"] .quote-day-editor-panel {
  position: relative;
  z-index: 1;
  width: min(860px, 96vw);
  max-height: min(760px, 88vh);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #dbe6f5;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

body[data-active-section="quote-generator"] .quote-day-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

body[data-active-section="quote-generator"] .quote-day-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-active-section="quote-generator"] .quote-day-editor-notes {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-day-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* Quote Desk day-card restore pass: wide editor + compact non-overlap cards. */
body[data-active-section="quote-generator"] .quote-reference-day-card {
  display: grid !important;
  grid-template-columns: 62px minmax(132px, 190px) minmax(0, 1fr) minmax(150px, 180px) !important;
  gap: 16px !important;
  align-items: center !important;
  padding: 18px !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-image {
  width: 100% !important;
  min-width: 0 !important;
  aspect-ratio: 16 / 10 !important;
  border-radius: 14px !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 6px !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-copy p {
  margin: 0 !important;
  overflow-wrap: anywhere !important;
  line-height: 1.35 !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-title-row strong {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 2px !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-tags span {
  border-radius: 999px !important;
  background: #e8f4ff !important;
  color: #1d4ed8 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  padding: 5px 9px !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  min-width: 0 !important;
  align-self: stretch !important;
  align-content: center !important;
}

body[data-active-section="quote-generator"] .quote-reference-day-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-reference-day-actions .danger-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  white-space: normal !important;
  line-height: 1.15 !important;
}

body[data-active-section="quote-generator"] .quote-template-storage-focus {
  outline: 3px solid rgba(249, 115, 22, 0.42) !important;
  box-shadow: 0 22px 52px rgba(249, 115, 22, 0.2) !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-dashboard-hero,
body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-desk-secondary-tools > summary,
body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-ai-summary-panel,
body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-recent-panel,
body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-builder-grid {
  display: none !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace {
  display: block !important;
  width: min(1180px, 100%) !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body[data-active-section="quote-templates"] #workspaceShellBar {
  display: none !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-desk-secondary-tools {
  display: block !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-desk-secondary-tools-body {
  display: block !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
  display: block !important;
  max-width: none !important;
  padding: clamp(16px, 2.4vw, 28px) !important;
  border: 1px solid rgba(226, 232, 240, 0.92) !important;
  border-radius: clamp(18px, 2vw, 26px) !important;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 42%, #f8fbff 100%) !important;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.09) !important;
  overflow: hidden !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel .panel-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
}

body[data-active-section="quote-templates"] #quoteTemplateSummaryPill {
  justify-self: end !important;
  max-width: 100% !important;
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-filter-grid {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-meta-grid {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-meta-grid .field-span-2 {
  grid-column: span 2 !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-actions > button {
  min-width: 180px !important;
  min-height: 44px !important;
  white-space: normal !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 12px !important;
  margin-top: 16px !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-item {
  min-width: 0 !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.86) !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-item-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-item-copy {
  min-width: 0 !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-item-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-item-actions > button {
  min-height: 38px !important;
  white-space: normal !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-tag-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-tag-row span {
  border-radius: 999px !important;
  background: rgba(249, 115, 22, 0.1) !important;
  color: #b45309 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 5px 9px !important;
}

@media (max-width: 900px) {
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace {
    width: 100% !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-filter-grid,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
    border-radius: 18px !important;
    padding: 14px !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel .panel-header,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-filter-grid,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-meta-grid,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-list,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-item-top {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-meta-grid .field-span-2 {
    grid-column: auto !important;
  }

  body[data-active-section="quote-templates"] #quoteTemplateSummaryPill {
    justify-self: stretch !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-actions,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-actions > button,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-item-actions > button {
    width: 100% !important;
  }
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-list-workspace {
  background: #fff !important;
}

#quoteBatchInventoryPanel {
  display: none;
}

body[data-active-section="departure-batches"] #workspaceShellBar,
body[data-active-section="departure-batches"] #quoteDashboardSection .quote-dashboard-hero,
body[data-active-section="departure-batches"] #quoteDashboardSection .quote-desk-secondary-tools > summary,
body[data-active-section="departure-batches"] #quoteDashboardSection .quote-ai-summary-panel,
body[data-active-section="departure-batches"] #quoteDashboardSection .quote-recent-panel,
body[data-active-section="departure-batches"] #quoteDashboardSection #quoteTemplateStoragePanel,
body[data-active-section="departure-batches"] #quoteDashboardSection .quote-builder-grid {
  display: none !important;
}

body[data-active-section="departure-batches"] #quoteDashboardSection.is-departure-batches-workspace {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100dvh - 40px) !important;
  margin: 0 !important;
  padding: 0 !important;
}

body[data-active-section="departure-batches"] #quoteDashboardSection.is-departure-batches-workspace .quote-desk-secondary-tools {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

body[data-active-section="departure-batches"] #quoteDashboardSection.is-departure-batches-workspace .quote-desk-secondary-tools-body {
  display: flex !important;
  flex: 1 1 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body[data-active-section="departure-batches"] #quoteBatchInventoryPanel {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-height: calc(100dvh - 56px) !important;
  max-width: none !important;
  padding: clamp(14px, 2vw, 22px) !important;
  border: 1px solid rgba(226, 232, 240, 0.92) !important;
  border-radius: clamp(18px, 2vw, 26px) !important;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 42%, #f8fbff 100%) !important;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.09) !important;
}

.quote-batch-inventory-grid {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  min-height: 0;
}

.quote-batch-inventory-form,
.quote-batch-inventory-list-card {
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.055);
  padding: 14px;
}

.quote-batch-inventory-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.quote-batch-inventory-form[hidden] {
  display: none !important;
}

.quote-batch-inventory-list-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: clamp(460px, 58dvh, 760px);
}

.quote-batch-inventory-form h4,
.quote-batch-inventory-list-card h4 {
  margin: 0;
  font-size: 17px;
}

.quote-batch-inventory-form-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 9px !important;
  align-items: end !important;
}

.quote-batch-inventory-form > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  align-items: end;
}

.quote-batch-inventory-form > div:first-child .eyebrow {
  grid-column: 1 / -1;
}

.quote-batch-inventory-form > div:first-child h4 {
  white-space: nowrap;
}

.quote-batch-inventory-form > div:first-child .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.quote-batch-inventory-form-grid .form-group {
  min-width: 0;
}

.quote-batch-inventory-form-grid input,
.quote-batch-inventory-form-grid select {
  min-width: 0;
  height: 42px;
  padding-block: 8px;
}

.quote-batch-inventory-form-grid .field-span-2 {
  grid-column: span 2 !important;
}

.quote-batch-inventory-form .quote-builder-batch-transport-meta,
.quote-batch-inventory-form .quote-builder-batch-create-hints,
.quote-batch-inventory-form .detail-action-row,
.quote-batch-inventory-form .form-status {
  grid-column: 1 / -1;
}

.quote-batch-inventory-form .quote-builder-batch-transport-meta {
  margin: 2px 0 0;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.88);
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  padding: 8px 10px;
}

.quote-batch-inventory-form .quote-builder-batch-create-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.quote-batch-inventory-form .quote-builder-batch-create-hint {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 146, 60, 0.26);
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.92);
  color: #9a3412;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 7px 9px;
  white-space: nowrap;
}

.quote-batch-inventory-form .quote-builder-batch-create-hint.is-ready {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(240, 253, 244, 0.95);
  color: #15803d;
}

.quote-batch-inventory-form .detail-action-row {
  justify-content: flex-start;
  margin-top: 0;
  gap: 8px;
}

.quote-batch-inventory-form .detail-action-row .btn {
  min-height: 42px;
  padding: 9px 16px;
}

.quote-batch-inventory-form .form-status {
  margin: 0;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.78);
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
  padding: 8px 10px;
}

.quote-batch-inventory-list {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.quote-batch-inventory-item {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(130px, 0.78fr) minmax(210px, 1.25fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: #fff;
  padding: 9px 11px;
}

.quote-batch-inventory-item strong {
  display: block;
  color: #0f172a;
}

.quote-batch-inventory-item p {
  margin: 4px 0 0;
  color: #64748b;
}

.quote-batch-inventory-row-cell {
  min-width: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.quote-batch-inventory-row-cell strong {
  color: #0f172a;
}

.quote-batch-inventory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.quote-batch-inventory-meta span {
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

body[data-active-section="quote-generator"] #quoteBatchCreatePanel,
body[data-active-section="quote-generator"] .quote-builder-batch-create-header,
body[data-active-section="quote-generator"] #quoteBatchCreateTransportMeta,
body[data-active-section="quote-generator"] #quoteBatchCreateGuardrailList,
body[data-active-section="quote-generator"] #quoteBatchCreateStatus {
  display: none !important;
}

@media (max-width: 980px) {
  .quote-batch-inventory-form,
  .quote-batch-inventory-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .quote-batch-inventory-form .quote-builder-batch-transport-meta,
  .quote-batch-inventory-form .quote-builder-batch-create-hints,
  .quote-batch-inventory-form .detail-action-row,
  .quote-batch-inventory-form .form-status {
    grid-column: 1 / -1;
  }

  .quote-batch-inventory-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

@media (max-width: 720px) {
  body[data-active-section="departure-batches"] #quoteBatchInventoryPanel {
    min-height: auto !important;
    padding: 14px !important;
  }

  .quote-batch-inventory-form-grid,
  .quote-batch-inventory-form,
  .quote-batch-inventory-item {
    grid-template-columns: 1fr !important;
  }

  .quote-batch-inventory-list-card {
    min-height: 420px;
  }

  .quote-batch-inventory-meta {
    gap: 5px;
  }
}

body[data-active-section="quote-templates"] .quote-template-workspace-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  margin-bottom: 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-workspace-head h3 {
  margin: 0 !important;
  font-size: clamp(22px, 1.8vw, 28px) !important;
  line-height: 1.05 !important;
}

body[data-active-section="quote-templates"] .quote-template-workspace-head .muted {
  max-width: 520px !important;
  margin: 6px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
}

body[data-active-section="quote-templates"] .quote-template-head-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: flex-end !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 8px 0 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-card {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
  min-height: 58px !important;
  padding: 8px !important;
  border: 1px solid #e4eaf3 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045) !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-icon {
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-icon.is-all { color: #f45b18 !important; background: #fff1e8 !important; }
body[data-active-section="quote-templates"] .quote-template-metric-icon.is-approved { color: #16a34a !important; background: #dcfce7 !important; }
body[data-active-section="quote-templates"] .quote-template-metric-icon.is-draft { color: #2563eb !important; background: #dbeafe !important; }
body[data-active-section="quote-templates"] .quote-template-metric-icon.is-pending { color: #d97706 !important; background: #fef3c7 !important; }
body[data-active-section="quote-templates"] .quote-template-metric-icon.is-archived { color: #7c3aed !important; background: #f3e8ff !important; }

body[data-active-section="quote-templates"] .quote-template-metric-card span:not(.quote-template-metric-icon) {
  display: block !important;
  color: #475569 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-card strong {
  display: block !important;
  margin-top: 1px !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-card small {
  color: #667085 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

body[data-active-section="quote-templates"] .quote-template-library-shell {
  border: 1px solid #e4eaf3 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.07) !important;
  overflow: hidden !important;
}

body[data-active-section="quote-templates"] .quote-template-toolbar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 10px !important;
  border-bottom: 1px solid #e4eaf3 !important;
}

body[data-active-section="quote-templates"] .quote-template-search-field input {
  width: min(560px, 100%) !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body[data-active-section="quote-templates"] .quote-template-view-tools {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  justify-content: flex-end !important;
}

body[data-active-section="quote-templates"] .quote-template-view-tools .primary-button,
body[data-active-section="quote-templates"] .quote-template-view-tools .ghost-button,
body[data-active-section="quote-templates"] .quote-template-head-actions .primary-button,
body[data-active-section="quote-templates"] .quote-template-head-actions .ghost-button {
  min-height: 36px !important;
  padding: 8px 13px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

body[data-active-section="quote-templates"] .quote-template-library-shell .quote-template-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 0 10px 8px !important;
  margin-top: 0 !important;
}

body[data-active-section="quote-templates"] .quote-template-status-tabs {
  display: flex !important;
  gap: 6px !important;
  overflow: auto !important;
  padding: 0 10px 8px !important;
}

body[data-active-section="quote-templates"] .quote-template-status-tab {
  flex: 0 0 auto !important;
  min-height: 30px !important;
  border: 1px solid #e4eaf3 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #1f2937 !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-templates"] .quote-template-status-tab.is-active {
  color: #fff !important;
  border-color: transparent !important;
  background: #f45b18 !important;
  box-shadow: 0 10px 20px rgba(244, 91, 24, 0.22) !important;
}

body[data-active-section="quote-templates"] .quote-template-record-list {
  display: block !important;
  margin-top: 0 !important;
}

body[data-active-section="quote-templates"] .quote-template-table-shell {
  overflow: auto !important;
}

body[data-active-section="quote-templates"] .quote-template-table {
  width: 100% !important;
  min-width: 1060px !important;
  border-collapse: collapse !important;
  background: #fff !important;
  font-size: 11px !important;
}

body[data-active-section="quote-templates"] .quote-template-table th,
body[data-active-section="quote-templates"] .quote-template-table td {
  border-top: 1px solid #edf2f7 !important;
  padding: 5px 9px !important;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-templates"] .quote-template-list-workspace.is-compact-density .quote-template-table th,
body[data-active-section="quote-templates"] .quote-template-list-workspace.is-compact-density .quote-template-table td {
  padding: 3px 7px !important;
  font-size: 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-list-workspace.is-compact-density .quote-template-row-actions .primary-button,
body[data-active-section="quote-templates"] .quote-template-list-workspace.is-compact-density .quote-template-row-actions .ghost-button {
  min-height: 22px !important;
  padding: 2px 7px !important;
  font-size: 9px !important;
}

body[data-active-section="quote-templates"] .quote-template-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 1 !important;
  color: #475569 !important;
  background: #fbfdff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

body[data-active-section="quote-templates"] .quote-template-table-row:hover {
  background: #fff7ed !important;
}

body[data-active-section="quote-templates"] .quote-template-check {
  display: inline-block !important;
  width: 13px !important;
  height: 13px !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 4px !important;
}

body[data-active-section="quote-templates"] .quote-template-record-name {
  display: grid !important;
  min-width: 220px !important;
  gap: 2px !important;
}

body[data-active-section="quote-templates"] .quote-template-record-name strong {
  max-width: 260px !important;
  overflow: hidden !important;
  color: #111827 !important;
  font-weight: 900 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-templates"] .quote-template-record-name span,
body[data-active-section="quote-templates"] .quote-template-table td > span {
  display: block !important;
  color: #667085 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

body[data-active-section="quote-templates"] .quote-template-state-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  padding: 3px 8px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-templates"] .quote-template-state-pill.is-approved { color: #07893f !important; background: #dcfce7 !important; }
body[data-active-section="quote-templates"] .quote-template-state-pill.is-draft { color: #1d4ed8 !important; background: #dbeafe !important; }
body[data-active-section="quote-templates"] .quote-template-state-pill.is-pending { color: #ea580c !important; background: #ffedd5 !important; }
body[data-active-section="quote-templates"] .quote-template-state-pill.is-archived { color: #7c3aed !important; background: #f3e8ff !important; }

body[data-active-section="quote-templates"] .quote-template-route-cell {
  max-width: 420px !important;
  overflow: hidden !important;
  color: #475569 !important;
  font-weight: 700 !important;
  text-overflow: ellipsis !important;
}

body[data-active-section="quote-templates"] .quote-template-row-actions {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

body[data-active-section="quote-templates"] .quote-template-row-actions .primary-button,
body[data-active-section="quote-templates"] .quote-template-row-actions .ghost-button {
  min-height: 26px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

body[data-active-section="quote-templates"] .quote-template-row-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

body[data-active-section="quote-templates"] .quote-template-row-tags span {
  border-radius: 999px !important;
  color: #c2410c !important;
  background: #fff1e8 !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-templates"] .quote-template-mobile-list {
  display: none !important;
}

body[data-active-section="quote-templates"] .quote-template-editor-shell {
  margin-top: 14px !important;
  border: 1px solid #e4eaf3 !important;
  border-radius: 18px !important;
  background: #fff !important;
  padding: 12px !important;
}

body[data-active-section="quote-templates"] .quote-template-editor-shell > summary {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  cursor: pointer !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-templates"] .quote-template-editor-shell > summary span {
  color: #f45b18 !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
}

body[data-active-section="quote-templates"] .quote-template-editor-shell .quote-template-actions {
  margin-top: 12px !important;
}

@media (min-width: 1500px) and (min-height: 900px) {
  body[data-active-section="quote-templates"] .quote-template-metric-card {
    min-height: 62px !important;
    padding: 8px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 12px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-table th,
  body[data-active-section="quote-templates"] .quote-template-table td {
    padding: 3px 8px !important;
    font-size: 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-row-actions .primary-button,
  body[data-active-section="quote-templates"] .quote-template-row-actions .ghost-button {
    min-height: 22px !important;
    padding: 2px 7px !important;
    font-size: 9px !important;
  }
}

@media (max-width: 900px) {
  body[data-active-section="quote-templates"] .quote-template-workspace-head,
  body[data-active-section="quote-templates"] .quote-template-toolbar {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-templates"] .quote-template-head-actions,
  body[data-active-section="quote-templates"] .quote-template-view-tools {
    justify-content: stretch !important;
  }

  body[data-active-section="quote-templates"] .quote-template-head-actions > *,
  body[data-active-section="quote-templates"] .quote-template-view-tools > * {
    width: 100% !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-grid {
    display: flex !important;
    gap: 8px !important;
    overflow: auto !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-card {
    flex: 0 0 140px !important;
    min-height: 64px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-library-shell .quote-template-filter-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-templates"] .quote-template-table-shell {
    display: none !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-list {
    display: grid !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-card {
    display: grid !important;
    gap: 10px !important;
    border: 1px solid #e4eaf3 !important;
    border-radius: 16px !important;
    background: #fff !important;
    padding: 12px !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-head strong {
    display: block !important;
    color: #111827 !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-head span:not(.quote-template-state-pill) {
    display: block !important;
    color: #667085 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    margin-top: 3px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-meta > span {
    min-width: 0 !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    padding: 8px !important;
    color: #111827 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-meta small {
    display: block !important;
    color: #667085 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-card p {
    margin: 0 !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }
}

@media (max-width: 520px) {
  body[data-active-section="quote-templates"] .quote-template-list-workspace {
    padding: 0 !important;
  }

  body[data-active-section="quote-templates"] .quote-template-workspace-head,
  body[data-active-section="quote-templates"] .quote-template-library-shell {
    border-radius: 18px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-meta {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-head {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-templates"] .quote-template-row-actions {
    flex-wrap: wrap !important;
  }

  body[data-active-section="quote-templates"] .quote-template-row-actions .primary-button,
  body[data-active-section="quote-templates"] .quote-template-row-actions .ghost-button {
    flex: 1 1 110px !important;
  }
}

body[data-active-section="quote-templates"] .dashboard-main {
  width: 100% !important;
  max-width: none !important;
  align-items: stretch !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace {
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100vh - 48px) !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100vh - 72px) !important;
  margin: 0 !important;
  border-radius: 22px !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-library-shell {
  width: 100% !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-visual-builder {
  grid-template-columns: minmax(128px, 180px) minmax(0, 1fr) !important;
  align-items: stretch !important;
}

body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-image-preview {
  min-height: 116px !important;
}

body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-image-preview.is-empty {
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
}

@media (max-width: 920px) {
  body[data-active-section="quote-generator"] .quote-day-master-card .quote-day-visual-builder {
    grid-template-columns: 1fr !important;
  }
}

body[data-active-section="quote-generator"] .quote-day-editor-panel {
  width: min(980px, 96vw) !important;
  max-height: min(900px, 92vh) !important;
  padding: 22px !important;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 44%, #f8fbff 100%) !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-head {
  align-items: center !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-head > div {
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-head h3 {
  margin: 6px 0 0 !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-section {
  border: 1px solid #cfe0f7 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  padding: 16px !important;
  margin-bottom: 16px !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body[data-active-section="quote-generator"] .quote-day-local-optimize {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-weight: 700 !important;
  color: #334155 !important;
}

body[data-active-section="quote-generator"] .quote-day-gallery-browser {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  border-top: 1px dashed #cfe0f7 !important;
  margin-top: 12px !important;
  padding-top: 10px !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 16px !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-wide {
  grid-column: 1 / -1 !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border: 1px solid #dbe6f5 !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
  padding: 11px 14px !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-summary span {
  min-width: 0 !important;
  text-align: right !important;
  overflow-wrap: anywhere !important;
  color: #64748b !important;
}

body[data-active-section="quote-generator"] .quote-day-editor-panel .field small,
body[data-active-section="quote-generator"] .quote-day-editor-panel .microcopy {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

@media (max-width: 1260px) {
  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: 52px minmax(120px, 170px) minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-actions {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
  }
}

/* Quote Desk shell reset: keep the global YatraMatrix chrome stable. */
body[data-active-section="quote-generator"] .app-shell {
  grid-template-columns: 308px minmax(0, 1fr) !important;
  gap: 28px !important;
  min-height: 100vh !important;
  padding: 24px !important;
  background: transparent !important;
  justify-content: stretch !important;
}

body[data-active-section="quote-generator"] .dashboard-main {
  width: auto !important;
  max-width: none !important;
}

body[data-active-section="quote-generator"] .sidebar {
  position: sticky !important;
  top: 24px !important;
  z-index: 30 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: calc(100vh - 48px) !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  gap: 20px !important;
  padding: 24px 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at top, rgba(251, 146, 60, 0.2), transparent 26%),
    linear-gradient(180deg, #10182d 0%, #0f172a 52%, #172554 100%) !important;
  box-shadow: 0 36px 75px rgba(15, 23, 42, 0.3) !important;
}

body[data-active-section="quote-generator"] .brand-logo {
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
}

body[data-active-section="quote-generator"] .brand-block h1 {
  color: #ffffff !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}

body[data-active-section="quote-generator"] .brand-block h1::after,
body[data-active-section="quote-generator"] .nav-item::before {
  content: none !important;
  display: none !important;
}

body[data-active-section="quote-generator"] .brand-block .eyebrow,
body[data-active-section="quote-generator"] .nav-group-label,
body[data-active-section="quote-generator"] .nav-item-helper,
body[data-active-section="quote-generator"] .nav-item small {
  display: initial !important;
}

body[data-active-section="quote-generator"] .nav-group {
  display: grid !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-active-section="quote-generator"] .sidebar[data-quote-desk-reference-nav="true"] .nav-group > :not(.nav-item) {
  display: block !important;
}

body[data-active-section="quote-generator"] .sidebar .nav-item[hidden],
body[data-active-section="quote-generator"] .sidebar .nav-item[data-nav-visibility="nested"],
body[data-active-section="quote-generator"] .sidebar .nav-item[data-phase10-visibility] {
  display: none !important;
}

body[data-active-section="quote-generator"] .sidebar .nav-item:not([hidden]):not([data-nav-visibility="nested"]):not([data-phase10-visibility]) {
  display: flex !important;
}

body[data-active-section="quote-generator"] .nav-item {
  min-height: 48px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  gap: 10px !important;
  border-radius: 14px !important;
  color: rgba(241, 245, 249, 0.78) !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  box-shadow: none !important;
}

body[data-active-section="quote-generator"] .nav-item:hover,
body[data-active-section="quote-generator"] .nav-item.active,
body[data-active-section="quote-generator"] .nav-item[data-section="quote-generator"] {
  transform: translateX(4px) !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.22), rgba(220, 38, 38, 0.22)) !important;
  border-color: rgba(251, 146, 60, 0.28) !important;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.16) !important;
}

body[data-active-section="quote-generator"] #quoteInternalPricingPanel {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 320px !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  order: 1 !important;
}

@media (min-width: 1181px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
    grid-template-columns: 220px minmax(0, 1fr) minmax(260px, 320px) !important;
    max-width: none !important;
  }
}

@media (max-width: 1220px) {
  body[data-active-section="quote-generator"] .app-shell {
    grid-template-columns: 280px minmax(0, 1fr) !important;
  }
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }

  body[data-active-section="quote-generator"] .dashboard-main,
  body[data-active-section="quote-generator"] #quoteDashboardSection,
  body[data-active-section="quote-generator"] .quote-builder-grid,
  body[data-active-section="quote-generator"] .quote-builder-reference-shell,
  body[data-active-section="quote-generator"] .quote-builder-form {
    width: 100% !important;
    max-width: none !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .app-shell {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
  }

  body[data-active-section="quote-generator"] .sidebar {
    position: static !important;
    height: auto !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-reference-day-card {
    grid-template-columns: 48px minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-image {
    grid-column: 2 !important;
    max-width: 240px !important;
  }

  body[data-active-section="quote-generator"] .quote-reference-day-copy,
  body[data-active-section="quote-generator"] .quote-reference-day-actions {
    grid-column: 1 / -1 !important;
  }

  body[data-active-section="quote-generator"] .quote-day-editor-head,
  body[data-active-section="quote-generator"] .quote-day-editor-section-head,
  body[data-active-section="quote-generator"] .quote-day-editor-summary {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body[data-active-section="quote-generator"] .quote-day-editor-summary span {
    text-align: left !important;
  }
}

/* Template Storage is a record-management workspace, so it should use the full
   right-side canvas instead of behaving like a centered dashboard card. */
body[data-active-section="quote-templates"] {
  min-height: 100dvh !important;
}

body[data-active-section="quote-templates"] .app-shell {
  display: flex !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 100dvh !important;
  height: 100dvh !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body[data-active-section="quote-templates"] .dashboard-main {
  flex: 1 1 auto !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: calc(100dvh - 24px) !important;
  overflow: hidden !important;
}

body[data-active-section="quote-templates"] .sidebar {
  flex: 0 0 300px !important;
  width: 300px !important;
  height: calc(100dvh - 24px) !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body[data-active-section="quote-templates"] .dashboard-main > .topbar {
  display: none !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
  box-sizing: border-box !important;
  position: absolute !important;
  inset: 0 !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 18px !important;
}

body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-library-shell,
body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-table-shell,
body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-template-table {
  width: 100% !important;
  max-width: none !important;
}

/* Template Storage final list mode: keep records visible on the first screen. */
body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow: hidden !important;
  padding: 16px !important;
}

body[data-active-section="quote-templates"] .quote-template-workspace-head {
  margin-bottom: 0 !important;
}

body[data-active-section="quote-templates"] .quote-template-workspace-head h3 {
  font-size: 24px !important;
}

body[data-active-section="quote-templates"] .quote-template-workspace-head .muted {
  margin-top: 3px !important;
}

body[data-active-section="quote-templates"] .quote-template-head-actions .pill {
  min-height: 34px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr)) !important;
  gap: 6px !important;
  margin: 0 !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-card {
  grid-template-columns: 26px minmax(0, 1fr) !important;
  min-height: 40px !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-icon {
  width: 24px !important;
  height: 24px !important;
  border-radius: 8px !important;
  font-size: 8px !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-card span:not(.quote-template-metric-icon) {
  display: none !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-card strong {
  display: inline !important;
  margin: 0 4px 0 0 !important;
  font-size: 18px !important;
}

body[data-active-section="quote-templates"] .quote-template-metric-card small {
  display: inline !important;
  font-size: 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-library-shell {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05) !important;
}

body[data-active-section="quote-templates"] .quote-template-toolbar {
  grid-template-columns: minmax(280px, 1fr) auto !important;
  padding: 8px !important;
}

body[data-active-section="quote-templates"] .quote-template-search-field input {
  min-height: 32px !important;
}

body[data-active-section="quote-templates"] .quote-template-view-tools .primary-button,
body[data-active-section="quote-templates"] .quote-template-view-tools .ghost-button,
body[data-active-section="quote-templates"] .quote-template-head-actions .primary-button,
body[data-active-section="quote-templates"] .quote-template-head-actions .ghost-button {
  min-height: 32px !important;
  padding: 6px 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-library-shell .quote-template-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 0 8px 6px !important;
}

body[data-active-section="quote-templates"] .quote-template-library-shell .quote-template-filter-grid .field {
  gap: 3px !important;
}

body[data-active-section="quote-templates"] .quote-template-library-shell .quote-template-filter-grid select {
  min-height: 32px !important;
  padding: 6px 30px 6px 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-status-tabs {
  padding: 0 8px 6px !important;
}

body[data-active-section="quote-templates"] .quote-template-status-tab {
  min-height: 26px !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-record-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: block !important;
  position: relative !important;
  z-index: 2 !important;
  background: #fff !important;
}

body[data-active-section="quote-templates"] .quote-template-table-shell {
  height: 100% !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  position: relative !important;
  z-index: 3 !important;
  background: #fff !important;
  isolation: isolate !important;
}

body[data-active-section="quote-templates"] .quote-template-table {
  min-width: 1280px !important;
  table-layout: auto !important;
  position: relative !important;
  z-index: 4 !important;
}

body[data-active-section="quote-templates"] .quote-template-table th,
body[data-active-section="quote-templates"] .quote-template-table td {
  height: 24px !important;
  padding: 3px 7px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
}

body[data-active-section="quote-templates"] .quote-template-record-name {
  min-width: 0 !important;
}

body[data-active-section="quote-templates"] .quote-template-record-name strong {
  max-width: 260px !important;
}

body[data-active-section="quote-templates"] .quote-template-route-cell {
  max-width: 360px !important;
}

body[data-active-section="quote-templates"] .quote-template-row-actions {
  gap: 4px !important;
}

body[data-active-section="quote-templates"] .quote-template-row-actions .primary-button,
body[data-active-section="quote-templates"] .quote-template-row-actions .ghost-button {
  min-height: 22px !important;
  padding: 2px 6px !important;
  font-size: 9px !important;
}

body[data-active-section="quote-templates"] .quote-template-editor-shell {
  display: none !important;
}

body[data-active-section="quote-templates"] .quote-template-builder-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* Template Storage interaction completion: real selection, bulk menu and Kanban. */
body[data-active-section="quote-templates"] .quote-template-check {
  appearance: auto !important;
  display: inline-block !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 3px !important;
  accent-color: #f45b18 !important;
  cursor: pointer !important;
}

body[data-active-section="quote-templates"] .quote-template-table {
  width: 100% !important;
  min-width: 1100px !important;
  table-layout: fixed !important;
}

body[data-active-section="quote-templates"] .quote-template-table th:nth-child(1) { width: 34px !important; }
body[data-active-section="quote-templates"] .quote-template-table th:nth-child(2) { width: 17% !important; }
body[data-active-section="quote-templates"] .quote-template-table th:nth-child(3) { width: 12% !important; }
body[data-active-section="quote-templates"] .quote-template-table th:nth-child(4) { width: 7% !important; }
body[data-active-section="quote-templates"] .quote-template-table th:nth-child(5) { width: 8% !important; }
body[data-active-section="quote-templates"] .quote-template-table th:nth-child(7) { width: 9% !important; }
body[data-active-section="quote-templates"] .quote-template-table th:nth-child(8) { width: 9% !important; }
body[data-active-section="quote-templates"] .quote-template-table th:nth-child(9) { width: 190px !important; }

body[data-active-section="quote-templates"] .quote-template-row-actions {
  flex-wrap: wrap !important;
}

body[data-active-section="quote-templates"] .quote-template-table-row.is-selected,
body[data-active-section="quote-templates"] .quote-template-mobile-card.is-selected,
body[data-active-section="quote-templates"] .quote-template-kanban-card.is-selected {
  background: #fff4eb !important;
  box-shadow: inset 3px 0 #f45b18 !important;
}

body[data-active-section="quote-templates"] .quote-template-bulk-control {
  position: relative !important;
}

body[data-active-section="quote-templates"] .quote-template-bulk-menu {
  position: absolute !important;
  z-index: 80 !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  display: grid !important;
  min-width: 220px !important;
  gap: 5px !important;
  padding: 10px !important;
  border: 1px solid #dbe3ed !important;
  border-radius: 13px !important;
  background: #fff !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18) !important;
}

body[data-active-section="quote-templates"] .quote-template-bulk-menu.hidden {
  display: none !important;
}

body[data-active-section="quote-templates"] .quote-template-bulk-menu > strong {
  padding: 4px 7px 8px !important;
  color: #475569 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

body[data-active-section="quote-templates"] .quote-template-bulk-menu > button {
  width: 100% !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: #25324a !important;
  background: #f6f8fb !important;
  text-align: left !important;
  font: inherit !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

body[data-active-section="quote-templates"] .quote-template-bulk-menu > button:hover {
  color: #9a3412 !important;
  background: #fff0e8 !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(220px, 1fr)) !important;
  gap: 10px !important;
  min-width: 980px !important;
  padding: 10px !important;
  overflow-x: auto !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-column {
  min-width: 0 !important;
  padding: 9px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-column > header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 8px !important;
  color: #334155 !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-column > header span {
  min-width: 24px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: #e2e8f0 !important;
  text-align: center !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-column > div {
  display: grid !important;
  gap: 8px !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-card {
  display: grid !important;
  gap: 7px !important;
  padding: 11px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-card > strong {
  color: #172033 !important;
  font-size: 12px !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-card > span,
body[data-active-section="quote-templates"] .quote-template-kanban-card > p {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 10px !important;
}

body[data-active-section="quote-templates"] .quote-template-kanban-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body[data-active-section="quote-templates"] #quoteTemplateStoragePanel.is-editor-open .quote-template-editor-shell {
  display: block !important;
  position: relative !important;
  z-index: 6 !important;
}

body[data-active-section="quote-templates"] .app-boot-screen {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 900px) {
  body[data-active-section="quote-templates"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body[data-active-section="quote-templates"] .app-shell {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100dvh !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px !important;
    gap: 8px !important;
    overflow: auto !important;
    overflow-x: hidden !important;
  }

  body[data-active-section="quote-templates"] .sidebar {
    display: none !important;
  }

  body[data-active-section="quote-templates"] .dashboard-main {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: calc(100dvh - 16px) !important;
    overflow: visible !important;
    overflow-x: hidden !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: calc(100dvh - 16px) !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
    padding: 12px !important;
    border-radius: 18px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-workspace-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  body[data-active-section="quote-templates"] .quote-template-workspace-head h3 {
    font-size: clamp(26px, 8vw, 36px) !important;
    line-height: 1.05 !important;
  }

  body[data-active-section="quote-templates"] .quote-template-workspace-head .muted {
    max-width: none !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  body[data-active-section="quote-templates"] .quote-template-head-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  body[data-active-section="quote-templates"] .quote-template-head-actions > * {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  body[data-active-section="quote-templates"] #quoteTemplateSummaryPill {
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-card {
    min-width: 0 !important;
    min-height: 78px !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    padding: 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 12px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-card span:not(.quote-template-metric-icon) {
    display: block !important;
    font-size: 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-card strong {
    display: block !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  body[data-active-section="quote-templates"] .quote-template-metric-card small {
    display: block !important;
    font-size: 11px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-library-shell {
    min-height: 0 !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-templates"] .quote-template-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-search-field,
  body[data-active-section="quote-templates"] .quote-template-search-field input {
    width: 100% !important;
    min-width: 0 !important;
  }

  body[data-active-section="quote-templates"] .quote-template-view-tools {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  body[data-active-section="quote-templates"] .quote-template-view-tools > * {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    white-space: normal !important;
  }

  body[data-active-section="quote-templates"] .quote-template-library-shell .quote-template-filter-grid {
    grid-template-columns: 1fr !important;
    padding: 0 10px 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-status-tabs {
    flex-wrap: wrap !important;
    gap: 6px !important;
    overflow: visible !important;
    padding: 0 10px 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-status-tab {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0 !important;
    white-space: normal !important;
  }

  body[data-active-section="quote-templates"] .quote-template-table-shell {
    display: none !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-list {
    display: grid !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-card {
    min-width: 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-mobile-head,
  body[data-active-section="quote-templates"] .quote-template-mobile-meta,
  body[data-active-section="quote-templates"] .quote-template-row-actions {
    align-items: stretch !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-templates"] .quote-template-row-actions .primary-button,
  body[data-active-section="quote-templates"] .quote-template-row-actions .ghost-button {
    width: 100% !important;
    justify-content: center !important;
  }

  body[data-active-section="quote-templates"] .chat-floating-widget {
    right: 12px !important;
    bottom: 82px !important;
  }

  body[data-active-section="quote-templates"] .chat-floating-launcher {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    padding: 8px !important;
    border-radius: 18px !important;
  }

  body[data-active-section="quote-templates"] .chat-floating-launcher-copy {
    display: none !important;
  }

  body[data-active-section="quote-templates"] .assistant-widget.assistant-widget-closed,
  body[data-active-section="quote-templates"] .assistant-widget.assistant-widget-minimized {
    right: 12px !important;
    bottom: 12px !important;
  }

  body[data-active-section="quote-templates"] .assistant-widget.assistant-widget-closed .assistant-launcher,
  body[data-active-section="quote-templates"] .assistant-widget.assistant-widget-minimized .assistant-launcher {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
  }

  body[data-active-section="quote-templates"] .assistant-widget.assistant-widget-closed .assistant-launcher-text,
  body[data-active-section="quote-templates"] .assistant-widget.assistant-widget-minimized .assistant-launcher-text {
    display: none !important;
  }
}

@media (max-width: 520px) {
  body[data-active-section="quote-templates"] .quote-template-metric-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-templates"] .quote-template-view-tools,
  body[data-active-section="quote-templates"] .quote-template-status-tabs {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-templates"] .quote-template-status-tab {
    flex-basis: 100% !important;
  }
}

@media (max-width: 900px) {
  body[data-active-section="quote-templates"] {
    height: auto !important;
    min-height: 100dvh !important;
    overflow-y: auto !important;
  }

  body[data-active-section="quote-templates"] .app-shell,
  body[data-active-section="quote-templates"] .dashboard-main,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-desk-secondary-tools,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-desk-secondary-tools-body {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-desk-secondary-tools,
  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace .quote-desk-secondary-tools-body {
    min-height: 0 !important;
  }

  body[data-active-section="quote-templates"] #quoteDashboardSection.is-template-storage-workspace #quoteTemplateStoragePanel {
    height: auto !important;
    max-height: none !important;
    min-height: calc(100dvh - 16px) !important;
    overflow: visible !important;
  }
}

/* Quote Desk template search visibility fix */
body[data-active-section=quote-generator] section.quote-builder-template-card.quote-builder-left-rail-card {
  display: block !important;
  visibility: visible !important;
}

/* Quote Desk polish: keep template search in the top workspace, not the side rail. */
body[data-active-section="quote-generator"] .quote-builder-top-template-card {
  display: block !important;
  grid-column: 2 / -1 !important;
  order: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 16px !important;
  border-radius: 16px !important;
  background: #ffffff !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-card-head {
  margin-bottom: 12px !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.4fr) minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(220px, 1fr) !important;
  gap: 12px !important;
  align-items: end !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .field-span-2 {
  grid-column: auto !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card input,
body[data-active-section="quote-generator"] .quote-builder-top-template-card select {
  min-height: 48px !important;
  width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-actions {
  margin-top: 12px !important;
  justify-content: flex-start !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card {
  margin-top: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid rgba(96, 165, 250, 0.22) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(255, 247, 237, 0.8)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
  padding: 12px 14px !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card.is-disabled {
  border-color: rgba(148, 163, 184, 0.2) !important;
  background: rgba(248, 250, 252, 0.82) !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card.is-disabled .quote-builder-inventory-picker {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-inventory-header {
  margin-bottom: 8px !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-preview-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-preview-metric {
  min-height: 70px !important;
  padding: 10px 12px !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card > .muted {
  margin: 8px 0 0 !important;
  font-size: 0.84rem !important;
  line-height: 1.35 !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-batch-link-row,
body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-lifecycle-strip {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-inventory-picker {
  margin-top: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-inventory-actions {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column,
body[data-active-section="quote-generator"] .quote-builder-right-column > .quote-builder-preview-panel {
  display: none !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  grid-column: 2 / -1 !important;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-preview-metrics,
  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-batch-link-row,
  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-lifecycle-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-builder-top-template-card,
  body[data-active-section="quote-generator"] .quote-builder-hero-card {
    grid-column: 1 / -1 !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-actions > * {
    width: 100% !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-preview-metrics,
  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-batch-link-row,
  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-lifecycle-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-inventory-card .quote-builder-inventory-picker-actions {
    width: 100% !important;
  }
}

/* Quote Desk top ordering lock: setup first, template search second, work area below. */
body[data-active-section="quote-generator"] .quote-builder-hero-card {
  grid-column: 2 / -1 !important;
  grid-row: 1 !important;
  order: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card {
  grid-column: 2 / -1 !important;
  grid-row: 2 !important;
  order: 1 !important;
  align-self: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column,
body[data-active-section="quote-generator"] .quote-builder-main-column {
  grid-row: 3 !important;
}

/* Quote Desk responsive layout stabilization: no dead right column, no overlap. */
body[data-active-section="quote-generator"] .dashboard-main {
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection,
body[data-active-section="quote-generator"] .quote-builder-reference-grid,
body[data-active-section="quote-generator"] .quote-builder-reference-shell,
body[data-active-section="quote-generator"] #quoteGeneratorForm {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell {
  overflow: visible !important;
}

body[data-active-section="quote-generator"] #quoteGeneratorForm {
  display: grid !important;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card,
body[data-active-section="quote-generator"] .quote-builder-top-template-card {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  grid-row: 1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card {
  grid-row: 2 !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  grid-column: 1 !important;
  grid-row: 3 !important;
  width: 100% !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column {
  grid-column: 2 / -1 !important;
  grid-row: 3 !important;
  width: 100% !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-itinerary-card,
body[data-active-section="quote-generator"] .quote-builder-itinerary-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-day-master-detail-shell {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(126px, 180px) minmax(0, 1fr) !important;
  gap: 14px !important;
  overflow: auto !important;
}

body[data-active-section="quote-generator"] #quoteDayPlanList,
body[data-active-section="quote-generator"] .quote-day-detail-column {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-day-compact-card,
body[data-active-section="quote-generator"] .quote-day-detail-card,
body[data-active-section="quote-generator"] .quote-day-detail-column > * {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
  grid-template-columns: minmax(240px, 1.25fr) minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(220px, 1fr) !important;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] #quoteGeneratorForm {
    grid-template-columns: minmax(160px, 190px) minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-detail-shell {
    grid-template-columns: minmax(112px, 150px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 860px) {
  body[data-active-section="quote-generator"] #quoteGeneratorForm {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-hero-card,
  body[data-active-section="quote-generator"] .quote-builder-top-template-card,
  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-main-column {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-detail-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: visible !important;
  }

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid,
  body[data-active-section="quote-generator"] .quote-builder-hero-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Quote Desk selected-day row guard: keep image/details/actions in-flow. */
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) minmax(128px, 150px) !important;
  grid-template-areas: "day visual actions" !important;
  align-items: stretch !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-top {
  display: contents !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-top > div:first-child {
  grid-area: day !important;
  align-self: start !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
  grid-area: visual !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 116px !important;
  align-self: stretch !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
  grid-area: actions !important;
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 150px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 7px !important;
  align-self: start !important;
  transform: none !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions .ghost-button,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  white-space: normal !important;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(128px, 160px) minmax(0, 1fr) minmax(112px, 136px) !important;
  }
}

@media (max-width: 900px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "visual"
      "actions" !important;
    gap: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.quote-so-readiness-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.quote-so-readiness-modal.is-open {
  display: flex;
}

.quote-so-readiness-card {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
  padding: 26px;
}

.quote-so-readiness-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
}

.quote-so-readiness-eyebrow {
  margin: 0 0 6px;
  color: #f05a28;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quote-so-readiness-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.quote-so-readiness-summary {
  margin: 10px 0 18px;
  max-width: 620px;
  color: #64748b;
  font-weight: 700;
  line-height: 1.45;
}

.quote-so-readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quote-so-readiness-grid article {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px;
  min-width: 0;
}

.quote-so-readiness-grid span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-so-readiness-grid strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.quote-so-readiness-blockers {
  margin-top: 14px;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  background: rgba(255, 247, 237, 0.86);
  padding: 16px;
  color: #0f172a;
  font-weight: 700;
}

.quote-so-readiness-blockers ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #9a3412;
}

.quote-so-readiness-blockers p {
  margin: 8px 0 0;
  color: #047857;
}

.quote-so-readiness-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .quote-so-readiness-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .quote-so-readiness-card {
    width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 22px 16px;
  }

  .quote-so-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-so-readiness-actions > * {
    flex: 1 1 160px;
  }
}

/* Quote Desk target day-card workspace: selected-day card with compact navigator. */
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-master-detail-shell {
  display: grid !important;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  min-height: 360px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-navigator {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  height: 100% !important;
  padding: 16px !important;
  border: 1px solid rgba(203, 213, 225, 0.9) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06) !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-head {
  display: grid;
  gap: 3px;
  padding: 2px 4px 8px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-head strong {
  color: #0f172a;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-head small {
  color: #64748b;
  font-size: 0.72rem;
}

body[data-active-section="quote-generator"] #quoteAiAllDaysButton {
  min-height: 34px;
  padding: 9px 14px;
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.96), rgba(255, 255, 255, 0.94));
  color: #075985;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-item {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 14px !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 54px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(203, 213, 225, 0.78) !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #172033 !important;
  text-align: left !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-item.is-active {
  border-color: rgba(245, 99, 36, 0.36) !important;
  background: linear-gradient(135deg, #fff7ed, #fff) !important;
  box-shadow: 0 12px 24px rgba(245, 99, 36, 0.12) !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-index {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef2f7;
  color: #0f172a;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-item.is-active .quote-day-nav-index {
  background: linear-gradient(135deg, #ff7a2f, #ef2e43);
  color: #fff;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-copy {
  display: grid;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-copy strong,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-copy small {
  color: #64748b;
  font-size: 0.72rem;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-add {
  min-height: 44px;
  margin-top: 2px;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column {
  display: grid !important;
  min-width: 0 !important;
  min-height: 100% !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card.is-selected,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card.is-editor-open {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: none !important;
  gap: 16px !important;
  min-height: 360px !important;
  max-height: none !important;
  padding: 0 !important;
  border: 1px solid rgba(203, 213, 225, 0.9) !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
  contain: initial !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr) !important;
  gap: 18px !important;
  align-items: stretch !important;
  min-height: 112px;
  padding: 18px 20px !important;
  background: linear-gradient(135deg, rgba(255, 246, 237, 0.98), rgba(255, 255, 255, 0.92)) !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top > div:first-child {
  display: grid !important;
  grid-column: auto !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 6px 12px !important;
  align-content: center !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-title-icon {
  display: inline-grid;
  grid-row: span 3;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff7a2f, #ef2e43);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-title {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  color: #0f172a !important;
  font-size: clamp(1.15rem, 2vw, 1.55rem) !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top .muted {
  display: block !important;
  color: #475569 !important;
  font-size: 0.88rem !important;
  line-height: 1.35 !important;
  -webkit-line-clamp: initial !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-copilot-badge {
  justify-self: start;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
  display: grid !important;
  grid-column: auto !important;
  grid-template-columns: repeat(2, minmax(130px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: none !important;
  align-self: center !important;
  justify-self: stretch !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button {
  display: grid;
  align-content: center;
  min-width: 0 !important;
  min-height: 56px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 0.9rem !important;
  font-weight: 800;
  line-height: 1.15 !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button[data-quote-remove] {
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
  background: #fff7f7;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button small {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-card-hero {
  position: absolute;
  top: 0;
  right: 0;
  width: min(34%, 360px);
  height: 112px;
  pointer-events: none;
  background: radial-gradient(circle at 68% 62%, rgba(245, 99, 36, 0.14), transparent 32%), linear-gradient(135deg, rgba(245, 99, 36, 0.06), rgba(255, 255, 255, 0));
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-visual-builder {
  display: grid !important;
  grid-column: auto !important;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
  width: auto !important;
  max-height: none !important;
  padding: 4px 20px 0 !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview {
  display: grid !important;
  place-items: center;
  min-height: 150px;
  border: 1px dashed rgba(245, 99, 36, 0.32);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed, #fff);
  color: #0f172a;
  text-align: center;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  border-radius: 15px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview span {
  color: #f05a24;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-card {
  display: grid !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 150px !important;
  max-height: none !important;
  padding: 14px !important;
  border-radius: 16px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-card strong {
  color: #0f172a !important;
  font-size: 1rem !important;
  white-space: normal !important;
  -webkit-line-clamp: 3 !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-service-strip,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-summary-grid {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer article {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-master-detail-shell {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-navigator {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    overflow-x: auto !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-head {
    display: none;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-builder-card-head {
    align-items: stretch;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .detail-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-visual-builder,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer {
    grid-template-columns: 1fr !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button {
    min-height: 50px !important;
    padding: 8px !important;
    font-size: 0.8rem !important;
  }
}

/* Quote Desk lead context strip: keep linked lead details visible in setup overview. */
body[data-active-section="quote-generator"] .quote-builder-lead-details-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 12px 0 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-lead-details-strip article {
  min-width: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(59, 130, 246, 0.18) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04) !important;
}

body[data-active-section="quote-generator"] .quote-builder-lead-details-strip span {
  display: block !important;
  margin-bottom: 5px !important;
  color: #64748b !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

body[data-active-section="quote-generator"] .quote-builder-lead-details-strip strong {
  display: block !important;
  overflow: hidden !important;
  color: #0f172a !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  line-height: 1.22 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-lead-details-strip small {
  display: block !important;
  overflow: hidden !important;
  margin-top: 4px !important;
  color: #64748b !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-summary [data-quote-hero-field="template"] strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  max-width: 100% !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card > .quote-builder-compact-editor {
  margin-top: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 14px !important;
  background: #ffffff !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card > .quote-builder-compact-editor summary {
  cursor: pointer !important;
  color: #1d4ed8 !important;
  font-weight: 900 !important;
}

@media (max-width: 1180px) {
  body[data-active-section="quote-generator"] .quote-builder-lead-details-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body[data-active-section="quote-generator"] .quote-builder-lead-details-strip {
    grid-template-columns: 1fr !important;
  }
  body[data-active-section="quote-generator"] .quote-builder-card-head {
    align-items: stretch !important;
  }
  body[data-active-section="quote-generator"] .quote-builder-quick-setup-button {
    width: 100% !important;
  }
}

/* Quote Desk final responsive polish: keep the restored 16 June flow stable without changing builder logic. */
body[data-active-section="quote-generator"] .dashboard-main {
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body[data-active-section="quote-generator"] .quote-generator-panel.quote-builder-reference-shell,
body[data-active-section="quote-generator"] .quote-builder-reference-shell {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form,
body[data-active-section="quote-generator"] #quoteGeneratorForm {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(168px, 210px) minmax(0, 1fr) !important;
  grid-auto-rows: auto !important;
  align-items: start !important;
  gap: 18px !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-builder-actions {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

body[data-active-section="quote-generator"] .quote-builder-hero-card {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
}

body[data-active-section="quote-generator"] .quote-builder-left-column {
  grid-column: 1 !important;
  grid-row: 4 !important;
  width: 100% !important;
  min-width: 0 !important;
  position: sticky !important;
  top: 16px !important;
  align-self: start !important;
  max-height: calc(100dvh - 32px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column {
  grid-column: 2 !important;
  grid-row: 4 !important;
  width: 100% !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-right-column,
body[data-active-section="quote-generator"] .quote-builder-live-preview-card,
body[data-active-section="quote-generator"] .quote-builder-pricing-card[data-quote-desk-placement="right"] {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-main-column > .quote-builder-itinerary-card,
body[data-active-section="quote-generator"] .quote-builder-itinerary-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] #quoteDayPlanList {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-day-master-detail-shell,
body[data-active-section="quote-generator"] .quote-day-master-detail-shell.has-editor-open {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(126px, 168px) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-day-navigator {
  width: 100% !important;
  min-width: 0 !important;
  max-height: calc(100dvh - 210px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  gap: 10px !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 128px !important;
  max-height: none !important;
  display: grid !important;
  grid-template-columns: minmax(132px, 170px) minmax(170px, 220px) minmax(0, 1fr) minmax(118px, 140px) !important;
  grid-template-areas: "day media route actions" !important;
  gap: 10px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-top {
  display: contents !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-top > div:first-child {
  grid-area: day !important;
  min-width: 0 !important;
  align-self: start !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
  grid-area: media !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-self: stretch !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-image-preview {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 92px !important;
  height: 108px !important;
  max-height: 130px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  text-align: center !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-route-card,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-plan-grid {
  grid-area: route !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-route-card {
  align-self: stretch !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-service-strip,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-summary-grid {
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)) !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
  grid-area: actions !important;
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 140px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  align-self: start !important;
  justify-self: stretch !important;
  transform: none !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions button,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions .ghost-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 8px 10px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
  grid-template-columns: minmax(210px, 1.4fr) minmax(170px, 0.8fr) minmax(190px, 1fr) minmax(190px, 1fr) !important;
  align-items: end !important;
}

body[data-active-section="quote-generator"] .quote-builder-top-template-card input,
body[data-active-section="quote-generator"] .quote-builder-top-template-card select,
body[data-active-section="quote-generator"] .quote-builder-top-template-card button {
  min-width: 0 !important;
}

@media (max-width: 1280px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form,
  body[data-active-section="quote-generator"] #quoteGeneratorForm {
    grid-template-columns: minmax(148px, 188px) minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(118px, 145px) minmax(150px, 190px) minmax(0, 1fr) minmax(104px, 124px) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
    max-width: 124px !important;
  }
}

@media (max-width: 1080px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form,
  body[data-active-section="quote-generator"] #quoteGeneratorForm {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column,
  body[data-active-section="quote-generator"] .quote-builder-main-column {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-left-column {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-section-nav {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 8px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(118px, 150px) minmax(160px, 210px) minmax(0, 1fr) !important;
    grid-template-areas:
      "day media actions"
      "route route route" !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-builder-reference-shell,
  body[data-active-section="quote-generator"] .quote-generator-panel.quote-builder-reference-shell {
    padding-inline: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-actions,
  body[data-active-section="quote-generator"] .quote-builder-hero-card,
  body[data-active-section="quote-generator"] .quote-builder-top-template-card,
  body[data-active-section="quote-generator"] .quote-builder-card {
    border-radius: 16px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-lead-details-strip,
  body[data-active-section="quote-generator"] .quote-builder-hero-summary,
  body[data-active-section="quote-generator"] .quote-builder-top-template-card .quote-builder-template-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-master-detail-shell,
  body[data-active-section="quote-generator"] .quote-day-master-detail-shell.has-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-navigator {
    max-height: none !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "media"
      "route"
      "actions" !important;
    gap: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-image-preview {
    height: 132px !important;
    max-height: none !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 480px) {
  body[data-active-section="quote-generator"] .quote-day-navigator,
  body[data-active-section="quote-generator"] .quote-builder-section-nav,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Quote Desk day-row containment: route details live inside the visual block, never under the action rail. */
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
  grid-template-columns: minmax(132px, 168px) minmax(0, 1fr) minmax(118px, 140px) !important;
  grid-template-areas: "day media actions" !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
  display: grid !important;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-image-preview {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-route-card,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-plan-grid {
  grid-column: 2 !important;
  grid-row: auto !important;
  grid-area: auto !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-service-strip,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-summary-grid {
  grid-column: 1 / -1 !important;
}

@media (max-width: 1280px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(118px, 145px) minmax(0, 1fr) minmax(118px, 140px) !important;
    grid-template-areas: "day media actions" !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
    grid-template-columns: minmax(132px, 170px) minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
    max-width: 140px !important;
  }
}

@media (max-width: 1080px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(112px, 142px) minmax(0, 1fr) minmax(128px, 160px) !important;
    grid-template-areas: "day media actions" !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
    grid-template-columns: minmax(128px, 168px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "media"
      "actions" !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-image-preview,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-plan-grid {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

/* Quote Desk final day-row geometry: four clear desktop columns, single-column mobile. */
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
  grid-template-columns: minmax(118px, 150px) minmax(128px, 180px) minmax(0, 1fr) minmax(118px, 140px) !important;
  grid-template-areas: "day media route actions" !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
  grid-area: media !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder > * {
  flex: 0 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-route-card,
body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-plan-grid {
  grid-area: route !important;
  grid-column: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
  grid-area: actions !important;
  max-width: 140px !important;
  min-width: 0 !important;
}

@media (max-width: 1080px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(108px, 140px) minmax(0, 1fr) minmax(112px, 136px) !important;
    grid-template-areas:
      "day media actions"
      "route route route" !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-image-preview,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-route-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-plan-grid {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100% !important;
  }
}

@media (max-width: 820px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) minmax(116px, 146px) minmax(112px, 136px) !important;
    grid-template-areas:
      "day media actions"
      "route route route" !important;
  }
}

@media (max-width: 640px) {
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "day"
      "media"
      "route"
      "actions" !important;
  }

  body[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile Super App: keep embedded modules compact without changing the desktop CRM layout. */
html.mobile-embed,
body.mobile-embed {
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body.mobile-embed[data-active-section="quote-generator"] {
  --quote-header-height: 0px;
  --quote-sidebar-width: 0px;
  background: #f6f8fb !important;
}

body.mobile-embed[data-active-section="quote-generator"] .app-shell {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

body.mobile-embed[data-active-section="quote-generator"] .sidebar,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-left-column,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-right-column,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-preview-panel,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-pricing-card {
  display: none !important;
}

body.mobile-embed[data-active-section="quote-generator"] .dashboard-main,
body.mobile-embed[data-active-section="quote-generator"] #quoteDashboardSection,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-reference-shell {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-form {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 100dvh !important;
  padding: 8px !important;
  overflow: visible !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-reference-shell .quote-builder-actions {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-topbar {
  display: block !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-breadcrumb {
  font-size: 0.72rem !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-record-title strong {
  font-size: 1.18rem !important;
  letter-spacing: -0.02em !important;
  line-height: 1.12 !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-record-title .muted,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-actions .muted {
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 8px !important;
  flex-wrap: initial !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-primary-actions > *,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-primary-actions .ghost-button,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-primary-actions .primary-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 8px 9px !important;
  border-radius: 10px !important;
  font-size: 0.84rem !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-main-column,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-template-card,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-hero-card,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-itinerary-card,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-commercial-card {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-column: auto !important;
  padding: 12px !important;
  border-radius: 14px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-main-column {
  display: grid !important;
  gap: 10px !important;
  padding: 0 !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-hero-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-hero-summary article {
  min-height: 58px !important;
  padding: 10px !important;
  border-radius: 10px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-hero-summary article strong,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-card-head strong {
  font-size: 0.92rem !important;
  line-height: 1.12 !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-card-head,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-template-card .form-grid,
body.mobile-embed[data-active-section="quote-generator"] .quote-template-flow-grid,
body.mobile-embed[data-active-section="quote-generator"] .quote-template-flow-controls {
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-builder-template-card input,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-template-card select,
body.mobile-embed[data-active-section="quote-generator"] .quote-builder-template-card button {
  min-height: 38px !important;
  font-size: 0.88rem !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-master-detail-shell {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  min-width: 0 !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-navigator {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(96px, 120px) !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-height: none !important;
  padding: 8px !important;
  scrollbar-width: none !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-navigator::-webkit-scrollbar {
  display: none;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-nav-head {
  display: none !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-nav-item,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-nav-add {
  min-height: 54px !important;
  padding: 8px !important;
  border-radius: 12px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column {
  width: 100% !important;
  min-width: 0 !important;
  gap: 10px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas:
    "day"
    "media"
    "route"
    "actions" !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  padding: 10px !important;
  border-radius: 14px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-route-card,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-plan-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-image-preview {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 112px !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: none !important;
}

/* Mobile app quote desk: keep day cards readable inside narrow WebView widths. */
body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-builder-card-head {
  align-items: stretch !important;
  gap: 12px !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .detail-action-row {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-navigator {
  grid-auto-columns: minmax(72px, 88px) !important;
  gap: 8px !important;
  padding: 8px !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-item {
  grid-template-columns: 34px 1fr !important;
  min-height: 58px !important;
  padding: 8px !important;
  text-align: left !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-copy strong {
  font-size: 0.76rem !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-copy small,
body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-arrow {
  display: none !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-nav-add {
  display: grid !important;
  place-items: center !important;
  min-height: 58px !important;
  padding: 8px !important;
  font-size: 0.74rem !important;
  line-height: 1.1 !important;
  white-space: normal !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card,
body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card.is-selected,
body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card.is-collapsed-ready,
body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card.is-editor-open {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 14px !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top > div:first-child {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  gap: 4px 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-title-icon {
  grid-row: span 3 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  font-size: 0.68rem !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-title {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  color: #0f172a !important;
  font-size: 1.02rem !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top .muted {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 0.78rem !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-copilot-badge {
  max-width: max-content !important;
  padding: 3px 8px !important;
  font-size: 0.66rem !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 8px 6px !important;
  border-radius: 12px !important;
  font-size: 0.78rem !important;
  line-height: 1.12 !important;
  white-space: normal !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-visual-builder {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  padding: 0 14px 14px !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview,
body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-card {
  min-height: 104px !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-meta {
  grid-template-columns: 1fr !important;
}

body.mobile-embed[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer {
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  padding: 12px 14px 14px !important;
}

body.mobile-embed #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 14px !important;
}

body.mobile-embed #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top > div:first-child {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  gap: 4px 10px !important;
  min-width: 0 !important;
  width: 100% !important;
}

body.mobile-embed #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  min-width: 0 !important;
  width: 100% !important;
}

body.mobile-embed #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button {
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 8px 6px !important;
  white-space: normal !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-selected,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-master-card.is-editor-open,
body.mobile-embed .quote-day-detail-column .quote-day-master-card,
body.mobile-embed .quote-day-detail-column .quote-day-master-card.is-selected,
body.mobile-embed .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
body.mobile-embed .quote-day-detail-column .quote-day-master-card.is-editor-open {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas:
    "day"
    "actions"
    "visual"
    "footer" !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-top,
body.mobile-embed .quote-day-detail-column .quote-builder-repeat-top {
  display: contents !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-top > div:first-child,
body.mobile-embed .quote-day-detail-column .quote-builder-repeat-top > div:first-child {
  grid-area: day !important;
  padding: 14px 14px 0 !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-builder-repeat-actions,
body.mobile-embed .quote-day-detail-column .quote-builder-repeat-actions {
  grid-area: actions !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  max-width: none !important;
  padding: 12px 14px 14px !important;
  width: 100% !important;
}

body.mobile-embed[data-active-section="quote-generator"] .quote-day-detail-column .quote-day-visual-builder,
body.mobile-embed .quote-day-detail-column .quote-day-visual-builder {
  grid-area: visual !important;
}

@media (max-width: 720px) {
  #quoteBuilderItinerarySection .quote-day-navigator {
    grid-auto-columns: 58px !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  #quoteBuilderItinerarySection .quote-day-nav-item {
    display: grid !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    min-height: 58px !important;
    padding: 6px !important;
    text-align: center !important;
  }

  #quoteBuilderItinerarySection .quote-day-nav-index {
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
  }

  #quoteBuilderItinerarySection .quote-day-nav-copy,
  #quoteBuilderItinerarySection .quote-day-nav-arrow {
    display: none !important;
  }

  #quoteBuilderItinerarySection .quote-day-nav-add {
    display: grid !important;
    place-items: center !important;
    min-height: 58px !important;
    padding: 6px !important;
    font-size: 0 !important;
  }

  #quoteBuilderItinerarySection .quote-day-nav-add::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 900;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.28);
  }

  #quoteBuilderItinerarySection .quote-day-target-card,
  #quoteBuilderItinerarySection .quote-day-target-card.is-selected,
  #quoteBuilderItinerarySection .quote-day-target-card.is-collapsed-ready,
  #quoteBuilderItinerarySection .quote-day-target-card.is-editor-open {
    display: grid !important;
    grid-template-columns: 1fr !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    min-height: 0 !important;
    padding: 14px !important;
  }

  #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top > div:first-child {
    display: grid !important;
    grid-column: 1 / -1 !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 4px 10px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-title {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    font-size: 1.02rem !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    word-break: normal !important;
  }

  #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top .muted {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
    display: grid !important;
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button {
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 8px 6px !important;
    white-space: normal !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top > div:first-child {
    display: grid !important;
    grid-column: 1 / -1 !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 4px 10px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
    display: grid !important;
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .quote-day-detail-column .quote-day-master-card,
  .quote-day-detail-column .quote-day-master-card.is-selected,
  .quote-day-detail-column .quote-day-master-card.is-collapsed-ready,
  .quote-day-detail-column .quote-day-master-card.is-editor-open {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    overflow: hidden !important;
  }

  .quote-day-detail-column .quote-builder-repeat-top {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .quote-day-detail-column .quote-builder-repeat-top > div:first-child {
    display: grid !important;
    grid-area: auto !important;
    grid-column: auto !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 4px 10px !important;
    padding: 0 !important;
  }

  .quote-day-detail-column .quote-builder-repeat-actions {
    grid-area: auto !important;
    grid-column: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: none !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .quote-day-detail-column .quote-day-visual-builder {
    grid-area: auto !important;
  }
}

/* Last-pass mobile app guard: desktop selected-day row rules must never compress narrow cards. */
@media (max-width: 720px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card.is-selected,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card.is-collapsed-ready,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card.is-editor-open,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card.is-selected,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card.is-collapsed-ready,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card.is-editor-open {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-top,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-top {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-top > div:first-child,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-top > div:first-child {
    display: grid !important;
    grid-area: auto !important;
    grid-column: auto !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 4px 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-actions,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-actions {
    display: grid !important;
    grid-area: auto !important;
    grid-column: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-title,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-builder-repeat-title {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    white-space: normal !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-day-visual-builder,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-day-visual-builder,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-day-target-footer,
  body.mobile-embed #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-master-card.quote-day-target-card .quote-day-target-footer {
    grid-area: auto !important;
  }
}

/* Final lead pipeline focus override: keep the existing lead list/kanban design,
   but remove non-work chrome so leads own most of the viewport. */
body[data-active-section="lead-pipeline"]:not(.mobile-embed) .dashboard-main {
  gap: 8px !important;
  padding-top: 8px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority #followupReminderPanel,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .followup-reminder-panel,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority #leadSmartSegments,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-segment-grid {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority {
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100dvh - 16px) !important;
  gap: 8px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-panel {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 16px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-shell {
  gap: 6px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-topbar {
  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  overflow: visible !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-search {
  min-width: 0 !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-search input,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-filter-menu-button {
  min-height: 34px !important;
  border-radius: 12px !important;
  font-size: 0.78rem !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-workspace-summary-row,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-active-filter-empty {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-smart-filter-chips {
  flex-wrap: nowrap !important;
  min-height: 24px !important;
  gap: 5px !important;
  overflow-x: auto !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-smart-filter-chip,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-smart-chip {
  min-height: 22px !important;
  padding: 0 7px !important;
  font-size: 0.64rem !important;
  white-space: nowrap !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100dvh - 112px) !important;
  padding: 10px !important;
  overflow: hidden !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel-header {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  margin: 0 0 4px !important;
  padding: 0 0 4px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel-header .eyebrow,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-panel-header .muted,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-hint,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-bulk-stage-note,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority #leadPaginationControls {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-toolbar {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 0 6px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-table-shell,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .pipeline-board {
  flex: 1 1 auto !important;
  min-height: calc(100dvh - 204px) !important;
  max-height: none !important;
  overflow: auto !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #workspaceShellBar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .crm-strip,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #followupReminderPanel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .followup-reminder-panel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #leadSmartSegments,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-segment-grid {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority {
  min-height: calc(100dvh - 16px) !important;
  gap: 6px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-filter-panel {
  margin: 0 !important;
  padding: 6px !important;
  border-radius: 14px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-workspace-summary-row,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-active-filter-empty,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel-header .eyebrow,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel-header .muted,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-hint,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-bulk-stage-note,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority #leadPaginationControls {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-panel {
  min-height: calc(100dvh - 104px) !important;
  padding: 8px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .lead-table-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection.lead-workspace-priority .pipeline-board {
  min-height: calc(100dvh - 184px) !important;
  max-height: none !important;
  overflow: auto !important;
}

/* Production lead workspace density: preserve the existing lead list/kanban body,
   compact only the non-work chrome above it. */
body[data-active-section="lead-pipeline"] .dashboard-main {
  gap: 6px !important;
  padding-top: 6px !important;
}

body[data-active-section="lead-pipeline"] #workspaceShellBar,
body[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
body[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
body[data-active-section="lead-pipeline"] #leadPipelineSection #followupReminderPanel,
body[data-active-section="lead-pipeline"] #leadPipelineSection .followup-reminder-panel,
body[data-active-section="lead-pipeline"] #leadPipelineSection #leadSmartSegments,
body[data-active-section="lead-pipeline"] #leadPipelineSection .lead-segment-grid {
  display: none !important;
}

body[data-active-section="lead-pipeline"] #leadPipelineSection {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-height: calc(100dvh - 12px) !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel {
  flex: 0 0 auto !important;
  margin: 0 !important;
  max-height: 118px !important;
  overflow: hidden !important;
  padding: 8px 10px !important;
  border-radius: 16px !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-shell {
  display: grid !important;
  gap: 5px !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-topbar {
  display: grid !important;
  grid-template-columns: minmax(320px, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  overflow: hidden !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search {
  min-width: 0 !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search span,
body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-workspace-summary-row,
body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-active-filter-empty,
body[data-active-section="lead-pipeline"] #leadFilterPanel #leadActiveFilterChips:empty {
  display: none !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions::-webkit-scrollbar,
body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-filter-chips::-webkit-scrollbar {
  display: none !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search input,
body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  font-size: 0.76rem !important;
  white-space: nowrap !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-filter-chips {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 5px !important;
  max-height: 28px !important;
  overflow-x: auto !important;
  padding: 0 !important;
  scrollbar-width: none !important;
}

body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-filter-chip,
body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-chip {
  min-height: 22px !important;
  padding: 0 7px !important;
  font-size: 0.64rem !important;
  white-space: nowrap !important;
}

body[data-active-section="lead-pipeline"] #leadPipelinePanel {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100dvh - 160px) !important;
  overflow: hidden !important;
  padding: 10px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  margin: 0 0 4px !important;
  padding: 0 0 4px !important;
}

body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header .eyebrow,
body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header .muted,
body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-hint,
body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-stage-note,
body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadPaginationControls {
  display: none !important;
}

body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 0 6px !important;
}

body[data-active-section="lead-pipeline"] #leadTableShell,
body[data-active-section="lead-pipeline"] #leadPipelineBoard,
body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board {
  flex: 1 1 auto !important;
  min-height: calc(100dvh - 230px) !important;
  max-height: none !important;
  overflow: auto !important;
}

@media (max-width: 760px) {
  body[data-active-section="lead-pipeline"] #leadPipelineSection {
    gap: 5px !important;
    min-height: calc(100dvh - 8px) !important;
  }

  body[data-active-section="lead-pipeline"] #leadFilterPanel {
    max-height: 86px !important;
    padding: 6px !important;
    border-radius: 14px !important;
  }

  body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-topbar {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }

  body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(74px, 1fr)) !important;
    overflow: hidden !important;
  }

  body[data-active-section="lead-pipeline"] #leadFilterPanel #leadActiveFilterChips,
  body[data-active-section="lead-pipeline"] #leadFilterPanel #leadSmartFilterChips {
    display: none !important;
  }

  body[data-active-section="lead-pipeline"] #leadPipelinePanel {
    min-height: calc(100dvh - 102px) !important;
    padding: 7px !important;
  }

  body[data-active-section="lead-pipeline"] #leadTableShell,
  body[data-active-section="lead-pipeline"] #leadPipelineBoard,
  body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board {
    min-height: calc(100dvh - 158px) !important;
  }
}

/* Mobile app final lead priority pass.
   The lead table/kanban stays unchanged; only non-productive chrome is collapsed. */
body.mobile-embed[data-active-section="lead-pipeline"] {
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] .app-shell,
body.mobile-embed[data-active-section="lead-pipeline"] .dashboard-shell,
body.mobile-embed[data-active-section="lead-pipeline"] .dashboard-main,
body.mobile-embed[data-active-section="lead-pipeline"] .workspace-main {
  min-height: 100dvh !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] .dashboard-main {
  padding: 4px !important;
  gap: 4px !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #workspaceShellBar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection #followupReminderPanel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .followup-reminder-panel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection #leadSmartSegments,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-segment-grid,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-workspace-summary-row,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-active-filter-empty,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-panel-header .eyebrow,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-panel-header .muted,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .pipeline-hint,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-bulk-stage-note,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection #leadPaginationControls,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-mobile-hidden-action {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-height: calc(100dvh - 8px) !important;
  height: calc(100dvh - 8px) !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel {
  flex: 0 0 auto !important;
  margin: 0 !important;
  max-height: 68px !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 5px !important;
  border-radius: 12px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-shell {
  gap: 4px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 5px !important;
  align-items: center !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search input,
body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 9px !important;
  border-radius: 10px !important;
  font-size: 0.72rem !important;
  white-space: nowrap !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-filter-chips {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  max-height: 24px !important;
  overflow-x: auto !important;
  padding: 0 !important;
  scrollbar-width: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-filter-chips::-webkit-scrollbar {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 6px !important;
  overflow: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header {
  flex: 0 0 auto !important;
  margin: 0 0 3px !important;
  padding: 0 0 3px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 0 4px !important;
  overflow: auto hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineBoard,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
  overflow: auto !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell table {
  min-width: 860px !important;
}

@media (min-width: 900px) {
  body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection {
    min-height: calc(100dvh - 10px) !important;
  }

  body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadFilterPanel {
    max-height: 96px !important;
  }

  body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelinePanel {
    min-height: calc(100dvh - 118px) !important;
  }

  body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadTableShell,
  body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineBoard,
  body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelinePanel .pipeline-board {
    min-height: calc(100dvh - 188px) !important;
  }
}

/* Lead pipeline focused workspace.
   Keep the existing lead list/kanban components intact; reclaim space from
   diagnostic chrome so the lead workspace owns most of the viewport. */
body.mobile-embed.lead-pipeline-active #workspaceShellBar,
body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
body.mobile-embed.lead-pipeline-active #leadPipelineSection .crm-strip,
body.mobile-embed.lead-pipeline-active #leadPipelineSection #followupReminderPanel,
body.mobile-embed.lead-pipeline-active #leadPipelineSection .followup-reminder-panel,
body.mobile-embed.lead-pipeline-active #leadPipelineSection #leadSmartSegments,
body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-segment-grid {
  display: none !important;
}

body.mobile-embed.lead-pipeline-active .dashboard-main {
  gap: 6px !important;
  padding-top: 6px !important;
}

body.mobile-embed.lead-pipeline-active #leadPipelineSection {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-height: calc(100dvh - 12px) !important;
}

body.mobile-embed.lead-pipeline-active #leadFilterPanel {
  flex: 0 0 auto !important;
  max-height: 86px !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 6px 8px !important;
}

body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-shell {
  gap: 5px !important;
}

body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-topbar {
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-search input,
body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button {
  min-height: 32px !important;
}

body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-smart-filter-chips {
  max-height: 28px !important;
  overflow: auto hidden !important;
  scrollbar-width: none !important;
}

body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-smart-filter-chips::-webkit-scrollbar {
  display: none !important;
}

body.mobile-embed.lead-pipeline-active #leadPipelinePanel {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100dvh - 108px) !important;
  overflow: hidden !important;
}

body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding-bottom: 4px !important;
}

body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 0 4px !important;
  overflow: auto hidden !important;
}

body.mobile-embed.lead-pipeline-active #leadTableShell,
body.mobile-embed.lead-pipeline-active #leadPipelineBoard,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-board {
  flex: 1 1 auto !important;
  min-height: calc(100dvh - 174px) !important;
  overflow: auto !important;
}

@media (max-width: 760px) {
  body.mobile-embed.lead-pipeline-active #workspaceShellBar,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .crm-strip,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection #followupReminderPanel,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .followup-reminder-panel,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection #leadSmartSegments,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-segment-grid,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-mobile-hidden-action,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-workspace-summary-row,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-active-filter-empty,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header .eyebrow,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header .muted,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-hint,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-stage-note,
  body.mobile-embed.lead-pipeline-active #leadPaginationControls {
    display: none !important;
  }

  body.mobile-embed.lead-pipeline-active #leadPipelineSection {
    gap: 4px !important;
    min-height: 100dvh !important;
  }

  body.mobile-embed.lead-pipeline-active #leadFilterPanel {
    max-height: 54px !important;
    padding: 4px !important;
    border-radius: 14px !important;
  }

  body.mobile-embed.lead-pipeline-active #leadPipelinePanel {
    min-height: calc(100dvh - 66px) !important;
    padding: 5px !important;
  }

  body.mobile-embed.lead-pipeline-active #leadTableShell,
  body.mobile-embed.lead-pipeline-active #leadPipelineBoard,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-board {
    min-height: calc(100dvh - 112px) !important;
    overflow: auto !important;
  }

  body.mobile-embed.lead-pipeline-active #leadTableShell table {
    min-width: 820px !important;
  }
}

/* Mobile super app: lead pipeline should be the working surface.
   Keep the existing table/kanban/card UI intact; collapse only shell chrome. */
@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"],
  body.mobile-embed.lead-pipeline-active {
    overflow: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] .dashboard-main,
  body.mobile-embed.lead-pipeline-active .dashboard-main {
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 2px !important;
    gap: 3px !important;
    overflow: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #workspaceShellBar,
  body.mobile-embed.lead-pipeline-active #workspaceShellBar,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .crm-strip,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection #followupReminderPanel,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection #followupReminderPanel,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .followup-reminder-panel,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .followup-reminder-panel,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection #leadSmartSegments,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection #leadSmartSegments,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-segment-grid,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-segment-grid,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-workspace-summary-row,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-workspace-summary-row,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-active-filter-empty,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-active-filter-empty,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-mobile-hidden-action,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-mobile-hidden-action {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel {
    flex: 0 0 38px !important;
    max-height: 38px !important;
    min-height: 38px !important;
    padding: 3px !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-shell,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-shell {
    gap: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-topbar,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-topbar {
    display: block !important;
    margin: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search input,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-search input {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: .82rem !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search span,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-search span,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-topbar-actions,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-filter-chips,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-smart-filter-chips,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel #leadActiveFilterChips,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel #leadActiveFilterChips,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel #leadSmartFilterChips,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel #leadSmartFilterChips {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 4px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 2px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header .eyebrow,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header .eyebrow,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header .muted,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header .muted,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-hint,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-hint,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-stage-note,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-stage-note,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadPaginationControls,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadPaginationControls {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header h3,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header h3 {
    font-size: .92rem !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    flex: 0 0 auto !important;
    padding: 0 0 2px !important;
    margin: 0 !important;
    gap: 4px !important;
    overflow: auto hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field,
  body.mobile-embed[data-active-section="lead-pipeline"] #applyBulkAssignmentButton,
  body.mobile-embed.lead-pipeline-active #applyBulkAssignmentButton {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell,
  body.mobile-embed.lead-pipeline-active #leadTableShell,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineBoard,
  body.mobile-embed.lead-pipeline-active #leadPipelineBoard,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-board {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell table,
  body.mobile-embed.lead-pipeline-active #leadTableShell table {
    min-width: 820px !important;
  }
}

@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group {
    width: 100% !important;
    gap: 4px !important;
    overflow: auto hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .view-toggle,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .view-toggle {
    min-height: 32px !important;
    padding: 2px !important;
    flex: 0 0 auto !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .view-toggle-button,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .view-toggle-button,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .toolbar-chip,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .toolbar-chip {
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: .78rem !important;
    white-space: nowrap !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadListPresetBar,
  body.mobile-embed.lead-pipeline-active #leadListPresetBar {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-table,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-table {
    font-size: .78rem !important;
  }
}

/* Final mobile LMS override: keep the lead work area dominant inside the app shell. */
@media (max-width: 760px) {
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel #leadActiveFilterChips,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel #leadActiveFilterChips,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel #leadSmartFilterChips,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel #leadSmartFilterChips,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-smart-filter-chips,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-smart-filter-chips,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body.lead-pipeline-active #leadListPresetBar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadListPresetBar {
    display: none !important;
  }

  html.mobile-embed body.lead-pipeline-active #leadPipelineSection,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection {
    gap: 3px !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  html.mobile-embed body.lead-pipeline-active #leadFilterPanel,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel {
    flex: 0 0 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 3px !important;
    overflow: hidden !important;
  }

  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
  }

  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar {
    display: flex !important;
    align-items: center !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: auto hidden !important;
    gap: 4px !important;
  }

  html.mobile-embed body.lead-pipeline-active #leadTableShell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell,
  html.mobile-embed body.lead-pipeline-active #leadPipelineBoard,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineBoard,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-board,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: auto !important;
  }
}

/* Mobile app lead workspace: compact chrome and keep the lead work area usable. */
@media (max-width: 760px) {
  html.mobile-embed body[data-active-section="lead-pipeline"],
  html.mobile-embed body.lead-pipeline-active {
    overflow: hidden !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #workspaceShellBar,
  html.mobile-embed body.lead-pipeline-active #workspaceShellBar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
  html.mobile-embed body.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
  html.mobile-embed body.lead-pipeline-active #leadPipelineSection .crm-strip,
  html.mobile-embed body[data-active-section="lead-pipeline"] #followupReminderPanel,
  html.mobile-embed body.lead-pipeline-active #followupReminderPanel,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadSmartSegments,
  html.mobile-embed body.lead-pipeline-active #leadSmartSegments,
  html.mobile-embed body[data-active-section="lead-pipeline"] .lead-mobile-hidden-action,
  html.mobile-embed body.lead-pipeline-active .lead-mobile-hidden-action,
  html.mobile-embed body[data-active-section="lead-pipeline"] .lead-mobile-secondary-filter,
  html.mobile-embed body.lead-pipeline-active .lead-mobile-secondary-filter,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-header,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-panel-header,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPaginationControls,
  html.mobile-embed body.lead-pipeline-active #leadPaginationControls,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadListPresetBar,
  html.mobile-embed body.lead-pipeline-active #leadListPresetBar {
    display: none !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection,
  html.mobile-embed body.lead-pipeline-active #leadPipelineSection {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding: 4px !important;
    overflow: hidden !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 3px !important;
    border-radius: 14px !important;
    overflow: visible !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search > span,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-search > span,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel #leadActiveFilterChips,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel #leadActiveFilterChips,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel #leadSmartFilterChips,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel #leadSmartFilterChips,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-workspace-summary-row,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-workspace-summary-row,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .toolbar-chip-soft,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .toolbar-chip-soft,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td[data-label="Owner"],
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] > td[data-label="Owner"] {
    display: none !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-shell,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-shell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-topbar,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-topbar {
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
    min-height: 0 !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-search {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search input,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-search input {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 0.82rem !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button {
    width: auto !important;
    min-width: 42px !important;
    height: 34px !important;
    padding: 0 9px !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 4px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    display: flex !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    margin: 0 0 4px !important;
    overflow: hidden !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group {
    display: flex !important;
    gap: 4px !important;
    min-width: 0 !important;
    overflow: auto hidden !important;
    scrollbar-width: none !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group::-webkit-scrollbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group::-webkit-scrollbar {
    display: none !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar .view-toggle,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar .view-toggle {
    flex: 0 0 auto !important;
    height: 36px !important;
    padding: 2px !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar .view-toggle button,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar .view-toggle button,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar .chip,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar .chip {
    min-height: 30px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    font-size: 0.78rem !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell,
  html.mobile-embed body.lead-pipeline-active #leadTableShell {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: auto !important;
    border-radius: 12px !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-table,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-table thead,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-table thead {
    display: none !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-table tbody,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-table tbody {
    display: grid !important;
    gap: 6px !important;
    padding: 2px !important;
    width: 100% !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row],
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td,
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] > td {
    display: grid !important;
    grid-template-columns: 68px minmax(0, 1fr) !important;
    gap: 6px !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow-wrap: anywhere !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td::before,
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] > td::before {
    content: attr(data-label) !important;
    color: #64748b !important;
    font-size: 0.58rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td.lead-select-cell,
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] > td.lead-select-cell {
    display: none !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-name-cell,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-name-cell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-table-cell-stack,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-table-cell-stack {
    min-width: 0 !important;
    gap: 2px !important;
    font-size: 0.78rem !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-row-quick-actions,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-row-quick-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-row-quick-actions .ghost-button,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-row-quick-actions .ghost-button {
    width: 100% !important;
    min-height: 30px !important;
    padding: 0 6px !important;
    font-size: 0.7rem !important;
    white-space: normal !important;
  }
}

/* Lead Pipeline density cleanup: keep lead list and kanban design intact. */
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar {
  padding: 8px 12px !important;
  margin-bottom: 8px !important;
  border-radius: 18px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-copy p,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-meta-grid,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-actions .ghost-button {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-bar-top {
  align-items: center !important;
  gap: 10px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-copy {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-title-row {
  margin: 0 !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-copy h3 {
  font-size: 1.1rem !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-actions {
  margin-left: auto !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar .workspace-shell-actions .primary-button {
  min-height: 34px !important;
  padding: 0 14px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority {
  gap: 8px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .lead-lms-tab-shell {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-strip {
  padding: 6px 10px !important;
  margin: 0 !important;
  min-height: 0 !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .metric-card,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority .crm-mini-stat {
  min-height: 34px !important;
  padding: 5px 9px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #followupReminderPanel {
  padding: 6px 10px !important;
  margin: 0 !important;
  min-height: 0 !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #followupReminderPanel .panel-heading,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #followupReminderPanel .eyebrow {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #followupReminderPanel .followup-reminder-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #followupReminderPanel .followup-reminder-card {
  min-height: 32px !important;
  padding: 5px 8px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #followupReminderPanel .followup-reminder-card .ghost-button {
  min-height: 28px !important;
  padding: 0 10px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadFilterPanel {
  padding: 8px 10px !important;
  margin: 0 !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadFilterPanel .lead-workspace-summary-row,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadFilterPanel .lead-active-filter-empty,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadSmartSegments {
  display: none !important;
}

@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"],
  body.mobile-embed.lead-pipeline-active,
  html.mobile-embed body[data-active-section="lead-pipeline"],
  html.mobile-embed body.lead-pipeline-active {
    overflow: hidden !important;
    background: #f7f9fc !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #workspaceShellBar,
  body.mobile-embed.lead-pipeline-active #workspaceShellBar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #workspaceShellBar,
  html.mobile-embed body.lead-pipeline-active #workspaceShellBar,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
  html.mobile-embed body.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection .crm-strip,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
  html.mobile-embed body.lead-pipeline-active #leadPipelineSection .crm-strip,
  body.mobile-embed[data-active-section="lead-pipeline"] #followupReminderPanel,
  body.mobile-embed.lead-pipeline-active #followupReminderPanel,
  html.mobile-embed body[data-active-section="lead-pipeline"] #followupReminderPanel,
  html.mobile-embed body.lead-pipeline-active #followupReminderPanel,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadSmartSegments,
  body.mobile-embed.lead-pipeline-active #leadSmartSegments,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadSmartSegments,
  html.mobile-embed body.lead-pipeline-active #leadSmartSegments,
  body.mobile-embed[data-active-section="lead-pipeline"] .lead-mobile-hidden-action,
  body.mobile-embed.lead-pipeline-active .lead-mobile-hidden-action,
  html.mobile-embed body[data-active-section="lead-pipeline"] .lead-mobile-hidden-action,
  html.mobile-embed body.lead-pipeline-active .lead-mobile-hidden-action {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection,
  body.mobile-embed.lead-pipeline-active #leadPipelineSection,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection,
  html.mobile-embed body.lead-pipeline-active #leadPipelineSection {
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    padding: 4px !important;
    gap: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 6px !important;
    margin: 0 !important;
    border-radius: 14px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-workspace-summary-row,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-workspace-summary-row,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-workspace-summary-row,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-workspace-summary-row,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-active-filter-empty,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-active-filter-empty,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-active-filter-empty,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-active-filter-empty,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel #leadActiveFilterChips,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel #leadActiveFilterChips,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel #leadActiveFilterChips,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel #leadActiveFilterChips,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel #leadSmartFilterChips,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel #leadSmartFilterChips,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel #leadSmartFilterChips,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel #leadSmartFilterChips {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-topbar,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-topbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-topbar,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 4px !important;
    align-items: center !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search input,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-search input,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-search input,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-search input {
    min-height: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
    padding: 0 10px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-topbar-actions {
    display: contents !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button {
    min-height: 32px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 14px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    padding: 5px !important;
    gap: 5px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-board,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-board,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell,
  body.mobile-embed.lead-pipeline-active #leadTableShell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell,
  html.mobile-embed body.lead-pipeline-active #leadTableShell {
    height: 100% !important;
    max-height: 100% !important;
    overflow: auto !important;
  }
}

/* Final lead workspace priority pass: keep the lead list and kanban UI intact,
   but remove non-productive header chrome so leads own the screen. */
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #workspaceShellBar,
body.lead-pipeline-active:not(.mobile-embed) #workspaceShellBar,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection .lead-lms-tab-shell,
body.lead-pipeline-active:not(.mobile-embed) #leadPipelineSection .lead-lms-tab-shell,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection .crm-strip,
body.lead-pipeline-active:not(.mobile-embed) #leadPipelineSection .crm-strip,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #followupReminderPanel,
body.lead-pipeline-active:not(.mobile-embed) #followupReminderPanel {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority,
body.lead-pipeline-active:not(.mobile-embed) #leadPipelineSection.lead-workspace-priority {
  gap: 8px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadFilterPanel,
body.lead-pipeline-active:not(.mobile-embed) #leadFilterPanel {
  padding: 8px 10px !important;
  margin: 0 0 8px !important;
  min-height: 0 !important;
  border-radius: 18px !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadFilterPanel .lead-workspace-summary-row,
body.lead-pipeline-active:not(.mobile-embed) #leadFilterPanel .lead-workspace-summary-row,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadFilterPanel .lead-active-filter-empty,
body.lead-pipeline-active:not(.mobile-embed) #leadFilterPanel .lead-active-filter-empty,
body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadSmartSegments,
body.lead-pipeline-active:not(.mobile-embed) #leadSmartSegments {
  display: none !important;
}

body[data-active-section="lead-pipeline"]:not(.mobile-embed) #leadPipelinePanel,
body.lead-pipeline-active:not(.mobile-embed) #leadPipelinePanel {
  margin-top: 0 !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #workspaceShellBar,
body.mobile-embed.lead-pipeline-active #workspaceShellBar,
html.mobile-embed body[data-active-section="lead-pipeline"] #workspaceShellBar,
html.mobile-embed body.lead-pipeline-active #workspaceShellBar,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection .lead-lms-tab-shell,
html.mobile-embed body.lead-pipeline-active #leadPipelineSection .lead-lms-tab-shell,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
body.mobile-embed.lead-pipeline-active #leadPipelineSection .crm-strip,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection .crm-strip,
html.mobile-embed body.lead-pipeline-active #leadPipelineSection .crm-strip,
body.mobile-embed[data-active-section="lead-pipeline"] #followupReminderPanel,
body.mobile-embed.lead-pipeline-active #followupReminderPanel,
html.mobile-embed body[data-active-section="lead-pipeline"] #followupReminderPanel,
html.mobile-embed body.lead-pipeline-active #followupReminderPanel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadSmartSegments,
body.mobile-embed.lead-pipeline-active #leadSmartSegments,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadSmartSegments,
html.mobile-embed body.lead-pipeline-active #leadSmartSegments,
body.mobile-embed[data-active-section="lead-pipeline"] .lead-mobile-hidden-action,
body.mobile-embed.lead-pipeline-active .lead-mobile-hidden-action,
html.mobile-embed body[data-active-section="lead-pipeline"] .lead-mobile-hidden-action,
html.mobile-embed body.lead-pipeline-active .lead-mobile-hidden-action {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection,
body.mobile-embed.lead-pipeline-active #leadPipelineSection,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection,
html.mobile-embed body.lead-pipeline-active #leadPipelineSection {
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  padding: 4px !important;
  gap: 4px !important;
  overflow: hidden !important;
}

/* Route-state fallback: keep the existing lead list/kanban untouched, but do not
   let non-work chrome reclaim half the screen if the body state is late. */
#leadPipelineSection.lead-workspace-priority:not(.hidden) .lead-lms-tab-shell,
#leadPipelineSection.lead-workspace-priority:not(.hidden) .crm-strip,
#leadPipelineSection.lead-workspace-priority:not(.hidden) #leadSmartSegments,
#leadPipelineSection.lead-workspace-priority:not(.hidden) .lead-workspace-summary-row,
#leadPipelineSection.lead-workspace-priority:not(.hidden) .lead-active-filter-empty {
  display: none !important;
}

body:has(#leadPipelineSection.lead-workspace-priority:not(.hidden)) #workspaceShellBar,
body:has(#leadPipelineSection.lead-workspace-priority:not(.hidden)) #followupReminderPanel {
  display: none !important;
}

/* Mobile app LMS guardrail: the phone shell must use one readable work column.
   Desktop lead list/kanban stays untouched by keeping every selector mobile-only. */
body.mobile-embed[data-active-section="lead-pipeline"],
body.mobile-embed.lead-pipeline-active,
html.mobile-embed body[data-active-section="lead-pipeline"],
html.mobile-embed body.lead-pipeline-active {
  overflow-x: hidden !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] .dashboard-main,
body.mobile-embed.lead-pipeline-active .dashboard-main,
html.mobile-embed body[data-active-section="lead-pipeline"] .dashboard-main,
html.mobile-embed body.lead-pipeline-active .dashboard-main,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection,
body.mobile-embed.lead-pipeline-active #leadPipelineSection,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection,
html.mobile-embed body.lead-pipeline-active #leadPipelineSection {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  box-sizing: border-box !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel,
body.mobile-embed.lead-pipeline-active #leadFilterPanel,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel,
html.mobile-embed body.lead-pipeline-active #leadFilterPanel,
body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelineSection .lead-mobile-secondary-filter,
body.mobile-embed.lead-pipeline-active #leadPipelineSection .lead-mobile-secondary-filter,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelineSection .lead-mobile-secondary-filter,
html.mobile-embed body.lead-pipeline-active #leadPipelineSection .lead-mobile-secondary-filter {
  display: none !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-meta,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-panel-meta,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-panel-meta,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-panel-meta {
  justify-content: center !important;
  width: 100% !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-board,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-board,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-board {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-column,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-column,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-column,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-column {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: auto !important;
  height: auto !important;
  box-sizing: border-box !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-dropzone,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-dropzone,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-dropzone,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-dropzone {
  min-height: 132px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 10px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-empty,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-empty,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-empty,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-empty {
  min-height: 112px !important;
}

body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-card,
body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-card,
html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-card,
html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Mobile shell fallback: apply the LMS phone layout even before route-state
   classes finish syncing. These selectors are intentionally mobile-embed only. */
body.mobile-embed #leadPipelineSection,
html.mobile-embed body #leadPipelineSection {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  padding: 6px !important;
  gap: 8px !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  box-sizing: border-box !important;
}

body.mobile-embed #leadPipelineSection .lead-lms-tab-shell,
html.mobile-embed body #leadPipelineSection .lead-lms-tab-shell,
body.mobile-embed #leadPipelineSection .crm-strip,
html.mobile-embed body #leadPipelineSection .crm-strip,
body.mobile-embed #leadPipelineSection #leadSmartSegments,
html.mobile-embed body #leadPipelineSection #leadSmartSegments,
body.mobile-embed #followupReminderPanel,
html.mobile-embed body #followupReminderPanel,
body.mobile-embed #leadPipelineSection .lead-mobile-secondary-filter,
html.mobile-embed body #leadPipelineSection .lead-mobile-secondary-filter {
  display: none !important;
}

body.mobile-embed #leadFilterPanel,
html.mobile-embed body #leadFilterPanel,
body.mobile-embed #leadPipelinePanel,
html.mobile-embed body #leadPipelinePanel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

body.mobile-embed #leadFilterPanel {
  padding: 8px !important;
  border-radius: 16px !important;
}

body.mobile-embed #leadFilterPanel .lead-filter-topbar,
html.mobile-embed body #leadFilterPanel .lead-filter-topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.mobile-embed #leadFilterPanel .lead-filter-menu-button,
html.mobile-embed body #leadFilterPanel .lead-filter-menu-button {
  min-width: 0 !important;
  width: 100% !important;
  min-height: 34px !important;
  font-size: 12px !important;
}

body.mobile-embed #leadPipelinePanel {
  padding: 10px !important;
  border-radius: 18px !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-panel-header,
html.mobile-embed body #leadPipelinePanel .pipeline-panel-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  text-align: center !important;
  gap: 6px !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-toolbar,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 0 !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-toolbar-group,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar-group {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body.mobile-embed #leadPipelinePanel .view-toggle,
html.mobile-embed body #leadPipelinePanel .view-toggle {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  overflow: hidden !important;
}

body.mobile-embed #leadPipelinePanel .view-toggle-button,
html.mobile-embed body #leadPipelinePanel .view-toggle-button {
  min-width: 0 !important;
  width: 100% !important;
  padding-inline: 8px !important;
  white-space: nowrap !important;
}

body.mobile-embed #leadPipelineBoard,
html.mobile-embed body #leadPipelineBoard,
body.mobile-embed #leadPipelinePanel .pipeline-board,
html.mobile-embed body #leadPipelinePanel .pipeline-board {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-column,
html.mobile-embed body #leadPipelinePanel .pipeline-column {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: auto !important;
  height: auto !important;
  box-sizing: border-box !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-dropzone,
html.mobile-embed body #leadPipelinePanel .pipeline-dropzone {
  min-height: 118px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 10px !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-empty,
html.mobile-embed body #leadPipelinePanel .pipeline-empty {
  min-height: 96px !important;
}

body.mobile-embed #leadPipelinePanel .lead-card,
html.mobile-embed body #leadPipelinePanel .lead-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Final mobile-app LMS guard: the live kanban board renders as #pipelineBoard.
   Keep this mobile-embed scoped so the desktop Lead Pipeline design is untouched. */
html.mobile-embed,
html.mobile-embed body,
body.mobile-embed {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

body.mobile-embed #leadPipelinePanel,
html.mobile-embed body #leadPipelinePanel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board,
html.mobile-embed body #pipelineBoard.pipeline-board,
body.mobile-embed #leadPipelinePanel #pipelineBoard.pipeline-board,
html.mobile-embed body #leadPipelinePanel #pipelineBoard.pipeline-board {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  grid-template-columns: none !important;
  grid-auto-flow: row !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .pipeline-column,
html.mobile-embed body #pipelineBoard.pipeline-board .pipeline-column {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .pipeline-dropzone,
html.mobile-embed body #pipelineBoard.pipeline-board .pipeline-dropzone {
  width: 100% !important;
  min-height: 96px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 10px !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .pipeline-empty,
html.mobile-embed body #pipelineBoard.pipeline-board .pipeline-empty {
  min-height: 82px !important;
  display: grid !important;
  place-items: center !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .lead-card,
html.mobile-embed body #pipelineBoard.pipeline-board .lead-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Mobile app LMS stack polish: keep the live lead workspace readable in a phone
   webview without changing the desktop Lead Pipeline layout. */
body.mobile-embed #leadPipelineSection,
html.mobile-embed body #leadPipelineSection,
body.mobile-embed #leadPipelinePanel,
html.mobile-embed body #leadPipelinePanel {
  inline-size: 100% !important;
  max-inline-size: 100% !important;
  min-inline-size: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

body.mobile-embed #leadPipelinePanel {
  padding: 10px !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-panel-header,
html.mobile-embed body #leadPipelinePanel .pipeline-panel-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
  text-align: left !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-panel-header .eyebrow,
html.mobile-embed body #leadPipelinePanel .pipeline-panel-header .eyebrow {
  display: none !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-panel-header h3,
html.mobile-embed body #leadPipelinePanel .pipeline-panel-header h3 {
  font-size: 1.05rem !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-panel-meta,
html.mobile-embed body #leadPipelinePanel .pipeline-panel-meta {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding-bottom: 2px !important;
  scrollbar-width: none !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-panel-meta::-webkit-scrollbar,
html.mobile-embed body #leadPipelinePanel .pipeline-panel-meta::-webkit-scrollbar {
  display: none !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-toolbar,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 0 !important;
}

body.mobile-embed #leadPipelinePanel .view-toggle,
html.mobile-embed body #leadPipelinePanel .view-toggle {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.mobile-embed #leadPipelinePanel .view-toggle-button,
html.mobile-embed body #leadPipelinePanel .view-toggle-button {
  min-width: 0 !important;
  width: 100% !important;
  padding-inline: 8px !important;
}

body.mobile-embed #pipelineBoard.pipeline-board,
html.mobile-embed body #pipelineBoard.pipeline-board,
body.mobile-embed #leadPipelinePanel .pipeline-board,
html.mobile-embed body #leadPipelinePanel .pipeline-board {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  column-count: auto !important;
  transform: none !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .pipeline-column,
html.mobile-embed body #pipelineBoard.pipeline-board .pipeline-column,
body.mobile-embed #leadPipelinePanel .pipeline-board .pipeline-column,
html.mobile-embed body #leadPipelinePanel .pipeline-board .pipeline-column {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 10px !important;
  padding: 10px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .pipeline-column:has(.pipeline-empty),
html.mobile-embed body #pipelineBoard.pipeline-board .pipeline-column:has(.pipeline-empty),
body.mobile-embed #leadPipelinePanel .pipeline-board .pipeline-column:has(.pipeline-empty),
html.mobile-embed body #leadPipelinePanel .pipeline-board .pipeline-column:has(.pipeline-empty) {
  display: none !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .pipeline-column-header,
html.mobile-embed body #pipelineBoard.pipeline-board .pipeline-column-header,
body.mobile-embed #leadPipelinePanel .pipeline-board .pipeline-column-header,
html.mobile-embed body #leadPipelinePanel .pipeline-board .pipeline-column-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 0 0 8px !important;
  margin: 0 !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .pipeline-dropzone,
html.mobile-embed body #pipelineBoard.pipeline-board .pipeline-dropzone,
body.mobile-embed #leadPipelinePanel .pipeline-board .pipeline-dropzone,
html.mobile-embed body #leadPipelinePanel .pipeline-board .pipeline-dropzone {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .lead-card,
html.mobile-embed body #pipelineBoard.pipeline-board .lead-card,
body.mobile-embed #leadPipelinePanel .pipeline-board .lead-card,
html.mobile-embed body #leadPipelinePanel .pipeline-board .lead-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  border-radius: 16px !important;
  box-sizing: border-box !important;
}

body.mobile-embed #pipelineBoard.pipeline-board .lead-card *,
html.mobile-embed body #pipelineBoard.pipeline-board .lead-card *,
body.mobile-embed #leadPipelinePanel .pipeline-board .lead-card *,
html.mobile-embed body #leadPipelinePanel .pipeline-board .lead-card * {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
}

body.mobile-embed #leadPipelinePanel .lead-table-shell,
html.mobile-embed body #leadPipelinePanel .lead-table-shell {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.mobile-embed #leadPipelinePanel .lead-table,
html.mobile-embed body #leadPipelinePanel .lead-table {
  min-width: 640px !important;
}

/* Android LMS active-view guard: inactive board/list surfaces must not reserve
   phone viewport height after the mobile layout overrides generic .hidden. */
body.mobile-embed #leadPipelinePanel #pipelineBoard.hidden,
html.mobile-embed body #leadPipelinePanel #pipelineBoard.hidden,
body.mobile-embed #leadPipelinePanel .pipeline-board.hidden,
html.mobile-embed body #leadPipelinePanel .pipeline-board.hidden,
body.mobile-embed #leadPipelinePanel #leadGroupedResults.hidden,
html.mobile-embed body #leadPipelinePanel #leadGroupedResults.hidden,
body.mobile-embed #leadPipelinePanel #leadTableShell.hidden,
html.mobile-embed body #leadPipelinePanel #leadTableShell.hidden {
  display: none !important;
  width: 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* Android LMS view switcher: make Kanban/List discoverable without turning the
   control into a full-width desktop ribbon inside the mobile shell. */
body.mobile-embed #leadPipelinePanel .view-toggle,
html.mobile-embed body #leadPipelinePanel .view-toggle {
  justify-self: start !important;
  width: min(100%, 360px) !important;
  max-width: 360px !important;
  grid-template-columns: repeat(2, minmax(128px, 1fr)) !important;
}

body.mobile-embed #leadPipelinePanel .view-toggle-button,
html.mobile-embed body #leadPipelinePanel .view-toggle-button {
  min-width: 0 !important;
  white-space: nowrap !important;
}

body.mobile-embed #leadPipelinePanel #leadViewChip,
html.mobile-embed body #leadPipelinePanel #leadViewChip {
  display: none !important;
}

@media (max-width: 540px) {
  body.mobile-embed #leadPipelinePanel .view-toggle,
  html.mobile-embed body #leadPipelinePanel .view-toggle {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Android LMS parity pass: expose the desktop controls in a compact phone rail
   while keeping the board/list surfaces inside the webview. */
body.mobile-embed #leadFilterPanel .lead-filter-topbar,
html.mobile-embed body #leadFilterPanel .lead-filter-topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: stretch !important;
}

body.mobile-embed #leadFilterPanel .lead-topbar-actions,
html.mobile-embed body #leadFilterPanel .lead-topbar-actions {
  display: flex !important;
  gap: 5px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding-bottom: 2px !important;
  scrollbar-width: none !important;
}

body.mobile-embed #leadFilterPanel .lead-topbar-actions::-webkit-scrollbar,
html.mobile-embed body #leadFilterPanel .lead-topbar-actions::-webkit-scrollbar {
  display: none !important;
}

body.mobile-embed #leadFilterPanel .lead-mobile-secondary-filter,
html.mobile-embed body #leadFilterPanel .lead-mobile-secondary-filter,
body.mobile-embed #leadFilterPanel .lead-filter-menu-anchor,
html.mobile-embed body #leadFilterPanel .lead-filter-menu-anchor,
body.mobile-embed #leadFilterPanel .lead-filter-menu-button,
html.mobile-embed body #leadFilterPanel .lead-filter-menu-button {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: max-content !important;
}

body.mobile-embed #leadFilterPanel .lead-filter-menu-button,
html.mobile-embed body #leadFilterPanel .lead-filter-menu-button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: 11px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.mobile-embed #leadFilterPanel .lead-filter-dropdown,
html.mobile-embed body #leadFilterPanel .lead-filter-dropdown {
  position: fixed !important;
  left: 10px !important;
  right: 10px !important;
  top: auto !important;
  bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  width: auto !important;
  max-width: none !important;
  max-height: min(72dvh, 560px) !important;
  overflow: auto !important;
  z-index: 80 !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28) !important;
}

body.mobile-embed #leadFilterPanel .lead-filter-dropdown .lead-filter-preset-grid,
html.mobile-embed body #leadFilterPanel .lead-filter-dropdown .lead-filter-preset-grid,
body.mobile-embed #leadFilterPanel .lead-filter-dropdown .lead-default-view-grid,
html.mobile-embed body #leadFilterPanel .lead-filter-dropdown .lead-default-view-grid,
body.mobile-embed #leadFilterPanel .lead-filter-dropdown .lead-quick-filter-bar,
html.mobile-embed body #leadFilterPanel .lead-filter-dropdown .lead-quick-filter-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-toolbar,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-toolbar-group,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar-group,
body.mobile-embed #leadPipelinePanel .pipeline-toolbar-group-end,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar-group-end {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 5px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 2px !important;
  scrollbar-width: none !important;
}

body.mobile-embed #leadPipelinePanel .pipeline-toolbar-group::-webkit-scrollbar,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar-group::-webkit-scrollbar,
body.mobile-embed #leadPipelinePanel .pipeline-toolbar-group-end::-webkit-scrollbar,
html.mobile-embed body #leadPipelinePanel .pipeline-toolbar-group-end::-webkit-scrollbar {
  display: none !important;
}

body.mobile-embed #leadPipelinePanel .lead-bulk-stage-note,
html.mobile-embed body #leadPipelinePanel .lead-bulk-stage-note {
  display: none !important;
}

body.mobile-embed #leadPipelinePanel #leadSelectionSummary,
html.mobile-embed body #leadPipelinePanel #leadSelectionSummary {
  flex: 0 0 auto !important;
  align-self: center !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

body.mobile-embed #leadPipelinePanel .lead-bulk-field,
html.mobile-embed body #leadPipelinePanel .lead-bulk-field {
  flex: 0 0 132px !important;
  min-width: 132px !important;
  max-width: 160px !important;
}

body.mobile-embed #leadPipelinePanel .lead-bulk-field-wide,
html.mobile-embed body #leadPipelinePanel .lead-bulk-field-wide {
  flex-basis: 176px !important;
  min-width: 176px !important;
  max-width: 220px !important;
}

body.mobile-embed #leadPipelinePanel .lead-bulk-field span,
html.mobile-embed body #leadPipelinePanel .lead-bulk-field span {
  display: none !important;
}

body.mobile-embed #leadPipelinePanel .lead-bulk-field select,
body.mobile-embed #leadPipelinePanel .lead-bulk-field input,
html.mobile-embed body #leadPipelinePanel .lead-bulk-field select,
html.mobile-embed body #leadPipelinePanel .lead-bulk-field input,
body.mobile-embed #leadPipelinePanel #applyBulkAssignmentButton,
html.mobile-embed body #leadPipelinePanel #applyBulkAssignmentButton {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 9px !important;
  border-radius: 11px !important;
  font-size: 11px !important;
}

body.mobile-embed #leadPipelinePanel #applyBulkAssignmentButton,
html.mobile-embed body #leadPipelinePanel #applyBulkAssignmentButton {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* Desktop Lead Control Center: keep the single command header slim so the lead record
   remains the first substantial view at every desktop width. */
@media (min-width: 761px) {
  #leadWorkspaceSection .lead-workspace-detail-panel {
    gap: 10px;
    padding: 14px;
  }

  #leadWorkspaceSection .lead-detail-modal-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding: 4px 4px 10px;
  }

  #leadWorkspaceSection .lead-detail-modal-header > div:first-child {
    min-width: 0;
  }

  #leadWorkspaceSection .lead-detail-modal-header .eyebrow,
  #leadWorkspaceSection .lead-detail-modal-header .muted {
    display: none;
  }

  #leadWorkspaceSection .lead-detail-modal-header h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #leadWorkspaceSection .lead-detail-modal-actions {
    width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  #leadWorkspaceSection .lead-detail-modal-actions .pill,
  #leadWorkspaceSection .lead-detail-modal-actions .ghost-button {
    min-height: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  #leadWorkspaceSection .lead-header-edit-button {
    min-width: 112px;
  }
}

/* Mobile app Lead Control Center: keep the command header compact so the lead
   detail card owns the phone viewport. Desktop CRM keeps the full header. */
body.mobile-embed #leadWorkspaceSection:not(.hidden),
html.mobile-embed body #leadWorkspaceSection:not(.hidden) {
  padding: 6px !important;
  place-items: stretch !important;
}

body.mobile-embed #leadWorkspaceSection .lead-workspace-detail-panel,
html.mobile-embed body #leadWorkspaceSection .lead-workspace-detail-panel {
  width: 100% !important;
  max-width: 100% !important;
  height: calc(100dvh - 12px) !important;
  max-height: calc(100dvh - 12px) !important;
  min-height: 0 !important;
  padding: 10px !important;
  gap: 8px !important;
  border-radius: 18px !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-header,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-header {
  display: grid !important;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 8px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(203, 213, 225, 0.8) !important;
  background: rgba(255, 255, 255, 0.9) !important;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-header > div:first-child,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-header > div:first-child {
  min-width: 0 !important;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-header .eyebrow,
body.mobile-embed #leadWorkspaceSection .lead-detail-modal-header .muted,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-header .eyebrow,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-header .muted {
  display: none !important;
}

body.mobile-embed #leadWorkspaceSection #leadDetailTitle,
html.mobile-embed body #leadWorkspaceSection #leadDetailTitle {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-actions,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  align-items: center !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-actions::-webkit-scrollbar,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-actions::-webkit-scrollbar {
  display: none;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-actions > *,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-actions > * {
  flex: 0 0 auto !important;
}

body.mobile-embed #leadWorkspaceSection #leadWorkspaceBackButton,
html.mobile-embed body #leadWorkspaceSection #leadWorkspaceBackButton {
  order: 99 !important;
  position: sticky !important;
  right: 0 !important;
  z-index: 3 !important;
  margin-left: auto !important;
  width: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  font-size: 0 !important;
  background: #ffffff !important;
  box-shadow: -6px 0 10px rgba(255, 255, 255, 0.96) !important;
}

body.mobile-embed #leadWorkspaceSection #leadWorkspaceBackButton .lead-workspace-back-label,
html.mobile-embed body #leadWorkspaceSection #leadWorkspaceBackButton .lead-workspace-back-label {
  display: none !important;
}

body.mobile-embed #leadWorkspaceSection #leadWorkspaceBackButton .lead-workspace-back-icon,
html.mobile-embed body #leadWorkspaceSection #leadWorkspaceBackButton .lead-workspace-back-icon {
  font-size: 1rem;
  line-height: 1;
}

body.mobile-embed #leadWorkspaceSection #leadWorkspaceBackButton:not(:has(.lead-workspace-back-icon))::before,
html.mobile-embed body #leadWorkspaceSection #leadWorkspaceBackButton:not(:has(.lead-workspace-back-icon))::before {
  content: "←";
  font-size: 1rem;
  line-height: 1;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-actions .pill,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-actions .pill {
  min-height: 32px !important;
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
  justify-content: center !important;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-modal-actions .ghost-button,
html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-actions .ghost-button {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 8px !important;
  border-radius: 12px !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
}

body.mobile-embed #leadWorkspaceSection #leadDetailContent,
html.mobile-embed body #leadWorkspaceSection #leadDetailContent {
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-shell,
html.mobile-embed body #leadWorkspaceSection .lead-detail-shell {
  width: 100% !important;
  gap: 8px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-detail-hero,
body.mobile-embed #leadWorkspaceSection .lead-detail-hero-premium,
body.mobile-embed #leadWorkspaceSection .lead-detail-summary-card,
body.mobile-embed #leadWorkspaceSection .lead-detail-side-card,
body.mobile-embed #leadWorkspaceSection .lead-control-section,
html.mobile-embed body #leadWorkspaceSection .lead-detail-hero,
html.mobile-embed body #leadWorkspaceSection .lead-detail-hero-premium,
html.mobile-embed body #leadWorkspaceSection .lead-detail-summary-card,
html.mobile-embed body #leadWorkspaceSection .lead-detail-side-card,
html.mobile-embed body #leadWorkspaceSection .lead-control-section {
  border-radius: 16px !important;
  padding: 12px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-shell,
html.mobile-embed body #leadWorkspaceSection .lead-reference-shell {
  gap: 8px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-topbar,
html.mobile-embed body #leadWorkspaceSection .lead-reference-topbar {
  position: static !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px !important;
  padding: 8px 9px !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05) !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-breadcrumb,
html.mobile-embed body #leadWorkspaceSection .lead-reference-breadcrumb {
  min-width: 0 !important;
  gap: 5px !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-breadcrumb span,
html.mobile-embed body #leadWorkspaceSection .lead-reference-breadcrumb span {
  display: inline !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-topbar-actions,
html.mobile-embed body #leadWorkspaceSection .lead-reference-topbar-actions {
  gap: 5px !important;
  justify-content: flex-end !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-topbar-actions .pill,
body.mobile-embed #leadWorkspaceSection .lead-reference-topbar-actions .ghost-button,
html.mobile-embed body #leadWorkspaceSection .lead-reference-topbar-actions .pill,
html.mobile-embed body #leadWorkspaceSection .lead-reference-topbar-actions .ghost-button {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 12px !important;
  font-size: 0.76rem !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-main,
html.mobile-embed body #leadWorkspaceSection .lead-reference-main {
  gap: 8px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-hero,
html.mobile-embed body #leadWorkspaceSection .lead-reference-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 12px !important;
  border-radius: 16px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-identity,
html.mobile-embed body #leadWorkspaceSection .lead-reference-identity {
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 10px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-avatar,
html.mobile-embed body #leadWorkspaceSection .lead-reference-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 18px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-name-block,
body.mobile-embed #leadWorkspaceSection .lead-reference-contact-list,
html.mobile-embed body #leadWorkspaceSection .lead-reference-name-block,
html.mobile-embed body #leadWorkspaceSection .lead-reference-contact-list {
  gap: 5px !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-name-block h2,
html.mobile-embed body #leadWorkspaceSection .lead-reference-name-block h2 {
  font-size: 1.3rem !important;
  line-height: 1.08 !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-trip-grid,
body.mobile-embed #leadWorkspaceSection .lead-reference-owner-grid,
html.mobile-embed body #leadWorkspaceSection .lead-reference-trip-grid,
html.mobile-embed body #leadWorkspaceSection .lead-reference-owner-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 10px 0 0 !important;
  border-left: 0 !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
}

body.mobile-embed #leadWorkspaceSection .lead-reference-contact-list strong,
body.mobile-embed #leadWorkspaceSection .lead-reference-trip-grid strong,
body.mobile-embed #leadWorkspaceSection .lead-reference-owner-grid strong,
html.mobile-embed body #leadWorkspaceSection .lead-reference-contact-list strong,
html.mobile-embed body #leadWorkspaceSection .lead-reference-trip-grid strong,
html.mobile-embed body #leadWorkspaceSection .lead-reference-owner-grid strong {
  font-size: 0.82rem !important;
}

@media (max-width: 430px) {
  body.mobile-embed #leadWorkspaceSection .lead-detail-modal-actions .ghost-button,
  html.mobile-embed body #leadWorkspaceSection .lead-detail-modal-actions .ghost-button {
    padding-inline: 6px !important;
    font-size: 0.72rem !important;
  }
}

/* Mobile Lead Control Center command rail: the workspace context is already
   clear from the lead card, so keep only the commands in the compact top line. */
@media (max-width: 760px) {
  #leadWorkspaceSection .lead-detail-modal-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 8px !important;
  }

  #leadWorkspaceSection .lead-detail-modal-header > div:first-child {
    display: none !important;
  }

  #leadWorkspaceSection .lead-detail-modal-header .eyebrow,
  #leadWorkspaceSection .lead-detail-modal-header .muted {
    display: none !important;
  }

  #leadWorkspaceSection #leadDetailTitle {
    margin: 0 !important;
    font-size: 0.78rem !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  #leadWorkspaceSection .lead-detail-modal-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 1px 0 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #leadWorkspaceSection .lead-detail-modal-actions::-webkit-scrollbar {
    display: none;
  }

  #leadWorkspaceSection .lead-detail-modal-actions > * {
    flex: 0 0 auto !important;
  }

  #leadWorkspaceSection #leadWorkspaceBackButton {
    order: 99 !important;
    position: sticky !important;
    right: 0 !important;
    z-index: 3 !important;
    margin-left: auto !important;
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    font-size: 0 !important;
    background: #ffffff !important;
    box-shadow: -6px 0 10px rgba(255, 255, 255, 0.96) !important;
  }

  #leadWorkspaceSection #leadWorkspaceBackButton .lead-workspace-back-label {
    display: none !important;
  }

  #leadWorkspaceSection #leadWorkspaceBackButton .lead-workspace-back-icon {
    font-size: 1rem;
    line-height: 1;
  }

  #leadWorkspaceSection #leadWorkspaceBackButton:not(:has(.lead-workspace-back-icon))::before {
    content: "←";
    font-size: 1rem;
    line-height: 1;
  }

  #leadWorkspaceSection .lead-detail-modal-actions .pill,
  #leadWorkspaceSection .lead-detail-modal-actions .ghost-button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 7px !important;
    border-radius: 10px !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

.lead-mobile-stage-rail {
  display: none;
}

@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail {
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 38px !important;
    margin: 0 0 6px !important;
    padding: 0 1px 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail::-webkit-scrollbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail::-webkit-scrollbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail::-webkit-scrollbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail::-webkit-scrollbar {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip {
    display: grid !important;
    grid-template-columns: minmax(68px, 1fr) auto !important;
    align-items: center !important;
    flex: 0 0 118px !important;
    min-width: 118px !important;
    min-height: 36px !important;
    padding: 5px 7px !important;
    border: 1px solid rgba(203, 213, 225, 0.92) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #172033 !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06) !important;
    font: inherit !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    text-align: left !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip span,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip span,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip span,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip strong,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip strong,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip strong,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip strong {
    min-width: 22px !important;
    height: 22px !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 999px !important;
    background: #eef2ff !important;
    color: #1e293b !important;
    font-size: 10px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip.has-leads,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip.has-leads,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip.has-leads,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip.has-leads {
    border-color: rgba(20, 184, 166, 0.5) !important;
    background: linear-gradient(180deg, #ffffff, #ecfeff) !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip.active,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip.active,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip.active,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip.active {
    border-color: rgba(14, 165, 233, 0.86) !important;
    background: linear-gradient(180deg, #e0f2fe, #ffffff) !important;
    color: #075985 !important;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.14), 0 8px 18px rgba(14, 165, 233, 0.14) !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip.active strong,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip.active strong,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip.active strong,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip.active strong {
    background: #0284c7 !important;
    color: #ffffff !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip i,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip i,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip i,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip i {
    grid-column: 1 / -1 !important;
    display: block !important;
    height: 3px !important;
    margin-top: 3px !important;
    border-radius: 999px !important;
    background: #e2e8f0 !important;
    overflow: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip i b,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip i b,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip i b,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip i b {
    display: block !important;
    height: 100% !important;
    border-radius: inherit !important;
    background: linear-gradient(90deg, #14b8a6, #0ea5e9) !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip {
    flex: initial !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 32px !important;
    padding: 4px 6px !important;
    font-size: 9px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip strong,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip strong,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip strong,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip strong {
    min-width: 19px !important;
    height: 19px !important;
    font-size: 9px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-topbar-actions {
    display: flex !important;
    grid-column: 1 / -1 !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-anchor,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-menu-anchor,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-anchor,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-menu-anchor,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-mobile-secondary-filter,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-mobile-secondary-filter,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-mobile-secondary-filter,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-mobile-secondary-filter,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    min-width: max-content !important;
    width: auto !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end {
    display: flex !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field {
    display: grid !important;
    flex: 0 0 132px !important;
    min-width: 132px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide {
    flex-basis: 176px !important;
    min-width: 176px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Narrow phone lead filters: keep every command fully visible instead of
   letting the fourth action clip beyond the webview edge. */
@media (max-width: 400px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-topbar-actions,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-topbar-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    overflow: visible !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-anchor,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-menu-anchor,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-anchor,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-menu-anchor,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-mobile-secondary-filter,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-mobile-secondary-filter,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-mobile-secondary-filter,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-mobile-secondary-filter,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button {
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  body.mobile-embed.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadFilterPanel .lead-filter-menu-button,
  html.mobile-embed body.lead-pipeline-active #leadFilterPanel .lead-filter-menu-button {
    padding-inline: 6px !important;
    font-size: 10px !important;
  }
}

.lead-persistence-receipt {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10090;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(460px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid #86efac;
  border-radius: 12px;
  background: #f0fdf4;
  color: #14532d;
  box-shadow: 0 18px 42px rgba(20, 83, 45, 0.2);
}

.lead-persistence-receipt div {
  display: grid;
  min-width: 0;
  gap: 4px;
  flex: 1;
}

.lead-persistence-receipt span {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.lead-persistence-receipt button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #166534;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 760px) {
  .lead-persistence-receipt {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }
}

/* Quote room configuration scope */
body[data-active-section="quote-generator"] .quote-day-rooming-summary small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

body[data-active-section="quote-generator"] .quote-rooming-scope {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

body[data-active-section="quote-generator"] .quote-rooming-scope button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

body[data-active-section="quote-generator"] .quote-rooming-scope button:hover:not(:disabled) {
  border-color: #fdba74;
  background: #fff7ed;
}

body[data-active-section="quote-generator"] .quote-rooming-scope button.is-active {
  border-color: #ea580c;
  background: #fff7ed;
  color: #9a3412;
}

body[data-active-section="quote-generator"] .quote-rooming-scope button[data-quote-rooming-configure] {
  margin-left: auto;
  background: #0f766e;
  color: #ffffff;
}

body[data-active-section="quote-generator"] .quote-rooming-scope button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

body[data-active-section="quote-generator"] .quote-rooming-scope-modal {
  flex-wrap: wrap;
  margin: 12px 0;
}

body[data-active-section="quote-generator"] .quote-rooming-scope-modal > span {
  flex: 1 1 260px;
  padding: 0 6px;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-rooming-scope {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-active-section="quote-generator"] .quote-rooming-scope button,
  body[data-active-section="quote-generator"] .quote-rooming-scope button[data-quote-rooming-configure] {
    width: 100%;
    margin-left: 0;
  }
}

/* Mobile app LMS: prevent toolbar and stage chips from overlapping the lead area. */
@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
    margin-bottom: 8px !important;
    overflow: visible !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar .view-toggle,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar .view-toggle,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar .view-toggle,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar .view-toggle {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadViewChip,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .toolbar-chip-soft,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadViewChip,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .toolbar-chip-soft,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadViewChip,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .toolbar-chip-soft,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #leadViewChip,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .toolbar-chip-soft {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadSelectionSummary,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadSelectionSummary,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadSelectionSummary,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #leadSelectionSummary {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field {
    display: grid !important;
    flex: initial !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: initial !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 36px !important;
    padding: 5px 6px !important;
    overflow: hidden !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #pipelineBoard,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadTableShell,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #pipelineBoard,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadTableShell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #pipelineBoard,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadTableShell,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #pipelineBoard,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #leadTableShell {
    margin-top: 0 !important;
  }
}

/* Mobile app LMS: compact the second-row controls after the overlap guard. */
@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    gap: 6px !important;
    margin-bottom: 7px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end {
    display: grid !important;
    grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadSelectionSummary,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadSelectionSummary,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadSelectionSummary,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #leadSelectionSummary {
    grid-column: auto !important;
    align-self: center !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field {
    min-height: 30px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field select,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field input,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field select,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field input,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field select,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field input,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field select,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field input {
    height: 30px !important;
    min-height: 30px !important;
    padding-inline: 8px !important;
    font-size: 10px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide {
    grid-column: 1 / 3 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton {
    grid-column: 3 / 4 !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 8px !important;
    border-radius: 11px !important;
    font-size: 10px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail {
    gap: 5px !important;
    margin-bottom: 8px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-chip,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-chip {
    min-height: 34px !important;
    padding: 4px 6px !important;
  }
}

/* Mobile app LMS: final visual spacing pass for the list/status controls. */
@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .pipeline-toolbar-group-end,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .pipeline-toolbar-group-end {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadSelectionSummary,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadSelectionSummary,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadSelectionSummary,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #leadSelectionSummary {
    display: none !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field-wide,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field-wide,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton {
    grid-column: auto !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field select,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field input,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field select,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-bulk-field input,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field select,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-bulk-field input,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field select,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-bulk-field input,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #applyBulkAssignmentButton,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #applyBulkAssignmentButton {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel .lead-mobile-stage-rail,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel .lead-mobile-stage-rail {
    gap: 7px !important;
    margin: 2px 0 14px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadTableShell,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadTableShell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadTableShell,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #leadTableShell,
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #pipelineBoard,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #pipelineBoard,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #pipelineBoard,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #pipelineBoard {
    margin-top: 0 !important;
  }
}

/* Mobile app LMS: separate stage chips from the first lead card. */
@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadPipelinePanel #leadTableShell,
  body.mobile-embed.lead-pipeline-active #leadPipelinePanel #leadTableShell,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadPipelinePanel #leadTableShell,
  html.mobile-embed body.lead-pipeline-active #leadPipelinePanel #leadTableShell {
    padding-top: 22px !important;
    box-sizing: border-box !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell .lead-table tbody,
  body.mobile-embed.lead-pipeline-active #leadTableShell .lead-table tbody,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-table tbody,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-table tbody {
    padding-top: 0 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row],
  body.mobile-embed.lead-pipeline-active #leadTableShell tr[data-lead-row],
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row],
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] {
    margin-top: 0 !important;
  }
}

/* Mobile app LMS: real phone guard for action buttons in the lead card. */
@media (max-width: 760px) {
  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td[data-label="Actions"],
  body.mobile-embed.lead-pipeline-active #leadTableShell tr[data-lead-row] > td[data-label="Actions"],
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td[data-label="Actions"],
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] > td[data-label="Actions"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td[data-label="Actions"]::before,
  body.mobile-embed.lead-pipeline-active #leadTableShell tr[data-lead-row] > td[data-label="Actions"]::before,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell tr[data-lead-row] > td[data-label="Actions"]::before,
  html.mobile-embed body.lead-pipeline-active #leadTableShell tr[data-lead-row] > td[data-label="Actions"]::before {
    grid-column: 1 / -1 !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell .lead-row-quick-actions,
  body.mobile-embed.lead-pipeline-active #leadTableShell .lead-row-quick-actions,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-row-quick-actions,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-row-quick-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body.mobile-embed[data-active-section="lead-pipeline"] #leadTableShell .lead-row-quick-actions .ghost-button,
  body.mobile-embed.lead-pipeline-active #leadTableShell .lead-row-quick-actions .ghost-button,
  html.mobile-embed body[data-active-section="lead-pipeline"] #leadTableShell .lead-row-quick-actions .ghost-button,
  html.mobile-embed body.lead-pipeline-active #leadTableShell .lead-row-quick-actions .ghost-button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
  }
}
/* AI stays reachable only through the global Yatra floating assistant. */
[data-section="sales-assistant"],
[data-section="ai-trainer"],
[data-section="marketing-ai-draft-queue"],
#proactiveAssistantSection,
#intelligenceSection,
#roleAwareInsightSection,
#optimizationSection,
#aiHealthSection,
#aiOpsDeck,
#aiWorkspaceSection,
#aiTrainerSection,
#quotePaymentSmartIntakeButton,
[href="#quoteCopilotPanel"],
#manualCostingAiGenerateButton,
#manualCostingAiFeedback,
#hrRoleAiGuidancePanel,
.hr-ai-help-trigger,
#employeeDraftAssistantCard,
#employeeDraftModal,
#employeeDraftModalBackdrop,
#chatAiAssistButton,
#marketingCatalogAiEnhanceButton,
#marketingCatalogAiKeywordsButton,
#marketingCatalogAiFaqButton,
#aiGovernanceCommandCenter,
#aiAdminControlPanels,
#yatraOneGovernancePanel,
.ai-only-surface {
  display: none !important;
}

.desktop-followup-obligation-modal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
}

.desktop-followup-obligation-modal.hidden,
.desktop-followup-mini-chip.hidden {
  display: none !important;
}

.desktop-followup-obligation-dialog {
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 22px;
}

.desktop-followup-obligation-head,
.desktop-followup-obligation-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.desktop-followup-obligation-head h2 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.desktop-followup-obligation-head p,
.desktop-followup-obligation-meta {
  color: #475569;
}

.desktop-followup-obligation-meta {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.94rem;
  font-weight: 700;
}

.desktop-followup-obligation-note {
  margin-top: 14px;
  padding: 12px;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  background: #fff7ed;
  color: #334155;
  font-weight: 700;
}

.desktop-followup-obligation-status {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}

.desktop-followup-obligation-status[data-tone="ok"] {
  background: #dcfce7;
  color: #166534;
}

.desktop-followup-obligation-call {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
}

.desktop-followup-obligation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.desktop-followup-obligation-section {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.desktop-followup-obligation-section h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  letter-spacing: 0;
}

.desktop-followup-obligation-section .field {
  gap: 5px;
}

.desktop-followup-obligation-section select,
.desktop-followup-obligation-section input {
  width: 100%;
  min-height: 38px;
}

.desktop-followup-obligation-section button {
  width: 100%;
  min-height: 38px;
  white-space: normal;
}

.desktop-followup-mini-chip {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10070;
  max-width: min(360px, calc(100vw - 48px));
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.28);
  font-weight: 900;
  cursor: pointer;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .desktop-followup-obligation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .desktop-followup-obligation-modal,
  .desktop-followup-mini-chip {
    display: none !important;
  }
}

/* Quote Desk deterministic return navigation. Keep this at EOF so the local
   header control remains usable across the legacy reference-shell overrides. */
body[data-active-section="quote-generator"] .quote-builder-topbar-identity {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-title {
  min-width: 0 !important;
}

/* Conversation-first Itinerary Copilot */
.quote-itinerary-sandbox-summary {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.quote-itinerary-sandbox-days {
  display: grid;
  gap: 12px;
  padding-bottom: 10px;
}

.quote-itinerary-sandbox-day {
  align-items: start;
  min-height: 0;
}

.quote-itinerary-sandbox-day .quote-itinerary-preview-day-copy > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-itinerary-sandbox-day .quote-itinerary-preview-day-copy > header strong,
.quote-itinerary-sandbox-day .quote-itinerary-preview-day-copy > header small {
  display: block;
}

.quote-itinerary-sandbox-day .quote-itinerary-preview-day-copy > header small {
  margin-top: 3px;
  color: #64748b;
}

.quote-itinerary-sandbox-day-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.quote-itinerary-sandbox-day-actions button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #bfd0e5;
  border-radius: 999px;
  color: #1d4ed8;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.quote-itinerary-manual-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #bfd4ee;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fbff, #fff);
}

.quote-itinerary-manual-form label {
  display: grid;
  gap: 5px;
}

.quote-itinerary-manual-form label.is-wide {
  grid-column: 1 / -1;
}

.quote-itinerary-manual-form label > span {
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
}

.quote-itinerary-manual-form input,
.quote-itinerary-manual-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #d2deec;
  border-radius: 10px;
  color: #0f172a;
  background: #fff;
  font: inherit;
}

.quote-itinerary-manual-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.quote-itinerary-manual-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.quote-itinerary-sandbox-content {
  margin: 10px 0;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 700px) {
  .quote-itinerary-manual-form {
    grid-template-columns: 1fr;
  }

  .quote-itinerary-manual-form label,
  .quote-itinerary-manual-form label.is-wide,
  .quote-itinerary-manual-actions {
    grid-column: 1;
  }
}

.quote-itinerary-sandbox-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.quote-itinerary-sandbox-facts > span {
  display: grid;
  gap: 2px;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  color: #334155;
  background: #f8fafc;
}

.quote-itinerary-sandbox-facts b {
  color: #64748b;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-itinerary-sightseeing-control {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #e2e8f0;
}

.quote-itinerary-sightseeing-control > div > strong {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.quote-itinerary-preview-tags,
.quote-itinerary-master-suggestions,
.quote-itinerary-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quote-itinerary-preview-tags button,
.quote-itinerary-master-suggestions button,
.quote-itinerary-ai-suggestions button {
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
}

.quote-itinerary-preview-tags button {
  border: 1px solid #bfd5ff;
  color: #1d4ed8;
  background: #eff6ff;
}

.quote-itinerary-preview-tags button b {
  margin-left: 4px;
  color: #64748b;
  font-size: 1rem;
}

.quote-itinerary-master-suggestions button {
  border: 1px solid #99e4d2;
  color: #0f766e;
  background: #f0fdfa;
}

.quote-itinerary-master-suggestions button:hover {
  border-color: #14b8a6;
  background: #ccfbf1;
}

.quote-itinerary-ai-suggestions button {
  border: 1px solid #fdba74;
  color: #c2410c;
  background: #fff7ed;
}

.quote-itinerary-ai-suggestions button:hover {
  border-color: #f97316;
  background: #ffedd5;
}

.quote-itinerary-sightseeing-control small {
  color: #94a3b8;
}

.quote-itinerary-chat-card {
  position: relative;
  width: min(1680px, 100%);
  height: min(940px, calc(100vh - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.08), transparent 24%),
    linear-gradient(145deg, #f8fbff, #f7fafc 58%, #fffaf4);
}

.quote-itinerary-conversion-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: #0f172a;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.14), transparent 24%),
    rgba(248, 251, 255, 0.96);
  backdrop-filter: blur(16px);
  animation: quoteItineraryOverlayIn 220ms ease-out both;
}

.quote-itinerary-conversion-overlay > strong {
  margin-top: 8px;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  letter-spacing: -0.035em;
}

.quote-itinerary-conversion-overlay > p:not(.eyebrow) {
  max-width: 520px;
  margin: 10px auto 0;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.55;
}

.quote-itinerary-conversion-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin-bottom: 18px;
}

.quote-itinerary-conversion-logo {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff7a30, #ef2b2d);
  font-size: 1.7rem;
  font-weight: 950;
  box-shadow: 0 18px 42px rgba(239, 43, 45, 0.28);
}

.quote-itinerary-conversion-orbit {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: #2563eb;
  border-right-color: #ff6b35;
  border-radius: 50%;
  animation: quoteItineraryOrbit 900ms linear infinite;
}

.quote-itinerary-conversion-progress {
  width: min(360px, 72vw);
  height: 8px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe7f5;
}

.quote-itinerary-conversion-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #ff6b35);
  animation: quoteItineraryProgress 900ms ease-in-out infinite alternate;
}

.quote-itinerary-conversion-overlay.is-complete .quote-itinerary-conversion-orbit {
  border-color: #16a34a;
  animation: none;
}

.quote-itinerary-conversion-overlay.is-complete .quote-itinerary-conversion-logo {
  background: linear-gradient(145deg, #16a34a, #059669);
}

.quote-itinerary-conversion-overlay.is-complete .quote-itinerary-conversion-progress span {
  width: 100%;
  background: #16a34a;
  animation: none;
}

.quote-itinerary-conversion-overlay.is-error .quote-itinerary-conversion-orbit {
  border-color: #dc2626;
  animation: none;
}

@keyframes quoteItineraryOverlayIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes quoteItineraryOrbit {
  to { transform: rotate(360deg); }
}

@keyframes quoteItineraryProgress {
  from { transform: translateX(-10%); }
  to { transform: translateX(150%); }
}

.quote-itinerary-chat-head {
  position: relative;
}

.quote-itinerary-chat-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-itinerary-chat-title h3 {
  font-size: clamp(1.15rem, 1.7vw, 1.65rem);
}

.quote-itinerary-chat-title > span {
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #a16207;
  background: #fff7e6;
  font-size: 0.72rem;
  font-weight: 900;
}

.quote-itinerary-chat-title > span.is-approved {
  border-color: rgba(22, 163, 74, 0.26);
  color: #15803d;
  background: #ecfdf3;
}

.quote-itinerary-chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(470px, 0.95fr);
  gap: 12px;
  min-height: 0;
  height: calc(100% - 176px);
  padding: 12px 18px;
}

.quote-itinerary-conversation-panel,
.quote-itinerary-preview-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.quote-itinerary-conversation-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.quote-itinerary-preview-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.quote-itinerary-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.quote-itinerary-panel-head span,
.quote-itinerary-panel-head strong {
  display: block;
}

.quote-itinerary-panel-head span {
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quote-itinerary-panel-head strong {
  margin-top: 2px;
  color: #0f172a;
  font-size: 1rem;
}

.quote-itinerary-panel-head small {
  color: #64748b;
  font-weight: 750;
}

.quote-itinerary-learning-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #b7ead7;
  border-radius: 999px;
  color: #166534 !important;
  background: #ecfdf5;
  white-space: nowrap;
}

.quote-itinerary-learning-badge b {
  color: #047857;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quote-itinerary-chat-messages,
.quote-itinerary-chat-preview {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.quote-itinerary-chat-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 4px 6px 10px 2px;
}

.quote-itinerary-chat-welcome,
.quote-itinerary-chat-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed rgba(37, 99, 235, 0.3);
  border-radius: 18px;
  color: #64748b;
  text-align: center;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.9));
}

.quote-itinerary-chat-welcome strong,
.quote-itinerary-chat-empty strong {
  color: #0f172a;
  font-size: 1rem;
}

.quote-itinerary-chat-welcome p,
.quote-itinerary-chat-empty p {
  max-width: 460px;
  margin: 6px 0 0;
}

.quote-itinerary-chat-message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  max-width: 88%;
}

.quote-itinerary-chat-message.is-agent {
  margin-left: auto;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.quote-itinerary-chat-message.is-agent .quote-itinerary-chat-avatar {
  grid-column: 2;
  grid-row: 1;
  background: linear-gradient(145deg, #2563eb, #60a5fa);
}

.quote-itinerary-chat-message.is-agent > div:last-child {
  grid-column: 1;
  grid-row: 1;
}

.quote-itinerary-chat-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff7a30, #ef2b2d);
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.quote-itinerary-chat-message > div:last-child {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px 16px 16px;
  background: #fff;
}

.quote-itinerary-chat-message.is-agent > div:last-child {
  border-color: rgba(37, 99, 235, 0.24);
  border-radius: 16px 6px 16px 16px;
  background: #eff6ff;
}

.quote-itinerary-chat-message header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #2563eb;
}

.quote-itinerary-chat-message.is-assistant header {
  color: #e23b2f;
}

.quote-itinerary-chat-message header small {
  color: #94a3b8;
  font-weight: 700;
}

.quote-itinerary-chat-message p {
  margin: 5px 0 0;
  color: #1e293b;
  line-height: 1.48;
  white-space: pre-wrap;
}

.quote-itinerary-composer {
  padding: 10px;
  border: 2px solid #2563eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.1);
}

.quote-itinerary-composer textarea {
  width: 100%;
  min-height: 72px;
  max-height: 150px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
  font: inherit;
  line-height: 1.45;
}

.quote-itinerary-composer-toolbar,
.quote-itinerary-composer-toolbar > div,
.quote-itinerary-voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quote-itinerary-composer-toolbar {
  justify-content: space-between;
  margin-top: 8px;
}

.quote-itinerary-mode-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #334155;
  background: #f8fafc;
  font-weight: 850;
}

.quote-itinerary-mode-button small {
  padding: 2px 5px;
  border-radius: 999px;
  color: #64748b;
  background: #e2e8f0;
  font-size: 0.62rem;
}

.quote-itinerary-mode-button.is-active {
  border-color: rgba(22, 163, 74, 0.3);
  color: #047857;
  background: #ecfdf5;
}

.quote-itinerary-mode-button.is-active small {
  color: #166534;
  background: #bbf7d0;
}

.quote-itinerary-voice-actions > span {
  max-width: 220px;
  overflow: hidden;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-itinerary-mic-button,
.quote-itinerary-send-button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #2563eb;
  font-weight: 900;
}

.quote-itinerary-mic-button.is-listening {
  animation: quote-itinerary-mic-pulse 1.35s ease-in-out infinite;
  background: #ef4444;
}

.quote-itinerary-send-button {
  background: linear-gradient(135deg, #ff7a30, #ef2b2d);
}

@keyframes quote-itinerary-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.28); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.quote-itinerary-chat-preview {
  padding-right: 4px;
}

.quote-itinerary-preview-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}

.quote-itinerary-preview-meta span {
  padding: 8px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.quote-itinerary-preview-days {
  display: grid;
  gap: 7px;
}

.quote-itinerary-preview-day {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
}

.quote-itinerary-preview-day.is-updated {
  border-color: rgba(22, 163, 74, 0.4);
  background: linear-gradient(135deg, #f0fdf4, #fff);
  box-shadow: inset 4px 0 #22c55e;
}

.quote-itinerary-preview-day-index {
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eff6ff;
  font-size: 0.75rem;
  font-weight: 950;
}

.quote-itinerary-preview-day-copy {
  padding: 9px 11px;
}

.quote-itinerary-preview-day-copy > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quote-itinerary-preview-day-copy strong {
  color: #0f172a;
  font-size: 0.85rem;
}

.quote-itinerary-preview-day-copy p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.75rem;
}

.quote-itinerary-updated-pill {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #15803d;
  background: #dcfce7;
  font-size: 0.62rem;
  font-weight: 900;
}

.quote-itinerary-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.quote-itinerary-preview-tags span {
  padding: 3px 7px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 0.65rem;
  font-weight: 800;
}

.quote-itinerary-chat-footer {
  min-height: 72px;
}

.quote-itinerary-chat-footer > p {
  color: #475569;
  font-weight: 800;
}

.quote-itinerary-chat-footer > p.is-success {
  color: #047857;
}

.quote-itinerary-chat-footer > p.is-error {
  color: #b91c1c;
}

.quote-itinerary-floating-orb {
  position: absolute;
  z-index: 4;
  right: 20px;
  bottom: 86px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 32% 24%, #ff8a3d, #ef2b2d 60%, #b91c1c);
  box-shadow: 0 14px 34px rgba(239, 43, 45, 0.28);
}

.quote-itinerary-floating-orb span,
.quote-itinerary-floating-orb small {
  display: block;
}

.quote-itinerary-floating-orb span {
  font-size: 1.25rem;
  font-weight: 950;
}

.quote-itinerary-floating-orb small {
  font-size: 0.58rem;
  font-weight: 900;
}

@media (max-width: 1040px) {
  .quote-itinerary-chat-card {
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }

  .quote-itinerary-chat-grid {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100% - 190px);
    overflow: auto;
  }

  .quote-itinerary-conversation-panel,
  .quote-itinerary-preview-panel {
    min-height: 580px;
  }
}

@media (max-width: 700px) {
  .quote-itinerary-chat-grid {
    padding: 8px;
  }

  .quote-itinerary-chat-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-itinerary-composer-toolbar,
  .quote-itinerary-composer-toolbar > div,
  .quote-itinerary-voice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-itinerary-preview-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-itinerary-chat-message {
    max-width: 96%;
  }

  .quote-itinerary-floating-orb {
    display: none;
  }
}

body[data-active-section="quote-generator"] .quote-builder-topbar-head {
  grid-template-columns: minmax(0, 1.55fr) auto !important;
  gap: 12px 16px !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-identity {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 14px !important;
  width: 100% !important;
}

body[data-active-section="quote-generator"] .quote-builder-topbar-title {
  display: grid !important;
  gap: 6px !important;
  align-content: start !important;
}

body[data-active-section="quote-generator"] .quote-builder-breadcrumb {
  margin-bottom: 4px !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 8px 10px !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-title strong {
  max-width: 18ch !important;
  font-size: clamp(1.4rem, 1.65vw, 1.85rem) !important;
  line-height: 1.08 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-wrap: balance !important;
}

body[data-active-section="quote-generator"] .quote-builder-record-chip,
body[data-active-section="quote-generator"] #quoteBuilderSelectionLabel {
  max-width: 100% !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] .quote-builder-reference-utility {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-auto-columns: max-content !important;
  align-items: center !important;
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-search {
  width: clamp(180px, 20vw, 300px) !important;
  min-width: 180px !important;
}

body[data-active-section="quote-generator"] .quote-builder-utility-profile {
  max-width: 220px !important;
}

body[data-active-section="quote-generator"] .quote-builder-secondary-actions .detail-action-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

body[data-active-section="quote-generator"] .quote-builder-back-button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 142px !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  font-weight: 800 !important;
}

#quoteDeskListPanel {
  scroll-margin-top: 24px;
}

body[data-active-section="quote-generator"] #quoteDashboardSection > #quoteDeskSecondaryTools.is-quote-back-open.quote-dashboard-grid {
  display: block !important;
  width: 100% !important;
  margin-top: 16px !important;
}

/* Back to Quote Desk is a list takeover, not a second workspace stacked above the builder. */
body[data-active-section="quote-generator"] #quoteDashboardSection.is-quote-list-workspace {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection.is-quote-list-workspace > .quote-builder-grid {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection.is-quote-list-workspace > #quoteDeskSecondaryTools.is-quote-back-open.quote-dashboard-grid {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  overflow-x: clip !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection.is-quote-list-workspace .quote-desk-secondary-tools-body {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection.is-quote-list-workspace #quoteDeskListPanel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body[data-active-section="quote-generator"] #quoteDashboardSection.is-quote-list-workspace .desk-list-shell {
  max-width: 100% !important;
  overflow-x: auto !important;
}

#quoteDeskListPanel.quote-desk-list-focus {
  outline: 3px solid rgba(37, 99, 235, 0.38) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.1), 0 18px 42px rgba(15, 23, 42, 0.12) !important;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-builder-topbar-identity {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-topbar-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-reference-utility {
    grid-auto-flow: row !important;
    justify-content: stretch !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-utility-search,
  body[data-active-section="quote-generator"] .quote-builder-utility-profile {
    width: 100% !important;
    max-width: 100% !important;
  }

  body[data-active-section="quote-generator"] .quote-builder-back-button {
    align-self: flex-start !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* Quote Day Card: authoritative component-width layout.
   Keep this at EOF so legacy viewport and ledger-row experiments cannot
   squeeze the current detailed card when the CRM sidebar changes its width. */
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column {
  container-name: quote-day-card-shell;
  container-type: inline-size;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-target-card,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-target-card.is-selected,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-target-card.is-collapsed-ready,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-detail-column .quote-day-target-card.is-editor-open {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: none !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top {
  display: grid !important;
  grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1.28fr) !important;
  gap: 16px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 16px 18px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top > div:first-child {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  grid-column: auto !important;
  grid-area: auto !important;
  gap: 5px 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-title,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top .muted,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-copilot-badge {
  min-width: 0 !important;
  max-width: 100% !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-title {
  white-space: normal !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top .muted {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
  grid-column: auto !important;
  grid-area: auto !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  align-self: center !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions .ghost-button,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions button {
  display: grid !important;
  place-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  height: 100% !important;
  padding: 8px 10px !important;
  overflow: visible !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-visual-builder {
  display: grid !important;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr) !important;
  grid-column: auto !important;
  grid-area: auto !important;
  gap: 14px !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  padding: 0 18px !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview {
  display: grid !important;
  grid-column: auto !important;
  grid-row: auto !important;
  place-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 180px !important;
  height: auto !important;
  max-height: 260px !important;
  aspect-ratio: 16 / 9;
  overflow: hidden !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 260px !important;
  object-fit: cover !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-detail-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  width: 100%;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-rooming-scope {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  align-items: stretch !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-rooming-scope button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 7px 9px !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-rooming-scope button[data-quote-rooming-configure] {
  grid-column: 1 / -1;
  margin-left: 0 !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-card {
  display: grid !important;
  grid-column: auto !important;
  grid-row: auto !important;
  grid-area: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-card strong {
  overflow: visible !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  -webkit-line-clamp: initial !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(80px, 1fr)) !important;
  gap: 8px !important;
  min-width: 0 !important;
  min-height: 40px !important;
  height: auto !important;
  overflow: visible !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-route-meta span {
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-area: auto !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 14px 18px 18px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-footer strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@container quote-day-card-shell (max-width: 900px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-target-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@container quote-day-card-shell (max-width: 700px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-visual-builder {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-image-preview {
    max-height: none !important;
  }
}

@container quote-day-card-shell (max-width: 520px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-top,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-visual-builder,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-target-footer {
    padding-inline: 14px !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-builder-repeat-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card .quote-day-target-footer {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
/* Quote Desk AI proposal review */
.quote-copilot-review-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* Quote Desk final itinerary day card.
   Itinerary owns day content; Costing remains the commercial source of truth. */
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-target-card {
  gap: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 22px !important;
  background: linear-gradient(145deg, #fffdf9 0%, #ffffff 58%, #f7fbff 100%) !important;
  box-shadow: 0 18px 50px rgba(30, 41, 59, 0.08) !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-identity {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-identity > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-identity .quote-day-title-icon {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #ef3340);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.2);
  font-size: 0.92rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-identity .quote-builder-repeat-title {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.15;
  color: #14213d;
  font-weight: 900;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-identity p {
  margin: 0;
  color: #5f718d;
  font-weight: 700;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-header-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-header-status span,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-header-status small {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-header-status span {
  color: #1d4ed8;
  background: #eff6ff;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-header-status small {
  color: #64748b;
  background: #f1f5f9;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-edit-button {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-remove-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  color: #dc2626;
  border-color: #fecaca;
  background: #fff;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-remove-button:hover:not(:disabled) {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fff1f2;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(240px, 0.75fr);
  gap: 16px;
  padding: 18px 22px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-main-column,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-side-column {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-planned-route,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-plan-copy,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-places,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-fact-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-planned-route,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-plan-copy {
  border-color: rgba(251, 146, 60, 0.24);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.72), rgba(255, 255, 255, 0.94));
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-section-title > span {
  color: #17223b;
  font-weight: 900;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-section-title small {
  max-width: 62%;
  overflow: hidden;
  color: #7b8aa2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-route-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--quote-route-stops), minmax(72px, 1fr));
  gap: 8px;
  padding-top: 4px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-route-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  right: calc(50% / var(--quote-route-stops));
  left: calc(50% / var(--quote-route-stops));
  height: 2px;
  background: linear-gradient(90deg, #ff5a36, #f97316);
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-route-stop {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-route-dot {
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #ff5a36;
  box-shadow: 0 0 0 2px #ff5a36;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-route-stop strong {
  max-width: 100%;
  color: #16213b;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-route-stop small {
  color: #7b8aa2;
  font-size: 0.72rem;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-plan-copy p {
  margin: 0;
  color: #334155;
  line-height: 1.65;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-places .quote-day-section-title button {
  padding: 6px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  color: #2563eb;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-place-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-sightseeing-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px dashed #dbe3ed;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-sightseeing-suggestions button {
  padding: 6px 10px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-sightseeing-suggestions button.is-ai {
  color: #c2410c;
  border-color: #fdba74;
  background: #fff7ed;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-suggestion-label {
  width: 100%;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-suggestion-label.is-ai {
  color: #c2410c;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-place-chip,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-empty-copy {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 0.78rem;
  font-weight: 750;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-place-chip.is-count,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-empty-copy {
  color: #64748b;
  border-color: #dbe3ed;
  background: #f8fafc;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-fact-card h4 {
  margin: 0;
  color: #17223b;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-fact-card article {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid #e6ebf2;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-fact-card article span {
  color: #718198;
  font-size: 0.75rem;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-fact-card article strong {
  color: #17223b;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-side-column .quote-day-image-preview {
  position: relative;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-height: 132px !important;
  max-height: 190px !important;
  aspect-ratio: 16 / 9;
  overflow: hidden !important;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-side-column .quote-day-image-preview img {
  width: 100% !important;
  height: 100% !important;
  max-height: 190px !important;
  object-fit: cover !important;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-side-column .quote-day-image-preview > span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 6px 9px;
  border-radius: 8px;
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  font-size: 0.72rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-image-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-image-quick-actions .ghost-button {
  min-height: 38px;
  padding: 8px 10px;
  border-color: #d8e1ee;
  background: #ffffff;
  color: #1e3a5f;
  font-size: 0.76rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-image-quick-actions {
    grid-template-columns: 1fr;
  }
}

body.quote-crm-gallery-open {
  overflow: hidden;
}

body.quote-crm-gallery-open #chatFloatingWidget,
body.quote-crm-gallery-open #assistantWidget,
body.quote-crm-gallery-open #actionFeedbackToast {
  visibility: hidden !important;
  pointer-events: none !important;
}

.quote-crm-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 60000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.quote-crm-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(2px);
}

.quote-crm-gallery-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #d8e1ee;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}

.quote-crm-gallery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #e7edf5;
}

.quote-crm-gallery-head h3 {
  margin: 0;
  color: #17223b;
  font-size: 1.25rem;
}

.quote-crm-gallery-head p {
  margin: 5px 0 0;
  color: #718198;
  font-size: 0.84rem;
}

.quote-crm-gallery-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #d8e1ee;
  border-radius: 10px;
  background: #ffffff;
  color: #53657d;
  font-size: 1.45rem;
  cursor: pointer;
}

.quote-crm-gallery-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.quote-crm-gallery-loading,
.quote-crm-gallery-error,
.quote-crm-gallery-empty {
  margin: 24px;
  padding: 18px;
  border: 1px dashed #ccd8e8;
  border-radius: 14px;
  color: #718198;
  text-align: center;
}

.quote-crm-gallery-error {
  margin: 0 24px 12px;
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}

.quote-crm-gallery-toolbar {
  display: grid;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #edf1f6;
}

.quote-crm-gallery-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #ccd8e8;
  border-radius: 11px;
  background: #ffffff;
  color: #718198;
}

.quote-crm-gallery-search:focus-within {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.quote-crm-gallery-search input {
  width: 100%;
  min-height: 40px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.quote-crm-gallery-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quote-crm-gallery-filters label {
  display: grid;
  gap: 5px;
}

.quote-crm-gallery-filters label > span {
  color: #52647b;
  font-size: 0.7rem;
  font-weight: 800;
}

.quote-crm-gallery-filters select {
  width: 100%;
  min-height: 40px;
  padding: 0 36px 0 11px;
  border: 1px solid #ccd8e8;
  border-radius: 10px;
  background-color: #ffffff;
}

.quote-crm-gallery-workspace {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px;
  min-height: 0;
  padding: 16px 24px;
  overflow: hidden;
}

.quote-crm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
}

.quote-crm-gallery-card {
  display: grid;
  align-self: start;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 0 0 1px #dce4ef;
  color: #17223b;
  text-align: left;
  cursor: pointer;
}

.quote-crm-gallery-card:hover,
.quote-crm-gallery-card:focus-visible {
  border-color: #fdba74;
  outline: none;
}

.quote-crm-gallery-card.is-selected {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.quote-crm-gallery-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #edf2f7;
}

.quote-crm-gallery-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-crm-gallery-card-media > small {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.95);
  color: #087443;
  font-size: 0.62rem;
  font-weight: 800;
}

.quote-crm-gallery-card-media > b {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
}

.quote-crm-gallery-card-copy {
  display: grid;
  gap: 4px;
  padding: 10px 11px 11px;
}

.quote-crm-gallery-card-copy strong {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-crm-gallery-card-copy small {
  overflow: hidden;
  color: #718198;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-crm-gallery-preview {
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #fbfdff;
}

.quote-crm-gallery-preview > strong {
  color: #17223b;
  font-size: 0.82rem;
}

.quote-crm-gallery-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
}

.quote-crm-gallery-preview h4 {
  margin: 0;
  color: #17223b;
  font-size: 1rem;
}

.quote-crm-gallery-preview p {
  margin: 8px 0;
  color: #718198;
  font-size: 0.78rem;
}

.quote-crm-gallery-preview dl,
.quote-crm-gallery-preview dl div {
  display: grid;
  gap: 3px;
  margin: 0;
}

.quote-crm-gallery-preview dl {
  gap: 10px;
}

.quote-crm-gallery-preview dt {
  color: #718198;
  font-size: 0.65rem;
}

.quote-crm-gallery-preview dd {
  margin: 0;
  color: #29384f;
  font-size: 0.76rem;
  font-weight: 700;
}

.quote-crm-gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 24px;
  border-top: 1px solid #e7edf5;
  background: #ffffff;
}

.quote-crm-gallery-footer > span {
  color: #52647b;
  font-size: 0.78rem;
  font-weight: 700;
}

.quote-crm-gallery-footer > div {
  display: flex;
  gap: 10px;
}

.quote-crm-gallery-footer .primary-button {
  background: #f45a2a;
}

@media (max-width: 900px) {
  .quote-crm-gallery-modal {
    padding: 0;
  }

  .quote-crm-gallery-panel {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .quote-crm-gallery-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-crm-gallery-workspace {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .quote-crm-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .quote-crm-gallery-head {
    padding: 16px;
  }

  .quote-crm-gallery-toolbar {
    padding: 12px 16px;
  }

  .quote-crm-gallery-filters,
  .quote-crm-gallery-workspace,
  .quote-crm-gallery-grid {
    grid-template-columns: 1fr;
  }

  .quote-crm-gallery-workspace {
    display: block;
    padding: 12px 16px;
    overflow-y: auto;
  }

  .quote-crm-gallery-grid {
    display: grid;
    overflow: visible;
  }

  .quote-crm-gallery-preview {
    margin-top: 12px;
  }

  .quote-crm-gallery-footer {
    padding: 12px 16px;
  }
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-services {
  display: grid;
  gap: 12px;
  margin: 0 22px 20px;
  padding: 15px;
  border: 1px solid rgba(14, 165, 164, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(248, 250, 252, 0.96));
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-services-head > div {
  display: grid;
  gap: 2px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-services-head span {
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 900;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-services-head small,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-costing-note {
  color: #64748b;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-costing-link {
  min-height: 38px;
  color: #0f766e;
  border-color: #99f6e4;
  background: #fff;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce5ed;
  border-radius: 12px;
  background: #fff;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service > span {
  color: #718198;
  font-size: 0.72rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service strong {
  color: #17223b;
  overflow-wrap: anywhere;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service small {
  color: #64748b;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service.is-selected {
  border-color: #99f6e4;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service.is-selected strong {
  color: #0f766e;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service.is-pending {
  border-color: #fed7aa;
  background: #fffaf5;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service.is-pending strong {
  color: #c2410c;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-costing-note {
  margin: 0;
  font-size: 0.76rem;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  color: #17223b;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d9e2ec;
  border-radius: 50%;
  color: #64748b;
  font-weight: 900;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview small,
body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview p {
  color: #718198;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview b {
  color: #2563eb;
}

@container quote-day-card-shell (max-width: 780px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-side-column {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  }
}

@container quote-day-card-shell (max-width: 560px) {
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-header,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-services-head {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-summary-actions {
    width: 100%;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-edit-button {
    flex: 1;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-remove-button {
    flex: 1;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-overview-grid {
    padding-inline: 14px;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-side-column,
  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-service-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-linked-services {
    margin-inline: 14px;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-route-timeline {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] #quoteBuilderItinerarySection .quote-day-next-preview b {
    display: none;
  }
}

.quote-copilot-location-grounding {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  background: #fffbeb;
}

.quote-copilot-location-grounding p {
  margin: 4px 0 0;
  color: #92400e;
}

.quote-copilot-location-grounding > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-copilot-location-grounding span {
  padding: 7px 10px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  background: #fff;
  font-size: 0.78rem;
}

.quote-sightseeing-review-modal {
  position: fixed;
  inset: 0;
  z-index: 12500;
  display: grid;
  place-items: center;
  padding: 22px;
}

.quote-sightseeing-review-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

.quote-sightseeing-review-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1060px, 96vw);
  max-height: min(900px, 94vh);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 24px;
  background: linear-gradient(145deg, #fffdf8, #f8fbff);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.3);
}

.quote-sightseeing-review-card > header,
.quote-sightseeing-review-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.92);
}

.quote-sightseeing-review-card > header {
  border-bottom: 1px solid #e2e8f0;
}

.quote-sightseeing-review-card > footer {
  border-top: 1px solid #e2e8f0;
}

.quote-sightseeing-review-card h3,
.quote-sightseeing-review-card header p,
.quote-sightseeing-review-card footer p {
  margin: 0;
}

.quote-sightseeing-review-card header > div {
  display: grid;
  gap: 4px;
}

.quote-sightseeing-review-days {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  overflow-y: auto;
}

.quote-sightseeing-review-day {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background: #fff;
}

.quote-sightseeing-review-day-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-sightseeing-review-day-head > span {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #ef3340);
  font-weight: 900;
}

.quote-sightseeing-review-day-head > div {
  display: grid;
  gap: 3px;
}

.quote-sightseeing-review-day-head small {
  color: #64748b;
}

.quote-sightseeing-review-selected,
.quote-sightseeing-review-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quote-sightseeing-review-selected button,
.quote-sightseeing-review-suggestions button {
  padding: 7px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  cursor: pointer;
  font-weight: 750;
}

.quote-sightseeing-review-suggestions > strong {
  width: 100%;
  color: #475569;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quote-sightseeing-review-suggestions > strong.is-ai {
  color: #c2410c;
}

.quote-sightseeing-review-suggestions button {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.quote-sightseeing-review-suggestions button.is-ai {
  color: #c2410c;
  border-color: #fdba74;
  background: #fff7ed;
}

.quote-sightseeing-review-suggestions button.is-selected {
  opacity: 0.54;
  pointer-events: none;
}

.quote-sightseeing-review-empty,
.quote-sightseeing-review-suggestions > span {
  color: #64748b;
  font-size: 0.82rem;
}

.quote-sightseeing-review-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.quote-sightseeing-review-manual input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d6dfeb;
  border-radius: 11px;
}

.quote-sightseeing-review-status {
  color: #64748b;
}

@media (max-width: 680px) {
  .quote-sightseeing-review-modal {
    padding: 0;
  }

  .quote-sightseeing-review-card {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .quote-sightseeing-review-card > header,
  .quote-sightseeing-review-card > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-sightseeing-review-manual {
    grid-template-columns: minmax(0, 1fr);
  }
}

.quote-copilot-review-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
}

.quote-copilot-review-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  padding: 24px;
}

.quote-copilot-review-head,
.quote-copilot-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quote-copilot-review-head h3,
.quote-copilot-review-head p {
  margin: 0;
}

.quote-copilot-review-head .eyebrow {
  margin-bottom: 5px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.quote-copilot-quality-score {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 900;
}

.quote-copilot-quality-score.is-ready {
  background: #dcfce7;
  color: #166534;
}

.quote-copilot-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.quote-copilot-review-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
}

.quote-copilot-review-grid span,
.quote-copilot-review-grid small {
  color: #64748b;
}

.quote-copilot-review-warning,
.quote-copilot-review-issues,
.quote-copilot-review-ready {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.quote-copilot-hard-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid #fca5a5;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fef2f2;
  color: #991b1b;
}

.quote-copilot-hard-block p,
.quote-copilot-review-action-status {
  margin: 4px 0 0;
}

.quote-copilot-review-action-status {
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
}

.quote-copilot-review-actions button.is-blocked {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.35);
  box-shadow: none;
}

.quote-copilot-review-warning,
.quote-copilot-review-issues {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.quote-copilot-review-warning p,
.quote-copilot-review-issues p {
  margin: 4px 0 0;
}

.quote-copilot-review-ready {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.quote-copilot-review-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .quote-copilot-review-modal {
    padding: 12px;
  }

  .quote-copilot-review-card {
    padding: 18px;
    border-radius: 20px;
  }

  .quote-copilot-review-grid {
    grid-template-columns: 1fr;
  }

  .quote-copilot-hard-block {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-copilot-review-actions button {
    flex: 1 1 100%;
  }
}
/* Costing target visual: compact hotel + rooming workspace. */
.quote-costing-target-editor {
  gap: 10px;
}

.quote-costing-editor-stage {
  padding: 0;
  overflow: hidden;
}

.quote-costing-hotel-rooming-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.quote-costing-target-section-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.quote-costing-target-section-head h4,
.quote-costing-target-section-head p {
  margin: 0;
}

.quote-costing-target-section-head p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.77rem;
}

.quote-costing-collapse-caret {
  color: var(--text-muted);
  font-weight: 900;
}

.quote-costing-hotel-card {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.quote-costing-hotel-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.quote-costing-hotel-search .quote-day-hotel-selected {
  min-width: 0;
}

.quote-costing-hotel-search .quote-day-hotel-selected-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.quote-costing-hotel-search .quote-costing-hotel-thumb img,
.quote-costing-hotel-search .quote-costing-hotel-thumb > span,
.quote-costing-hotel-thumb-fallback {
  width: 72px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(145deg, #dbeafe, #fed7aa);
}

.quote-costing-hotel-search .quote-costing-hotel-thumb > span,
.quote-costing-hotel-thumb-fallback {
  display: grid;
  place-items: center;
  color: #1e3a8a;
  font-weight: 900;
}

.quote-costing-hotel-search .quote-costing-selected-hotel-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.quote-costing-hotel-search .quote-costing-selected-hotel-copy > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.quote-costing-hotel-search .quote-costing-selected-hotel-copy strong,
.quote-costing-hotel-search .quote-costing-selected-hotel-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-costing-hotel-search .quote-costing-selected-hotel-copy p,
.quote-costing-hotel-search .quote-costing-selected-hotel-copy small {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.quote-costing-selected-badge,
.quote-costing-rooming-match-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: #166534;
  background: #dcfce7;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.quote-costing-rooming-match-badge {
  justify-self: end;
}

.quote-costing-rooming-match-badge[data-tone="review"] {
  color: #9a3412;
  background: #ffedd5;
}

.quote-costing-hotel-picker {
  position: relative;
}

.quote-costing-hotel-picker > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #93c5fd;
  border-radius: 9px;
  padding: 9px 12px;
  color: #1d4ed8;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.quote-costing-hotel-picker > summary::-webkit-details-marker {
  display: none;
}

.quote-costing-hotel-picker-body {
  position: absolute;
  z-index: 8;
  top: calc(100% + 8px);
  right: 0;
  width: min(680px, calc(100vw - 40px));
  max-height: 380px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
}

.quote-costing-hotel-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.quote-costing-hotel-picker-head p {
  margin: 0;
}

.quote-costing-rooming-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(360px, 1.3fr);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: #fff;
}

.quote-costing-meal-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.quote-costing-meal-plan select {
  width: 94px;
  min-height: 36px;
  padding: 6px 28px 6px 10px;
}

.quote-costing-rooming-source {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 9px;
  overflow: hidden;
}

.quote-costing-rooming-source button {
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  color: #475569;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.quote-costing-rooming-source button + button {
  border-left: 1px solid rgba(148, 163, 184, 0.34);
}

.quote-costing-rooming-source button.is-active {
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #60a5fa;
}

.quote-costing-allocation-banner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 12px;
  padding: 9px 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 9px;
  background: #f8fafc;
}

.quote-costing-allocation-banner > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.quote-costing-allocation-banner > div:last-child {
  justify-content: flex-end;
  text-align: right;
}

.quote-costing-allocation-banner strong,
.quote-costing-allocation-banner small {
  display: block;
}

.quote-costing-allocation-banner small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.quote-costing-allocation-banner[data-tone="match"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.quote-costing-allocation-banner[data-tone="match"] > div:last-child strong,
.quote-costing-allocation-check {
  color: #15803d;
}

.quote-costing-allocation-icon,
.quote-costing-allocation-check {
  flex: 0 0 auto;
  font-size: 1.05rem;
  font-weight: 900;
}

.quote-costing-room-table {
  margin: 0 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.quote-costing-room-table-head,
.quote-costing-room-row {
  grid-template-columns: minmax(170px, 1.35fr) minmax(100px, 0.72fr) 112px minmax(125px, 0.85fr) 100px 34px;
  gap: 10px;
}

.quote-costing-room-table-head {
  padding: 8px 11px;
  background: #f8fafc;
  font-size: 0.67rem;
}

.quote-costing-room-grid {
  border: 0;
  border-radius: 0;
}

.quote-costing-room-row {
  min-height: 58px;
  padding: 8px 11px;
}

.quote-costing-room-guests {
  display: flex;
  align-items: center;
  gap: 5px;
}

.quote-costing-room-stepper {
  display: grid;
  grid-template-columns: 32px 44px 32px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  background: #fff;
}

.quote-costing-room-stepper button,
.quote-costing-room-stepper input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
}

.quote-costing-room-stepper button {
  color: #475569;
  font-size: 1rem;
  font-weight: 800;
}

.quote-costing-room-stepper input {
  border-inline: 1px solid rgba(148, 163, 184, 0.3);
  appearance: textfield;
}

.quote-costing-room-stepper input::-webkit-inner-spin-button,
.quote-costing-room-stepper input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.quote-costing-room-rate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding-left: 9px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
}

.quote-costing-room-rate input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 8px 6px 0;
  border: 0;
  background: transparent;
}

.quote-costing-room-total {
  text-align: right;
  white-space: nowrap;
}

.quote-costing-room-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  font-size: 1.15rem;
}

.quote-costing-room-remove:hover,
.quote-costing-room-remove:focus-visible {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

.quote-costing-room-empty {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 18px;
  color: var(--text-muted);
  text-align: center;
}

.quote-costing-room-warning {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 10px 8px;
  padding: 7px 9px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  color: #c2410c;
  background: #fff7ed;
  font-size: 0.73rem;
}

.quote-costing-room-warning > span:last-child {
  color: #9a3412;
}

.quote-costing-room-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.quote-costing-add-room {
  display: flex;
  align-items: center;
  gap: 7px;
}

.quote-costing-add-room select,
.quote-costing-add-room button {
  min-height: 34px;
  padding-block: 6px;
  font-size: 0.74rem;
}

.quote-costing-hotel-subtotal {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.quote-costing-hotel-subtotal strong {
  font-size: 1rem;
}

.quote-costing-target-accordion {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 11px;
  background: #fff;
}

.quote-costing-target-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 9px 13px;
  list-style: none;
  cursor: pointer;
}

.quote-costing-target-accordion > summary::-webkit-details-marker {
  display: none;
}

.quote-costing-target-accordion > summary > span {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.quote-costing-target-accordion > summary small {
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-costing-target-accordion > summary::after {
  content: "⌄";
  color: var(--text-muted);
  font-weight: 900;
}

.quote-costing-target-accordion[open] > summary::after {
  content: "⌃";
}

.quote-costing-target-accordion > summary > strong:last-of-type {
  margin-left: auto;
  white-space: nowrap;
}

.quote-costing-validation-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.quote-costing-validation-checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.quote-costing-validation-checks li > span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 900;
}

.quote-costing-validation-checks li[data-tone="success"] {
  color: #166534;
}

.quote-costing-validation-checks li[data-tone="success"] > span {
  color: #fff;
  background: #16a34a;
}

.quote-costing-validation-checks li[data-tone="info"] > span {
  color: #1d4ed8;
  background: #dbeafe;
}

#quoteCostingOverrideButton {
  display: none;
}

.quote-costing-accordion-body {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

@media (max-width: 1180px) {
  .quote-costing-modal-body {
    grid-template-columns: minmax(180px, 210px) minmax(0, 1fr) minmax(230px, 270px);
  }

  .quote-costing-room-table-head {
    display: none;
  }

  .quote-costing-room-row {
    grid-template-columns: minmax(150px, 1fr) minmax(90px, auto) 112px minmax(120px, 0.8fr) 92px 34px;
  }
}

@media (max-width: 980px) {
  .quote-costing-room-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "meta total"
      "guests remove"
      "stepper rate";
    gap: 8px 12px;
  }

  .quote-costing-room-meta { grid-area: meta; }
  .quote-costing-room-guests { grid-area: guests; }
  .quote-costing-room-stepper { grid-area: stepper; width: 112px; }
  .quote-costing-room-rate { grid-area: rate; width: min(180px, 100%); justify-self: end; }
  .quote-costing-room-total { grid-area: total; }
  .quote-costing-room-remove { grid-area: remove; justify-self: end; }

  .quote-costing-rooming-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .quote-costing-hotel-search {
    grid-template-columns: 1fr;
  }

  .quote-costing-hotel-search .quote-day-hotel-selected-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .quote-costing-hotel-search .quote-costing-hotel-thumb img,
  .quote-costing-hotel-search .quote-costing-hotel-thumb > span,
  .quote-costing-hotel-thumb-fallback {
    width: 58px;
    height: 46px;
  }

  .quote-costing-rooming-match-badge {
    grid-column: 1 / -1;
    justify-content: flex-start;
    justify-self: start;
  }

  .quote-costing-hotel-picker > summary {
    text-align: center;
  }

  .quote-costing-hotel-picker-body {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
  }

  .quote-costing-rooming-source,
  .quote-costing-allocation-banner {
    grid-template-columns: 1fr;
  }

  .quote-costing-allocation-banner > div:last-child {
    justify-content: flex-start;
    text-align: left;
  }

  .quote-costing-room-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "meta total"
      "guests remove"
      "stepper stepper"
      "rate rate";
  }

  .quote-costing-room-stepper,
  .quote-costing-room-rate {
    width: 100%;
  }

  .quote-costing-room-table-footer,
  .quote-costing-add-room {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-costing-hotel-subtotal {
    justify-content: space-between;
  }

  .quote-costing-target-accordion > summary > span {
    display: grid;
    gap: 2px;
  }
}

/* Exact target alignment for the approved Costing workspace visual. */
.quote-costing-modal-header {
  grid-template-columns: 220px minmax(0, 1fr) minmax(340px, 390px);
  min-height: 96px;
  padding: 13px 28px;
  gap: 20px;
}

.quote-costing-back-button {
  justify-self: start;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 0.9rem;
}

.quote-costing-modal-heading .eyebrow {
  display: none;
}

.quote-costing-modal-heading h3 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.quote-costing-modal-heading .muted {
  margin-top: 5px;
  font-size: 0.84rem;
}

.quote-costing-header-stats {
  grid-template-columns: minmax(190px, 1fr) minmax(140px, 0.72fr);
  gap: 0;
}

.quote-costing-header-stats article {
  min-height: 62px;
  padding: 8px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quote-costing-header-stats article + article {
  border-left: 1px solid rgba(148, 163, 184, 0.34);
}

#quoteCostingLiveTotal {
  color: #16a34a;
  font-size: 1.55rem;
}

.quote-costing-modal-body {
  grid-template-columns: minmax(280px, 1fr) minmax(640px, 2.45fr) minmax(280px, 0.95fr);
  gap: 18px;
  padding: 18px 22px;
}

.quote-costing-day-rail,
.quote-costing-workspace,
.quote-costing-summary-panel {
  border-radius: 10px;
}

.quote-costing-day-rail {
  padding: 16px;
  gap: 12px;
}

.quote-costing-day-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.quote-costing-day-rail-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.quote-costing-day-rail-head > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  color: #475569;
}

.quote-costing-day-list {
  gap: 10px;
}

.quote-costing-day-item {
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 9px;
}

.quote-costing-day-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.quote-costing-day-copy strong {
  display: flex;
  gap: 5px;
  min-width: 0;
}

.quote-costing-day-copy strong em {
  overflow: hidden;
  color: #475569;
  font-size: 0.83rem;
  font-style: normal;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-costing-day-copy small {
  font-size: 0.8rem;
  font-weight: 800;
}

.quote-costing-day-status-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  justify-self: end;
  border-radius: 999px;
  color: #fff;
  background: #f97316;
  font-size: 0.75rem;
  font-weight: 900;
}

.quote-costing-day-item[data-tone="success"] .quote-costing-day-status-icon {
  background: #16a34a;
}

.quote-costing-day-item[data-tone="info"] .quote-costing-day-status-icon {
  background: #2563eb;
}

.quote-costing-day-item.is-active {
  border: 2px solid #fb923c;
  box-shadow: none;
  background: #fffaf5;
}

.quote-costing-selected-day-header {
  min-height: 62px;
  padding: 11px 28px;
  border-radius: 10px 10px 0 0;
}

.quote-costing-selected-day-header > button {
  display: none;
}

.quote-costing-selected-day-header > div {
  grid-column: 1 / -1;
}

.quote-costing-selected-day-header > div > strong {
  font-size: 1.25rem;
}

.quote-costing-selected-day-header .pill[data-tone="success"] {
  color: #166534;
  background: #dcfce7;
}

.quote-costing-selected-day-header .pill[data-tone="warning"] {
  color: #c2410c;
  background: #fff7ed;
}

.quote-costing-section-tabs {
  top: 62px;
  border-radius: 0;
}

.quote-costing-section-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 56px;
  padding: 12px;
  font-size: 0.86rem;
}

.quote-costing-section-tabs a > span {
  color: currentColor;
  font-size: 1.15rem;
  font-weight: 900;
}

.quote-costing-target-section-head {
  padding: 13px 15px 10px;
}

.quote-costing-target-section-head p {
  display: none;
}

.quote-costing-target-editor > .quote-costing-target-accordion {
  margin-inline: 0;
}

.quote-costing-target-accordion > summary {
  min-height: 50px;
  padding: 10px 14px;
}

.quote-costing-target-accordion > summary::before {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: #334155;
  font-size: 1rem;
  font-weight: 900;
}

#quoteCostingTransportSection > summary::before { content: "▣"; }
#quoteCostingActivitiesSection > summary::before { content: "△"; }
#quoteCostingPoliciesSection > summary::before { content: "◇"; }

.quote-costing-target-accordion > summary > span {
  flex: 1 1 auto;
}

.quote-costing-target-accordion > summary > span > strong {
  min-width: 92px;
}

.quote-costing-summary-panel {
  gap: 0;
  overflow: auto;
}

.quote-costing-summary-panel .quote-costing-side-card {
  border-radius: 0;
  padding: 20px 18px;
}

.quote-costing-summary-panel .quote-costing-side-card:first-child {
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
}

.quote-costing-summary-panel .quote-costing-side-card:nth-child(2) {
  border-radius: 0 0 10px 10px;
}

.quote-costing-day-summary-card > h4,
.quote-costing-summary-panel .quote-costing-side-card:nth-child(2) h4 {
  font-size: 1.15rem;
}

.quote-costing-side-breakdown {
  gap: 16px;
  margin-top: 16px;
}

.quote-costing-side-breakdown > div {
  font-size: 0.86rem;
}

.quote-costing-side-breakdown .is-total {
  margin-top: 4px;
  padding-top: 16px;
}

.quote-costing-trip-total-card {
  display: none;
}

.quote-costing-modal-footer {
  min-height: 82px;
  padding: 12px 28px;
}

.quote-costing-modal-footer .form-status.is-warning {
  color: #ea580c;
  font-weight: 800;
}

.quote-costing-modal-actions button {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 9px;
}

#quoteCostingSaveDraftButton::before { content: "▣"; margin-right: 7px; }
#quoteCostingValidateDayButton::before { content: "◇"; margin-right: 7px; }
#quoteCostingValidateAllButton::before { content: "▱"; margin-right: 7px; }
#quoteCostingLockPushButton::before { content: "▢"; margin-right: 7px; }

@media (max-width: 1180px) {
  .quote-costing-modal-header {
    grid-template-columns: 190px minmax(0, 1fr) 320px;
    padding-inline: 18px;
  }

  .quote-costing-modal-body {
    grid-template-columns: minmax(210px, 0.7fr) minmax(0, 2fr);
    padding: 14px;
  }

  .quote-costing-summary-panel {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .quote-costing-modal-header {
    grid-template-columns: 1fr auto;
    min-height: auto;
  }

  .quote-costing-modal-heading {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .quote-costing-header-stats {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .quote-costing-modal-body {
    grid-template-columns: 1fr;
  }

  .quote-costing-summary-panel {
    grid-column: 1;
  }

  .quote-costing-modal-footer {
    padding: 10px 12px;
  }
}

@media (min-width: 1181px) {
  .quote-costing-modal-header {
    min-height: 82px;
    padding-block: 10px;
  }

  .quote-costing-modal-body {
    padding: 12px 18px;
  }

  .quote-costing-selected-day-header {
    min-height: 56px;
    padding-block: 9px;
  }

  .quote-costing-section-tabs {
    top: 56px;
  }

  .quote-costing-section-tabs a {
    min-height: 48px;
    padding-block: 9px;
  }

  .quote-costing-room-table-footer {
    padding-block: 6px;
  }

  .quote-costing-target-accordion > summary {
    min-height: 46px;
    padding-block: 8px;
  }

  .quote-costing-modal-footer {
    min-height: 70px;
    padding-block: 9px;
  }
}

.lead-modal.quote-costing-modal > .quote-costing-modal-header {
  display: grid !important;
  align-items: center !important;
  justify-content: stretch !important;
}

.lead-modal.quote-costing-modal .quote-costing-back-button {
  border: 0 !important;
  background: transparent !important;
}

/* Mobile target: full-screen costing, compact blockers, and touch-friendly rooming. */
.quote-costing-footer-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.quote-costing-footer-status .form-status {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-costing-view-issues {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border-color: transparent;
  color: #c2410c;
  background: transparent;
  text-decoration: underline;
}

.quote-costing-issues-sheet {
  position: absolute;
  right: 18px;
  bottom: 78px;
  z-index: 8;
  display: grid;
  width: min(460px, calc(100% - 36px));
  max-height: min(64dvh, 620px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 68px rgba(15, 23, 42, 0.24);
}

.quote-costing-issues-sheet.hidden {
  display: none !important;
}

.quote-costing-issues-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.26);
}

.quote-costing-issues-sheet h4,
.quote-costing-issues-sheet p {
  margin: 0;
}

.quote-costing-issues-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  overflow: auto;
}

.quote-costing-issue-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
  background: #fff7ed;
  text-align: left;
}

.quote-costing-issue-item span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .lead-modal.quote-costing-modal:not(.hidden) {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    box-sizing: border-box;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  .lead-modal.quote-costing-modal {
    background: #f8fafc;
  }

  .quote-costing-modal-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 8px;
    min-height: 76px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  }

  .quote-costing-back-button {
    grid-column: 1;
    grid-row: 1;
    min-width: 48px;
    min-height: 40px;
    padding: 0 6px;
    font-size: 0;
  }

  .quote-costing-back-button::after {
    content: "← Back";
    font-size: 0.78rem;
    font-weight: 800;
  }

  .quote-costing-modal-heading {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .quote-costing-modal-heading h3 {
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quote-costing-modal-heading .muted {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    font-size: 0.66rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quote-costing-header-stats {
    grid-column: 3;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr;
    width: 94px;
    min-width: 0;
    overflow: hidden;
  }

  .quote-costing-header-stats article {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 23px;
    padding: 1px 4px;
    overflow: hidden;
  }

  .quote-costing-header-stats article + article {
    border-left: 0;
  }

  .quote-costing-header-stats span {
    font-size: 0.56rem;
  }

  .quote-costing-header-stats strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quote-costing-header-stats progress {
    max-width: 100%;
  }

  #quoteCostingLiveTotal {
    font-size: 1.1rem;
  }

  .quote-costing-modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .quote-costing-day-item.is-active {
    border-color: #ff5a0a;
    color: #fff;
    background: linear-gradient(145deg, #ff6a00, #f4511e);
    box-shadow: 0 8px 18px rgba(244, 81, 30, 0.2);
  }

  .quote-costing-day-item.is-active .quote-costing-day-copy strong,
  .quote-costing-day-item.is-active .quote-costing-day-copy strong em,
  .quote-costing-day-item.is-active .quote-costing-day-copy small {
    color: #fff;
  }

  .quote-costing-day-item.is-active .quote-costing-day-status-icon {
    color: #f4511e;
    background: #fff;
  }

  .quote-costing-day-rail {
    position: static;
    flex: 0 0 auto;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .quote-costing-day-rail-head {
    display: none;
  }

  .quote-costing-day-list {
    display: flex;
    gap: 7px;
    min-height: 54px;
    max-height: none;
    padding: 2px 1px 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .quote-costing-day-item {
    flex: 0 0 82px;
    grid-template-columns: minmax(0, 1fr) 20px;
    min-height: 52px;
    padding: 7px 8px;
    border-radius: 9px;
    scroll-snap-align: start;
  }

  .quote-costing-day-copy {
    gap: 2px;
  }

  .quote-costing-day-copy strong {
    font-size: 0.76rem;
  }

  .quote-costing-day-copy strong em {
    display: none;
  }

  .quote-costing-day-copy small {
    overflow: hidden;
    font-size: 0.61rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quote-costing-day-status-icon {
    width: 18px;
    height: 18px;
    font-size: 0.61rem;
  }

  .quote-costing-workspace,
  .quote-costing-summary-panel {
    flex: 0 0 auto;
    width: 100%;
    overflow: visible;
  }

  .quote-costing-selected-day-header {
    position: static;
    min-height: 48px;
    padding: 8px 11px;
  }

  .quote-costing-selected-day-header > div > strong {
    font-size: 0.95rem;
  }

  .quote-costing-selected-day-header .pill {
    padding: 4px 8px;
    font-size: 0.64rem;
  }

  .quote-costing-section-tabs {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .quote-costing-section-tabs a {
    min-width: 0;
    min-height: 48px;
    gap: 3px;
    padding: 7px 2px;
    font-size: 0.61rem;
  }

  .quote-costing-section-tabs a > span {
    display: block;
    font-size: 0.9rem;
  }

  .quote-costing-editor-stage {
    padding: 7px;
  }

  .quote-costing-target-section-head {
    padding: 8px 9px 6px;
  }

  .quote-costing-hotel-search .quote-day-hotel-selected-card {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .quote-costing-hotel-search .quote-costing-selected-hotel-copy small {
    display: none;
  }

  .quote-costing-hotel-search .quote-costing-hotel-thumb img,
  .quote-costing-hotel-search .quote-costing-hotel-thumb > span,
  .quote-costing-hotel-thumb-fallback {
    width: 62px;
    height: 58px;
  }

  .quote-costing-hotel-search {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .quote-costing-rooming-match-badge {
    grid-column: 2;
    justify-self: start;
  }

  .quote-costing-hotel-picker > summary {
    padding: 8px 9px;
    font-size: 0;
  }

  .quote-costing-hotel-picker > summary::after {
    content: "Change Hotel";
    font-size: 0.68rem;
  }

  .quote-costing-rooming-toolbar {
    grid-template-columns: minmax(104px, 0.68fr) minmax(0, 1.32fr);
    align-items: end;
    gap: 7px;
    padding: 7px;
  }

  .quote-costing-meal-plan {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
    font-size: 0.68rem;
  }

  .quote-costing-meal-plan select {
    width: 100%;
    min-width: 0;
  }

  .quote-costing-rooming-source {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-costing-rooming-source button {
    min-height: 36px;
    padding: 6px;
    font-size: 0.66rem;
  }

  .quote-costing-allocation-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
  }

  .quote-costing-allocation-banner strong {
    font-size: 0.72rem;
  }

  .quote-costing-allocation-banner small {
    font-size: 0.62rem;
  }

  .quote-costing-room-row {
    grid-template-columns: minmax(0, 1fr) auto 30px;
    grid-template-areas:
      "meta total remove"
      "guests guests guests"
      "stepper rate rate";
    gap: 6px 8px;
    padding: 9px;
  }

  .quote-costing-room-meta strong,
  .quote-costing-room-total {
    font-size: 0.76rem;
  }

  .quote-costing-room-meta span,
  .quote-costing-room-guests {
    font-size: 0.64rem;
  }

  .quote-costing-room-stepper {
    width: 104px;
  }

  .quote-costing-room-rate {
    width: min(154px, 100%);
    justify-self: end;
  }

  .quote-costing-room-table-footer {
    align-items: stretch;
    gap: 7px;
    padding: 7px 9px;
  }

  .quote-costing-add-room {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .quote-costing-hotel-subtotal {
    padding-top: 7px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
  }

  .quote-costing-target-accordion > summary {
    min-height: 44px;
    padding: 8px 10px;
  }

  .quote-costing-target-accordion > summary small {
    display: none;
  }

  .quote-costing-summary-panel {
    display: grid;
    gap: 7px;
  }

  .quote-costing-summary-panel .quote-costing-side-card {
    padding: 11px;
  }

  .quote-costing-modal-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 92px;
    padding: 6px 8px max(7px, env(safe-area-inset-bottom));
  }

  .quote-costing-footer-status {
    min-height: 28px;
    gap: 6px;
    padding: 0 3px;
  }

  .quote-costing-footer-status .form-status {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .quote-costing-view-issues {
    min-height: 28px;
    padding: 3px 5px;
    font-size: 0.62rem;
  }

  .quote-costing-modal-footer .quote-costing-modal-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
  }

  .quote-costing-modal-footer .quote-costing-modal-actions button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 4px 3px;
    border-radius: 8px;
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .quote-costing-modal-footer .quote-costing-modal-actions button:last-child {
    grid-column: auto;
  }

  #quoteCostingSaveDraftButton::before,
  #quoteCostingValidateDayButton::before,
  #quoteCostingValidateAllButton::before,
  #quoteCostingLockPushButton::before {
    display: block;
    margin: 0 0 2px;
    font-size: 0.76rem;
  }

  .quote-costing-issues-sheet {
    inset: auto 8px 94px;
    width: auto;
    max-height: min(58dvh, 520px);
    border-radius: 14px;
  }

  .quote-costing-issues-sheet > header {
    padding: 10px 12px;
  }

  .quote-costing-issue-item {
    min-height: 44px;
    padding: 7px 9px;
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .quote-costing-modal-header {
    grid-template-columns: auto minmax(0, 1fr) 94px;
  }

  .quote-costing-header-stats {
    grid-template-columns: 1fr;
  }

  .quote-costing-modal-heading h3 {
    font-size: 0.9rem;
  }

  .quote-costing-modal-heading .muted {
    max-width: 150px;
  }
}
.quote-costing-commercial-lines {
  display: grid;
  gap: 10px;
}

.quote-costing-commercial-line {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(90px, .55fr) minmax(110px, .7fr) minmax(130px, .8fr) minmax(90px, .55fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line, #dfe6ef);
  border-radius: 12px;
  background: #fff;
}

.quote-costing-commercial-line > div,
.quote-costing-commercial-line label {
  display: grid;
  gap: 5px;
}

.quote-costing-commercial-line small,
.quote-costing-commercial-line label > span {
  color: var(--muted, #667085);
  font-size: 12px;
}

.quote-costing-commercial-line input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line, #d8e0eb);
  border-radius: 9px;
}

.quote-costing-commercial-line .quote-costing-included-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
}

@media (max-width: 760px) {
  .quote-costing-commercial-line {
    grid-template-columns: 1fr 1fr;
  }
  .quote-costing-commercial-line > div,
  .quote-costing-commercial-line > strong {
    grid-column: 1 / -1;
  }
}
.vendor-route-sightseeing-create {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed #ef9a62;
  border-radius: 14px;
  background: #fff8f2;
}

.vendor-route-sightseeing-create.hidden {
  display: none;
}

.vendor-route-sightseeing-create small {
  color: #7c5b47;
}

.vendor-service-transport-day-sightseeing-suggestions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.route-suggestion-label {
  width: 100%;
  margin-top: 6px;
  color: #56706f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-suggestion-label-ai {
  color: #9a4d16;
}

.route-ai-suggestion {
  border-color: #ef9a62;
  background: #fff8f2;
}

.transport-route-sightseeing-tag small {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #5c6f6c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.vendor-service-transport-day-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.vendor-service-transport-day-actions .ghost-button {
  min-width: 156px;
  border-style: dashed;
}
.quote-costing-copilot-launcher {
  align-self: stretch;
  min-width: 168px;
  white-space: nowrap;
}

.quote-itinerary-intelligence {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
}

.quote-itinerary-intelligence.is-ready {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.quote-itinerary-intelligence.is-blocked {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
}

.quote-itinerary-intelligence > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-itinerary-intelligence > header div {
  display: grid;
  gap: 3px;
}

.quote-itinerary-intelligence > header small {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.quote-itinerary-intelligence > header strong {
  color: #0f172a;
  text-transform: capitalize;
}

.quote-itinerary-intelligence > header > span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 750;
}

.quote-itinerary-intelligence-scores {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.quote-itinerary-intelligence-scores span {
  display: grid;
  gap: 3px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
  font-size: 0.8rem;
}

.quote-itinerary-intelligence-scores b {
  color: #64748b;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.quote-itinerary-intelligence-issues,
.quote-itinerary-intelligence-assumptions {
  margin-top: 12px;
}

.quote-itinerary-intelligence-issues > strong,
.quote-itinerary-intelligence-assumptions > summary {
  color: #334155;
  font-size: 0.8rem;
  font-weight: 800;
}

.quote-itinerary-intelligence-issues p,
.quote-itinerary-intelligence-assumptions p {
  display: flex;
  gap: 8px;
  margin: 7px 0 0;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.4;
}

.quote-itinerary-intelligence-issues p b {
  min-width: 74px;
  color: #b45309;
  text-transform: capitalize;
}

.quote-itinerary-intelligence-issues p.is-blocking b {
  color: #dc2626;
}

.quote-itinerary-intelligence-clear {
  margin: 10px 0 0;
  color: #047857;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 860px) {
  .quote-itinerary-intelligence-scores {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .quote-costing-copilot-launcher {
    width: 100%;
  }
}

body[data-active-section="quote-generator"] .quote-hero-image-control {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(280px, 1.18fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(29, 78, 216, 0.14);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.9), rgba(255, 251, 235, 0.84));
}

body[data-active-section="quote-generator"] .quote-hero-image-preview-shell {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 18px;
  background: #dbeafe;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

body[data-active-section="quote-generator"] .quote-hero-image-preview-shell img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

body[data-active-section="quote-generator"] .quote-hero-image-preview-shell span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

body[data-active-section="quote-generator"] .quote-hero-image-fields {
  display: grid;
  gap: 12px;
  align-content: start;
}

body[data-active-section="quote-generator"] .quote-hero-image-fields .field-label {
  display: block;
  font-weight: 900;
  color: #172554;
}

body[data-active-section="quote-generator"] .quote-hero-image-fields .muted {
  margin-top: 4px;
}

body[data-active-section="quote-generator"] .quote-hero-image-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

body[data-active-section="quote-generator"] .quote-hero-image-actions .muted {
  flex: 1 1 220px;
  margin: 0;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] .quote-hero-image-control {
    grid-template-columns: 1fr;
  }

  body[data-active-section="quote-generator"] .quote-hero-image-preview-shell,
  body[data-active-section="quote-generator"] .quote-hero-image-preview-shell img {
    min-height: 180px;
  }
}

@media (max-width: 900px) {
  body[data-active-section="quote-templates"] .quote-template-kanban {
    grid-template-columns: 1fr !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body[data-active-section="quote-templates"] .quote-template-bulk-control,
  body[data-active-section="quote-templates"] .quote-template-bulk-control > button {
    width: 100% !important;
  }

  body[data-active-section="quote-templates"] .quote-template-bulk-menu {
    position: fixed !important;
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    top: auto !important;
    min-width: 0 !important;
  }
}
/* Canonical Template Gallery + dedicated Quote Gallery */
.quote-save-receipt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 56px 14px 16px;
  margin-bottom: 14px;
  border: 1px solid #9edccb;
  border-radius: 16px;
  background: #ecfbf6;
  color: #123f36;
}

.quote-save-receipt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(15, 61, 55, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #123a35;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.quote-save-receipt-close:hover,
.quote-save-receipt-close:focus-visible {
  background: #fff;
  outline: 2px solid rgba(14, 143, 126, 0.28);
  outline-offset: 2px;
}

/* Keep the post-save receipt out of the Quote Builder CSS grid. When this
   element was revealed as a normal form child it created an implicit grid
   column and squeezed the complete Send Quote workspace to the left. */
body[data-active-section="quote-generator"] #quoteSaveReceipt.quote-save-receipt {
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  z-index: 8800 !important;
  width: min(860px, calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.2) !important;
}

@media (max-width: 760px) {
  body[data-active-section="quote-generator"] #quoteSaveReceipt.quote-save-receipt {
    top: 12px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
  }
}

.image-gallery-workspace {
  display: grid;
  gap: 16px;
}

body[data-active-section="image-gallery"] #workspaceShellBar,
body[data-active-section="image-gallery"] #roleFirstWorkboardSection,
body[data-active-section="image-gallery"] #loginGreetingBanner {
  display: none !important;
}

.image-gallery-hero {
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.image-gallery-library-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.image-gallery-tabs {
  display: flex;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid #e2e8f0;
}

.image-gallery-tab {
  min-height: 52px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  cursor: pointer;
}

.image-gallery-tab.is-active {
  border-bottom-color: #f97316;
  color: #c2410c;
}

.image-gallery-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 0.7fr));
  gap: 10px;
  padding: 16px 22px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.image-gallery-toolbar .field {
  margin: 0;
}

.image-gallery-toolbar input,
.image-gallery-toolbar select {
  min-height: 44px;
  background: #fff;
}

.image-gallery-search-field {
  min-width: 0;
}

.image-gallery-pending-preview {
  display: grid;
  gap: 4px;
  border: 1px dashed #93c5fd;
  border-radius: 14px;
  padding: 13px 14px;
  background: #eff6ff;
  color: #1e3a8a;
}

.image-gallery-pending-preview span {
  color: #475569;
  font-size: 0.78rem;
}

.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-height: 320px;
  padding: 20px 22px;
}

.image-gallery-card {
  overflow: hidden;
  display: grid;
  align-content: start;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.image-gallery-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.image-gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-gallery-card-copy {
  display: grid;
  gap: 5px;
  padding: 13px 13px 7px;
}

.image-gallery-card-copy > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.image-gallery-card-copy p,
.image-gallery-card-copy small {
  margin: 0;
  color: #64748b;
}

.image-gallery-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 13px 13px;
}

.image-gallery-card-actions .ghost-button {
  min-height: 36px;
  text-decoration: none;
}

.image-gallery-card-actions .image-gallery-delete-button {
  border-color: #fecaca;
  color: #b42318;
}

.image-gallery-card-actions .image-gallery-delete-button:hover:not(:disabled) {
  border-color: #ef4444;
  background: #fff1f2;
}

.image-gallery-library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid #e2e8f0;
}

.quote-save-receipt.hidden { display: none; }
.quote-save-receipt > div:first-child { display: grid; gap: 3px; }
.quote-save-receipt-actions,
.quote-gallery-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.quote-template-master-health {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
}
.quote-template-master-health.is-linked { color: #13835f; }
.quote-template-master-health.is-review { color: #b86a11; }
.quote-template-regenerate-field { align-self: end; }

body[data-active-section="quote-gallery"] #quoteDashboardSection {
  display: block !important;
  width: 100%;
  max-width: none;
}
body[data-active-section="quote-gallery"] #quoteDashboardSection > .quote-dashboard-hero,
body[data-active-section="quote-gallery"] #quoteDashboardSection > .quote-builder-grid,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools > summary,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools .quote-ai-summary-panel,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools .quote-response-panel,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools #quoteTemplateStoragePanel,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools #quoteBatchInventoryPanel {
  display: none !important;
}
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools .quote-desk-secondary-tools-body,
body[data-active-section="quote-gallery"] #quoteDeskListPanel {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools {
  border: 0;
  padding: 0;
}
body[data-active-section="quote-gallery"] .quote-gallery-highlight {
  outline: 3px solid rgba(255, 101, 45, 0.35);
  background: #fff7f1;
}

/* Approved Quote Gallery command center. The primary sidebar intentionally remains unchanged. */
.quote-gallery-view-tabs,
.quote-gallery-inspector {
  display: none;
}

body[data-active-section="quote-gallery"] #workspaceShellBar {
  display: none !important;
}

body[data-active-section="quote-gallery"] #quoteDashboardSection,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools,
body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools .quote-desk-secondary-tools-body {
  overflow: visible !important;
  max-height: none !important;
}

body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools .quote-desk-secondary-tools-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 292px !important;
  gap: 8px !important;
  padding: 0 !important;
}

body[data-active-section="quote-gallery"] .quote-gallery-view-tabs {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 2px;
  min-height: 32px;
  padding: 2px 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.quote-gallery-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.quote-gallery-view-tab.is-active {
  border-bottom-color: #ff632f;
  color: #ea580c;
}

.quote-gallery-tab-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.68rem;
}

body[data-active-section="quote-gallery"] #quoteDeskListPanel {
  grid-column: 1;
  padding: 8px !important;
  border-radius: 16px !important;
  overflow: visible !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

body[data-active-section="quote-gallery"] .quote-gallery-command-header {
  min-height: 48px;
  margin: 0 0 4px !important;
}

body[data-active-section="quote-gallery"] .quote-gallery-command-header .eyebrow {
  display: none;
}

body[data-active-section="quote-gallery"] .quote-gallery-command-header h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.1;
}

body[data-active-section="quote-gallery"] .quote-gallery-command-header p {
  margin: 2px 0 0;
  font-size: 0.72rem;
}

body[data-active-section="quote-gallery"] .quote-gallery-head-actions {
  flex-wrap: nowrap;
}

body[data-active-section="quote-gallery"] .quote-gallery-head-actions .pill,
body[data-active-section="quote-gallery"] .quote-gallery-head-actions .ghost-button,
body[data-active-section="quote-gallery"] .quote-gallery-head-actions .primary-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.quote-gallery-kpi-ribbon {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  margin: 0 -2px;
  padding: 2px 4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: #fff;
}

.quote-gallery-kpi-ribbon button {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-size: 0.7rem;
  cursor: pointer;
}

.quote-gallery-kpi-ribbon button strong {
  color: #0f172a;
  font-size: 0.85rem;
}

.quote-gallery-kpi-ribbon button.is-active {
  background: #fff0e7;
  color: #c2410c;
}

.quote-gallery-queue-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.quote-gallery-queue-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 0.69rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.quote-gallery-queue-tabs button.is-active {
  border-bottom-color: #ff632f;
  color: #ea580c;
}

body[data-active-section="quote-gallery"] .quote-gallery-filter-bar {
  display: grid !important;
  grid-template-columns: minmax(210px, 1.7fr) repeat(4, minmax(90px, 0.72fr)) auto !important;
  gap: 5px !important;
  margin: 5px 0 0;
}

body[data-active-section="quote-gallery"] .quote-gallery-filter-bar .field {
  display: block;
}

body[data-active-section="quote-gallery"] .quote-gallery-filter-bar .field > span {
  display: none;
}

body[data-active-section="quote-gallery"] .quote-gallery-filter-bar input,
body[data-active-section="quote-gallery"] .quote-gallery-filter-bar select,
body[data-active-section="quote-gallery"] .quote-gallery-filter-bar button {
  width: 100%;
  min-height: 32px;
  height: 32px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 9px;
  font-size: 0.71rem;
}

body[data-active-section="quote-gallery"] .quote-gallery-scope-field,
body[data-active-section="quote-gallery"] .quote-gallery-advanced-filter {
  display: none !important;
}

body[data-active-section="quote-gallery"] .quote-gallery-filter-bar.is-advanced-open .quote-gallery-scope-field,
body[data-active-section="quote-gallery"] .quote-gallery-filter-bar.is-advanced-open .quote-gallery-advanced-filter {
  display: block !important;
}

body[data-active-section="quote-gallery"] .quote-gallery-filter-actions {
  display: flex !important;
  align-items: center;
  gap: 4px;
}

body[data-active-section="quote-gallery"] .quote-gallery-filter-actions button {
  width: auto;
  padding: 0 9px;
  white-space: nowrap;
}

.quote-gallery-active-filters {
  display: flex;
  gap: 4px;
  min-height: 0;
  margin-top: 3px;
}

.quote-gallery-active-filters:has(.is-neutral) {
  display: none;
}

.quote-gallery-active-filters span:not(.is-neutral) {
  padding: 2px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.65rem;
  font-weight: 800;
}

.quote-gallery-mapping-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 27px;
  margin-top: 4px;
  padding: 0 10px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf0;
  color: #9a3412;
  font-size: 0.68rem;
}

.quote-gallery-mapping-banner.hidden {
  display: none;
}

.quote-gallery-mapping-banner a {
  color: #0369a1;
  font-weight: 800;
}

body[data-active-section="quote-gallery"] #quoteRecentList,
body[data-active-section="quote-gallery"] #quoteRecentList .desk-table-shell {
  max-height: none !important;
  overflow: visible !important;
}

body[data-active-section="quote-gallery"] #quoteRecentList {
  margin-top: 5px;
}

body[data-active-section="quote-gallery"] #quoteRecentList table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: collapse;
}

body[data-active-section="quote-gallery"] #quoteRecentList th {
  height: 25px;
  padding: 3px 6px;
  color: #475569;
  font-size: 0.62rem;
  line-height: 1;
  white-space: nowrap;
}

body[data-active-section="quote-gallery"] #quoteRecentList td {
  height: 31px;
  max-height: 31px;
  padding: 2px 6px;
  overflow: hidden;
  color: #1e293b;
  font-size: 0.65rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-active-section="quote-gallery"] #quoteRecentList th:nth-child(1) { width: 20%; }
body[data-active-section="quote-gallery"] #quoteRecentList th:nth-child(2) { width: 17%; }
body[data-active-section="quote-gallery"] #quoteRecentList th:nth-child(3) { width: 16%; }
body[data-active-section="quote-gallery"] #quoteRecentList th:nth-child(4) { width: 18%; }
body[data-active-section="quote-gallery"] #quoteRecentList th:nth-child(5) { width: 13%; }
body[data-active-section="quote-gallery"] #quoteRecentList th:nth-child(6) { width: 9%; }
body[data-active-section="quote-gallery"] #quoteRecentList th:nth-child(7) { width: 7%; }

body[data-active-section="quote-gallery"] #quoteRecentList tr[data-quote-gallery-row] {
  cursor: pointer;
}

body[data-active-section="quote-gallery"] #quoteRecentList tr[data-quote-gallery-row].is-selected {
  background: #f0f9ff;
  box-shadow: inset 3px 0 #0891b2;
}

.quote-gallery-primary-cell,
.quote-gallery-trip-cell,
.quote-gallery-owner-cell,
.quote-gallery-progress-cell {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.quote-gallery-primary-cell strong,
.quote-gallery-trip-cell strong,
.quote-gallery-owner-cell strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-gallery-primary-cell span,
.quote-gallery-trip-cell span,
.quote-gallery-owner-cell span,
.quote-gallery-progress-cell > span:last-child {
  overflow: hidden;
  color: #64748b;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-gallery-commercial-cell.is-pending {
  color: #9a3412;
  font-weight: 750;
}

.quote-gallery-status-chip {
  justify-self: start;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 850;
}

.quote-gallery-status-chip.is-success { background: #dcfce7; color: #15803d; }
.quote-gallery-status-chip.is-warning { background: #ffedd5; color: #c2410c; }
.quote-gallery-status-chip.is-info { background: #dbeafe; color: #1d4ed8; }
.quote-gallery-status-chip.is-neutral { background: #f1f5f9; color: #475569; }

.quote-gallery-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.quote-gallery-row-actions > .primary-button {
  min-height: 25px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 0.63rem;
}

.quote-gallery-row-menu {
  position: relative;
}

.quote-gallery-row-menu > summary {
  width: 24px;
  height: 24px;
  overflow: hidden;
  color: transparent;
  cursor: pointer;
  list-style: none;
}

.quote-gallery-row-menu > summary::after {
  position: absolute;
  inset: 1px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #475569;
  content: "\22EE";
  font-size: 1rem;
}

.quote-gallery-row-menu > div {
  position: absolute;
  z-index: 8;
  top: 27px;
  right: 0;
  display: grid;
  gap: 3px;
  min-width: 118px;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.quote-gallery-row-menu:not([open]) > div {
  display: none;
}

body[data-active-section="quote-gallery"] [data-workspace-pagination="quoteDesk"] {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 0;
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0.66rem;
}

body[data-active-section="quote-gallery"] [data-workspace-pagination="quoteDesk"] .workspace-pagination-size select,
body[data-active-section="quote-gallery"] [data-workspace-pagination="quoteDesk"] .ghost-button {
  min-height: 25px;
  height: 25px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 0.62rem;
}

body[data-active-section="quote-gallery"] #quoteDeskStatus {
  min-height: 16px;
  margin: 2px 0 0;
  font-size: 0.62rem;
}

body[data-active-section="quote-gallery"] .quote-gallery-inspector {
  display: block;
  grid-column: 2;
  align-self: start;
  min-height: 0;
  padding: 10px !important;
  border-radius: 14px;
}

.quote-gallery-inspector-empty {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 180px;
  color: #64748b;
  text-align: center;
}

.quote-gallery-inspector-head,
.quote-gallery-inspector-identity,
.quote-gallery-readiness-list,
.quote-gallery-activity {
  display: grid;
  gap: 5px;
}

.quote-gallery-inspector-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.quote-gallery-inspector-head > div {
  display: grid;
  gap: 2px;
}

.quote-gallery-inspector-head span,
.quote-gallery-inspector-identity span,
.quote-gallery-activity time {
  color: #64748b;
  font-size: 0.67rem;
}

.quote-gallery-inspector-head strong {
  font-size: 1rem;
}

.quote-gallery-readiness-count {
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8 !important;
  font-weight: 850;
}

.quote-gallery-inspector-identity {
  padding: 8px 0;
}

.quote-gallery-readiness-list {
  gap: 2px;
  padding: 7px 0;
  border-top: 1px solid #f1f5f9;
}

.quote-gallery-readiness-list > div {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.69rem;
}

.quote-gallery-readiness-list .is-ready strong { color: #15803d; }
.quote-gallery-readiness-list .is-pending strong { color: #c2410c; }

.quote-gallery-blocker {
  display: grid;
  gap: 2px;
  margin: 5px 0 8px;
  padding: 8px;
  border-radius: 9px;
  font-size: 0.68rem;
}

.quote-gallery-blocker.is-blocked { border: 1px solid #fecaca; background: #fff1f2; color: #991b1b; }
.quote-gallery-blocker.is-clear { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }

.quote-gallery-inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.quote-gallery-inspector-actions .primary-button {
  grid-column: 1 / -1;
}

.quote-gallery-inspector-actions button {
  min-height: 31px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.69rem;
}

.quote-gallery-activity {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.quote-gallery-activity > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
}

body[data-active-section="quote-gallery"] .quote-gallery-response-panel {
  display: none !important;
}

body[data-active-section="quote-gallery"] .quote-gallery-response-panel:not(.hidden) {
  display: block !important;
  grid-column: 1 / -1;
}

body[data-active-section="quote-gallery"] .hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .quote-save-receipt { align-items: stretch; flex-direction: column; }
  .quote-save-receipt-actions > * { flex: 1 1 100%; }
  body[data-active-section="quote-gallery"] #quoteDeskSecondaryTools .quote-desk-secondary-tools-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-active-section="quote-gallery"] .quote-gallery-inspector {
    grid-column: 1;
  }
  body[data-active-section="quote-gallery"] .quote-gallery-command-header,
  body[data-active-section="quote-gallery"] .quote-gallery-head-actions {
    align-items: stretch;
    flex-direction: column;
  }
  body[data-active-section="quote-gallery"] .quote-gallery-kpi-ribbon,
  body[data-active-section="quote-gallery"] .quote-gallery-queue-tabs {
    overflow-x: auto;
  }
  body[data-active-section="quote-gallery"] .quote-gallery-kpi-ribbon button {
    flex: 0 0 auto;
  }
  body[data-active-section="quote-gallery"] .quote-gallery-filter-bar {
    grid-template-columns: 1fr 1fr !important;
  }
  body[data-active-section="quote-gallery"] .quote-gallery-search-field,
  body[data-active-section="quote-gallery"] .quote-gallery-filter-actions {
    grid-column: 1 / -1;
  }
  body[data-active-section="quote-gallery"] #quoteRecentList table,
  body[data-active-section="quote-gallery"] #quoteRecentList tbody,
  body[data-active-section="quote-gallery"] #quoteRecentList tr,
  body[data-active-section="quote-gallery"] #quoteRecentList td {
    display: block;
    width: 100%;
  }
  body[data-active-section="quote-gallery"] #quoteRecentList thead {
    display: none;
  }
  body[data-active-section="quote-gallery"] #quoteRecentList tr[data-quote-gallery-row] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 7px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
  }
  body[data-active-section="quote-gallery"] #quoteRecentList td {
    height: auto;
    max-height: none;
    padding: 2px;
    white-space: normal;
  }
  body[data-active-section="quote-gallery"] #quoteRecentList td:first-child,
  body[data-active-section="quote-gallery"] #quoteRecentList td:nth-child(4),
  body[data-active-section="quote-gallery"] #quoteRecentList td:last-child {
    grid-column: 1 / -1;
  }
}

.image-gallery-library-footer p {
  margin: 0;
}

.image-gallery-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.image-gallery-page-button {
  min-width: 38px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.image-gallery-page-button:hover:not(:disabled),
.image-gallery-page-button.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.image-gallery-page-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.image-gallery-upload-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}

.image-gallery-upload-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, 100vw);
  background: #fff;
  box-shadow: -24px 0 54px rgba(15, 23, 42, 0.2);
}

.image-gallery-upload-drawer-header,
.image-gallery-upload-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #e2e8f0;
}

.image-gallery-upload-drawer-header h3,
.image-gallery-upload-drawer-header p {
  margin-block: 0 4px;
}

.image-gallery-upload-drawer-header .icon-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 1.5rem;
  cursor: pointer;
}

.image-gallery-upload-drawer-body {
  overflow-y: auto;
  padding: 20px 22px;
}

.image-gallery-upload-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-gallery-dropzone {
  padding: 18px;
  border: 1.5px dashed #94a3b8;
  border-radius: 14px;
  background: #f8fafc;
}

.image-gallery-dropzone input {
  min-height: 52px;
  padding: 10px;
  background: #fff;
}

.image-gallery-dropzone small {
  color: #64748b;
}

.image-gallery-upload-drawer .search-select-helper.is-success {
  color: #15803d;
}

.image-gallery-upload-drawer-footer {
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}

.image-gallery-upload-drawer-footer .primary-button {
  min-width: 170px;
}

body.image-gallery-drawer-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .image-gallery-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .image-gallery-hero .panel-header {
    gap: 12px;
  }

  .image-gallery-hero .detail-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .image-gallery-hero .detail-action-row .pill {
    display: none;
  }

  .image-gallery-tabs {
    justify-content: stretch;
    gap: 0;
    padding: 0 12px;
  }

  .image-gallery-tab {
    flex: 1;
    min-height: 48px;
  }

  .image-gallery-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px;
  }

  .image-gallery-search-field {
    grid-column: 1 / -1;
  }

  .image-gallery-toolbar input,
  .image-gallery-toolbar select {
    min-height: 48px;
    font-size: 0.82rem;
  }

  .image-gallery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .image-gallery-card {
    grid-template-columns: minmax(118px, 38%) minmax(0, 1fr);
    border-radius: 12px;
  }

  .image-gallery-card-media {
    grid-row: 1 / span 2;
    height: 100%;
    min-height: 126px;
    aspect-ratio: auto;
  }

  .image-gallery-card-copy {
    padding: 12px 10px 5px;
  }

  .image-gallery-card-copy > div {
    display: grid;
    justify-content: stretch;
    gap: 4px;
  }

  .image-gallery-card-copy .pill {
    justify-self: start;
    padding: 4px 8px;
    font-size: 0.68rem;
  }

  .image-gallery-card-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 4px 10px 10px;
  }

  .image-gallery-card-actions .ghost-button {
    width: 100%;
    min-height: 40px;
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .image-gallery-card-actions a.ghost-button {
    display: none;
  }

  .image-gallery-library-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .image-gallery-pagination {
    width: 100%;
    justify-content: flex-start;
  }

  .image-gallery-page-button {
    min-width: 44px;
    min-height: 44px;
  }

  .image-gallery-upload-drawer {
    width: 100vw;
  }

  .image-gallery-upload-drawer-header,
  .image-gallery-upload-drawer-body,
  .image-gallery-upload-drawer-footer {
    padding-inline: 16px;
  }

  .image-gallery-upload-drawer-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .image-gallery-upload-drawer-footer #imageGalleryClearButton {
    display: none;
  }

  .image-gallery-upload-drawer-footer .primary-button {
    min-width: 0;
    min-height: 48px;
  }
}
body[data-active-section="quote-generator"] #quoteBuilderShareSection button.is-action-loading {
  cursor: wait;
  opacity: 0.82;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection button.is-action-loading::before {
  animation: quote-share-action-spin 0.75s linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  width: 14px;
}

body[data-active-section="quote-generator"] #quoteShareStateText[data-state="success"] {
  color: #087f5b;
  font-weight: 700;
}

body[data-active-section="quote-generator"] #quoteShareStateText[data-state="error"] {
  color: #c92a2a;
  font-weight: 700;
}

@keyframes quote-share-action-spin {
  to { transform: rotate(360deg); }
}

/* Customer Delivery: polished single-path share workspace. */
body[data-active-section="quote-generator"] #quoteBuilderShareSection {
  position: relative;
  gap: 18px;
  padding: 20px !important;
  overflow: visible !important;
  border: 1px solid #d6e2f5 !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 96% 0%, rgba(36, 87, 214, 0.09), transparent 23%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 16px 38px rgba(24, 56, 110, 0.09) !important;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection::before {
  position: absolute;
  top: -1px;
  left: 26px;
  width: 112px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #2457d6 0%, #7048c8 55%, #13a174 100%);
  content: "";
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-card-head {
  align-items: start !important;
  gap: 18px !important;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-card-head .eyebrow {
  margin: 0 0 4px;
  color: #8492a8;
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.075em;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-card-head h4 {
  margin: 0;
  color: #102a56;
  font-size: clamp(1.25rem, 1.7vw, 1.65rem);
  letter-spacing: -0.025em;
  line-height: 1.16;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-card-head .muted {
  max-width: 72ch;
  margin: 7px 0 0;
  color: #65758d;
  font-size: 0.92rem;
  line-height: 1.5;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-status-pill {
  align-self: start;
  justify-self: end;
  width: max-content !important;
  min-width: max-content;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  color: #a84a07;
  background: #fff2e6;
  font-size: 0.78rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-status-pill[data-state="saved"] {
  color: #1d4ed8;
  background: #eaf1ff;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-status-pill[data-state="shared"] {
  color: #087f5b;
  background: #e8f8f1;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 16px;
  border: 1px solid #f4d5b5;
  border-radius: 15px;
  background: #fffaf4;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #b85b0b;
  background: #ffedd3;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-icon svg,
body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-security-note svg,
body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-copy-button svg,
body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-copy {
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-copy strong {
  display: block;
  color: #9f4b07;
  font-size: 0.94rem;
  line-height: 1.35;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-copy p {
  margin: 3px 0 0;
  color: #7a6a5a;
  font-size: 0.82rem;
  line-height: 1.45;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner[data-state="saved"] {
  border-color: #ccdcff;
  background: #f7f9ff;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner[data-state="saved"] .quote-share-readiness-icon {
  color: #2457d6;
  background: #e8efff;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner[data-state="saved"] .quote-share-readiness-copy strong {
  color: #173e9b;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner[data-state="shared"] {
  border-color: #c5eadc;
  background: #f3fbf8;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner[data-state="shared"] .quote-share-readiness-icon {
  color: #087f5b;
  background: #dff5eb;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner[data-state="shared"] .quote-share-readiness-copy strong {
  color: #087f5b;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-save-button {
  min-width: 148px;
  min-height: 42px;
  border-color: #102a56;
  background: #102a56;
  box-shadow: 0 8px 18px rgba(16, 42, 86, 0.18);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-save-button[hidden] {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details {
  margin-top: 0;
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: none;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  color: #2457d6;
  background: linear-gradient(90deg, #edf4ff 0%, #f8fbff 72%, #eef7ff 100%);
  font-size: 0;
  font-weight: 800;
  list-style: none;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details > summary::-webkit-details-marker {
  display: none;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details > summary::before {
  color: #173e9b;
  content: "Share options & delivery";
  font-size: 0.86rem;
  letter-spacing: -0.005em;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details > summary::after {
  color: #6c7c94;
  content: "3 delivery channels  \2304";
  font-size: 0.72rem;
  font-weight: 700;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details[open] > summary::after {
  content: "3 delivery channels  \2303";
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details[open] {
  padding-bottom: 0;
  border-color: #d6e0ef;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-builder-secondary-details[open] > summary {
  margin-bottom: 0;
  border-bottom: 1px solid #e4eaf3;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-workspace {
  display: grid;
  gap: 15px;
  padding: 17px;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-workspace-head h5 {
  margin: 0;
  color: #102a56;
  font-size: 1rem;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-workspace-head p {
  margin: 4px 0 0;
  color: #718096;
  font-size: 0.8rem;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-security-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  color: #087f5b;
  font-size: 0.76rem;
  font-weight: 750;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-security-note svg {
  width: 16px;
  height: 16px;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-block {
  display: grid;
  gap: 7px;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-block > label {
  color: #213b64;
  font-size: 0.8rem;
  font-weight: 800;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: linear-gradient(90deg, #fbfdff 0%, #f6f9ff 100%);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-control:focus-within {
  border-color: #91acf0;
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.1);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-control input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: #203858;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-control input::placeholder {
  color: #8a97aa;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  margin-right: 7px;
  padding: 0 10px;
  border: 1px solid #d8e1ee;
  border-radius: 9px;
  color: #2457d6;
  background: #ffffff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-copy-button svg {
  width: 16px;
  height: 16px;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-copy-button:disabled {
  color: #9ca8b8;
  background: #f1f4f8;
  cursor: not-allowed;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-block > p {
  margin: 0;
  color: #718096;
  font-size: 0.75rem;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-delivery-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 !important;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-delivery-grid .quote-share-channel-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid #dfe6f1;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(35, 61, 104, 0.045);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(1) {
  border-color: #cbdcff;
  background: linear-gradient(135deg, #f7faff 0%, #edf4ff 100%);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(1) .quote-share-channel-icon {
  color: #2457d6;
  background: #dfe9ff;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(2) {
  border-color: #ded3ff;
  background: linear-gradient(135deg, #fcfaff 0%, #f3efff 100%);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(2) .quote-share-channel-icon {
  color: #7048c8;
  background: #e9e1ff;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(3) {
  border-color: #c4eadb;
  background: linear-gradient(135deg, #f8fffc 0%, #eaf9f2 100%);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(3) .quote-share-channel-icon {
  color: #087f5b;
  background: #d9f3e8;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #36506f;
  background: #edf3fb;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-icon svg {
  width: 20px;
  height: 20px;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card > div > span {
  color: #173256;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card > div > strong {
  display: block;
  color: #718096;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
  -webkit-line-clamp: unset;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-action {
  width: auto !important;
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 6px 9px !important;
  border-radius: 9px;
  font-size: 0.7rem;
  white-space: nowrap !important;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-action:disabled {
  display: none !important;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(2) .quote-share-channel-action:not(:disabled) {
  color: #6236ba;
  border-color: #d6c5ff;
  background: #ffffff;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card:nth-child(3) .quote-share-channel-action:not(:disabled) {
  color: #087f5b;
  border-color: #b8dfd0;
  background: #ffffff;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-pdf-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  margin: -3px 0 0;
  padding: 5px 9px;
  border: 1px solid #dce5f3;
  border-radius: 999px;
  color: #60738e;
  background: #f8faff;
  font-size: 0.7rem;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-pdf-state strong {
  color: #415775;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-meta {
  display: grid;
  gap: 3px;
  margin: 0 !important;
  padding: 10px 12px;
  border-radius: 11px;
  border-left: 3px solid #79a2ee;
  background: linear-gradient(90deg, #f2f7ff 0%, #f8faff 100%);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-meta p {
  color: #718096;
  font-size: 0.74rem;
  line-height: 1.4;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection #quoteShareStateText {
  color: #3b526f;
  font-weight: 750;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-actions {
  display: grid !important;
  grid-template-columns: minmax(170px, 1.15fr) minmax(150px, 1fr) minmax(130px, 0.85fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
  justify-content: end !important;
  margin: 0 0 0 auto !important;
  padding-top: 2px;
  width: min(100%, 650px);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-actions .primary-button,
body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-actions .ghost-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 9px 12px !important;
  border-radius: 11px;
  white-space: normal !important;
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-actions .primary-button {
  border-color: #2457d6;
  background: linear-gradient(135deg, #2457d6 0%, #163f9e 100%);
  box-shadow: 0 9px 20px rgba(36, 87, 214, 0.24);
}

body[data-active-section="quote-generator"] #quoteBuilderShareSection button:disabled {
  opacity: 1 !important;
  color: #a3adba !important;
  border-color: #e0e5ec !important;
  background: #f1f3f6 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

@media (max-width: 980px) {
  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-delivery-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 700px) {
  body[data-active-section="quote-generator"] #quoteBuilderShareSection {
    padding: 15px !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-readiness-banner {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-save-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-workspace-head {
    display: grid;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-status-pill {
    justify-self: end !important;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-security-note {
    min-width: 0;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-actions {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-link-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-copy-button span {
    display: none;
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body[data-active-section="quote-generator"] #quoteBuilderShareSection .quote-share-channel-action {
    grid-column: 1 / -1;
    width: 100% !important;
  }
}
