/* ── Proposal Builder Layout ─────────────────────────────────── */
body.builder-page { overflow: hidden; }

/* Header */
.bld-header {
  position: fixed; top: 0; left: 0; right: 0; height: 52px;
  background: white; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; z-index: 200;
}
.bld-header-center {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.bld-header-right { display: flex; align-items: center; gap: 8px; }
.bld-title-input {
  border: none; font-size: 14px; font-weight: 600;
  background: transparent; text-align: center; min-width: 240px;
  color: var(--gray-900); padding: 6px 10px;
  border-radius: var(--radius-sm); font-family: var(--font);
}
.bld-title-input:hover { background: var(--gray-50); }
.bld-title-input:focus { background: var(--gray-100); outline: none; }

/* Three-panel body */
.bld-body {
  display: flex; margin-top: 52px; height: calc(100vh - 52px); overflow: hidden;
}

/* ── Left panel ─────────────────────────────────────────────── */
.bld-left {
  width: 210px; flex-shrink: 0; background: white;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.bld-left-tabs {
  display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.bld-ltab {
  flex: 1; padding: 10px 4px; font-size: 11px; font-weight: 600;
  text-align: center; cursor: pointer; color: var(--gray-400);
  border: none; border-bottom: 2px solid transparent;
  background: none; font-family: var(--font);
  transition: color 0.12s;
}
.bld-ltab:hover { color: var(--gray-600); }
.bld-ltab.active { color: var(--blue); border-bottom-color: var(--blue); }
.bld-lpanel { flex: 1; overflow-y: auto; padding: 10px; }
.bld-lpanel.hidden { display: none; }

/* Slide thumbnails */
.slide-thumb {
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: white; cursor: pointer; margin-bottom: 8px;
  transition: border-color 0.12s; overflow: hidden; position: relative;
}
.slide-thumb.active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.slide-thumb:hover { border-color: var(--gray-400); }
.slide-thumb-inner {
  width: 794px; transform-origin: top left;
  pointer-events: none;
}
.slide-thumb-num {
  position: absolute; bottom: 4px; left: 4px;
  font-size: 9px; color: var(--gray-400); background: rgba(255,255,255,0.85);
  padding: 1px 5px; border-radius: 3px;
}
.slide-thumb-type {
  position: absolute; top: 4px; left: 4px;
  font-size: 9px; color: var(--gray-400); background: rgba(255,255,255,0.85);
  padding: 1px 5px; border-radius: 3px; text-transform: capitalize;
}
.slide-thumb-actions {
  position: absolute; top: 3px; right: 3px;
  display: none; gap: 2px;
}
.slide-thumb:hover .slide-thumb-actions { display: flex; }
.slide-thumb-btn {
  background: rgba(0,0,0,0.45); color: white; border: none;
  border-radius: 3px; width: 18px; height: 18px; font-size: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.slide-thumb-btn:hover { background: rgba(0,0,0,0.7); }

/* Block library grid */
.block-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.block-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 8px; text-align: center; cursor: pointer;
  background: white; transition: background 0.12s, border-color 0.12s;
  font-family: var(--font);
}
.block-item:hover { background: var(--blue-light); border-color: var(--blue); }
.block-icon { font-size: 22px; margin-bottom: 4px; }
.block-name { font-size: 10px; font-weight: 600; color: var(--gray-600); }

/* Templates list */
.tpl-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  background: white; display: flex; align-items: center; justify-content: space-between;
  transition: border-color 0.12s;
}
.tpl-item:hover { border-color: var(--blue); }
.tpl-name { font-size: 12px; font-weight: 600; }
.tpl-meta { font-size: 10px; color: var(--gray-400); }

/* ── Center panel ───────────────────────────────────────────── */
.bld-center {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: var(--gray-100);
  min-width: 0; /* prevents flex blowout so toolbar stays fully visible */
}

/* Toolbar */
.bld-toolbar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 6px 16px; display: flex; align-items: center; gap: 2px;
  flex-wrap: nowrap; flex-shrink: 0;
  overflow-x: auto;      /* scroll horizontally instead of wrapping */
  scrollbar-width: none; /* hide scrollbar on Firefox */
}
.bld-toolbar::-webkit-scrollbar { display: none; }
.bld-tool {
  background: none; border: none; padding: 5px 8px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
  color: var(--gray-600); transition: background 0.12s;
  font-family: var(--font); min-width: 28px; text-align: center;
}
.bld-tool:hover { background: var(--gray-100); color: var(--gray-900); }
.bld-tool.active { background: var(--blue-light); color: var(--blue); }
.bld-tool-sep { width: 1px; background: var(--border); height: 20px; margin: 0 4px; flex-shrink: 0; }

/* Toolbar dropdown selects */
.bld-tool-select {
  padding: 4px 6px; font-size: 11px; border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); background: white; color: var(--gray-600);
  font-family: var(--font); cursor: pointer; max-width: 130px;
}
.bld-tool-select:focus { outline: none; border-color: var(--blue); }

/* Dropdown wrapper for popovers */
.bld-tool-dropdown-wrap { position: relative; display: inline-flex; }

/* Popover (video embed, etc.) */
.bld-popover {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: white; border: 1px solid var(--border-md); border-radius: 8px;
  padding: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 100;
  min-width: 240px; margin-top: 6px;
}
.bld-popover.hidden { display: none; }

/* AI Write button highlight */
.bld-tool-ai {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--blue) !important; font-weight: 600; font-size: 12px !important;
}
.bld-tool-ai:hover { background: var(--blue-light) !important; }

/* Canvas wrapper */
.bld-canvas-wrap {
  flex: 1; overflow: auto; padding: 32px;
  display: flex; justify-content: center; align-items: flex-start;
}

/* Slide canvas — A4 proportions */
.bld-slide {
  width: 794px;
  min-height: 562px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

/* ── Right panel ────────────────────────────────────────────── */
.bld-right {
  width: 272px; flex-shrink: 0; background: white;
  border-left: 1px solid var(--border);
  overflow-y: auto; padding: 18px;
}
.rpanel-title {
  font-size: 10px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px;
}
.rpanel-section { margin-bottom: 20px; }
.rpanel-section + .rpanel-section { border-top: 1px solid var(--border); padding-top: 16px; }
.rpanel-row { margin-bottom: 10px; }
.rpanel-row label { font-size: 12px; color: var(--gray-600); display: block; margin-bottom: 4px; font-weight: 500; }
.rpanel-row input[type=color] {
  width: 100%; height: 34px; border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); cursor: pointer; padding: 3px;
}
.rpanel-row select,
.rpanel-row input[type=text],
.rpanel-row input[type=number],
.rpanel-row textarea {
  width: 100%; padding: 7px 10px; font-size: 12px;
  border: 1px solid var(--border-md); border-radius: var(--radius-sm);
  background: white; font-family: var(--font);
}
.rpanel-row textarea { min-height: 60px; resize: vertical; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.toggle-label { font-size: 12px; color: var(--gray-600); }
.toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gray-200); border-radius: 20px; transition: 0.2s;
}
.toggle-slider:before {
  position: absolute; content: ""; height: 14px; width: 14px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--blue); }
.toggle input:checked + .toggle-slider:before { transform: translateX(16px); }

/* Product picker in right panel */
.prod-pick-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 6px; font-size: 12px; cursor: pointer;
  transition: background 0.1s;
}
.prod-pick-item:hover { background: var(--gray-50); }
.prod-pick-item.selected { background: var(--blue-light); border-color: var(--blue); }
.prod-pick-img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; background: var(--gray-100); flex-shrink: 0; }
.prod-pick-name { font-weight: 600; font-size: 11px; }
.prod-pick-price { font-size: 11px; color: var(--blue); margin-left: auto; flex-shrink: 0; }

/* Line item editor in right panel */
.li-editor-row {
  display: flex; gap: 6px; align-items: center; margin-bottom: 8px;
  font-size: 12px;
}
.li-editor-row input, .li-editor-row select {
  padding: 5px 6px; font-size: 11px; border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); font-family: var(--font);
}

/* ── Slide type renderers ───────────────────────────────────── */

/* Cover */
.slide-cover {
  background: linear-gradient(135deg, #0C447C 0%, #185FA5 50%, #1a6cb8 100%);
  color: white; padding: 60px 64px 48px;
  min-height: 562px; display: flex; flex-direction: column;
  justify-content: space-between;
}
.slide-cover-title {
  font-size: 36px; font-weight: 700; line-height: 1.15;
  margin-bottom: 12px; outline: none;
}
.slide-cover-subtitle {
  font-size: 17px; opacity: 0.8; outline: none; margin-bottom: 32px; line-height: 1.5;
}
.slide-cover-meta {
  display: flex; gap: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.slide-cover-meta-item { }
.slide-cover-meta-label {
  opacity: 0.5; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 2px;
}
.slide-cover-meta-value { font-size: 13px; outline: none; }

/* Generic body slide */
.slide-body { padding: 48px 56px; min-height: 562px; }

/* ── Layout presets ────────────────────────────────────────────
   Applied as classes on .bld-slide by _applySettingsToElement().
   Image-bearing layouts get a .layout-image-panel sibling injected. */

/* Full bleed — content fills entire slide, minimal padding */
.bld-slide.layout-full > .slide-body { padding: 24px 32px; min-height: 562px; }

/* Split 50/50 — text left, image right */
.bld-slide.layout-split { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.bld-slide.layout-split > .slide-body { grid-column: 1 / 2; grid-row: 1; padding: 48px 40px; min-height: 562px; }
.bld-slide.layout-split > .layout-image-panel { grid-column: 2 / 3; grid-row: 1; min-height: 562px; }

/* Image left — image 40%, text 60% */
.bld-slide.layout-img-left { display: grid; grid-template-columns: 2fr 3fr; grid-template-rows: 1fr; }
.bld-slide.layout-img-left > .slide-body { grid-column: 2 / 3; grid-row: 1; padding: 48px 48px; min-height: 562px; }
.bld-slide.layout-img-left > .layout-image-panel { grid-column: 1 / 2; grid-row: 1; min-height: 562px; }

/* Image right — text 60%, image 40% */
.bld-slide.layout-img-right { display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 1fr; }
.bld-slide.layout-img-right > .slide-body { grid-column: 1 / 2; grid-row: 1; padding: 48px 48px; min-height: 562px; }
.bld-slide.layout-img-right > .layout-image-panel { grid-column: 2 / 3; grid-row: 1; min-height: 562px; }

/* Text only — single column, narrow content, generous padding */
.bld-slide.layout-text-only > .slide-body {
  padding: 96px 120px; max-width: 640px; margin: 0 auto; min-height: 562px;
}

/* 3 columns — heading spans, lists / grids distribute across 3 */
.bld-slide.layout-3col > .slide-body { padding: 48px 48px; min-height: 562px; }
.bld-slide.layout-3col .slide-heading { display: block; width: 100%; }
.bld-slide.layout-3col .scope-list,
.bld-slide.layout-3col .terms-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px;
}
.bld-slide.layout-3col .product-grid {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
/* Fallback for richtext / aboutus bodies — use CSS columns */
.bld-slide.layout-3col .slide-text,
.bld-slide.layout-3col .about-body,
.bld-slide.layout-3col [contenteditable][data-field="body"] {
  column-count: 3; column-gap: 24px;
}

/* Injected image panel — shared styling */
.layout-image-panel {
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: var(--gray-50, #f9fafb);
  min-height: 100%;
}
.layout-image-panel:empty:not([style*="background-image"])::after {
  content: ""; display: block; height: 100%;
  background-image: linear-gradient(135deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 50%, rgba(0,0,0,0.04) 50%, rgba(0,0,0,0.04) 75%, transparent 75%);
  background-size: 14px 14px;
}
.slide-heading {
  font-size: 24px; font-weight: 700; margin-bottom: 20px;
  color: var(--blue-dark); outline: none;
  border-bottom: 3px solid var(--blue); padding-bottom: 10px;
  display: inline-block;
}
.slide-text {
  font-size: 14px; line-height: 1.75; color: var(--gray-600);
  outline: none; min-height: 40px;
}
.slide-text:empty:before {
  content: attr(data-placeholder); color: var(--gray-400); pointer-events: none;
}
[contenteditable]:focus {
  outline: 2px solid rgba(24,95,165,0.2); outline-offset: 2px; border-radius: 2px;
}

/* About us stats row */
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px;
}
.about-stat {
  background: var(--blue-light); border-radius: var(--radius-md);
  padding: 22px 16px; text-align: center;
}
.about-stat-value {
  font-size: 30px; font-weight: 700; color: var(--blue); outline: none;
}
.about-stat-label {
  font-size: 12px; color: var(--gray-600); margin-top: 4px; outline: none;
}

/* Scope list */
.scope-list { list-style: none; padding: 0; margin: 0; }
.scope-item {
  display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start;
}
.scope-num {
  width: 28px; height: 28px; background: var(--blue); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.scope-text {
  font-size: 14px; line-height: 1.6; color: var(--gray-600);
  outline: none; flex: 1; min-height: 20px;
}
.scope-remove {
  background: none; border: none; cursor: pointer; color: var(--gray-400);
  font-size: 16px; padding: 2px 6px; flex-shrink: 0; border-radius: 4px;
}
.scope-remove:hover { background: var(--red-light); color: var(--red); }
.scope-add {
  display: inline-flex; align-items: center; gap: 6px; color: var(--blue);
  font-size: 13px; cursor: pointer; background: none; border: none;
  font-family: var(--font); margin-top: 8px; padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.scope-add:hover { background: var(--blue-light); }

/* Product showcase grid */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.product-slide-card {
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.product-slide-img {
  width: 100%; height: 110px; object-fit: cover; background: var(--gray-100); display: block;
}
.product-slide-body { padding: 10px 12px; }
.product-slide-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.product-slide-sku { font-size: 10px; color: var(--gray-400); margin-bottom: 4px; }
.product-slide-price { font-size: 13px; font-weight: 600; color: var(--blue); }
.product-slide-desc {
  font-size: 11px; color: var(--gray-600); line-height: 1.4; margin-top: 4px;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; display: -webkit-box; overflow: hidden;
}

/* Pricing table */
.pricing-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 16px; }
.pricing-table th {
  background: var(--blue); color: white; padding: 10px 14px;
  text-align: left; font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.pricing-table th:last-child { text-align: right; }
.pricing-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pricing-table td:last-child { text-align: right; font-weight: 500; }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tfoot td {
  padding: 8px 14px; font-size: 12px; color: var(--gray-400); border-bottom: none;
}
.pricing-table tfoot tr:last-child td {
  font-size: 15px; font-weight: 700; color: var(--blue); border-top: 2px solid var(--blue);
  padding-top: 12px;
}
.pricing-empty {
  text-align: center; color: var(--gray-400); padding: 24px; font-size: 13px;
}

/* Terms */
.terms-list { list-style: none; padding: 0; margin: 0; }
.term-item {
  display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start;
}
.term-num {
  font-size: 12px; font-weight: 700; color: var(--blue); min-width: 22px; margin-top: 2px;
}
.term-text {
  font-size: 13px; line-height: 1.6; color: var(--gray-600); outline: none; flex: 1;
}

/* Sign-off */
.signoff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.signoff-party-label {
  font-size: 10px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px;
}
.signoff-field-label { font-size: 11px; color: var(--gray-400); margin-bottom: 4px; }
.signoff-field {
  font-size: 14px; color: var(--gray-900); outline: none; min-height: 20px;
  border-bottom: 1px solid var(--border-md); padding-bottom: 4px; margin-bottom: 14px;
}
.signoff-canvas-wrap {
  border: 2px dashed var(--border-md); border-radius: var(--radius-md);
  padding: 12px; text-align: center; min-height: 80px;
  background: var(--gray-50);
}
.signoff-canvas-label { font-size: 11px; color: var(--gray-400); margin-top: 8px; }

/* Image block */
.image-block { padding: 48px 56px; min-height: 562px; }
.image-drop-zone {
  width: 100%; min-height: 300px; background: var(--gray-50);
  border: 2px dashed var(--border-md); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px; color: var(--gray-400); font-size: 13px;
  cursor: pointer; transition: border-color 0.12s;
}
.image-drop-zone:hover { border-color: var(--blue); }
.image-block-img {
  width: 100%; max-height: 400px; object-fit: contain;
  border-radius: var(--radius-md);
}
.image-block-caption {
  font-size: 12px; color: var(--gray-400); text-align: center;
  margin-top: 10px; outline: none;
}

/* Video block */
.video-block { padding: 48px 56px; min-height: 562px; }
.video-embed {
  width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md);
  overflow: hidden; background: black;
}
.video-embed iframe { width: 100%; height: 100%; border: none; }
.video-placeholder {
  width: 100%; aspect-ratio: 16/9; background: var(--gray-100);
  border-radius: var(--radius-md); display: flex; align-items: center;
  justify-content: center; color: var(--gray-400); font-size: 13px;
  flex-direction: column; gap: 8px; border: 2px dashed var(--border-md);
}

/* ── Print / PDF ────────────────────────────────────────────── */
@media print {
  .bld-header, .bld-left, .bld-right, .bld-toolbar, .no-print { display: none !important; }
  .bld-body { margin-top: 0; }
  .bld-center { overflow: visible; }
  .bld-canvas-wrap { padding: 0; overflow: visible; display: block; }
  .bld-slide { box-shadow: none; border-radius: 0; width: 100%; min-height: 0; page-break-after: always; }
  body { overflow: auto; }
}

/* ── Right panel design controls ────────────────────────────── */
.rpanel-section-title {
  font-size: 10px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 10px;
}
.rpanel-section-title:not(:first-child) { margin-top: 4px; }

/* Swatch row */
.swatch-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.swatch {
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.12s, box-shadow 0.12s;
  flex-shrink: 0;
}
.swatch:hover { box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }
.swatch.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(24,95,165,0.25); }

/* Type selector (pill group) */
.pill-group { display: flex; gap: 0; border: 1px solid var(--border-md); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.pill-btn {
  flex: 1; padding: 6px 4px; font-size: 10px; font-weight: 600;
  text-align: center; cursor: pointer; background: white; border: none;
  color: var(--gray-500); font-family: var(--font); transition: background 0.12s, color 0.12s;
  border-right: 1px solid var(--border-md);
}
.pill-btn:last-child { border-right: none; }
.pill-btn:hover { background: var(--gray-50); }
.pill-btn.active { background: var(--blue); color: white; }

/* Gradient direction selector */
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 8px; }
.dir-btn {
  padding: 5px; font-size: 10px; text-align: center; cursor: pointer;
  border: 1px solid var(--border-md); border-radius: 4px; background: white;
  color: var(--gray-500); font-family: var(--font); transition: all 0.12s;
}
.dir-btn:hover { border-color: var(--blue); }
.dir-btn.active { background: var(--blue); color: white; border-color: var(--blue); }

/* Layout picker grid */
.layout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.layout-option {
  border: 2px solid var(--border-md); border-radius: 6px; padding: 8px 4px;
  text-align: center; cursor: pointer; background: white; transition: all 0.12s;
}
.layout-option:hover { border-color: var(--blue); }
.layout-option.active { border-color: var(--blue); background: var(--blue-light); }
.layout-option-icon {
  width: 100%; height: 32px; margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.layout-option-icon > div { background: var(--gray-200); border-radius: 2px; }
.layout-option.active .layout-option-icon > div { background: var(--blue); opacity: 0.5; }
.layout-option-name { font-size: 9px; font-weight: 600; color: var(--gray-500); }
.layout-option.active .layout-option-name { color: var(--blue); }

/* Position selector (2x2 grid for logo position) */
.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 8px; }
.pos-btn {
  padding: 6px; font-size: 10px; text-align: center; cursor: pointer;
  border: 1px solid var(--border-md); border-radius: 4px; background: white;
  color: var(--gray-500); font-family: var(--font); transition: all 0.12s;
}
.pos-btn:hover { border-color: var(--blue); }
.pos-btn.active { background: var(--blue); color: white; border-color: var(--blue); }

/* Size selector (3 pills) */
.size-pills { display: flex; gap: 4px; margin-bottom: 8px; }
.size-pill {
  flex: 1; padding: 5px; font-size: 10px; font-weight: 600; text-align: center;
  cursor: pointer; border: 1px solid var(--border-md); border-radius: 4px;
  background: white; color: var(--gray-500); font-family: var(--font); transition: all 0.12s;
}
.size-pill:hover { border-color: var(--blue); }
.size-pill.active { background: var(--blue); color: white; border-color: var(--blue); }

/* Slider row */
.rpanel-slider { width: 100%; margin-bottom: 8px; accent-color: var(--blue); }

/* Image upload box */
.upload-box {
  border: 2px dashed var(--border-md); border-radius: 8px; padding: 16px;
  text-align: center; cursor: pointer; color: var(--gray-400); font-size: 11px;
  transition: border-color 0.12s; margin-bottom: 8px; position: relative;
  overflow: hidden;
}
.upload-box:hover { border-color: var(--blue); color: var(--blue); }
.upload-box input[type=file] {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.upload-box-preview {
  width: 100%; max-height: 80px; object-fit: contain; border-radius: 4px; margin-bottom: 4px;
}
.upload-box-remove {
  font-size: 10px; color: var(--red); cursor: pointer; background: none; border: none;
  font-family: var(--font); margin-top: 4px;
}
.upload-box-remove:hover { text-decoration: underline; }

/* Page actions row */
.page-actions { display: flex; gap: 6px; margin-top: 12px; }
.page-actions .btn { flex: 1; font-size: 11px; }

/* Logo in slide canvas */
.slide-logo { display: block; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .bld-right { width: 220px; }
}
@media (max-width: 900px) {
  .bld-left { width: 160px; }
  .bld-right { display: none; }
}
