@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* =============================================================================
   xirql — common.css
   CI palette v1.0: violet #7059A6 (primary, icon, CTA),
   indigo #231F42 (wordmark, info), jade #2F8F6F (success).
   ========================================================================== */
:root {
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  /* ── Brand ─────────────────────────────────────────────────────────────── */
  --brand-primary:  #7059A6;
  --brand-secondary: #231F42;
  --brand-error:    #A63B52;
  --brand-violet:   var(--brand-primary);
  --brand-emerald:  #2F8F6F;
  --brand-rose:     var(--brand-error);
  /* Compatibility aliases used by existing components. */
  --brand-indigo:   var(--brand-secondary);
  --brand-purple:   var(--brand-secondary);
  --brand-magenta:  var(--brand-primary);
  --gradient-brand: #7059A6;

  /* ── Primary action ──────────────────────────────────────────── */
  --color-primary:        #7059A6;
  --color-primary-hover:  #5E4A8F;
  --color-primary-light:  rgba(112, 89, 166, 0.09);
  --color-primary-ring:   rgba(112, 89, 166, 0.24);
  --color-primary-soft:   #F1EEF6;

  /* ── Background & surfaces ─────────────────────────────────────────────── */
  --color-bg:       #FFFFFF;
  --color-surface:  #FFFFFF;

  /* ── Text ───────────────────────────────────────────────────────────────── */
  --color-brand:      #231F42;
  --color-text:       #0B0B0B;
  --color-text-muted: #5B5B5B;

  /* ── Border ─────────────────────────────────────────────────────────────── */
  --color-border: #E6E6E6;

  /* ── Semantic ───────────────────────────────────────────────────────────── */
  --color-success: #2F8F6F;
  --color-success-text: #1B5943;
  --color-success-tint: #E2F1EC;
  --color-warning: #B8843E;
  --color-warning-text: #6E4A1E;
  --color-warning-tint: #F6EDDB;
  --color-danger:  #A63B52;
  --color-danger-text: #6B2233;
  --color-danger-tint: #F5E4E8;
  --color-info:    #231F42;
  --color-info-text: #17142B;
  --color-info-tint: #E9E9EC;
  --color-neutral-tint: #EFEFEF;
  /* Charts: one CI hue per series; dark mode uses the lighter text variants for contrast. */
  --color-chart-neutral: #5B5B5B;
  --color-chart-info: #231F42;
  --color-chart-primary: #7059A6;
  --color-chart-success: #2F8F6F;
  --color-chart-warning: #B8843E;
  --color-chart-danger: #A63B52;
  --color-chart-muted: #3A3A3A;
  --color-ai:      #7059A6;
  --color-conversion: #2F8F6F;
  --color-emerald-light: #E2F1EC;
  --color-emerald-ring: rgba(47, 143, 111, 0.24);
  --color-hardstop:   #A63B52;

  /* ── Logomark loader ───────────────────────────────────────────────────── */
  --logomark-color: var(--color-primary);
  --logomark-alpha: 0.745;
  --logomark-size: 20px;
  --logomark-duration: 2s;
  --logomark-travel: 39.645%;
  --logomark-squeeze: 0.8;
  --logomark-ease: cubic-bezier(0.6, 0, 0.08, 1);
  --logomark-half: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%23000' d='M 20.2 8.6 L 33.3 8.6 L 54.8 12.6 L 67.3 16.7 L 76.8 20.7 L 84.6 24.8 L 91.5 28.8 L 97.6 32.8 L 103.4 37.9 L 108.1 41.9 L 112.1 46.0 L 115.6 50.0 L 118.6 54.0 L 121.2 58.1 L 123.8 62.1 L 126.1 66.2 L 127.9 70.2 L 129.5 74.2 L 130.9 78.3 L 131.9 82.3 L 132.7 86.4 L 133.3 90.4 L 133.7 94.4 L 134.3 98.5 L 134.1 102.5 L 133.3 106.6 L 133.1 110.6 L 132.3 114.6 L 131.5 118.7 L 130.3 122.7 L 128.9 126.8 L 127.1 130.8 L 125.0 134.8 L 122.6 138.9 L 120.0 142.9 L 117.0 147.0 L 113.9 151.0 L 110.1 155.0 L 106.1 159.1 L 101.6 163.1 L 96.4 167.2 L 90.5 171.2 L 83.6 175.2 L 75.6 179.3 L 65.7 183.3 L 52.3 187.4 L 36.4 190.4 L 20.2 190.4 Z'/%3E%3C/svg%3E");
  --logomark-mark: url('../images/xirql-logomark.svg');

  /* Guided tours use dedicated contrast-safe colors in both themes. */
  --tour-surface: #FFFFFF;
  --tour-text: #0F172A;
  --tour-text-muted: #5B5B5B;
  --tour-border: #E2E8F0;

  /* ── Radius ─────────────────────────────────────────────────────────────── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* ── Spacing ─────────────────────────────────────────────────────────────── */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* ── Shadows (neutral, low-noise) ──────────────────────────────────────────────── */
  --shadow-sm: 0 1px 3px rgba(11, 11, 11, 0.04);
  --shadow-md: 0 1px 3px rgba(11, 11, 11, 0.06);
  /* Floating menus / popovers (avatar menu, row context menus, dropdowns) */
  --shadow-lg: 0 12px 32px rgba(11, 11, 11, 0.18), 0 2px 8px rgba(11, 11, 11, 0.10);

  /* ── Layering ────────────────────────────────────────────────────────────── */
  --z-modal: 10050;
  --z-autocomplete: 10060;
  --z-toast: 10100;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-primary: #7059A6;
  --brand-secondary: #231F42;
  --brand-error: #A63B52;
  --color-bg: #0F0D1C;
  --color-surface: #171426;
  --color-brand: #F4F3F1;
  --color-text: #F4F3F1;
  --color-text-muted: #9A96AC;
  --color-border: #28243A;
  --color-primary: #7059A6;
  --color-primary-hover: #8674B8;
  --color-primary-light: rgba(112, 89, 166, .38);
  --color-primary-ring: rgba(199, 190, 224, .32);
  --color-primary-soft: rgba(112, 89, 166, .28);
  --color-success: #2F8F6F;
  --color-success-text: #8FCBB5;
  --color-success-tint: rgba(47, 143, 111, .28);
  --color-warning: #B8843E;
  --color-warning-text: #D6B57C;
  --color-warning-tint: rgba(184, 132, 62, .28);
  --color-danger: #A63B52;
  --color-danger-text: #D48A9B;
  --color-danger-tint: rgba(166, 59, 82, .32);
  --color-info: #231F42;
  --color-info-text: #C7BEE0;
  --color-info-tint: rgba(112, 89, 166, .22);
  --color-neutral-tint: rgba(255, 255, 255, .10);
  --color-chart-neutral: #C7C9D1;
  --color-chart-info: #C7BEE0;
  --color-chart-primary: #7059A6;
  --color-chart-success: #8FCBB5;
  --color-chart-warning: #D6B57C;
  --color-chart-danger: #D48A9B;
  --color-chart-muted: #9A96AC;
  --color-ai: #C7BEE0;
  --color-conversion: #8FCBB5;
  --color-emerald-light: rgba(47, 143, 111, .28);
  --color-emerald-ring: rgba(143, 203, 181, .32);
  --color-hardstop: #D48A9B;
  --tour-surface: #171426;
  --tour-text: #F4F3F1;
  --tour-text-muted: #9A96AC;
  --tour-border: #28243A;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .20);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, .28);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select { color-scheme: dark; }
:root[data-theme="dark"] .campaign-brief-processing { background: rgba(23, 32, 51, .96); }

* { box-sizing: border-box; }

/* Ensure [hidden] always wins over any display rule */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

.simulation-banner {
  grid-column: 1 / -1;
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: 1400;
  color: #fff;
  background: var(--color-primary);
}
.simulation-banner__content {
  min-height: 44px;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
}
.simulation-banner__timer { font-variant-numeric: tabular-nums; }
.simulation-banner__stop {
  color: var(--color-primary);
  background: #fff;
  border-color: rgba(255, 255, 255, .8);
}
.simulation-banner__stop:hover { background: var(--color-primary-soft); }

@media (max-width: 700px) {
  .simulation-banner__content { flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px; }
  .simulation-banner__content > span:not(.simulation-banner__timer) { width: 100%; text-align: center; }
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

/* A very light tint behind the content area on every app page, so white cards/tiles
   stand out. Scoped to pages with the app shell (nav), so login/auth screens keep
   their plain background. */
:root:not([data-theme="dark"]) body:has(#topNav) {
  background: color-mix(in srgb, var(--color-primary) 2.5%, var(--color-bg));
}

/* Reserve nav height immediately so content doesn't jump above an empty header.
   Show a full-page spinner until nav.js finishes mounting (#topNav pages only). */
#topNav {
  min-height: 60px;
}
html:not(.app-ready):has(#topNav) #topNav,
html:not(.app-ready):has(#topNav) .page-container,
html:not(.app-ready):has(#topNav) .dashboard-container {
  visibility: hidden;
}
html:not(.app-ready):has(#topNav) body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--color-bg);
}
html.page-leaving {
  cursor: progress;
}
html.page-leaving body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: var(--color-bg);
  pointer-events: none;
}
html.page-leaving body::after {
  pointer-events: none;
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10041;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: none;
  border-radius: 0;
  background: var(--color-primary);
  opacity: var(--logomark-alpha);
  -webkit-mask: var(--logomark-mark) center / contain no-repeat;
  mask: var(--logomark-mark) center / contain no-repeat;
  transform-origin: 50% 50%;
  animation: logomark-squeeze var(--logomark-duration) infinite;
}
@media (prefers-reduced-motion: reduce) {
  html.page-leaving body::after {
    animation: none;
    opacity: 0.7;
  }
}
html:not(.app-ready):has(#topNav) body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: none;
  border-radius: 0;
  background: var(--color-primary);
  opacity: var(--logomark-alpha);
  -webkit-mask: var(--logomark-mark) center / contain no-repeat;
  mask: var(--logomark-mark) center / contain no-repeat;
  transform-origin: 50% 50%;
  animation: logomark-squeeze var(--logomark-duration) infinite;
}
@media (prefers-reduced-motion: reduce) {
  html:not(.app-ready):has(#topNav) body::after {
    animation: none;
    opacity: 0.7;
  }
}

h1 { font-size: 24px; font-weight: 700; margin: 0 0 var(--space-xs); color: var(--color-text); }
h2 { font-size: 20px; font-weight: 700; margin: 0 0 var(--space-xs); }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 var(--space-xs); }
h4 { font-size: 16px; font-weight: 600; margin: 0 0 var(--space-xs); }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.text-muted { font-size: 13px; color: var(--color-text-muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --- Layout ---------------------------------------------------------------- */
.page-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--space-lg);
  box-sizing: border-box;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: var(--space-md);
}

.skip-link { position: fixed; left: 12px; top: 8px; z-index: 5000; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-primary); font-weight: 700; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  background: transparent;
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn .spinner {
  --logomark-size: 14px;
  --logomark-color: currentColor;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-gradient {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
}
.btn-gradient:hover { opacity: 0.9; }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover { background: var(--color-bg); }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-block { width: 100%; }

/* --- Forms ----------------------------------------------------------------- */
.form-group { margin-bottom: var(--space-md); }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-textarea { min-height: 120px; padding: var(--space-sm); resize: vertical; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-ring);
}

/* Reply of the assistant that waits in a chat field for the user to send it. */
.ai-draft-field,
.ai-draft-field:focus {
  border-color: var(--color-ai);
}
.ai-draft-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--color-text);
}
.ai-draft-note[hidden] { display: none; }
.ai-draft-label { min-width: 0; font-weight: 600; }
.ai-draft-meta { font-weight: 400; color: var(--color-text-muted); }
.ai-draft-actions { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ai-draft-action {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.ai-draft-action:hover { color: var(--color-text); }

.chat-reason {
  margin: 0;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
}
.chat-reason p { margin: 0 0 8px; }
.chat-reason p:last-child { margin-bottom: 0; }
.chat-reason p:has(> strong:only-child) {
  margin: 16px 0 6px;
}
.chat-reason p:first-child:has(> strong:only-child) { margin-top: 0; }
.chat-reason strong {
  font-weight: 700;
  color: var(--color-text);
}
.chat-reason ul,
.chat-reason ol {
  margin: 0 0 12px;
  padding-left: 18px;
}
.chat-reason li { margin: 0 0 4px; }
.chat-reason li:last-child { margin-bottom: 0; }

.password-field {
  position: relative;
  display: block;
}
.password-field .form-input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted, #6b7280);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.password-toggle:hover {
  color: var(--color-text);
  background: var(--color-bg, #f3f4f6);
}
.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-ring);
}

/* --- Badges / pills -------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: var(--color-success-tint); color: var(--color-success-text); }
.badge-danger  { background: var(--color-danger-tint); color: var(--color-danger-text); }
.badge-warn    { background: var(--color-warning-tint); color: var(--color-warning-text); }
.badge-muted   { background: var(--color-neutral-tint); color: var(--color-text-muted); }
.badge-brand   { background: var(--color-primary-light); color: var(--color-primary); }
.badge-score-top { background: var(--color-info-tint); color: var(--color-info-text); }
.badge-score-fit { background: var(--color-success-tint); color: var(--color-success-text); }
.badge-score-potential { background: var(--color-warning-tint); color: var(--color-warning-text); }
.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-neutral-tint);
  color: var(--color-text-muted);
}
.role-badge.--root  { background: var(--color-primary-light); color: var(--color-primary); }
.role-badge.--admin,
.role-badge.--agent { background: var(--color-neutral-tint); color: var(--color-text); }

:root[data-theme="dark"] .badge-success {
  background: var(--color-success-tint);
  color: var(--color-success-text);
}

.data-table-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.data-table-search { width: min(280px, 100%); }
.data-table-filter { width: auto; min-width: 150px; }
.data-table-count {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  white-space: nowrap;
}
.data-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}
.data-table-sort-icon::before { content: '↕'; color: var(--color-text-muted); font-size: 11px; }
th[aria-sort="ascending"] .data-table-sort-icon::before { content: '↑'; color: var(--color-primary); }
th[aria-sort="descending"] .data-table-sort-icon::before { content: '↓'; color: var(--color-primary); }
@media (max-width: 700px) {
  .data-table-tools { align-items: stretch; }
  .data-table-search, .data-table-filter { width: 100%; }
  .data-table-count { width: 100%; }
}
:root[data-theme="dark"] .badge-danger {
  background: var(--color-danger-tint);
  color: var(--color-danger-text);
}
:root[data-theme="dark"] .badge-warn {
  background: var(--color-warning-tint);
  color: var(--color-warning-text);
}
:root[data-theme="dark"] .badge-muted {
  background: var(--color-neutral-tint);
  color: var(--color-text-muted);
}
.chat-workspace-lock {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-info-tint);
  color: var(--color-info-text);
  font-size: 13px;
  line-height: 1.4;
}
.detail-tab-pane--chat.--workspace-locked .chat-message-group,
.detail-tab-pane--chat.--workspace-locked .chat-subject-group,
.detail-tab-pane--chat.--workspace-locked .chat-editor-toolbar {
  opacity: 0.55;
}
:root[data-theme="dark"] .badge-brand {
  background: var(--color-primary-light);
  color: #C7BEE0;
}
:root[data-theme="dark"] .badge-score-top {
  background: var(--color-info-tint);
  color: var(--color-info-text);
}
:root[data-theme="dark"] .badge-score-fit {
  background: var(--color-success-tint);
  color: var(--color-success-text);
}
:root[data-theme="dark"] .badge-score-potential {
  background: var(--color-warning-tint);
  color: var(--color-warning-text);
}

/* --- App shell: left sidebar + top-right elements -------------------------- */
body {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
#topNav { grid-column: 1; grid-row: 1 / span 2; }
#appTopbar { grid-column: 2; grid-row: 1; }
main.page-container { grid-column: 2; grid-row: 2; width: 100%; min-width: 0; }

/* Simulation banner is prepended to body; reserve a full-width row above the app shell. */
body:has(#simulationBanner) {
  grid-template-rows: auto auto 1fr;
}
body:has(#simulationBanner) #topNav { grid-row: 2 / span 2; }
body:has(#simulationBanner) #appTopbar { grid-row: 2; }
body:has(#simulationBanner) main.page-container { grid-row: 3; }

.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 220px;
  padding: var(--space-md) var(--space-sm);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  z-index: 50;
  transition: width 0.18s ease;
}
.app-sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.app-sidebar-head .brand-lockup { flex: 1 1 auto; min-width: 0; }
.app-sidebar-head-actions {
  display: none;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-mobile-drawer {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: var(--space-sm);
}
.nav-mobile-extras-slot { display: none; }
.nav-mobile-backdrop { display: none; }
.nav-workspace-extras {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}
.app-sidebar.--collapsed { width: 64px; }
.brand-lockup  { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 var(--space-xs); }
.app-sidebar .brand-lockup { cursor: pointer; pointer-events: auto; }
.app-sidebar .brand-lockup:hover { text-decoration: none; }
.brand-logo    { width: auto; height: 22px; border-radius: 0; display: block; flex-shrink: 0; background: transparent; object-fit: contain; }
.brand-logo--lockup-on-dark,
.brand-logo--mark { display: none; }
:root[data-theme="dark"] .brand-logo--lockup { display: none; }
:root[data-theme="dark"] .brand-logo--lockup-on-dark { display: block; }

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--color-brand);
  white-space: nowrap;
}
.brand-subtitle { font-size: 12px; color: var(--color-text-muted); margin-left: 2px; white-space: nowrap; }

.app-nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.top-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.top-nav-link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}
.top-nav-link.--active,
.top-nav-link[aria-current='page'] {
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.top-nav-link.--coach-pulse { background: var(--color-primary-light); color: var(--color-primary); }
.coach-nav-badge {
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-on-primary, #fff);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.coach-nav-badge[hidden] { display: none; }
.coach-nav-copy { display: flex; flex-direction: column; min-width: 0; padding: 6px 0; }
.coach-nav-copy small { color: var(--color-primary); font-size: 11px; font-weight: 500; line-height: 1.4; }
.coach-nav-copy small[hidden] { display: none; }
.top-nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: currentColor;
}
.top-nav-link-icon :is(svg) { width: 18px; height: 18px; }
.top-nav-link-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Eingeklappt (nur Desktop): nur Icons / Logomark */
@media (min-width: 901px) {
  .app-sidebar.--collapsed .brand-name,
  .app-sidebar.--collapsed .brand-subtitle,
  .app-sidebar.--collapsed .brand-logo--lockup,
  .app-sidebar.--collapsed .brand-logo--lockup-on-dark,
  :root[data-theme="dark"] .app-sidebar.--collapsed .brand-logo--lockup,
  :root[data-theme="dark"] .app-sidebar.--collapsed .brand-logo--lockup-on-dark { display: none; }
  .app-sidebar.--collapsed .top-nav-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .app-sidebar.--collapsed .brand-logo--mark { display: block; }
  .app-sidebar.--collapsed .brand-lockup { justify-content: center; padding: 0; }
  .app-sidebar.--collapsed .top-nav-link { justify-content: center; padding: 0; }
  .app-sidebar.--collapsed .coach-nav-badge { position: absolute; top: 2px; right: 2px; margin-left: 0; }
  .app-sidebar.--collapsed .coach-nav-copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
}

/* Einklapp-Button (Desktop) */
.app-sidebar-toggle {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.app-sidebar-toggle:hover { background: var(--color-primary-light); color: var(--color-primary); }
.app-sidebar-toggle-icon { display: inline-flex; }
.app-sidebar-toggle-icon :is(svg) { width: 16px; height: 16px; }
.app-sidebar.--collapsed .app-sidebar-toggle { padding: 0; }

.app-topbar-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
/* Open topbar dropdowns (user menu, notifications, pickers) must stay above the focus-mode / daily-tasks overlay. */
#appTopbar:has(.--open),
.app-topbar-right:has(.--open) {
  z-index: var(--z-modal);
}
.app-topbar-context,
.app-topbar-controls {
  display: flex;
  align-items: center;
  min-width: 0;
}
.app-topbar-context {
  gap: var(--space-md);
  flex: 1 1 auto;
}
.app-topbar-page-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.app-topbar-page-tools:empty {
  display: none;
}
.app-topbar-controls {
  justify-content: flex-end;
  gap: var(--space-md);
  flex: 0 0 auto;
}
.app-topbar-title {
  margin: 0;
  color: var(--color-text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}
.app-topbar-actions #notifBtn { order: 1; }
.app-topbar-actions .nav-user-menu { order: 2; }
.nav-mobile-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); }
.nav-mobile-toggle span { width: 20px; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }

/* Shared nav chip — company picker, work-as picker, connection counter */
.nav-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nav-picker-chip .picker-chevron {
  flex-shrink: 0;
  transition: transform 0.18s;
  opacity: 0.5;
}
.nav-picker-chip .picker-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-conn-counter {
  display: inline-flex;
  align-items: center;
  cursor: default;
  user-select: none;
  overflow: visible;
  gap: 8px;
}
.nav-conn-counter .picker-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow: visible;
}
.nav-conn-counter-sep {
  opacity: 0.5;
}
.nav-quota-segment {
  gap: 4px !important;
}
.nav-quota-segment.--weekly-limit {
  color: var(--color-danger);
  cursor: pointer;
}
.nav-quota-icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
  line-height: 0;
}
.nav-quota-icon svg {
  width: 14px;
  height: 14px;
}
.nav-quota-divider {
  opacity: 0.4;
  margin: 0 2px;
  user-select: none;
}

.nav-conn-limit {
  position: relative;
  cursor: help;
}

.nav-conn-limit[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  min-width: 180px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #0F172A;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  white-space: pre-line;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: opacity 0.15s ease, visibility 0.15s;
}

:root[data-theme="dark"] .nav-conn-limit[data-tooltip]::after {
  background: #1E293B;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.nav-conn-limit[data-tooltip]:hover::after,
.nav-conn-limit[data-tooltip]:focus-within::after {
  opacity: 1;
  visibility: visible;
}

.nav-conn-today {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.nav-conn-today:hover {
  color: var(--color-primary);
}

.nav-conn-counter.--linkedin-limit {
  color: var(--color-danger);
  border-color: color-mix(in srgb, var(--color-danger) 45%, var(--color-border));
  background: color-mix(in srgb, var(--color-danger) 8%, var(--color-surface));
}

.nav-conn-counter.--linkedin-limit .nav-conn-today,
.nav-conn-counter.--linkedin-limit .nav-conn-today:hover {
  color: var(--color-danger);
}

.nav-conn-counter.--linkedin-limit .nav-quota-icon {
  opacity: 1;
  color: var(--color-danger);
}

.conn-today-limit-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-danger-tint);
  border: 1px solid color-mix(in srgb, var(--color-danger) 35%, var(--color-border));
  color: var(--color-danger-text);
  font-size: 13px;
  line-height: 1.45;
}

.conn-today-limit-banner strong {
  display: block;
  margin-bottom: 6px;
}

.conn-today-limit-banner p {
  margin: 0;
  font-weight: 400;
}

.conn-today-limit-banner-link {
  color: var(--color-danger-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.conn-today-limit-banner-link:hover {
  text-decoration-thickness: 2px;
}

:root[data-theme="dark"] .conn-today-limit-banner a.conn-today-limit-banner-link,
:root[data-theme="dark"] .conn-today-limit-banner a.conn-today-limit-banner-link:hover {
  color: var(--color-danger-text);
}

.conn-today-limit-banner-retry {
  margin-top: 8px !important;
  font-weight: 600 !important;
}

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

.conn-today-table th,
.conn-today-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.conn-today-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.conn-today-table tfoot td {
  font-weight: 600;
  border-bottom: none;
  border-top: 1px solid var(--color-border);
}

.conn-today-count {
  width: 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.conn-today-row--muted td {
  color: var(--color-text-muted);
}

.conn-today-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.resource-owner-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--color-text-muted);
}
.resource-owner-label strong {
  color: var(--color-text);
  font-weight: 600;
}
.seq-card .resource-owner-label {
  margin: 0 0 6px;
}

/* ── Company picker (nav) ──────────────────────────────────────────────────── */
.nav-linkedin-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}
.nav-company-picker {
  position: relative;
}
.app-topbar-context .nav-company-picker-dropdown,
.app-topbar-context .nav-work-as-dropdown {
  right: auto;
  left: 0;
}
.nav-company-picker-btn {
  cursor: pointer;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-company-picker-btn:hover {
  border-color: var(--color-primary);
}
.nav-company-picker-btn .picker-chevron {
  flex-shrink: 0;
  transition: transform 0.18s;
  opacity: 0.5;
}
.nav-company-picker.--open .picker-chevron {
  transform: rotate(180deg);
}
.nav-company-picker-btn .picker-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-company-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 500;
  min-width: 240px;
  max-width: 320px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.nav-company-picker.--open .nav-company-picker-dropdown {
  display: flex;
}
.nav-company-search-wrap {
  padding: 8px 8px 4px;
  border-bottom: 1px solid var(--color-border);
}
.nav-company-search {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--color-text);
}
.nav-company-search:focus {
  border-color: var(--color-primary);
}
.nav-company-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}
.nav-company-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.1s;
  width: 100%; border: 0; background: transparent; text-align: left;
}
.nav-company-item:hover {
  background: var(--color-bg);
}
.nav-company-item.--active {
  color: var(--color-primary);
  font-weight: 600;
}
.nav-company-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  opacity: 0;
}
.nav-company-item.--active .nav-company-item-dot {
  opacity: 1;
}
.nav-company-empty {
  padding: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
}
/* single-company (non-switchable) label */
.nav-company-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

/* ── Work-as picker (nav) ──────────────────────────────────────────────────── */
.nav-work-as-picker {
  position: relative;
}
.company-advisor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.company-advisor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.nav-advisor-banner {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  color: var(--color-text);
  background: var(--color-surface);
  font-size: 13px;
  line-height: 1.4;
}
.nav-work-as-btn {
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-work-as-btn:hover {
  border-color: var(--color-primary);
}
.nav-work-as-picker.--acting .nav-work-as-btn {
  border-color: var(--color-primary);
}
.nav-work-as-picker.--open .nav-work-as-btn .picker-chevron {
  transform: rotate(180deg);
}
.nav-work-as-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  overflow: hidden;
}
.nav-work-as-picker.--open .nav-work-as-dropdown {
  display: flex;
  flex-direction: column;
}
.nav-work-as-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}
.nav-work-as-footer {
  padding: 8px 10px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}
.nav-work-as-footer .btn {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 12px;
}
.nav-work-as-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.12s;
}
.nav-work-as-item--check {
  cursor: pointer;
  user-select: none;
}
.nav-work-as-item--check input {
  flex-shrink: 0;
  margin: 0;
}
.nav-work-as-item--check:hover {
  background: var(--color-bg);
}
.nav-work-as-item--locked {
  opacity: 0.62;
  cursor: pointer;
}
.nav-work-as-item--locked input {
  pointer-events: none;
}
.nav-work-as-item--locked:hover {
  background: var(--color-bg);
}

.workspace-sharing-upsell-benefits {
  margin: 12px 0;
  padding-left: 1.2em;
}

.workspace-sharing-upsell-benefits li {
  margin: 6px 0;
}

.workspace-sharing-upsell-note {
  margin-top: 12px;
  font-weight: 600;
}

.nav-linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nav-linkedin-btn:disabled { opacity: 0.65; cursor: wait; }
.nav-linkedin-btn--connected {
  color: #1B5943;
  border-color: #A7F3D0;
  background: #f0fdf4;
}
.nav-linkedin-btn--connected:hover { background: #D1FAE5; }
.nav-linkedin-btn--disconnected {
  color: #9F1239;
  border-color: #fecdd3;
  background: #fff1f2;
  animation: nav-linkedin-disconnect-pulse 1.6s ease-in-out infinite;
}
.nav-linkedin-btn--disconnected:hover { background: #ffe4e6; }
@keyframes nav-linkedin-disconnect-pulse {
  0%, 100% {
    border-color: color-mix(in srgb, var(--color-danger) 35%, var(--color-border));
    box-shadow: 0 0 0 0 transparent;
  }
  50% {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-danger) 42%, transparent);
  }
}
@keyframes nav-linkedin-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.16); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-linkedin-btn--disconnected,
  .nav-linkedin-btn--disconnected .nav-linkedin-icon { animation: none; }
}
.nav-linkedin-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #0A66C2;  /* LinkedIn blue */
}
.nav-linkedin-btn--connected .nav-linkedin-icon { color: #2F8F6F; }
.nav-linkedin-btn--disconnected .nav-linkedin-icon {
  color: #A63B52;
  animation: nav-linkedin-icon-pulse 1.6s ease-in-out infinite;
}

.nav-linkedin-badge {
  display: inline-block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 99px;
  background: #D1FAE5;
  color: #1B5943;
  border: 1px solid #A7F3D0;
  line-height: 1.5;
}

:root[data-theme="dark"] .nav-linkedin-btn--connected {
  color: var(--color-success-text);
  border-color: color-mix(in srgb, var(--color-success) 35%, var(--color-border));
  background: color-mix(in srgb, var(--color-success) 12%, var(--color-surface));
}
:root[data-theme="dark"] .nav-linkedin-btn--connected:hover {
  background: color-mix(in srgb, var(--color-success) 20%, var(--color-surface));
}
:root[data-theme="dark"] .nav-linkedin-btn--connected .nav-linkedin-icon {
  color: var(--color-success-text);
}
:root[data-theme="dark"] .nav-linkedin-btn--disconnected {
  color: #FDA4AF;
  border-color: color-mix(in srgb, var(--color-danger) 35%, var(--color-border));
  background: color-mix(in srgb, var(--color-danger) 12%, var(--color-surface));
}
:root[data-theme="dark"] .nav-linkedin-btn--disconnected:hover {
  background: color-mix(in srgb, var(--color-danger) 20%, var(--color-surface));
}
:root[data-theme="dark"] .nav-linkedin-btn--disconnected .nav-linkedin-icon {
  color: #FDA4AF;
}
:root[data-theme="dark"] .nav-linkedin-badge {
  background: color-mix(in srgb, var(--color-success) 18%, var(--color-surface));
  color: var(--color-success-text);
  border-color: color-mix(in srgb, var(--color-success) 35%, var(--color-border));
}

/* ── LinkedIn picker / disconnect dropdown ─────────────────────────────── */
.nav-linkedin-picker {
  position: relative;
  display: inline-flex;
}
.nav-linkedin-picker .nav-linkedin-btn .picker-chevron {
  flex-shrink: 0;
  transition: transform 0.18s;
  opacity: 0.55;
  margin-left: 2px;
}
.nav-linkedin-picker.--open .nav-linkedin-btn .picker-chevron {
  transform: rotate(180deg);
}
.nav-linkedin-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 500;
  min-width: 240px;
  max-width: 320px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  padding: 4px;
}
.nav-linkedin-picker.--open .nav-linkedin-dropdown {
  display: flex;
}
.nav-linkedin-dropdown-header {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}
.nav-linkedin-dropdown-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted, var(--color-text));
  opacity: 0.75;
}
.nav-linkedin-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-linkedin-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
}
.nav-linkedin-dropdown-item:hover {
  background: var(--color-bg);
}
.nav-linkedin-dropdown-item--danger {
  color: var(--color-danger, #9F1239);
}
.nav-linkedin-dropdown-item--danger:hover {
  background: color-mix(in srgb, var(--color-danger, #9F1239) 12%, var(--color-surface));
}
.nav-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-icon-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}
.nav-icon-btn.--has-notifications {
  background: rgba(112, 89, 166, 0.08);
  border-color: rgba(112, 89, 166, 0.25);
  color: var(--color-primary);
}
.nav-bell-icon { width: 20px; height: 20px; display: block; }
.notifications-dot {
  position: absolute;
  top: 9px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 1.5px solid var(--color-surface);
}

/* --- Dropdown -------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0; top: calc(100% + 6px);
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
}
.dropdown-menu.--open { display: block; }
#userMenu {
  border-color: rgba(11, 11, 11, 0.16);
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] #userMenu {
  border-color: rgba(255, 255, 255, 0.18);
}
.dropdown-item {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.dropdown-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}
.nav-contact-credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 6px;
  padding: 9px 8px 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 12px;
}
.nav-contact-credits strong {
  color: var(--color-primary);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.theme-toggle-item {
  width: 100%;
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--color-text);
}
.theme-toggle-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.theme-toggle-item:hover .theme-toggle-icon,
.theme-toggle-item.--on .theme-toggle-icon {
  color: var(--color-primary);
}
.theme-toggle-glyph {
  width: 18px;
  height: 18px;
  display: block;
}
.theme-toggle-label {
  flex: 1;
  min-width: 0;
}
.theme-toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--color-border);
  transition: background 0.18s ease;
}
.theme-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22, 20, 42, 0.28);
  transition: transform 0.18s ease;
}
.theme-toggle-item.--on .theme-toggle-switch {
  background: var(--color-primary);
}
.theme-toggle-item.--on .theme-toggle-knob {
  transform: translateX(16px);
}
.theme-toggle-item:hover .theme-toggle-switch {
  background: var(--color-border);
}
.theme-toggle-item.--on:hover .theme-toggle-switch {
  background: var(--color-primary-hover);
}

/* Avatar button — gradient border ring */
.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  transition: opacity 0.15s ease;
}
.avatar-btn:hover { opacity: 0.85; }

.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Shared user avatars (nav, tables, profile) */
.user-avatar,
.user-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-avatar {
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}

.user-avatar-img {
  object-fit: cover;
  display: block;
}

.user-avatar-sm,
.user-avatar-sm.user-avatar-img {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.user-avatar-lg,
.user-avatar-lg.user-avatar-img {
  width: 72px;
  height: 72px;
  font-size: 28px;
}

.user-avatar-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

/* --- Icon buttons (tables, rows) ------------------------------------------- */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.btn-icon:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.btn-icon--danger { color: var(--color-text-muted); }
.btn-icon--danger:hover {
  color: var(--color-danger);
  border-color: rgba(225, 29, 72, 0.40);
  background: rgba(225, 29, 72, 0.07);
}
.btn-icon.--knowledge {
  color: #7059A6;
  border-color: #A99BCB;
  background: #F1EEF6;
}
.btn-icon.--knowledge:hover {
  color: #7059A6;
  border-color: #7059A6;
  background: #F1EEF6;
}

/* --- Data tables: edge-to-edge rows + uniform height ----------------------- */
.card .admin-table-wrap,
.card .companies-table-wrap,
.card #companiesList .companies-table-wrap,
.profile-section #companyMembersList {
  margin-left: calc(-1 * var(--space-lg));
  margin-right: calc(-1 * var(--space-lg));
  overflow-x: auto;
}

.card .admin-table-wrap .data-table-tools,
.card .companies-table-wrap .data-table-tools,
.card #companiesList .companies-table-wrap .data-table-tools,
.profile-section #companyMembersList .data-table-tools {
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.card .admin-table th:first-child,
.card .admin-table td:first-child,
.card .companies-table th:first-child,
.card .companies-table td:first-child,
.profile-section .company-members-table th:first-child,
.profile-section .company-members-table td:first-child {
  padding-left: var(--space-lg);
}

.card .admin-table th:last-child,
.card .admin-table td:last-child,
.card .companies-table th:last-child,
.card .companies-table td:last-child,
.profile-section .company-members-table th:last-child,
.profile-section .company-members-table td:last-child {
  padding-right: var(--space-lg);
}

.admin-table,
.companies-table,
.company-members-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-table th,
.admin-table td,
.companies-table th,
.companies-table td,
.company-members-table th,
.company-members-table td {
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
  box-sizing: border-box;
  padding: 12px;
}

.admin-table tbody tr:last-child td,
.companies-table tbody tr.company-row:last-child td,
.company-members-table tbody tr:last-child td {
  border-bottom: none;
}

/* Keep action cells as table cells — flex on td breaks row height and borders */
.admin-table td.admin-table-actions,
.companies-table td.company-row-actions,
.company-members-table td.company-table-actions {
  display: table-cell;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table td.admin-table-actions .btn-icon + .btn-icon,
.companies-table td.company-row-actions .btn-icon + .btn-icon,
.company-members-table td.company-table-actions .btn-icon + .btn-icon {
  margin-left: 4px;
}

/* --- Modal ----------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(22, 20, 42, 0.50);
  display: flex; align-items: center; justify-content: center;
  z-index: var(--z-modal); padding: var(--space-md);
}
/* Tall embedded frames scroll with the parent page, so a fixed overlay would
   sit at the bottom of the frame instead of on the visible screen. */
.modal-overlay.--frame-visible {
  position: absolute;
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
}
.modal-overlay.--frame-visible .modal {
  overflow: hidden;
  min-height: 0;
}
.modal-overlay.--frame-visible .modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}
/* Nested modals (e.g. checklist opened from campaign setup) */
#checklistOverlay.modal-overlay {
  z-index: calc(var(--z-modal) + 10);
}
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  min-width: 0;
  box-shadow: 0 20px 60px rgba(112, 89, 166, 0.18);
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}
.modal-header h2, .modal-header h3 {
  margin: 0;
  min-width: 0;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.modal-body { padding: var(--space-lg); overflow-y: auto; }
.modal--scroll-body {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.modal--scroll-body .modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
.modal-footer {
  display: flex; justify-content: flex-end; gap: var(--space-sm);
  padding: var(--space-lg);
  border-top: 1px solid var(--color-border);
}
.modal-close {
  background: transparent; border: none; cursor: pointer;
  font-size: 20px; color: var(--color-text-muted); line-height: 1;
  transition: color 0.12s ease;
  min-width: 44px; min-height: 44px;
}
.modal-close:hover { color: var(--color-primary); }

.closed-won-value-overlay { z-index: calc(var(--z-modal) + 20); }
.closed-won-value-modal { max-width: 440px; }
.closed-won-value-lead {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.closed-won-value-photo {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  overflow: hidden;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
}
.closed-won-value-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.closed-won-value-name {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}
.closed-won-value-company {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
}
.closed-won-value-copy {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.closed-won-value-error {
  min-height: 1.2em;
  margin: 6px 0 0;
  color: var(--color-danger-text);
  font-size: 13px;
}

.product-announce-modal { max-width: 560px; }
.product-announce-modal .modal-header > div { min-width: 0; }
.product-announce-kicker {
  margin: 0 0 4px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 700;
}
.product-announce-lead {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.product-announce-lead + .product-announce-points { margin-top: 16px; }
.product-announce-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.product-announce-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.product-announce-section:first-child {
  padding-top: 0;
  border-top: 0;
}
.product-announce-date {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text-muted);
}
.product-announce-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
.product-announce-section p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.product-announce-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.product-announce-points strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.product-announce-points span {
  display: block;
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

/* --- Product updates & NPS ------------------------------------------------ */
.design-update-overlay {
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(5px);
  animation: product-feedback-fade-in .18s ease-out;
}
.design-update-overlay.--leaving { opacity: 0; transition: opacity .18s ease; }
.design-update-modal {
  position: relative;
  max-width: 650px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  animation: design-update-enter .28s cubic-bezier(.2, .85, .3, 1);
}
.design-update-dismiss {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  color: #fff;
  background: rgba(15,23,42,.18);
  backdrop-filter: blur(8px);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .14s ease, transform .14s ease;
}
.design-update-dismiss:hover { background: rgba(15,23,42,.34); transform: scale(1.04); }
.design-update-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 116px;
  overflow: hidden;
  background: var(--color-primary);
}
.design-update-hero::before,
.design-update-hero::after {
  content: '';
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
}
.design-update-hero::before { left: -74px; top: -120px; }
.design-update-hero::after { right: -64px; bottom: -150px; }
.design-update-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #7059A6;
  background: #fff;
  box-shadow: 0 14px 34px rgba(46, 16, 101, .28);
  font-size: 29px;
  transform: rotate(-5deg);
}
.design-update-spark { position: absolute; border-radius: 50%; background: rgba(255,255,255,.78); }
.design-update-spark--one { width: 7px; height: 7px; left: 34%; top: 25%; }
.design-update-spark--two { width: 5px; height: 5px; right: 32%; bottom: 23%; }
.design-update-content { padding: 26px 30px 30px; }
.design-update-eyebrow,
.nps-kicker {
  margin: 0 0 7px;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.design-update-content h2 {
  margin: 0;
  color: var(--color-text);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: 25px;
  letter-spacing: -.025em;
}
.design-update-intro { margin: 9px 0 20px; color: var(--color-text-muted); line-height: 1.55; }
.design-update-list { display: grid; gap: 13px; margin: 0 0 24px; padding: 0; list-style: none; }
.design-update-list li { display: grid; grid-template-columns: 28px 1fr; gap: 11px; align-items: start; }
.design-update-list strong { display: block; margin: 1px 0 2px; color: var(--color-text); font-size: 14px; }
.design-update-list small { display: block; color: var(--color-text-muted); font-size: 12px; line-height: 1.42; }
.design-update-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-size: 13px;
  font-weight: 900;
}
.design-update-confirm { width: 100%; min-height: 44px; }

.nps-overlay {
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .24s ease;
}
.nps-overlay.--visible { opacity: 1; }
.nps-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  padding: 28px 30px 26px;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, var(--color-border));
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .24s ease, transform .3s cubic-bezier(.2, .85, .3, 1);
}
.nps-overlay.--visible .nps-panel { opacity: 1; transform: translateY(0) scale(1); }
.nps-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 22px;
  cursor: pointer;
}
.nps-close:hover { color: var(--color-primary); background: var(--color-primary-light); }
.nps-step { display: none; }
.nps-step.--active { display: block; animation: product-feedback-fade-in .18s ease-out; }
.nps-step h2 { max-width: 440px; margin: 0 28px 18px 0; color: var(--color-text); font-size: 19px; line-height: 1.35; letter-spacing: -.015em; }
.nps-step > p { margin: -9px 28px 16px 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.5; }
.nps-scores { display: grid; grid-template-columns: repeat(11, 1fr); gap: 5px; }
.nps-scores button {
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 700;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease, transform .12s ease;
}
.nps-scores button:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-1px); }
.nps-scores button.--selected { border-color: var(--color-primary); color: #fff; background: var(--color-primary); }
.nps-scale { display: flex; justify-content: space-between; gap: 16px; margin-top: 7px; color: var(--color-text-muted); font-size: 10px; }
.nps-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.nps-actions--split { justify-content: space-between; }
.nps-actions--dismiss { flex-direction: column; align-items: stretch; }
.nps-actions--dismiss .btn { width: 100%; min-height: 42px; }
.nps-dismiss-back { width: 100%; margin-top: 10px; }
.nps-comment { width: 100%; resize: vertical; }
.nps-thanks { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 110px; color: var(--color-text); }
.nps-thanks span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--color-success);
  font-size: 18px;
  font-weight: 900;
}
.nps-thanks strong { color: var(--brand-emerald); }

@keyframes design-update-enter {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes product-feedback-fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 600px) {
  .design-update-hero { min-height: 88px; }
  .design-update-mark { width: 48px; height: 48px; border-radius: 15px; font-size: 24px; }
  .design-update-content { padding: 21px 18px 20px; }
  .design-update-content h2 { font-size: 22px; }
  .nps-panel { padding: 22px 18px 18px; }
  .nps-scores { gap: 3px; }
  .nps-scores button { height: 32px; font-size: 12px; border-radius: 6px; }
}

.review-request-panel { width: min(640px, 100%); }
.review-request-panel h2 { max-width: none; margin: 0 28px 8px 0; color: var(--color-text); font-size: 19px; line-height: 1.35; }
.review-request-panel > p { margin: 0 28px 16px 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.5; }
.review-request-label,
.review-request-platforms-label { display: block; margin: 0 0 8px; color: var(--color-text); font-size: 13px; font-weight: 700; }
.review-request-quote-wrap { position: relative; margin-bottom: 16px; }
.review-request-quote { width: 100%; min-height: 96px; resize: vertical; padding-bottom: 40px; }
.review-request-quote-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  z-index: 2;
}
.review-request-quote-wrap.--pending .review-request-quote-loading { display: flex; }
.review-request-quote-wrap.--pending .review-request-copy { visibility: hidden; }
.review-request-copy {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: var(--color-surface);
}
.review-request-copy.--copied {
  color: var(--color-success-text);
  border-color: var(--color-success);
  background: var(--color-success-tint);
}
.review-request-platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.review-request-platform { width: 100%; min-height: 40px; text-align: center; }
.review-request-platform.--selected { border-color: var(--color-primary); color: var(--color-primary); }
.review-request-actions { display: grid; gap: 8px; }
.review-request-actions .btn { width: 100%; min-height: 42px; }

@media (max-width: 600px) {
  .review-request-platforms { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .design-update-overlay,
  .design-update-modal,
  .nps-overlay,
  .nps-step.--active { animation: none; }
  .nps-panel,
  .nps-overlay { transition: none; }
}

:where(button, a, input, select, textarea, [role='button'], [role='tab'], [tabindex]):focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

:root[data-theme="dark"] a:not(.btn):not(.top-nav-link):not(.dropdown-item):not(.nav-icon-btn):not(.my-posts__open):not(.drafts__published-link) {
  color: var(--color-ai);
}

.tabs-overflow-carousel {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.tabs-overflow-carousel:not(.--scrollable) .tabs-overflow-arrow,
.seq-builder-tabs-carousel:not(.--scrollable) .inbox-tabs-arrow,
.campaigns-subtabs-carousel:not(.--scrollable) .inbox-tabs-arrow {
  display: none;
}
.seq-builder-tabs-carousel,
.detail-tabs-carousel,
.campaigns-subtabs-carousel {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.seq-builder-tabs-carousel .seq-builder-tabs {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.seq-builder-tabs-carousel .seq-builder-tabs::-webkit-scrollbar { display: none; }
.inbox-tabs-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  color: var(--color-text);
  padding: 0;
  border-radius: var(--radius-sm);
}
.inbox-tabs-arrow:hover:not(:disabled) {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.inbox-tabs-arrow:disabled {
  opacity: 0.45;
  cursor: default;
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }
  body.nav-mobile-open { overflow: hidden; }
  #topNav { grid-column: 1; grid-row: 1; }
  #appTopbar { grid-column: 1; grid-row: 2; }
  main.page-container { grid-column: 1; grid-row: 3; }

  body:has(#simulationBanner) {
    grid-template-rows: auto auto auto 1fr;
  }
  body:has(#simulationBanner) #topNav { grid-row: 2; }
  body:has(#simulationBanner) #appTopbar { grid-row: 3; }
  body:has(#simulationBanner) main.page-container { grid-row: 4; }

  .app-sidebar {
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    height: auto;
    min-height: 56px;
    width: 100%;
    padding: 8px 12px;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    overflow: visible;
    position: relative;
    /* Keep the complete drawer above its sibling backdrop. The drawer's own
       z-index cannot escape this stacking context. */
    z-index: 10022;
  }
  .app-sidebar-head { width: 100%; }
  .app-sidebar-head-actions { display: flex; margin-left: auto; }
  .brand-lockup {
    flex: 1 1 auto;
    min-width: 0;
    pointer-events: auto;
    cursor: pointer;
  }
  .brand-subtitle { display: none; }
  .nav-mobile-toggle { display: inline-flex; margin-left: 0; }
  .app-sidebar-toggle { display: none; }
  .app-sidebar.--collapsed { width: 100%; }
  body.nav-mobile-open #topNav { z-index: 10020; position: relative; }
  .nav-mobile-drawer {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10022;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 12px;
    overflow-y: auto;
    gap: 12px;
    touch-action: manipulation;
  }
  .app-sidebar.--mobile-open .nav-mobile-drawer { display: flex; }
  .app-nav-links {
    display: flex;
    flex-direction: column;
    position: static;
    padding: 0;
    box-shadow: none;
    border: 0;
    gap: 4px;
  }
  .app-nav-links .top-nav-link {
    min-height: 44px;
    pointer-events: auto;
    touch-action: manipulation;
  }
  .nav-mobile-extras-slot,
  .nav-workspace-extras {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .nav-workspace-extras .nav-linkedin-row,
  .nav-workspace-extras .nav-company-picker,
  .nav-workspace-extras .nav-work-as-picker,
  .nav-workspace-extras .nav-picker-chip,
  .nav-workspace-extras .nav-linkedin-btn {
    width: 100%;
    max-width: none;
  }
  .nav-workspace-extras .nav-picker-chip,
  .nav-workspace-extras .nav-linkedin-btn {
    min-height: 44px;
  }
  .nav-mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10021;
    background: color-mix(in srgb, var(--color-text) 40%, transparent);
  }
  .nav-mobile-backdrop[hidden] { display: none; }
  .app-topbar-right {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 12px;
    min-height: 0;
  }
  .app-topbar-context { width: 100%; align-items: center; gap: 8px; }
  #appTopbar { overflow: visible; z-index: 30; }
  .app-topbar-title {
    width: auto;
    flex: 0 0 auto;
    font-size: 18px;
  }
  .app-topbar-page-tools {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
  }
  .app-topbar-page-tools .campaign-multi,
  .app-topbar-page-tools .campaign-multi-trigger {
    width: 100%;
    max-width: none;
    min-height: 36px;
  }
  .app-topbar-page-tools .campaign-multi-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
  .app-topbar-controls { display: none; }
  .app-sidebar-head-actions .nav-icon-btn,
  .app-sidebar-head-actions .avatar-btn { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
  .nav-company-picker-dropdown,
  .nav-work-as-dropdown,
  .nav-linkedin-dropdown {
    position: fixed;
    left: 8px;
    right: 8px;
    top: 68px;
    max-width: none;
  }

  .app-topbar-right.--user-menu-open .nav-user-menu { position: static; }
  .app-sidebar-head-actions #userMenu.--open,
  .app-topbar-right.--user-menu-open #userMenu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    right: 8px;
    top: 52px;
    width: min(280px, calc(100vw - 16px));
    min-width: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    background: var(--color-surface);
    z-index: 90;
  }
  .app-sidebar-head-actions #userMenu.--open .dropdown-item,
  .app-topbar-right.--user-menu-open #userMenu .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
  }

  .page-container { padding: 16px 12px; }
  .btn-icon, .icon-btn, .modal-close, .carousel-nav, .nav-icon-btn, .avatar-btn { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
  .targets-tab, .detail-tab, .seq-builder-tab, .admin-tab { min-height: 44px; }
  .login-remember-label input { width: 22px; height: 22px; }
}

.verify-banner {
  margin: 0 0 16px;
  padding: 10px 16px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-size: 14px;
}

/* Post-onboarding guided tour */
.top-nav-link.--tour-highlight,
.--tour-highlight {
  position: relative;
  z-index: 1202 !important;
  border-radius: 8px;
  animation: tour-pulse 1.35s ease-in-out infinite;
}

.top-nav-link.--tour-highlight {
  box-shadow: 0 0 0 3px var(--color-primary-ring);
}

.--tour-highlight:not(.top-nav-link) {
  outline: 2px solid color-mix(in srgb, var(--color-primary, #7059A6) 55%, transparent);
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--color-primary, #7059A6) 18%, transparent),
    0 0 24px color-mix(in srgb, var(--color-primary, #7059A6) 22%, transparent);
}

@keyframes tour-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--color-primary, #7059A6) 28%, transparent),
      0 0 0 0 color-mix(in srgb, var(--color-primary, #7059A6) 10%, transparent);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 7px color-mix(in srgb, var(--color-primary, #7059A6) 14%, transparent),
      0 0 22px color-mix(in srgb, var(--color-primary, #7059A6) 28%, transparent);
    transform: scale(1.015);
  }
}

.guided-tour-overlay {
  position: fixed;
  inset: 0;
  /* Above .--tour-highlight (1202) so coachmarks stay on top of highlighted targets */
  z-index: 1250;
  pointer-events: none;
}

.guided-tour-arrow {
  position: fixed;
  z-index: 1252;
  pointer-events: none;
  width: 0;
  height: 0;
  animation: tour-arrow-pulse 1.35s ease-in-out infinite;
}

.guided-tour-arrow[data-point="bottom"] {
  transform: translate(-50%, 0);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 12px solid var(--color-primary, #7059A6);
}

.guided-tour-arrow[data-point="top"] {
  transform: translate(-50%, -100%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 12px solid var(--color-primary, #7059A6);
}

.guided-tour-arrow[data-point="right"] {
  transform: translate(0, -50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 12px solid var(--color-primary, #7059A6);
}

.guided-tour-arrow[data-point="left"] {
  transform: translate(-100%, -50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 12px solid var(--color-primary, #7059A6);
}

@keyframes tour-arrow-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(112, 89, 166, 0.2)); opacity: 0.92; }
  50% { filter: drop-shadow(0 0 6px rgba(112, 89, 166, 0.45)); opacity: 1; }
}

.guided-tour-card {
  position: fixed;
  width: min(300px, calc(100vw - 24px));
  padding: 14px 16px;
  background: var(--tour-surface);
  color: var(--tour-text);
  border: 1px solid var(--tour-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(22, 20, 42, 0.16);
  pointer-events: auto;
  z-index: 1251;
}

.guided-tour-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary-hover);
}

.guided-tour-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--tour-text-muted);
}

.guided-tour-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Inbox guided tour */
.guided-tour-card--inbox {
  background: var(--tour-surface);
  color: var(--tour-text);
  border-color: var(--tour-border);
}

.guided-tour-card .guided-tour-text strong,
.guided-tour-card .automation-tour-steps {
  color: var(--tour-text);
}

.guided-tour-card .btn-secondary {
  background: transparent;
  color: var(--tour-text);
  border-color: var(--tour-border);
}

.guided-tour-card .btn-secondary:hover {
  background: color-mix(in srgb, var(--tour-text) 8%, transparent);
}

:root[data-theme="dark"] .guided-tour-card {
  box-shadow: 0 18px 48px rgba(0, 0, 0, .52);
}

@media (max-width: 520px) {
  .guided-tour-card {
    width: min(320px, calc(100vw - 32px));
    padding: 16px;
  }
  .guided-tour-title { font-size: 15px; }
  .guided-tour-text { font-size: 13px; line-height: 1.55; }
}

.automation-tour-steps {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
}

.verify-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.verify-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.verify-banner-text {
  flex: 1;
  min-width: 200px;
}

.trial-banner {
  margin: 0 0 16px;
  padding: 10px 16px;
  background: var(--color-primary-light);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 14px;
}

.payment-failed-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--color-danger-tint);
  border: 1px solid color-mix(in srgb, var(--color-danger) 35%, var(--color-border));
  border-radius: var(--radius-md);
  color: var(--color-danger-text);
  font-size: 14px;
}

.payment-failed-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-failed-banner-text {
  flex: 1;
  min-width: 220px;
  margin: 0;
  font-weight: 500;
  line-height: 1.45;
}

.trial-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.trial-banner-icon,
.trial-welcome-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.trial-banner-icon {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.trial-banner-text {
  flex: 1;
  min-width: 200px;
  font-weight: 600;
}

.linkedin-reconnect-banner {
  margin: 0 16px 16px;
  padding: 10px 16px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 14px;
}

.linkedin-reconnect-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.linkedin-reconnect-banner-text {
  flex: 1;
  min-width: 220px;
  margin: 0;
}

:root[data-theme="dark"] .linkedin-reconnect-banner {
  background: color-mix(in srgb, #ea580c 18%, var(--color-surface));
  border-color: color-mix(in srgb, #fb923c 45%, transparent);
}

.connection-note-limit-banner {
  margin: 0 16px 12px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--color-text-muted) 6%, var(--color-surface));
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 12.5px;
}

.connection-note-limit-banner-content {
  display: flex;
  align-items: baseline;
  gap: 10px 16px;
  flex-wrap: wrap;
}

.connection-note-limit-banner-text {
  flex: 1;
  min-width: 220px;
  margin: 0;
  font-weight: 500;
  line-height: 1.45;
}

.connection-note-limit-banner-link {
  color: var(--color-text-muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.connection-note-limit-banner-link:hover {
  color: var(--color-text);
}

:root[data-theme="dark"] .connection-note-limit-banner {
  background: color-mix(in srgb, var(--color-text-muted) 10%, var(--color-surface));
}

.trial-welcome {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.trial-welcome-badge {
  width: 56px;
  height: 56px;
  font-size: 20px;
  box-shadow: 0 8px 24px rgba(81, 86, 190, 0.22);
}

.trial-welcome p {
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .app-sidebar.--mobile-open .app-nav-links { gap: 2px; }
  .modal-overlay { padding: 8px; align-items: flex-end; }
  .modal { max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-header, .modal-body, .modal-footer { padding: 16px; }
  .modal-footer { flex-direction: column; align-items: stretch; }
  .modal-footer .modal-footer-start { margin-right: 0; width: 100%; }
  .modal-footer .btn {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
  .trial-banner-content .btn,
  .payment-failed-banner-content .btn { width: 100%; }
  .card { padding: 16px; }
  .badge, .resource-owner-label, .suggestion-tag { font-size: 12px; }
}

@supports (height: 100dvh) {
  .auth-body, .login-body { min-height: 100dvh; }
  .modal, .modal--scroll-body { max-height: 90dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- Toast ----------------------------------------------------------------- */
.toast-container {
  position: fixed; top: var(--space-md); right: var(--space-md);
  display: flex; flex-direction: column; gap: var(--space-xs);
  z-index: var(--z-toast);
}
.toast {
  min-width: 260px; max-width: 360px;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--brand-indigo);
  font-size: 14px;
  animation: toast-in 0.18s ease;
}
.toast-success { border-left-color: var(--color-success-text); }
.toast-error   { border-left-color: var(--color-danger); }
.toast-info    { border-left-color: var(--brand-indigo); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: none; }
}

/* --- Spinner / logomark loader -------------------------------------------- */
.logomark-loader,
.spinner,
.dashboard-loading-spinner,
.domain-spinner,
.campaign-brief-spinner,
.seq-node-count-spinner,
.report-select-spinner,
.detail-progress__spinner,
.automation-generator-script-spinner,
.onboarding-translate-spinner,
.suggestion-rationale-spinner {
  --_logomark-size: var(--logomark-size, 20px);
  width: var(--_logomark-size);
  height: var(--_logomark-size);
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
  border: none;
  background: none;
  border-radius: 0;
  box-sizing: border-box;
  transform-origin: 50% 50%;
  animation: logomark-squeeze var(--logomark-duration) infinite;
}
.domain-spinner { --logomark-size: 12px; }
.seq-node-count-spinner { --logomark-size: 10px; }
.dashboard-loading-spinner,
.logomark-loader--lg { --logomark-size: 48px; }
.logomark-loader--md { --logomark-size: 28px; }
.logomark-loader--sm { --logomark-size: 12px; }
.icon-inline.logomark-loader {
  --logomark-size: 16px;
  display: inline-block;
  vertical-align: middle;
}

.logomark-loader::before,
.logomark-loader::after,
.spinner::before,
.spinner::after,
.dashboard-loading-spinner::before,
.dashboard-loading-spinner::after,
.domain-spinner::before,
.domain-spinner::after,
.campaign-brief-spinner::before,
.campaign-brief-spinner::after,
.seq-node-count-spinner::before,
.seq-node-count-spinner::after,
.report-select-spinner::before,
.report-select-spinner::after,
.detail-progress__spinner::before,
.detail-progress__spinner::after,
.automation-generator-script-spinner::before,
.automation-generator-script-spinner::after,
.onboarding-translate-spinner::before,
.onboarding-translate-spinner::after,
.suggestion-rationale-spinner::before,
.suggestion-rationale-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--logomark-color, var(--color-primary));
  opacity: var(--logomark-alpha);
  -webkit-mask: var(--logomark-half) center / contain no-repeat;
  mask: var(--logomark-half) center / contain no-repeat;
  animation: logomark-merge-left var(--logomark-duration) infinite;
}
.logomark-loader::after,
.spinner::after,
.dashboard-loading-spinner::after,
.domain-spinner::after,
.campaign-brief-spinner::after,
.seq-node-count-spinner::after,
.report-select-spinner::after,
.detail-progress__spinner::after,
.automation-generator-script-spinner::after,
.onboarding-translate-spinner::after,
.suggestion-rationale-spinner::after {
  animation-name: logomark-merge-right;
}

@keyframes logomark-merge-left {
  0%   { transform: translateX(0); animation-timing-function: linear; }
  20%  { transform: translateX(0); animation-timing-function: var(--logomark-ease); }
  40%  { transform: translateX(var(--logomark-travel)); animation-timing-function: linear; }
  50%  { transform: translateX(var(--logomark-travel)); animation-timing-function: var(--logomark-ease); }
  70%  { transform: translateX(0); animation-timing-function: linear; }
  100% { transform: translateX(0); }
}
@keyframes logomark-merge-right {
  0%   { transform: scaleX(-1) translateX(0); animation-timing-function: linear; }
  20%  { transform: scaleX(-1) translateX(0); animation-timing-function: var(--logomark-ease); }
  40%  { transform: scaleX(-1) translateX(var(--logomark-travel)); animation-timing-function: linear; }
  50%  { transform: scaleX(-1) translateX(var(--logomark-travel)); animation-timing-function: var(--logomark-ease); }
  70%  { transform: scaleX(-1) translateX(0); animation-timing-function: linear; }
  100% { transform: scaleX(-1) translateX(0); }
}
@keyframes logomark-squeeze {
  0%   { transform: scaleX(1); animation-timing-function: linear; }
  20%  { transform: scaleX(1); animation-timing-function: var(--logomark-ease); }
  40%  { transform: scaleX(var(--logomark-squeeze)); animation-timing-function: linear; }
  50%  { transform: scaleX(var(--logomark-squeeze)); animation-timing-function: var(--logomark-ease); }
  70%  { transform: scaleX(1); animation-timing-function: linear; }
  100% { transform: scaleX(1); }
}
.modal-spinner-container {
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-xl);
}
.modal-spinner-container .spinner { --logomark-size: 28px; }
#companyTemplatesOverlay.--loading .template-card-actions button,
#companyTemplatesOverlay.--loading #btnAddCompanyTemplate {
  pointer-events: none;
  opacity: 0.45;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .logomark-loader,
  .spinner,
  .dashboard-loading-spinner,
  .domain-spinner,
  .campaign-brief-spinner,
  .seq-node-count-spinner,
  .report-select-spinner,
  .detail-progress__spinner,
  .automation-generator-script-spinner,
  .onboarding-translate-spinner,
  .suggestion-rationale-spinner,
  .logomark-loader::before,
  .logomark-loader::after,
  .spinner::before,
  .spinner::after,
  .dashboard-loading-spinner::before,
  .dashboard-loading-spinner::after,
  .domain-spinner::before,
  .domain-spinner::after,
  .campaign-brief-spinner::before,
  .campaign-brief-spinner::after,
  .seq-node-count-spinner::before,
  .seq-node-count-spinner::after,
  .report-select-spinner::before,
  .report-select-spinner::after,
  .detail-progress__spinner::before,
  .detail-progress__spinner::after,
  .automation-generator-script-spinner::before,
  .automation-generator-script-spinner::after,
  .onboarding-translate-spinner::before,
  .onboarding-translate-spinner::after,
  .suggestion-rationale-spinner::before,
  .suggestion-rationale-spinner::after {
    animation: none;
  }
}

/* --- Empty state ----------------------------------------------------------- */
.funnel-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xl);
  color: var(--color-text-muted);
  text-align: center;
}
.funnel-empty .icon { font-size: 40px; opacity: 0.5; }

.no-company-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  background: #fff8e6;
  border: 1px solid #f0d080;
  border-radius: var(--radius-md);
  color: var(--color-text);
}
.no-company-banner__icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.no-company-banner__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}
.no-company-banner__message {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* --- Grid utility ---------------------------------------------------------- */
.grid { display: grid; gap: var(--space-md); }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

/* --- Horizontal carousel --------------------------------------------------- */
.carousel-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--space-sm);
}

.carousel-track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding: 4px 2px var(--space-sm);
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-nav {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.carousel-nav:hover:not(:disabled) {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.carousel-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-wrap:not(.has-carousel) .carousel-nav {
  display: none;
}

.carousel-track > .suggestion-card {
  flex: 0 0 min(300px, calc(100vw - 120px));
  scroll-snap-align: start;
}

.carousel-track .funnel-empty {
  flex: 1 1 100%;
  min-width: 100%;
}

/* --- Target suggestion cards (dashboard + pipeline) ------------------------ */
.suggestion-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.suggestion-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.suggestion-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-bottom: 8px;
}
.suggestion-match-score {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
}
.suggestion-match-score--high {
  background: #D1FAE5;
  color: #1B5943;
}
.suggestion-match-score--medium {
  background: #fef3c7;
  color: #b45309;
}
.suggestion-match-score--low {
  background: var(--color-bg);
  color: var(--color-text-muted);
}
.suggestion-dismiss {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px -4px 0 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.suggestion-dismiss:hover {
  background: #FFE4E6;
  color: #A63B52;
}
.suggestion-card h4 {
  font-size: 14px;
  margin: 0 0 4px;
  color: var(--color-primary);
}
.suggestion-industry {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.suggestion-rationale {
  font-size: 12px;
  color: var(--color-text);
  flex: 1;
  line-height: 1.5;
}
.suggestion-rationale strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.suggestion-rationale-body {
  display: block;
  min-height: 1.5em;
}
.suggestion-rationale-body.--loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--color-text-muted);
}
.suggestion-rationale-spinner {
  --logomark-size: 16px;
}
.suggestion-segments {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.suggestion-segment {
  padding-top: 9px;
  border-top: 1px solid var(--color-border);
}
.suggestion-segment-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text);
  user-select: none;
}
.suggestion-segment-summary::-webkit-details-marker { display: none; }
.suggestion-segment-summary::after {
  content: '';
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.suggestion-segment[open] > .suggestion-segment-summary {
  margin-bottom: 7px;
}
.suggestion-segment[open] > .suggestion-segment-summary::after {
  transform: rotate(225deg);
  margin-top: 0.25em;
}
.suggestion-segment h5 {
  margin: 0 0 7px;
  font-size: 12px;
}
.suggestion-field { margin-top: 6px; }
.suggestion-field-label {
  display: block;
  margin-bottom: 3px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 600;
}
.suggestion-field-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.suggestion-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  flex-shrink: 0;
}
.suggestion-tag {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
}
.suggestion-use-btn {
  margin-top: 10px;
  flex-shrink: 0;
  width: 100%;
}

/* --- Auth pages (login / register / forgot / reset) ----------------------- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: var(--space-lg);
}
.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--space-lg);
}
.auth-brand .brand-logo {
  width: auto; height: 28px;
  border-radius: 0;
}
.auth-links {
  margin-top: var(--space-md);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}
.auth-links p { margin: var(--space-xs) 0 0; }
.auth-links a { color: var(--color-primary); font-weight: 600; }

/* Legacy aliases for pages still using login-body / login-card */
.login-body  { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--color-bg); padding: var(--space-lg); }
.login-card  { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-xl); width: 100%; max-width: 400px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-lg); }
.login-brand .brand-logo { width: auto; height: 28px; border-radius: 0; }

/* ── Language toggle (DE / EN pill buttons) — shared across pages ─────────── */
.lang-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}
.lang-toggle-btn.--active {
  background: var(--color-primary);
  color: #fff;
}
.lang-toggle-btn:not(.--active):hover {
  background: var(--color-bg);
}

/* ── Placeholder legend (automation steps + message templates) ─────────────── */
.step-placeholder-hint {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.step-placeholder-hint-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--color-text);
}

.step-placeholder-hint-intro {
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 10px;
}

.step-placeholder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-placeholder-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.08s, border-color 0.08s;
}

.step-placeholder-chip:hover {
  background: var(--color-emerald-light);
  border-color: var(--brand-emerald);
}

.step-placeholder-chip code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  background: transparent;
  padding: 0;
}

.step-placeholder-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  background: var(--color-surface, #fff);
  padding: 1px 5px;
  border-radius: 4px;
}

.step-placeholder-chip.--lead .step-placeholder-badge {
  color: var(--color-primary, #7059A6);
  background: var(--color-primary-light, rgba(112, 89, 166, 0.08));
}

.step-placeholder-chip.--sender .step-placeholder-badge {
  color: #7059A6;
  background: rgba(59, 130, 246, 0.12);
}
.billing-access-locked > :not(#packageRequiredBanner):not(#paymentFailedBanner):not(#billingAccessLockedMessage) {
  display: none !important;
}

.billing-access-locked-message {
  padding: 48px 24px;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.top-nav-link.--billing-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Support request and reply dialogs
   Modernized: header icon badge, dropzone upload, attachment chips,
   chat-bubble reply block with avatar. */
.support-modal-head {
  display: flex; align-items: center; gap: var(--space-sm);
}
.support-modal-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient-brand); color: #fff;
  box-shadow: 0 6px 14px var(--color-primary-ring);
  flex: 0 0 36px;
}
.support-modal-icon svg { width: 20px; height: 20px; }

.support-request-form { display: grid; gap: 20px; }
.support-request-form .form-group { margin-bottom: 0; }
.support-char-count { margin-top: 6px; color: var(--color-text-muted); font-size: 12px; text-align: right; }
.support-upload-hint { margin-top: 6px; font-size: 12px; }

/* Drag & drop styled upload zone */
.support-dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  padding: 22px var(--space-md);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.support-dropzone:hover { border-color: var(--color-primary); color: var(--color-primary); }
.support-dropzone.is-dragover {
  border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary);
}
.support-dropzone input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.support-dropzone-icon { display: flex; color: inherit; }
.support-dropzone-icon svg { width: 26px; height: 26px; }
.support-dropzone-title { font-size: 13px; font-weight: 600; color: var(--color-text); }
.support-dropzone-sub { font-size: 12px; }

/* Selected attachment chips */
.support-selected-images { display: flex; flex-wrap: wrap; gap: 8px; }
.support-attachment-chip {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.support-attachment-chip svg { width: 16px; height: 16px; color: var(--color-primary); flex: 0 0 16px; }
.support-attachment-chip-name {
  font-size: 12px; font-weight: 500; color: var(--color-text);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.support-attachment-chip-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: none; border-radius: 50%;
  background: transparent; color: var(--color-text-muted); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.support-attachment-chip-remove:hover { background: var(--color-primary-light); color: var(--color-primary); }
.support-attachment-chip-remove svg { width: 12px; height: 12px; }
.support-selected-empty { font-size: 12px; color: var(--color-text-muted); }

/* Reply modal */
.support-reply-modal { display: grid; gap: 18px; }
.support-reply-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-muted); margin: 0;
}
.support-reply-subject {
  margin: 4px 0 0; font-size: 19px; font-weight: 700; color: var(--color-text);
  line-height: 1.3; overflow-wrap: anywhere;
}
.support-reply-original {
  margin: 0; padding: 12px 14px; font-size: 14px; line-height: 1.55;
  color: var(--color-text-muted);
  border-left: 3px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: pre-wrap; overflow-wrap: anywhere;
}

/* Attachment cards in reply */
.support-reply-images { display: flex; flex-wrap: wrap; gap: 10px; }
.support-reply-image {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 100%;
  padding: 10px 14px 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.support-reply-image:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.support-reply-image svg { width: 22px; height: 22px; color: var(--color-primary); flex: 0 0 22px; }
.support-reply-image-text { display: flex; flex-direction: column; min-width: 0; }
.support-reply-image-name {
  font-size: 13px; font-weight: 600; color: var(--color-text);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.support-reply-image-meta { font-size: 11px; color: var(--color-text-muted); }

/* Reply bubble */
.support-reply-answer {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-primary-ring);
}
.support-reply-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gradient-brand); color: #fff;
  font-size: 14px; font-weight: 700; flex: 0 0 38px;
  box-shadow: 0 4px 10px var(--color-primary-ring);
}
.support-reply-answer-body { min-width: 0; flex: 1 1 auto; }
.support-reply-author {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--color-text);
}
.support-reply-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: var(--color-primary); color: #fff;
}
.support-reply-answer p {
  margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--color-text);
  overflow-wrap: anywhere;
}
.support-reply-time { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--color-text-muted); }

/* ── Unified support modal: sidebar + main ── */
.support-modal {
  max-width: 880px;
  width: 100%;
  height: min(640px, 90vh);
}
.support-modal .modal-header { flex-shrink: 0; }
.support-modal .modal-body { padding: 0 !important; flex: 1 1 auto; min-height: 0; overflow: hidden; }

.support-layout {
  display: flex;
  height: 100%;
  min-height: 0;
}
.support-sidebar {
  width: 248px; flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
  overflow: hidden;
}
.support-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.support-new-btn {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.support-new-btn:hover { background: var(--color-primary); color: #fff; }

.support-history-list { flex: 1 1 auto; overflow-y: auto; padding: 6px 6px; }
.support-history-empty {
  font-size: 12px; color: var(--color-text-muted); font-style: italic;
  padding: 14px 12px; margin: 0; text-align: center;
}
.support-history-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 6px;
  padding: 9px 10px; cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}
.support-history-item:hover { background: var(--color-primary-light); }
.support-history-item.--active { background: var(--color-primary-light); box-shadow: inset 2px 0 0 var(--color-primary); }
.support-history-item-body { flex: 1 1 auto; min-width: 0; }
.support-history-item-title {
  font-size: 13px; font-weight: 600; color: var(--color-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.support-history-item-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
}
.support-history-item-date { font-size: 11px; color: var(--color-text-muted); }
.support-history-item-dot {
  flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary); margin-top: 5px;
  box-shadow: 0 0 0 3px var(--color-primary-ring);
}
.support-status {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.support-status--open { background: rgba(107, 112, 128, 0.14); color: var(--color-text-muted); }
.support-status--answered { background: rgba(5, 150, 105, 0.14); color: var(--color-success-text); }
.support-status--new { background: var(--color-primary); color: #fff; }

/* Main panel */
.support-main {
  flex: 1 1 auto; min-width: 0;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex; flex-direction: column;
}
.support-thread { display: flex; flex-direction: column; gap: 14px; }
.support-thread-head { margin-bottom: 2px; }
.support-thread-message { display: flex; flex-direction: column; }
.support-thread-message--me { align-items: flex-end; }
.support-thread-bubble {
  max-width: 80%;
  padding: 10px 14px;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary-ring);
  border-radius: var(--radius-md) var(--radius-md) 0 var(--radius-md);
  color: var(--color-text);
  font-size: 14px; line-height: 1.5;
  overflow-wrap: anywhere;
}
.support-thread-message--me .support-reply-images { justify-content: flex-end; }
.support-thread-time { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }
.support-thread-replies { display: flex; flex-direction: column; gap: 12px; }
.support-thread-pending {
  margin: 4px 0 0; padding: 12px 14px;
  font-size: 13px; color: var(--color-text-muted); font-style: italic;
  background: var(--color-bg); border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm); text-align: center;
}
.support-create-actions {
  display: flex; justify-content: flex-end; gap: var(--space-sm);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .support-modal { height: min(92dvh, 92vh); }
  .support-layout { flex-direction: column; }
  .support-sidebar { width: 100%; max-height: 38%; border-right: none; border-bottom: 1px solid var(--color-border); }
  .support-main { padding: 16px; }
}

/* --- Community (Slack) entry + modal --------------------------------------- */
.dropdown-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--color-border);
}
.dropdown-item.nav-community-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.dropdown-item.nav-community-item:hover {
  background: var(--color-primary);
  color: #fff;
}
.nav-community-icon { display: inline-flex; flex-shrink: 0; }
.nav-community-label { flex: 1 1 auto; min-width: 0; }
.nav-community-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--color-success-tint);
  color: var(--color-success-text);
}
.nav-community-item:hover .nav-community-badge { background: rgba(255, 255, 255, .22); color: #fff; }
[data-theme="dark"] .dropdown-item.nav-community-item { color: #fff; }

.community-modal { max-width: 460px; overflow: hidden; }
.community-modal .modal-header { border-bottom: none; padding-bottom: 0; }
.community-modal-head {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.community-modal-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 14px rgba(112, 89, 166, .14);
}
.community-modal-body { display: flex; flex-direction: column; }
.community-modal-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--color-text);
}
.community-modal-lead {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.community-modal-points {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.community-modal-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
}
.community-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
}
[data-theme="dark"] .community-check { color: #fff; }
.community-modal-cta {
  display: flex;
  justify-content: center;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.community-modal-meta {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --- Read-only live demo (demo.xirql.com) --- */
/* Fixed bottom pill: app pages lay out body as a grid, so an in-flow bar would take a column. */
.demo-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(35, 31, 66, 0.28);
  z-index: 9997;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 8px 16px;
  background: var(--brand-secondary);
  color: #fff;
  font: 500 13px/1.4 var(--font-sans);
  text-align: center;
}
.demo-banner-actions { display: inline-flex; gap: 12px; align-items: center; }
.demo-banner-cta {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.demo-banner-cta:hover { background: var(--color-primary-hover); }
.demo-banner-link { color: rgba(255, 255, 255, 0.85); text-decoration: underline; }
.demo-banner-pulse { animation: demo-banner-pulse 0.9s ease-out; }
@keyframes demo-banner-pulse {
  0% { box-shadow: 0 0 0 0 rgba(112, 89, 166, 0.9); }
  100% { box-shadow: 0 0 0 14px rgba(112, 89, 166, 0); }
}
@media (prefers-reduced-motion: reduce) { .demo-banner-pulse { animation: none; outline: 2px solid var(--brand-primary); } }

/* Things a read-only demo cannot use. */
body.is-demo .profile-field:has(> #profileLinkedin),
body.is-demo .profile-field:has(> #profileLinkedinPlan),
body.is-demo [data-i18n="postSearch.lead"],
body.is-demo .nav-linkedin-row,
body.is-demo .nav-linkedin-btn,
body.is-demo #linkedinReconnectBanner,
body.is-demo :is(section, div, article):has(> .first-steps-header) { display: none !important; }
body.is-demo { padding-bottom: 72px; }

/* Live demo: entries that are switched off. */
body.is-demo .dropdown-item.--demo-disabled,
body.is-demo .top-nav-link.--billing-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Live demo: admin prompts and automation AI settings / chat test are not shown. */
body.is-demo #groupContent,
body.is-demo #tabTemplates,
body.is-demo #panelTemplates,
body.is-demo #tabContentPrompts,
body.is-demo #tabAiPrompts,
body.is-demo #panelContentPrompts,
body.is-demo #panelAiPrompts,
body.is-demo .seq-builder-tab[data-tab="ai-settings"],
body.is-demo #tabSeqBuilderChatTest,
body.is-demo #seqBuilderPanelAiSettings,
body.is-demo #seqBuilderPanelChatTest { display: none !important; }

/* Live demo: Interactions is switched off and shows nothing. */
body.is-demo[data-page-key="nav.interactions"] main.page-container > * { display: none !important; }

body.is-demo .campaign-actions-menu-popover .--demo-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
