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

    :root {
      /* Brand */
      --purple:        #7C3AED;
      --purple-dark:   #6D28D9;
      --purple-xdark:  #5B21B6;
      --purple-light:  #8B5CF6;
      --purple-bg:     #F5F3FF;
      --purple-border: #DDD6FE;

      /* Neutral — Slate scale (cooler, more refined than gray) */
      --gray-900: #0F172A;
      --gray-800: #1E293B;
      --gray-700: #334155;
      --gray-600: #475569;
      --gray-500: #64748B;
      --gray-400: #94A3B8;
      --gray-300: #CBD5E1;
      --gray-200: #E2E8F0;
      --gray-100: #F1F5F9;
      --gray-50:  #F8FAFC;

      /* Semantic */
      --green:        #059669;
      --green-bg:     #ECFDF5;
      --green-border: #6EE7B7;
      --orange:       #D97706;
      --orange-bg:    #FFFBEB;
      --red:          #DC2626;
      --red-bg:       #FEF2F2;
      --yellow:       #CA8A04;
      --yellow-bg:    #FEFCE8;
      --white:        #FFFFFF;

      /* Surface & border */
      --border:        rgba(15,23,42,0.08);
      --border-strong: rgba(15,23,42,0.14);

      /* Shadow tiers */
      --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
      --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
      --shadow-md: 0 4px 12px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
      --shadow-lg: 0 10px 30px rgba(15,23,42,0.10), 0 4px 8px rgba(15,23,42,0.05);
      --shadow-xl: 0 20px 50px rgba(15,23,42,0.12), 0 8px 16px rgba(15,23,42,0.06);

      /* Radius */
      --radius-sm: 6px;
      --radius-md: 8px;
      --radius-lg: 12px;
      --radius-xl: 16px;
    }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--gray-50);
      color: var(--gray-900);
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    /* -- Login ---------------------------------------- */
    #login-screen {
      min-height: 100vh;
      display: flex;
    }

    .login-kammer {
      display: flex;
      width: 100%;
      min-height: 100vh;
    }

    /* Brand panel (left) */
    .login-brand-panel {
      flex: 0 0 42%;
      background: #0b0710;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 3rem 3rem 3rem 3.5rem;
      position: relative;
      overflow: hidden;
    }

    .login-brand-blob {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
    }
    .login-brand-blob--top {
      top: -60px; right: -40px;
      width: 280px; height: 280px;
      background: rgba(139,92,246,0.22);
      filter: blur(80px);
    }
    .login-brand-blob--bottom {
      bottom: -60px; left: -30px;
      width: 220px; height: 220px;
      background: rgba(79,70,229,0.15);
      filter: blur(60px);
    }
    .login-brand-line {
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(167,139,250,0.5), transparent);
    }

    .login-brand-logo {
      width: 260px;
      height: auto;
      filter: brightness(0) invert(1);
      position: relative;
      z-index: 1;
    }

    .login-brand-sub {
      margin-top: 12px;
      font-size: 0.6875rem;
      color: rgba(255,255,255,0.35);
      letter-spacing: 0.18em;
      text-transform: uppercase;
      position: relative;
      z-index: 1;
    }

    /* Form panel (right) */
    .login-form-panel {
      flex: 1;
      background: #fafafa;
      border-left: 1px solid #f3f4f6;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding: 4rem 4rem;
      animation: loginFadeIn 0.4s ease-out both;
    }

    @keyframes loginFadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @media (prefers-reduced-motion: reduce) {
      .login-form-panel { animation: none; }
    }

    .login-form-inner {
      width: 100%;
      max-width: 360px;
    }

    .login-mobile-logo {
      display: none;
      width: 140px;
      height: auto;
      margin-bottom: 2rem;
    }

    .login-heading {
      font-family: 'Quicksand', sans-serif;
      font-size: 1.375rem;
      font-weight: 700;
      color: #111827;
      margin-bottom: 0.25rem;
    }

    .login-sub {
      font-size: 0.75rem;
      color: #9ca3af;
      margin-bottom: 1.75rem;
    }

    .login-error {
      font-size: 0.8rem;
      color: var(--red);
      margin-top: 0.5rem;
      min-height: 1.2em;
    }

    .btn-full {
      width: 100%;
      margin-top: 0.25rem;
    }

    .btn-google {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      width: 100%;
      padding: 0.75rem 1rem;
      background: #fff;
      border: 1.5px solid #e5e7eb;
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      font-weight: 600;
      color: #111827;
      cursor: pointer;
      transition: border-color 0.15s, box-shadow 0.15s;
      margin-top: 0.25rem;
    }
    .btn-google:hover {
      border-color: #7C3AED;
      box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
    }
    .btn-google-icon {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
    }

    /* Mobile: hide brand panel, show mobile logo */
    @media (max-width: 640px) {
      .login-brand-panel { display: none; }
      .login-mobile-logo { display: block; }
      .login-form-panel {
        padding: 2.5rem 2rem;
        justify-content: center;
      }
      .login-form-inner { max-width: 100%; }
    }

    .field-label {
      display: block;
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--gray-700);
      margin-bottom: 0.375rem;
      letter-spacing: 0.01em;
    }

    .field-required {
      color: var(--purple);
      margin-left: 2px;
    }

    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    input[type="date"],
    select,
    textarea {
      width: 100%;
      padding: 0.625rem 0.875rem;
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-md);
      font-family: inherit;
      font-size: 0.9375rem;
      color: var(--gray-900);
      background: var(--white);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
      appearance: none;
      -webkit-appearance: none;
    }

    input:focus, select:focus, textarea:focus {
      border-color: var(--purple-light);
      box-shadow: 0 0 0 3px rgba(124,58,237,0.10);
    }

    select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.75rem center;
      padding-right: 2.25rem;
      cursor: pointer;
    }

    textarea { resize: vertical; min-height: 80px; }

    .login-error {
      font-size: 0.8rem;
      color: var(--red);
      margin-top: 0.5rem;
      min-height: 1.2em;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.6875rem 1.375rem;
      border-radius: var(--radius-md);
      font-family: inherit;
      font-size: 0.9375rem;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: all 0.15s;
      letter-spacing: -0.01em;
    }

    .btn-primary {
      background: var(--purple);
      color: var(--white);
      width: 100%;
      box-shadow: 0 1px 3px rgba(109,40,217,0.25);
    }
    .btn-primary:hover { background: var(--purple-dark); box-shadow: 0 2px 8px rgba(109,40,217,0.30); }
    .btn-primary:active { transform: scale(0.98); }
    .btn-primary:disabled { opacity: 0.50; cursor: not-allowed; box-shadow: none; transform: none; }

    .btn-secondary {
      background: var(--gray-100);
      color: var(--gray-700);
      border: 1px solid var(--border);
    }
    .btn-secondary:hover { background: var(--gray-200); }

    .btn-ghost {
      background: transparent;
      color: var(--gray-600);
      padding: 0.5rem 0.875rem;
      font-size: 0.875rem;
    }
    .btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }

    .btn-sm {
      padding: 0.375rem 0.75rem;
      font-size: 0.8125rem;
      border-radius: var(--radius-sm);
    }

    @keyframes shake {
      0%,100% { transform: translateX(0); }
      20%      { transform: translateX(-6px); }
      40%      { transform: translateX(6px); }
      60%      { transform: translateX(-4px); }
      80%      { transform: translateX(4px); }
    }
    .shake { animation: shake 0.4s ease; }

    /* -- App shell ------------------------------------ */
    #app { display: none; min-height: 100vh; flex-direction: column; }

/* -- Global Chrome (Floating Pill) ----------------------- */

#chrome-sentinel {
  height: 1px;
  pointer-events: none;
}

#chrome-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 12px 16px 0;
}

#chrome {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(229, 229, 234, 0.8);
  border-radius: 999px;
  padding: 0.3rem 0.3rem 0.3rem 1rem;
  box-shadow: 0 10px 40px -8px rgba(124, 58, 237, 0.18), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 200ms ease;
  max-width: 800px;
  width: 100%;
}

#chrome.scrolled {
  box-shadow: 0 16px 48px -8px rgba(124, 58, 237, 0.25), 0 4px 12px rgba(0, 0, 0, 0.06);
}

@supports not (backdrop-filter: blur(1px)) {
  #chrome { background: rgba(255, 255, 255, 0.97); }
  .chrome-menu { background: rgba(255, 255, 255, 0.99) !important; }
}

/* Logo */
.chrome-logo {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

/* Tab Pills */
.chrome-tab {
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.chrome-tab:hover { color: var(--gray-900); background: var(--gray-100); }
.chrome-tab.active {
  background: var(--purple);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.28);
}
.chrome-tab:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

/* Divider */
.chrome-divider {
  width: 1px;
  height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(203,213,225,0.8) 20%, rgba(203,213,225,0.8) 80%, transparent);
  flex-shrink: 0;
  margin: 0 0.25rem;
  margin-left: auto;
}

/* Counter Chip */
.chrome-counter {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: #f5f3ff;
  color: #6d28d9;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.chrome-counter.test-mode { background: #fff7ed; color: #c2410c; }
.chrome-counter.diverged  { color: var(--red); }

/* Live Dot */
.chrome-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
  animation: chrome-dot-pulse 2s ease-in-out infinite;
}

.chrome-live-dot.test-mode {
  background: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

@keyframes chrome-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Avatar Button */
.chrome-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #4c1d95);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  transition: box-shadow 0.15s;
  flex-shrink: 0;
  margin-left: 0.125rem;
}

.chrome-avatar:hover {
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2), 0 2px 8px rgba(124,58,237,0.3);
}
.chrome-avatar:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

/* Avatar Menu */
.chrome-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 288px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(229,229,234,0.8);
  border-radius: 16px;
  box-shadow:
    0 24px 64px -16px rgba(76,29,149,0.2),
    0 8px 24px rgba(0,0,0,0.06),
    0 0 0 0.5px rgba(0,0,0,0.04);
  overflow: hidden;
  transform-origin: top right;
}

.chrome-menu.open {
  display: block;
  animation: chrome-menu-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}

@keyframes chrome-menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Menu — User Header */
.chrome-menu-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}

.chrome-menu-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #4c1d95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.chrome-menu-user-info { min-width: 0; }

.chrome-menu-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-900);
}

.chrome-menu-email {
  font-size: 0.75rem;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Menu — Divider */
.chrome-menu-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(203,213,225,0.8) 20%, rgba(203,213,225,0.8) 80%, transparent);
}

/* Menu — Section */
.chrome-menu-section { padding: 0.85rem 1rem; }

.chrome-menu-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chrome-mode-indicator { font-weight: 500; text-transform: none; letter-spacing: 0; }
.chrome-mode-indicator.prod { color: #059669; }
.chrome-mode-indicator.test { color: #f97316; }

/* Segmented Control (iOS-style) */
.chrome-segmented {
  position: relative;
  display: flex;
  background: var(--gray-100);
  border-radius: 8px;
  padding: 3px;
}

.chrome-seg-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.chrome-seg-thumb.at-test { transform: translateX(100%); }

.chrome-seg-option {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 0.4rem 0.5rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  text-align: center;
  transition: color 0.15s;
  min-height: 36px;
}

.chrome-seg-option.active { font-weight: 600; color: var(--gray-900); }
.chrome-seg-option[data-mode="prod"].active { color: #059669; }
.chrome-seg-option[data-mode="test"].active { color: #c2410c; }
.chrome-seg-option:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; border-radius: 6px; }

.chrome-mode-hint {
  font-size: 0.6875rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Menu — Logout Action */
.chrome-menu-action {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.chrome-menu-action:hover { background: #f9fafb; }
.chrome-menu-action:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; }

/* Mobile — < 640px */
@media (max-width: 639px) {
  #chrome-wrapper {
    padding: 12px 16px 0;
  }
  #chrome {
    max-width: 100%;
  }
  .chrome-tab {
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
  }
  .chrome-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    border-radius: 20px 20px 0 0;
    transform-origin: bottom center;
    max-height: 80vh;
    overflow-y: auto;
  }
  @keyframes chrome-menu-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .chrome-menu.open { animation: none; }
  .chrome-live-dot  { animation: none; }
  .chrome-seg-thumb { transition: none; }
  #chrome           { transition: none; }
}

    /* -- Main content --------------------------------- */
    .main { padding: 2rem; max-width: 1100px; margin: 0 auto; width: 100%; }

    .tab-panel { display: none; }
    .tab-panel.active { display: block; }

    /* -- Form card ------------------------------------ */
    .card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 2rem;
      box-shadow: var(--shadow-sm);
    }

    .card-title {
      font-family: 'Quicksand', sans-serif;
      font-size: 1.125rem;
      font-weight: 700;
      color: var(--gray-900);
      margin-bottom: 1.5rem;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem;
    }

    .form-full { grid-column: 1 / -1; }

    .field { display: flex; flex-direction: column; gap: 0.375rem; }

    .field-hint {
      font-size: 0.75rem;
      color: var(--gray-400);
      margin-top: 0.25rem;
    }

    .field-error-msg {
      font-size: 0.75rem;
      color: var(--red);
      margin-top: 0.25rem;
      display: none;
    }
    .field.has-error input,
    .field.has-error select,
    .field.has-error textarea {
      border-color: var(--red);
      box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
    }
    .field.has-error .field-error-msg { display: block; }

    .section-divider {
      grid-column: 1 / -1;
      border: none;
      border-top: 1px solid var(--gray-100);
      margin: 0.5rem 0;
    }

    .section-label {
      grid-column: 1 / -1;
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--gray-400);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: -0.5rem;
    }

    .checkbox-row {
      display: flex;
      align-items: center;
      gap: 0.625rem;
      cursor: pointer;
    }

    .checkbox-row input[type="checkbox"] {
      width: 16px;
      height: 16px;
      border-radius: 4px;
      border: 1.5px solid var(--gray-300);
      cursor: pointer;
      accent-color: var(--purple);
      flex-shrink: 0;
    }

    .checkbox-row span {
      font-size: 0.875rem;
      color: var(--gray-700);
    }

    .form-actions {
      margin-top: 1.75rem;
      display: flex;
      gap: 0.75rem;
    }

    /* -- Scope chips ---------------------------------- */
    .scope-chips-container {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-bottom: 0.625rem;
      min-height: 2rem;
    }

    .scope-chip {
      background: var(--purple-bg);
      color: var(--purple-dark);
      border: 1px solid var(--purple-border);
      border-radius: 100px;
      padding: 0.3rem 0.75rem;
      font-size: 0.8125rem;
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      line-height: 1.4;
      max-width: 100%;
    }

    .scope-chip-text {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .scope-chip-remove {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border: none;
      background: none;
      color: var(--purple-light);
      cursor: pointer;
      font-size: 0.875rem;
      line-height: 1;
      padding: 0;
      border-radius: 50%;
      flex-shrink: 0;
      transition: color 0.15s, background 0.15s;
    }
    .scope-chip-remove:hover {
      color: var(--red);
      background: var(--red-bg);
    }

    .scope-add-row {
      display: flex;
      gap: 0.5rem;
      align-items: center;
    }

    .scope-add-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.25rem;
      padding: 0.4375rem 0.875rem;
      border-radius: 8px;
      font-family: inherit;
      font-size: 0.8125rem;
      font-weight: 600;
      cursor: pointer;
      border: 1.5px solid var(--purple-border);
      background: var(--white);
      color: var(--purple-dark);
      transition: all 0.15s;
      white-space: nowrap;
    }
    .scope-add-btn:hover {
      background: var(--purple-bg);
      border-color: var(--purple-light);
    }

    /* -- Preview card --------------------------------- */
    .preview-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem 2rem;
      margin-bottom: 1.5rem;
    }

    .preview-item {
      display: flex;
      flex-direction: column;
      gap: 0.125rem;
    }

    .preview-label {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--gray-400);
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .preview-value {
      font-size: 0.9375rem;
      color: var(--gray-900);
      font-weight: 500;
    }

    .preview-full {
      grid-column: 1 / -1;
    }

    .preview-scope-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 0.375rem;
    }

    .preview-scope-list li {
      font-size: 0.875rem;
      color: var(--gray-700);
      padding-left: 1.125rem;
      position: relative;
    }

    .preview-scope-list li::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0.5em;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--purple-light);
    }

    .preview-actions {
      display: flex;
      gap: 0.75rem;
      margin-top: 1.5rem;
    }

    .preview-actions .btn-primary {
      width: auto;
    }

    /* -- Result view ---------------------------------- */
    #result-view {
      display: none;
    }

    .result-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 2rem;
      box-shadow: var(--shadow-md);
    }

    .result-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 1.5rem;
      gap: 1rem;
    }

    .result-icon {
      width: 48px;
      height: 48px;
      background: var(--green-bg);
      border: 1px solid var(--green-border);
      border-radius: var(--radius-lg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.375rem;
      flex-shrink: 0;
    }

    .result-title {
      font-family: 'Quicksand', sans-serif;
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--gray-900);
    }

    .result-number {
      font-size: 0.8125rem;
      color: var(--gray-500);
      margin-top: 0.125rem;
    }

    .result-links {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;
      margin-bottom: 1.5rem;
    }

    .result-link {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.5rem 0.875rem;
      border-radius: 8px;
      font-size: 0.875rem;
      font-weight: 500;
      text-decoration: none;
      transition: all 0.15s;
    }

    .result-link-pdf {
      background: var(--purple-bg);
      color: var(--purple-dark);
      border: 1px solid var(--purple-border);
    }
    .result-link-pdf:hover { background: var(--purple-border); }

    .result-link-stripe {
      background: #EFF6FF;
      color: #2563EB;
      border: 1px solid #BFDBFE;
    }
    .result-link-stripe:hover { background: #DBEAFE; }

    .result-link-portal {
      background: var(--green-bg);
      color: #059669;
      border: 1px solid var(--green-border);
    }
    .result-link-portal:hover { background: #D1FAE5; }

    .warning-box {
      background: var(--yellow-bg);
      border: 1px solid #FDE68A;
      border-radius: 10px;
      padding: 0.75rem 1rem;
      font-size: 0.8125rem;
      color: #92400E;
      margin-bottom: 1rem;
    }

    .email-draft-label {
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--gray-700);
      margin-bottom: 0.5rem;
    }

    .email-draft-area {
      width: 100%;
      min-height: 200px;
      padding: 0.875rem 1rem;
      border: 1.5px solid var(--gray-200);
      border-radius: 10px;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      line-height: 1.6;
      color: var(--gray-700);
      background: var(--gray-50);
      resize: vertical;
      outline: none;
    }

    .email-draft-area:focus {
      border-color: var(--purple);
      box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
      background: var(--white);
    }

    .result-actions {
      display: flex;
      gap: 0.75rem;
      margin-top: 1.25rem;
      flex-wrap: wrap;
    }

    .btn-green {
      background: var(--green);
      color: var(--white);
    }
    .btn-green:hover { background: #059669; }

    /* -- Clients table -------------------------------- */
    .table-wrapper { overflow-x: auto; margin: -0.5rem; padding: 0.5rem; }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.875rem;
    }

    thead th {
      text-align: left;
      padding: 0.5625rem 1rem;
      font-size: 0.6875rem;
      font-weight: 600;
      color: var(--gray-500);
      letter-spacing: 0.06em;
      text-transform: uppercase;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
      background: var(--gray-50);
    }

    thead th.sortable { cursor: pointer; user-select: none; transition: color 0.15s; }
    thead th.sortable:hover { color: var(--purple); }
    thead th .sort-arrow { font-size: 0.6rem; margin-left: 0.25rem; opacity: 0.35; }
    thead th.sorted-asc .sort-arrow, thead th.sorted-desc .sort-arrow { opacity: 1; color: var(--purple); }

    tbody td {
      padding: 0.875rem 1rem;
      border-bottom: 1px solid var(--gray-100);
      vertical-align: middle;
      color: var(--gray-700);
    }

    tbody tr:last-child td { border-bottom: none; }
    tbody tr:hover td { background: var(--gray-50); }
    tbody tr.clickable-row { cursor: pointer; }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 0.2rem 0.5rem;
      border-radius: var(--radius-sm);
      font-size: 0.6875rem;
      font-weight: 600;
      white-space: nowrap;
      letter-spacing: 0.01em;
    }

    .badge-yellow  { background: var(--yellow-bg);  color: #854D0E; }
    .badge-orange  { background: var(--orange-bg);  color: #92400E; }
    .badge-green   { background: var(--green-bg);   color: #065F46; }
    .badge-gray    { background: var(--gray-100);   color: var(--gray-600); }
    .badge-purple  { background: var(--purple-bg);  color: var(--purple-dark); }

    .clients-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.25rem;
    }

    .clients-count {
      font-size: 0.8125rem;
      color: var(--gray-500);
    }

    .empty-state {
      text-align: center;
      padding: 3rem 1rem;
      color: var(--gray-400);
    }

    .empty-state svg {
      width: 40px;
      height: 40px;
      margin-bottom: 0.75rem;
      opacity: 0.4;
    }

    .portal-link {
      font-size: 0.8rem;
      color: var(--purple);
      text-decoration: none;
      font-weight: 500;
    }
    .portal-link:hover { text-decoration: underline; }

    /* -- #15: Stats bar ------------------------------- */
    .stats-bar {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0.75rem;
      margin-bottom: 1.25rem;
    }

    .stat-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1rem 1.125rem;
      display: flex;
      align-items: center;
      gap: 0.875rem;
      cursor: pointer;
      transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
    }
    .stat-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
    .stat-card:active { transform: scale(0.98); }

    .stat-icon {
      width: 36px;
      height: 36px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .stat-icon-blue   { background: #EFF6FF; color: #3B82F6; }
    .stat-icon-orange { background: var(--orange-bg); color: var(--orange); }
    .stat-icon-purple { background: var(--purple-bg); color: var(--purple); }
    .stat-icon-green  { background: var(--green-bg); color: var(--green); }

    .stat-content { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }

    .stat-label {
      font-size: 0.6875rem;
      font-weight: 600;
      color: var(--gray-500);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      white-space: nowrap;
    }

    .stat-value {
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--gray-900);
      letter-spacing: -0.02em;
    }

    /* -- #16: Filter pills ----------------------------- */
    .filter-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.375rem;
      margin-bottom: 1rem;
    }

    .filter-pill {
      padding: 0.3125rem 0.875rem;
      border-radius: 100px;
      font-family: inherit;
      font-size: 0.75rem;
      font-weight: 600;
      cursor: pointer;
      border: 1.5px solid var(--gray-200);
      background: var(--white);
      color: var(--gray-600);
      transition: all 0.15s;
    }
    .filter-pill:hover { border-color: var(--purple-border); color: var(--purple); }
    .filter-pill.active {
      background: var(--purple);
      color: var(--white);
      border-color: var(--purple);
    }

    /* -- Search bar ------------------------------------ */
    .clients-search-bar {
      margin-bottom: 0.75rem;
    }

    .search-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .search-icon {
      position: absolute;
      left: 0.75rem;
      color: var(--gray-400);
      pointer-events: none;
      flex-shrink: 0;
    }

    #clients-search {
      padding-left: 2.25rem !important;
      padding-right: 2.25rem !important;
      width: 100%;
      max-width: 360px;
      font-size: 0.875rem !important;
    }

    .search-clear-btn {
      position: absolute;
      left: calc(360px - 1.75rem);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border: none;
      background: var(--gray-200);
      border-radius: 50%;
      cursor: pointer;
      font-size: 0.875rem;
      color: var(--gray-600);
      line-height: 1;
      transition: background 0.15s;
    }
    .search-clear-btn:hover { background: var(--gray-300); }

    /* -- #8: Progress dots (table) -------------------- */
    .progress-dots {
      display: flex;
      align-items: center;
      gap: 0;
    }

    .progress-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--gray-200);
      flex-shrink: 0;
      position: relative;
    }
    .progress-dot.completed { background: var(--green); }
    .progress-dot.current { background: var(--orange); }
    .progress-dot-line {
      width: 6px;
      height: 2px;
      background: var(--gray-200);
      flex-shrink: 0;
    }
    .progress-dot-line.completed { background: var(--green); }

    /* -- #5/#6: Doc icon links in table --------------- */
    .doc-icon-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 6px;
      border: none;
      background: transparent;
      color: var(--gray-500);
      cursor: pointer;
      text-decoration: none;
      transition: all 0.15s;
      font-size: 0.8125rem;
    }
    .doc-icon-btn:hover { background: var(--purple-bg); color: var(--purple); }
    .doc-icon-btn.disabled {
      color: var(--gray-300);
      cursor: default;
      pointer-events: none;
    }

    /* -- #17: Actions dropdown ----------------------- */
    .actions-cell { position: relative; }

    .actions-menu-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 6px;
      border: none;
      background: transparent;
      color: var(--gray-500);
      cursor: pointer;
      font-size: 1rem;
      font-weight: 700;
      transition: all 0.15s;
      letter-spacing: 1px;
    }
    .actions-menu-btn:hover { background: var(--gray-100); color: var(--gray-900); }

    .actions-dropdown {
      display: none;
      position: absolute;
      right: 0;
      top: calc(100% + 4px);
      z-index: 200;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 0.375rem 0;
      min-width: 210px;
      box-shadow: var(--shadow-lg);
    }
    .actions-dropdown.open { display: block; }

    .actions-dropdown-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      width: 100%;
      padding: 0.5625rem 0.875rem;
      border: none;
      background: transparent;
      font-family: inherit;
      font-size: 0.8125rem;
      color: var(--gray-700);
      cursor: pointer;
      text-align: left;
      transition: background 0.1s;
    }
    .actions-dropdown-item:hover { background: var(--gray-50); color: var(--gray-900); }
    .actions-dropdown-item .dd-icon { width: 14px; text-align: center; font-size: 0.75rem; flex-shrink: 0; }

    /* -- #7: Drawer ----------------------------------- */
    .drawer-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(15,23,42,0.25);
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
      z-index: 499;
      opacity: 0;
      transition: opacity 0.25s;
    }
    .drawer-overlay.open { display: block; opacity: 1; }

    .drawer {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: 440px;
      max-width: 100vw;
      background: var(--white);
      z-index: 500;
      transform: translateX(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      flex-direction: column;
      box-shadow: var(--shadow-xl);
      border-left: 1px solid var(--border);
    }
    .drawer.open { transform: translateX(0); }

    .drawer-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      padding: 1.5rem 1.5rem 1rem;
      border-bottom: 1px solid var(--gray-100);
    }

    .drawer-header-info h2 {
      font-family: 'Quicksand', sans-serif;
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--gray-900);
      margin: 0;
    }

    .drawer-header-info p {
      font-size: 0.8125rem;
      color: var(--gray-500);
      margin: 0.125rem 0 0;
    }

    .drawer-close {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: none;
      background: transparent;
      cursor: pointer;
      color: var(--gray-400);
      font-size: 1.25rem;
      transition: all 0.15s;
      flex-shrink: 0;
    }
    .drawer-close:hover { background: var(--gray-100); color: var(--gray-900); }

    .drawer-body {
      flex: 1;
      overflow-y: auto;
      padding: 1.25rem 1.5rem;
    }

    .drawer-section {
      margin-bottom: 1.5rem;
    }

    .drawer-section-title {
      font-size: 0.6875rem;
      font-weight: 600;
      color: var(--gray-400);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      margin-bottom: 0.625rem;
    }

    /* Drawer progress bar */
    .drawer-progress {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      padding: 0 0.25rem;
      margin-bottom: 1.5rem;
    }

    .drawer-progress-step {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.375rem;
      flex: 1;
      position: relative;
    }

    .drawer-progress-step:not(:last-child)::after {
      content: '';
      position: absolute;
      top: 10px;
      left: calc(50% + 12px);
      right: calc(-50% + 12px);
      height: 2px;
      background: var(--gray-200);
    }
    .drawer-progress-step:not(:last-child).step-done::after { background: var(--green); }

    .dp-circle {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--gray-200);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.625rem;
      color: var(--white);
      position: relative;
      z-index: 1;
    }
    .dp-circle.done { background: var(--green); }
    .dp-circle.current { background: var(--orange); }

    .dp-label {
      font-size: 0.625rem;
      color: var(--gray-500);
      text-align: center;
      font-weight: 500;
    }

    /* Drawer info rows */
    .drawer-info-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem 0;
      border-bottom: 1px solid var(--gray-50);
    }
    .drawer-info-row:last-child { border-bottom: none; }

    .drawer-info-label {
      font-size: 0.8125rem;
      color: var(--gray-500);
    }

    .drawer-info-value {
      font-size: 0.8125rem;
      font-weight: 500;
      color: var(--gray-900);
    }

    /* Drawer link rows */
    .drawer-link-row {
      display: flex;
      align-items: center;
      gap: 0.625rem;
      padding: 0.5rem 0.625rem;
      border-radius: 8px;
      text-decoration: none;
      color: var(--gray-700);
      font-size: 0.8125rem;
      font-weight: 500;
      transition: background 0.15s;
      cursor: pointer;
    }
    .drawer-link-row:hover { background: var(--gray-50); }
    .drawer-link-row.disabled { color: var(--gray-400); cursor: default; pointer-events: none; }
    .drawer-link-icon {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      background: var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      flex-shrink: 0;
    }

    .drawer-actions {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .drawer-actions .btn {
      width: 100%;
      justify-content: center;
    }

    .drawer-date {
      font-size: 0.75rem;
      color: var(--gray-400);
      text-align: center;
      margin-top: 0.5rem;
    }

    /* -- #10: Toast notifications -------------------- */
    .toast-container {
      position: fixed;
      top: 1rem;
      right: 1rem;
      z-index: 1100;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      pointer-events: none;
    }

    .toast {
      display: flex;
      align-items: center;
      gap: 0.625rem;
      padding: 0.75rem 1rem;
      border-radius: var(--radius-lg);
      background: var(--gray-900);
      box-shadow: var(--shadow-lg);
      max-width: 360px;
      font-size: 0.8125rem;
      font-weight: 500;
      color: #FFFFFF;
      pointer-events: auto;
      animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .toast-success .toast-icon { color: #34D399; }
    .toast-error .toast-icon { color: #F87171; }
    .toast-warning .toast-icon { color: #FBBF24; }
    .toast-info .toast-icon { color: #818CF8; }

    .toast.removing { animation: toast-out 0.3s ease forwards; }

    @keyframes toast-in {
      from { opacity: 0; transform: translateX(40px); }
      to   { opacity: 1; transform: translateX(0); }
    }
    @keyframes toast-out {
      from { opacity: 1; transform: translateX(0); }
      to   { opacity: 0; transform: translateX(40px); }
    }

    /* -- Retry button for network errors ------------- */
    .retry-container {
      text-align: center;
      padding: 2rem 1rem;
    }
    .retry-container p {
      color: var(--gray-500);
      font-size: 0.875rem;
      margin-bottom: 0.75rem;
    }

    @media (max-width: 640px) {
      .form-grid { grid-template-columns: 1fr; }
      .preview-grid { grid-template-columns: 1fr; }
      .main { padding: 1rem; }
      .stats-bar { grid-template-columns: repeat(2, 1fr); }
      .drawer { width: 100vw; }

      /* Client cards replace table rows on mobile */
      .client-card-cell { padding: 0.375rem 0 !important; border: none !important; }
      .client-card {
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-bottom: 0.5rem;
        cursor: pointer;
        transition: box-shadow 0.15s;
      }
      .client-card:hover { box-shadow: var(--shadow-md); }
      .client-card:active { transform: scale(0.99); }

      .client-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 0.625rem;
      }
      .client-card-firma { font-weight: 600; color: var(--gray-900); font-size: 0.9375rem; }
      .client-card-sub { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.1rem; }
      .client-card-badges { display: flex; gap: 0.375rem; align-items: center; flex-shrink: 0; }

      .client-card-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.75rem;
      }
      .client-card-price { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); }

      .client-card-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
      }
      .client-card-actions .btn { width: auto !important; flex: 1; min-width: 0; }
    }

    /* ── Reset Modal ── */
    .modal-overlay {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.45);
      z-index: 200;
      display: flex; align-items: center; justify-content: center;
      padding: 1rem;
      opacity: 0; pointer-events: none;
      transition: opacity 0.2s;
    }
    .modal-overlay.show { opacity: 1; pointer-events: all; }
    .modal-card {
      background: var(--white);
      border-radius: var(--radius-xl);
      padding: 2rem;
      width: 100%;
      max-width: 420px;
      box-shadow: var(--shadow-xl);
      border: 1px solid var(--border);
      transform: translateY(8px) scale(0.99);
      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
    }
    .modal-overlay.show .modal-card { transform: translateY(0) scale(1); }
    .modal-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
    .modal-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.3rem; }
    .modal-firma { font-size: 0.875rem; color: var(--purple); font-weight: 600; margin-bottom: 0.75rem; }
    .modal-body { font-size: 0.85rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 1.5rem; }
    .modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
    .btn-modal-cancel {
      padding: 0.6rem 1.25rem; border-radius: 8px;
      border: 1.5px solid var(--gray-200); background: #fff;
      color: var(--gray-700); cursor: pointer; font-family: inherit;
      font-size: 0.875rem; font-weight: 500; transition: all 0.15s;
    }
    .btn-modal-cancel:hover { background: var(--gray-100); }
    .btn-modal-confirm {
      padding: 0.6rem 1.25rem; border-radius: 8px; border: none;
      background: var(--red); color: #fff; cursor: pointer;
      font-family: inherit; font-size: 0.875rem; font-weight: 600;
      min-width: 120px; transition: all 0.15s;
    }
    .btn-modal-confirm:hover { background: #DC2626; }
    .btn-modal-confirm:disabled { opacity: 0.6; cursor: not-allowed; }
    .actions-dropdown-item--danger { color: var(--red) !important; }
    .actions-dropdown-item--danger:hover { background: var(--red-bg) !important; }
    .btn-danger { background: var(--red-bg) !important; color: var(--red) !important; border: 1.5px solid var(--red) !important; }
    .btn-danger:hover { background: var(--red) !important; color: #fff !important; }

    /* ── Wizard Layout ─────────────────────────────────────── */
    .wizard-layout {
      display: grid;
      grid-template-columns: 38fr 62fr;
      gap: 2rem;
      align-items: start;
    }

    /* Wizard tab: wider container so 38/62 split has room to breathe */
    body:has(#tab-new-offer.active) .main {
      max-width: 1680px;
      padding-left: 1.5rem;
      padding-right: 1.5rem;
    }

    .wizard-form-col {
      display: flex;
      flex-direction: column;
      gap: 0.875rem;
    }

    .wizard-preview-col {
      position: sticky;
      top: 76px; /* chrome pill (~56px) + breathing room */
    }

    .wizard-preview-sticky {
      max-height: calc(100vh - 100px);
      overflow-y: auto;
    }

    /* Wizard sections */
    .wizard-section {
      background: var(--white);
      border: 1px solid var(--gray-200);
      border-radius: 14px;
      padding: 1rem 1.25rem;
      box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    }

    .wizard-section-title {
      font-family: 'Quicksand', sans-serif;
      font-size: 0.875rem;
      font-weight: 700;
      color: var(--gray-900);
      margin-bottom: 0.75rem;
    }

    /* Wizard submit row */
    .wizard-submit-row {
      display: flex;
      gap: 0.75rem;
      padding: 0.25rem 0 1.5rem;
    }

    .wizard-submit-btn {
      width: auto !important;
      flex: 1;
    }

    /* Wizard errors */
    .wizard-error-list {
      background: var(--red-bg);
      border: 1px solid var(--red);
      border-radius: 10px;
      padding: 0.875rem 1rem;
      font-size: 0.875rem;
      color: var(--red);
      margin-bottom: 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    /* Angebotstyp badge (read-only, shown for zweiphasen) */
    .angebot-typ-badge {
      display: inline-flex;
      align-items: center;
      padding: 0.3rem 0.7rem;
      background: var(--purple-bg);
      border: 1.5px solid var(--purple-light);
      border-radius: 6px;
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--purple);
    }

    /* Add-ons list */
    .addons-list {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .addon-row {
      display: flex;
      align-items: center;
      gap: 0.625rem;
      cursor: pointer;
      padding: 0.5rem 0.75rem;
      border-radius: 8px;
      border: 1.5px solid var(--gray-200);
      transition: all 0.15s;
    }
    .addon-row:hover { border-color: var(--purple-light); background: var(--purple-bg); }
    .addon-row input[type="checkbox"] {
      width: 16px; height: 16px;
      accent-color: var(--purple);
      flex-shrink: 0;
    }
    .addon-info { display: flex; justify-content: space-between; align-items: center; flex: 1; }
    .addon-name { font-size: 0.875rem; color: var(--gray-700); font-weight: 500; }
    .addon-price { font-size: 0.8125rem; color: var(--purple); font-weight: 600; }

    /* Scope items */
    .scope-items-container {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      margin-bottom: 0.25rem;
    }

    .scope-item-card {
      display: grid;
      grid-template-columns: 1.25rem 1fr auto;
      gap: 0.5rem;
      align-items: start;
      padding: 0.5rem 0.75rem;
      background: var(--white);
      border: 1px solid var(--gray-200);
      border-radius: 8px;
      transition: border-color 0.15s;
    }
    .scope-item-card:focus-within {
      border-color: var(--purple-light);
    }
    .scope-item-num {
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--purple);
      padding-top: 0.2rem;
      line-height: 1;
    }
    .scope-item-fields {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      min-width: 0;
    }
    .scope-item-title-input {
      width: 100%;
      border: none;
      outline: none;
      background: transparent;
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--gray-900);
      line-height: 1.4;
      resize: none;
      padding: 0;
      font-family: inherit;
      overflow: hidden;
    }
    .scope-item-title-input::placeholder { color: var(--gray-400); }
    .scope-item-desc-input {
      width: 100%;
      border: none;
      outline: none;
      background: transparent;
      font-size: 0.75rem;
      color: var(--gray-500);
      line-height: 1.4;
      resize: none;
      padding: 0;
      font-family: inherit;
      overflow: hidden;
      max-height: 2.8em;
    }
    .scope-item-desc-input:focus { max-height: none; }
    .scope-item-desc-input::placeholder { color: var(--gray-300); }
    .scope-item-remove {
      background: none; border: none; cursor: pointer;
      color: var(--gray-300); font-size: 1rem; line-height: 1;
      padding: 0 0.25rem; border-radius: 4px; flex-shrink: 0;
      transition: color 0.15s; margin-top: 0.1rem;
    }
    .scope-item-remove:hover { color: var(--red); }

    .scope-empty {
      font-size: 0.8125rem;
      color: var(--gray-400);
      padding: 0.5rem 0;
    }

    /* Anrede options */
    .anrede-options {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.75rem;
    }

    .anrede-option {
      display: flex;
      align-items: flex-start;
      gap: 0.625rem;
      padding: 0.875rem;
      border: 1.5px solid var(--gray-200);
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.15s;
    }
    .anrede-option:hover { border-color: var(--purple-light); }
    .anrede-option input[type="radio"] {
      margin-top: 0.125rem;
      accent-color: var(--purple);
      flex-shrink: 0;
    }
    .anrede-option input[type="radio"]:checked + .anrede-option-body { color: var(--purple-dark); }
    .anrede-option:has(input:checked) { border-color: var(--purple); background: var(--purple-bg); }

    .anrede-option-title { font-weight: 600; font-size: 0.9375rem; }
    .anrede-option-desc { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.125rem; }

    /* Logo upload */
    .logo-upload-area {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
      margin-top: 0.25rem;
    }
    .logo-loaded-indicator {
      font-size: 0.8125rem;
      color: var(--green);
      font-weight: 500;
    }

    /* Test-mode badge */
    .test-mode-badge {
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--yellow);
      color: #000;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      padding: 0.375rem 1rem;
      border-radius: 8px;
      margin-bottom: 1rem;
    }

    /* Preview panel */
    .preview-inner { display: flex; flex-direction: column; gap: 0; }
    .preview-title {
      font-family: 'Quicksand', sans-serif;
      font-size: 0.875rem;
      font-weight: 700;
      color: var(--gray-900);
      margin-bottom: 0.875rem;
      padding-bottom: 0.625rem;
      border-bottom: 1px solid var(--gray-100);
    }
    .preview-placeholder {
      font-size: 0.8125rem;
      color: var(--gray-400);
      line-height: 1.6;
    }
    .preview-section {
      padding: 0.625rem 0;
      border-bottom: 1px solid var(--gray-50);
    }
    .preview-section:last-child { border-bottom: none; }
    .preview-section-label {
      font-size: 0.6875rem;
      font-weight: 600;
      color: var(--gray-400);
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin-bottom: 0.375rem;
    }
    .preview-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.5rem;
      padding: 0.1875rem 0;
    }
    .preview-key { font-size: 0.75rem; color: var(--gray-500); flex-shrink: 0; }
    .preview-val { font-size: 0.75rem; color: var(--gray-900); font-weight: 500; text-align: right; }
    .preview-price { color: var(--purple); font-weight: 700; font-size: 0.875rem; }
    .preview-addon { font-size: 0.75rem; color: var(--purple-dark); }
    .preview-scope-ul {
      list-style: none; padding: 0; margin: 0.25rem 0 0;
      display: flex; flex-direction: column; gap: 0.25rem;
    }
    .preview-scope-ul li {
      font-size: 0.75rem; color: var(--gray-600);
      padding-left: 0.875rem; position: relative;
    }
    .preview-scope-ul li::before {
      content: ''; position: absolute; left: 0; top: 0.45em;
      width: 5px; height: 5px; border-radius: 50%;
      background: var(--purple-light);
    }

    /* Wizard progress screen */
    @keyframes spin { to { transform: rotate(360deg); } }

    .wizard-progress-screen {
      display: flex; align-items: center; justify-content: center;
      min-height: 400px; padding: 3rem 1rem;
    }
    .wizard-progress-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 2.5rem;
      min-width: 300px;
      box-shadow: var(--shadow-md);
      text-align: center;
    }
    .wizard-progress-spinner {
      width: 40px; height: 40px;
      border: 3px solid var(--gray-200);
      border-top-color: var(--purple);
      border-radius: 50%;
      animation: spin 0.75s linear infinite;
      margin: 0 auto 1.5rem;
    }
    .wizard-progress-title {
      font-family: 'Quicksand', sans-serif;
      font-size: 1.125rem; font-weight: 700;
      color: var(--gray-900); margin-bottom: 1.25rem;
    }
    .wizard-progress-steps { display: flex; flex-direction: column; gap: 0.375rem; text-align: left; }
    .wizard-progress-step {
      font-size: 0.875rem; color: var(--gray-400);
      padding: 0.4rem 0.625rem;
      border-radius: var(--radius-sm);
      transition: all 0.2s;
    }
    .wizard-progress-step.step-active {
      color: var(--purple); font-weight: 600;
      background: var(--purple-bg);
    }
    .wizard-progress-step.step-done { color: var(--green); }

    /* Wizard success screen */
    .wizard-success-screen { max-width: 640px; margin: 0 auto; }

    /* Mobile preview toggle */
    .preview-mobile-toggle {
      display: none;
      position: fixed;
      bottom: 1.25rem;
      right: 1.25rem;
      z-index: 300;
      background: var(--purple);
      color: var(--white);
      border: none; border-radius: 100px;
      padding: 0.625rem 1.125rem;
      font-family: inherit; font-size: 0.875rem; font-weight: 600;
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(139,92,246,0.35);
    }

    /* Mobile ≤ 900px */
    @media (max-width: 900px) {
      .wizard-layout {
        grid-template-columns: 1fr;
      }

      .wizard-preview-col {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 300;
        background: var(--white);
        border-top: 1px solid var(--gray-200);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      }

      .wizard-preview-col.mobile-open {
        transform: translateY(0);
      }

      .wizard-preview-sticky {
        border: none;
        border-radius: 0;
        box-shadow: none;
        max-height: 60vh;
        padding: 1.25rem 1.25rem 2rem;
      }

      .preview-mobile-toggle {
        display: flex;
        align-items: center;
        gap: 0.375rem;
      }

      .anrede-options {
        grid-template-columns: 1fr;
      }
    }

/* -- Confirm Payment Modal -------------------------------- */
.modal-betrag {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  text-align: center;
  margin-bottom: 0.5rem;
}

.btn-modal-green {
  background: var(--green);
  color: var(--white);
}

.btn-modal-green:hover {
  background: #059669;
}

/* -- Reminder Pause Modal --------------------------------- */
.pause-quick-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.pause-quick-btn {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pause-quick-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.pause-quick-btn.selected {
  border-color: var(--purple);
  background: var(--purple-bg);
  color: var(--purple-dark);
}

.pause-custom-row {
  margin-bottom: 0.75rem;
}

.pause-custom-row input {
  max-width: 200px;
  margin: 0 auto;
  display: block;
}

.pause-until-preview {
  font-size: 0.8125rem;
  color: var(--gray-500);
  text-align: center;
  min-height: 1.25rem;
  margin-bottom: 0.25rem;
}

/* -- Wizard Doc-Preview ----------------------------------- */
/* ── PDF Preview iframe ── */
#wizard-pdf-iframe {
  height: calc(100vh - 120px);
  min-height: 500px;
  display: block;
  transition: opacity 0.3s;
}

#wizard-pdf-iframe.pdf-loading {
  opacity: 0.5;
}

/* ── Preview Panel — elegant clip, shadow only when PDF is loaded ── */
#wizard-preview-panel {
  border-radius: 12px;
  overflow: hidden;
}

#wizard-preview-panel.has-pdf {
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.15);
}

/* ── Preview Loading Spinner ── */
#wizard-preview-spinner {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 320px;
}

#wizard-preview-spinner.is-visible {
  display: flex;
}

.preview-ring-spinner {
  position: relative;
  width: 36px;
  height: 36px;
}

.preview-ring-spinner::before,
.preview-ring-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
}

.preview-ring-spinner::before {
  border-color: var(--gray-200);
}

.preview-ring-spinner::after {
  border-top-color: var(--purple);
  animation: spin 0.75s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.preview-spinner-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.01em;
}

.wizard-preview-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.wizard-preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pdf-preview-status {
  font-size: 0.6875rem;
  color: var(--gray-400);
}
