@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.animate-float-slow {
  animation: float 6s ease-in-out infinite;
}

.animate-float-medium {
  animation: float 4s ease-in-out infinite;
}

.animate-float-fast {
  animation: float 3s ease-in-out infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}
.animate-dash {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: dash 3s linear infinite;
}

.typewriter-text {
  overflow: hidden;
  white-space: pre-wrap;
  animation: typing 2s steps(40, end);
}

.typewriter-text-delay-1 {
  overflow: hidden;
  white-space: pre-wrap;
  opacity: 0;
  animation: typing 2s steps(40, end) 2s forwards;
}

.typewriter-text-delay-2 {
  overflow: hidden;
  white-space: pre-wrap;
  opacity: 0;
  animation: typing 3s steps(40, end) 4s forwards;
}

.typewriter-text-delay-3 {
  overflow: hidden;
  white-space: pre-wrap;
  opacity: 0;
  animation: typing 2s steps(40, end) 7s forwards;
}

.typewriter-text-delay-4 {
  overflow: hidden;
  white-space: pre-wrap;
  opacity: 0;
  animation: typing 1s steps(40, end) 9s forwards;
}

@keyframes typing {
  from {
    opacity: 0;
    width: 0;
  }
  to {
    opacity: 1;
    width: 100%;
  }
}

.typing-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Add these styles to your CSS */
#mobile-menu-2 ul ul {
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu-2 ul ul.hidden {
  display: none;
}

#mobile-menu-2 ul ul:not(.hidden) {
  max-height: 1000px; /* Adjust this value based on your content */
  opacity: 1;
}

/* Slide animations */
.animate-slide-out-left {
  animation: slideOutLeft 150ms ease-in-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 150ms ease-in-out forwards;
}

/* Fade animations */
.animate-fade-out {
  animation: fadeOut 150ms ease-in-out forwards;
}

.animate-fade-in {
  animation: fadeIn 150ms ease-in-out forwards;
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-2rem);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(2rem);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Option 2: Border trace animation */
.animate-border-trace {
  position: relative;
}

.animate-border-trace::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: inherit;
  animation: borderTrace 0.5s ease-in-out;
  pointer-events: none;
}

@keyframes borderTrace {
  0% {
    clip-path: inset(0 100% 100% 0);
    border-color: rgb(139, 92, 246); /* grape-500 */
  }
  25% {
    clip-path: inset(0 0 100% 0);
  }
  50% {
    clip-path: inset(0 0 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
    border-color: transparent;
  }
}


.animate-border-glow {
  position: relative;
}

.animate-border-glow::before {
  content: '';
  position: absolute;
  inset: -2px; /* Slightly larger than the element */
  border-radius: 0.5rem; /* Match your existing border-radius or adjust */
  border: 2px solid rgba(139, 92, 246, 0.5); /* grape-500 with transparency */
  opacity: 0;
  animation: borderPulse 0.75s ease-out;
}

@keyframes borderPulse {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  0% { 
    opacity: 0;
    transform: scale(0.95);
  }
  100% { 
    opacity: 1;
    transform: scale(1);
  }
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confetti 3s ease-in-out infinite;
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(100vh) rotate(360deg); }
}

.email-item {
  @apply rounded-xl transition-all duration-150
         hover:bg-white/80 hover:backdrop-blur-sm
         hover:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.3)]
         hover:shadow-lg hover:shadow-black/5
         dark:hover:bg-gray-800/80 
         dark:hover:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.05)];
}

.email-item.selected {
  @apply bg-white/90 backdrop-blur-xl
         shadow-[inset_0_0_0_1px_rgba(255,255,255,0.5)]
         shadow-lg shadow-black/10
         dark:bg-gray-800/90 
         dark:shadow-[inset_0_0_0_1px_rgba(255,255,255,0.1)];
}

/* Line clamp utilities for mobile text truncation */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.synthesis-email .cite {
  border-bottom: 2px solid;
  padding-bottom: 1px;
  position: relative;
}

.synthesis-email .cite[data-type="explicit"] {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.08);
}

.synthesis-email .cite[data-type="inferred"] {
  border-bottom-style: dotted;
  border-color: #8b5cf6;
  background-color: rgba(139, 92, 246, 0.08);
}

.synthesis-email .cite[data-type="synthesis"] {
  border-color: #f43f5e;
  background-color: rgba(244, 63, 94, 0.08);
}

.synthesis-email .cite[data-type]:hover::after {
  content: attr(data-type);
  position: absolute;
  left: 0;
  bottom: 100%;
  transform: translateY(-0.35rem);
  background: rgba(17, 24, 39, 0.9);
  color: #f9fafb;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 10;
  text-transform: capitalize;
}

.dark .synthesis-email .cite[data-type]:hover::after {
  background: rgba(15, 23, 42, 0.95);
}
/* ═══════════════════════════════════════════════════════════
   FLURRY ONBOARDING DESIGN SYSTEM
   Scoped to .ob-root — loaded only on the onboarding layout.
   Fonts: local Inter plus system monospace fallbacks.
   ═══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────────── */
.ob-root {
  --ob-bg:        #f0f1f6;
  --ob-surface:   #ffffff;
  --ob-s2:        #f7f8fc;
  --ob-s3:        #f1f2f8;
  --ob-border:    #e4e6f0;
  --ob-border-s:  #ededf5;
  --ob-t1:        #0c0d14;
  --ob-t2:        #454860;
  --ob-t3:        #9096b0;
  --ob-t4:        #c2c7d8;
  --ob-accent:    #4f46e5;
  --ob-accent-h:  #4338ca;
  --ob-accent-s:  #eef0ff;
  --ob-accent-m:  #c7d2fe;
  --ob-green:     #059669;
  --ob-green-s:   #ecfdf5;
  --ob-green-b:   #a7f3d0;
  --ob-amber:     #d97706;
  --ob-amber-s:   #fffbeb;
  --ob-amber-b:   #fde68a;
  --ob-red:       #dc2626;
  --ob-red-s:     #fef2f2;
  --ob-red-b:     #fca5a5;
  --ob-r:         10px;
  --ob-rs:        7px;
  --ob-sh-xs:     0 1px 2px rgba(0,0,0,.05);
  --ob-sh-sm:     0 2px 8px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);

  /* ── Inverted / dark-card tokens (banner, staging footer) ──
     In light mode these produce a dark element on a light page.
     In dark mode they flip to regular surface so the element
     blends naturally with the already-dark background. */
  --ob-inv-bg:              #181a36;
  --ob-inv-title:           #ffffff;
  --ob-inv-sub:             rgba(255,255,255,.5);
  --ob-inv-divider:         rgba(255,255,255,.08);
  --ob-inv-pill-bg:         rgba(255,255,255,.1);
  --ob-inv-pill-border:     rgba(255,255,255,.15);
  --ob-inv-text:            #ffffff;
  --ob-inv-text-dim:        rgba(255,255,255,.65);
  --ob-inv-text-muted:      rgba(255,255,255,.5);
  --ob-inv-tag-bg:          rgba(255,255,255,.09);
  --ob-inv-tag-border:      rgba(255,255,255,.13);
  --ob-inv-tag-text:        rgba(255,255,255,.65);
  --ob-inv-btn-bg:          rgba(255,255,255,.08);
  --ob-inv-btn-text:        rgba(255,255,255,.7);
  --ob-inv-btn-border:      rgba(255,255,255,.15);
  --ob-inv-btn-hover-bg:    rgba(255,255,255,.16);
  --ob-inv-disabled-text:   rgba(255,255,255,.3);
  --ob-inv-disabled-border: rgba(255,255,255,.1);
}

/* ── BASE ────────────────────────────────────────── */
.ob-root,
.ob-root * { box-sizing: border-box; }

.ob-root {
  font-family: Inter, system-ui, sans-serif;
  background: var(--ob-bg);
  color: var(--ob-t1);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── APP SHELL ──────────────────────────────────── */
/* Fixed-height shell (workspace pages: edit_variant, edit_audience) */
.ob-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--ob-bg);
}

/* Scrollable shell (new, building, review, staged) */
.ob-app-scroll {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--ob-bg);
}

/* ── TOPBAR ─────────────────────────────────────── */
.ob-topbar {
  height: 50px;
  background: var(--ob-surface);
  border-bottom: 1px solid var(--ob-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  flex-shrink: 0;
  gap: 12px;
}
.ob-topbar-left  { display: flex; align-items: center; gap: 8px; }
.ob-topbar-right { display: flex; align-items: center; gap: 8px; }

/* breadcrumb */
.ob-bc      { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ob-t3); }
.ob-bc a    { color: var(--ob-t3); text-decoration: none; transition: color .15s; }
.ob-bc a:hover { color: var(--ob-t2); }
.ob-bc-sep  { color: var(--ob-t4); }
.ob-bc-cur  { color: var(--ob-t2); font-weight: 500; }

/* ── STEPBAR ────────────────────────────────────── */
.ob-stepbar {
  height: 42px;
  background: var(--ob-surface);
  border-bottom: 1px solid var(--ob-border);
  display: flex;
  align-items: center;
  padding: 0 22px;
  flex-shrink: 0;
  gap: 0;
}
.ob-stp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 100%;
  border-bottom: 2px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ob-t4);
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s;
  cursor: default;
}
.ob-stp--active           { color: var(--ob-accent); border-bottom-color: var(--ob-accent); }
.ob-stp--done             { color: var(--ob-t3); }
.ob-stp--done:hover       { color: var(--ob-t2); }
.ob-sn {
  width: 17px; height: 17px;
  border-radius: 50%;
  font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center;
  background: var(--ob-border); color: var(--ob-t3);
  flex-shrink: 0;
}
.ob-stp--active .ob-sn   { background: var(--ob-accent); color: #fff; }
.ob-stp--done .ob-sn     { background: var(--ob-green-s); color: var(--ob-green); font-size: 8px; }
.ob-step-sep             { color: var(--ob-t4); font-size: 13px; padding: 0 2px; }

/* ── WORKSPACE (fixed-height two-col layout) ──── */
.ob-workspace {
  flex: 1;
  display: grid;
  overflow: hidden;
}
.ob-workspace--2col       { grid-template-columns: 1fr 340px; }
.ob-workspace--2col-wide  { grid-template-columns: 1fr 320px; }

.ob-editor-col {
  overflow-y: auto;
  overflow-x: visible;
  background: var(--ob-bg);
  padding: 16px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ob-sidebar-col {
  border-left: 1px solid var(--ob-border);
  background: var(--ob-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ob-sidebar-hd {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ob-border-s);
  flex-shrink: 0;
}
.ob-sidebar-hd-title { font-size: 13.5px; font-weight: 700; color: var(--ob-t1); margin-bottom: 2px; }
.ob-sidebar-hd-sub   { font-size: 12px; color: var(--ob-t3); }
.ob-sidebar-body {
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* ── SCROLLABLE PAGE BODY ───────────────────────── */
.ob-page-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px 22px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ob-page-inner        { width: 100%; max-width: 700px; display: flex; flex-direction: column; gap: 12px; }
.ob-page-inner--wide  { max-width: 960px; }

/* ── FOOTER BAR ─────────────────────────────────── */
.ob-footer {
  min-height: 56px;
  background: var(--ob-surface);
  border-top: 1px solid var(--ob-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  flex-shrink: 0;
  gap: 12px;
}
.ob-footer-stats  { display: flex; align-items: center; gap: 22px; }
.ob-footer-actions { display: flex; gap: 8px; align-items: center; }
.ob-fstat         { display: flex; flex-direction: column; gap: 1px; }
.ob-fstat-label {
  font-size: 10px; font-weight: 700; color: var(--ob-t4);
  text-transform: uppercase; letter-spacing: .07em;
}
.ob-fstat-value          { font-size: 13px; font-weight: 600; color: var(--ob-t1); }
.ob-fstat-value--accent  { color: var(--ob-accent); }
.ob-fstat-value--green   { color: var(--ob-green); }
.ob-footer-info { font-size: 12.5px; color: var(--ob-t3); }

/* ── CARDS ──────────────────────────────────────── */
.ob-card {
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: var(--ob-r);
  box-shadow: var(--ob-sh-xs);
  overflow: visible;
}
.ob-card-hd {
  padding: 11px 16px;
  border-bottom: 1px solid var(--ob-border-s);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--ob-r) var(--ob-r) 0 0;
}
.ob-card-title {
  font-size: 12.5px; font-weight: 600; color: var(--ob-t1);
  display: flex; align-items: center; gap: 7px;
}
.ob-card-icon {
  width: 24px; height: 24px;
  border-radius: 6px; background: var(--ob-accent-s);
  display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
}
.ob-card-hint { font-size: 11px; color: var(--ob-t3); }
.ob-card-bd { padding: 14px 16px; }

/* AI assist strip inside card */
.ob-ai-assist {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(to right, var(--ob-accent-s), transparent 90%);
  border-top: 1px solid var(--ob-border-s);
  border-radius: 0 0 var(--ob-r) var(--ob-r);
}
.ob-ai-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ob-accent); flex-shrink: 0;
  animation: ob-blink 2s infinite;
}
.ob-ai-text { font-size: 12px; color: var(--ob-t2); flex: 1; line-height: 1.5; }
.ob-ai-text strong { color: var(--ob-accent); }
@keyframes ob-blink { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── BUTTONS ────────────────────────────────────── */
.ob-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; border: none;
  border-radius: var(--ob-rs);
  padding: 7px 14px;
  transition: all .15s; white-space: nowrap; text-decoration: none;
}
.ob-btn-ghost {
  background: transparent; color: var(--ob-t2);
  border: 1px solid var(--ob-border);
}
.ob-btn-ghost:hover { background: var(--ob-s2); color: var(--ob-t1); }
.ob-btn-primary {
  background: var(--ob-accent); color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,.25);
}
.ob-btn-primary:hover { background: var(--ob-accent-h); }
.ob-btn-dark {
  background: var(--ob-t1); color: #fff;
  font-weight: 600; padding: 7px 16px;
}
.ob-btn-dark:hover { background: #1a1b2e; }
.ob-btn-green {
  background: var(--ob-green); color: #fff;
  box-shadow: 0 2px 8px rgba(5,150,105,.2);
}
.ob-btn-green:hover { background: #047857; }
.ob-btn-sm  { padding: 5px 12px; font-size: 12px; }
.ob-btn-xs  { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; }

/* ── FORM FIELDS ────────────────────────────────── */
.ob-field-group { margin-bottom: 14px; }
.ob-field-group:last-child { margin-bottom: 0; }
.ob-field-label {
  font-size: 11.5px; font-weight: 600; color: var(--ob-t2);
  margin-bottom: 5px;
  display: flex; align-items: center; justify-content: space-between;
}
.ob-field-hint { font-size: 11.5px; color: var(--ob-t3); margin-top: 4px; line-height: 1.45; }
.ob-field {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--ob-border); border-radius: var(--ob-rs);
  font-family: Inter, system-ui, sans-serif; font-size: 13.5px; color: var(--ob-t1);
  background: var(--ob-s2); outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ob-field:focus {
  border-color: var(--ob-accent-m);
  background: var(--ob-surface);
  box-shadow: 0 0 0 3px rgba(79,70,229,.07);
}
.ob-field::placeholder { color: var(--ob-t4); }
textarea.ob-field { resize: none; line-height: 1.7; }
select.ob-field {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239096b0' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}

/* ── TAG / TOKEN INPUTS ─────────────────────────── */
.ob-tag-wrap { position: relative; }
.ob-tag-box {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 5px; padding: 7px 10px; min-height: 40px;
  border-radius: var(--ob-rs);
  border: 1.5px solid var(--ob-border); background: var(--ob-s2);
  cursor: text; transition: border-color .15s, box-shadow .15s;
}
.ob-tag-box:focus-within {
  border-color: var(--ob-accent-m);
  background: var(--ob-surface);
  box-shadow: 0 0 0 3px rgba(79,70,229,.07);
}
.ob-tag-box input {
  border: none; outline: none; background: transparent;
  font-family: Inter, system-ui, sans-serif; font-size: 13.5px; color: var(--ob-t1);
  min-width: 80px; flex: 1; line-height: 1;
}
.ob-tag-box input::placeholder { color: var(--ob-t4); }

/* token chips */
.ob-tok {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.ob-tok--blue   { background: var(--ob-accent-s); color: var(--ob-accent); }
.ob-tok--green  { background: var(--ob-green-s); color: var(--ob-green); }
.ob-tok--amber  { background: var(--ob-amber-s); color: var(--ob-amber); }
.ob-tok--gray   { background: var(--ob-s3); color: var(--ob-t2); border: 1px solid var(--ob-border-s); }

.ob-tok-x {
  font-size: 12px; opacity: .4; cursor: pointer;
  transition: opacity .1s; margin-left: 1px; line-height: 1;
}
.ob-tok-x:hover { opacity: .9; }

/* quick-add suggestion buttons */
.ob-qadd-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ob-qa {
  font-size: 12px; color: var(--ob-t3); cursor: pointer;
  padding: 3px 10px; border-radius: 20px;
  box-shadow: inset 0 0 0 1px var(--ob-border);
  background: var(--ob-surface); border: none;
  font-family: Inter, system-ui, sans-serif; transition: all .15s;
}
.ob-qa:hover { color: var(--ob-accent); box-shadow: inset 0 0 0 1px var(--ob-accent-m); background: var(--ob-accent-s); }

/* ── PILLS (multi-select toggle) ────────────────── */
.ob-pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-pill {
  padding: 6px 14px; border-radius: 20px;
  font-size: 12.5px; font-weight: 500; color: var(--ob-t2);
  cursor: pointer; border: none; background: var(--ob-surface);
  box-shadow: inset 0 0 0 1px var(--ob-border);
  font-family: Inter, system-ui, sans-serif; transition: all .15s;
}
.ob-pill:hover { box-shadow: inset 0 0 0 1px #b5b8d4; color: var(--ob-t1); background: var(--ob-s2); }
.ob-pill--on   { background: var(--ob-accent-s); color: var(--ob-accent); box-shadow: inset 0 0 0 1.5px var(--ob-accent-m); }

/* ── ACCORDION SECTIONS ─────────────────────────── */
.ob-sec { background: var(--ob-surface); border: 1px solid var(--ob-border); border-radius: var(--ob-r); margin-bottom: 8px; overflow: visible; }
.ob-sec:last-child { margin-bottom: 0; }
.ob-sec-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; cursor: pointer; user-select: none;
  border-radius: var(--ob-r); transition: background .12s;
}
.ob-sec-hd--open { border-radius: var(--ob-r) var(--ob-r) 0 0; }
.ob-sec-hd:hover { background: var(--ob-s2); }
.ob-sec-hd-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ob-sec-label { font-size: 13px; font-weight: 600; color: var(--ob-t1); }
.ob-sec-body { display: none; padding: 4px 16px 16px; border-top: 1px solid var(--ob-border-s); }
.ob-sec-body--open { display: block; }
.ob-sec-chev { color: var(--ob-t4); transition: transform .2s; flex-shrink: 0; }
.ob-sec-chev--open { transform: rotate(180deg); }

/* filter row inside accordion */
.ob-fr {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 10px 16px; align-items: start;
  padding: 11px 0; border-bottom: 1px solid var(--ob-border-s);
}
.ob-fr:last-child { border-bottom: none; }
.ob-fr-lbl-t { font-size: 12.5px; font-weight: 600; color: var(--ob-t1); padding-top: 9px; }
.ob-fr-lbl-h { font-size: 11px; color: var(--ob-t3); line-height: 1.4; margin-top: 2px; }

/* range inputs */
.ob-range-row { display: flex; align-items: center; gap: 8px; }
.ob-range-input {
  flex: 1; padding: 9px 12px; border-radius: var(--ob-rs);
  font-family: Inter, system-ui, sans-serif; font-size: 13px; color: var(--ob-t1);
  background: var(--ob-s2); outline: none;
  border: 1.5px solid var(--ob-border);
  transition: border-color .15s, box-shadow .15s;
}
.ob-range-input:focus {
  border-color: var(--ob-accent-m); background: var(--ob-surface);
  box-shadow: 0 0 0 3px rgba(79,70,229,.07);
}
.ob-range-dash { font-size: 14px; color: var(--ob-t4); }

/* ── RIGHT COLUMN: AUDIENCE STATS ───────────────── */
.ob-count-area {
  padding: 22px 20px 18px; border-bottom: 1px solid var(--ob-border); flex-shrink: 0;
}
.ob-count-label {
  font-size: 11px; font-weight: 700; color: var(--ob-t4);
  text-transform: uppercase; letter-spacing: .09em; margin-bottom: 8px;
  display: flex; align-items: center; gap: 7px;
}
.ob-count-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 44px; font-weight: 500; color: var(--ob-t1);
  line-height: 1; letter-spacing: -1.5px; margin-bottom: 4px;
}
.ob-count-sub { font-size: 12.5px; color: var(--ob-t3); }

/* live pulse badge */
.ob-live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600;
  color: var(--ob-green); background: var(--ob-green-s);
  padding: 2px 7px; border-radius: 20px;
  text-transform: none; letter-spacing: 0;
}
.ob-live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ob-green); animation: ob-live-pulse 2s infinite;
}
@keyframes ob-live-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── PROGRESS STEPS (building page) ────────────── */
.ob-progress-step { display: flex; align-items: center; gap: 10px; }
.ob-ps-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.ob-ps-dot--complete { background: var(--ob-green); }
.ob-ps-dot--current  { background: var(--ob-accent); animation: ob-pulse 1.4s ease-in-out infinite; }
.ob-ps-dot--pending  { background: var(--ob-border); }
@keyframes ob-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.55;transform:scale(.82)} }
.ob-ps-label--complete { font-size: 13px; font-weight: 500; color: var(--ob-t2); }
.ob-ps-label--current  { font-size: 13px; font-weight: 600; color: var(--ob-accent); }
.ob-ps-label--pending  { font-size: 13px; color: var(--ob-t4); }

/* ── BADGES ─────────────────────────────────────── */
.ob-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
}
.ob-badge--accent { background: var(--ob-accent-s); color: var(--ob-accent); border: 1px solid var(--ob-accent-m); }
.ob-badge--green  { background: var(--ob-green-s); color: var(--ob-green); border: 1px solid var(--ob-green-b); }
.ob-badge--amber  { background: var(--ob-amber-s); color: var(--ob-amber); border: 1px solid var(--ob-amber-b); }
.ob-badge--gray   { background: var(--ob-s3); color: var(--ob-t3); border: 1px solid var(--ob-border-s); }
.ob-badge--red    { background: var(--ob-red-s); color: var(--ob-red); border: 1px solid var(--ob-red-b); }

/* ── TIP / INFO BLOCKS ──────────────────────────── */
.ob-tip {
  padding: 11px 14px; border-radius: var(--ob-rs);
  border-left: 3px solid var(--ob-accent); background: var(--ob-accent-s);
}
.ob-tip-label {
  font-size: 10.5px; font-weight: 700; color: var(--ob-accent);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}
.ob-tip-text { font-size: 12.5px; color: var(--ob-t2); line-height: 1.65; }
.ob-tip-text strong { color: var(--ob-t1); }

/* ── ERROR BLOCK ────────────────────────────────── */
.ob-error {
  padding: 10px 14px; background: var(--ob-red-s);
  border: 1px solid var(--ob-red-b); border-radius: var(--ob-rs);
  font-size: 12.5px; color: var(--ob-red); line-height: 1.5;
}

/* ── OUTREACH INTENT GRID ───────────────────────── */
.ob-intent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ob-intent-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--ob-rs);
  border: 1.5px solid var(--ob-border); background: var(--ob-s2);
  cursor: pointer; transition: all .15s;
}
.ob-intent-option:hover { border-color: var(--ob-accent-m); background: var(--ob-surface); }
.ob-intent-option--on   { border-color: var(--ob-accent); background: var(--ob-accent-s); }
.ob-intent-option--disabled {
  opacity: .58;
  cursor: not-allowed;
  background: var(--ob-s2);
  border-color: var(--ob-border-s);
}
.ob-intent-option--disabled:hover {
  border-color: var(--ob-border-s);
  background: var(--ob-s2);
}
.ob-intent-option input[type="checkbox"] {
  width: 14px; height: 14px; border-radius: 3px;
  accent-color: var(--ob-accent); margin-top: 2px; flex-shrink: 0;
}
.ob-intent-name { font-size: 12.5px; font-weight: 600; color: var(--ob-t1); margin-bottom: 2px; }
.ob-intent-desc { font-size: 12px; color: var(--ob-t3); line-height: 1.45; }

/* ── VARIANT PILLS (edit_variant nav) ───────────── */
.ob-variant-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-variant-pill {
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--ob-border);
  background: var(--ob-surface); color: var(--ob-t4);
}
.ob-variant-pill--active {
  border-color: var(--ob-accent);
  background: var(--ob-accent-s); color: var(--ob-accent);
}

/* ── AUDIENCE SECTION (review page) ────────────── */
.ob-audience-section {
  background: var(--ob-surface); border: 1px solid var(--ob-border);
  border-radius: var(--ob-r); overflow: hidden; box-shadow: var(--ob-sh-xs);
}
.ob-audience-hd {
  padding: 14px 18px; border-bottom: 1px solid var(--ob-border-s);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.ob-audience-name   { font-size: 14px; font-weight: 700; color: var(--ob-t1); margin-bottom: 4px; }
.ob-audience-rationale { font-size: 12.5px; color: var(--ob-t3); line-height: 1.55; max-width: 600px; }
.ob-audience-body   { padding: 12px 18px; display: flex; flex-direction: column; gap: 10px; }

/* ── CAMPAIGN ROW (staged page) ─────────────────── */
.ob-campaign-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--ob-border-s);
}
.ob-campaign-row:last-child { border-bottom: none; }
.ob-campaign-name { font-size: 13.5px; font-weight: 600; color: var(--ob-t1); }
.ob-campaign-meta { font-size: 12px; color: var(--ob-t3); margin-top: 2px; }

/* ── PROGRESS BAR (building page) ──────────────── */
.ob-progress-bar-wrap  { padding: 0 2px; }
.ob-progress-bar-track {
  height: 6px; border-radius: 6px;
  background: var(--ob-border); overflow: hidden;
}
.ob-progress-bar-fill  {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--ob-accent), #7c3aed);
  transition: width .6s ease;
}

/* ── COMPANY BANNER (review page) ──────────────── */
.ob-company-banner {
  background: linear-gradient(145deg, #2a2d62 0%, #1a1c3e 45%, #100f22 100%);
  border-radius: var(--ob-r);
  overflow: hidden;
  box-shadow: var(--ob-sh-sm);
}

/* ── INVERTED CARD (dark bg in light mode, surface in dark mode) ── */
.ob-card-dark { background: linear-gradient(135deg, #1e2048 0%, #100f22 100%); }
.ob-card-dark-title { color: var(--ob-inv-title); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.ob-card-dark-sub   { color: var(--ob-inv-sub);   font-size: 12.5px; line-height: 1.55; }

.ob-btn-ghost-inv {
  background: var(--ob-inv-btn-bg);
  color:      var(--ob-inv-btn-text);
  border: 1px solid var(--ob-inv-btn-border);
}
.ob-btn-ghost-inv:hover {
  background: var(--ob-inv-btn-hover-bg);
  color: var(--ob-inv-title);
}
.ob-btn-disabled-inv {
  font-size: 12px;
  color:  var(--ob-inv-disabled-text);
  border: 1px solid var(--ob-inv-disabled-border);
  padding: 7px 14px; border-radius: var(--ob-rs); cursor: default;
}

/* ── SCROLLBAR ──────────────────────────────────── */
.ob-root ::-webkit-scrollbar         { width: 4px; }
.ob-root ::-webkit-scrollbar-track   { background: transparent; }
.ob-root ::-webkit-scrollbar-thumb   { background: var(--ob-border); border-radius: 4px; }

/* ── MISC UTILITIES ─────────────────────────────── */
.ob-divider { height: 1px; background: var(--ob-border-s); }
.ob-mono    { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

/* flex-fill: makes a form (or any block) act as a flex child that fills remaining space */
.ob-flex-fill {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.ob-muted   { color: var(--ob-t3); }

/* card section summary (mini tokens in accordion header) */
.ob-sec-summary { display: flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; min-width: 0; }
.ob-sec-tok-sm  {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 500; padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.ob-stk-blue  { background: var(--ob-accent-s); color: var(--ob-accent); }
.ob-stk-green { background: var(--ob-green-s); color: var(--ob-green); }
.ob-stk-gray  { background: var(--ob-s3); color: var(--ob-t2); }
.ob-sec-more  { font-size: 11px; color: var(--ob-t3); padding: 2px 4px; }

/* ═══════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════
   DARK MODE — class-based (.dark on <html>)
   Applied by the theme cookie script in onboarding layout.
   ═══════════════════════════════════════════════════ */

/* Token overrides */
.dark .ob-root {
  --ob-bg:        #0e0f1a;
  --ob-surface:   #161829;
  --ob-s2:        #1c1e30;
  --ob-s3:        #222440;
  --ob-border:    #2a2d4a;
  --ob-border-s:  #222440;
  --ob-t1:        #eef0f8;
  --ob-t2:        #9ba0be;
  --ob-t3:        #5c6082;
  --ob-t4:        #383b58;
  --ob-accent:    #7c73f2;
  --ob-accent-h:  #6c62e8;
  --ob-accent-s:  #1a1b38;
  --ob-accent-m:  #353475;
  --ob-green:     #34d399;
  --ob-green-s:   #052e1c;
  --ob-green-b:   #0d4a2d;
  --ob-amber:     #fbbf24;
  --ob-amber-s:   #281c04;
  --ob-amber-b:   #4a3408;
  --ob-red:       #f87171;
  --ob-red-s:     #2a0808;
  --ob-red-b:     #4a1414;
  --ob-sh-xs:     0 1px 3px rgba(0,0,0,.5);
  --ob-sh-sm:     0 2px 8px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.5);

  /* Inverted tokens: banner/dark-card become regular surface in dark mode */
  --ob-inv-bg:              var(--ob-surface);
  --ob-inv-title:           var(--ob-t1);
  --ob-inv-sub:             var(--ob-t3);
  --ob-inv-divider:         var(--ob-border-s);
  --ob-inv-pill-bg:         var(--ob-s3);
  --ob-inv-pill-border:     var(--ob-border);
  --ob-inv-text:            var(--ob-t1);
  --ob-inv-text-dim:        var(--ob-t2);
  --ob-inv-text-muted:      var(--ob-t3);
  --ob-inv-tag-bg:          var(--ob-s2);
  --ob-inv-tag-border:      var(--ob-border);
  --ob-inv-tag-text:        var(--ob-t2);
  --ob-inv-btn-bg:          var(--ob-s3);
  --ob-inv-btn-text:        var(--ob-t2);
  --ob-inv-btn-border:      var(--ob-border);
  --ob-inv-btn-hover-bg:    var(--ob-s2);
  --ob-inv-disabled-text:   var(--ob-t4);
  --ob-inv-disabled-border: var(--ob-border-s);
}

/* Component overrides */
.dark .ob-btn-dark             { background: var(--ob-accent); color: #fff; }
.dark .ob-btn-dark:hover       { background: var(--ob-accent-h); }

.dark select.ob-field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c6082' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.dark .ob-company-banner,
.dark .ob-card-dark {
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  box-shadow: none;
}

.dark .ob-progress-bar-track  { background: var(--ob-s3); }
.dark .ob-sec-hd:hover        { background: var(--ob-s3); }
.dark .ob-intent-option:hover { background: var(--ob-s3); }
.dark .ob-pill:hover          { background: var(--ob-s3); }
.dark .ob-qa                  { background: var(--ob-s2); }
.dark .ob-qa:hover            { background: var(--ob-accent-s); }

/* ═══════════════════════════════════════════════════
   MESSAGE-FOCUSED VARIANT EDITOR (edit_variant)
   ═══════════════════════════════════════════════════ */

/* ── Scrollable centred workspace ── */
.ob-msgview {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--ob-bg);
  padding: 20px 16px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ob-msgview-inner {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Context header ── */
.ob-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 6px;
}
.ob-msg-header-left  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ob-msg-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ob-msg-staging-toggle {
  display: flex; align-items: center; gap: 5px;
  cursor: pointer; font-size: 12px; color: var(--ob-t3);
}

/* ── Shared eyebrow label ── */
.ob-msg-eyebrow {
  font-size: 10px; font-weight: 700; color: var(--ob-accent);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 4px;
}

/* ── Blueprint row ── */
.ob-msg-bp-row {
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: var(--ob-r);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  cursor: pointer; position: relative;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.ob-msg-bp-row:hover { border-color: var(--ob-accent-m); background: var(--ob-s2); }
.ob-msg-bp-name {
  font-size: 14px; font-weight: 700; color: var(--ob-t1);
}

/* ── Subject row ── */
.ob-msg-subj-row {
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: var(--ob-r);
  padding: 12px 16px;
  position: relative;
}
.ob-msg-subj-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.ob-msg-subj-type-btn {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px; font-weight: 600; color: var(--ob-accent);
  background: var(--ob-accent-s); border: 1px solid var(--ob-accent-m);
  border-radius: 20px; padding: 3px 10px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.ob-msg-subj-type-btn:hover { background: var(--ob-accent-m); color: var(--ob-accent-h); }
.ob-msg-subj-text {
  font-size: 17px; font-weight: 700; color: var(--ob-t1); line-height: 1.35;
}
.ob-msg-subj-text--empty {
  font-size: 13px; font-weight: 400; color: var(--ob-t4); font-style: italic;
}

/* ── Email preview card ── */
.ob-msg-email {
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: var(--ob-r);
  overflow: hidden;
  box-shadow: var(--ob-sh-sm);
}

/* Chrome bar (traffic lights + sequence info) */
.ob-email-chrome {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  background: var(--ob-s2);
  border-bottom: 1px solid var(--ob-border-s);
}
.ob-email-dots    { display: flex; gap: 5px; }
.ob-email-dot     { width: 11px; height: 11px; border-radius: 50%; }
.ob-email-dot--red    { background: #ff5f57; }
.ob-email-dot--yellow { background: #febc2e; }
.ob-email-dot--green  { background: #28c840; }
.ob-email-seq-info    { font-size: 11.5px; color: var(--ob-t3); font-weight: 500; }

/* Generating banner inside email card */
.ob-email-generating-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(79,70,229,.06);
  border-bottom: 1px solid rgba(79,70,229,.12);
  font-size: 12.5px; color: var(--ob-t2);
}

/* From / To headers */
.ob-email-headers {
  padding: 10px 16px;
  background: var(--ob-s2);
  border-bottom: 1px solid var(--ob-border-s);
  display: flex; flex-direction: column; gap: 4px;
}
.ob-email-header-row { display: flex; gap: 8px; align-items: baseline; }
.ob-email-header-lbl { font-size: 11px; font-weight: 700; color: var(--ob-t4); min-width: 32px; }
.ob-email-header-val { font-size: 12.5px; color: var(--ob-t2); }

/* Email body */
.ob-email-body-wrap { padding: 22px 24px; min-height: 160px; }
.ob-email-body-text {
  font-size: 14px; color: var(--ob-t2); line-height: 1.85;
  white-space: pre-wrap;
}

/* Trace bar */
.ob-email-trace-bar {
  padding: 8px 16px; border-top: 1px solid var(--ob-border-s);
  display: flex; align-items: center; gap: 10px;
  background: var(--ob-s2);
}
.ob-email-trace-lbl  { font-size: 10px; font-weight: 700; color: var(--ob-t4); text-transform: uppercase; letter-spacing: .06em; }
.ob-email-trace-item { font-size: 11.5px; color: var(--ob-t3); }

/* Preview lead badge */
.ob-email-preview-lead {
  padding: 10px 14px; border-top: 1px solid var(--ob-border-s);
  display: flex; align-items: center; gap: 10px;
  background: var(--ob-s2);
}
.ob-email-lead-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ob-accent); display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ob-email-lead-name  { font-size: 12.5px; font-weight: 600; color: var(--ob-t1); }
.ob-email-lead-title { font-size: 11.5px; color: var(--ob-t3); }

/* Empty state */
.ob-email-empty {
  padding: 44px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ob-email-empty-icon { font-size: 28px; color: var(--ob-t4); }
.ob-email-empty-text { font-size: 14px; font-weight: 600; color: var(--ob-t2); }
.ob-email-empty-hint { font-size: 12.5px; color: var(--ob-t3); max-width: 290px; line-height: 1.6; }

/* ── Action bar beneath email ── */
.ob-msg-action-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 2px 0;
}
.ob-btn-ai-refine { color: var(--ob-accent); border-color: var(--ob-accent-m) !important; }
.ob-btn-ai-refine:hover { background: var(--ob-accent-s) !important; }

/* ── Popovers (fixed-position dropdowns) ── */
.ob-popover {
  position: fixed;
  z-index: 300;
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  border-radius: var(--ob-r);
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.07);
  display: none;
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}
.ob-popover--open { display: block; }

/* Blueprint options */
.ob-bp-opt {
  width: 100%; text-align: left; padding: 11px 16px;
  background: transparent; border: none; cursor: pointer;
  font-family: Inter, system-ui, sans-serif; transition: background .1s;
  border-bottom: 1px solid var(--ob-border-s);
}
.ob-bp-opt:last-child  { border-bottom: none; }
.ob-bp-opt:hover       { background: var(--ob-s2); }
.ob-bp-opt--active     { background: var(--ob-accent-s); }
.ob-bp-opt-name        { font-size: 13px; font-weight: 600; color: var(--ob-t1); }

/* Subject type options */
.ob-subj-opt {
  width: 100%; text-align: left; padding: 11px 16px;
  background: transparent; border: none; cursor: pointer;
  font-family: Inter, system-ui, sans-serif; transition: background .1s;
  border-bottom: 1px solid var(--ob-border-s);
}
.ob-subj-opt:last-child  { border-bottom: none; }
.ob-subj-opt:hover       { background: var(--ob-s2); }
.ob-subj-opt--active     { background: var(--ob-accent-s); }
.ob-subj-opt-name        { font-size: 13px; font-weight: 600; color: var(--ob-t1); }
.ob-subj-opt-example     { font-size: 11.5px; color: var(--ob-t3); margin-top: 2px; font-style: italic; line-height: 1.4; }

/* ── Sheet overlay ── */
.ob-sheet-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.32);
  backdrop-filter: blur(2px);
  display: none;
}
.ob-sheet-overlay--open { display: block; }

/* ── Bottom sheets ── */
.ob-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--ob-surface);
  border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--ob-border);
  max-height: 78vh;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .27s cubic-bezier(.2,.85,.4,1), visibility 0s linear .27s;
}
.ob-sheet--open {
  transform: translateY(0);
  visibility: visible;
  box-shadow: 0 -8px 40px rgba(0,0,0,.14);
  transition: transform .27s cubic-bezier(.2,.85,.4,1), visibility 0s linear 0s;
}

.ob-sheet-handle {
  width: 36px; height: 4px; border-radius: 4px;
  background: var(--ob-border);
  margin: 10px auto 0; flex-shrink: 0;
}
.ob-sheet-hd {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--ob-border-s);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.ob-sheet-title { font-size: 15px; font-weight: 700; color: var(--ob-t1); }
.ob-sheet-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ob-s2); border: 1px solid var(--ob-border);
  color: var(--ob-t2); font-size: 18px; font-weight: 300;
  cursor: pointer; display: grid; place-items: center;
  font-family: sans-serif; transition: all .15s; line-height: 1;
}
.ob-sheet-close:hover { background: var(--ob-s3); color: var(--ob-t1); }
.ob-sheet-body {
  overflow-y: auto; padding: 18px 20px 8px;
  flex: 1; display: flex; flex-direction: column; gap: 18px;
}
.ob-sheet-section-title {
  font-size: 10.5px; font-weight: 700; color: var(--ob-t4);
  text-transform: uppercase; letter-spacing: .08em;
  text-align: center;
}
.ob-sheet-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--ob-border-s);
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; flex-shrink: 0;
}

/* ── Dark mode overrides for new components ── */
.dark .ob-email-chrome          { background: var(--ob-s2); }
.dark .ob-email-headers         { background: var(--ob-s2); }
.dark .ob-email-trace-bar       { background: var(--ob-s2); }
.dark .ob-email-preview-lead    { background: var(--ob-s2); }
.dark .ob-email-generating-banner { background: rgba(124,115,242,.08); border-color: rgba(124,115,242,.15); }
.dark .ob-email-dot--red    { background: #ff5f57; }
.dark .ob-email-dot--yellow { background: #febc2e; }
.dark .ob-email-dot--green  { background: #28c840; }
.dark .ob-msg-bp-row:hover  { border-color: var(--ob-accent-m); background: var(--ob-s3); }
.dark .ob-bp-opt:hover      { background: var(--ob-s3); }
.dark .ob-subj-opt:hover    { background: var(--ob-s3); }
.pagy {
  @apply flex space-x-1 font-semibold text-sm text-gray-500;

  a:not(.gap) {
    @apply block rounded-lg px-3 py-1 bg-gray-200;

    &:hover {
      @apply bg-gray-300;
    }

    &:not([href]) {
      /* disabled links */
      @apply text-gray-300 bg-gray-100 cursor-default;
    }

    &.current {
      @apply text-white bg-gray-400;
    }
  }

  label {
    @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5;

    input {
      @apply bg-gray-100 border-none rounded-md;
    }
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
