/* ===== Bosse & Partner — design tokens ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Colors */
  --color-ink: #191a36;
  --color-ink-2: #2c2d4d;
  --color-white: #ffffff;
  --color-grey-light: #f5f3f1;
  --color-grey-mid: #808080;
  --color-grey-line: #e4e1dd;
  --color-grey-dark: #4a4a4a;
  --color-accent-2: #7d82b8;
  --color-highlight: #ef626c;

  --surface-page: var(--color-white);
  --surface-section: var(--color-grey-light);
  --surface-card: var(--color-white);
  --surface-inverse: var(--color-ink);

  --text-heading: var(--color-ink);
  --text-body: var(--color-grey-mid);
  --text-body-strong: var(--color-grey-dark);
  --text-inverse: var(--color-white);
  --text-muted: #a9a9a9;

  --border-subtle: var(--color-grey-line);
  --border-strong: var(--color-ink);

  --accent: var(--color-ink);
  --accent-hover: var(--color-ink-2);
  --accent-contrast: var(--color-white);
  --accent-secondary: var(--color-accent-2);
  --accent-highlight: var(--color-highlight);

  --color-success: #2f6d4f;
  --color-error: #a13d3d;
  --color-warning: #9c7a2e;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --text-display: 56px;
  --text-h1: 40px;
  --text-h2: 30px;
  --text-h3: 22px;
  --text-body-lg: 18px;
  --text-body-md: 16px;
  --text-body-sm: 14px;
  --text-caption: 12px;

  --leading-tight: 1.15;
  --leading-heading: 1.25;
  --leading-body: 1.6;

  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;

  /* Spacing / radius / shadow / motion */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(25, 26, 54, 0.06), 0 4px 16px rgba(25, 26, 54, 0.06);
  --shadow-none: none;

  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-medium: 200ms;

  --content-max-width: 1120px;
  --border-width: 1px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-page);
  font-family: var(--font-sans);
  color: var(--text-body);
}

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

/* ===== Layout ===== */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--color-white);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { height: 20px; width: auto; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-nav { display: flex; align-items: center; gap: 4px; margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--border-subtle); height: 32px; }
.topbar-nav-item {
  font-family: var(--font-sans); font-size: 13px; font-weight: var(--weight-medium); color: var(--text-muted);
  background: none; border: none; cursor: pointer; padding: 6px 12px; border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.topbar-nav-item:hover { background: var(--color-grey-light); color: var(--text-body-strong); }
.topbar-nav-item.is-active { background: var(--accent); color: var(--accent-contrast); }

.page-content { padding-top: 56px; }
.page-content--no-topbar { padding-top: 0; }

.screen-admin-dashboard { max-width: var(--content-max-width); margin: 0 auto; padding: 48px 24px 96px; }
.screen-admin-create { max-width: 560px; margin: 0 auto; padding: 56px 24px 96px; }
.screen-640 { max-width: 640px; margin: 0 auto; padding: 56px 24px 96px; }
.screen-560-top { max-width: 560px; margin: 0 auto; padding: 80px 24px 96px; }

.h1 { font-size: var(--text-h1); font-weight: 600; color: var(--text-heading); margin: 0; letter-spacing: var(--tracking-tight); }
.h2 { font-size: var(--text-h2); font-weight: 600; color: var(--text-heading); margin: 0 0 8px; }
.h2-tight { font-size: var(--text-h2); font-weight: 600; color: var(--text-heading); margin: 0 0 12px; }
.h3 { font-size: var(--text-h3); font-weight: 600; color: var(--text-heading); margin: 0; }
.h3-section { font-size: var(--text-h3); font-weight: 600; color: var(--text-heading); margin: 0 0 8px; }

.p-body { font-size: var(--text-body-md); color: var(--text-body); margin: 0 0 16px; line-height: var(--leading-body); }
.p-body-tight8 { font-size: var(--text-body-md); color: var(--text-body); margin: 0 0 8px; line-height: var(--leading-body); }
.p-body-28 { font-size: var(--text-body-md); color: var(--text-body); margin: 0 0 28px; }
.p-body-32 { font-size: var(--text-body-md); color: var(--text-body); margin: 0 0 32px; }
.p-small { font-size: var(--text-body-sm); color: var(--text-body); margin: 0; }
.p-muted-sm { font-size: var(--text-body-sm); color: var(--text-muted); margin: 0; }
.p-label { font-size: var(--text-body-sm); font-weight: 600; color: var(--text-heading); margin: 0 0 12px; }
.p-label-0 { font-size: var(--text-body-sm); font-weight: 600; color: var(--text-heading); margin: 0; }

.hr { height: 1px; background: var(--border-subtle); margin: 20px 0; }
.hr-32 { height: 1px; background: var(--border-subtle); margin: 32px 0; }

.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.dash-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dash-card-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.dash-card-badge { text-align: right; }
.dash-card-footer { display: flex; justify-content: flex-end; margin-top: 12px; }

.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-14 { display: flex; flex-direction: column; gap: 14px; }

.participant-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  background: var(--surface-page);
}
.participant-row--plain {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.participant-row--review {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.participant-row-left { display: flex; align-items: center; gap: 10px; }
.participant-row-right { display: flex; align-items: center; gap: 8px; }
.participant-name { font-size: var(--text-body-sm); color: var(--text-body-strong); font-weight: 500; }
.participant-name-inline { font-size: var(--text-body-sm); color: var(--text-body-strong); font-weight: 500; }
.participant-email { font-size: var(--text-caption); color: var(--text-muted); }
.participant-email-inline { font-size: var(--text-caption); color: var(--text-muted); margin-left: 10px; }
.participant-status { font-size: var(--text-caption); color: var(--text-muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.answer-label { font-size: var(--text-caption); color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide); margin-bottom: 2px; }
.answer-value { font-size: var(--text-body-md); color: var(--text-body-strong); }

.form-stack { display: flex; flex-direction: column; gap: 20px; }
.form-actions { display: flex; gap: 12px; margin-top: 28px; }

.auth-error { color: var(--color-highlight); font-size: var(--text-body-sm); margin-top: 8px; }

.summary-grid { display: flex; flex-direction: column; gap: 16px; }
.summary-item-label { font-size: var(--text-caption); color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.summary-item-value { font-size: var(--text-body-md); color: var(--text-body-strong); }

/* Questionnaire screen */
.q-layout { display: flex; min-height: calc(100vh - 56px); }
.page-content--no-topbar .q-layout { min-height: 100vh; }
.q-video-panel {
  width: 50%; min-width: 0; flex-shrink: 0; position: relative; background: var(--color-ink); overflow: hidden;
}
.q-video-el { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-video-controls { position: absolute; top: 16px; right: 16px; display: flex; gap: 10px; }
.q-video-back-btn {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: var(--radius-pill);
  padding: 8px 14px; font-family: var(--font-sans); font-size: 13px; font-weight: var(--weight-medium);
  cursor: pointer; transition: background var(--duration-fast) var(--ease-standard);
}
.q-video-back-btn:hover { background: rgba(0,0,0,0.7); }
.q-video-sound-toggle, .q-video-replay-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: none; color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: background var(--duration-fast) var(--ease-standard);
}
.q-video-sound-toggle:hover, .q-video-replay-toggle:hover { background: rgba(0,0,0,0.7); }
.q-video-sound-toggle.is-muted { color: rgba(255,255,255,0.85); }
.q-video-replay-toggle.is-hidden { display: none; }
.q-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 24px 64px; }

@media (max-width: 768px) {
  .q-layout { flex-direction: column; }
  .q-video-panel { width: 100%; height: 40vh; min-height: 220px; }
}
.q-inner { width: 100%; max-width: 640px; flex: 1; display: flex; flex-direction: column; }
.q-top-fixed { flex-shrink: 0; }
.q-question-block { flex: 1; display: flex; flex-direction: column; justify-content: center; }

@keyframes qSlideOutUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-16px); opacity: 0; } }
@keyframes qSlideOutDown { from { transform: translateY(0); opacity: 1; } to { transform: translateY(16px); opacity: 0; } }
@keyframes qSlideInFromBelow { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes qSlideInFromAbove { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes qFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes qFadeIn { from { opacity: 0; } to { opacity: 1; } }
.q-question-block.q-anim-exit-up { animation: qSlideOutUp 180ms var(--ease-standard) forwards; }
.q-question-block.q-anim-exit-down { animation: qSlideOutDown 180ms var(--ease-standard) forwards; }
.q-question-block.q-anim-enter-up { animation: qSlideInFromBelow 260ms var(--ease-standard); }
.q-question-block.q-anim-enter-down { animation: qSlideInFromAbove 260ms var(--ease-standard); }
.q-video-panel.q-video-fade-out { animation: qFadeOut 180ms var(--ease-standard) forwards; }
.q-video-panel.q-video-fade-in { animation: qFadeIn 320ms var(--ease-standard); }
@media (prefers-reduced-motion: reduce) {
  .q-question-block.q-anim-exit-up, .q-question-block.q-anim-exit-down,
  .q-question-block.q-anim-enter-up, .q-question-block.q-anim-enter-down,
  .q-video-panel.q-video-fade-out, .q-video-panel.q-video-fade-in { animation: none; }
}
.q-badge-row { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.q-progress-track { height: 4px; background: var(--color-grey-line); border-radius: var(--radius-pill); overflow: hidden; margin-bottom: 8px; }
.q-progress-fill { height: 100%; background: var(--color-ink); border-radius: var(--radius-pill); }
.q-progress-text { font-size: var(--text-caption); color: var(--text-muted); margin: 0 0 28px; }
.q-strip { display: flex; justify-content: center; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.q-strip-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; }
.q-strip-circle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.q-strip-label { font-size: 11px; text-align: center; line-height: 1.2; }
.q-chapter-label { font-size: var(--text-caption); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide); margin-bottom: 10px; }
.q-heading { font-size: var(--text-h2); font-weight: 600; color: var(--text-heading); margin: 0 0 12px; line-height: var(--leading-heading); }
.q-desc { font-size: var(--text-body-md); color: var(--text-body); margin: 0 0 8px; line-height: var(--leading-body); }
.q-info-image { display: block; max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 16px 0; }
.q-link { font-size: var(--text-body-sm); color: var(--color-ink); text-decoration: underline; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.q-image-placeholder {
  width: 100%; height: 120px; background: var(--surface-section); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin: 12px 0;
  color: var(--text-muted); font-size: var(--text-body-sm);
}
.q-answer-area { margin: 20px 0 32px; }
.q-footer { display: flex; justify-content: space-between; }
.q-options { display: flex; flex-direction: column; gap: 12px; }
.q-option-wrap { cursor: pointer; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.q-upload-box { border: 1px dashed var(--border-subtle); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.q-upload-filename { font-size: var(--text-body-sm); color: var(--text-body-strong); font-weight: 500; }
.q-upload-empty { font-size: var(--text-body-sm); color: var(--text-muted); }

.q-textarea, .q-date-input {
  width: 100%; font-family: var(--font-sans); font-size: var(--text-body-md); color: var(--text-body-strong);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 12px 14px;
}
.q-textarea { resize: vertical; }

/* Kunde upload screen */
.upload-dropzone { border: 1px dashed var(--border-subtle); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.upload-manual-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.upload-manual-field { flex: 1; min-width: 160px; }

/* Status screen */
.status-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.status-list-header { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; }

/* ===== Design system components ===== */

.bp-btn {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard);
}
.bp-btn:disabled { cursor: not-allowed; opacity: 0.45; }
.bp-btn--sm { padding: 8px 16px; font-size: 14px; }
.bp-btn--md { padding: 12px 22px; font-size: 16px; }
.bp-btn--lg { padding: 15px 28px; font-size: 16px; }

.bp-btn--primary { background: var(--accent); color: var(--accent-contrast); }
.bp-btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.bp-btn--secondary { background: var(--surface-page); color: var(--text-heading); border-color: var(--border-strong); }
.bp-btn--secondary:hover:not(:disabled) { background: var(--color-grey-light); }
.bp-btn--ghost { background: transparent; color: var(--text-heading); }
.bp-btn--ghost:hover:not(:disabled) { background: var(--color-grey-light); }

.bp-card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); font-family: var(--font-sans); }
.bp-card--lg { padding: var(--space-6); }
.bp-card--sm { padding: var(--space-5); }

.bp-badge {
  display: inline-flex; align-items: center; font-family: var(--font-sans);
  font-size: 12px; font-weight: var(--weight-medium); padding: 4px 10px; border-radius: var(--radius-sm);
}
.bp-badge--neutral { background: var(--color-grey-light); color: var(--text-body-strong); }
.bp-badge--ink { background: var(--accent); color: var(--accent-contrast); }
.bp-badge--error { background: rgba(161, 61, 61, 0.1); color: var(--color-error); }

.bp-tag {
  display: inline-flex; align-items: center; font-family: var(--font-sans);
  font-size: 13px; font-weight: var(--weight-medium); padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle); color: var(--text-body-strong); background: var(--surface-page);
}

.bp-field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-sans); width: 100%; }
.bp-field-label { font-size: 13px; font-weight: var(--weight-medium); color: var(--text-heading); }
.bp-input, .bp-select {
  font-family: var(--font-sans); font-size: 15px; padding: 11px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle); background: var(--surface-page); color: var(--text-body-strong); outline: none;
  transition: border-color var(--duration-fast) var(--ease-standard);
  width: 100%;
}
.bp-input:focus, .bp-select:focus { border-color: var(--border-strong); }
.bp-input--error { border-color: var(--color-error); }
.bp-field-error { font-size: 12px; color: var(--color-error); }
.bp-select:invalid, .bp-select.is-empty { color: var(--text-muted); }

.bp-checkbox, .bp-radio {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-sans); cursor: pointer;
}
.bp-checkbox-box {
  width: 18px; height: 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: var(--surface-page); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bp-checkbox.is-checked .bp-checkbox-box { border-color: var(--accent); background: var(--accent); }
.bp-radio-box {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bp-radio.is-checked .bp-radio-box { border-color: var(--accent); }
.bp-radio-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.bp-checkbox-label, .bp-radio-label { font-size: 14px; color: var(--text-body-strong); }

.bp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-subtle); font-family: var(--font-sans); }
.bp-tab {
  background: none; border: none; cursor: pointer; padding: 10px 16px; font-size: 14px; font-weight: var(--weight-medium);
  color: var(--text-body); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--duration-fast) var(--ease-standard);
}
.bp-tab.is-active { font-weight: var(--weight-semibold); color: var(--text-heading); border-bottom-color: var(--accent); }

.bp-dialog-overlay {
  position: fixed; inset: 0; background: rgba(25,26,54,0.35);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-sans); z-index: 300;
}
.bp-dialog { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-6); width: 480px; max-width: 90%; }
.bp-dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.bp-dialog-title { font-size: 18px; font-weight: 600; color: var(--text-heading); }
.bp-dialog-close { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--text-body); }

.bp-toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; animation: toastIn 200ms var(--ease-standard); }
.bp-toast {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-size: 14px; color: #fff;
  background: var(--color-ink); border-radius: var(--radius-md); padding: 12px 16px; box-shadow: var(--shadow-card);
  max-width: 360px;
}
.bp-toast--info { border-left: 3px solid var(--accent); }
.bp-toast--success { border-left: 3px solid var(--color-success); }
.bp-toast--error { border-left: 3px solid var(--color-error); }

/* ===== E-Mail preview / log ===== */

.email-body-preview { white-space: pre-line; font-size: var(--text-body-md); color: var(--text-body-strong); line-height: var(--leading-body); }
.email-preview-subject { font-size: var(--text-body-sm); font-weight: 600; color: var(--text-heading); margin-bottom: 6px; }

.email-log-entry { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 12px 14px; }
.email-log-meta { display: flex; align-items: center; gap: 8px; font-size: var(--text-caption); color: var(--text-muted); margin-bottom: 6px; }
.email-log-meta .email-log-at { margin-left: auto; }
.email-log-subject { font-size: var(--text-body-sm); font-weight: 600; color: var(--text-heading); margin-bottom: 4px; }
.email-log-error { font-size: var(--text-body-sm); color: var(--color-error); margin-bottom: 6px; }
.email-log-body { font-size: var(--text-body-sm); color: var(--text-body); white-space: pre-line; line-height: var(--leading-body); }

/* ===== Scenario builder ===== */

.scenario-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-page);
}
.scenario-card-name { font-size: var(--text-body-md); font-weight: 600; color: var(--text-heading); }
.scenario-card-meta { font-size: var(--text-caption); color: var(--text-muted); margin-top: 2px; }
.scenario-card-actions { display: flex; gap: 8px; }

.builder-name-row { max-width: 420px; }
.builder-save-status { display: block; margin-top: 6px; font-size: var(--text-caption); color: var(--text-muted); min-height: 16px; }
.builder-save-status--error { color: var(--color-error); }

.drag-handle { cursor: grab; color: var(--text-muted); font-size: 16px; flex-shrink: 0; user-select: none; }
.is-dragging { opacity: 0.4; }
.dnd-over { outline: 2px dashed var(--color-ink); outline-offset: 2px; }

.builder-chapter-header {
  display: flex; align-items: center; gap: 10px; cursor: grab;
}
.builder-chapter-header .bp-field { flex: 1; }
.builder-chapter-count { font-size: var(--text-caption); color: var(--text-muted); white-space: nowrap; }
.builder-icon-select { max-width: 120px; }

.builder-question-item { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-page); }
.builder-row-summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: grab;
}
.builder-row-title { font-size: var(--text-body-sm); font-weight: 500; color: var(--text-body-strong); }
.builder-row-badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--text-muted); background: var(--color-grey-light); border-radius: var(--radius-sm); padding: 2px 8px;
}
.builder-row-badge--required { color: var(--color-error); background: rgba(161, 61, 61, 0.1); }
.builder-row-badge--cond { color: var(--color-ink); background: rgba(25, 26, 54, 0.08); }
.builder-row-spacer { flex: 1; }

.builder-question-form { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border-subtle); }
.builder-field-row--split { display: flex; gap: 14px; align-items: flex-start; }
.builder-field-row--split > * { flex: 1; min-width: 0; }
.builder-field-row--split3 { display: flex; gap: 10px; align-items: flex-start; }
.builder-field-row--split3 > * { flex: 1; min-width: 0; }
.builder-inline-checkbox { display: flex; align-items: flex-end; padding-bottom: 11px; }
.builder-checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-body-sm); color: var(--text-body-strong); cursor: pointer; }

.builder-condition-box { border: 1px dashed var(--border-subtle); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.builder-condition-title { font-size: var(--text-caption); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.builder-condition-rules { display: flex; flex-direction: column; gap: 10px; }
.builder-condition-rule { display: flex; gap: 10px; align-items: flex-end; padding-bottom: 10px; border-bottom: 1px dashed var(--border-subtle); }
.builder-condition-rule:last-child { border-bottom: none; padding-bottom: 0; }
.builder-condition-rule > .builder-field-row--split3 { flex: 1; }
.builder-showif-novalue { display: block; padding: 8px 0; }

.builder-token-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.builder-token-chips-label { font-size: var(--text-caption); color: var(--text-muted); margin-right: 4px; }
.builder-token-chips--scenario { padding-top: 8px; border-top: 1px dashed var(--border-subtle); }
.builder-email-preview { margin-top: 14px; padding: 12px 14px; background: var(--surface-section); border-radius: var(--radius-md); }
.builder-email-preview-label { font-size: var(--text-caption); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide); margin-bottom: 8px; }

.builder-icon-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.builder-icon-picker-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-subtle); background: var(--color-white);
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0;
  transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.builder-icon-picker-btn:hover { border-color: var(--color-ink); }
.builder-icon-picker-btn.is-active { background: var(--color-ink); border-color: var(--color-ink); }

.builder-video-upload-box { padding: 16px; }
.builder-video-upload-actions { display: flex; gap: 8px; margin-top: 10px; }
.builder-video-upload-progress { margin-top: 10px; height: 6px; background: var(--color-grey-line); border-radius: var(--radius-pill); overflow: hidden; }
.builder-video-upload-progress-bar { height: 100%; width: 0%; background: var(--color-ink); transition: width var(--duration-fast) var(--ease-standard); }

.email-trigger-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.email-trigger-title { font-size: var(--text-body-md); font-weight: 600; color: var(--text-heading); }
.email-trigger-actions { display: flex; gap: 8px; flex-shrink: 0; }
.email-trigger-info { font-size: var(--text-body-sm); color: var(--text-muted); background: var(--surface-section); padding: 8px 12px; border-radius: var(--radius-md); margin: 10px 0 0; }
.email-trigger-warning { font-size: var(--text-body-sm); color: var(--color-error); background: rgba(161, 61, 61, 0.08); padding: 8px 12px; border-radius: var(--radius-md); margin: 10px 0 0; }
.email-trigger-warning code { font-family: monospace; background: rgba(161, 61, 61, 0.12); padding: 1px 4px; border-radius: 3px; }
