:root {
  --valley-red: #9f291e;
  --river-blue: #274f66;
  --pine-green: #2f5a43;
  --spruce: #204638;
  --gold: #d2a94d;
  --cream: #f6efe5;
  --paper: #fffcf7;
  --ink: #22313d;
  --muted: #65727d;
  --border-soft: rgba(34, 49, 61, 0.08);
  --shadow-soft: 0 16px 36px rgba(31, 42, 49, 0.08);
  --shadow-lg: 0 24px 60px rgba(31, 42, 49, 0.14);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: linear-gradient(180deg, #fffdf9 0%, #f5eee0 60%, #efe6d5 100%);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
}
.app-shell-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(159,41,30,0.06), transparent 32%),
    radial-gradient(circle at top right, rgba(47,90,67,0.05), transparent 28%),
    radial-gradient(circle at bottom left, rgba(39,79,102,0.06), transparent 34%);
  z-index: -1;
}
.brand-serif, h1, h2, h3, h4, .brand-name {
  font-family: 'DM Serif Display', Georgia, serif;
}
.main-nav {
  background: rgba(255, 252, 247, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34,49,61,.06);
}
.navbar-brand { color: var(--ink); text-decoration: none; }
.brand-logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(159,41,30,.15);
}
.brand-eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--pine-green);
}
.brand-name {
  display: block;
  font-size: 1.2rem;
  line-height: 1;
}
.nav-link { font-weight: 600; color: #314452; }
.nav-link:hover, .nav-link:focus { color: var(--valley-red); }
.dropdown-menu {
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.user-pill {
  background: rgba(39,79,102,.08);
  padding: .45rem .8rem;
  border-radius: 999px;
}
.hero {
  background:
    linear-gradient(115deg, rgba(159,41,30,.94), rgba(120,24,18,.92) 45%, rgba(39,79,102,.9)),
    radial-gradient(circle at top right, rgba(255,255,255,.16), transparent 34%);
  color: #fff;
  border-radius: 30px;
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto -8% -22% auto;
  width: 260px;
  height: 260px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.hero-cover {
  background-size: cover !important;
  background-position: center !important;
}
.hero-logo-chip {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  padding: .8rem 1rem;
}
.market-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.section-card, .card {
  border: 1px solid rgba(34,49,61,.04);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  background: rgba(255,255,255,.95);
}
.valley-card {
  background: linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
  border-left: 6px solid var(--valley-red);
}
.kpi {
  padding: 1.2rem 1.25rem;
  border-radius: 20px;
  background: rgba(255,255,255,.95);
  box-shadow: inset 0 0 0 1px rgba(34,49,61,.06), 0 10px 24px rgba(34,49,61,.06);
}
.small-muted { color: var(--muted); font-size: .93rem; }
.text-accent { color: var(--valley-red); }
.text-river { color: var(--river-blue); }
.bg-cream { background: var(--cream); }
.form-label { font-weight: 700; }
.app-alert { border-radius: 18px; border: 0; }
.btn { border-radius: 14px; font-weight: 700; }
.btn-primary {
  background: linear-gradient(180deg, var(--valley-red), #851f18);
  border-color: #851f18;
}
.btn-primary:hover, .btn-primary:focus { background: #851f18; border-color: #851f18; }
.btn-outline-primary { color: var(--valley-red); border-color: rgba(159,41,30,.35); }
.btn-outline-primary:hover, .btn-outline-primary:focus { background: var(--valley-red); border-color: var(--valley-red); }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: rgba(47,90,67,.10);
  color: var(--pine-green);
  font-size: .84rem;
  font-weight: 600;
}
.footer-band {
  background: linear-gradient(135deg, var(--spruce), var(--river-blue));
  color: white;
  border-radius: 24px 24px 0 0;
}
.org-node {
  border-radius: 18px;
  background: white;
  padding: 1rem;
  border-top: 4px solid var(--river-blue);
  box-shadow: 0 10px 25px rgba(39, 50, 59, 0.08);
}
.table thead th {
  font-size: .79rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7785;
}
.table td, .table th { vertical-align: middle; }
.table-responsive { border-radius: 0 0 24px 24px; }

.feature-stack { display: grid; gap: 1rem; }
.feature-card-lite {
  background: linear-gradient(180deg, #fff 0%, #f8f2e7 100%);
  border: 1px solid rgba(34,49,61,.06);
  border-radius: 18px;
  padding: 1rem;
}
.surface-soft {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(34,49,61,.08);
  border-radius: 18px;
}
.preview-shell {
  background: linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(34,49,61,.05), var(--shadow-soft);
  overflow: hidden;
}
.preview-frame {
  border: 0;
  width: 100%;
  min-height: 360px;
  background: #fff;
}
.editor-layout {
  display: grid;
  gap: 1rem;
}
.sortable-list {
  display: grid;
  gap: .75rem;
}
.sortable-card, .builder-field-card, .product-editor-card {
  background: #fff;
  border: 1px solid rgba(34,49,61,.08);
  border-radius: 18px;
  padding: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sortable-card { cursor: grab; }
.sortable-card.dragging, .builder-field-card.dragging {
  opacity: .5;
  transform: scale(.98);
}
.builder-field-card {
  text-align: left;
  width: 100%;
}
.builder-field-card.active {
  border-color: rgba(159,41,30,.35);
  box-shadow: 0 12px 30px rgba(159,41,30,.10);
}
.builder-column {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid rgba(34,49,61,.06);
  min-height: 100%;
}
.app-builder-shell {
  background: linear-gradient(180deg, #f7efe2 0%, #fff 100%);
  border: 1px solid rgba(34,49,61,.06);
  border-radius: 24px;
  padding: 1rem;
}
.app-builder-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.preview-application {
  background: linear-gradient(180deg, #fff 0%, #faf6ee 100%);
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid rgba(34,49,61,.08);
}
.preview-field {
  padding: .85rem 0;
  border-bottom: 1px dashed rgba(34,49,61,.12);
}
.preview-field:last-child { border-bottom: 0; }
.landing-section-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.editor-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.brand-poster {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}
.vendor-banner {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(39,79,102,.95), rgba(47,90,67,.93));
  color: white;
}
.vendor-avatar {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow-soft);
}
.catalog-card { border-radius: 18px; background: var(--cream); padding: .95rem; }
.cover-preview {
  border-radius: 22px;
  min-height: 220px;
  background: linear-gradient(135deg, rgba(159,41,30,.9), rgba(39,79,102,.82));
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.chart-card {
  background: #fff;
  border-radius: 20px;
  padding: 1rem;
  border: 1px solid rgba(34,49,61,.06);
  box-shadow: var(--shadow-soft);
}
.analytics-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
.analytics-table-block { display: grid; gap: 1rem; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .75rem;
}
.calendar-cell {
  min-height: 135px;
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  padding: .75rem;
  border: 1px solid rgba(34,49,61,.08);
}
.calendar-muted { opacity: .55; }
.calendar-date { font-weight: 700; margin-bottom: .5rem; }
.calendar-events { display: grid; gap: .35rem; }
.calendar-pill {
  background: rgba(39,79,102,.11);
  color: var(--river-blue);
  border-radius: 999px;
  padding: .18rem .5rem;
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booth-choice-card {
  padding: .9rem;
  border-radius: 16px;
  border: 1px solid rgba(34,49,61,.08);
  background: #fff;
}
.floor-toolbar {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.floorplan-stage {
  overflow: auto;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8f4ea 0%, #efe7d7 100%);
  padding: 1rem;
  min-height: 320px;
  border: 1px solid rgba(39,50,59,.08);
}
.floorplan-canvas {
  position: relative;
  border-radius: 18px;
  background-color: rgba(255,255,255,.85);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: inset 0 0 0 1px rgba(39,50,59,.08), 0 12px 26px rgba(39,50,59,.08);
}
.floorplan-canvas.editable {
  cursor: crosshair;
  background-image:
    linear-gradient(rgba(39,50,59,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,50,59,.06) 1px, transparent 1px);
  background-size: var(--floor-grid, 20px) var(--floor-grid, 20px), var(--floor-grid, 20px) var(--floor-grid, 20px);
}
.floor-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(39,50,59,.18);
  border-radius: 14px;
  color: #12212b;
  font-weight: 700;
  font-size: .85rem;
  padding: .25rem;
  box-shadow: 0 8px 18px rgba(39,50,59,.12);
  transform-origin: center center;
}
.floor-item.booth { color: #fff; }
.floor-item.legend { background: rgba(255,253,248,.94) !important; color: #4c3b2a; }
.floor-item.circle { border-radius: 999px; }
.floor-item.selected { outline: 3px solid rgba(159,41,30,.35); }
.floor-item:not(:disabled) { cursor: pointer; }
.floorplan-viewport {
  overflow: auto;
  max-width: 100%;
  max-height: 72vh;
  border-radius: 18px;
  border: 1px solid rgba(39,50,59,.08);
  background: rgba(255,255,255,.6);
}
.floorplan-scale-layer {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}
.floorplan-zoom-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.resize-handle, .rotate-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: white;
  border: 2px solid var(--valley-red);
  box-shadow: 0 2px 8px rgba(39,50,59,.15);
}
.rotate-handle {
  width: 14px;
  height: 14px;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--valley-red);
  border-color: white;
}
.resize-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.resize-n { top: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.resize-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.resize-e { top: calc(50% - 6px); right: -6px; cursor: ew-resize; }
.resize-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.resize-s { bottom: -6px; left: calc(50% - 6px); cursor: ns-resize; }
.resize-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.resize-w { top: calc(50% - 6px); left: -6px; cursor: ew-resize; }
.align-guide {
  position: absolute;
  background: rgba(159,41,30,.45);
  z-index: 1;
  pointer-events: none;
}
.guide-v { top: 0; bottom: 0; width: 2px; }
.guide-h { left: 0; right: 0; height: 2px; }
.logo-swatch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.logo-swatch img { width: 100%; border-radius: 20px; box-shadow: var(--shadow-soft); background: #fff; }
@media (max-width: 1200px) {
  .analytics-filter-bar, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .editor-grid-2, .metric-grid, .analytics-filter-bar { grid-template-columns: 1fr; }
  .calendar-grid { gap: .45rem; }
  .calendar-cell { min-height: 96px; padding: .55rem; }
  .hero { padding: 2rem; }
  .brand-logo-mark { width: 42px; height: 42px; }
  .brand-name { font-size: 1rem; }
}
@media (max-width: 767px) {
  .logo-swatch { grid-template-columns: 1fr; }
}

.editor-topbar {
  position: sticky;
  top: 86px;
  z-index: 30;
}
.preview-stage-card .preview-shell {
  min-height: 460px;
}
.preview-canvas-device {
  margin: 0 auto;
  width: min(100%, 1020px);
  transition: width .22s ease;
}
.preview-canvas-device[data-preview-device="tablet"] {
  width: min(100%, 820px);
}
.preview-canvas-device[data-preview-device="mobile"] {
  width: min(100%, 430px);
}
.preview-mode-toggle .btn.active {
  background: var(--valley-red);
  color: #fff;
  border-color: var(--valley-red);
}
.form-preview-large {
  min-height: 520px;
}
.logo-swatch-3up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.analytics-filter-bar-wide {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.analytics-widget-box {
  grid-column: span 2;
}
.widget-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.widget-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border-radius: 999px;
  background: rgba(39,79,102,.07);
  border: 1px solid rgba(39,79,102,.12);
  cursor: pointer;
  font-size: .9rem;
}
.widget-chip input {
  accent-color: var(--valley-red);
}
.product-list-scroll {
  max-height: 760px;
  overflow: auto;
  padding-right: .25rem;
}
.analytics-table-block .card {
  min-height: 100%;
}
@media (max-width: 1400px) {
  .analytics-filter-bar-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .analytics-widget-box {
    grid-column: span 2;
  }
}
@media (max-width: 991px) {
  .editor-topbar {
    top: 74px;
  }
  .preview-stage-card .preview-shell {
    min-height: 320px;
  }
  .logo-swatch-3up {
    grid-template-columns: 1fr;
  }
  .analytics-filter-bar-wide {
    grid-template-columns: 1fr;
  }
  .analytics-widget-box {
    grid-column: auto;
  }
}


.floorplan-shell {
  position: relative;
}
.floorplan-shell:fullscreen {
  background: #f7f1e5;
  padding: 1.25rem;
}
.floorplan-shell:fullscreen .floorplan-viewport {
  max-height: calc(100vh - 140px);
}
.floorplan-gallery-preview .floorplan-viewport {
  max-height: 460px;
}
.floorplan-preview-card .floorplan-stage {
  min-height: 0;
}
.floor-item {
  gap: .18rem;
  flex-direction: column;
  text-align: center;
  line-height: 1.1;
}
.floor-item-title {
  display: block;
}
.floor-item-meta {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  opacity: .94;
}
.floor-item.assigned {
  box-shadow: 0 12px 24px rgba(31,42,49,.18), 0 0 0 3px rgba(255,255,255,.12) inset;
}
.chart-wrap {
  position: relative;
  width: 100%;
}
.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-wrap-lg {
  min-height: 340px;
  height: 340px;
}
.chart-wrap-md {
  min-height: 280px;
  height: 280px;
}
.vendor-public-hero {
  position: relative;
}
.vendor-side-card {
  background: rgba(255,255,255,.94);
  color: var(--ink);
}
.vendor-public-hero .tag-chip {
  background: color-mix(in srgb, var(--vendor-accent, #2a5773) 14%, white);
  color: color-mix(in srgb, var(--vendor-accent, #2a5773) 75%, #22313d);
}
.home-story-card {
  background: linear-gradient(180deg, #fff 0%, #f8f1e6 100%);
}
@media (max-width: 991px) {
  .chart-wrap-lg,
  .chart-wrap-md {
    min-height: 240px;
    height: 240px;
  }
}

.calendar-pill-routine {
  background: rgba(47,90,67,.14);
  color: var(--pine-green);
}
.floorplan-stage-lg {
  min-height: 560px;
}
.floorplan-gallery-preview {
  min-height: 520px;
}
.floorplan-preview-card .floor-mini,
.floor-mini {
  width: 100%;
}
.floor-item.focus-target {
  outline: 4px solid rgba(210,169,77,.9);
  box-shadow: 0 0 0 8px rgba(255,255,255,.28), 0 12px 28px rgba(31,42,49,.22);
}
.chart-card {
  overflow: hidden;
}
.chart-wrap {
  min-height: 240px;
  max-height: 420px;
}
.chart-wrap canvas {
  display: block;
}
.analytics-table-block .table-responsive {
  max-height: 420px;
  overflow: auto;
}
.vendor-public-hero {
  background-size: cover !important;
  background-position: center !important;
}
.vendor-side-card a {
  word-break: break-word;
}
.roster-layout .floorplan-stage {
  min-height: 620px;
}
@media (max-width: 991px) {
  .floorplan-stage-lg,
  .roster-layout .floorplan-stage,
  .floorplan-gallery-preview {
    min-height: 360px;
  }
}

.app-breadcrumb {
  padding: .75rem 1rem;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(34,49,61,.08);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(34,49,61,.4); }
.app-breadcrumb a { color: var(--river-blue); text-decoration: none; font-weight: 600; }
.app-breadcrumb .active { color: var(--muted); font-weight: 600; }

.editor-topbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}

.floor-list-card {
  background: rgba(255,255,255,.72);
  border-radius: 24px;
  border: 1px solid rgba(34,49,61,.06);
}
.floorplan-gallery-preview {
  min-height: 640px;
}
.floorplan-gallery-preview .floorplan-viewport {
  max-height: 620px;
}
.floorplan-preview-card .floorplan-zoom-controls {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(248,244,234,.92);
  padding-bottom: .6rem;
}
.floorplan-side-panel {
  position: sticky;
  top: 150px;
}
.floorplan-toolbar-inline {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.floorplan-meta-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.floorplan-booth-list {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: .5rem;
}
.floorplan-booth-item {
  border: 1px solid rgba(34,49,61,.08);
  border-radius: 14px;
  padding: .6rem .75rem;
  background: rgba(255,255,255,.86);
}
.floorplan-booth-item.active {
  border-color: rgba(159,41,30,.35);
  box-shadow: 0 10px 24px rgba(159,41,30,.08);
}
.scheduler-shell {
  display: grid;
  gap: 1rem;
}
.scheduler-shell .calendar-grid {
  align-items: start;
}
.calendar-cell {
  min-height: 152px;
}
.calendar-cell.is-selected {
  outline: 3px solid rgba(159,41,30,.18);
  box-shadow: 0 10px 26px rgba(159,41,30,.08);
}
.calendar-events {
  max-height: 92px;
  overflow: auto;
}
.calendar-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
}
.calendar-pill small { opacity: .72; }
.scheduler-detail-card {
  position: sticky;
  top: 150px;
}
.review-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: 320px minmax(0, 1fr);
}
.review-shell .review-sidebar {
  position: sticky;
  top: 150px;
  align-self: start;
}
.review-result-card {
  background: linear-gradient(180deg, #fff 0%, #faf5ec 100%);
}
.poll-builder-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
}
.poll-invite-list {
  max-height: 420px;
  overflow: auto;
}
.poll-qr {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(34,49,61,.08);
}
.palette-swatches {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
}
.palette-swatch {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid white;
  box-shadow: 0 0 0 1px rgba(34,49,61,.12), 0 8px 18px rgba(31,42,49,.08);
  cursor: pointer;
}
.vendor-banner .cta-ghost {
  display: inline-flex;
  border-radius: 999px;
  padding: .55rem 1rem;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
}
.vendor-public-hero .hero-overlay-panel {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border-radius: 22px;
}
.feature-builder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1200px) {
  .review-shell,
  .poll-builder-grid,
  .feature-builder-grid { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  .floorplan-gallery-preview { min-height: 460px; }
  .floorplan-gallery-preview .floorplan-viewport { max-height: 440px; }
  .floorplan-side-panel,
  .scheduler-detail-card,
  .review-shell .review-sidebar { position: static; }
}

.floorplan-booth-list {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.floorplan-booth-item.is-preferred {
  border-color: rgba(159,41,30,.34);
  background: rgba(159,41,30,.08);
}
.floorplan-booth-item {
  text-align: left;
  font-size: .95rem;
}
.scheduler-shell {
  align-items: start;
}
.scheduler-shell > .row,
.calendar-root .scheduler-shell {
  align-items: start;
}
.calendar-root .scheduler-shell {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .7fr);
}
.preview-stage-card .cover-preview {
  transition: background-image .2s ease, box-shadow .2s ease;
}
.poll-invite-list .small a {
  word-break: break-all;
}
@media (max-width: 991px) {
  .calendar-root .scheduler-shell {
    grid-template-columns: 1fr;
  }
}

/* polish + overflow fixes */
body { overflow-x: clip; }
main.container, .container, .container-fluid, .row, [class^="col"], [class*=" col"] { min-width: 0; }
.section-card, .card, .surface-soft, .floor-list-card, .floorplan-preview-card, .preview-shell, .vendor-banner, .scheduler-detail-card, .review-result-card { overflow: hidden; }
.floorplan-side-panel,
.floorplan-side-panel .card,
.scheduler-detail-card,
.review-sidebar { width: 100%; max-width: 100%; }
.floorplan-side-panel { top: 118px; z-index: 0; }
.floorplan-gallery-preview,
.floorplan-stage,
.floorplan-shell,
.floorplan-viewport { max-width: 100%; }
.floorplan-viewport { overflow: auto; overscroll-behavior: contain; }
.floorplan-gallery-preview { min-height: 520px; }
.floorplan-booth-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
}
.floorplan-booth-item:hover { background: rgba(159,41,30,.06); }
.main-nav .navbar-collapse { min-width: 0; }
.main-nav .nav-actions { margin-left: auto; }
.footer-band { overflow-wrap: anywhere; }

.poll-builder-grid .builder-column {
  background: linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
}
.poll-builder-grid .builder-column .tag-chip { min-width: 2rem; justify-content: center; }
.poll-builder-grid textarea,
.poll-builder-grid input,
.poll-builder-grid select { max-width: 100%; }

.scheduler-shell .card,
.scheduler-shell .calendar-root,
.calendar-root { min-width: 0; }
.calendar-root .scheduler-shell > div,
.calendar-root .scheduler-shell > aside { min-width: 0; }
.calendar-toolbar { gap: .75rem; flex-wrap: wrap; }
.calendar-events { max-height: 110px; }
.calendar-pill { line-height: 1.15; }

.review-shell { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
.review-shell .review-sidebar { top: 118px; }

.vendor-banner {
  position: relative;
  isolation: isolate;
}
.vendor-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(17, 28, 32, .24), rgba(17, 28, 32, .08));
  z-index: -1;
}
.vendor-banner::after {
  content: '';
  position: absolute;
  right: -100px;
  bottom: -120px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  z-index: -1;
}
.vendor-banner .cta-ghost { margin-right: .45rem; }
.vendor-public-hero,
.cover-preview { background-blend-mode: multiply, normal; }

.branding-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.inline-color-picker {
  width: 58px !important;
  min-width: 58px;
  height: 42px;
  padding: .15rem;
  border-radius: 14px;
}
.branding-color-field {
  display: flex;
  gap: .65rem;
  align-items: center;
}
.branding-color-field .small-muted { margin: 0; }

.home-story-card .small-muted,
.hero-logo-chip .small { line-height: 1.55; }
.home-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}

.dashboard-license-banner {
  border-left: 5px solid var(--gold);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,246,236,.98));
}
.dashboard-license-banner.is-bad { border-left-color: var(--valley-red); }
.dashboard-license-banner.is-good { border-left-color: var(--pine-green); }

@media (max-width: 1200px) {
  .home-story-grid { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  .review-shell { grid-template-columns: 1fr; }
  .floorplan-side-panel,
  .scheduler-detail-card,
  .review-shell .review-sidebar { position: static; top: auto; }
  .floorplan-gallery-preview { min-height: 380px; }
}
@media (max-width: 767px) {
  .calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-weekdays { display: none !important; }
  .calendar-cell { min-height: 120px; }
}

.floorplan-side-panel { position: static; top: auto; }

.floorplan-preview-card .floorplan-zoom-controls { position: static; }

.inline-color-picker { appearance: none; -webkit-appearance: none; border: 1px solid rgba(34,49,61,.12); background: #fff; }
.inline-color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.inline-color-picker::-webkit-color-swatch { border: 0; border-radius: 10px; }
.inline-color-picker::-moz-color-swatch { border: 0; border-radius: 10px; }

/* site landing editor + public landing polish */
.site-hero-preview,
.site-landing-mini-preview {
  color: #fff;
  border-radius: 28px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: linear-gradient(120deg, var(--site-accent, var(--valley-red)), var(--site-accent-2, var(--pine-green)));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}
.site-hero-ribbon {
  display: inline-flex;
  align-items: center;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: .85rem;
  font-weight: 700;
}
.site-landing-mini-preview {
  min-height: 240px;
}
.metric-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.turnout-meter {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(39,79,102,.08);
}
.turnout-meter-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--valley-red), var(--gold));
  border-radius: inherit;
}
.election-card { overflow: hidden; }
.election-invite-list { max-height: 860px; overflow: auto; padding-right: .2rem; }

/* stronger safe overflow / responsive shells */
.row > * { min-width: 0; }
.table-responsive { overflow: auto; }
img { max-width: 100%; height: auto; }
.card, .section-card { position: relative; }
.preview-shell, .floorplan-viewport, .floorplan-stage, .chart-card, .surface-soft { max-width: 100%; }

/* nav / page polish */
.main-nav .navbar-nav { row-gap: .15rem; }
.main-nav .dropdown-menu-lg { min-width: 280px; }
main.container { max-width: 1440px; }
.navbar-toggler { border-radius: 14px; }

/* editor refinement */
.editor-topbar { border: 1px solid rgba(34,49,61,.06); }
.preview-stage-card .preview-shell { min-height: 420px; }

@media (max-width: 1200px) {
  .metric-grid-3,
  .metric-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .metric-grid-3,
  .metric-grid-4 { grid-template-columns: 1fr; }
  .site-hero-preview,
  .site-landing-mini-preview { border-radius: 22px; }
  .main-nav .dropdown-menu-lg { min-width: 100%; }
}

.notification-unread { border: 1px solid rgba(155,28,31,.18); box-shadow: inset 0 0 0 1px rgba(155,28,31,.06); }

.kpi, .section-card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi:hover, .section-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(31,42,49,.10);
}
.main-nav .dropdown-menu-lg { min-width: 20rem; }
.hero-surface {
  background: linear-gradient(135deg, rgba(159,41,30,.92), rgba(39,79,102,.88));
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.notification-unread { border-color: rgba(159,41,30,.22); box-shadow: 0 14px 32px rgba(159,41,30,.08); }
.page-title { letter-spacing: -.02em; }
.card.section-card .btn-sm { border-radius: 12px; }
.site-landing-mini-preview { border-radius: 24px; padding: 1.25rem; min-height: 260px; color: #fff; background: linear-gradient(135deg, var(--site-accent, #9b1c1f), var(--site-accent-2, #2f5a43)); background-size: cover; background-position: center; }
.form-control-color { min-height: 48px; }
@media (max-width: 991px) {
  .main-nav { position: sticky; top: 0; }
  .kpi .display-6 { font-size: 2rem; }
}


.editor-preset-bar .btn {
  border-radius: 999px;
}
.page-editor-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.editor-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(16, 22, 26, var(--overlay-strength, .72)), rgba(16, 22, 26, calc(var(--overlay-strength, .72) * .68)));
  z-index: 0;
}
.page-editor-hero > *:not(.editor-hero-overlay) {
  position: relative;
  z-index: 1;
}
.page-editor-hero-content {
  position: relative;
  z-index: 1;
}
.preview-stat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.preview-stat-chip {
  min-width: 120px;
  display: grid;
  gap: .15rem;
  padding: .75rem .9rem;
  border-radius: 18px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
}
.preview-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
}
.preview-stat-label {
  font-size: .82rem;
  opacity: .88;
}
.page-testimonial {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,242,231,.98));
  border: 1px solid rgba(34,49,61,.08);
  padding: 1rem 1.15rem;
}
.page-testimonial blockquote {
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}
.page-testimonial .small-muted {
  color: var(--muted-text);
}

/* editor experience refresh */
.editor-topbar {
  position: static !important;
  top: auto !important;
  z-index: 1 !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
  backdrop-filter: none;
}
.editor-topbar .card-body {
  gap: 1rem;
}
.editor-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  justify-content: flex-end;
}
.editor-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .35rem;
}
.editor-quick-nav a {
  text-decoration: none;
  border: 1px solid rgba(34,49,61,.08);
  background: rgba(248,242,231,.9);
  color: var(--river-blue);
  font-weight: 600;
  border-radius: 999px;
  padding: .45rem .8rem;
  font-size: .9rem;
}
.editor-quick-nav a:hover {
  background: rgba(159,41,30,.08);
  color: var(--valley-red);
}
.editor-form-section {
  scroll-margin-top: 90px;
}
.editor-form-section .section-card {
  overflow: visible;
}
.editor-helper-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}
.editor-callout-preview {
  border-radius: 20px;
  padding: 1rem 1.15rem;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
}
.editor-callout-preview.is-light {
  background: rgba(255,255,255,.92);
  border-color: rgba(34,49,61,.08);
}
.page-editor-hero.hero-height-compact { min-height: 260px; }
.page-editor-hero.hero-height-standard { min-height: 360px; }
.page-editor-hero.hero-height-tall { min-height: 460px; }
.page-editor-hero.content-width-narrow .page-editor-hero-content { max-width: 720px; }
.page-editor-hero.content-width-standard .page-editor-hero-content { max-width: 920px; }
.page-editor-hero.content-width-wide .page-editor-hero-content { max-width: 1180px; }
.hero.hero-height-compact { min-height: 290px; }
.hero.hero-height-standard { min-height: 410px; }
.hero.hero-height-tall { min-height: 540px; }
.hero.content-width-narrow .hero-inner,
.vendor-public-hero.content-width-narrow .hero-inner { max-width: 760px; margin-inline: auto; }
.hero.content-width-standard .hero-inner,
.vendor-public-hero.content-width-standard .hero-inner { max-width: 1120px; margin-inline: auto; }
.hero.content-width-wide .hero-inner,
.vendor-public-hero.content-width-wide .hero-inner { max-width: 1320px; margin-inline: auto; }
.editor-split-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
}
.editor-sticky-note {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 999px;
  padding: .45rem .8rem;
  background: rgba(39,79,102,.08);
  color: var(--river-blue);
  font-size: .9rem;
  font-weight: 600;
}
@media (max-width: 991px) {
  .editor-helper-grid { grid-template-columns: 1fr; }
  .editor-toolbar-actions { justify-content: flex-start; }
}


/* page editor polish */
.editor-topbar {
  margin-bottom: 1rem;
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(31,42,49,.08);
}
.editor-topbar .small-muted { max-width: 72ch; }
.editor-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.editor-mini-card {
  border: 1px solid rgba(34,49,61,.08);
  border-radius: 22px;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,242,231,.95));
  box-shadow: var(--shadow-soft);
}
.editor-media-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .9rem;
}
.editor-media-thumb {
  min-height: 150px;
  border-radius: 20px;
  border: 1px solid rgba(34,49,61,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,236,223,.98));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-text);
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}
.editor-media-thumb.editor-media-thumb-square {
  aspect-ratio: 1 / 1;
  min-height: 0;
}
.editor-media-thumb.is-empty {
  border-style: dashed;
}
.editor-preview-sticky {
  position: sticky;
  top: 1rem;
}
.preview-stage-card {
  box-shadow: 0 18px 46px rgba(31,42,49,.09);
}
.editor-quick-nav {
  row-gap: .6rem;
}
.editor-quick-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}
.editor-form-section .section-card {
  border-radius: 24px;
}
.editor-form-section h2.h5,
.preview-stage-card h2.h4 {
  letter-spacing: -.01em;
}
@media (max-width: 1399px) {
  .editor-preview-sticky { position: static; }
}
@media (max-width: 991px) {
  .editor-overview-grid { grid-template-columns: 1fr; }
  .editor-media-shelf { grid-template-columns: 1fr; }
}


/* editor layout hardening */
.editor-page-shell {
  position: relative;
}
.editor-main-grid {
  --bs-gutter-x: 1.35rem;
  --bs-gutter-y: 1.35rem;
  margin-top: 0 !important;
}
.editor-main-grid > [class*="col-"] {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.editor-sidebar,
.editor-preview-column {
  min-width: 0;
}
.editor-preview-column {
  position: relative;
}
.editor-topbar {
  overflow: visible;
}
.editor-topbar .card-body {
  display: grid;
  gap: .9rem;
}
.editor-toolbar-actions .btn {
  min-height: 44px;
}
.editor-quick-nav {
  border-top: 1px solid rgba(34,49,61,.07);
  padding-top: .9rem;
}
.editor-quick-nav a {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.editor-overview-grid,
.editor-media-shelf,
.editor-helper-grid {
  min-width: 0;
}
.editor-mini-card,
.editor-form-section .section-card,
.preview-stage-card {
  overflow: hidden;
}
.editor-form-section .card-body,
.preview-stage-card .card-body {
  min-width: 0;
}
.editor-form-section textarea,
.editor-form-section input,
.editor-form-section select {
  max-width: 100%;
}
.editor-form-section .row,
.editor-form-section [class*="col-"] {
  min-width: 0;
}
.preview-stage-card {
  border-radius: 28px;
}
.preview-stage-card .card-body {
  padding: 1.35rem;
}
.editor-preview-sticky {
  top: 1.25rem;
}
.editor-preview-shell {
  display: grid;
  gap: 1rem;
}
.editor-section-note {
  font-size: .9rem;
  color: var(--muted-text);
  margin-bottom: .85rem;
}
.editor-surface-subtle {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,242,231,.94));
  border: 1px solid rgba(34,49,61,.06);
  padding: 1rem 1.1rem;
}
.editor-surface-subtle + .editor-surface-subtle {
  margin-top: 1rem;
}
@media (max-width: 1399px) {
  .editor-main-grid {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
  }
}
@media (max-width: 991px) {
  .editor-topbar {
    border-radius: 22px;
  }
  .editor-topbar .card-body {
    padding: 1rem 1rem 1.15rem !important;
  }
  .editor-main-grid {
    --bs-gutter-x: .9rem;
    --bs-gutter-y: .9rem;
  }
  .editor-quick-nav {
    padding-top: .75rem;
  }
}

/* vendor + market dashboard refresh */
.dashboard-shell {
  display: grid;
  gap: 1.25rem;
}
.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(252,248,242,.96));
  box-shadow: var(--shadow-soft);
}
.vendor-dashboard-hero {
  background: linear-gradient(130deg, rgba(42,87,115,.14), rgba(53,89,68,.10), rgba(255,255,255,.95));
}
.market-dashboard-hero {
  background: linear-gradient(130deg, rgba(155,28,31,.10), rgba(47,90,67,.10), rgba(255,255,255,.96));
}
.vendor-dashboard-avatar,
.placeholder-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.65);
  box-shadow: var(--shadow-soft);
}
.placeholder-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--valley-red), var(--pine-green));
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
}
.inventory-alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(155,28,31,.10);
}
.inventory-mini-table {
  display: grid;
  gap: .75rem;
}
.inventory-mini-table-head,
.inventory-mini-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) minmax(80px, .8fr) minmax(70px, .6fr) minmax(90px, .8fr) minmax(80px, .7fr);
  gap: .75rem;
  align-items: center;
}
.inventory-mini-table-head {
  font-size: .8rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.inventory-mini-row {
  padding: .9rem 1rem;
  border-radius: 18px;
  background: var(--cream);
}
.inventory-editor-card {
  padding: 1rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(252,248,242,.96));
  border: 1px solid rgba(34,49,61,.08);
  box-shadow: var(--shadow-soft);
}
.market-dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.dashboard-tool-card {
  display: grid;
  gap: .35rem;
  text-decoration: none;
  color: inherit;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(251,246,236,.96), rgba(255,255,255,.98));
  border: 1px solid rgba(34,49,61,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(155,28,31,.18);
}
.dashboard-tool-card strong { font-size: 1rem; }
.dashboard-tool-card span { color: var(--muted); line-height: 1.5; }
.dashboard-split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.dashboard-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}
.compact-floorplan-card {
  min-height: 280px;
}
.compact-floorplan-card [data-floorplan-viewer] {
  min-height: 260px;
}
@media (max-width: 1199px) {
  .market-dashboard-actions-grid,
  .dashboard-split-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 991px) {
  .dashboard-hero {
    align-items: start;
    flex-direction: column;
  }
  .inventory-mini-table-head {
    display: none !important;
  }
  .inventory-mini-row {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-meta-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .inventory-mini-row {
    grid-template-columns: 1fr;
  }
}
