/* ============================================================
   QUIZ.CSS — Premium Luxury Minimal Client Questionnaire
   ITF Huwiya Arabic · Clean White · Soft Shadows · Elegant
   ============================================================ */

/* ─── Custom Font: ITF Huwiya Arabic ─────────────────────── */
@font-face {
  font-family: "itf Huwiya Arabic Regular";
  src: url("/assets/fonts/itfHuwiyaArabic") format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "itf Huwiya Arabic Medium";
  src: url("/assets/fonts/itfHuwiyaArabic2") format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "itf Huwiya Arabic Bold";
  src: url("/assets/fonts/itfHuwiyaArabic 3") format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
  /* Typography */
  --font-en:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ar:      'itf Huwiya Arabic Regular', 'itf Huwiya Arabic Medium', 'itf Huwiya Arabic Bold', 'Inter', sans-serif;

  /* Colors */
  --primary:      #111827;
  --primary-hover: #1F2937;
  --accent:       #111827;
  --accent-soft:  rgba(17, 24, 39, .04);
  --accent-light: #F3F4F6;

  --bg:           #FAFBFC;
  --surface:      #FFFFFF;
  --border:       #F0F1F3;
  --border-hover: #D1D5DB;
  --border-focus: #111827;

  --text:         #111827;
  --text-sub:     #4B5563;
  --text-muted:   #9CA3AF;
  --text-hint:    #D1D5DB;

  --error:        #EF4444;
  --error-bg:     #FEF2F2;
  --error-soft:   #FCA5A5;
  --success:      #059669;
  --success-bg:   #ECFDF5;

  --radius:       20px;
  --radius-md:    16px;
  --radius-sm:    12px;
  --radius-xs:    8px;
  --radius-full:  9999px;

  --shadow-card:  0 1px 3px rgba(0,0,0,.02), 0 4px 24px rgba(0,0,0,.04);
  --shadow-float: 0 8px 32px rgba(0,0,0,.08);
  --shadow-input: 0 0 0 3px rgba(17,24,39,.04);
  --shadow-soft:  0 1px 2px rgba(0,0,0,.02);

  --ease:         cubic-bezier(.4, 0, .2, 1);
  --ease-spring:  cubic-bezier(.34, 1.56, .64, 1);
  --header-h:     60px;
  --footer-h:     76px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── Body ───────────────────────────────────────────────── */
.quiz-body {
  font-family: var(--font-en);
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ─── Arabic Text ────────────────────────────────────────── */
[dir="rtl"],
.step-description-ar,
.field-label-ar,
.slider-label-ar,
.logo-type-ar,
.welcome-time {
  font-family: var(--font-ar);
}

/* ─── STICKY HEADER ──────────────────────────────────────── */
.quiz-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,.04);
  z-index: 100;
  transition: box-shadow .3s var(--ease);
}
.quiz-header.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.quiz-header-inner {
  max-width: 820px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz-header-brand {
  font-family: var(--font-ar);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: .7;
}

/* Progress bar — thin elegant */
.quiz-header-center {
  flex: 1;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.quiz-header-progress {
  width: 100%;
  height: 2px;
  background: #EBEDF0;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.quiz-header-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width .6s var(--ease);
}

.quiz-header-step {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .04em;
  font-weight: 400;
}
.quiz-header-step strong {
  color: var(--text);
  font-weight: 600;
}

/* Autosave indicator */
.quiz-header-save {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .2s;
}
.quiz-header-save.autosave-saving { color: var(--text-sub); }
.quiz-header-save.autosave-saved  { color: var(--success); }
.quiz-header-save.autosave-error  { color: var(--error); }
.quiz-header-save.autosave-offline { color: #F59E0B; }

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.quiz-main {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: calc(var(--footer-h) + 40px);
  min-height: 100vh;
}

.quiz-container {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── STEP PANELS (transitions) ──────────────────────────── */
.quiz-step {
  display: none;
  opacity: 0;
}
.quiz-step.active {
  display: block;
  animation: stepFadeIn .5s var(--ease) forwards;
}
.quiz-step.slide-back {
  animation: stepFadeInBack .45s var(--ease) forwards;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes stepFadeInBack {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── STEP CARD ──────────────────────────────────────────── */
.step-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 44px 40px;
  margin-bottom: 14px;
}

/* Welcome step */
.step-card--welcome {
  text-align: center;
  padding: 64px 40px 56px;
}

/* ─── STEP HEADER (inside card) ──────────────────────────── */
.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 5px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.step-title {
  font-family: var(--font-ar);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -.3px;
  margin-bottom: 10px;
}

.step-description {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 460px;
}
.step-card--welcome .step-description { margin: 0 auto; }

/* ─── STEP BODY (form fields) ────────────────────────────── */
.step-fields {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Inline fields inside card */
.step-card .step-fields-inline {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ─── FORM FIELDS ─────────────────────────────────────────── */
.quiz-field { display: flex; flex-direction: column; gap: 6px; }

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

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.required-star { color: var(--error); margin-right: 2px; font-weight: 400; }
.field-hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: -2px;
}
.field-hint-inline {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Input fields */
.field-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: all .25s var(--ease);
  appearance: none;
}
.field-input::placeholder { color: var(--text-hint); }
.field-input:hover { border-color: var(--border-hover); }
.field-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: var(--shadow-input);
}

/* Textarea */
.field-textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.65;
  border-radius: var(--radius-sm);
}

/* Select */
.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%239CA3AF'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ─── Error States (Soft, not aggressive) ────────────────── */
.field-error {
  font-size: 12px;
  color: var(--error);
  display: none;
  line-height: 1.4;
  padding: 6px 12px;
  background: var(--error-bg);
  border-radius: var(--radius-xs);
  border: 1px solid rgba(239, 68, 68, .1);
}
.field-error.visible { display: block; }
.field-input.has-error {
  border-color: var(--error-soft);
  background: #FFFBFB;
  box-shadow: 0 0 0 3px rgba(239,68,68,.04);
}

/* ─── CHECKBOX ───────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

/* ─── PREMIUM SLIDERS — Luxury Thin ──────────────────────── */
.slider-field { gap: 14px; }
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
}
.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Thin elegant slider */
.quiz-slider {
  flex: 1;
  height: 4px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.quiz-slider:focus { outline: none; }

/* Slider track — thin line */
.quiz-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--slider-pct, 50%),
    #E5E7EB var(--slider-pct, 50%),
    #E5E7EB 100%
  );
  border-radius: var(--radius-full);
  transition: background .15s;
}
.quiz-slider::-moz-range-track {
  height: 4px;
  background: #E5E7EB;
  border-radius: var(--radius-full);
  border: none;
}
.quiz-slider::-moz-range-progress {
  height: 4px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Slider thumb — refined */
.quiz-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  margin-top: -7px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: all .2s var(--ease);
}
.quiz-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(17, 24, 39, .2);
}
.quiz-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.slider-value-badge {
  min-width: 38px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ─── STYLE CARDS (Visual Direction) ─────────────────────── */
.style-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px 16px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .25s var(--ease);
  position: relative;
}
.style-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}
.style-card.selected {
  border-color: var(--primary);
  background: #F9FAFB;
  box-shadow: 0 0 0 1px var(--primary);
}
.style-card input { display: none; }
.style-card-icon { font-size: 28px; color: var(--text-muted); transition: color .2s; }
.style-card.selected .style-card-icon { color: var(--primary); }
.style-card strong { font-size: 13px; font-weight: 600; color: var(--text); }
.style-card small  { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.style-card .check-mark {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.style-card.selected .check-mark { display: flex; }

/* ─── TAG CHIPS (Deliverables, Usage) ────────────────────── */
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
  user-select: none;
}
.tag-chip:hover {
  border-color: var(--border-hover);
  background: #F9FAFB;
  transform: translateY(-1px);
}
.tag-chip.selected {
  border-color: var(--primary);
  color: var(--primary);
  background: #F3F4F6;
  font-weight: 500;
}
.tag-chip input { display: none; }
.tag-chip i { font-size: 16px; opacity: .7; }

/* ─── FILE UPLOAD / DROPZONE ─────────────────────────────── */
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .25s var(--ease);
  background: var(--bg);
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--primary);
  background: var(--accent-soft);
}
.dropzone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dropzone-prompt i   { font-size: 28px; color: var(--text-muted); }
.dropzone-prompt span { font-size: 14px; color: var(--text-sub); font-weight: 500; }
.dropzone-prompt small { font-size: 12px; color: var(--text-muted); }

.dropzone-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-sub);
}
.dropzone-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1;
  padding: 0 4px;
  transition: color .15s;
}
.dropzone-remove:hover { color: var(--error); }

/* Compact dropzones (references row) */
.upload-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}
.dropzone-compact {
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 80px;
}
.dropzone-plus { font-size: 22px; color: var(--text-muted); }
.dropzone-compact-label { font-size: 11px; color: var(--text-muted); }

/* Upload progress */
.dropzone-progress {
  height: 2px;
  background: #E5E7EB;
  border-radius: var(--radius-full);
  margin-top: 8px;
  overflow: hidden;
}
.dropzone-progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width .2s;
}

/* ─── TERMS (one rule per card) ──────────────────────────── */
.terms-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.term-card {
  display: flex;
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.term-card:hover { background: #F3F4F6; }

.term-number {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--surface);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.term-content { flex: 1; }
.term-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.term-rule {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.terms-agree {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-top: 4px;
  transition: border-color .2s;
}
.terms-agree:hover {
  border-color: var(--border-hover);
}

/* ─── SUMMARY (Step 9) ───────────────────────────────────── */
.summary-section { margin-bottom: 24px; }
.summary-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.summary-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.summary-edit-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s;
  text-decoration: none;
  border: none;
  background: none;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}
.summary-edit-link:hover {
  color: var(--primary);
  background: var(--bg);
}

.summary-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F5F6F7;
  font-size: 14px;
  align-items: baseline;
}
.summary-key {
  flex: 0 0 160px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
}
.summary-val {
  flex: 1;
  color: var(--text);
  word-break: break-word;
  line-height: 1.5;
}
.summary-slider-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.summary-slider-track {
  flex: 1;
  height: 4px;
  background: #EBEDF0;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.summary-slider-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
}
.summary-slider-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.summary-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-tag {
  font-size: 12px;
  padding: 4px 12px;
  background: var(--bg);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-weight: 500;
}

.submit-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.submit-note i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ─── STICKY FOOTER ACTIONS ──────────────────────────────── */
.quiz-actions {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,.04);
  z-index: 100;
  display: flex;
  align-items: center;
}
.quiz-actions-inner {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quiz-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-quiz {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  border: none;
  cursor: pointer;
  transition: all .25s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn-quiz:disabled { opacity: .35; cursor: not-allowed; }
.btn-quiz svg { flex-shrink: 0; }

/* Next / Continue — dark, elegant */
.btn-next, .btn-start {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
}
.btn-next:hover, .btn-start:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(17,24,39,.15);
  transform: translateY(-1px);
}
.btn-next:active, .btn-start:active { transform: translateY(0); }
.btn-next svg, .btn-start svg { transition: transform .2s; }
.btn-next:hover svg, .btn-start:hover svg { transform: translateX(2px); }

/* Back — soft gray */
.btn-back {
  background: #F3F4F6;
  color: var(--text-sub);
  border: none;
}
.btn-back:hover {
  color: var(--text);
  background: #E5E7EB;
}
.btn-back svg { transition: transform .2s; }
.btn-back:hover svg { transform: translateX(-2px); }

/* Save & Exit — outlined blue */
.btn-save-exit {
  background: transparent;
  color: #3B82F6;
  border: 1.5px solid #BFDBFE;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.btn-save-exit:hover {
  color: #2563EB;
  border-color: #93C5FD;
  background: #EFF6FF;
  transform: translateY(-1px);
}

/* Submit — dark elegant */
.btn-submit {
  background: var(--primary);
  color: #fff;
}
.btn-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(17,24,39,.15);
  transform: translateY(-1px);
}

/* Welcome start button (inside card) */
.btn-welcome-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .25s var(--ease);
  margin-top: 36px;
}
.btn-welcome-start:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(17,24,39,.15);
  transform: translateY(-2px);
}
.btn-welcome-start:active { transform: translateY(0); }
.btn-welcome-start svg { transition: transform .2s; }
.btn-welcome-start:hover svg { transform: translateX(3px); }

/* ─── WELCOME STEP EXTRAS ────────────────────────────────── */
.welcome-logo {
  font-family: var(--font-ar);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 36px;
  opacity: .5;
}
.welcome-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}
.welcome-time svg { width: 16px; height: 16px; }

/* ─── BILINGUAL (Arabic subtitles) ───────────────────────── */
.step-description-ar {
  font-family: var(--font-ar);
  font-size: 14px;
  color: var(--text-muted);
  direction: rtl;
  margin-top: 6px;
  line-height: 1.7;
}
.step-card--welcome .step-description-ar { margin: 6px auto 0; }

.field-label-ar {
  display: block;
  font-family: var(--font-ar);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  direction: rtl;
  text-align: right;
  margin-top: 1px;
}

.slider-label-ar {
  display: block;
  font-family: var(--font-ar);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ─── LOGO TYPE CARDS (Step 7) ───────────────────────────── */
.logo-type-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.logo-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 36px 20px 28px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s var(--ease);
  position: relative;
}
.logo-type-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}
.logo-type-card.selected {
  border-color: var(--primary);
  background: #F9FAFB;
  box-shadow: 0 0 0 1px var(--primary);
}
.logo-type-card input { display: none; }
.logo-type-icon {
  font-size: 32px;
  color: var(--text-muted);
  transition: color .2s;
}
.logo-type-card.selected .logo-type-icon { color: var(--primary); }
.logo-type-card strong { font-size: 15px; font-weight: 600; color: var(--text); }
.logo-type-ar {
  font-family: var(--font-ar);
  font-size: 12px;
  color: var(--text-muted);
  direction: rtl;
}
.logo-type-card small { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.logo-type-card .check-mark {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.logo-type-card.selected .check-mark { display: flex; }

/* ─── SAVE & EXIT MODAL ─────────────────────────────────── */
.save-exit-message {
  text-align: center;
  padding: 40px 20px;
}
.save-exit-message h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.save-exit-message p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ─── SKELETON LOADER ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #F3F4F6 25%, #E8E9EC 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── SPINNER ────────────────────────────────────────────── */
.ph-spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --header-h: 56px;
    --footer-h: 72px;
  }

  .quiz-header-brand { font-size: 9px; letter-spacing: .14em; }
  .quiz-header-center { max-width: 140px; }
  .quiz-header-step { font-size: 10px; }

  .quiz-container { padding: 0 16px; }

  .step-card {
    padding: 32px 24px;
    border-radius: 16px;
  }
  .step-card--welcome { padding: 44px 24px 40px; }
  .step-fields {
    padding: 28px 24px;
    border-radius: 16px;
  }
  .step-title { font-size: 22px; }
  .step-description { font-size: 14px; }

  .quiz-field-row { grid-template-columns: 1fr; gap: 24px; }
  .style-cards { grid-template-columns: repeat(2, 1fr); }
  .logo-type-cards { grid-template-columns: 1fr; gap: 12px; }
  .logo-type-card {
    padding: 24px 20px 20px;
    flex-direction: row;
    gap: 16px;
    text-align: left;
  }
  .logo-type-icon { font-size: 28px; }

  .quiz-actions-inner { padding: 0 16px; }
  .btn-save-exit span { display: none; }
  .btn-quiz { padding: 10px 18px; font-size: 13px; }

  .summary-row { flex-direction: column; gap: 4px; }
  .summary-key { flex: none; font-size: 12px; }

  .field-input { padding: 11px 14px; font-size: 14px; }
  .field-textarea { min-height: 72px; }

  .slider-labels { font-size: 12px; }
  .slider-value-badge { font-size: 12px; min-width: 34px; }

  .tag-chip { padding: 8px 14px; font-size: 13px; }
}

@media (max-width: 400px) {
  .quiz-header-save span { display: none; }
  .style-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .step-card { padding: 24px 18px; }
  .step-fields { padding: 24px 18px; }
  .btn-quiz { padding: 10px 14px; font-size: 12px; }
}

/* ─── FOCUS VISIBLE (accessibility) ──────────────────────── */
.btn-quiz:focus-visible,
.field-input:focus-visible,
.tag-chip:focus-visible,
.style-card:focus-visible,
.logo-type-card:focus-visible,
.dropzone:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ─── SELECTION HIGHLIGHT ────────────────────────────────── */
::selection {
  background: rgba(17, 24, 39, .08);
  color: var(--text);
}

/* ─── SCROLLBAR (subtle) ─────────────────────────────────── */
.quiz-body::-webkit-scrollbar { width: 6px; }
.quiz-body::-webkit-scrollbar-track { background: transparent; }
.quiz-body::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}
.quiz-body::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }
