:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --ink: #111318;
  --muted: #667085;
  --line: #e1e5ec;
  --line-strong: #c3cad5;
  --black: #0c0d0f;
  /* One accent, used sparingly -- the app is deliberately neutral (ink,
     white, greys) and this violet only marks the few things that deserve
     attention: the active nav item, focus rings, header links, the
     "needs your attention" tile, AI-suggested replies, and the Connect
     button when LinkedIn is disconnected. Do NOT use it for general
     buttons, badges or backgrounds. */
  --accent: #5a3fe0;
  --accent-strong: #4a31c4;
  --accent-on-dark: #a597ff;
  --accent-soft: #f1eeff;
  --accent-line: #d8d0fb;
  --warn: #8a5a00;
  --warn-soft: #fff4d7;
  --danger: #8a1f1f;
  --danger-soft: #ffe8e8;
  --ok: #1f6f3d;
  --ok-soft: #e7f6ec;
  --shadow: 0 1px 2px rgba(17, 19, 24, 0.05), 0 10px 28px -16px rgba(17, 19, 24, 0.12);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
}

a,
button,
input,
select,
textarea {
  min-width: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(90, 63, 224, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 9px 12px;
  border-radius: 8px;
  background: #fff;
  color: #111318;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 296px 1fr;
  transition: grid-template-columns 0.18s ease;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px 18px;
  color: #fff;
  background: #111318;
  border-right: 1px solid #000;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  transition: padding 0.18s ease, align-items 0.18s ease;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  color: #cbd2dc;
  cursor: pointer;
}

.sidebar-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-toggle:hover .sidebar-toggle-icon,
.sidebar-toggle:focus-visible .sidebar-toggle-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  min-height: 48px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #111318;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}

.brand-block strong,
.brand-block small {
  display: block;
}

.brand-block small {
  color: #aab2c0;
  margin-top: 2px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  color: #cbd2dc;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  overflow-wrap: anywhere;
}

/* Quiet divider between the consultant section and the admin-only section. */
.side-nav .nav-section-label {
  margin: 12px 4px 2px;
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6f7889;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.side-nav a:hover,
.side-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
}

/* The accent shows up here, and only on the current page. */
.side-nav a.active {
  box-shadow: inset 3px 0 0 var(--accent-on-dark);
}

.side-nav a.active svg {
  color: var(--accent-on-dark);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #cbd2dc;
  font-size: 13px;
  line-height: 1.4;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.system-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #35b779;
  box-shadow: 0 0 0 4px rgba(53, 183, 121, 0.16);
  flex: 0 0 auto;
}

/* Bottom of the sidebar: signed-in user card + system status.
   Neutral by design -- the accent only marks the current page, so the
   avatar stays grey and "Change password" borrows the nav's active bar. */
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.sidebar-bottom .sidebar-footer {
  margin-top: 0;
}

.sidebar-user {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  user-select: none;
}

.user-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-email {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  /* Breaks before the "@" (<wbr> in base.html); only splits a word if it must. */
  overflow-wrap: break-word;
}

.user-role {
  color: #aab2c0;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.user-note {
  margin: 0;
  color: #aab2c0;
  font-size: 12px;
  line-height: 1.4;
}

.user-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  color: #cbd2dc;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.user-action:hover,
.user-action.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.user-action.active {
  box-shadow: inset 3px 0 0 var(--accent-on-dark);
}

.user-action.active svg {
  color: var(--accent-on-dark);
}

/* Collapsed sidebar. Toggled by clicking #sidebar-toggle (app.js) and set
   on <html> before first paint by the inline script in base.html's <head>
   (reads the same localStorage key) so there's no flash on reload. Only
   active at desktop widths -- the mobile layout below already replaces the
   sidebar with a horizontal bar, so there's nothing to collapse there. */
html.sidebar-collapsed .app-shell {
  grid-template-columns: 76px 1fr;
}

html.sidebar-collapsed .sidebar {
  padding: 22px 12px;
  align-items: center;
}

html.sidebar-collapsed .sidebar-toggle {
  justify-content: center;
}

html.sidebar-collapsed .brand-block {
  justify-content: center;
}

html.sidebar-collapsed .brand-block > span {
  display: none;
}

html.sidebar-collapsed .side-nav {
  width: 100%;
}

html.sidebar-collapsed .side-nav a {
  justify-content: center;
  width: 100%;
  padding: 0;
}

html.sidebar-collapsed .side-nav a span {
  display: none;
}

/* Collapsed: keep only the divider line, hide the label text. */
html.sidebar-collapsed .side-nav .nav-section-label {
  font-size: 0;
  margin: 8px 10px 0;
  padding-top: 8px;
}

html.sidebar-collapsed .sidebar-footer {
  justify-content: center;
  width: 100%;
  padding: 10px;
}

html.sidebar-collapsed .sidebar-footer span:last-child {
  display: none;
}

html.sidebar-collapsed .sidebar-bottom {
  width: 100%;
}

html.sidebar-collapsed .sidebar-user {
  justify-items: center;
  padding: 8px;
}

html.sidebar-collapsed .sidebar-user-row {
  justify-content: center;
}

html.sidebar-collapsed .user-meta,
html.sidebar-collapsed .user-note,
html.sidebar-collapsed .user-action span {
  display: none;
}

html.sidebar-collapsed .user-action {
  justify-content: center;
  width: 100%;
  padding: 0;
}

.workspace {
  min-width: 0;
}

.workspace,
.panel,
.card,
.metric,
.record-header,
.command-bar,
.hero-panel,
td,
dd,
code,
pre,
textarea {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.topbar {
  min-height: 96px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px 32px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1,
.page h2 {
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.topbar h1 {
  font-size: 24px;
  font-weight: 750;
}

.page h2 {
  font-size: 19px;
  font-weight: 750;
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.topbar-actions,
.command-actions,
.hero-actions,
.quick-actions,
.row-actions,
.wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}

.hero-panel,
.command-bar,
.record-header,
.panel,
.metric,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel,
.command-bar,
.record-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px;
  margin-bottom: 20px;
}

.hero-panel {
  min-height: 154px;
  background: #111318;
  color: #fff;
  overflow: hidden;
}

.hero-panel p {
  color: #d8dee8;
  max-width: 620px;
}

.hero-panel .section-kicker {
  color: #d8dee8;
}

.hero-panel .hero-actions {
  /* Was align-self: flex-end, which made sense when this held two
     stacked/wrapped buttons. With Review meetings hidden, only one
     button remains here -- flex-end pinned it to the bottom of the
     panel and left dead space above it, so let it center with the
     panel's own align-items: center instead. */
  align-self: center;
}

.metrics,
.dashboard-grid,
.two-column,
.lead-intake-layout,
.import-grid,
.detail-grid,
.template-grid,
.cards {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  min-width: 0;
}

.metrics {
  /* auto-fit rather than a fixed repeat(4, ...): pages render different
     numbers of metric tiles (dashboard now has 3 since the Meeting
     pending tile was hidden; admin/campaign_detail/calendar still render
     4) -- this keeps whatever count is present evenly filling the row
     instead of leaving a blank trailing column. */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dashboard-grid,
.two-column,
.template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-intake-layout {
  grid-template-columns: minmax(0, 1fr);
}

.import-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.outreach-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}

.metric,
.panel,
.card {
  padding: 18px;
  min-width: 0;
}

.automation-panel {
  margin-bottom: 20px;
}

.metric {
  min-height: 0;
  position: relative;
  display: grid;
  gap: 2px;
  padding: 18px 20px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.metric small {
  font-weight: 500;
}

.metric strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 34px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Tiles that act as links: no lift, no colour wash -- just a firmer border. */
.metric-link,
.metric-action {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.metric-link:hover,
.metric-link:focus-visible,
.metric-action:hover,
.metric-action:focus-visible {
  border-color: var(--ink);
}

.metric-action strong {
  font-size: 20px;
  margin: 8px 0 4px;
  letter-spacing: -0.01em;
}

.metric-action .redirect-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.metric-action:hover .redirect-icon,
.metric-action:focus-visible .redirect-icon {
  color: var(--ink);
  transform: translate(2px, -2px);
}

/* The one tile that is allowed to ask for attention (count > 0). */
.metric-attention {
  border-left: 3px solid var(--accent);
}

.metric-attention strong {
  color: var(--accent);
}

.panel-header,
.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  min-width: 0;
}

.panel-header > *,
.card-header > * {
  min-width: 0;
}

.panel-header a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.lead-list,
.status-stack,
.settings-list,
.timeline {
  display: grid;
  gap: 10px;
}

.lead-row,
.settings-row,
.status-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.settings-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
}

.lead-row {
  grid-template-columns: 42px 1fr auto;
  text-decoration: none;
  min-height: 66px;
}

.no-avatar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-decoration: none;
  min-height: 66px;
}

.lead-row small,
.no-avatar-row small,
td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.status-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #111318;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex: 0 0 auto;
}

.status-row {
  grid-template-columns: minmax(150px, 180px) minmax(80px, 1fr) minmax(34px, auto);
  min-height: 52px;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecf1;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.badge,
.score-pill,
.count-chip,
.preview-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
  max-width: 100%;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.badge {
  min-width: 86px;
  color: #344054;
  background: #eef1f5;
  border: 1px solid #d7dde6;
}

.score-pill,
.count-chip,
.preview-pill {
  min-width: 44px;
  color: #344054;
  background: #f1f3f6;
  border: 1px solid #e1e5ec;
}

.count-chip,
.preview-pill {
  min-width: 92px;
}

.preview-pill--warn {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: #f1d791;
}

.score-pill.large {
  min-height: 36px;
  font-size: 14px;
}

.status-email-ready,
.status-email-sent,
.status-reply-received,
.status-meeting-scheduled,
.status-scheduled,
.status-follow-up,
.status-info {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: #bfe7cb;
}

.status-review-required,
.status-pending-triage,
.status-meeting-pending,
.status-pending,
.status-not-sent,
.status-follow-up-pending,
.status-warning {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: #f1d791;
}

.status-do-not-contact,
.status-not-interested,
.status-cancelled,
.status-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f1b8b8;
}

.inline-form,
.compact {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.grid-form > fieldset {
  display: contents;
}

.import-box > fieldset,
.reply-form > fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.span-all {
  grid-column: 1 / -1;
}

input,
select,
textarea,
button,
.button {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  max-width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(90, 63, 224, 0.18);
  border-color: var(--accent);
}

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

button,
.button {
  min-width: 108px;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111318;
  border-color: #111318;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  text-align: center;
  line-height: 1.2;
}

button:disabled,
.button.disabled,
fieldset:disabled input,
fieldset:disabled select,
fieldset:disabled textarea {
  cursor: not-allowed;
  opacity: 0.58;
}

button.secondary,
.button.secondary,
button.danger-secondary {
  background: #fff;
  color: #111318;
  border-color: var(--line-strong);
}

button.danger-secondary {
  color: var(--danger);
  border-color: #e4b6b6;
}

button.danger-secondary:hover:not(:disabled) {
  background: var(--danger-soft);
}

.link-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #111318;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.table-search {
  width: min(320px, 100%);
}

.import-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Both import cards line up at the top; the spare height of the shorter one goes above its
   info strip, not between the title and the form. */
.import-panel > .info-strip {
  margin-top: auto;
}

.import-panel > form {
  margin-bottom: 18px;
}

.import-box {
  display: grid;
  gap: 12px;
}

.info-strip {
  margin-top: 18px;
  padding: 14px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.info-strip span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #edf0f4;
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  table-layout: fixed;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

th {
  color: #475467;
  background: #f7f8fa;
  font-size: 12.5px;
  font-weight: 700;
}

tbody tr:hover {
  background: #fafafa;
}

tbody tr {
  min-height: 56px;
}

td a {
  font-weight: 800;
  text-decoration: none;
}

.record-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wide-panel {
  min-width: 0;
}

.timeline-panel {
  align-self: start;
}

.timeline div {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  padding: 4px 0;
  min-width: 0;
}

.timeline span {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  background: #111318;
  box-shadow: 0 0 0 4px #eef1f5;
}

.timeline small {
  grid-column: 2;
  color: var(--muted);
}

dl {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

dt {
  color: #475467;
  font-weight: 800;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.template-body {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  white-space: pre-wrap;
  color: #344054;
  overflow: auto;
}

.message-preview {
  margin: 14px 0;
}

.icon-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button-sm {
  width: 22px;
  height: 22px;
}

.icon-button-sm svg {
  width: 12px;
  height: 12px;
}

.calendar-grid {
  min-width: 860px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background: #f7f8fa;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-weekdays span:last-child,
.calendar-day:last-child {
  border-right: 0;
}

.calendar-day {
  min-height: 132px;
  padding: 8px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}

.calendar-day.muted-day {
  background: #fafbfc;
  color: #98a2b3;
}

.calendar-day-number {
  min-height: 22px;
  font-size: 12px;
  font-weight: 800;
  color: #475467;
}

.calendar-events {
  display: grid;
  gap: 6px;
}

.calendar-event {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.calendar-event span,
.calendar-event small,
.muted-text {
  color: var(--muted);
}

.calendar-event span,
.calendar-event small {
  font-size: 11px;
  line-height: 1.25;
}

.calendar-event strong {
  font-size: 12px;
  line-height: 1.25;
}

.panel:has(.calendar-grid) {
  overflow-x: auto;
}

.template-selector {
  margin-bottom: 12px;
}

.template-selector label {
  flex: 1 1 360px;
}

.reply-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.alert,
.empty-state {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #111318;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  overflow-wrap: anywhere;
}

.empty-state {
  min-height: 54px;
  display: grid;
  align-items: center;
}

.preview-alert {
  margin-bottom: 18px;
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.error-alert,
.error-panel {
  border-left: 4px solid var(--danger);
}

/* Inline message shown under an automation button when the click-time
   local-agent check fails (see app.js, "Local agent verification").
   flex-basis makes it drop onto its own row inside the wrapping
   .inline-form button row on the Overview page. */
.agent-check-error {
  flex-basis: 100%;
  margin: 6px 0 0;
  padding: 8px 10px;
  border-left: 4px solid var(--danger);
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.read-only-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #f1d791;
  border-radius: 8px;
  background: var(--warn-soft);
  color: #5f3d00;
  font-size: 13px;
  font-weight: 700;
}

.hidden-by-filter {
  display: none;
}

.sensitive-hidden {
  display: none !important;
}

.technical-section {
  margin-top: 20px;
  background: #fbfcfd;
}

.technical-section summary {
  cursor: pointer;
  font-weight: 800;
  color: #344054;
}

.technical-section dl {
  margin-top: 16px;
}

.truncated {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
}

.login-panel h1 {
  margin: 0;
  line-height: 1.15;
}

.login-form {
  display: grid;
  gap: 14px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-toggle {
    display: none;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 16px;
  }

  .side-nav {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .sidebar-bottom {
    margin-top: 0;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
  }

  .sidebar-user {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .metrics,
  .dashboard-grid,
  .two-column,
  .lead-intake-layout,
  .import-grid,
  .detail-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar,
  .hero-panel,
  .command-bar,
  .record-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page {
    padding: 18px;
  }

  .topbar {
    padding: 18px;
    min-height: auto;
  }

  .topbar-actions,
  .command-actions,
  .hero-actions,
  .quick-actions,
  .row-actions,
  .inline-form,
  .compact {
    width: 100%;
  }

  .topbar-actions > *,
  .command-actions > *,
  .hero-actions > *,
  .quick-actions > *,
  .row-actions > *,
  .inline-form > *,
  .compact > * {
    flex: 1 1 100%;
  }

  .quick-actions form,
  .row-actions form {
    width: 100%;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  button,
  .button,
  input,
  select,
  textarea {
    width: 100%;
    white-space: normal;
  }

  .status-row {
    grid-template-columns: 1fr;
  }

  .settings-row {
    grid-template-columns: 1fr;
  }

  .lead-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .auto-actions form {
    flex: 1 1 100%;
  }

  .auto-card .auto-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .auto-foot .auto-meta {
    margin-left: 0;
    text-align: left;
  }

  .auto-foot .auto-meta li {
    justify-content: flex-start;
  }

  .auto-foot .button.quiet {
    width: auto;
    white-space: nowrap;
  }

  .lead-row .score-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .sidebar,
  .page,
  .topbar,
  .panel,
  .card,
  .metric,
  .hero-panel,
  .command-bar,
  .record-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .metric strong {
    font-size: 32px;
  }
}

/* Admin: spacing and alignment fixes */
.linkedin-accounts-panel {
  margin: 20px 0;
}

.linkedin-add-form {
  margin-bottom: 20px;
}

.users-table td,
.users-table th {
  vertical-align: middle;
}

.users-table td form {
  margin: 0;
}

.linkedin-table td {
  vertical-align: middle;
}

.password-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 228px;
}

.password-actions form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.password-actions input,
.password-actions button {
  width: 100%;
  box-sizing: border-box;
}

.activity-table td {
  vertical-align: middle;
}

/* Space between the automation panel's banner and the account cards below it */
.automation-panel > .alert {
  margin-bottom: 16px;
}

/* Navigation feedback (see static/js/nav-loader.js) */
.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1000;
  overflow: hidden;
  background: rgba(17, 19, 24, 0.08);
}

.nav-progress[hidden],
.nav-pill[hidden] {
  display: none;
}

.nav-progress > span {
  display: block;
  height: 100%;
  width: 40%;
  background: #111318;
  border-radius: 3px;
  animation: nav-progress-slide 1.1s ease-in-out infinite;
}

@keyframes nav-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}

.nav-pill {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #111318;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(17, 19, 24, 0.25);
}

.nav-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nav-spin 0.7s linear infinite;
}

@keyframes nav-spin {
  to { transform: rotate(360deg); }
}

main.is-previewing {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.nav-skeleton-block {
  height: 90px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 50%, #eef0f3 75%);
  background-size: 200% 100%;
  animation: nav-shimmer 1.2s linear infinite;
}

.nav-skeleton-block.short { height: 28px; width: 35%; }
.nav-skeleton-block.tall { height: 220px; }

@keyframes nav-shimmer {
  to { background-position: -200% 0; }
}

/* Button guard (busy.js). While the page is still loading, or a request is
   in flight, buttons swallow clicks; these rules only make that visible.
   Loading dims after a short delay so fast loads don't flicker. */
html.page-loading :is(button, .button):not(.sidebar-toggle):not([data-busy-exempt]) {
  cursor: progress;
  animation: btn-dim 0s linear 0.3s forwards;
}

html.page-busy :is(button, .button):not(.sidebar-toggle):not([data-busy-exempt]) {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none !important;
  box-shadow: none !important;
}

html.page-busy :is(button, .button).is-busy {
  cursor: progress;
  opacity: 0.85;
  gap: 8px;
}

@keyframes btn-dim {
  to { opacity: 0.58; }
}

.btn-spinner {
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nav-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 2s; }
  .nav-progress > span { animation: none; width: 100%; opacity: 0.6; }
  .nav-spinner { animation-duration: 2s; }
  .nav-skeleton-block { animation: none; }
}

/* Button hover states -- simple and consistent with the card hovers above
   (small lift + soft shadow + a gentle background shift). Wrapped in
   (hover: hover) so touch screens don't get a "stuck" hover after a tap.
   Disabled buttons (the `disabled` attribute, aria-disabled, or a .disabled
   class) get no hover effect at all. */
button:not(.sidebar-toggle),
.button,
.link-button {
  transition: background-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}

@media (hover: hover) {
  /* Primary (dark) buttons. The border takes the hover colour so no dark
     outline shows around the lighter fill. */
  button:not(.secondary):not(.danger-secondary):not(.quiet):not(.accent):not(.sidebar-toggle):not(:disabled):not([aria-disabled="true"]):hover,
  .button:not(.secondary):not(.quiet):not(.accent):not(.disabled):not(:disabled):not([aria-disabled="true"]):hover {
    background: #3a3f4b;
    border-color: #3a3f4b;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(17, 19, 24, 0.16);
  }

  /* Secondary (outlined) buttons and link-style buttons */
  button.secondary:not(:disabled):not([aria-disabled="true"]):hover,
  .button.secondary:not(.disabled):not(:disabled):not([aria-disabled="true"]):hover,
  .link-button:not([aria-disabled="true"]):hover {
    background: #f6f7f9;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(17, 19, 24, 0.08);
  }

  /* Destructive outlined buttons (Remove, Clear password) */
  button.danger-secondary:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--danger-soft);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(138, 31, 31, 0.1);
  }

  /* Pressed: settle back down */
  button:not(.sidebar-toggle):not(:disabled):not([aria-disabled="true"]):active,
  .button:not(.disabled):not(:disabled):not([aria-disabled="true"]):active,
  .link-button:not([aria-disabled="true"]):active {
    transform: translateY(0);
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  .button,
  .link-button {
    transition: background-color 0.15s ease;
  }

  button:hover,
  .button:hover,
  .link-button:hover {
    transform: none !important;
  }
}

/* Leads table: whole row is clickable and its contents sit mid-row */
#leads-table th,
#leads-table td {
  vertical-align: middle;
}

tr.clickable-row {
  cursor: pointer;
}

/* Lead detail header: actions top-right, status chips bottom-right */
.lead-header {
  align-items: stretch;
}

.lead-header-main p {
  margin-bottom: 0;
}

.lead-header-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.lead-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lead-header-side .record-meta {
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .lead-header-side {
    width: 100%;
    align-items: flex-start;
  }

  .lead-header-actions,
  .lead-header-side .record-meta {
    justify-content: flex-start;
  }
}

/* Lead detail: Lead Profile now stands alone, so let it use the full width
   (the second 340px column was for the Engagement State card). */
.detail-grid.detail-grid--solo {
  grid-template-columns: minmax(0, 1fr);
}

/* Lead Profile form: Notes on the left spanning two rows; LinkedIn
   consultant on the right with Save Lead stacked directly beneath it.
   "dense" packing lets the right-hand column fill in beside the tall Notes
   box. Placement is reset to a single column on phones. */
.lead-profile-form {
  grid-auto-flow: row dense;
}

.lead-profile-form .lead-form-consultant {
  grid-column: 2;
  align-self: start;
}

.lead-profile-form .lead-form-notes {
  grid-column: 1;
  grid-row: span 2;
  grid-template-rows: auto 1fr;
}

.lead-profile-form .lead-form-save {
  grid-column: 2;
  align-self: end;
}

@media (max-width: 720px) {
  .lead-profile-form .lead-form-consultant,
  .lead-profile-form .lead-form-notes,
  .lead-profile-form .lead-form-save {
    grid-column: 1;
    grid-row: auto;
    align-self: stretch;
  }
}

/* Lead detail: LinkedIn Activity card
   Three visually separate blocks: Summary, Suggested reply, Conversation. */
.linkedin-activity {
  display: grid;
  gap: 20px;
}

.linkedin-activity > .panel-header {
  margin-bottom: 0;
}

.li-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 18px 20px;
  min-width: 0;
}

.li-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.li-block-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.li-block-head .li-block-title {
  margin: 0;
}

.li-block-title label {
  cursor: pointer;
}

/* Summary */
.li-summary {
  background: var(--surface-soft);
}

.li-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 24px;
}

.li-fact {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.li-fact dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.li-fact dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.li-fact-wide {
  grid-column: 1 / -1;
}

.li-fact-wide dd {
  font-weight: 500;
}

.li-count {
  display: inline-block;
  padding: 2px 10px;
  margin-right: 6px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.li-count-out {
  background: #eef1f5;
  border-color: #d7dde6;
  color: #344054;
}

.li-count-in {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

/* Suggested reply: a distinct callout */
.li-draft {
  border-color: var(--accent-line);
  border-left: 4px solid var(--accent);
  background: #faf9ff;
}

.li-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.li-draft textarea {
  width: 100%;
  min-height: 150px;
  background: #fff;
  line-height: 1.55;
}

.li-draft-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.li-open-profile-form {
  display: contents;
}

.li-draft-actions .agent-check-error {
  flex: 1 1 100%;
  text-align: left;
}

.linkedin-activity > .alert {
  margin: 0;
}

/* Conversation */
.li-conv-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.li-hidden-note {
  margin: -6px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.linkedin-thread {
  list-style: none;
  margin: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.li-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.li-divider::before,
.li-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.li-divider span {
  padding: 3px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.li-divider-start span {
  color: #344054;
  background: #f1f3f6;
  border-color: var(--line-strong);
}

.linkedin-message {
  max-width: 78%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}

.linkedin-message.outbound {
  align-self: flex-end;
  background: #fff;
  border-color: var(--line-strong);
  border-bottom-right-radius: 4px;
}

.linkedin-message.inbound {
  align-self: flex-start;
  background: #f1f3f6;
  border-color: var(--line);
  border-bottom-left-radius: 4px;
}

.linkedin-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #475467;
}

.linkedin-message-meta time {
  white-space: nowrap;
  color: var(--muted);
}

.linkedin-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .li-block {
    padding: 14px;
  }

  .linkedin-message {
    max-width: 94%;
  }

  .li-draft-actions button,
  .li-draft-actions .button {
    width: 100%;
  }
}

/* ==========================================================================
   Button variants
   --------------------------------------------------------------------------
   Default .button        solid ink -- the primary actions (Run outreach,
                          Check replies). Siblings of equal weight share it.
   .button.secondary      outlined -- supporting actions.
   .button.quiet          text-only -- rare, maintenance actions (Reseed).
   .button.accent         solid accent -- reserved for the single action that
                          unblocks everything else (Connect LinkedIn).
   ========================================================================== */
.button.quiet,
button.quiet {
  min-width: 0;
  min-height: 32px;
  padding: 5px 10px;
  gap: 7px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.button.quiet svg,
button.quiet svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

@media (hover: hover) {
  .button.quiet:not(:disabled):not([aria-disabled="true"]):hover,
  button.quiet:not(:disabled):not([aria-disabled="true"]):hover {
    background: #eef0f4;
    color: var(--ink);
  }
}

.button.accent,
button.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (hover: hover) {
  .button.accent:not(:disabled):not([aria-disabled="true"]):hover,
  button.accent:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
  }
}

/* ==========================================================================
   LinkedIn Jobs card (Overview page, templates/_automation_panel.html)
   ========================================================================== */
.automation-panel > .panel-header {
  margin-bottom: 14px;
}

.auto-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.auto-card + .auto-card {
  margin-top: 14px;
}

.auto-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auto-account {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.2;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.session-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.session-pill.is-active {
  color: var(--ok);
  background: var(--ok-soft);
  border-color: #bfe7cb;
}

.session-pill.is-down {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f1b8b8;
}

/* Shown only while LinkedIn is disconnected: the reconnect action takes the
   spot of honour and the run buttons below are disabled. */
.auto-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid #f1b8b8;
  border-radius: 10px;
  background: var(--danger-soft);
}

.auto-notice p {
  margin: 0;
  max-width: 58ch;
  color: #5b1717;
  font-size: 14px;
  line-height: 1.45;
}

.auto-notice form {
  margin: 0;
}

.auto-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.auto-actions form {
  margin: 0;
}

.auto-actions .button {
  min-height: 44px;
  padding: 0 20px;
  gap: 9px;
}

.auto-actions .button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.auto-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.auto-foot form {
  margin: 0;
}

/* Last-run details: small, muted, bottom-right. */
.auto-meta {
  display: grid;
  gap: 3px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.auto-meta li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.auto-meta strong {
  color: #475467;
  font-weight: 700;
}

.job-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--line-strong);
}

.job-dot.is-ok { background: var(--ok); }
.job-dot.is-error { background: var(--danger); }
.job-dot.is-running { background: #d99a00; }

.auto-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Align the quiet Reseed button's label with the card's content edge. */
.auto-foot .button.quiet {
  margin-left: -10px;
}

@media (max-width: 480px) {
  .metric-action strong {
    font-size: 20px;
  }
}

/* ==========================================================================
   Leads page toolbar -- search on the left; status filter + reset on the
   right. Behaviour lives in the "Leads toolbar" block of app.js.
   ========================================================================== */
.lead-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.alert + .lead-toolbar {
  margin-top: 16px;
}

.lead-search {
  position: relative;
  flex: 1 1 360px;
  max-width: 560px;
}

.lead-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px 10px 44px;
  border-radius: 10px;
  font-size: 15px;
}

.lead-search > svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.lead-toolbar-end {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.lead-filter {
  position: relative;
}

/* Filter trigger: icon, a small "Status" caption over the current value,
   and a chevron with comfortable room before the right edge. */
.lead-filter-trigger {
  min-width: 220px;
  min-height: 46px;
  padding: 6px 16px 6px 14px;
  gap: 11px;
  justify-content: flex-start;
  border-radius: 10px;
  text-align: left;
}

.lead-filter-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.lead-filter-text {
  flex: 1 1 auto;
  display: grid;
  gap: 1px;
  min-width: 0;
}

.lead-filter-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}

.lead-filter-text strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-filter-chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.lead-filter-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90, 63, 224, 0.12);
}

.lead-filter-trigger[aria-expanded="true"] .lead-filter-chevron {
  transform: rotate(180deg);
}

/* A filter is applied: tint the trigger so it's obvious why the list is
   shorter than expected. */
.lead-filter.is-active .lead-filter-trigger {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.lead-filter.is-active .lead-filter-icon,
.lead-filter.is-active .lead-filter-text strong {
  color: var(--accent-strong);
}

.campaign-cell {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 15;
  min-width: 100%;
  width: max-content;
  max-width: 320px;
  max-height: 360px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(17, 19, 24, 0.05), 0 18px 40px -12px rgba(17, 19, 24, 0.22);
}

.lead-filter-menu[hidden] {
  display: none;
}

.lead-filter-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.lead-filter-menu li:hover,
.lead-filter-menu li:focus {
  background: #f3f4f7;
  outline: none;
}

.lead-filter-menu li:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(90, 63, 224, 0.4);
}

.lead-filter-menu li[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.lead-opt-label {
  flex: 1 1 auto;
  white-space: nowrap;
}

.lead-opt-check {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  visibility: hidden;
}

.lead-filter-menu li[aria-selected="true"] .lead-opt-check {
  visibility: visible;
}

.lead-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.lead-dot.is-all {
  background: transparent;
  box-shadow: inset 0 0 0 2px #98a2b3;
}

.lead-dot.is-neutral {
  background: #98a2b3;
}

.lead-dot.is-ok {
  background: var(--ok);
}

.lead-dot.is-warn {
  background: #d99a00;
}

.lead-dot.is-danger {
  background: var(--danger);
}

.lead-reset {
  min-width: 0;
  min-height: 46px;
  padding: 8px 16px;
  gap: 8px;
  border-radius: 10px;
}

.lead-reset svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .lead-toolbar {
    flex-wrap: wrap;
  }

  .lead-search {
    flex: 1 1 100%;
    max-width: none;
  }

  .lead-toolbar-end {
    flex: 1 1 100%;
  }

  .lead-filter-form {
    flex: 1 1 auto;
  }

  .lead-filter,
  .lead-filter-trigger {
    width: 100%;
    min-width: 0;
  }

  .lead-filter-menu {
    right: auto;
    left: 0;
    max-width: calc(100vw - 48px);
  }

  /* Icon-only reset on phones to keep the filter row from wrapping. */
  .lead-reset span {
    display: none;
  }

  .lead-reset {
    width: 46px;
    padding: 0;
  }
}

/* Leads table empty states: one centred message across the whole body.
   (Replaces the old boxed .empty-state cell, which collapsed to the first
   column.) */
.table-empty-row:hover,
.table-no-match-row:hover {
  background: transparent;
}

.table-empty-row td,
.table-no-match-row td {
  padding: 0;
  border-bottom: 0;
}

.table-no-match-row[hidden] {
  display: none;
}

.table-empty {
  min-height: 260px;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: #98a2b3;
}

.table-empty-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #f1f3f6;
  color: #98a2b3;
}

.table-empty-icon svg {
  width: 26px;
  height: 26px;
}

.table-empty strong {
  color: #667085;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.table-empty > span:last-child {
  max-width: 380px;
  font-size: 14px;
  line-height: 1.5;
}

/* ==========================================================================
   My Activity -- "agent isn't running" guide (templates/activity.html)
   ========================================================================== */
.agent-offline {
  max-width: 560px;
  margin: 32px auto 0;
  padding: 44px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.agent-offline-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.agent-offline-icon svg {
  width: 26px;
  height: 26px;
}

.agent-offline h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.agent-offline-lead {
  max-width: 420px;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.agent-steps {
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.agent-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  line-height: 1.35;
}

.agent-step-num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.agent-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.agent-offline-note {
  max-width: 400px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .agent-offline {
    padding: 32px 16px 28px;
  }
}

/* ==========================================================================
   LinkedIn Review Required (templates/linkedin_review_required.html)
   One card per lead: who -> AI draft -> action. The accent marks the AI
   draft and the one primary action per card.
   ========================================================================== */
.rr-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.rr-header h2 {
  margin: 0;
}

.rr-header-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rr-count {
  padding: 6px 12px;
  border: 1px solid #d7dde6;
  border-radius: 999px;
  background: #eef1f5;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.rr-count.has-items {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.rr-refresh {
  min-width: 0;
  gap: 8px;
  padding: 8px 14px;
}

.rr-refresh svg {
  width: 16px;
  height: 16px;
}

.rr-alert {
  margin-bottom: 16px;
}

.rr-how {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.rr-how li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rr-how li span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.rr-list {
  display: grid;
  gap: 16px;
}

.rr-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rr-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.rr-who {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rr-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
}

.rr-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

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

.rr-draft {
  display: grid;
  gap: 8px;
}

.rr-draft-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rr-draft-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 7px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.rr-draft-label svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.rr-draft-label small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.icon-button.rr-copy {
  min-width: 0;
  width: 36px;
  height: 36px;
  min-height: 36px;
}

.rr-draft textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

.rr-no-draft {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.rr-no-draft strong {
  color: var(--ink);
}

.rr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.rr-form {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
}

.rr-account {
  flex: 0 1 280px;
  min-width: 200px;
  margin-right: auto;
}

.rr-account > span,
.rr-account-single > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.rr-account select {
  width: 100%;
}

.rr-account-single {
  display: grid;
  gap: 2px;
  margin-right: auto;
  min-width: 0;
}

.rr-account-single strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.rr-submit {
  min-width: 210px;
}

.rr-empty {
  padding: 56px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rr-empty-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}

.rr-empty-icon svg {
  width: 24px;
  height: 24px;
}

.rr-empty h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rr-empty p {
  margin: 0;
  color: var(--muted);
}

.rr-details {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.rr-details summary {
  width: fit-content;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.rr-details p {
  max-width: 820px;
  margin: 10px 0 0;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .rr-card {
    padding: 16px;
  }

  .rr-form {
    flex-direction: column;
    align-items: stretch;
  }

  .rr-account,
  .rr-account-single {
    flex: none;
    width: 100%;
    margin-right: 0;
  }

  .rr-submit {
    width: 100%;
  }
}


/* Consultant guide (guide.html). Deliberately quiet: white cards, hairline
   borders, ink text. The accent appears only on step numbers and links;
   .tone-* is used just for the small Vibe status dots. */
.tone-blue { --tone: #2563eb; }
.tone-green { --tone: #059669; }
.tone-amber { --tone: #b45309; }
.tone-red { --tone: #dc2626; }
.tone-gray { --tone: #98a2b3; }

.guide {
  display: grid;
  gap: 20px;
  max-width: 1080px;
}

.guide svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.guide a:not(.guide-tile) {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.guide a:not(.guide-tile):hover {
  text-decoration: underline;
}

.guide-hero {
  padding: 8px 2px 0;
}

.guide-hero h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.guide-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.guide-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.guide .guide-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #344054;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.guide .guide-jump a:hover {
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

.guide-jump svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.guide-block {
  scroll-margin-top: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.04);
}

.guide-block-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.guide-block-head p {
  margin: 2px 0 0;
  color: var(--muted);
}

.guide-block-icon,
.guide-day-icon,
.guide-tile-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
}

.guide-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: rgba(90, 63, 224, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

/* Start here: three steps in a row */
.guide-flow {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.guide-flow li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  line-height: 1.45;
}

.guide-flow-icon {
  color: var(--muted);
}

.guide-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.guide-tip svg {
  width: 16px;
  height: 16px;
}

/* Daily steps */
.guide-day {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.guide-day li {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  line-height: 1.45;
}

.guide-day li .guide-num {
  position: absolute;
  top: 14px;
  right: 14px;
}

.guide-day strong {
  margin-top: 4px;
  font-size: 15px;
}

.guide-day li > span:last-child {
  color: #475467;
  font-size: 14px;
}

/* Pages */
.guide-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.guide-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guide-tile:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 18px rgba(17, 19, 24, 0.06);
}

.guide-tile-icon {
  grid-row: span 2;
}

.guide-tile strong {
  font-size: 15px;
}

.guide-tile > span:last-child {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
}

/* Buttons: one card per page */
.guide-button-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.guide-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.guide-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
}

.guide-group h3 svg {
  color: var(--muted);
}

.guide-group ul,
.guide-status-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.guide-group li,
.guide-status-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 14px;
  color: #475467;
}

/* Button name, then what it does, in two aligned columns. */
.guide-group li {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
}

.guide-group .guide-btn,
.guide-day .guide-btn {
  justify-self: start;
  white-space: normal;
}

/* Button names in text: a quiet keycap, not a real button. */
.guide-btn {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* Statuses */
.guide-status-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.guide-status-cols article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.guide-status-cols h3 {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.guide-status-list .badge {
  min-width: 150px;
}

.guide-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.guide-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone);
}

/* Need help? */
.guide-fixes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.guide-fixes article {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.guide-fixes article > span {
  color: #475467;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .guide-block {
    padding: 18px;
  }

  .guide-group li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .guide-status-list .badge,
  .guide-dot {
    min-width: 0;
  }
}

/* ==========================================================================
   Campaigns (templates/campaigns.html, templates/campaign_detail.html)
   ========================================================================== */
.campaign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

.campaign-layout.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 14px;
}

.campaign-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.campaign-card:hover,
.campaign-card:focus-visible {
  border-color: var(--ink);
  background: var(--surface);
}

.campaign-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.campaign-card-head strong {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.campaign-card-head .badge {
  min-width: 0;
  flex: 0 0 auto;
}

.campaign-card-desc {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.campaign-card-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.campaign-card-stats strong {
  color: var(--ink);
  font-weight: 800;
}

.campaign-card-arrow {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.campaign-card:hover .campaign-card-arrow,
.campaign-card:focus-visible .campaign-card-arrow {
  color: var(--ink);
  transform: translateX(2px);
}

.campaign-create {
  position: sticky;
  top: 20px;
}

.campaign-create .info-strip a,
.campaign-access a,
.table-empty a {
  color: var(--accent);
  font-weight: 700;
}

.campaign-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.campaign-back svg {
  width: 15px;
  height: 15px;
}

.campaign-back:hover {
  color: var(--ink);
}

.campaign-access {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 14px;
}

.campaign-access svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.campaign-access > span {
  display: grid;
  gap: 2px;
  color: #344054;
}

.campaign-access strong {
  color: var(--ink);
}

.campaign-access.is-ok {
  border-color: #bfe7cb;
  background: var(--ok-soft);
  color: var(--ok);
}

.campaign-access.is-warn {
  border-color: #f1d791;
  background: var(--warn-soft);
  color: var(--warn);
}

.campaign-help {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
}

.campaign-accounts-table td {
  vertical-align: middle;
}

.campaign-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}

.campaign-user .badge {
  min-width: 0;
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11px;
}

.campaign-row-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.campaign-access-body {
  display: block;
}

.campaign-row-actions form {
  margin: 0;
}

/* Fixed size so Pause / Resume / Remove and the busy spinner never change the layout. */
.campaign-row-actions button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  min-width: 96px;
  min-height: 34px;
  padding: 6px 8px;
  white-space: nowrap;
}

.campaign-add-account {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.campaign-add-account label {
  flex: 0 1 340px;
}

.campaign-message-text summary {
  width: fit-content;
  margin-top: 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.campaign-message-text p {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.5;
}

tfoot th,
tfoot td {
  background: var(--surface-soft);
  font-weight: 700;
  border-bottom: 0;
}

.campaign-leads {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 2px;
}

.campaign-form-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .campaign-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .campaign-create {
    position: static;
  }
}

/* ==========================================================================
   Page rhythm: panels, alerts and forms placed straight on the page (not in
   a grid) get the same 20px gap the grids and hero panels already have, so
   stacked sections never touch.
   ========================================================================== */
.page > .panel,
.page > .alert,
.page > .empty-state,
.page > form,
.page > form > .panel {
  margin-bottom: 20px;
}

.page > :last-child,
.page > form > .panel:last-child {
  margin-bottom: 0;
}

.alert > :first-child {
  margin-top: 0;
}

.alert > :last-child {
  margin-bottom: 0;
}

.alert ul {
  padding-left: 20px;
}

.alert a {
  color: var(--accent);
  font-weight: 700;
}

/* ==========================================================================
   Outreach pages (templates/outreach_*.html)
   ========================================================================== */
.outreach-help {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
}

.outreach-fieldset {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.outreach-fieldset[hidden] {
  display: none;
}

.outreach-fieldset legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.outreach-fieldset textarea,
.outreach-fieldset input[type="text"] {
  width: 100%;
}

.inline-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.inline-check:hover,
.inline-check:has(input:checked) {
  border-color: var(--ink);
}

.inline-check input {
  grid-row: span 2;
  min-height: 0;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--ink);
}

.inline-check strong {
  color: var(--ink);
  font-size: 14px;
}

.inline-check small {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-wrap;
}

.outreach-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.outreach-save-row .muted-text {
  font-size: 13px;
}

.outreach-counter {
  margin: -4px 0 0;
  font-size: 12.5px;
  font-weight: 600;
}

.outreach-counter:empty {
  display: none;
}

/* Over the character budget: red counter + red outline on the textarea. */
.outreach-counter.is-over {
  color: var(--danger);
}

.outreach-fieldset textarea.is-invalid {
  border-color: var(--danger);
  outline-color: var(--danger);
}

.outreach-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.outreach-actions .muted-text {
  margin: 0 auto 0 0;
  font-size: 13.5px;
}

.outreach-select-col {
  width: 56px;
}

.outreach-select-col input,
td > .lead-box {
  min-height: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--ink);
}

.outreach-batch-meta {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
}

/* Guide: Campaigns & outreach block */
.guide-subhead {
  margin: 24px 0 12px;
  color: var(--ink);
  font-size: 15px;
}

.guide-concepts strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-concepts strong svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* Leads bulk status change (leads.html + "Leads bulk status change" in app.js) */
.bulk-col {
  width: 44px;
  padding-left: 8px;
  padding-right: 0;
}

.bulk-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 0;
  cursor: pointer;
}

.bulk-check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

/* The global input:focus ring (meant for text boxes) showed on every mouse click. */
.bulk-check input:focus {
  outline: none;
}

.bulk-check input:focus-visible {
  outline: 2px solid rgba(90, 63, 224, 0.45);
  outline-offset: 2px;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft);
}

.bulk-bar[hidden] {
  display: none;
}

.bulk-count {
  font-weight: 600;
}

.bulk-target {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
}

.bulk-target select {
  min-width: 200px;
}

.bulk-dialog {
  max-width: 460px;
  width: calc(100% - 32px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.25);
}

.bulk-dialog::backdrop {
  background: rgba(16, 24, 40, 0.45);
}

.bulk-dialog h3 {
  margin: 0 0 10px;
}

.bulk-dialog p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.bulk-confirm-warn {
  padding: 10px 12px;
  border: 1px solid #f1d791;
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--warn);
}

.bulk-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* Create Lead form: Notes is a normal-sized cell, Create Lead spans the full bottom row. */
.grid-form textarea.compact-textarea {
  min-height: 40px;
  height: 40px;
  resize: vertical;
}

.grid-form > fieldset > button.button-full {
  width: 100%;
  margin-top: 4px;
}

/* Required-field markers (create-lead form script in app.js keeps the hint below current). */
label.req > span:first-child::after {
  content: " *";
  color: var(--danger);
}

.create-lead-hint {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted, #667085);
}

.create-lead-hint.is-incomplete {
  color: var(--danger);
  font-weight: 600;
}

/* Lead page: Campaign picker + Move lead sit on one baseline, with a divider under them. */
.lead-move-form {
  align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.lead-move-form label {
  flex: 0 1 320px;
  min-width: 0;
}

.lead-move-form select {
  width: 100%;
}

.lead-move-form button {
  flex: 0 0 auto;
  min-width: 120px;
}

/* New outreach: notice about unsent batches that are holding leads. */
.held-batches p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.held-batches p:last-child {
  margin-bottom: 0;
}

.held-batch-list {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.held-batch-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.held-batch-view {
  margin-left: auto;
  font-weight: 700;
}

/* New outreach: why Review is still off (turns red while something is missing). */
.outreach-actions .muted-text.is-incomplete {
  color: var(--danger);
  font-weight: 600;
}

/* Overview: reseed finished, session about to turn active. */
.session-pill.is-pending {
  background: var(--warn-soft);
  color: var(--warn);
}

/* Outreach batch: live progress (mirrors the Overview automation panel). */
.outreach-live {
  display: grid;
  gap: 16px;
}

.batch-progress {
  display: flex;
  height: 10px;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.batch-progress-sent { background: var(--ok); transition: width 0.4s ease; }
.batch-progress-skipped { background: var(--danger); transition: width 0.4s ease; }

.batch-progress-note { margin: 0 0 14px; }

/* Review: "Queue only" sits quietly beside the main "Queue and send" button. */
.outreach-actions form { margin: 0; }

/* ---------------------------------------------------------------------------
   Table column widths.
   Tables use table-layout: fixed, which gives every column the same width. These
   tables have a few columns that need room (emails, chips, long text, buttons) and a
   few that do not, so each one sizes its columns through its <colgroup>. The table's own
   min-width stops the narrow columns being squeezed on small screens: the .table-wrap
   scrolls sideways instead, as for every other table.
   --------------------------------------------------------------------------- */

/* Admin > LinkedIn accounts: Account, Client, Users, Type, Password, Session, Change password */
table.cols-li-accounts { min-width: 1300px; }
.cols-li-accounts col:nth-child(1) { width: 16%; }
.cols-li-accounts col:nth-child(2) { width: 9%; }
.cols-li-accounts col:nth-child(3) { width: 24%; }
.cols-li-accounts col:nth-child(4) { width: 20%; }
.cols-li-accounts col:nth-child(5) { width: 8%; }
.cols-li-accounts col:nth-child(6) { width: 8%; }
.cols-li-accounts col:nth-child(7) { width: 15%; }

/* Users column: the email keeps its own line space; the Remove button stays compact. */
.owner-cell .inline-form {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.owner-user {
  flex: 1 1 180px;
  min-width: 0;
  overflow-wrap: break-word;
}

.owner-cell button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 12px;
}

.owner-cell form:not(.inline-form) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.owner-cell form:not(.inline-form) select {
  flex: 1 1 150px;
}

/* Type column: the select shows its whole label, Save sits underneath. */
.cols-li-accounts td:nth-child(4) form {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.cols-li-accounts td:nth-child(4) select {
  width: 100%;
}

/* Outreach > batches: Created, Campaign, By, Status, Sent, Waiting, Not sent */
table.cols-batches { min-width: 900px; }
.cols-batches col:nth-child(1) { width: 20%; }
.cols-batches col:nth-child(2) { width: 15%; }
.cols-batches col:nth-child(3) { width: 25%; }
.cols-batches col:nth-child(4) { width: 13%; }
.cols-batches col:nth-child(5) { width: 8%; }
.cols-batches col:nth-child(6) { width: 9%; }
.cols-batches col:nth-child(7) { width: 10%; }

/* Leads list: select, Lead ID, Name, Status, Channel, Campaign, Updated.
   The status chip ("LinkedIn Message Sent") now fits on one line. */
table#leads-table { min-width: 1000px; }
#leads-table col:nth-child(1) { width: 44px; }
#leads-table col:nth-child(2) { width: 15%; }
#leads-table col:nth-child(3) { width: 18%; }
#leads-table col:nth-child(4) { width: 20%; }
#leads-table col:nth-child(5) { width: 9%; }
#leads-table col:nth-child(6) { width: 17%; }
#leads-table col:nth-child(7) { width: 17%; }

#leads-table .badge {
  white-space: nowrap;
}

/* Campaign > LinkedIn accounts: Account, Type, Daily limit, Users, In this campaign (+ Actions) */
table.campaign-accounts-table { min-width: 900px; }
table.campaign-accounts-table.has-actions { min-width: 1020px; }
.campaign-accounts-table col:nth-child(1) { width: 22%; }
.campaign-accounts-table col:nth-child(2) { width: 14%; }
.campaign-accounts-table col:nth-child(3) { width: 12%; }
.campaign-accounts-table col:nth-child(4) { width: 38%; }
.campaign-accounts-table col:nth-child(5) { width: 14%; }
.campaign-accounts-table.has-actions col:nth-child(1) { width: 18%; }
.campaign-accounts-table.has-actions col:nth-child(2) { width: 11%; }
.campaign-accounts-table.has-actions col:nth-child(3) { width: 9%; }
.campaign-accounts-table.has-actions col:nth-child(4) { width: 28%; }
.campaign-accounts-table.has-actions col:nth-child(5) { width: 11%; }
.campaign-accounts-table.has-actions col:nth-child(6) { width: 23%; }

/* The session chip stays on the email's line instead of dropping below it. */
.campaign-user-email {
  min-width: 0;
  overflow-wrap: break-word;
}

.campaign-user .badge {
  flex: none;
  white-space: nowrap;
}

/* Campaign > Message performance: Message, Sent, Replied, Reply rate, Sent between, Notes.
   The message column is the wide one so "Show text" opens into readable lines. */
table.cols-performance { min-width: 900px; }
.cols-performance col:nth-child(1) { width: 35%; }
.cols-performance col:nth-child(2) { width: 8%; }
.cols-performance col:nth-child(3) { width: 9%; }
.cols-performance col:nth-child(4) { width: 10%; }
.cols-performance col:nth-child(5) { width: 19%; }
.cols-performance col:nth-child(6) { width: 19%; }
/* With the delete (trash) column, which only people who manage campaigns get. */
.cols-performance.has-delete col:nth-child(1) { width: 34%; }
.cols-performance.has-delete col:nth-child(2) { width: 7%; }
.cols-performance.has-delete col:nth-child(3) { width: 8%; }
.cols-performance.has-delete col:nth-child(4) { width: 9%; }
.cols-performance.has-delete col:nth-child(5) { width: 18%; }
.cols-performance.has-delete col:nth-child(6) { width: 18%; }
.cols-performance.has-delete col:nth-child(7) { width: 6%; }

/* Trash icon on a saved message: a small red-outlined square, like the other danger buttons. */
.cols-performance td form { margin: 0; }

.row-delete {
  min-width: 0;
  width: 36px;
  height: 36px;
  min-height: 0;
}

/* Label for assistive technology only (same technique as table captions). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Prospecting > stored records: Name, Company, Role, Location, Email, Phone, Score, Source, Status, Actions */
/* Checkbox, Name, Company, Role, Location, For, Source, Status, Actions. Email, phone and
   score live in each row's Detail box, so the table fits without sideways scrolling. */
table.cols-prospects { min-width: 960px; }
.cols-prospects col:nth-child(1) { width: 44px; }
.cols-prospects col:nth-child(2) { width: 16%; }
.cols-prospects col:nth-child(3) { width: 13%; }
.cols-prospects col:nth-child(4) { width: 13%; }
.cols-prospects col:nth-child(5) { width: 10%; }
.cols-prospects col:nth-child(6) { width: 14%; }
.cols-prospects col:nth-child(7) { width: 140px; }
.cols-prospects col:nth-child(8) { width: 110px; }
.cols-prospects col:nth-child(9) { width: 110px; }

/* Badges ("Vibe Prospecting", "Duplicate") stay on one line. */
.cols-prospects .badge {
  white-space: nowrap;
}

/* Accept / Mark Reviewed / Skip stack at one width instead of running past the edge. */
.cols-prospects .row-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.cols-prospects .row-actions form {
  margin: 0;
}

.cols-prospects .row-actions button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 12px;
}

/* "Detail" under a prospect's name: same look as the campaign's "Show text" box. The global
   dl reserves a 150px label column, which left the value no room inside this narrow cell. */
/* "Detail" under a prospect's name opens a card in its own row below (tr.prospect-detail-row),
   fields laid out across the table instead of stacked in the narrow name cell. */
.prospect-detail-toggle {
  display: flex;
  width: fit-content;
  min-height: 26px;
  margin: 4px 0 0 -8px;
  padding: 3px 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.prospect-detail-toggle::before {
  content: "";
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}

.prospect-detail-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.prospect-detail-row > td {
  padding-top: 0;
  padding-left: 16px;
  padding-right: 16px;
  background: transparent;
}

.prospect-detail-row:hover {
  background: transparent;
}

.prospect-detail-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.45;
}

.prospect-detail-card dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.prospect-detail-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.prospect-detail-card .prospect-detail-wide {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .prospect-detail-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Outreach > new message: link shortening. The line keeps its height when empty so the
   page does not jump when the spinner appears. */
.link-shorten-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin: 4px 0 8px;
  font-size: 13px;
}

.link-shorten-status [hidden] {
  display: none;
}

#new-message.is-shortening {
  opacity: 0.6;
  cursor: progress;
}

/* LinkedIn Jobs panel when no account is linked to the signed-in person:
   title + hint on the left, "Open Admin" button on the right (stacks on narrow screens).
   Overrides the base .empty-state grid, which put each inline text run and link on its own row. */
.empty-state.auto-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  overflow-wrap: normal;
}

.auto-empty-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 280px;
}

.auto-empty-text strong {
  color: #111318;
  font-weight: 600;
}

.auto-empty-text span {
  font-size: 0.92em;
  color: #475467;
}

.auto-empty .button {
  flex: 0 0 auto;
}

/* Read-only stand-in for a <select> that has only one option (e.g. New outreach, Step 1):
   same label look as a form field, the value shown as plain text in a soft box. */
.static-field {
  display: grid;
  gap: 6px;
}

.static-field-label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.static-field-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fb;
  color: #111318;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.static-field-meta {
  color: #667085;
  font-size: 13px;
  font-weight: 500;
}


/* Prospects table bar (.pbar): a card above the table. Title on the left, the selection chip
   top-right (only while something is ticked), then the two choices and the actions. The card
   lifts and takes the accent colour while a selection exists. */
.pbar {
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pbar.is-active {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px rgba(90, 63, 224, 0.07), 0 6px 18px -8px rgba(90, 63, 224, 0.28);
}

.pbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pbar-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.pbar-title strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pbar-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pbar-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pbar-icon svg {
  width: 18px;
  height: 18px;
}

.pbar-selection {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  padding: 2px 2px 2px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
  animation: pbar-pop 0.18s ease-out;
}

.pbar-selection[hidden] {
  display: none;
}

.pbar-count strong {
  font-variant-numeric: tabular-nums;
}

.pbar-selection .pbar-clear {
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
}

@keyframes pbar-pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.pbar-body {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 260px) 1fr;
  align-items: end;
  gap: 12px;
}

.pbar-field {
  gap: 5px;
}

.pbar-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pbar-field select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
}

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

/* The bar's buttons are the project's own: .accent (Accept), .secondary (Mark reviewed) and
   .quiet (Skip), with their usual hover states. Only the size is set here. */
.pbar-actions button {
  gap: 7px;
  min-width: 0;
  min-height: 38px;
  padding: 7px 14px;
  font-size: 14px;
}

.pbar-actions button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .pbar-body {
    grid-template-columns: 1fr 1fr;
  }

  .pbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .pbar-head {
    flex-direction: column;
  }

  .pbar-body {
    grid-template-columns: 1fr;
  }
}

/* "For" column: campaign on top, LinkedIn account under it. */
.prospect-for span,
.prospect-for small {
  display: block;
}

.prospect-for small {
  margin-top: 2px;
}

.cols-prospects .row-actions button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
}
