/* ==========================================================================
   BidLift — Luxury Studio & Interactive Proposal Styles
   ========================================================================== */

:root {
  /* Default Dynamic Brand Palette (overridden dynamically via JS) */
  --brand: #0f294a;
  --brand-dark: #08172b;
  --brand-soft: #eef3f9;
  --accent: #c89d3c;

  /* App Surface Tokens (Light Mode) */
  --bg-app: #f4f6fa;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;

  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.11);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-surface: #111827;
  --bg-subtle: #172033;
  --bg-elevated: #1b253b;
  --bg-input: #0f172a;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border-subtle: #1e293b;
  --border-strong: #334155;

  --success: #34d399;
  --success-soft: rgba(16, 185, 129, 0.14);
  --warning: #fbbf24;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}

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

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
}

button, input, textarea, select {
  font-family: inherit;
}

svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  vertical-align: middle;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

/* ==========================================================================
   Buttons & Interactive Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 41, 74, 0.25);
}

.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(200, 157, 60, 0.35);
}

.btn-accent:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.pro-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.pro-pill.active-pro {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Top Navbar (Studio Mode)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.brand-home-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 3px 10px rgba(15, 41, 74, 0.22);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* ==========================================================================
   Hero Strip (Collapsible Studio Banner)
   ========================================================================== */
.hero-banner {
  background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 65%, #1e3a5f 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 24px;
}

.hero-banner.collapsed {
  padding: 9px 24px;
}

.hero-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-copy h1 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-copy p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
  max-width: 680px;
}

.template-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.template-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.template-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.template-pill.active {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
  font-weight: 700;
}

.hero-toggle-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.hero-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   Mobile Mode Switcher
   ========================================================================== */
.mobile-mode-bar {
  display: flex;
  padding: 8px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
}

.mobile-mode-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.mobile-mode-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

@media (min-width: 1100px) {
  .mobile-mode-bar {
    display: none;
  }
}

/* ==========================================================================
   Studio Split Workspace
   ========================================================================== */
.studio-workspace {
  max-width: 1580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100vh - 140px);
}

@media (min-width: 1100px) {
  .studio-workspace {
    grid-template-columns: minmax(430px, 495px) 1fr;
  }
}

.builder-pane {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.preview-pane {
  background: var(--bg-app);
  padding: 20px;
  overflow-y: auto;
}

@media (max-width: 1099px) {
  .studio-workspace[data-mobile-view="preview"] .builder-pane {
    display: none;
  }
  .studio-workspace[data-mobile-view="builder"] .preview-pane {
    display: none;
  }
}

/* Revenue Lift Coach Card */
.lift-coach {
  margin: 14px 16px 6px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(200, 157, 60, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

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

.lift-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--success);
}

.lift-delta {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--success);
}

.lift-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
}

.lift-stat {
  background: var(--bg-surface);
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.lift-stat span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.lift-stat strong {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}

/* Builder Tabs */
.builder-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky;
  top: 55px;
  z-index: 20;
}

.builder-tab {
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.builder-tab:hover {
  color: var(--text-primary);
}

.builder-tab.active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.builder-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Form Elements */
.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.14);
}

.card-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
}

.card-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Palette Swatches */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.palette-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.palette-chip.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(67, 56, 202, 0.15);
}

.swatch-dual {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Logo Upload Row */
.logo-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 800;
  color: var(--brand);
}

.logo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Feature list chips in builder */
.feature-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.feature-item-row input {
  flex: 1;
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-strong);
  transition: 0.2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--brand);
}

.switch input:checked + .slider:before {
  transform: translateX(18px);
}

/* ==========================================================================
   Preview Frame Bar (Studio Right Column)
   ========================================================================== */
.preview-chrome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.preview-chrome-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   Interactive Client Proposal Sheet (Used in Preview & Public `#q=...` View)
   ========================================================================== */
.client-mode-wrapper {
  min-height: 100vh;
  padding: 24px 16px 60px;
  background: var(--bg-app);
}

.client-mode-wrapper.embed-mode {
  padding: 10px;
  background: transparent;
}

.proposal-sheet {
  max-width: 980px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Proposal Hero Header */
.proposal-hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #ffffff;
  padding: 28px 30px;
  position: relative;
}

.proposal-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.proposal-biz {
  display: flex;
  align-items: center;
  gap: 14px;
}

.proposal-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--brand);
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.proposal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.proposal-biz-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.proposal-biz-tag {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

.proposal-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.validity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 12px;
  font-weight: 600;
}

.fast-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 800;
}

.proposal-meta-bar {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.meta-cell span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
}

.meta-cell strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

/* Proposal Body Sections */
.proposal-section {
  padding: 26px 30px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.section-heading h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

.section-heading p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Good / Better / Best Tiers Grid */
.tiers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 760px) {
  .tiers-grid:not(.single-tier) {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tier-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tier-card.recommended {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(200, 157, 60, 0.05) 0%, var(--bg-surface) 45%);
}

.tier-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 41, 74, 0.12), var(--shadow-md);
}

[data-theme="dark"] .tier-card.selected {
  box-shadow: 0 0 0 4px rgba(200, 157, 60, 0.22), var(--shadow-md);
}

.tier-ribbon {
  position: absolute;
  top: -11px;
  left: 16px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #0f172a;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.tier-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tier-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.tier-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.tier-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tier-card.selected .tier-radio {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tier-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 14px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.tier-price {
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 800;
  color: var(--text-primary);
}

.tier-timeline {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.tier-features {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.tier-features li svg {
  width: 15px;
  height: 15px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

.tier-select-cta {
  width: 100%;
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-primary);
  text-align: center;
  transition: all 0.15s ease;
}

.tier-card.selected .tier-select-cta {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* Interactive Upsell Add-Ons */
.addons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 720px) {
  .addons-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.addon-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.16s ease;
}

.addon-card:hover {
  border-color: var(--brand);
  background: var(--bg-subtle);
}

.addon-card.active {
  border-color: var(--success);
  background: var(--success-soft);
}

.addon-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.addon-card.active .addon-check {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.addon-info {
  flex: 1;
}

.addon-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
}

.addon-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.addon-price {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand);
  white-space: nowrap;
}

[data-theme="dark"] .addon-price {
  color: var(--accent);
}

/* Summary & Sign-Off Layout */
.close-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 780px) {
  .close-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.summary-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  color: var(--text-secondary);
}

.summary-line.discount {
  color: var(--success);
  font-weight: 600;
}

.summary-divider {
  border: none;
  border-top: 1px dashed var(--border-strong);
  margin: 10px 0;
}

.summary-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 0;
}

.summary-total-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}

.summary-total-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.deposit-callout {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deposit-callout span {
  font-size: 12px;
  color: var(--text-secondary);
}

.deposit-callout strong {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--brand);
}

[data-theme="dark"] .deposit-callout strong {
  color: var(--accent);
}

.terms-note {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Signature Pad */
.signature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sig-pad-wrap {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  margin-top: 6px;
  overflow: hidden;
}

.sig-canvas {
  display: block;
  width: 100%;
  height: 125px;
  cursor: crosshair;
  touch-action: none;
}

.sig-placeholder {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
}

.sig-clear-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
}

.sig-clear-btn:hover {
  background: #e2e8f0;
}

/* Approved Celebratory Card */
.approved-card {
  background: var(--success-soft);
  border: 2px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.approved-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 10px;
}

.approved-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.receipt-meta {
  margin-top: 14px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Viral Growth Footer inside Proposal */
.proposal-footer {
  padding: 14px 24px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.viral-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s ease;
}

.viral-badge:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

/* Client Top Utility Pill (Only visible in standalone client view) */
.client-floating-bar {
  max-width: 980px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ==========================================================================
   Modals, Drawer & Toast
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.65);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.code-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  word-break: break-all;
  color: var(--text-primary);
  max-height: 110px;
  overflow-y: auto;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
}

@media (min-width: 600px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan-box {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-box.featured {
  border-color: var(--accent);
  background: rgba(200, 157, 60, 0.06);
}

.plan-price {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
}

.draft-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: var(--bg-subtle);
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Trust Strip, Executive Intro, ESIGN Consent & Audit Trail
   ========================================================================== */
.trust-badges-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 11px 30px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.trust-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-badge-item svg {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.proposal-intro-box {
  padding: 16px 30px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.esign-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.esign-consent-row input[type="checkbox"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.audit-trail-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: left;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.audit-trail-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--border-subtle);
}

.audit-row:last-child {
  border-bottom: none;
}

.callout-hint {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.45;
}

/* ==========================================================================
   Below-the-Fold Studio Traction, ROI & FAQ Section (SEO)
   ========================================================================== */
.studio-traction-section {
  max-width: 1220px;
  margin: 34px auto 0;
  padding: 0 24px 36px;
}

.traction-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 24px;
}

.traction-head h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.traction-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.roi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 760px) {
  .roi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.roi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.roi-card h3 {
  font-size: 15.5px;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roi-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 16px;
}

.faq-item summary {
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text-primary);
}

.faq-item p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.studio-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 18px 24px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.studio-footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
}

/* ==========================================================================
   Buyer Interactive Stepper & Live Selection Strip
   ========================================================================== */
.buyer-nav-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 30px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.buyer-nav-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.buyer-nav-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.buyer-nav-pill:hover {
  border-color: var(--brand);
  color: var(--text-primary);
  background: var(--brand-soft);
}

[data-theme="dark"] .buyer-nav-pill:hover {
  background: var(--bg-elevated);
}

.buyer-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid rgba(15, 41, 74, 0.16);
  font-size: 12px;
  color: var(--brand);
}

[data-theme="dark"] .buyer-live-pill {
  background: rgba(200, 157, 60, 0.14);
  border-color: rgba(200, 157, 60, 0.35);
  color: #fde68a;
}

.buyer-live-total {
  font-size: 13px;
  font-weight: 800;
}

/* ==========================================================================
   Aesthetic Tier Card Service Previews & Add-On Pills
   ========================================================================== */
.tier-eyebrow {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tier-service-line {
  flex: 1;
  min-width: 0;
}

.tier-service-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.tier-service-head strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.tier-item-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.tier-service-note {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.38;
  margin-top: 2px;
}

.tier-scope-footnote {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.selection-summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--success-soft);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.selection-muted-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
}

.addon-meta-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.addon-cat-pill,
.addon-unit-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.addon-card.active .addon-cat-pill {
  background: rgba(5, 150, 105, 0.14);
  border-color: rgba(5, 150, 105, 0.28);
  color: var(--success);
}

/* ==========================================================================
   Section 3 — Detailed Services & Itemized Breakdown
   ========================================================================== */
.itemized-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
}

[data-theme="dark"] .itemized-tier-badge {
  background: rgba(200, 157, 60, 0.16);
  color: #fde68a;
}

.itemized-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.itemized-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.itemized-table thead th {
  text-align: left;
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.itemized-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-secondary);
}

.itemized-group-row td {
  background: rgba(15, 41, 74, 0.04);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  padding: 9px 16px;
}

[data-theme="dark"] .itemized-group-row td {
  background: rgba(255, 255, 255, 0.04);
}

.itemized-svc-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13px;
}

.itemized-svc-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.itemized-cat-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.itemized-cat-pill.accent {
  background: var(--success-soft);
  border-color: rgba(5, 150, 105, 0.25);
  color: var(--success);
}

.itemized-amt {
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.itemized-included-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

.itemized-adjust-row.is-savings td,
.itemized-adjust-row.is-savings .itemized-amt {
  color: var(--success);
}

.itemized-upgrade-row td {
  background: rgba(16, 185, 129, 0.03);
}

.itemized-empty-upgrade-row td {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 14px 16px;
}

.itemized-totals-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}

.itemized-total-chip {
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  min-width: 110px;
}

.itemized-total-chip span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.itemized-total-chip strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.itemized-total-chip.is-discount strong {
  color: var(--success);
}

.itemized-total-chip.is-grand {
  background: var(--brand);
  border-color: var(--brand);
}

.itemized-total-chip.is-grand span {
  color: rgba(255, 255, 255, 0.78);
}

.itemized-total-chip.is-grand strong {
  color: #ffffff;
  font-size: 15px;
}

.itemized-total-chip.is-deposit {
  border-color: var(--accent);
  background: rgba(200, 157, 60, 0.09);
}

@media (max-width: 679px) {
  .buyer-nav-strip {
    padding: 10px 16px;
  }
  .proposal-section,
  .proposal-intro-box,
  .trust-badges-bar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .itemized-table thead {
    display: none;
  }
  .itemized-table tbody tr {
    display: block;
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 12px;
  }
  .itemized-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    border-bottom: none;
    padding: 4px 0;
    text-align: right;
  }
  .itemized-table tbody td[data-label="Service & Scope"] {
    display: block;
    text-align: left;
    padding-bottom: 6px;
  }
  .itemized-table tbody td:not([data-label="Service & Scope"]):before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
  }
  .itemized-group-row td[colspan="4"],
  .itemized-empty-upgrade-row td {
    display: block;
    text-align: left;
  }
  .itemized-group-row td:before {
    display: none !important;
  }
  .itemized-totals-bar {
    justify-content: stretch;
  }
  .itemized-total-chip {
    flex: 1 1 44%;
  }
}

/* ==========================================================================
   Builder My Services Library & Per-Package Line Item Editor
   ========================================================================== */
.catalog-box {
  border-color: rgba(200, 157, 60, 0.4);
  background: linear-gradient(180deg, rgba(200, 157, 60, 0.05) 0%, var(--bg-subtle) 100%);
}

.catalog-form-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px;
  margin-bottom: 10px;
}

.catalog-empty {
  text-align: center;
  padding: 10px 6px 4px;
}

.catalog-empty p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 2px;
}

.catalog-item-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}

.catalog-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.catalog-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.catalog-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-secondary);
}

.catalog-item-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.catalog-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-subtle);
}

.line-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.line-item-editor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.line-item-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.line-item-top-row input {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.line-item-sum {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--brand);
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--brand-soft);
  white-space: nowrap;
}

[data-theme="dark"] .line-item-sum {
  background: rgba(200, 157, 60, 0.16);
  color: #fde68a;
}

.line-item-metrics-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 7px;
}

.line-item-metrics-4 {
  display: grid;
  grid-template-columns: 1.3fr 0.65fr 0.85fr 0.85fr;
  gap: 6px;
}

.line-item-editor-card input {
  padding: 6px 8px !important;
  font-size: 12px !important;
}

.legacy-bullets-details {
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
}

.legacy-bullets-details summary {
  cursor: pointer;
  font-weight: 600;
}

/* ==========================================================================
   Print / PDF Export Rules
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .topbar,
  .hero-banner,
  .mobile-mode-bar,
  .builder-pane,
  .preview-chrome-bar,
  .client-floating-bar,
  .buyer-nav-strip,
  .studio-traction-section,
  .studio-footer,
  .modal-backdrop,
  .toast-container,
  .no-print {
    display: none !important;
  }
  .studio-workspace,
  .preview-pane,
  .client-mode-wrapper {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
  }
  .proposal-sheet {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;
  }
  .tier-card,
  .addon-card,
  .itemized-card,
  .itemized-table tr,
  .itemized-totals-bar,
  .summary-box,
  .signature-box,
  .audit-trail-box {
    break-inside: avoid;
  }
}
