:root {
  --upleads-primary: #C81E6E;
  --upleads-primary-dark: #A3175A;
  --upleads-primary-light: #FCE3EE;
  --upleads-background: #FFF9F5;
  --upleads-surface: #FFFFFF;
  --upleads-ink: #1A1B3F;
  --upleads-slate: #56587A;
  --upleads-border: #E7DEDA;
  --upleads-success: #1F7A5A;
  --upleads-warning: #D98A15;
  --upleads-warning-light: #FFF6E5;
  --upleads-error: #B3261E;

  --upleads-radius-card: 16px;
  --upleads-radius-input: 12px;
  --upleads-radius-button: 12px;
  --upleads-radius-menu: 14px;

  --upleads-font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --jalli-night: #1A1B3F;
  --jalli-night-2: #2C2D5C;
  --jalli-cream: #FFF9F5;
  --jalli-pink: #E8317A;
  --jalli-orange: #FFA033;
  --jalli-blue: #2E9BFF;
  --jalli-muted-on-night: #D9D7EC;
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  /* Assistant moments (orb, send button): orange -> pink -> violet. */
  --upleads-gradient: linear-gradient(135deg, #FF7A2F 0%, #F23B7A 50%, #7A4DFF 100%);

  --bg: var(--upleads-background);
  --surface: var(--upleads-surface);
  --surface-2: var(--upleads-surface);
  --surface-3: var(--upleads-primary-light);
  --ink: var(--upleads-ink);
  --muted: var(--upleads-slate);
  --muted-2: var(--upleads-slate);
  --line: var(--upleads-border);
  --line-strong: var(--upleads-border);
  --nav: var(--upleads-surface);
  --nav-hover: rgba(200, 30, 110, 0.06);
  --nav-active: rgba(200, 30, 110, 0.11);
  --primary: var(--upleads-primary);
  --primary-strong: var(--upleads-primary-dark);
  --primary-soft: var(--upleads-primary-light);
  --blue: var(--upleads-primary);
  --green: var(--upleads-success);
  --green-soft: rgba(32, 166, 106, 0.1);
  --orange: var(--upleads-warning);
  --orange-soft: var(--upleads-warning-light);
  --red: var(--upleads-error);
  --red-soft: rgba(240, 68, 56, 0.1);
  --yellow: var(--upleads-warning);
  --yellow-soft: var(--upleads-warning-light);
  --shadow: 0 1px 2px rgba(28, 20, 70, 0.04), 0 8px 24px rgba(28, 20, 70, 0.05);
  --radius: var(--upleads-radius-card);
  --radius-sm: var(--upleads-radius-input);
  --sidebar: 244px;
  font-family: var(--upleads-font-family);
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { width: 18px; height: 18px; display: block; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100dvh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--nav); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 21px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 16px; }
.brand-mark { width: 37px; height: 37px; border-radius: 11px; background: linear-gradient(145deg,#6d5dfc,#4736db); display: grid; place-items: center; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-copy { display: grid; line-height: 1.08; }
.brand-copy strong { font-size: 15px; letter-spacing: .01em; }
.brand-copy span { color: #9ea8bd; font-size: 12px; margin-top: 4px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #aab3c5; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; font-size: 13.5px; font-weight: 590; text-align: left; transition: .16s ease; }
.nav-item:hover { background: var(--nav-hover); color: #fff; }
.nav-item.active { background: var(--nav-active); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.nav-item.active .nav-icon { color: var(--primary); }
.nav-icon { color: #8d99ae; display: grid; place-items: center; }
.nav-spacer { height: 10px; }
.nav-section-label { color: #68758e; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; padding: 13px 12px 6px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.nav-button { cursor: pointer; }
.workspace-mini { display: flex; gap: 10px; align-items: center; padding: 9px 10px 2px; color: #fff; }
.workspace-mini .avatar { width: 30px; height: 30px; border-radius: 9px; background: #222b45; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.workspace-mini > div:last-child { display: grid; }
.workspace-mini strong { font-size: 12px; }
.workspace-mini span { color: #8e9ab0; font-size: 10px; margin-top: 2px; }

.main-area { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar { height: 94px; padding: 20px 32px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(245,247,251,.92); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(229,233,240,.85); }
.topbar h1 { margin: 2px 0 0; font-size: 26px; line-height: 1.1; letter-spacing: -.035em; }
.eyebrow, .modal-kicker { margin: 0; color: var(--primary); font-weight: 800; font-size: 10px; letter-spacing: .12em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.health-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 12px; color: var(--muted); font-size: 12px; font-weight: 650; }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px rgba(183,121,31,.12); }
.health-chip.ok .health-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(14,159,110,.12); }
.health-chip.error .health-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(217,45,32,.12); }

.content { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; padding: 6px 32px 42px; max-width: 1650px; width: 100%; margin: 0 auto; }
.page-stack { display: grid; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 4px 0 2px; }
.page-head h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.page-actions { display: flex; gap: 8px; align-items: center; }

.primary-button, .secondary-button, .ghost-button, .danger-button, .icon-button, .table-action { border-radius: 9px; border: 1px solid transparent; min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 12.5px; transition: .15s ease; }
.primary-button { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.25); }
.primary-button:hover { background: var(--primary-strong); transform: translateY(-1px); }
.secondary-button { background: var(--surface); border-color: var(--line-strong); color: #344054; }
.secondary-button:hover { background: var(--surface-2); }
button:disabled, button[aria-disabled="true"] { cursor: not-allowed; pointer-events: none; }
.secondary-button:disabled, .secondary-button[aria-disabled="true"] { background: #eef1f5; border-color: #d0d5dd; color: #98a2b3; opacity: .8; }
.ghost-button { background: transparent; color: var(--muted); }
.ghost-button:hover { background: var(--surface-3); color: var(--ink); }
.danger-button { background: var(--red); color: #fff; }
.danger-button:hover { background: #b42318; }
.icon-button { width: 38px; padding: 0; background: var(--surface); border-color: var(--line); color: #667085; }
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.icon-button.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.metrics-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 17px 18px; min-height: 119px; box-shadow: 0 1px 1px rgba(16,24,40,.015); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.metric-icon { width: 31px; height: 31px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.metric-value { display: flex; align-items: baseline; gap: 8px; margin-top: 13px; }
.metric-value strong { font-size: 28px; letter-spacing: -.04em; }
.metric-value span { font-size: 11px; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 3px 6px; border-radius: 6px; }
.metric-note { margin-top: 4px; color: var(--muted-2); font-size: 10.5px; }

.two-col { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.85fr); gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 1px rgba(16,24,40,.01); overflow: hidden; }
.panel-header { min-height: 65px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: 14px; letter-spacing: -.015em; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px; }

.funnel { padding: 22px 18px 20px; display: grid; grid-template-columns: repeat(5,1fr); gap: 0; align-items: center; }
.funnel-step { min-width: 0; position: relative; }
.funnel-step:not(:last-child)::after { content: ''; position: absolute; height: 1px; background: var(--line-strong); top: 21px; left: calc(50% + 24px); right: calc(-50% + 24px); }
.funnel-node { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin: 0 auto; position: relative; z-index: 1; }
.funnel-copy { text-align: center; margin-top: 9px; }
.funnel-copy strong { display: block; font-size: 17px; }
.funnel-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

.pipeline-bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 60px; gap: 12px; align-items: center; }
.bar-label { min-width: 0; }
.bar-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.bar-label span { display: block; color: var(--muted-2); margin-top: 2px; font-size: 9.5px; }
.bar-track { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 999px; min-width: 2px; }
.bar-value { text-align: right; font-size: 11px; color: #475467; font-weight: 700; }

.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); color: #667085; display: grid; place-items: center; }
.activity-copy strong { display: block; font-size: 11px; line-height: 1.4; font-weight: 650; }
.activity-copy span, .activity-time { color: var(--muted-2); font-size: 9.5px; }
.activity-copy span { display: block; margin-top: 3px; }
.activity-time { padding-top: 2px; white-space: nowrap; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box { position: relative; min-width: 235px; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; color: #98a2b3; }
.search-box input { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 11px 0 33px; background: var(--surface); outline: none; color: var(--ink); font-size: 11.5px; }
.search-box input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select-control:focus { border-color: #a9a4ff; box-shadow: 0 0 0 3px rgba(79,70,229,.08); }
.select-control { height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 30px 0 11px; background: var(--surface); color: #475467; font-size: 11.5px; outline: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
th { text-align: left; padding: 10px 14px; color: #667085; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: #344054; vertical-align: middle; }
tbody tr:hover { background: #fbfcfe; }
tbody tr:last-child td { border-bottom: 0; }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.person-avatar { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 9px; flex: 0 0 auto; }
.name-cell strong { display: block; color: var(--ink); font-size: 11.5px; }
.name-cell span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; }
.link-clean { color: #4f46e5; font-weight: 700; text-decoration: none; }
.link-clean:hover { text-decoration: underline; }
.table-action { min-height: 30px; padding: 0 9px; border-color: var(--line); background: #fff; color: #475467; font-size: 10.5px; }
.table-action:hover { background: var(--surface-2); }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.campaign-actions-heading, .campaign-actions-cell { width: 70px; text-align: right; }
.campaign-actions-trigger { display: inline-grid; place-items: center; min-width: 32px; padding: 0; cursor: pointer; font-size: 17px; line-height: 1; }
.campaign-actions-menu { position: fixed; z-index: 120; display: grid; min-width: 160px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 10px 30px rgba(16,24,40,.12); }
.campaign-actions-menu[hidden] { display: none; }
.campaign-actions-menu button { border: 0; border-radius: 6px; padding: 8px 9px; background: transparent; color: #344054; text-align: left; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.campaign-actions-menu button:hover, .campaign-actions-menu button:focus-visible { background: var(--surface-2); outline: none; }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; background: var(--surface-3); color: #667085; font-size: 9.5px; font-weight: 750; white-space: nowrap; }
.badge.green { background: var(--green-soft); color: #087a56; }
.badge.red { background: var(--red-soft); color: #b42318; }
.badge.orange { background: var(--orange-soft); color: #b54708; }
.badge.purple { background: var(--primary-soft); color: #4f46e5; }
.badge.yellow { background: var(--yellow-soft); color: #946200; }
.badge-action { border: 0; font: inherit; cursor: pointer; }
.badge-action:hover { filter: brightness(.97); }
.badge-action:disabled { cursor: wait; opacity: .65; }
.channel-attention-copy { margin-top: 8px; padding: 8px 10px; border: 1px solid #f3d69b; background: #fffaf0; border-radius: 9px; color: #7a5a12 !important; font-size: 10px !important; line-height: 1.4; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 12px 14px; }
.pagination p { margin: 0; color: var(--muted); font-size: 10.5px; }
.pagination-controls { display: flex; gap: 6px; }
.pagination-controls button { min-width: 33px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #475467; }
.pagination-controls button:disabled { opacity: .4; cursor: default; }

.campaign-name { min-width: 180px; }
.campaign-name strong { display: block; color: var(--ink); }
.campaign-name span { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 3px; }
.performance-stack { display: flex; gap: 5px; flex-wrap: wrap; }
.progress-cell { min-width: 220px; }
.progress-pills { display: flex; gap: 5px; flex-wrap: wrap; }

.channel-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.channel-card { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 17px; min-height: 175px; display: flex; flex-direction: column; }
.channel-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.channel-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #edf4ff; color: #0a66c2; }
.channel-card h3 { margin: 13px 0 3px; font-size: 14px; }
.channel-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.channel-card-footer { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.account-channel-card { min-height: 205px; }
.account-channel-card .channel-account-name { color: var(--text); font-weight: 700; text-decoration: none; display: block; }
.account-channel-card .channel-account-name:hover { color: #5145cd; text-decoration: underline; }
.account-channel-card .person-avatar { flex: 0 0 auto; overflow: hidden; }
.account-channel-card .person-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.channel-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.channels-panel .channel-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.channel-empty-state { grid-column: 1 / -1; min-height: 150px; }
.channel-disabled { opacity: .62; }

.inbox-layout { display: grid; grid-template-columns: 360px 1fr; min-height: 640px; }
.inbox-sidebar { border-right: 1px solid var(--line); display:flex; flex-direction:column; min-height:0; }
.inbox-tabs { display: flex; gap: 15px; padding: 15px 15px 0; border-bottom: 1px solid var(--line); }
.inbox-tab { border: 0; background: transparent; padding: 0 0 11px; color: var(--muted); font-size: 10.5px; font-weight: 700; border-bottom: 2px solid transparent; }
.inbox-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.inbox-search { padding: 12px 14px; }
.inbox-temperature-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.inbox-temperature { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 5px 10px; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.inbox-temperature.active { background: #FCE3EE; border-color: #F3A7C6; color: var(--primary); }
.conversation-list { max-height:none; overflow-y:auto; flex:1 1 auto; min-height:0; }
.conversation { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.conversation:hover, .conversation.active { background: #f7f8ff; }
.conversation strong { font-size: 10.5px; color: var(--ink); }
.conversation p { margin: 3px 0 0; color: var(--muted); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 225px; }
.conversation time { font-size: 8.5px; color: var(--muted-2); }
.inbox-main { display: flex; min-width: 0; }
.empty-state { min-height: 440px; flex: 1; display: grid; place-items: center; text-align: center; padding: 35px; }
.empty-state-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state h3 { margin: 0; font-size: 15px; }
.empty-state p { max-width: 410px; margin: 8px auto 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.empty-state .secondary-button { margin-top: 16px; }
.chat-view { width: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.chat-header { padding: 14px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.chat-header h3 { margin: 0; font-size: 12px; }
.chat-header p { margin: 3px 0 0; color: var(--muted); font-size: 9.5px; }
.chat-body { display: grid; place-items: center; padding: 28px; background: #fbfcfe; }
.chat-placeholder { max-width: 440px; text-align: center; color: var(--muted); }
.chat-placeholder strong { display: block; color: var(--ink); margin-bottom: 7px; }
.chat-placeholder p { font-size: 10.5px; line-height: 1.6; }
.chat-compose { border-top: 1px solid var(--line); padding: 13px; }
.chat-compose textarea { width: 100%; resize: none; min-height: 68px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #f8fafc; color: var(--muted); }
.inbox-page { flex: 1 1 auto; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
.inbox-page > .panel { min-height: 0; }

.settings-layout { display: grid; grid-template-columns: 210px 1fr; min-height: 610px; }
.settings-menu { border-right: 1px solid var(--line); padding: 12px; }
.settings-menu button { width: 100%; border: 0; background: transparent; border-radius: 8px; text-align: left; padding: 9px 10px; font-size: 10.5px; font-weight: 700; color: #667085; }
.settings-menu button.active, .settings-menu button:hover { background: var(--primary-soft); color: var(--primary); }
.settings-content { padding: 20px; }
.settings-section { max-width: 920px; }
.settings-section h3 { margin: 0 0 4px; font-size: 15px; }
.settings-section > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #475467; font-size: 10.5px; font-weight: 750; }
.field small { color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.field input, .field select, .field textarea { min-height: 39px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; padding: 9px 11px; color: var(--ink); outline: none; font-size: 11.5px; }
.field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.field textarea.assistant-style-textarea { min-height: 62px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; }
.toggle-row strong { display: block; font-size: 11px; }
.toggle-row span { color: var(--muted); font-size: 9.5px; }
.switch { width: 37px; height: 21px; border-radius: 999px; background: #d0d5dd; position: relative; flex: 0 0 auto; transition: .16s; }
.switch::after { content: ''; width: 17px; height: 17px; background: white; border-radius: 50%; position: absolute; top: 2px; left: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .16s; }
.switch.on { background: var(--primary); }
.switch.on::after { left: 18px; }
.settings-actions { margin-top: 18px; display: flex; gap: 8px; justify-content: flex-end; }
.safe-banner { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #ccebdc; background: #f2fbf7; color: #196a4c; border-radius: 11px; padding: 12px 13px; margin-bottom: 16px; }
.safe-banner strong { font-size: 10.5px; display: block; }
.safe-banner p { margin: 3px 0 0; font-size: 9.5px; color: #3d7c66; }

.modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
.modal::backdrop { background: rgba(8,12,24,.55); backdrop-filter: blur(3px); }
.modal-card { width: min(780px,calc(100vw - 34px)); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(16,24,40,.24); padding: 0; }
.modal-header { padding: 20px 22px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.modal-header h2 { margin: 4px 0 4px; font-size: 20px; letter-spacing: -.03em; }
.modal-header p { margin: 0; color: var(--muted); max-width: 560px; font-size: 10.5px; line-height: 1.5; }
.modal-close { border: 0; background: transparent; }
.wizard-steps { display: grid; grid-template-columns: repeat(4,1fr); padding: 14px 22px 0; gap: 8px; }
.wizard-step { display: flex; align-items: center; gap: 7px; color: #98a2b3; font-size: 9.5px; font-weight: 750; }
.wizard-step i { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #f0f2f5; font-size: 9px; }
.wizard-step.active { color: var(--primary); }
.wizard-step.active i { background: var(--primary); color: white; }
.wizard-step.done { color: var(--green); }
.wizard-step.done i { background: var(--green-soft); color: var(--green); }
.wizard-body { padding: 24px 22px; min-height: 330px; }
.modal-footer { display: flex; justify-content: space-between; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fbfcfd; }
.modal-footer-right { display: flex; gap: 7px; }
.channel-option { border: 1px solid #bfc6ff; background: #f8f8ff; border-radius: 12px; padding: 13px; display: flex; gap: 12px; align-items: center; }
.channel-option .channel-icon { width: 38px; height: 38px; }
.review-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.review-row { display: flex; justify-content: space-between; gap: 15px; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.review-row:last-child { border-bottom: 0; }
.review-row span { color: var(--muted); }
.review-row strong { text-align: right; }
.saas-review-heading { margin-bottom: 12px; }
.saas-review-heading > span { color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.saas-review-heading h3 { margin: 4px 0 0; font-size: 16px; }
.saas-review-card .review-row { align-items: flex-start; padding: 14px 16px; }
.saas-review-card .review-row > span:first-child { flex: 0 0 110px; font-weight: 700; }
.saas-review-card .review-row > strong,
.saas-review-card .review-row > div { flex: 1; text-align: left; }
.saas-review-message { background: #f8f9fb; border-radius: 8px; color: var(--text); font-size: 10.5px; line-height: 1.6; padding: 10px 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.saas-review-stack { display: grid; gap: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.saas-review-stack strong { color: var(--text); text-align: left; }
.saas-review-note { margin: 14px 0 0; }
@media (max-width: 560px) {
  .saas-review-card .review-row { display: grid; gap: 7px; }
  .saas-review-card .review-row > span:first-child { flex-basis: auto; }
}
.compact-modal { width: min(440px,calc(100vw - 34px)); padding: 24px; text-align: center; }
.confirm-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin: 0 auto 12px; }
.compact-modal h2 { margin: 0; font-size: 18px; }
.compact-modal p { color: var(--muted); line-height: 1.6; font-size: 11px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; width: min(360px,calc(100vw - 36px)); }
.toast { border: 1px solid var(--line); background: #fff; border-radius: 11px; box-shadow: var(--shadow); padding: 12px 13px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .2s ease; }
.toast.success { border-color: #ccebdc; }
.toast.error { border-color: #f4c7c3; }
.toast strong { display: block; font-size: 10.5px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.skeleton { background: linear-gradient(90deg,#f0f2f5,#f8f9fb,#f0f2f5); background-size: 220% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; min-height: 14px; }
@keyframes shimmer { to { background-position: -220% 0; } }
.loading-panel { min-height: 320px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.error-panel { border: 1px solid #f3c6c2; background: #fff7f6; color: #9d261d; border-radius: 12px; padding: 16px; font-size: 11px; }

@media (max-width: 1180px) {
  :root { --sidebar: 76px; }
  .brand-copy, .nav-label, .workspace-mini > div:last-child { display: none; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .brand-logo-full { display: none !important; }
  .brand-logo-compact { display: block !important; }
  .nav-item { justify-content: center; padding: 11px; }
  .nav-section-label { display: none; }
  .workspace-mini { justify-content: center; }
  .metrics-grid { grid-template-columns: repeat(3,1fr); }
  .channel-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  :root { --sidebar: 62px; }
  .sidebar { padding-left: 8px; padding-right: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .topbar { padding: 16px 18px; height: 82px; }
  .content { padding: 6px 18px 30px; }
  .health-chip { display: none; }
  .topbar h1 { font-size: 22px; }
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .two-col, .inbox-layout, .settings-layout { grid-template-columns: 1fr; }
  .inbox-sidebar, .settings-menu { border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-menu { display: flex; overflow-x: auto; }
  .settings-menu button { width: auto; white-space: nowrap; }
  .channel-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .wizard-steps { grid-template-columns: repeat(2,1fr); row-gap: 9px; }
}


/* Campaign detail V1.2 */
.campaign-name-button { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.campaign-name-button:hover strong { color: var(--primary); }
.campaign-detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.campaign-detail-head p { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; }
.back-link { border: 0; background: transparent; padding: 0; margin-bottom: 8px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.back-link:hover { color: var(--primary); }
.campaign-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.campaign-title-row h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.campaign-detail-shell { min-height: 610px; }
.campaign-tabs { display: flex; gap: 4px; padding: 0 17px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.campaign-tab { border: 0; background: transparent; padding: 15px 13px 13px; color: var(--muted); font-size: 10.5px; font-weight: 750; border-bottom: 2px solid transparent; white-space: nowrap; }
.campaign-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.campaign-detail-body { padding: 18px; }
.detail-stack { display: grid; gap: 16px; }
.campaign-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.campaign-overview-grid { grid-template-columns: minmax(0,1.1fr) minmax(300px,.9fr); }
.detail-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.detail-card-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.detail-card-head h3, .section-intro h3 { margin: 0; font-size: 13px; }
.detail-card-head p, .section-intro p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.detail-list { display: grid; }
.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 15px; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list span { color: var(--muted); }
.detail-list strong { color: var(--ink); text-align: right; }
.message-preview { margin: 15px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbff; color: #344054; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.message-note { padding: 0 15px 15px; color: var(--muted-2); font-size: 9.5px; }
.section-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.sequence-canvas { position: relative; border: 1px dashed #d7d9e6; border-radius: 14px; background-color: #fcfcff; background-image: radial-gradient(#dfe2ee 0.8px, transparent 0.8px); background-size: 18px 18px; padding: 28px 25px 30px; min-height: 430px; }
.sequence-canvas.compact { min-height: 0; border-width: 0; border-radius: 0; background-size: 16px 16px; padding: 22px; }
.sequence-start { width: fit-content; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--line); font-size: 10.5px; }
.sequence-start span { color: var(--primary); }
.sequence-start svg { width: 15px; }
.sequence-line { width: 1px; height: 26px; background: #cfd3df; margin: 0 auto; }
.sequence-node { display: flex; align-items: flex-start; gap: 10px; width: min(290px,100%); margin: 0 auto; padding: 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(16,24,40,.04); }
.sequence-node.decision { width: min(320px,100%); }
.sequence-node-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: 0 0 auto; }
.sequence-node small { display: block; color: var(--muted-2); font-size: 8.5px; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }
.sequence-node strong { display: block; margin-top: 2px; color: var(--ink); font-size: 10.5px; }
.sequence-node p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.sequence-branches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 46px; margin-top: 25px; position: relative; }
.sequence-branches::before { content: ''; position: absolute; top: -25px; left: 25%; right: 25%; height: 1px; background: #cfd3df; }
.sequence-branch { position: relative; display: grid; justify-items: center; align-content: start; }
.sequence-branch::before { content: ''; position: absolute; top: -25px; height: 25px; width: 1px; background: #cfd3df; }
.branch-label { position: relative; z-index: 1; padding: 4px 8px; border-radius: 999px; font-size: 8.5px; font-weight: 800; background: #fff; }
.branch-label.green { color: #087a56; border: 1px solid #b7ead9; background: #f0fbf6; }
.branch-label.red { color: #b42318; border: 1px solid #f4c7c3; background: #fff5f4; }
.branch-line { width: 1px; height: 18px; background: #cfd3df; }
.branch-line.vertical { height: 18px; }
.sequence-end { margin-top: 12px; color: var(--muted-2); font-size: 9px; font-weight: 700; }
.field-label { color: #475467; font-size: 10.5px; font-weight: 750; }
.connection-strategy-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 84px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; padding: 14px 15px; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s; }
.connection-strategy-card:hover { border-color: #c9c5ff; }
.connection-strategy-card.active { border-color: #b9b2ff; background: #f8f7ff; box-shadow: 0 0 0 2px rgba(94,78,255,.05); }
.connection-strategy-card > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.connection-strategy-card:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.connection-strategy-copy { min-width: 0; }
.connection-strategy-copy strong { display: block; color: var(--ink); font-size: 11.5px; }
.connection-strategy-copy p { margin: 5px 0 0; max-width: 560px; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.connection-strategy-state { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.connection-strategy-state > strong { min-width: 22px; color: var(--muted-2); font-size: 9px; letter-spacing: .04em; text-align: right; }
.connection-strategy-card.active .connection-strategy-state > strong { color: var(--primary); }
.saas-sequence-preview { margin-top: 22px; }
.saas-sequence-preview .section-intro { margin-bottom: 12px; }
.saas-sequence-preview .section-intro h3 { margin: 0 0 3px; }
.saas-sequence-preview .section-intro p { margin: 0; color: var(--muted); font-size: 10px; }
.saas-sequence-canvas { min-height: 0; padding: 22px; }
.detail-activity .empty-state { min-height: 320px; }
.saas-campaigns-page { gap: 14px; }
.campaign-list-panel { border-color: #e4e7ec; box-shadow: 0 2px 8px rgba(16,24,40,.025); }
.campaign-list-table th { padding-top: 11px; padding-bottom: 11px; background: #f9fafb; }
.campaign-list-table td { padding-top: 14px; padding-bottom: 14px; transition: background .15s ease; }
.saas-campaign-row:hover td { background: #f8f9ff; }
.saas-campaign-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.saas-campaign-name { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.campaign-list-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #e1ddff; border-radius: 10px; background: #f5f3ff; color: var(--primary); }
.campaign-list-icon svg { width: 16px; }
.saas-campaign-name strong { display: block; color: var(--ink); font-size: 11.5px; font-weight: 750; }
.saas-campaign-name > div > span { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.campaign-list-source { color: #475467; font-weight: 650; }
.campaign-status-badge { text-transform: capitalize; }
.campaign-created-date { color: var(--muted); white-space: nowrap; }
.campaign-empty-state { min-height: 300px; }
.campaign-detail-shell { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 2px 9px rgba(16,24,40,.025); }
.campaign-detail-head { align-items: center; padding: 20px 22px 18px; background: var(--surface); }
.campaign-detail-primary { min-width: 0; }
.campaign-detail-head .back-link { margin-bottom: 10px; }
.campaign-title-row h2 { font-size: 23px; }
.campaign-header-meta { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 9.5px; }
.campaign-header-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.campaign-header-meta svg { width: 13px; color: #858b98; }
.campaign-header-meta strong { color: #475467; font-weight: 750; }
.campaign-detail-actions { flex: 0 0 auto; }
.campaign-detail-actions button { min-height: 36px; border-radius: 9px; }
.campaign-tabs { padding: 0 20px; background: #fff; }
.campaign-tab { padding-top: 14px; padding-bottom: 12px; }
.campaign-detail-body { padding: 20px; background: #fafbfc; }
.campaign-summary-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.campaign-summary-card { min-width: 0; display: flex; align-items: flex-start; gap: 11px; min-height: 92px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.02); }
.summary-icon { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.summary-icon svg { width: 15px; }
.campaign-summary-card > div { min-width: 0; }
.campaign-summary-card > div > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; }
.campaign-summary-card > div > strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.campaign-summary-card small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8.5px; }
.campaign-config-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.campaign-overview .detail-card { box-shadow: 0 1px 2px rgba(16,24,40,.018); }
.campaign-card-copy { padding: 15px; color: #475467; font-size: 10.5px; line-height: 1.6; }
.campaign-message-card .message-preview { margin: 0; border: 0; border-radius: 0; border-left: 3px solid #d8d4ff; background: #fafaff; padding: 16px 18px; }
.campaign-sequence-card .detail-card-head { padding-left: 18px; padding-right: 18px; }
.campaign-sequence-frame { padding: 14px; background: #fafbfc; }
.campaign-sequence-frame .sequence-canvas { background-color: #fff; }
.campaign-leads-card .detail-card-head { padding-left: 18px; padding-right: 18px; }
.campaign-source-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9.5px; }
.campaign-source-meta span { padding: 4px 8px; border-radius: 999px; background: var(--surface-3); }
.campaign-source-meta strong { color: #475467; }
.campaign-leads-table td { padding-top: 13px; padding-bottom: 13px; }
.campaign-leads-table .table-action { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.campaign-leads-boundary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: stretch; padding: 14px; border-top: 1px solid var(--line); background: #fcfcfd; }
.campaign-leads-boundary .safe-banner { margin: 0; }
.snapshot-state { min-width: 155px; display: grid; align-content: center; gap: 4px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.snapshot-state span { color: var(--muted); font-size: 9px; }
.snapshot-state strong { color: #475467; font-size: 10.5px; }
.campaign-empty-card { max-width: 760px; margin: 0 auto; }
.campaign-tab-empty { min-height: 280px; }
.campaign-tab-empty .empty-state-icon svg { width: 24px; }
.analytics-funnel { display: grid; gap: 14px; padding: 18px; }
.analytics-funnel > div { display: grid; grid-template-columns: 110px 120px 1fr; gap: 14px; align-items: center; }
.analytics-funnel span { color: var(--muted); font-size: 10px; }
.analytics-funnel strong { font-size: 10.5px; }
.analytics-funnel i { display: block; height: 9px; border-radius: 999px; background: var(--primary); min-width: 2px; max-width: 100%; }
@media (max-width: 1050px) {
  .campaign-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .campaign-overview-grid { grid-template-columns: 1fr; }
  .campaign-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .campaign-detail-head { align-items: flex-start; flex-direction: column; }
  .sequence-branches { grid-template-columns: 1fr; gap: 36px; }
  .sequence-branches::before { display: none; }
  .sequence-branch::before { display: none; }
  .campaign-metrics { grid-template-columns: 1fr; }
  .campaign-summary-grid, .campaign-config-grid { grid-template-columns: 1fr; }
  .campaign-leads-boundary { grid-template-columns: 1fr; }
  .campaign-source-meta { align-items: flex-end; flex-direction: column; }
  .analytics-funnel > div { grid-template-columns: 80px 100px 1fr; }
}

/* Leads V1 import mapper */
.lead-import-modal .modal-card { width: min(860px,calc(100vw - 40px)); }
.import-file-summary { display:flex; align-items:center; gap:14px; padding:15px; border:1px solid var(--line); border-radius:12px; background:#fafbff; margin-bottom:16px; }
.import-file-icon { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; background:var(--primary-soft); color:var(--primary); flex:0 0 auto; }
.import-file-icon svg { width:19px; }
.import-file-summary strong { display:block; font-size:12px; }
.import-file-summary span { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.form-field { display:grid; gap:7px; margin-bottom:16px; }
.form-field label { font-size:10.5px; font-weight:800; color:var(--ink); }
.form-field input { height:42px; border:1px solid var(--line-strong); border-radius:9px; padding:0 12px; font:inherit; color:var(--ink); background:#fff; }
.form-field small { color:var(--muted); font-size:9.5px; line-height:1.45; }
.mapping-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:12px; }
.mapping-head h3 { margin:0; font-size:14px; }
.mapping-head p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.mapping-table { border:1px solid var(--line); border-radius:12px; overflow:hidden; max-height:390px; overflow-y:auto; }
.mapping-row { display:grid; grid-template-columns:minmax(0,1fr) 28px minmax(210px,.9fr); gap:10px; align-items:center; padding:11px 12px; border-bottom:1px solid var(--line); background:#fff; }
.mapping-row:last-child { border-bottom:0; }
.mapping-row strong { display:block; font-size:10.5px; }
.mapping-row span { display:block; margin-top:3px; color:var(--muted); font-size:9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mapping-arrow { text-align:center; color:var(--muted-2); font-weight:800; }
.mapping-row .select-control { width:100%; }
.import-preview-table { border:1px solid var(--line); border-radius:12px; overflow:auto; }
.import-preview-table table { width:100%; border-collapse:collapse; min-width:680px; }
.import-preview-table th, .import-preview-table td { padding:10px 11px; border-bottom:1px solid var(--line); font-size:9.5px; text-align:left; }
.import-preview-table th { color:var(--muted); font-size:8.5px; text-transform:uppercase; letter-spacing:.04em; background:#fafbfc; }
.import-preview-table tr:last-child td { border-bottom:0; }
.preview-footnote { margin:8px 0 0; color:var(--muted); font-size:9.5px; }
@media (max-width:760px){ .mapping-row{grid-template-columns:1fr}.mapping-arrow{display:none} }

/* Leads V1.4 */
.lead-tabs{display:flex;gap:6px;margin-top:-4px}.lead-tabs button{border:1px solid var(--border);background:#fff;color:var(--muted);border-radius:8px;padding:8px 13px;font-size:11px;font-weight:700;cursor:pointer}.lead-tabs button.active{background:#eef2ff;border-color:#c7d2fe;color:var(--primary)}
.clickable-row{cursor:pointer}.clickable-row:hover td{background:#fafbff}.muted-inline{color:var(--muted);font-size:10px}.danger-text{color:#b42318!important}.back-link{border:0;background:transparent;padding:0;margin:0 0 6px;color:var(--muted);font-size:10px;font-weight:700;cursor:pointer}.back-link:hover{color:var(--primary)}

/* Inbox V1.5 */
.inbox-tab span { display:inline-grid; place-items:center; min-width:16px; height:16px; padding:0 4px; margin-left:3px; border-radius:999px; background:#eef0ff; color:var(--primary); font-size:8px; }
.conversation { width:100%; text-align:left; border:0; border-top:1px solid var(--line); background:#fff; font:inherit; color:inherit; }
.conversation.unread { background:#fcfcff; }
.conversation-copy { min-width:0; }
.conversation-name { display:flex; align-items:center; gap:6px; }
.conversation-name i { width:6px; height:6px; border-radius:999px; background:var(--primary); flex:0 0 auto; }
.conversation-meta { display:flex; gap:5px; align-items:center; margin-top:6px; }
.lead-temp { display:inline-flex; align-items:center; min-height:19px; padding:2px 7px; border-radius:999px; background:#f2f4f7; color:#667085; font-size:8.5px; font-weight:700; white-space:nowrap; }
.lead-temp.hot { background:#fff1ed; color:#c4320a; }
.lead-temp.warm { background:#fff8e7; color:#b54708; }
.lead-temp.cold { background:#eef4ff; color:#3538cd; }
.chat-view { grid-template-rows:auto auto 1fr auto; min-height:640px; }
.inbox-chat-header { gap:14px; }
.chat-title-line { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.chat-header-actions { display:flex; gap:8px; align-items:center; }
.lead-classifier { padding:10px 16px; border-bottom:1px solid var(--line); background:#fff; display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
.lead-classifier label { display:grid; gap:4px; color:var(--muted); font-size:8.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.lead-classifier select { min-width:135px; border:1px solid var(--line); background:#fff; border-radius:8px; padding:7px 28px 7px 9px; color:var(--ink); font-size:10px; }
.sync-note { margin-left:auto; color:var(--muted-2); font-size:9px; align-self:center; }
.chat-body { display:block; overflow-y:auto; max-height:520px; min-height:360px; padding:20px clamp(18px,3.5vw,56px) 28px; background:#f8fafc; }
/* Inbox V3.1 UI polish: messages live on a centered conversation rail.
   This keeps long sent messages from looking detached on very wide screens,
   while short messages still hug their actual text width. */
.chat-body > .message-row,
.chat-body > .chat-date-separator { width:min(100%,1040px); margin-left:auto; margin-right:auto; }
.shared-post-card { width:min(100%,680px); margin:10px auto; padding:12px 14px; display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:10px; background:#f5f7fb; color:var(--muted); font-size:12px; }
.message-row { display:flex; margin-top:8px; margin-bottom:8px; }
.message-row.outbound { justify-content:flex-end; }
.message-row.inbound { justify-content:flex-start; }
.message-row.unknown { justify-content:center; }
.message-stack { display:flex; flex-direction:column; width:fit-content; max-width:min(78%,760px); min-width:0; }
.message-row.outbound .message-stack { align-items:flex-end; max-width:min(86%,820px); }
.message-row.inbound .message-stack { align-items:flex-start; }
.message-row.unknown .message-stack { align-items:center; max-width:min(80%,720px); }
.message-bubble { display:inline-block; width:auto; max-width:100%; padding:11px 14px; border-radius:16px; background:#fff; border:1px solid #e7eaf0; box-shadow:0 1px 2px rgba(16,24,40,.035); overflow-wrap:anywhere; }
.message-row.outbound .message-bubble { background:var(--primary); border-color:var(--primary-strong); border-bottom-right-radius:5px; }
.message-row.outbound .message-bubble p { color:#fff; }
.message-row.inbound .message-bubble { border-bottom-left-radius:5px; }
.message-row.unknown .message-bubble { background:#f2f4f7; border-style:dashed; }
.message-bubble p { margin:0; color:var(--ink); font-size:11px; line-height:1.58; }
.message-meta { display:flex; align-items:center; margin:4px 6px 0; color:var(--muted-2); font-size:9px; line-height:1; background:transparent; border:0; box-shadow:none; }
.message-meta time { background:transparent; border:0; padding:0; }
.message-meta time::before { content:''; margin:0; }
.chat-date-separator { display:flex; align-items:center; gap:10px; margin:18px 0 12px; color:var(--muted-2); font-size:9px; font-weight:700; letter-spacing:.045em; }
.chat-date-separator::before,.chat-date-separator::after { content:''; height:1px; background:#eaecf0; flex:1; }
.chat-date-separator span { white-space:nowrap; padding:0 6px; }
.compose-note { margin-top:6px; color:var(--muted-2); font-size:8.5px; }

/* Inbox V2 profile photos */
.person-avatar { position: relative; overflow: hidden; }
.person-avatar > span { position: relative; z-index: 1; }
.person-avatar.with-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; background: #eef0ff; }
.person-avatar.large { width: 42px; height: 42px; font-size: 11px; }
.chat-person { display: flex; align-items: center; gap: 10px; min-width: 0; }

.transcript-fallback{padding:18px}.transcript-fallback pre{margin:14px 0 0;white-space:pre-wrap;word-break:break-word;font:inherit;line-height:1.55;background:#f8fafc;border:1px solid #e6eaf0;border-radius:12px;padding:16px;max-height:520px;overflow:auto}.person-avatar.with-photo{overflow:hidden}.person-avatar.with-photo img{width:100%;height:100%;object-fit:cover;display:block;position:absolute;inset:0}.person-avatar{position:relative}

/* Inbox V2.7 AI classification */
.classifier-source{margin-left:5px;color:#6941c6;font-size:7.5px;font-weight:800;letter-spacing:.06em}
.ai-classification-summary{min-width:220px;max-width:360px;align-self:center;display:grid;gap:4px;padding:7px 10px;border:1px solid #e4e7ec;border-radius:10px;background:#fafaff}
.ai-classification-summary>div{display:flex;align-items:center;gap:8px;min-width:0}.ai-classification-summary strong{font-size:9.5px;color:var(--ink)}
.ai-classification-summary p{margin:0;color:var(--muted);font-size:8.5px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-chip{display:inline-flex;align-items:center;border-radius:999px;background:#f0edff;color:#5d3fd3;padding:3px 7px;font-size:8px;font-weight:800;white-space:nowrap}
.ai-classification-note{align-self:center;color:var(--muted-2);font-size:8.5px;padding:8px 2px}.ai-classification-note.pending{color:#6941c6}

.sync-warning{display:flex;align-items:center;gap:10px;margin:14px 18px 0;padding:10px 12px;border:1px solid #f3d69b;background:#fffaf0;border-radius:10px;color:#7a5a12;font-size:11px;line-height:1.35}.sync-warning .badge{flex:0 0 auto}
.sync-progress-badge{display:inline-flex;align-items:center;gap:7px;min-width:150px;height:27px;padding:0 9px;border-radius:999px;border:1px solid #d9d6fe;background:#f5f3ff;color:#5d3fd3;font-size:9px;font-weight:800;white-space:nowrap}.sync-progress-track{display:block;width:44px;height:4px;border-radius:999px;background:#ddd8ff;overflow:hidden}.sync-progress-track i{display:block;height:100%;border-radius:999px;background:#6558e8;transition:width .25s ease}

/* Inbox V3.2 reply composer */
.chat-compose { padding:14px 16px 12px; background:#fff; }
.reply-compose-row { display:flex; align-items:flex-end; gap:10px; }
.reply-compose-row textarea { flex:1; min-height:72px; max-height:180px; resize:vertical; border:1px solid var(--line); border-radius:12px; padding:11px 12px; background:#fff; color:var(--ink); line-height:1.45; }
.reply-compose-row textarea:focus { outline:none; border-color:#b9b2ff; box-shadow:0 0 0 3px rgba(94,78,255,.08); }
.reply-compose-row textarea:disabled { background:#f7f8fb; color:var(--muted); cursor:not-allowed; }
.reply-send-button { min-width:86px; height:42px; justify-content:center; }
.reply-send-button:disabled { background: #e2e8f0 !important; color: #94a3b8 !important; border-color: #e2e8f0 !important; opacity: 1 !important; cursor: not-allowed; pointer-events: none; }

/* Inbox V3.4 AI suggested reply */
.reply-compose-textarea { width:100%; min-height:82px; max-height:190px; resize:vertical; border:1px solid var(--line); border-radius:12px; padding:12px 13px; background:#fff; color:var(--ink); line-height:1.45; }
.reply-compose-textarea:focus { outline:none; border-color:#b9b2ff; box-shadow:0 0 0 3px rgba(94,78,255,.08); }
.reply-compose-textarea:disabled { background:#f7f8fb; color:var(--muted); cursor:not-allowed; }
.reply-compose-footer { display:flex; align-items:center; gap:10px; margin-top:9px; }
.reply-compose-footer .compose-note { flex:1; margin:0; }
.ai-reply-button { min-width:132px; justify-content:center; }
.ai-reply-button:disabled { opacity:.5; cursor:not-allowed; }
@media (max-width: 900px) { .reply-compose-footer { flex-wrap:wrap; } .reply-compose-footer .compose-note { order:3; flex-basis:100%; } }

/* Campaign Engine V1.1 schedule controls */
.weekday-picker{display:grid;grid-template-columns:repeat(7,minmax(54px,1fr));gap:8px;margin-top:2px}.weekday-choice{position:relative;display:flex;align-items:center;justify-content:center;min-height:38px;border:1px solid var(--line-strong);border-radius:9px;background:#fff;color:var(--muted);font-size:10px;font-weight:800;cursor:pointer;user-select:none}.weekday-choice input{position:absolute;opacity:0;pointer-events:none}.weekday-choice:has(input:checked){border-color:#b9b2ff;background:#f1efff;color:var(--primary);box-shadow:0 0 0 2px rgba(94,78,255,.05)}.weekday-choice:hover{border-color:#c9c5ff}.weekday-choice span{pointer-events:none}@media(max-width:760px){.weekday-picker{grid-template-columns:repeat(4,minmax(54px,1fr))}}

/* Inbox V1 final viewport fit: keep the reply composer visible at normal browser zoom.
   The conversation body becomes the internal scroll area instead of making the whole page taller. */
@media (min-width: 821px) {
  .inbox-layout {
    height: 100%;
    min-height: 0;
  }
  .inbox-sidebar,
  .inbox-main {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .chat-view {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }
  .chat-body {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }
  .chat-compose {
    background: #fff;
  }
}

.linkedin-onboarding-modal::backdrop {
  background: rgba(0,0,0,0.6);
}
.linkedin-signin-card {
  width: min(560px, calc(100vw - 34px));
}
.linkedin-signin-card .modal-footer,
.linkedin-signin-card .modal-footer-right {
  flex-wrap: wrap;
}

/* Overview Layout */
.overview-section-header {
  margin-bottom: 0.25rem;
}
.overview-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

/* Overview Tabs */
.overview-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  padding-bottom: 0;
}
.overview-header .page-tabs {
  margin: 0;
  border: none;
  display: flex;
  gap: 1.5rem;
}
.overview-header .page-tabs button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 0;
  margin-bottom: -1px;
}
.overview-header .page-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  box-shadow: none;
}
.overview-header .page-tabs button:hover:not(.active) {
  color: var(--ink);
}

/* Overview Filters */
.overview-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.overview-filters .select-control {
  height: 38px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--ink);
  min-width: 140px;
}
.overview-filters .select-control:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

/* Dashboard KPI Grid */
.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}
.kpi-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.5rem;
  line-height: 1.2;
}
.kpi-rate {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.375rem;
  font-weight: 500;
}

/* Chart Panel */
.overview-chart-panel {
  margin-bottom: 2rem;
}
.overview-chart-container {
  position: relative;
  overflow: hidden;
  height: 320px;
  padding: 1rem 1.5rem 1.5rem;
}
.overview-chart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
}
.overview-chart-empty-state .empty-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.overview-chart-empty-state .empty-icon-circle svg {
  width: 24px;
  height: 24px;
}
.overview-chart-empty-state strong {
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 0.375rem;
}
.overview-chart-empty-state p {
  font-size: 0.875rem;
  margin: 0;
  max-width: 380px;
}
.overview-chart-empty-state .empty-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.overview-chart-wrapper {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}
.overview-chart-svg {
  width: 100%;
  height: 100%;
}
.chart-axis-label {
  font-size: 12px;
  fill: var(--color-gray-500);
  font-family: var(--font-sans);
}
.chart-grid-line {
  stroke: var(--color-gray-200);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.chart-hover-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
}
.chart-hover-bar {
  height: 100%;
  position: absolute;
}
.chart-hover-bar:hover {
  background: rgba(0,0,0,0.02);
}
.chart-tooltip {
  position: absolute;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  z-index: 10;
  min-width: 200px;
}
.chart-tooltip-date {
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}
.chart-tooltip-row {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
.chart-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}
.chart-tooltip-label {
  color: var(--color-gray-600);
  flex: 1;
}
.chart-tooltip-val {
  font-weight: 600;
  color: var(--color-gray-900);
}

/* Table */
.overview-table {
  width: 100%;
  border-collapse: collapse;
}
.overview-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg);
}
.overview-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.875rem;
  vertical-align: middle;
}
.overview-table-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}
.overview-table-empty strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  display: block;
}
.account-cell-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}
.account-cell-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.125rem;
  font-weight: 400;
}

/* Campaign Polish */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  transition: .15s;
}
.filter-chip:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.filter-chip.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-soft);
  font-weight: 650;
}

.bulk-toolbar {
  position: sticky;
  top: 94px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-strong);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  margin-bottom: 12px;
  color: var(--primary-strong);
  font-size: 13.5px;
  font-weight: 650;
  box-shadow: 0 4px 6px rgba(59,99,243,0.06);
}
.bulk-actions {
  display: flex;
  gap: 8px;
}
.bulk-toolbar .primary-button {
  background: var(--primary);
  border: 0;
  box-shadow: none;
}
.bulk-toolbar .ghost-button {
  color: var(--primary-strong);
}
.bulk-toolbar .ghost-button:hover {
  background: rgba(59,99,243,0.1);
}
.bulk-toolbar .danger-button {
  background: var(--red);
  color: #fff;
  border: 0;
}
.bulk-toolbar .danger-button:hover {
  background: #b42318;
}

/* Validation */
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.field-error-msg {
  color: var(--red);
  font-size: 11px;
  font-weight: 650;
  margin-top: 4px;
  display: block;
}

/* Variable Chips */
.variable-chips {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.variable-chip {
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--primary-strong);
  padding: 4px 10px;
  font-size: 11.5px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: .1s;
}
.variable-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* Sender Cell */
.sender-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.sender-icon {
  color: var(--primary);
}

/* Timeline */
.timeline-feed {
  display: grid;
  gap: 24px;
  padding: 24px 12px;
  max-width: 700px;
}
.timeline-event {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  position: relative;
}
.timeline-event:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 42px;
  bottom: -22px;
  left: 19px;
  width: 2px;
  background: var(--line);
}
.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--primary);
  display: grid;
  place-items: center;
  border: 4px solid var(--surface);
  position: relative;
  z-index: 1;
}
.timeline-icon.error { background: var(--red-soft); color: var(--red); }
.timeline-icon.success { background: var(--green-soft); color: var(--green); }
.timeline-icon.warning { background: var(--yellow-soft); color: var(--yellow); }

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.02);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.timeline-time {
  font-size: 11px;
  color: var(--muted);
}
.timeline-subject {
  font-size: 12px;
  color: var(--muted);
}
.timeline-subject strong {
  color: var(--ink);
}
.timeline-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

/* Checkbox Column */
th.checkbox-col, td.checkbox-col {
  width: 40px;
  padding-right: 0;
  text-align: center;
}

.table-stats {
  font-size: 11px;
  color: var(--muted);
}
.table-stats strong {
  color: var(--ink);
}

.bulk-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.bulk-toolbar span {
  font-weight: 600;
  font-size: 0.95rem;
}
.bulk-actions {
  display: flex;
  gap: 8px;
}
.distribution-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dist-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dist-label {
  width: 120px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.dist-bar-track {
  flex: 1;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.dist-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.dist-value {
  width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.metric-card span {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.metric-card strong {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

/* Channels Clean ROW UI Polish */
.page-head-title {
  display: flex;
  flex-direction: column;
}
.channels-page {
  max-width: 1050px;
}
.saas-senders-section {
  margin-top: 24px;
}
.saas-senders-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.saas-senders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sender-row-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  min-height: 95px;
}
.sender-row-card.unconnected {
  background: var(--surface-2);
}
.sender-row-name-link {
  text-decoration: none;
  color: inherit;
}
.sender-row-name-link:hover h3 {
  color: var(--primary);
}
.sender-row-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.sender-row-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
  flex: 0 0 auto;
}
.sender-row-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.sender-row-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 4px;
}
.sender-row-name h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.sender-row-role {
  font-size: 0.85rem;
  color: var(--muted);
}
.sender-row-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
}
.sender-row-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.account-limit-chip {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.sender-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.sender-metric strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.sender-metric span {
  font-size: 0.8rem;
  color: var(--muted);
}
.sender-row-campaign {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
}
.sender-row-campaign:hover .sender-row-campaign-name { color: var(--primary); }
.sender-campaign-state {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.sender-campaign-state.paused {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}
.sender-row-campaign-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.sender-row-today { color: var(--muted); font-size: 12px; }
.sender-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.channels-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.channels-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--primary);
}
.channels-empty-icon svg { width: 24px; height: 24px; }
.channels-empty-state h3 { margin: 0; font-size: 1.1rem; }
.channels-empty-state p { margin: 0; max-width: 460px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.channels-empty-state .primary-button { margin-top: 6px; }
.channels-empty-note { font-size: 12px !important; }
@media (max-width: 760px) {
  .sender-row-card { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; align-items: flex-start; }
  .sender-row-details { width: 100%; }
  .sender-row-actions { width: 100%; justify-content: flex-start; }
  .channels-empty-state { padding: 28px 18px; }
}

/* Onboarding */
.onboarding-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.18);
  z-index: 1000;
  animation: fade-in 0.2s ease-out;
}
#obBackdrop {
  background: rgba(10, 15, 25, 0.28);
}
.welcome-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  z-index: 1001;
  width: 100%;
  max-width: 480px;
  animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.welcome-modal-logo {
  margin-bottom: 24px;
}
.welcome-modal h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
}
.welcome-modal p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 32px 0;
  max-width: 360px;
}
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.tour-target-active {
  position: relative !important;
  z-index: 1002 !important;
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px rgba(37, 99, 235, 0.15) !important;
}

.tour-tooltip {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  width: 300px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  z-index: 1003;
  animation: fade-in 0.2s ease-out;
}
.tour-tooltip h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.tour-tooltip p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 16px 0;
}
.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tour-footer-left {
  display: flex;
  gap: 8px;
}

.completion-modal {
  width: 440px;
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.completion-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: #e0e7ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.completion-modal h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.completion-modal p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.checklist-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.checklist-header-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text);
}
.checklist-header-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.checklist-header-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.checklist-header-progress span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.checklist-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}
.checklist-progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}
.checklist-items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px) {
  .checklist-items-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.checklist-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.checklist-item-indicator {
  width: 20px;
  height: 20px;
  border-radius: 10px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.checklist-item-indicator svg {
  width: 12px;
  height: 12px;
}
.checklist-item.done .checklist-item-indicator {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.checklist-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.checklist-item.done .checklist-item-title {
  color: var(--muted);
}
.checklist-item-done-text {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.checklist-success-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checklist-success-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.checklist-success-icon {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: #e0e7ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.checklist-success-text h3 {
  margin: 0 0 2px 0;
  font-size: 1rem;
}
.checklist-success-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.onboarding-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.2);
  z-index: 1004;
  animation: fade-in 0.2s ease-out;
}
.onboarding-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
  z-index: 1005;
  padding: 32px;
  overflow-y: auto;
  animation: slide-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border);
}
.onboarding-drawer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onboarding-drawer-close:hover {
  color: var(--text);
  background: var(--border);
}
@keyframes slide-left {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* BILLING REDESIGN UI */
.settings-nav {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.settings-tab {
  background: none;
  border: none;
  padding: 0 0 12px 0;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.settings-tab:hover {
  color: var(--text);
}
.settings-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.billing-summary-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.billing-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.billing-interval-selector {
  display: inline-flex;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
}
.interval-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.interval-btn.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.discount-badge {
  background: #ecfdf5;
  color: #059669;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 600;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
  width: 100%;
}
@media (min-width: 768px) {
  .pricing-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99,102,241, 0.1); /* fallback primary-rgb */
}
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card-header h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  margin-bottom: 4px;
}
.pricing-price .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}
.pricing-price .amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pricing-price .period {
  font-size: 1rem;
  color: var(--muted);
  margin-left: 4px;
}
.pricing-billed-as {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 16px;
  min-height: 20px;
}
.pricing-senders {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pricing-features {
  flex-grow: 1;
  padding: 24px 0;
}
.pricing-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text);
}
.pricing-features li svg {
  width: 16px;
  height: 16px;
  color: #10b981;
  flex-shrink: 0;
}

.pricing-action {
  margin-top: auto;
}
.w-100 {
  width: 100%;
}
.current-plan-label {
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99,102,241, 0.1);
  padding: 10px;
  border-radius: 6px;
}

.mobile-only-back {
  display: none;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  :root { --sidebar: 0px; }
  .mobile-menu-btn { display: flex !important; }
  .app-shell { display: flex; flex-direction: column; overflow-x: hidden; }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
  }

  /* Override 1180px collapsed styles for the mobile drawer */
  .brand-copy, .workspace-mini > div:last-child { display: grid; }
  .nav-label, .nav-section-label { display: block; }
  .brand { justify-content: flex-start; padding-left: 8px; padding-right: 8px; }
  .brand-logo-full { display: block !important; }
  .brand-logo-compact { display: none !important; }
  .nav-item { justify-content: flex-start; padding: 11px 12px; }
  .workspace-mini { justify-content: flex-start; }

  /* Subtle backdrop when drawer is open */
  body.mobile-sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 12, 24, 0.4);
    z-index: 999;
  }
  body.mobile-sidebar-open .sidebar { transform: translateX(280px); }
  .main-area { width: 100vw; min-width: 100vw; }
  .content { padding: 6px 14px 30px; }

  /* Topbar stacking */
  .topbar { padding: 12px 14px; height: auto; min-height: 70px; flex-wrap: wrap; gap: 10px; }
  .topbar-actions { flex-wrap: wrap; }

  /* Dashboard cards */
  .overview-kpi-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .campaign-metrics { grid-template-columns: 1fr; }

  /* Modals */
  .modal-card { width: calc(100vw - 24px) !important; margin: 0 auto; }

  /* Tabs wrapping */
  .campaign-tabs, .overview-header .page-tabs, .inbox-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Make sure funnel fits */
  .funnel { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }

  /* Inbox views */
  .inbox-layout.has-selection .inbox-sidebar { display: none !important; }
  .inbox-layout:not(.has-selection) .inbox-main { display: none !important; }

  .mobile-only-back {
    display: flex !important;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px 12px 8px 0;
    color: var(--muted, #68758e);
    cursor: pointer;
    flex: 0 0 auto;
  }
}

/* Dropdown */
.add-contacts-dropdown { position: relative; display: inline-block; }
.add-contacts-dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--upleads-border); border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); z-index: 100; min-width: 160px; padding: 4px; }
.add-contacts-dropdown:hover .add-contacts-dropdown-menu, .add-contacts-dropdown-menu:hover, .add-contacts-dropdown-menu.show { display: block; }
.add-contacts-dropdown-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: none; background: transparent; text-align: left; cursor: pointer; color: var(--upleads-ink); border-radius: 4px; font-size: 13px; font-family: inherit; }
.add-contacts-dropdown-menu button:hover { background: var(--upleads-background); }
.add-contacts-dropdown-menu svg { width: 14px; height: 14px; color: var(--upleads-slate); }

/* Chooser Cards */
.chooser-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
  text-align: left;
  background: var(--bg-100);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}
.chooser-option:hover {
  border-color: var(--brand);
  background: var(--bg-200);
}
.chooser-option strong {
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 4px;
}
.chooser-option span {
  font-size: 13px;
  color: var(--muted-1);
}

/* Manual Table */
:root {
  --manual-contact-grid: minmax(100px, 1fr) minmax(100px, 1fr) minmax(200px, 1.8fr) minmax(100px, 1fr) minmax(110px, 1fr) 32px;
}

.manual-table-header,
.manual-contact-row {
  display: grid;
  grid-template-columns: var(--manual-contact-grid);
  gap: 12px;
  align-items: center;
}
.manual-table-header {
  font-size: 13px;
  font-weight: 500;
  color: var(--upleads-slate, #64748b);
  margin-bottom: 8px;
  padding: 0;
}
.manual-contact-row {
  margin-bottom: 12px;
}
.manual-contact-row .field {
  margin-bottom: 0 !important;
}
.manual-contact-row .field input {
  height: 36px;
  font-size: 13px;
  padding: 6px 10px;
  width: 100%;
}
.manual-remove-btn {
  width: 32px;
  height: 36px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--upleads-slate, #64748b);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.manual-remove-btn:hover {
  background: var(--upleads-background, #f8fafc);
  color: var(--upleads-error, #ef4444);
}

@media (max-width: 820px) {
  .manual-table-header { display: none; }
  .manual-contact-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--upleads-border, #e2e8f0);
    padding: 16px;
    border-radius: 8px;
    position: relative;
    gap: 12px;
    background: #fafbfa;
  }
  .manual-contact-row .field input { height: 38px; }
  .manual-remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
  }
  .manual-contact-row .field::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--upleads-slate, #64748b);
    margin-bottom: 4px;
  }
}
@media (min-width: 561px) and (max-width: 820px) {
  .manual-contact-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-contact-row .field-url { grid-column: 1 / -1; }
  .manual-contact-row > div:empty { display: none; }
}
/* These two cards size themselves inline (width: 95%) against a shrink-to-fit
   dialog, so below desktop they end up flush left or very narrow. */
@media (min-width: 601px) and (max-width: 820px) {
  #newManualListDialog .modal-card,
  #findLeadsDialog .modal-card { width: calc(100vw - 32px) !important; }
}

/* Sequence Visual Builder */
.saas-sequence-workflow-container { display: flex; align-items: flex-start; height: 600px; max-height: 70vh; overflow: hidden; background: #fafafa; border: 1px solid var(--border); border-radius: var(--radius-card); position: relative; margin-top: 12px; }
.saas-sequence-canvas { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; }
.saas-sequence-editor-drawer { width: 0; background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; transition: width 0.3s ease; }
.saas-sequence-editor-drawer.open { width: 320px; }
.saas-sequence-start-node { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 4px 12px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); z-index: 2; }
.saas-sequence-connector-line { width: 2px; height: 24px; background: var(--border); }
.saas-sequence-add-wrapper { position: relative; display: flex; justify-content: center; align-items: center; z-index: 3; }
.saas-sequence-add-btn { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--border); color: var(--slate); font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.saas-sequence-add-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.saas-sequence-add-menu { position: absolute; left: 32px; top: -10px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: var(--radius-menu); padding: 8px; width: 180px; z-index: 10; display: flex; flex-direction: column; gap: 4px; }
.saas-sequence-add-menu button { background: none; border: none; text-align: left; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink); }
.saas-sequence-add-menu button:hover { background: var(--bg); }
.saas-sequence-node-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; position: relative; }
.saas-sequence-node { width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; display: flex; gap: 12px; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); cursor: pointer; transition: all 0.2s; position: relative; z-index: 2; }
.saas-sequence-node:hover { border-color: var(--primary); box-shadow: 0 4px 6px rgba(59, 99, 243, 0.1); }
.saas-sequence-node.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.saas-sequence-node.terminal { border-style: dashed; }
.saas-sequence-node-icon { width: 32px; height: 32px; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--slate); flex-shrink: 0; }
.saas-sequence-node-icon svg { width: 16px; height: 16px; }
.saas-sequence-node-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.saas-sequence-node-content strong { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saas-sequence-node-content span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saas-sequence-node-actions { position: relative; }
.saas-sequence-node-menu-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 4px; }
.saas-sequence-node-menu-btn:hover { background: var(--bg); color: var(--ink); }
.saas-sequence-node-menu { position: absolute; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: 8px; padding: 4px; width: 120px; z-index: 10; display: flex; flex-direction: column; gap: 2px; }
.saas-sequence-node-menu button { background: none; border: none; text-align: left; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--ink); }
.saas-sequence-node-menu button:hover { background: var(--bg); }
.saas-sequence-node-menu button.danger { color: var(--error); }
.saas-sequence-node-menu button.danger:hover { background: #fee2e2; }
.saas-sequence-delay-label { font-size: 12px; font-weight: 500; color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: 12px; z-index: 2; cursor: pointer; border: 1px solid transparent; transition: all 0.2s; }
.saas-sequence-delay-label:hover { border-color: var(--primary); }
.saas-sequence-delay-label.active { border-color: var(--primary); background: #d0defd; }
.saas-sequence-branch-container { width: 100%; display: flex; flex-direction: column; align-items: center; }
.saas-sequence-branch-paths { display: flex; width: 150px; justify-content: flex-end; position: relative; margin-top: -1px; transform: translateX(-75px); }
.saas-sequence-branch-left { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; width: 50px; }
.saas-sequence-branch-right { display: flex; flex-direction: column; align-items: center; position: relative; width: 50px; margin-left: 100px; }
.saas-sequence-branch-line-horiz { position: absolute; top: 0; width: 100px; height: 1px; background: var(--border); z-index: 1; right: 25px; }
.saas-sequence-branch-line-vert { width: 1px; height: 16px; background: var(--border); }
.saas-sequence-branch-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; background: var(--surface); padding: 0 4px; z-index: 2; margin-top: 4px; margin-bottom: 4px; }
.saas-sequence-terminal-node { font-size: 11px; color: var(--slate); border: 1px dashed var(--border); padding: 2px 8px; border-radius: 4px; background: #fafafa; }
.saas-sequence-connector-line-branch { width: 1px; height: 16px; background: var(--border); }
.saas-sequence-editor-header { padding: 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.saas-sequence-editor-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.saas-sequence-editor-header .close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.saas-sequence-editor-body { padding: 16px; }
.saas-sequence-variables { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; align-items: center; }
.saas-sequence-variables .badge { cursor: pointer; font-size: 11px; padding: 2px 6px; }
.saas-sequence-variables .badge:hover { background: var(--primary); color: #fff; }
.saas-sequence-preview-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-input); padding: 12px; font-size: 13px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.saas-sequence-editor-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.dialog.wide-modal { max-width: 1000px; width: 95%; }
/* Campaign Builder V2 */
.campaign-builder-workspace { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 1000; display: flex; flex-direction: column; }
.builder-header { height: 64px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.builder-stepper { display: flex; align-items: center; flex: 1; justify-content: center; max-width: 600px; margin: 0 auto; }
.stepper-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.stepper-item.active { color: var(--ink); font-weight: 600; }
.stepper-item.completed { color: var(--ink); }
.stepper-circle { width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.stepper-item.active .stepper-circle { background: var(--primary); color: white; border-color: var(--primary); }
.stepper-item.completed .stepper-circle { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.stepper-line { flex: 1; height: 1px; background: var(--border); margin: 0 16px; min-width: 20px; }
@media (max-width: 820px) {
  .builder-header { gap: 12px; }
  .builder-stepper .stepper-item:not(.active) span { display: none; }
  .builder-stepper .stepper-line { margin: 0 6px; min-width: 12px; }
}
.builder-body { flex: 1; overflow: auto; position: relative; display: flex; flex-direction: column; }
.builder-footer { height: 64px; background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
#saasBuilderContinue:disabled, #saasBuilderContinue[aria-disabled="true"] { background: #eef1f5; border-color: #d0d5dd; color: #98a2b3; box-shadow: none; opacity: .8; }
.builder-step-container { padding: 40px 24px; max-width: 1000px; margin: 0 auto; width: 100%; flex: 1; }
.builder-step-main h3 { font-size: 24px; margin-bottom: 8px; }
.builder-step-main p { color: var(--muted); margin-bottom: 32px; }
.radio-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.radio-card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; gap: 12px; cursor: pointer; background: var(--surface); transition: all 0.2s; align-items: flex-start; }
.radio-card:hover { border-color: var(--primary-soft); }
.radio-card.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.radio-card input { margin-top: 4px; }
.builder-step-canvas-container { flex: 1; display: flex; background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 24px 24px; background-color: #fafafa; overflow: auto; position: relative; min-height: calc(100vh - 128px); }


/* Campaign Name Modal Fix */
dialog.compact-modal { padding: 0; width: fit-content; text-align: left; background: transparent; margin: auto; inset: 0; }
dialog.compact-modal .modal-card { width: min(460px, calc(100vw - 32px)); max-width: 100%; overflow: hidden; }
dialog.compact-modal .field { text-align: left; }

/* Campaign Builder V2 Sequence Graph */
.seq-canvas {
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--bg);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px;
}
.seq-flow-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 80px;
}
.seq-node-start {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-size: 13px;
  z-index: 2;
}
.seq-node-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.seq-connector-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.seq-connector-line {
  width: 2px;
  height: 24px;
  background: var(--line);
}
.seq-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.seq-add-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}
.seq-delay-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  margin: -4px 0;
}
.seq-delay-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.seq-node {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 280px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.2s;
}
.seq-node:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.seq-node-content {
  flex: 1;
  min-width: 0;
}
.seq-node-content strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text-main);
}
.seq-node-content p {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.seq-node-action {
  opacity: 0;
  transition: opacity 0.2s;
}
.seq-node:hover .seq-node-action {
  opacity: 1;
}
.seq-node.stop {
  width: auto;
  padding: 8px 16px;
  border-radius: 20px;
  gap: 8px;
  cursor: default;
}
.seq-node.stop:hover {
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.seq-branches {
  display: flex;
  align-items: flex-start;
  width: 100%;
}
.seq-branch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 32px;
  padding-left: 24px;
  padding-right: 24px;
}
.seq-branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 32px;
  background: var(--line);
}
.seq-branch.left::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  right: 0;
  height: 2px;
  background: var(--line);
}
.seq-branch.right::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 50%;
  height: 2px;
  background: var(--line);
}
.seq-branch-label {
  position: absolute;
  top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  white-space: nowrap;
}
.seq-branch-label.red { color: #d92d20; border-color: #fecdca; background: #fef3f2; }
.seq-branch-label.red .status-dot { background: #d92d20; }
.seq-branch-label.green { color: #027a48; border-color: #a6f4c5; background: #ecfdf3; }
.seq-branch-label.green .status-dot { background: #027a48; }

.builder-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -4px 0 24px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.builder-drawer.open {
  transform: translateX(0);
}

/* Schedule Day Pills */
.day-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.day-pill:hover {
  border-color: var(--primary-soft);
  background: var(--primary-soft);
}
.day-pill.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Assistant chat (F1b-1): column layout reusing panel/chat/compose classes. */
.assistant-layout { display: flex; flex-direction: column; min-height: 560px; }
.assistant-messages { display: block; overflow-y: auto; min-height: 380px; max-height: 560px; }
.assistant-messages > .message-row,
.assistant-messages > .chat-date-separator { width: min(100%, 1040px); margin-left: auto; margin-right: auto; }
.assistant-empty { width: min(100%, 720px); margin: 48px auto; text-align: center; display: grid; gap: 18px; }
.assistant-empty p { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.6; }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.assistant-card { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 12px; max-width: min(100%, 560px); }
.assistant-composer { border-top: 1px solid var(--line); }
.assistant-composer .error-panel { margin: 12px 16px 0; }

/* Assistant cards (F1b-2): inner elements reuse panel/form/table tokens. */
.assistant-card-title { margin: 0 0 4px; font-size: 14px; font-weight: 650; color: var(--ink); }
.assistant-card-sub { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.assistant-card .detail-list { margin: 10px 0; }
.assistant-card .form-grid { margin-top: 8px; }
.assistant-card .field { margin-top: 8px; }
.assistant-card .error-panel { margin: 0 0 10px; }
.assistant-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.assistant-card-messages { display: grid; gap: 8px; margin: 10px 0; }
.assistant-card-message { border-top: 1px solid var(--line); padding-top: 8px; }
.assistant-card-message span { font-size: 12px; color: var(--muted); }
.assistant-card-message p { margin: 2px 0 0; font-size: 13px; color: var(--ink); }
.assistant-table-wrap { overflow-x: auto; margin: 10px 0; }
.assistant-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.assistant-table th, .assistant-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.assistant-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.assistant-table a { color: var(--upleads-brand); font-weight: 500; text-decoration: none; }
.assistant-table-empty { text-align: center; padding: 24px; color: var(--muted); }
/* Cards with a table (leads, campaign status) take the whole chat width:
   in the 78% message column the status table scrolled sideways at ~780 px. */
.assistant-messages .message-row.inbound .message-stack:has(.assistant-table) { width: 100%; max-width: 100%; }
.assistant-card:has(.assistant-table) { width: 100%; max-width: 100%; }


/* New skin, phase 1 (Filippo's design direction, design-filippo/DIREZIONE-DESIGN.md):
   light icon rail, softer surfaces, violet actions, assistant home with the orb. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.sidebar { border-right: 1px solid var(--line); color: var(--ink); }
.brand { border-bottom-color: var(--line); }
.sidebar-bottom { border-top-color: var(--line); }
.nav-item { color: #676B7B; border-radius: 12px; }
.nav-item:hover { color: var(--ink); }
.nav-item.active { color: var(--primary); box-shadow: none; }
.nav-icon { color: inherit; }
.nav-icon svg { width: 20px; height: 20px; }
.workspace-mini { color: var(--ink); }
.workspace-mini span { color: var(--muted); }
.workspace-mini .avatar { background: var(--upleads-gradient); color: #fff; border-radius: 50%; }
@media (min-width: 601px) {
  :root { --sidebar: 84px; }
  .sidebar { padding: 18px 14px; }
  .brand { justify-content: center; padding: 0 0 18px; }
  .brand-logo-full { display: none !important; }
  .brand-logo-compact { display: block !important; border-radius: 12px; }
  .nav-list { gap: 8px; }
  .nav-item { justify-content: center; padding: 13px; }
  .brand-copy, .nav-label, .nav-section-label, .workspace-mini > div:last-child { display: none; }
  /* Getting started sets its label layout inline; the rail still hides it. */
  #nav-getting-started .nav-label { display: none !important; }
  .workspace-mini { justify-content: center; padding: 6px 0 0; }
}

.topbar { background: rgba(248, 247, 252, .88); }
.primary-button, .secondary-button, .ghost-button, .danger-button, .icon-button, .table-action { border-radius: var(--upleads-radius-button); }
.primary-button { box-shadow: 0 1px 2px rgba(163, 23, 90, .25), 0 6px 16px rgba(200, 30, 110, .18); }
.secondary-button { border-color: #E2DFEC; color: #34324A; }
.panel, .metric-card { border-color: var(--line); box-shadow: var(--shadow); }

/* Assistant home: orb, big question, composer, suggestion pills. */
.assistant-home { position: relative; isolation: isolate; flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100%; }
.assistant-home::before {
  content: ''; position: absolute; inset: -40px -32px; z-index: -1; pointer-events: none; filter: blur(70px); opacity: .9;
  background:
    radial-gradient(28% 34% at 18% 22%, rgba(255, 170, 90, .40) 0%, transparent 70%),
    radial-gradient(28% 34% at 86% 18%, rgba(255, 110, 180, .32) 0%, transparent 70%),
    radial-gradient(30% 32% at 14% 88%, rgba(170, 140, 255, .30) 0%, transparent 70%),
    radial-gradient(30% 32% at 88% 84%, rgba(90, 170, 255, .32) 0%, transparent 70%);
}
.assistant-home-actions { display: flex; justify-content: flex-end; }
.assistant-hero { width: min(100%, 760px); margin: auto; padding: 8px 0 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.assistant-hero-visual { position: relative; width: min(340px, 40vh, 72vw); aspect-ratio: 1; background: transparent; }
.assistant-hero-host { position: absolute; inset: 0; touch-action: auto; }
.assistant-hero-host canvas { width: 100%; height: 100%; display: block; pointer-events: none; }
.assistant-hero-title { margin: 6px 0 0; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; color: var(--ink); }
.assistant-hero-copy { margin: 0; max-width: 560px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.assistant-hero .error-panel { width: 100%; text-align: left; }
.assistant-hero-compose { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 8px 8px 20px; background: rgba(255, 255, 255, .92); border: 1px solid #E6E2F2; border-radius: 999px; box-shadow: 0 10px 30px rgba(40, 24, 110, .08); }
.assistant-hero-compose:focus-within { border-color: #F2B6CE; box-shadow: 0 0 0 4px rgba(200, 30, 110, .12), 0 10px 30px rgba(40, 24, 110, .08); }
.assistant-hero-compose textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font-size: 15px; line-height: 1.5; padding: 10px 0; max-height: calc(1.5em * 8 + 20px); scrollbar-width: thin; }
.assistant-hero-compose textarea::placeholder { color: #676B7B; }
.assistant-send-button { flex: 0 0 auto; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--upleads-gradient); box-shadow: 0 6px 16px rgba(242, 59, 122, .30); transition: transform .15s ease; }
.assistant-send-button:hover { transform: translateY(-1px) scale(1.03); }
.assistant-send-button:disabled { opacity: .5; }
.assistant-send-button svg { width: 20px; height: 20px; }
.assistant-hero .assistant-suggestions { gap: 10px; margin-top: 4px; }
.assistant-pill { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #E6E2F2; background: rgba(255, 255, 255, .9); color: #2D2B40; font-size: 13.5px; font-weight: 600; box-shadow: 0 2px 8px rgba(40, 24, 110, .05); transition: border-color .15s ease, transform .15s ease; }
.assistant-pill:hover { border-color: #C9BCFF; transform: translateY(-1px); }
.assistant-pill:disabled { opacity: .6; }
.assistant-hero-note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.assistant-hero-hint { margin: -6px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 600px) {
  .assistant-hero { gap: 12px; }
  .assistant-hero-copy { font-size: 14px; }
  .assistant-pill { font-size: 13px; }
  .assistant-hero-compose { border-radius: 24px; padding-left: 16px; }
  .assistant-hero-compose textarea { min-height: 0; font-size: 14px; }
}

/* New skin, phase 1 step 2: assistant chat. Scoped to .assistant-chat so the
   Inbox, which shares the message classes, keeps its look. */
.assistant-chat .assistant-avatar { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.assistant-chat .assistant-avatar svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* Thinking: the plane flies a small figure-eight, nose following its path (offset-rotate adds 45deg because the logo nose points up-right). */
.assistant-chat .assistant-avatar.is-thinking svg { position: absolute; inset: 0; transform: scale(.78);
  offset-path: path('M15 15 C19 8, 26 9, 26 15 C26 21, 19 22, 15 15 C11 8, 4 9, 4 15 C4 21, 11 22, 15 15');
  offset-anchor: 50% 50%; offset-rotate: auto 45deg; animation: assistant-plane-flight 2.4s linear infinite; }
@keyframes assistant-plane-flight { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes assistant-plane-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-chat .assistant-avatar.is-thinking,
  .assistant-chat .assistant-avatar.is-thinking svg { animation: assistant-plane-pulse 1.8s ease-in-out infinite; transform: none; offset-path: none; }
}

/* Full-screen chat: the conversation fills the content area without a card frame;
   messages, cards and composer share one centred column of --assistant-col. */
.content:has(> .assistant-chat) { overflow: hidden; padding-left: 0; padding-right: 0; padding-bottom: 0; }
/* On phones the shell is a flex column: let the page area grow so the composer reaches the bottom. */
.main-area:has(> .content > .assistant-chat) { flex: 1 1 auto; min-height: 0; }
.assistant-chat { --assistant-col: 1100px; --assistant-gutter: 32px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.assistant-chat > .page-head { flex: 0 0 auto; padding: 0 var(--assistant-gutter); }
@media (max-width: 820px) { .assistant-chat { --assistant-gutter: 18px; } }
.assistant-chat-title { display: flex; align-items: center; gap: 12px; }
.assistant-chat-title .assistant-avatar { width: 36px; height: 36px; }
.assistant-chat > .panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.assistant-chat .assistant-layout { flex: 1 1 auto; height: auto; min-height: 0; }
.assistant-chat .assistant-messages { flex: 1 1 auto; min-height: 0; max-height: none; background: transparent; padding: 8px var(--assistant-gutter) 28px; scrollbar-gutter: stable both-edges; }
.assistant-chat .assistant-messages > .message-row,
.assistant-chat .assistant-messages > .chat-date-separator { width: min(100%, var(--assistant-col)); }
.assistant-chat .message-row { gap: 10px; margin-top: 12px; margin-bottom: 12px; }
.assistant-chat .message-row.inbound .assistant-avatar { margin-top: 2px; }
.assistant-chat .message-bubble { padding: 12px 16px; border-radius: 18px; box-shadow: none; }
.assistant-chat .message-bubble p { font-size: 14px; line-height: 1.6; }
.assistant-chat .message-row.outbound .message-bubble { background: #EEE8FF; border-color: #E2D9FF; border-bottom-right-radius: 6px; }
.assistant-chat .message-row.outbound .message-bubble p { color: var(--ink); }
.assistant-chat .message-row.inbound .message-bubble { background: #fff; border-color: #ECE9F5; border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(28, 20, 70, .04), 0 6px 18px rgba(28, 20, 70, .05); }
.assistant-chat .assistant-thinking .message-bubble p { color: var(--muted); }
.assistant-chat .chat-date-separator { margin: 18px auto; font-size: 11.5px; letter-spacing: 0; color: var(--muted); }
.assistant-chat .chat-date-separator::before,
.assistant-chat .chat-date-separator::after { display: none; }
.assistant-chat .chat-date-separator { justify-content: center; }
.assistant-chat .chat-date-separator span { padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: #4B32C8; font-weight: 700; }

/* Cards from the assistant (plan, leads, draft, status). */
.assistant-chat .assistant-card { margin-top: 10px; padding: 16px 18px; border-radius: 16px; border-color: #ECE9F5; background: #fff; box-shadow: 0 1px 2px rgba(28, 20, 70, .04), 0 8px 22px rgba(28, 20, 70, .06); }
.assistant-chat .assistant-card-title { font-size: 15px; font-weight: 700; }
.assistant-chat .assistant-card-sub { font-size: 13px; }
.assistant-chat .assistant-card-message { border-top-color: #F0EEF6; }
.assistant-chat .assistant-card-message p { line-height: 1.55; }
.assistant-chat .assistant-card .detail-list > div { padding: 10px 2px; font-size: 13px; border-bottom-color: #F0EEF6; }
.assistant-chat .assistant-card .detail-list strong { font-weight: 600; }
.assistant-chat .assistant-table th { color: var(--muted); }
/* Deeper stops of the assistant gradient: white text stays above 5:1 everywhere. */
.assistant-chat [data-assistant-card-action="launch-campaign"] { background: linear-gradient(135deg, #C2410C 0%, #BE185D 50%, #6D28D9 100%); border: 0; box-shadow: 0 6px 16px rgba(190, 24, 93, .24); }
.assistant-chat [data-assistant-card-action="launch-campaign"]:hover { background: linear-gradient(135deg, #C2410C 0%, #BE185D 50%, #6D28D9 100%); filter: brightness(1.06); }

/* Composer: same round field as the home. */
/* The composer reserves the same scrollbar gutters as the messages above, so both columns line up exactly. */
.assistant-chat .assistant-composer { flex: 0 0 auto; border-top: 0; background: transparent; padding: 6px var(--assistant-gutter) max(16px, env(safe-area-inset-bottom)); overflow: hidden; scrollbar-gutter: stable both-edges; }
.assistant-chat .assistant-composer .reply-compose-row { width: min(100%, var(--assistant-col)); margin: 0 auto; align-items: center; padding: 6px 6px 6px 18px; background: #fff; border: 1px solid #E6E2F2; border-radius: 26px; box-shadow: 0 10px 30px rgba(40, 24, 110, .08); }
.assistant-chat .assistant-composer .reply-compose-row:focus-within { border-color: #F2B6CE; box-shadow: 0 0 0 4px rgba(200, 30, 110, .12), 0 10px 30px rgba(40, 24, 110, .08); }
.assistant-chat .assistant-composer textarea { min-width: 0; min-height: 44px; max-height: calc(1.45em * 8 + 22px); resize: none; border: 0; padding: 11px 0; background: transparent; font-size: 14.5px; box-shadow: none; }
.assistant-chat .assistant-composer textarea:focus { box-shadow: none; }
.assistant-chat .assistant-composer textarea::placeholder { color: #676B7B; }
.assistant-chat .compose-note { width: min(100%, var(--assistant-col)); margin: 6px auto 0; padding-left: 18px; font-size: 11.5px; color: var(--muted); }
.assistant-chat .assistant-composer .error-panel { width: min(100%, var(--assistant-col)); margin: 0 auto 10px; }
.assistant-chat .assistant-layout > .error-panel { flex: 0 0 auto; width: min(100% - 2 * var(--assistant-gutter), var(--assistant-col)); margin: 0 auto 8px; }
@media (max-width: 600px) {
  .assistant-chat { --assistant-gutter: 14px; }
  .assistant-chat .assistant-avatar { width: 26px; height: 26px; }
  .assistant-chat .message-row { gap: 8px; }
  .assistant-chat .assistant-chat-title p { display: none; }
  .assistant-chat .assistant-composer .reply-compose-row { border-radius: 22px; padding-left: 14px; }
  .assistant-chat .assistant-composer textarea { min-height: 44px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-chat .assistant-send-button { transition: none; }
  .assistant-chat .assistant-send-button:hover { transform: none; }
}

/* New skin, phase 1 step 3: work pages (Overview, Campaigns, Leads, Inbox,
   Channels, Settings). Readable type, softer tables and fields, same layout. */
:root {
  /* Names used by inline styles and older rules but never defined before. */
  --upleads-brand: var(--primary);
  --border-color: var(--line);
  --text: var(--ink);
  --color-gray-50: #FFF9F5;
  --color-gray-100: #F6EFEB;
  --color-gray-200: #E7DEDA;
  --color-gray-400: #9A9DAC;
  --color-gray-500: #56587A;
  --color-danger: #B3261E;
  --font-sans: var(--upleads-font-family);
  --border: var(--line);
  --brand: var(--primary);
  --purple: var(--primary);
  --primary-light: var(--upleads-primary-light);
  --text-main: var(--ink);
  --text-light: var(--muted);
  --muted-1: var(--muted);
  --slate: var(--upleads-slate);
  --error: #B3261E;
  --danger: #B3261E;
  --color-white: #FFFFFF;
  --color-gray-600: #4F5163;
  --color-gray-900: var(--ink);
  --color-red-50: #FEF3F2;
  --color-red-200: #FECDCA;
  --color-red-500: #F04438;
  --color-red-700: #B3261E;
  --color-red-900: #7A271A;
  --bg-100: #FFF9F5;
  --bg-200: #F6EFEB;
  --radius-md: 12px;
  --radius-card: var(--upleads-radius-card);
  --radius-input: var(--upleads-radius-input);
  --radius-menu: var(--upleads-radius-menu);
}

.page-head h2 { font-size: 22px; letter-spacing: -.025em; }
.page-head p { font-size: 13.5px; }
.panel-header h3 { font-size: 15px; }
.panel-header p { font-size: 12.5px; }
.topbar h1 { letter-spacing: -.03em; }
.eyebrow, .modal-kicker { color: var(--primary-strong); }

/* Tables */
table { font-size: 13px; }
th { background: #FAF9FD; color: var(--muted); font-size: 11px; letter-spacing: .05em; padding: 11px 16px; }
td { padding: 13px 16px; color: #34324A; }
tbody tr:hover { background: #FBFAFE; }
.name-cell strong, .campaign-name strong { font-size: 13.5px; }
.name-cell span, .campaign-name span { font-size: 12px; }
.person-avatar { font-size: 11px; }
.link-clean { color: var(--primary); }
.table-action { font-size: 12.5px; border-radius: 10px; }
.campaign-actions-menu { border-radius: 14px; padding: 6px; box-shadow: 0 14px 40px rgba(28, 20, 70, .14); }
.campaign-actions-menu button { font-size: 13px; border-radius: 9px; padding: 9px 10px; }
.pagination p { font-size: 12.5px; }
.pagination-controls button { border-radius: 10px; }

/* Badges */
.badge { font-size: 11.5px; padding: 4px 10px; font-weight: 700; }
.badge.purple { color: var(--primary-strong); }

/* Fields, search, selects */
.field label { font-size: 12.5px; color: #3F3D55; }
.field small { font-size: 11.5px; }
.field input, .field select, .field textarea { border-radius: var(--upleads-radius-input); font-size: 13.5px; }
.search-box input, .select-control { height: 40px; border-radius: var(--upleads-radius-input); font-size: 13px; }
.search-box input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(200, 30, 110, .12); }
.toolbar { padding: 14px 16px; }

/* Empty states, channels, settings, inbox list */
.empty-state h3 { font-size: 17px; }
.empty-state p { font-size: 13.5px; }
.channel-card { border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.channel-card h3 { font-size: 16px; }
.channel-card p { font-size: 13px; }
.channel-attention-copy { font-size: 12px !important; border-radius: 12px; }
.settings-menu button { font-size: 13px; border-radius: 10px; padding: 10px 12px; }
.inbox-tab { font-size: 13px; }
.inbox-tab span { font-size: 10.5px; height: 18px; min-width: 18px; }

/* Overview */
.kpi-card { border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi-label { font-size: 12.5px; }
.overview-table th { font-size: 11px; }
.overview-table td { font-size: 13px; }
.metric-top { font-size: 12.5px; }
.metric-note { font-size: 12px; }
.toast strong { font-size: 13px; }
.toast p { font-size: 12.5px; }
.compact-modal p { font-size: 13px; }

/* Jalli skin (P1) */
body { font-size: 15px; }

h1, h2, .topbar h1, .page-head h2, .modal-card h2, .modal-card h3, .builder-step-main h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

#pageEyebrow { display: none; }
.topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }
.topbar h1 { font-size: 32px; }
.health-chip.ok { display: none; }

/* Night sidebar with visible names on desktop. */
.sidebar { background: var(--jalli-night); color: var(--jalli-cream); border-right: 0; overflow-y: auto; }
.sidebar .brand { border-bottom-color: rgba(255, 255, 255, .08); }
.sidebar .sidebar-bottom { border-top-color: rgba(255, 255, 255, .08); }
.sidebar .nav-item { color: var(--jalli-muted-on-night); border-radius: 999px; height: 44px; }
.sidebar .nav-item:hover { background: #242550; color: var(--jalli-cream); }
.sidebar .nav-item.active { background: var(--jalli-night-2); color: var(--jalli-cream); box-shadow: none; }
.sidebar .nav-item.active .nav-icon { color: var(--jalli-orange); }
.sidebar #nav-getting-started { --text: var(--jalli-muted-on-night); }
.sidebar .workspace-mini { color: var(--jalli-cream); }
.sidebar .workspace-mini span { color: #B6B7D6; }
.sidebar .workspace-mini .avatar { background: var(--jalli-orange); color: var(--jalli-night); border-radius: 50%; }

.sidebar-account-actions { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-account-actions .icon-button { background: transparent; border-color: rgba(255, 255, 255, .14); color: var(--jalli-cream); }
.sidebar-account-actions .icon-button:hover { background: #242550; color: var(--jalli-cream); }
.sidebar-signout { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--jalli-cream); font-size: 12.5px; font-weight: 700; }
.sidebar-signout:hover { background: #242550; }
.sidebar-signout svg { width: 16px; height: 16px; }

@media (min-width: 1024px) {
  :root { --sidebar: 232px; }
  .brand-logo-full { display: block !important; }
  .brand-logo-compact { display: none !important; }
  .nav-label { display: block; }
  .workspace-mini > div:last-child { display: grid; }
  #nav-getting-started .nav-label { display: flex !important; }
  .brand { justify-content: flex-start; padding-left: 8px; padding-right: 8px; }
  .workspace-mini { justify-content: flex-start; padding: 9px 10px 2px; }
  .nav-item { justify-content: flex-start; padding: 0 14px; }
  .sidebar-signout .signout-icon { display: none; }
}
@media (min-width: 601px) and (max-width: 1023px) {
  .sidebar-account-actions { flex-direction: column; align-items: center; }
  .sidebar-signout { width: 38px; padding: 0; }
  .sidebar-signout .signout-label { display: none; }
}

/* Buttons and fields. */
.primary-button { background: var(--primary); color: #fff; border-radius: 999px; min-height: 40px; }
.primary-button:hover { background: var(--primary-strong); }
.secondary-button { background: #fff; border: 1.5px solid var(--upleads-slate); color: var(--ink); border-radius: 999px; }
.primary-button:disabled, .primary-button[aria-disabled="true"],
.secondary-button:disabled, .secondary-button[aria-disabled="true"] {
  background: #EFE7E3; color: #8A8699; border-color: #EFE7E3; box-shadow: none;
}
.text-input, .input, .select-control, .search-box input,
.field input, .field select, .field textarea {
  border-radius: 14px;
  border: 1.5px solid var(--upleads-slate);
}
.text-input:focus, .input:focus, .select-control:focus, .search-box input:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px #F9D9E6;
}
.panel, .detail-card, .kpi-card, .metric-card, .modal-card { border-radius: 22px; border: 1px solid var(--line); }

.assistant-send-button { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(200, 30, 110, .28); }

/* Leads page */
.leads-view-tabs { justify-self: start; display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.leads-view-tabs .leads-view-tab { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
/* The Lists tab reuses data-saas-lead-back, whose link style comes later in the file. */
.leads-view-tabs .leads-view-tab:hover { background: transparent; color: var(--primary-strong); text-decoration: none; }
.leads-view-tabs .leads-view-tab.active, .leads-view-tabs .leads-view-tab.active:hover { background: var(--jalli-night); color: var(--jalli-cream); }
.leads-view-tab:focus-visible { outline: 2px solid var(--jalli-pink); outline-offset: 2px; }
.lead-lists-table .lead-list-name-cell { overflow-wrap: anywhere; }
.lead-lists-table .lead-list-name-cell strong { color: var(--jalli-night); font-size: 13.5px; }
.lead-list-mobile-meta { display: none; }

@media (max-width: 600px) {
  .leads-view-tabs { justify-self: stretch; display: flex; width: 100%; }
  .leads-view-tabs .leads-view-tab { flex: 1 1 0; min-height: 40px; padding: 0 10px; }
  .lead-lists-table, .lead-lists-table tbody { display: block; width: 100%; }
  .lead-lists-table thead { display: none; }
  .lead-lists-table tr { position: relative; display: block; margin: 10px 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  .lead-lists-table tr:last-child { margin-bottom: 12px; }
  .lead-lists-table td { display: block; padding: 0; border: 0; }
  .lead-lists-table .lead-list-col-contacts,
  .lead-lists-table .lead-list-col-campaigns,
  .lead-lists-table .lead-list-col-created { display: none; }
  .lead-lists-table .lead-list-name-cell { padding-right: 44px; }
  .lead-list-mobile-meta { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }
  .lead-lists-table .campaign-actions-cell { position: absolute; top: 8px; right: 8px; width: auto; }
  .lead-lists-table .campaign-actions-trigger { min-width: 36px; min-height: 36px; }
}

/* Jalli skin (P2) */
.assistant-home::before { display: none; }
/* Assistant home, full screen: no card frame, the hero sits centred in the page.
   Onboarding is a compact card above the question (.assistant-start-card). */
.assistant-home-grid { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.assistant-hero-card { flex: 1 1 auto; min-width: 0; background: transparent; border: 0; border-radius: 0; padding: 8px 0 24px; }
.assistant-hero-card .assistant-hero { width: min(100%, 820px); margin: 0 auto; padding: 0; }
.assistant-start-card { width: 100%; max-width: 560px; margin: 0 auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; box-shadow: 0 2px 10px rgba(27, 20, 38, 0.04); }
.assistant-start-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.assistant-start-eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.assistant-start-count { font-size: 13px; }
.assistant-start-dismiss { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-height: 0; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.assistant-start-dismiss:hover { color: var(--primary); }
.assistant-start-track { height: 6px; margin: 10px 0; border-radius: 999px; background: #F0E7E2; overflow: hidden; }
.assistant-start-track span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.assistant-start-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.assistant-start-step { display: flex; align-items: flex-start; gap: 8px; min-width: 0; color: var(--muted); }
.assistant-start-step.done, .assistant-start-step.current { color: var(--ink); }
.assistant-start-step.current { font-weight: 600; }
.assistant-start-marker { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; }
.assistant-start-step.done .assistant-start-marker { border-color: var(--primary); background: var(--primary); color: #fff; }
.assistant-start-step.current .assistant-start-marker { border-color: var(--primary); color: var(--primary); background: #F9D9E6; }
.assistant-start-step-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.assistant-start-step-title { font-size: 12.5px; line-height: 1.35; }
.assistant-start-action { align-self: flex-start; min-height: 26px; border: 0; border-radius: 999px; padding: 0 11px; background: var(--primary); color: #fff; font: inherit; font-size: 11.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.assistant-start-action:hover { background: var(--primary-strong); }
.assistant-start-dismiss:focus-visible, .assistant-start-action:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 600px) {
  .assistant-start-card { padding: 12px; }
  .assistant-start-steps { grid-template-columns: minmax(0, 1fr); }
}
.assistant-hero .assistant-pill { background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; box-shadow: none; }
.assistant-hero .assistant-pill:hover { border-color: var(--primary); }
.assistant-hero-compose { background: var(--surface); border: 1.5px solid var(--upleads-slate); border-radius: 999px; }
a.primary-button, a.secondary-button { text-decoration: none; }
.saas-settings-page { width: min(100%, 720px); }
.saas-settings-page .settings-content { padding: 0 0 48px; }
.saas-settings-page .settings-content > .panel { width: 100%; max-width: 100% !important; margin: 0; }
@media (max-width: 760px) {
  .assistant-hero-card { padding: 4px 0 16px; }
  .assistant-hero-compose { border-radius: 999px; }
}

/* Jalli skin (P3a) */
.builder-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.builder-stepper { gap: 8px; max-width: 720px; }
.stepper-item { border-radius: 999px; padding: 6px 14px 6px 6px; }
.stepper-item.active { background: var(--jalli-night); color: var(--jalli-cream); }
.stepper-item.active .stepper-circle { background: var(--jalli-orange); color: var(--jalli-night); border-color: var(--jalli-orange); }
.stepper-item.completed .stepper-circle { background: #1F7A5A; color: #fff; border-color: #1F7A5A; }
.stepper-item.completed .stepper-circle svg { width: 14px; height: 14px; }
.stepper-item:not(.active):not(.completed) .stepper-circle { border-color: #8A8699; }
.stepper-line { background: var(--line); }
.builder-step-main h3 { font-family: var(--font-display); font-size: 34px; letter-spacing: -0.02em; }
.builder-section-title, .builder-step-main h3.builder-section-title { font-size: 18px; margin: 24px 0 8px; }
.builder-action-card { width: 100%; display: flex; align-items: flex-start; gap: 16px; text-align: left; padding: 20px; border: 1.5px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.builder-action-card:hover { border-color: var(--primary); }
.builder-action-icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.builder-action-icon svg { width: 20px; height: 20px; }
.builder-action-copy { display: flex; flex-direction: column; gap: 4px; }
.builder-action-copy strong { font-size: 16px; }
.builder-action-copy span { color: var(--muted); font-size: 14px; }
.builder-link-button { margin-top: 16px; border: 0; padding: 0; background: none; color: var(--primary); font-size: 14px; font-weight: 700; cursor: pointer; }
.builder-link-button:hover { text-decoration: underline; }
.builder-step-main .radio-card { border-radius: 22px; }
.builder-step-main .radio-card.selected { border: 2px solid var(--primary); box-shadow: none; }
.builder-step-main .builder-list-row { border-radius: 14px; }
.builder-account-timing { display: flex; flex-direction: column; gap: 8px; }
.builder-account-timing-section > p { margin-bottom: 16px; }
.builder-summary-card { background: var(--surface); padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.review-seq-step { border-radius: 14px; }
.builder-text-button { border: 0; padding: 0; background: none; color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer; }
.builder-text-button:hover { text-decoration: underline; }
.builder-footer { gap: 12px; }
.builder-footer-reason { margin-left: auto; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .builder-header { height: auto; min-height: 64px; flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .builder-stepper { order: 3; flex: 1 0 100%; flex-wrap: wrap; justify-content: flex-start; gap: 6px; margin: 0; }
  .builder-stepper .stepper-line { display: none; }
  .builder-stepper .stepper-item span, .builder-stepper .stepper-item:not(.active) span { display: inline; }
  .builder-step-main h3 { font-size: 28px; }
  .builder-footer { display: grid; grid-template-columns: auto 1fr auto; height: auto; min-height: 64px; padding: 10px 16px; }
  .builder-footer-reason { grid-column: 1 / -1; grid-row: 1; margin-left: 0; }
  .builder-footer .primary-button { grid-column: 3; }
}

/* Jalli skin (P3b) */
input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); }
.seq-builder-step { overflow: hidden; position: relative; width: 100%; min-width: 0; flex: 1; background: var(--bg); }
.seq-step-heading { padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.seq-step-heading h3 { font-family: var(--font-display); font-size: 34px; margin: 0 0 8px; }
.seq-step-heading p { color: var(--muted); margin: 0; }
.seq-view-toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; background: var(--surface); color: var(--text-main); cursor: pointer; font: inherit; }
.seq-view-toggle::before { content: ''; width: 30px; height: 18px; border-radius: 999px; background: var(--upleads-slate); }
.seq-view-toggle::after { content: ''; position: absolute; left: 19px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); }
.seq-view-toggle[aria-pressed="true"]::before { background: var(--primary); }
.seq-view-toggle[aria-pressed="true"]::after { left: 31px; }
.seq-linear { max-width: 760px; margin: 0 auto; padding: 0 24px 32px; box-sizing: border-box; }
.seq-linear-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; }
.seq-linear-card.is-empty { border-color: var(--danger); }
.seq-linear-edit { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.seq-linear-number { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--jalli-night); color: var(--jalli-cream); }
.seq-linear-copy { min-width: 0; overflow-wrap: anywhere; }
.seq-linear-preview { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.is-empty .seq-linear-preview { color: var(--danger); }
.seq-linear-moves { display: flex; gap: 4px; }
.seq-linear-moves button:disabled { opacity: .35; cursor: default; }
.seq-linear-link { display: block; margin: 0 0 0 18px; padding: 18px 20px; border: 0; border-left: 1px dashed var(--line); background: transparent; color: var(--muted); text-align: left; font: inherit; font-size: 14px; line-height: 1.6; cursor: pointer; overflow-wrap: anywhere; }
.seq-linear-add { display: block; margin: 12px auto 0; border: 1px dashed var(--upleads-slate); border-radius: 999px; padding: 12px 20px; background: var(--surface); color: var(--text-main); font: inherit; cursor: pointer; }
.seq-builder-step .seq-canvas { justify-content: flex-start; overflow: auto; min-width: 0; height: calc(100vh - 300px); }
.seq-builder-step .seq-flow-root { flex-shrink: 0; margin: 0 auto; }
@media (max-width: 600px) {
  .seq-step-heading { padding: 24px 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .seq-linear { padding: 0 16px 24px; }
  .seq-linear-card { flex-direction: column; align-items: stretch; padding: 18px 20px; }
  .seq-linear-moves { justify-content: flex-end; }
  .seq-builder-step .seq-canvas { height: calc(100vh - 400px); }
}

/* Campaigns page */
.campaign-list-table .campaign-list-icon { border-color: #F4B9D2; }
.saas-campaigns-page { color: #1A1B3F; gap: 20px; min-width: 0; }
.campaigns-period-note { display: block; color: #625C69; font-size: 12px; margin-top: 8px; }
.campaigns-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.campaigns-filter-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #625C69; font: inherit; font-size: 13px; cursor: pointer; }
.campaigns-filter-tab span { padding: 2px 7px; border-radius: 6px; background: #F1EBE8; color: #1A1B3F; font-size: 12px; }
.campaigns-filter-tab:hover { background: #FFF9F5; color: #1A1B3F; }
.campaigns-filter-tab.active { background: #FCE3EE; color: #C81E6E; border-color: #F4B9D2; font-weight: 650; }
.campaigns-filter-tab.active span { background: white; color: #C81E6E; }
.campaigns-filter-tab:focus-visible { outline: 2px solid #E8317A; outline-offset: 2px; }
.saas-campaigns-page .campaign-list-table { width: 100%; min-width: 0; }
.saas-campaigns-page .campaign-list-table th { background: #FFF9F5; color: #625C69; font-size: 12px; padding: 16px 12px; white-space: nowrap; }
.saas-campaigns-page .campaign-list-table td { padding: 20px 12px; }
.saas-campaigns-page .campaign-list-table th:first-child, .saas-campaigns-page .campaign-select-cell { width: 40px; text-align: center; }
.campaign-select-cell input { cursor: pointer; margin: 0; accent-color: #C81E6E; }
.saas-campaigns-page .saas-campaign-name { min-width: 0; }
.saas-campaigns-page .saas-campaign-name > div { min-width: 0; overflow-wrap: anywhere; }
.saas-campaigns-page .saas-campaign-name strong { font-size: 14px; }
.saas-campaigns-page .saas-campaign-name > div > span { margin-top: 6px; font-size: 12px; color: #625C69; }
.saas-campaigns-page .campaign-list-icon { background: #FCE3EE; color: #C81E6E; flex-shrink: 0; }
.saas-campaigns-page .saas-campaign-row:hover td { background: #FFF9F5; }
.saas-campaigns-page .campaign-metric { white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.campaign-metric strong { font-weight: 650; }
.campaign-metric small { display: inline-block; margin-left: 7px; color: #625C69; font-size: 12px; }
.saas-campaigns-page .campaign-created-date { color: #625C69; font-size: 12px; white-space: nowrap; }
.campaigns-selection-bar { padding: 12px 16px; background: #FFF9F5; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 12px; }
.campaigns-selection-bar .toolbar-right { flex-wrap: wrap; }
.saas-campaigns-page .campaign-empty-state { padding: 64px 24px; text-align: center; }
.campaign-empty-state .page-actions { justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.saas-campaigns-page .campaign-empty-state .primary-button { margin-top: 0; }
@media (max-width: 900px) {
  .saas-campaigns-page .campaign-list-table th, .saas-campaigns-page .campaign-list-table td { padding-left: 8px; padding-right: 8px; }
  .saas-campaigns-page .campaign-list-icon { display: none; }
}
@media (max-width: 600px) {
  .saas-campaigns-page .page-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .saas-campaigns-page .page-actions { flex-wrap: wrap; }
  .campaigns-filter-tabs { gap: 4px; }
  .campaigns-filter-tab { gap: 4px; padding: 9px 7px; font-size: 12px; }
  .campaigns-filter-tab span { padding: 1px 4px; }
  .saas-campaigns-page .table-wrap { overflow: visible; }
  .saas-campaigns-page .campaign-list-table, .saas-campaigns-page .campaign-list-table tbody { display: block; }
  .saas-campaigns-page .campaign-list-table thead { display: none; }
  .saas-campaigns-page .saas-campaign-row { display: grid; grid-template-columns: 28px repeat(3, minmax(0, 1fr)) 32px; gap: 12px 0; padding: 20px 12px; border-bottom: 1px solid var(--line); }
  .saas-campaigns-page .campaign-list-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .saas-campaigns-page .campaign-select-cell { grid-column: 1; grid-row: 1; width: auto; padding-top: 3px; }
  .campaign-identity-cell { grid-column: 2 / 5; grid-row: 1; }
  .saas-campaigns-page .campaign-actions-cell { grid-column: 5; grid-row: 1; width: auto; }
  .campaign-status-cell { grid-column: 2 / 5; grid-row: 2; }
  .saas-campaigns-page .campaign-metric { grid-row: 3; padding-top: 10px !important; white-space: normal; overflow-wrap: anywhere; }
  .campaign-metric[data-label="Invites"] { grid-column: 2; }
  .campaign-metric[data-label="Accepted"] { grid-column: 3; }
  .campaign-metric[data-label="Replies"] { grid-column: 4; }
  .campaign-metric::before { content: attr(data-label); display: block; color: #625C69; font-size: 11px; margin-bottom: 6px; }
  .campaign-metric small { display: block; margin: 4px 0 0; }
  .saas-campaigns-page .campaign-date-cell { grid-column: 2 / 5; grid-row: 4; }
  .saas-campaigns-page .campaign-date-cell::before { content: 'Created '; font-size: 12px; color: #625C69; }
  .campaigns-selection-bar .toolbar-right { justify-content: flex-start; }
}

/* Today page */
.today-page { max-width: 1180px; }
.today-greeting { display: flex; flex-direction: column; gap: 3px; padding: 4px 2px 2px; }
.today-greeting h2 { overflow-wrap: anywhere; margin: 0; color: var(--jalli-night); font-family: var(--font-display); font-size: 34px; letter-spacing: -.025em; line-height: 1.1; }
.today-greeting p { margin: 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.today-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.today-metric { display: flex; flex-direction: column; gap: 10px; min-height: 112px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.today-metric > span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.today-metric strong { color: var(--jalli-night); font-family: var(--font-display); font-size: 34px; line-height: 1; }
.today-note { margin: -6px 2px 0; color: var(--muted); font-size: 13px; }
.today-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.today-columns > * { min-width: 0; }
.today-panel { padding: 22px; border-radius: 22px; }
.today-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.today-panel-head h3 { margin: 0; color: var(--jalli-night); font-family: var(--font-display); font-size: 20px; letter-spacing: -.01em; }
.today-reply { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.today-reply + .today-reply, .today-campaign + .today-campaign { margin-top: 12px; }
.today-reply-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.today-reply-person { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.today-reply-name { color: var(--jalli-night); font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.today-reply-role { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.today-reply-preview { margin: 0; color: #3F3D55; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.today-reply-textarea { width: 100%; min-height: 88px; padding: 12px 14px; border: 1.5px solid var(--upleads-border); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; line-height: 1.5; resize: vertical; }
.today-reply-textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(200, 30, 110, .12); }
.today-reply-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.today-link { color: var(--primary); font-size: 13px; font-weight: 700; text-decoration: none; }
.today-link:hover { color: var(--primary-strong); text-decoration: underline; }
.today-send { min-width: 96px; }
.today-write-reply { justify-content: center; }
.today-empty { padding: 26px 8px; text-align: center; }
.today-empty p { margin: 0 0 10px; color: var(--jalli-night); font-size: 16px; font-weight: 700; }
.today-campaign { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.today-campaign-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.today-campaign-copy strong { color: var(--jalli-night); font-size: 14.5px; overflow-wrap: anywhere; }
.today-campaign-copy p { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 960px) {
  .today-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .today-greeting h2 { font-size: 28px; }
  .today-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .today-metric { min-height: 96px; padding: 14px; }
  .today-metric strong { font-size: 28px; }
  .today-page { gap: 14px; }
  .today-panel { padding: 16px; }
  .today-reply, .today-campaign { padding: 14px; }
  .today-reply-footer { flex-direction: column-reverse; align-items: stretch; }
  .today-reply-footer .today-send, .today-write-reply { width: 100%; justify-content: center; }
  .today-campaign { flex-direction: column; gap: 8px; }
}

/* Jalli skin (P5) */
[data-saas-lead-back] { min-height: 0; border: 0; padding: 0; background: transparent; color: var(--primary); }
[data-saas-lead-back]:hover { background: transparent; color: var(--primary-strong); text-decoration: underline; }
.empty-state .primary-button { margin-top: 16px; }

#findLeadsDialog input, #findLeadsDialog select { height: 44px; border: 1.5px solid var(--upleads-slate); border-radius: 14px; padding: 0 14px; font-size: 15px; }
#findLeadsDialog input:focus, #findLeadsDialog select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px #F9D9E6; }
#findLeadsDialog label { font-size: 14px !important; font-weight: 600 !important; color: var(--ink); }

.conversation.active, .conversation.active:hover { background: #FCE3EE; color: var(--ink); }
.conversation-name i { background: var(--primary); }
.inbox-page .person-avatar:not(.with-photo) { background: var(--jalli-orange); color: var(--jalli-night); }
.inbox-tabs .inbox-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.inbox-search .search-box input { height: 44px; border: 1.5px solid var(--upleads-slate); border-radius: 999px; }
.inbox-search .search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px #F9D9E6; }
.inbox-temperature { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.inbox-temperature.active { background: #FCE3EE; border-color: var(--primary); }

.lead-list-count, .lead-list-status:not(.green) { background: #F6EFEB; color: var(--muted); }
@media (max-width: 760px) {
  #findLeadsDialog .modal-card > div:nth-child(2) { flex-direction: column; }
  #findLeadsDialog .modal-card > div:nth-child(2) > div:first-child { width: 100% !important; border-right: 0 !important; border-bottom: 1px solid var(--line); }
  #findLeadsDialog .modal-card > div:nth-child(2) > div:last-child { flex: 0 0 auto !important; min-width: 0; overflow: visible !important; }
  #findLeadsDialog .modal-card > div:nth-child(2) > div:last-child > div:first-child { flex-wrap: wrap; gap: 12px; }
  #findLeadsDialog .data-table { min-width: 640px; }
  .inbox-page .page-head { flex-direction: column; align-items: flex-start; }
  .inbox-page .page-actions { width: 100%; flex-wrap: wrap; }
}

/* Jalli skin (P6) */
.settings-nav { gap: 22px; }
.settings-tab { padding: 2px 0 12px; font-size: 14px; font-weight: 600; }
.settings-tab:hover { color: var(--primary); }
.settings-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

.saas-settings-page .weekday-choice:has(input:checked),
.saas-settings-page .weekday-choice.selected { border-color: var(--jalli-night); background: var(--jalli-night); color: var(--jalli-cream); box-shadow: none; }
.saas-settings-page .weekday-choice:has(input:checked) span,
.saas-settings-page .weekday-choice.selected span { color: var(--jalli-cream); }

.billing-plan-notice { background: var(--jalli-cream); border-color: var(--line); box-shadow: none; }
.billing-plan-notice h3 { margin: 0 0 6px; color: var(--ink); font-family: var(--font-display); font-size: 20px; }
.billing-plan-notice p { margin: 0; color: var(--muted); font-size: 14px; }

.campaign-detail-shell { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; box-shadow: none; }
.campaign-detail-head { padding: 26px 28px 22px; align-items: flex-end; }
.campaign-title-row { gap: 12px; }
.campaign-title-row h2 { font-family: var(--font-display); font-size: 30px; }
.campaign-status-badge { padding: 6px 11px; font-size: 11px; border-radius: 999px; text-transform: none; }
.campaign-status-badge.green { background: var(--green-soft); color: #087A56; }
.campaign-status-badge.paused { background: var(--jalli-orange); color: var(--jalli-night); }
.campaign-status-badge.ended, .campaign-status-badge.muted { background: #F2ECE8; color: var(--muted); }
.campaign-status-badge.red { background: var(--red); color: #fff; }
.campaign-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.campaign-detail-actions .primary-button, .campaign-detail-actions .secondary-button { min-height: 40px; border-radius: 999px; }
.campaign-tabs { gap: 22px; padding: 0 28px; }
.campaign-tab { padding: 16px 0 13px; font-size: 13px; }
.campaign-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.campaign-detail-body { padding: 24px; background: var(--bg); }
.campaign-tab-empty .secondary-button { margin-top: 16px; }
.campaign-sequence-card .seq-linear { max-width: none; padding: 18px 18px 6px; }
.campaign-sequence-card .seq-linear-card { border-radius: 14px; }
.seq-linear.is-readonly .seq-linear-edit { cursor: default; }
.seq-linear.is-readonly .seq-linear-link { cursor: default; }
.seq-linear-edit.is-static { cursor: default; }
.seq-linear-link.is-static { cursor: default; }
.seq-var { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .92em; font-weight: 700; }

.lead-classifier select { height: 40px; min-width: 150px; padding: 0 32px 0 12px; border: 1.5px solid var(--upleads-slate); border-radius: 14px; background: #fff; color: var(--ink); font-size: 13px; }
.lead-classifier select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px #F9D9E6; }
.inbox-chat-header .chat-title-line h3 { font-family: var(--font-display); font-size: 18px; }
.chat-view .chat-body { background: var(--bg); }
.chat-view .message-bubble { border-radius: 18px; border: 1px solid var(--line); }
.chat-view .message-row.outbound .message-bubble { background: var(--jalli-night); border-color: var(--jalli-night); }
.chat-view .message-row.outbound .message-bubble p { color: var(--jalli-cream); }
.chat-view .reply-compose-textarea { border: 1.5px solid var(--upleads-slate); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.chat-view .reply-compose-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px #F9D9E6; }
.reply-send-button:disabled { background: #EFE7E3 !important; border-color: #EFE7E3 !important; color: #8A8699 !important; }

/* P6 review: keep billing within narrow screens and finish the requested radii. */
.campaign-detail-shell .campaign-summary-card { border-radius: 22px; }
.chat-view .message-row .message-bubble { border-radius: 18px; }
.saas-settings-page .billing-interval-selector { max-width: 100%; flex-wrap: wrap; justify-content: center; }
.saas-settings-page .pricing-cards-grid { grid-template-columns: minmax(0, 1fr); }
.saas-settings-page .pricing-card { min-width: 0; }
@media (min-width: 768px) {
  .saas-settings-page .pricing-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .saas-settings-page #billingPlanCard > .panel-body { padding: 20px 16px !important; }
  .saas-settings-page .billing-summary-header { flex-wrap: wrap; gap: 12px; }
}
/* Jalli LinkedIn connection */
#linkedinConnectDialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); }
.linkedin-connect-form { display: grid; gap: 14px; padding: 24px; }
.linkedin-connect-form [data-credentials], .linkedin-connect-form [data-cookie] { display: grid; gap: 10px; }
.linkedin-connect-form [hidden] { display: none; }
.linkedin-connect-form input, .linkedin-connect-form select { width: 100%; min-width: 0; height: 44px; border: 1.5px solid var(--upleads-slate); border-radius: 14px; padding: 0 14px; background: var(--surface); color: var(--ink); }
.linkedin-connect-form input:focus, .linkedin-connect-form select:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.linkedin-connect-form p { overflow-wrap: anywhere; }
.linkedin-connect-form .dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* Sequence acceptance branches (Lotto 9) */
.seq-branch-option { margin: 16px 0; }
.seq-branch-toggle:disabled { opacity: .5; cursor: default; }
.seq-linear.has-acceptance-branch { max-width: 1120px; }
.seq-branch-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.seq-branch-columns > section { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.seq-branch-columns .seq-linear { max-width: 100%; padding: 0 0 16px; }
.seq-branch-columns h4 { margin-bottom: 16px; overflow-wrap: anywhere; }
.builder-drawer .menu-item small { display: block; white-space: normal; }
@media (max-width: 600px) { .seq-branch-columns { grid-template-columns: minmax(0, 1fr); } }

.builder-drawer .seq-engagement-option { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-align: left; }

/* Settings: fit narrow screens without changing the wide layout. */
.saas-settings-page { max-width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.saas-settings-page > * { min-width: 0; max-width: 100%; }
.saas-settings-page .settings-nav { flex-wrap: wrap; row-gap: 6px; }
.saas-settings-page .settings-tab { white-space: nowrap; }
.saas-settings-page .settings-content { min-width: 0; }
.saas-settings-page .panel,
.saas-settings-page .panel-header,
.saas-settings-page .panel-body { min-width: 0; }
.saas-settings-page .table-wrap { max-width: 100%; }
.saas-settings-page .pricing-card { min-width: 0; overflow-wrap: anywhere; }

/* Account warm-up */
.account-warmup { min-width: 0; max-width: 340px; overflow-wrap: anywhere; font-size: 12px; }
.account-warmup p { margin: 4px 0; }
.account-warmup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.account-warmup-head span { color: var(--muted); }
.account-warmup-track { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 6px 0; }
.account-warmup-track span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.account-warmup .secondary-button { margin-top: 4px; }

/* Inbox: empty conversations hidden by default (Lotto 18) */
.inbox-empty-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; color: var(--muted); font-size: 12.5px; }
.inbox-empty-toggle-action { min-height: 0; border: 0; padding: 0; background: transparent; color: var(--primary); font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.inbox-empty-toggle-action:hover { text-decoration: underline; }
.inbox-empty-toggle-action:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Lead discovery: post engagement */
#findLeadsFilters:not([hidden]) { display: flex; flex-direction: column; gap: 16px; }
#findLeadsDialog td small, .assistant-table td small { display: block; margin-top: 4px; }

/* Loading indicator for buttons and actions */
.is-loading {
  position: relative;
  pointer-events: none;
}
.is-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}
@keyframes button-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .is-loading::before {
    animation: none;
  }
}

/* Jalli charts (Tremor / shadcn calm style) */
.jc-report-wrap {
  margin-bottom: 20px;
}

.jc-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .jc-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .jc-tile .jc-tile-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .jc-tile .jc-tile-spark {
    width: 100%;
  }
  .jc-tile .jc-delta-chip {
    white-space: normal;
    background: none;
    padding: 0;
    border-radius: 0;
  }
}

.jc-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--upleads-radius-input);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  min-width: 0;
}

.jc-tile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.jc-tile-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jc-delta-chip {
  align-self: flex-start;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  padding: 2px 6px;
  white-space: nowrap;
  line-height: 1.2;
}

.jc-delta-up {
  color: var(--upleads-success);
  background: rgba(31, 122, 90, 0.09);
}

.jc-delta-down {
  color: var(--upleads-error);
  background: rgba(179, 38, 30, 0.09);
}

.jc-delta-neutral {
  color: var(--muted);
  background: rgba(86, 88, 122, 0.09);
}

.jc-tile-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.jc-tile-num-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.jc-tile-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--jalli-night);
}

.jc-tile-rate {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.jc-tile-spark {
  width: 72px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.jc-tile-spark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.jc-chart-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--upleads-radius-input);
  padding: 14px 16px 10px 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.jc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.jc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.jc-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.jc-legend-label {
  font-weight: 500;
}

.jc-area-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.jc-funnel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--upleads-radius-input);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.jc-funnel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--jalli-night);
  margin-bottom: 12px;
}

.jc-funnel-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jc-funnel-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jc-funnel-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}

.jc-funnel-label {
  font-weight: 500;
  color: var(--jalli-night);
}

.jc-funnel-metrics {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.jc-funnel-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--jalli-night);
}

.jc-funnel-rate {
  font-size: 11px;
  color: var(--muted);
}

.jc-funnel-bar-bg {
  height: 8px;
  border-radius: 4px;
  background: rgba(86, 88, 122, 0.08);
  width: 100%;
  overflow: hidden;
}

.jc-funnel-bar-fill {
  height: 100%;
  border-radius: 4px;
}

.jc-empty-note {
  font-size: 13px;
  margin: 6px 0 12px 0;
}

/* Overview: shared Jalli charts, with scroll confined to each table. */
.overview-page, .overview-page > *, .overview-visuals > * { min-width: 0; }
.overview-page .overview-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.overview-page .jc-tile { padding: 18px; border-radius: 14px; background: #fff; }
.overview-page .jc-tile-body { flex-wrap: wrap; gap: 12px; }
.overview-page .jc-tile-value { font-size: 32px; font-variant-numeric: tabular-nums; }
.overview-page .jc-tile-num-wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
.overview-page .jc-delta-chip { white-space: normal; line-height: 1.5; }
.overview-page .overview-filters { flex-wrap: wrap; }
.overview-page .overview-filters .select-control { min-width: 0; max-width: 100%; flex: 1 1 160px; }
.overview-page .overview-header, .overview-page .overview-header > div { flex-wrap: wrap; gap: 12px; }
.overview-page .overview-header h2 { overflow-wrap: anywhere; }
.overview-page .panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.overview-visuals { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: stretch; }
.overview-page .overview-chart-panel { margin-bottom: 0; }
.overview-page .overview-chart-container { height: auto; min-height: 260px; padding: 0 12px 12px; }
.overview-page .jc-chart-container { border: 0; padding: 8px; margin: 0; }
.overview-page .jc-area-chart-svg { height: auto; width: 100%; }
.overview-page .overview-conversion .jc-funnel { border: 0; margin: 0; padding: 0 20px 20px; }
.overview-page .overview-conversion .jc-funnel-title { display: none; }
.overview-page .jc-funnel-metrics { flex-wrap: wrap; }
.overview-page .overview-table { width: 100%; font-variant-numeric: tabular-nums; }
.overview-page .overview-table th { background: #FAFAFC; color: var(--muted); font-weight: 500; padding: 14px 18px; white-space: nowrap; }
.overview-page .overview-table td { padding: 20px 18px; border-bottom: 1px solid var(--line); }
.overview-page .overview-table tr:last-child td { border-bottom: 0; }
.overview-page .table-wrap { max-width: 100%; overflow-x: auto; }
.overview-rate { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 64px; }
.overview-rate-track { display: block; width: 64px; height: 3px; border-radius: 4px; background: var(--line); overflow: hidden; }
.overview-rate-fill { display: block; height: 100%; border-radius: inherit; }
.overview-rate-fill.acceptance { background: var(--jalli-orange, #FFA033); }
.overview-rate-fill.reply { background: var(--jalli-pink, #E8317A); }
@media (max-width: 1100px) {
  .overview-page .overview-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-visuals { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .overview-page .overview-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-page .jc-tile { padding: 14px; }
  .overview-page .jc-tile-value { font-size: 28px; }
  .overview-page .overview-header .page-tabs { max-width: 100%; min-width: 0; overflow-x: auto; flex-wrap: nowrap; }
  .overview-page .overview-header .page-tabs button { flex-shrink: 0; }
  .overview-page .overview-chart-container { min-height: 200px; padding: 0 4px 8px; }
}

/* Chart entrance: added once per chart group by animateChartsOnce (charts.js). */
@keyframes jc-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes jc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes jc-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes jc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.jc-enter .jc-tile { animation: jc-rise .5s cubic-bezier(.22, 1, .36, 1) both; }
.jc-enter .jc-tile:nth-child(2) { animation-delay: 60ms; }
.jc-enter .jc-tile:nth-child(3) { animation-delay: 120ms; }
.jc-enter .jc-tile:nth-child(4) { animation-delay: 180ms; }
.jc-enter .jc-tile:nth-child(5) { animation-delay: 240ms; }
.jc-enter .jc-tile:nth-child(6) { animation-delay: 300ms; }
.jc-enter .jc-line { stroke-dasharray: 1; animation: jc-draw 1.1s cubic-bezier(.33, 1, .68, 1) both; animation-delay: calc(200ms + var(--jc-i, 0) * 120ms); }
.jc-enter .jc-area { animation: jc-fade .8s ease-out .6s both; }
.jc-enter .jc-dot { transform-box: fill-box; transform-origin: center; animation: jc-pop .4s cubic-bezier(.34, 1.56, .64, 1) 1.2s both; }
.jc-enter .jc-funnel-bar-fill, .jc-enter .overview-rate-fill { transform-origin: left center; animation: jc-grow .8s cubic-bezier(.22, 1, .36, 1) .3s both; }
.jc-enter .jc-funnel-row:nth-child(2) .jc-funnel-bar-fill { animation-delay: .42s; }
.jc-enter .jc-funnel-row:nth-child(3) .jc-funnel-bar-fill { animation-delay: .54s; }
.jc-enter .jc-funnel-row:nth-child(4) .jc-funnel-bar-fill { animation-delay: .66s; }
@media (prefers-reduced-motion: reduce) {
  .jc-enter .jc-tile, .jc-enter .jc-line, .jc-enter .jc-area, .jc-enter .jc-dot, .jc-enter .jc-funnel-bar-fill, .jc-enter .overview-rate-fill { animation: none; }
}

/* Sequence tree editor: keep all overflow inside the canvas. */
.seq-canvas-shell { position: relative; min-width: 0; max-width: 100%; }
.seq-builder-step .seq-canvas { box-sizing: border-box; max-width: 100%; padding: 64px 24px 32px; background-image: none; }
.seq-builder-step .seq-flow-root { width: max-content; min-width: 280px; }
.seq-builder-step .seq-branches { display: grid; grid-template-columns: repeat(2, max-content); width: max-content; }
.seq-builder-step .seq-branch { min-width: 280px; padding: 40px 24px 0; }
.seq-builder-step .seq-branch-label { max-width: calc(100% - 16px); white-space: normal; text-align: center; }
.seq-builder-step .seq-node { box-sizing: border-box; flex-shrink: 0; color: var(--jalli-night); text-align: left; font: inherit; }
.seq-builder-step button.seq-node.stop { cursor: pointer; }
.seq-builder-step .seq-node-icon, .seq-builder-step .seq-node-action { flex-shrink: 0; }
.seq-builder-step .seq-node-preview { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.seq-builder-step .seq-node.is-empty { border-color: var(--danger); }
.seq-builder-step .seq-node.is-empty .seq-node-preview { color: var(--danger); }
.seq-builder-step .seq-condition { border-color: var(--jalli-night); background: var(--jalli-cream); }
.seq-builder-step .seq-delay-chip { font-family: inherit; margin: 0; }
.seq-builder-step .seq-delay-chip span { display: flex; width: 12px; height: 12px; }
.seq-builder-step .seq-node:focus-visible, .seq-builder-step .seq-delay-chip:focus-visible, .seq-builder-step .seq-add-btn:focus-visible, .seq-zoom-controls button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.seq-builder-step .seq-node:focus-visible .seq-node-action { opacity: 1; }
.seq-zoom-controls { position: absolute; top: 12px; right: 16px; z-index: 3; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 8px rgba(26,27,63,.06); }
.seq-zoom-controls button { min-width: 36px; min-height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--jalli-night); font: inherit; cursor: pointer; }
.seq-zoom-controls button:hover { background: var(--jalli-cream); color: var(--primary); }
.seq-zoom-controls button:disabled { opacity: .4; cursor: default; }
@media (max-width: 639px) {
  .seq-builder-step .seq-canvas { padding: 64px 8px 24px; }
  .seq-builder-step .seq-branches { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .seq-builder-step .seq-branch { min-width: 0; padding: 40px 0 0; width: 100%; }
  .seq-builder-step .seq-branch::after { display: none; }
  .seq-builder-step .seq-branch-label { top: 10px; }
  .seq-builder-step .seq-node { max-width: 280px; }
}

/* Manual meeting outcome, using the existing Inbox controls. */
.meeting-toggle[aria-pressed="true"] { background: var(--upleads-primary); color: #fff; border-color: var(--upleads-primary); }
.conversation-meta .meeting-badge { margin-left: 6px; }
@media (max-width: 600px) {
  .saas-campaigns-page .campaign-metric[data-label="Meetings"] { grid-column: 2; grid-row: 4; }
  .saas-campaigns-page .campaign-date-cell { grid-row: 5; }
}


/* Compact conversation history beside the assistant action. */
.assistant-history { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; max-width: 280px; }
.assistant-history select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.assistant-home-actions, .assistant-chat .page-actions { gap: 12px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .assistant-history { max-width: 100%; flex: 1 1 100%; }
  .assistant-chat .page-head { flex-wrap: wrap; }
}

/* Campaign detail: scoped data views, using the Jalli palette. */
.campaign-detail-body, .campaign-data-card, .campaign-analytics-view { min-width: 0; max-width: 100%; }
.campaign-data-card { padding: 24px; overflow: hidden; }
.campaign-data-card .detail-card-head { align-items: flex-start; gap: 16px; }
.campaign-search-form { margin: 4px 0 18px; max-width: 460px; }
.campaign-search-form label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; color: var(--muted); }
.campaign-search-form > div { display: flex; gap: 8px; }
.campaign-search-form input { min-width: 0; flex: 1; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font: inherit; background: var(--surface, #fff); color: var(--text); }
.campaign-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.campaign-filter-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; font: inherit; font-size: 12px; cursor: pointer; }
.campaign-filter-chip span { font-size: 11px; opacity: .85; }
.campaign-filter-chip:hover { background: var(--jalli-cream, #fff8f3); color: var(--jalli-night); }
.campaign-filter-chip.is-active { background: var(--jalli-night, #1a1b3f); border-color: var(--jalli-night); color: #fff; }
.campaign-data-card button:focus-visible, .campaign-data-card input:focus-visible, .campaign-data-card a:focus-visible, .campaign-data-scroll:focus-visible { outline: 2px solid var(--upleads-primary); outline-offset: 3px; }
.campaign-data-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.campaign-data-table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
.campaign-data-table th { color: var(--muted); font-size: 11px; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--jalli-cream, #fff8f3); }
.campaign-data-table td { padding: 17px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.campaign-data-table tbody tr:last-child td { border-bottom: 0; }
.campaign-data-table tbody tr:hover { background: #fffaf7; }
.campaign-person { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.campaign-person > div { min-width: 0; }
.campaign-person a, .campaign-event-person a { color: var(--jalli-night); font-weight: 600; text-decoration: none; }
.campaign-person a:hover, .campaign-event-person a:hover { color: var(--upleads-primary); text-decoration: underline; }
.campaign-person-role { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; overflow-wrap: anywhere; max-width: 330px; }
.campaign-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; color: var(--jalli-night); background: linear-gradient(135deg,#fff0d8,#f8dce9); font-size: 12px; font-weight: 700; }
.campaign-lead-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; color: #4b4b66; background: #efeff5; }
.campaign-lead-status > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.campaign-lead-status.status-waiting_acceptance { background: #fff0d9; color: #825009; }
.campaign-lead-status.status-connected, .campaign-lead-status.status-completed { background: #e7f5ed; color: #246344; }
.campaign-lead-status.status-messaged { background: #eeeafd; color: #5f418f; }
.campaign-lead-status.status-replied { background: #fce5f0; color: #952258; }
.campaign-lead-status.status-needs_review, .campaign-lead-status.status-failed { background: #fce9e6; color: #a13628; }
.campaign-step-cell { color: var(--muted); font-size: 12px; min-width: 150px; overflow-wrap: anywhere; }
.campaign-pagination { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.campaign-pagination > div { display: flex; gap: 8px; }
.campaign-data-card button:disabled { opacity: .45; cursor: default; }
.campaign-events-table td:first-child { width: 48px; padding-right: 0; }
.campaign-event-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #f1eff8; color: #555071; }
.campaign-event-icon.event-invites { background: #fff0d9; color: #825009; }
.campaign-event-icon.event-replies { background: #fce5f0; color: #952258; }
.campaign-event-icon.event-errors { background: #fce9e6; color: #a13628; }
.campaign-event-copy { margin: 5px 0 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; max-width: 560px; }
.campaign-event-time { white-space: nowrap; color: var(--muted); font-size: 12px; }
.campaign-load-more { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 22px; font-size: 12px; }
.campaign-kpi-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.campaign-kpi-grid .jc-tile { min-width: 0; }
.campaign-kpi-grid .jc-tile-value { font-size: 30px; }
.campaign-metric-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.campaign-analytics-view > .campaign-metric-note { margin-top: -8px; }
.campaign-insight-note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fff3e4; color: #825009; font-size: 13px; }
.campaign-branch-label { display: block; margin-top: 6px; color: var(--upleads-primary); font-size: 11px; }
.campaign-steps-table th:not(:first-child), .campaign-steps-table td:not(:first-child) { text-align: right; }
.campaign-steps-table td:first-child { min-width: 220px; }
.campaign-read-error { border: 1px solid #f2cdc5; background: #fff4f1; color: #a13628; border-radius: 12px; padding: 16px; margin-bottom: 18px; font-size: 13px; }
.campaign-loading { padding: 20px 0; color: var(--muted); }
.campaign-empty-mark { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: linear-gradient(135deg,#fff0d8,#f8dce9); color: var(--upleads-primary); font-size: 28px; margin-bottom: 10px; }
@media (max-width: 1000px) {
  .campaign-kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .campaign-data-card { padding: 16px; }
  .campaign-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .campaign-kpi-grid .jc-tile { padding: 14px; }
  .campaign-kpi-grid .jc-tile-value { font-size: 26px; }
  .campaign-filter-chips { gap: 6px; }
  .campaign-filter-chip { padding: 8px 10px; }
  .campaign-data-table { min-width: 740px; }
  .campaign-events-table { min-width: 590px; }
  .campaign-pagination { flex-wrap: wrap; }
  .campaign-detail-shell, .campaign-detail-body > .detail-stack { min-width: 0; }
  .campaign-load-more { flex-wrap: wrap; }
}

/* Page header: title, description and page actions read as one block
   (no empty band between the top bar and the page head). */
.topbar { height: auto; min-height: 0; padding-bottom: 4px; }
.content { padding-top: 0; }
.page-head { margin: 0 0 4px; align-items: center; }
