/* ═══════════════════════════════════════════════════════════
   FormBuilder — style.css
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; color: #111827; background: #f9fafb; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* ── Utilities ────────────────────────────────────────────── */
.hidden         { display: none !important; }
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.gap-2          { gap: 0.5rem; }
.gap-4          { gap: 1rem; }
.items-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.mt-2           { margin-top: 0.5rem; }
.mt-4           { margin-top: 1rem; }
.mb-6           { margin-bottom: 1.5rem; }
.py-8           { padding-top: 2rem; padding-bottom: 2rem; }
.py-16          { padding-top: 4rem; padding-bottom: 4rem; }
.text-center    { text-align: center; }
.text-sm        { font-size: 0.875rem; }
.text-xs        { font-size: 0.75rem; }
.text-gray-400  { color: #9ca3af; }
.text-gray-500  { color: #6b7280; }
.text-gray-600  { color: #4b5563; }
.text-red-600   { color: #dc2626; }
.font-medium    { font-weight: 500; }
.font-bold      { font-weight: 700; }
.inline-flex    { display: inline-flex; }
.inline-block   { display: inline-block; }
.max-w-2xl      { max-width: 42rem; margin-left: auto; margin-right: auto; }
.bg-indigo-50   { background: #eef2ff; }

/* ── Container ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar       { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
.navbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.navbar-brand { font-weight: 700; font-size: 1.125rem; color: #4f46e5; }
.navbar-links { display: flex; gap: 0.25rem; flex: 1; }
.navbar-user  { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.nav-link     { padding: 0.375rem 0.75rem; border-radius: 6px; font-size: 0.875rem; color: #374151; transition: background 0.15s; }
.nav-link:hover, .nav-link.active { background: #f3f4f6; color: #111827; }
.nav-name     { font-size: 0.875rem; font-weight: 500; color: #374151; }

/* ── Avatar ───────────────────────────────────────────────── */
.avatar             { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-xs          { width: 24px; height: 24px; }
.avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; background: #6366f1; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; }
.settings-avatar         { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.settings-avatar-placeholder { width: 72px; height: 72px; border-radius: 50%; background: #6366f1; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; font-weight: 700; }
.settings-avatar-row    { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }

/* ── Main content ─────────────────────────────────────────── */
.main-content   { min-height: calc(100vh - 60px); }
.site-footer    { border-top: 1px solid #e5e7eb; padding: 1.5rem 0; margin-top: 3rem; }

/* ── Page header ──────────────────────────────────────────── */
.page-header    { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.5rem; }
.page-title     { font-size: 1.5rem; font-weight: 700; color: #111827; }
.page-subtitle  { color: #6b7280; font-size: 0.875rem; margin-top: 0.25rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn           { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.875rem; font-weight: 500; cursor: pointer; border: none; transition: all 0.15s; white-space: nowrap; }
.btn-full      { width: 100%; justify-content: center; }
.btn-sm        { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-xs        { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-primary   { background: #4f46e5; color: #fff; }
.btn-primary:hover   { background: #4338ca; }
.btn-danger    { background: #dc2626; color: #fff; }
.btn-danger:hover    { background: #b91c1c; }
.btn-success   { background: #16a34a; color: #fff; }
.btn-success:hover   { background: #15803d; }
.btn-outline   { background: transparent; color: #374151; border: 1px solid #d1d5db; }
.btn-outline:hover   { background: #f9fafb; border-color: #9ca3af; }
.icon-btn      { background: none; border: none; cursor: pointer; padding: 0.25rem; color: #6b7280; border-radius: 4px; transition: all 0.15s; }
.icon-btn:hover      { background: #f3f4f6; color: #111827; }
.icon-btn-danger:hover { color: #dc2626; }
.btn-icon-xs   { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 0.75rem; padding: 0 0.25rem; }
.btn-icon-xs:hover { color: #dc2626; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group    { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.375rem; }
.form-input    { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #111827; transition: border-color 0.15s; }
.form-input:focus  { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-input:disabled { background: #f9fafb; color: #9ca3af; }
.form-input-sm { padding: 0.375rem 0.625rem; font-size: 0.875rem; }
.form-input-xs { width: 64px; padding: 0.25rem 0.375rem; font-size: 0.8125rem; }
textarea.form-input { resize: vertical; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.file-upload-btn { display: inline-flex; align-items: center; padding: 0.375rem 0.75rem; border: 1px solid #d1d5db; border-radius: 6px; cursor: pointer; font-size: 0.8125rem; color: #374151; background: #f9fafb; }
.file-upload-btn:hover { background: #f3f4f6; }
.file-upload-btn input[type=file] { display: none; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert         { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.875rem; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── Badges ───────────────────────────────────────────────── */
.badge         { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-green   { background: #dcfce7; color: #166534; }
.badge-gray    { background: #f3f4f6; color: #374151; }
.badge-blue    { background: #dbeafe; color: #1e40af; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-xs      { font-size: 0.65rem; padding: 0.1rem 0.4rem; }

/* ── Cards ────────────────────────────────────────────────── */
.card          { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 1.5rem; }
.card-title    { font-size: 1rem; font-weight: 600; color: #111827; margin-bottom: 1rem; }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-page     { min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card     { background: #fff; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.auth-logo     { text-align: center; margin-bottom: 2rem; }
.auth-logo h1  { font-size: 1.75rem; font-weight: 800; color: #4f46e5; }
.auth-logo p   { color: #6b7280; margin-top: 0.25rem; font-size: 0.9rem; }
.auth-form     { display: flex; flex-direction: column; gap: 1rem; }
.auth-footer   { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: #6b7280; }
.auth-footer a { color: #4f46e5; font-weight: 500; }

/* ── Dashboard grid ───────────────────────────────────────── */
.forms-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.form-card     { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; overflow: hidden; transition: box-shadow 0.2s; }
.form-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.form-card-header { padding: 0.875rem 1rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5e7eb; }
.form-card-body   { padding: 1rem; }
.form-card-footer { padding: 0.75rem 1rem; border-top: 1px solid #e5e7eb; display: flex; gap: 0.5rem; }
.form-card-title  { font-weight: 600; font-size: 0.9375rem; color: #111827; }
.form-card-title a:hover { color: #4f46e5; }
.form-card-meta   { font-size: 0.8125rem; color: #6b7280; margin-top: 0.375rem; }
.form-card-creator { font-size: 0.8125rem; color: #4f46e5; font-weight: 500; margin-top: 0.25rem; }
.form-card-actions { display: flex; gap: 0.25rem; }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state   { text-align: center; padding: 4rem 1rem; }
.empty-icon    { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.empty-state p  { color: #6b7280; margin-bottom: 1.5rem; }

/* ── Modal ────────────────────────────────────────────────── */
.modal         { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-box     { position: relative; background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 480px; box-shadow: 0 25px 60px rgba(0,0,0,0.3); }
.modal-title   { font-size: 1.125rem; font-weight: 700; margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ── Question type grid (modal) ───────────────────────────── */
.question-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.question-type-btn  { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.25rem 0.5rem; border-radius: 10px; border: 2px solid #e5e7eb; background: #fff; cursor: pointer; transition: all 0.15s; }
.question-type-btn:hover { border-color: #6366f1; background: #eef2ff; }
.type-icon          { font-size: 1.5rem; }
.type-label         { font-size: 0.75rem; font-weight: 500; color: #374151; text-align: center; }

/* ── Stats ────────────────────────────────────────────────── */
.stats-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card     { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 1.25rem; text-align: center; }
.stat-number   { font-size: 2rem; font-weight: 700; color: #4f46e5; }
.stat-label    { font-size: 0.8125rem; color: #6b7280; margin-top: 0.25rem; }

/* ── Results ──────────────────────────────────────────────── */
.results-section { margin-bottom: 2.5rem; }
.section-title   { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.charts-grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.chart-card      { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 1.25rem; }
.chart-header    { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.chart-num       { background: #4f46e5; color: #fff; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 700; flex-shrink: 0; }
.chart-title     { font-size: 0.9375rem; font-weight: 600; }
.chart-wrapper   { position: relative; }
.text-responses  { max-height: 200px; overflow-y: auto; }
.text-response-item { padding: 0.5rem; background: #f9fafb; border-radius: 6px; font-size: 0.875rem; margin-bottom: 0.375rem; color: #374151; }
.text-muted      { color: #9ca3af; font-size: 0.875rem; }

/* ── Tables ───────────────────────────────────────────────── */
.table-container { overflow-x: auto; border-radius: 12px; border: 1px solid #e5e7eb; }
.data-table      { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.875rem; }
.data-table th   { padding: 0.75rem 1rem; text-align: left; font-weight: 600; color: #374151; background: #f9fafb; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.data-table td   { padding: 0.75rem 1rem; border-bottom: 1px solid #f3f4f6; color: #374151; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f9fafb; }

/* ── Toggle ───────────────────────────────────────────────── */
.toggle         { position: relative; width: 44px; height: 24px; display: inline-block; flex-shrink: 0; }
.toggle input   { opacity: 0; width: 0; height: 0; }
.toggle-slider  { position: absolute; inset: 0; background: #d1d5db; border-radius: 24px; cursor: pointer; transition: background 0.2s; }
.toggle-slider::before { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.toggle input:checked + .toggle-slider { background: #4f46e5; }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Share page ───────────────────────────────────────────── */
.share-status-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.share-link-row   { display: flex; gap: 0.5rem; }
.share-link-row input { flex: 1; }

/* ── Workspace ────────────────────────────────────────────── */
.workspaces-list  { display: flex; flex-direction: column; gap: 1rem; }
.workspace-card   { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 1.25rem; }
.workspace-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.375rem; }
.workspace-name   { font-weight: 600; font-size: 1.0625rem; }
.workspace-meta   { font-size: 0.8125rem; color: #6b7280; margin-bottom: 0.75rem; }
.workspace-actions { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.members-list     { border-top: 1px solid #f3f4f6; padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.375rem; }
.member-row       { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.member-name      { flex: 1; color: #374151; }

/* ── Builder layout ───────────────────────────────────────── */
.builder-layout   { display: flex; height: calc(100vh - 60px); overflow: hidden; }
.builder-sidebar  { width: 260px; background: #fff; border-right: 1px solid #e5e7eb; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header   { padding: 1rem; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; }
.sidebar-title    { font-weight: 600; font-size: 0.9375rem; }
.question-list    { flex: 1; overflow-y: auto; padding: 0.5rem; }
.question-list-item { padding: 0.625rem 0.75rem; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; border: 1px solid transparent; font-size: 0.875rem; color: #374151; user-select: none; }
.question-list-item:hover { background: #f9fafb; border-color: #e5e7eb; }
.question-list-item.active { background: #eef2ff; border-color: #c7d2fe; color: #4f46e5; }
.question-list-item .drag-handle { color: #9ca3af; cursor: grab; }
.question-list-item .q-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.question-list-item .q-del { color: #9ca3af; visibility: hidden; }
.question-list-item:hover .q-del { visibility: visible; }
.builder-canvas   { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.builder-topbar   { padding: 0.875rem 1.5rem; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 1rem; background: #fff; }
.builder-title-input { font-size: 1rem; font-weight: 600; border: none; outline: none; flex: 1; color: #111827; padding: 0.25rem 0; background: transparent; }
.builder-title-input:focus { border-bottom: 2px solid #6366f1; }
.builder-toolbar  { display: flex; align-items: center; gap: 0.5rem; }
.autosave-indicator { font-size: 0.75rem; color: #9ca3af; }
.autosave-indicator.saving { color: #f59e0b; }
.autosave-indicator.saved  { color: #16a34a; }
.question-editor  { flex: 1; overflow-y: auto; padding: 2rem; }
.editor-empty-state { text-align: center; color: #9ca3af; padding: 4rem; }
.q-editor-card    { background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 1.5rem; max-width: 640px; margin: 0 auto; }
.q-type-badge     { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 6px; background: #eef2ff; color: #4f46e5; font-size: 0.75rem; font-weight: 600; margin-bottom: 1rem; }
.options-list     { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.option-row       { display: flex; align-items: center; gap: 0.5rem; }
.option-row input { flex: 1; }
.rating-preview   { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.rating-preview span { width: 36px; height: 36px; border-radius: 6px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; color: #374151; border: 1px solid #e5e7eb; }
.yes-no-preview   { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.yes-no-preview .opt { padding: 0.625rem 1.25rem; border-radius: 8px; border: 2px solid #e5e7eb; font-weight: 600; color: #374151; }

/* Builder config panel */
.builder-config   { width: 280px; background: #fff; border-left: 1px solid #e5e7eb; overflow-y: auto; flex-shrink: 0; }
.config-tabs      { display: flex; border-bottom: 1px solid #e5e7eb; }
.tab-btn          { flex: 1; padding: 0.75rem; font-size: 0.875rem; font-weight: 500; border: none; background: none; cursor: pointer; color: #6b7280; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab-btn.active   { color: #4f46e5; border-bottom-color: #4f46e5; background: #f9fafb; }
.tab-panel        { padding: 1rem; }
.config-section   { margin-bottom: 1.25rem; }
.config-label     { display: block; font-size: 0.8125rem; font-weight: 600; color: #374151; margin-bottom: 0.375rem; }
.config-label-sm  { font-size: 0.75rem; color: #6b7280; width: 64px; flex-shrink: 0; }
.color-picker     { height: 36px; border-radius: 6px; border: 1px solid #d1d5db; cursor: pointer; padding: 2px; width: 100%; }
.typo-row         { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.typo-row input[type=color] { width: 32px; height: 32px; border-radius: 4px; border: 1px solid #d1d5db; cursor: pointer; padding: 1px; }
.slug-preview     { display: flex; flex-direction: column; gap: 0.25rem; }
.slug-base        { font-size: 0.75rem; color: #9ca3af; word-break: break-all; }

/* ── Public renderer ──────────────────────────────────────── */
:root { --accent: #6366f1; --renderer-bg: #f9fafb; }
.renderer-page    { min-height: 100vh; background: var(--renderer-bg); font-family: var(--font-family, Inter, sans-serif); display: flex; flex-direction: column; }
.preview-banner   { background: #f59e0b; color: #fff; text-align: center; padding: 0.5rem; font-weight: 600; font-size: 0.875rem; }
.progress-bar-container { height: 4px; background: #e5e7eb; }
.progress-bar     { height: 100%; transition: width 0.4s ease; }
.renderer-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.renderer-stage   { width: 100%; max-width: 680px; }
.renderer-card    { background: rgba(255,255,255,0.95); border-radius: 16px; padding: 2.5rem; box-shadow: 0 8px 40px rgba(0,0,0,0.1); }
.renderer-title   { font-size: var(--title-size, 28px); color: var(--title-color, #111827); font-weight: 700; margin-bottom: 1rem; line-height: 1.3; }
.renderer-body    { font-size: var(--body-size, 16px); color: var(--body-color, #374151); margin-bottom: 1.5rem; line-height: 1.7; }
.renderer-label   { display: block; font-size: var(--body-size, 16px); color: var(--body-color, #374151); font-weight: 500; margin-bottom: 0.375rem; }
.renderer-input   { width: 100%; padding: 0.75rem; border-radius: 8px; border: 2px solid #e5e7eb; font-size: var(--body-size, 16px); background: #fff; transition: border-color 0.15s; }
.renderer-input:focus { outline: none; border-color: var(--accent); }
.renderer-btn     { display: block; width: 100%; padding: 0.875rem; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; border-radius: var(--btn-radius, 8px); background: var(--accent); color: var(--btn-text, #fff); text-align: center; margin-top: 1.5rem; transition: opacity 0.15s; }
.renderer-btn:hover { opacity: 0.9; }
.renderer-btn-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.renderer-btn-outline:hover { background: var(--accent); color: #fff; }
.renderer-nav     { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; max-width: 680px; width: 100%; }
.renderer-options { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 1rem; }
.renderer-option  { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; border: 2px solid #e5e7eb; border-radius: 10px; cursor: pointer; transition: all 0.2s; font-size: var(--option-size, 16px); color: var(--option-color, #374151); background: #fff; }
.renderer-option:hover       { border-color: var(--accent); background: #fafafa; }
.renderer-option.selected    { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, white); }
.renderer-option .opt-letter { width: 28px; height: 28px; border-radius: 6px; border: 2px solid #d1d5db; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.renderer-option.selected .opt-letter { border-color: var(--accent); background: var(--accent); color: #fff; }
.renderer-rating  { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.renderer-star    { width: 52px; height: 52px; border-radius: 8px; border: 2px solid #e5e7eb; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 700; cursor: pointer; transition: all 0.2s; color: #6b7280; }
.renderer-star:hover, .renderer-star.selected { border-color: var(--accent); background: var(--accent); color: #fff; }
.renderer-yes-no  { display: flex; gap: 1rem; margin-top: 1rem; }
.renderer-yn-btn  { flex: 1; padding: 1rem; border: 2px solid #e5e7eb; border-radius: 12px; text-align: center; font-size: 1.125rem; font-weight: 600; cursor: pointer; transition: all 0.2s; background: #fff; }
.renderer-yn-btn:hover, .renderer-yn-btn.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, white); color: var(--accent); }
.renderer-dropdown { width: 100%; padding: 0.75rem; border-radius: 8px; border: 2px solid #e5e7eb; font-size: var(--option-size, 16px); margin-top: 0.75rem; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 0.75rem center; }
.renderer-dropdown:focus { outline: none; border-color: var(--accent); }
.renderer-textarea { width: 100%; padding: 0.75rem; border-radius: 8px; border: 2px solid #e5e7eb; font-size: var(--option-size, 16px); margin-top: 0.75rem; min-height: 100px; resize: vertical; }
.renderer-textarea:focus { outline: none; border-color: var(--accent); }
.renderer-rating-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: #9ca3af; margin-top: 0.375rem; }
.intro-logo       { max-height: 80px; margin: 0 auto 1.5rem; object-fit: contain; }
.completed-icon   { font-size: 4rem; margin-bottom: 1rem; }
.question-anim-enter { animation: fadeSlideIn 0.3s ease both; }
@keyframes fadeSlideIn { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .builder-layout { flex-direction: column; height: auto; }
  .builder-sidebar { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid #e5e7eb; }
  .builder-config { width: 100%; border-left: none; border-top: 1px solid #e5e7eb; }
  .forms-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar-links { display: none; }
  .renderer-card { padding: 1.5rem; }
  .renderer-nav { padding: 0 0.5rem; }
  .question-type-grid { grid-template-columns: repeat(2, 1fr); }
}
