/*
 * crm-accounts.css
 * Styles for the CRM Accounts & Contacts module.
 * Extracted from crm-accounts-contacts-v3.html.
 *
 * DO NOT re-declare here: .btn, .tab, .tabbar, .topbar,
 * .sidebar, .nav-item, .acc-trigger, .badge and variants.
 * Those exist in app.css / Radzen / Bootstrap.
 *
 * TABLE styles are scoped to .crm-tbl-wrap to avoid
 * colliding with Bootstrap tables elsewhere in the app.
 */

/* ─────────────────────────────────────────────
   FILTER BAR
───────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.filter-bar-label { font-size: 12px; color: #64748b; font-weight: 500; }

.filter-chip {
  font-size: 11.5px; font-weight: 500;
  padding: 5px 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid #e2e8f0; background: #fff; color: #64748b;
  transition: all 0.12s;
}
.filter-chip:hover { background: #f1f5f9; color: #334155; }
.filter-chip.active { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }

.filter-divider { width: 1px; height: 20px; background: #e2e8f0; margin: 0 4px; }

/* ─────────────────────────────────────────────
   SAVED VIEWS
───────────────────────────────────────────── */
.saved-views {
  display: flex; gap: 6px; align-items: center;
}
.saved-view-chip {
  font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: 20px; cursor: pointer;
  border: 1px solid #e2e8f0; background: #f8fafc; color: #64748b;
  display: flex; align-items: center; gap: 5px;
  transition: all 0.12s;
}
.saved-view-chip:hover { border-color: #94a3b8; color: #334155; }
.saved-view-chip.active { background: #1a2234; color: #fff; border-color: #1a2234; }
.saved-view-chip .sv-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ─────────────────────────────────────────────
   SEARCH
───────────────────────────────────────────── */
.crm-search-input {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 12px 6px 30px; font-size: 12.5px; font-family: 'Inter', sans-serif;
  color: #0f172a; outline: none; width: 220px; transition: all 0.12s;
}
.crm-search-input:focus {
  border-color: #3b82f6; background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}
.crm-search-wrap { position: relative; display: inline-block; }
.crm-search-wrap::before {
  content: '🔍';
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; pointer-events: none;
}

/* ─────────────────────────────────────────────
   TABLE  (scoped to .crm-tbl-wrap)
───────────────────────────────────────────── */
.crm-tbl-wrap { overflow: auto; }
.crm-tbl-wrap table { width: 100%; border-collapse: collapse; }
.crm-tbl-wrap th {
  text-align: left; font-size: 11px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.4px;
  padding: 10px 16px; border-bottom: 1px solid #e2e8f0;
  background: #f8fafc; white-space: nowrap;
}
.crm-tbl-wrap th.sortable { cursor: pointer; user-select: none; }
.crm-tbl-wrap th.sortable:hover { color: #334155; }
.crm-tbl-wrap th .sort-icon { margin-left: 4px; opacity: 0.4; font-size: 9px; }
.crm-tbl-wrap th.sorted .sort-icon { opacity: 1; color: #3b82f6; }

.crm-tbl-wrap td {
  padding: 10px 16px; border-bottom: 1px solid #f1f5f9;
  font-size: 13px; color: #334155; vertical-align: middle;
}
.crm-tbl-wrap tr:last-child td { border-bottom: none; }
.crm-tbl-wrap tbody tr { transition: background 0.1s; }
.crm-tbl-wrap tbody tr:hover td { background: #f8fafc; }
.crm-tbl-wrap tbody tr:hover .ac-row-actions { opacity: 1; }

/* ─────────────────────────────────────────────
   SHARED CRM COMPONENTS — card, avatar, badge
   (lightweight CRM-scoped variants)
───────────────────────────────────────────── */
.crm-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden;
}
.crm-card-head {
  padding: 13px 18px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: space-between;
}
.crm-card-head-title { font-size: 13px; font-weight: 600; color: #0f172a; }

.crm-avatar {
  width: 28px; height: 28px; border-radius: 7px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.crm-avatar-lg {
  width: 40px; height: 40px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.crm-avatar-xs {
  width: 20px; height: 20px; border-radius: 5px;
  font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Avatar stack for contact count column */
.avatar-stack { display: flex; }
.avatar-stack .crm-avatar-xs { margin-left: -5px; border: 1px solid #fff; }
.avatar-stack .crm-avatar-xs:first-child { margin-left: 0; }
.avatar-stack-more {
  font-size: 9px; color: #64748b; margin-left: 4px;
  align-self: center;
}

/* ─────────────────────────────────────────────
   HEALTH INDICATOR
───────────────────────────────────────────── */
.health-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  display: inline-block;
}
.health-green  { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.12); }
.health-yellow { background: #ca8a04; box-shadow: 0 0 0 3px rgba(202,138,4,0.12); }
.health-red    { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }
.health-cell   { display: flex; align-items: center; gap: 7px; }
.health-label  { font-size: 12px; color: #475569; font-weight: 500; }

/* ─────────────────────────────────────────────
   DAYS SILENT PILL
───────────────────────────────────────────── */
.days-silent {
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 5px;
  display: inline-block; white-space: nowrap;
}
.days-silent-ok     { background: #f0fdf4; color: #16a34a; }
.days-silent-warn   { background: #fefce8; color: #ca8a04; }
.days-silent-danger { background: #fef2f2; color: #dc2626; }

/* ─────────────────────────────────────────────
   LAST ACTIVITY CELL
───────────────────────────────────────────── */
.last-act-cell  { display: flex; flex-direction: column; gap: 2px; }
.last-act-type  { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: #475569; }
.last-act-time  { font-size: 11px; color: #94a3b8; }

/* ─────────────────────────────────────────────
   HOVER ROW ACTIONS
───────────────────────────────────────────── */
.ac-row-actions {
  display: flex; gap: 4px; opacity: 0;
  transition: opacity 0.15s;
}
.ac-row-btn {
  font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 5px; cursor: pointer;
  border: 1px solid #e2e8f0; background: #fff; color: #475569;
  font-family: 'Inter', sans-serif; white-space: nowrap;
  transition: all 0.12s;
}
.ac-row-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.ac-row-btn.primary { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.ac-row-btn.primary:hover { background: #2563eb; }

/* ─────────────────────────────────────────────
   ACCOUNT DETAIL LAYOUT
───────────────────────────────────────────── */
.ac-detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.ac-detail-left {
  display: flex; flex-direction: column; gap: 12px;
}

.ac-detail-right {
  display: flex; flex-direction: column; gap: 10px;
}

/* ─────────────────────────────────────────────
   ACCOUNT HEADER CARD
───────────────────────────────────────────── */
.ac-account-header {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ac-account-header-top {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px;
}
.ac-account-name { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.ac-account-meta { font-size: 12px; color: #64748b; }

.ac-account-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.ac-stat        { text-align: center; }
.ac-stat-val    { font-size: 18px; font-weight: 700; color: #0f172a; }
.ac-stat-lbl    { font-size: 10.5px; color: #94a3b8; font-weight: 500; margin-top: 1px; }

/* ─────────────────────────────────────────────
   CONTACTS SUB-LIST (inside Account Detail)
───────────────────────────────────────────── */
.ac-contacts-list { overflow: visible; }
.ac-contacts-list::-webkit-scrollbar { width: 3px; }
.ac-contacts-list::-webkit-scrollbar-thumb { background: #cbd5e1; }

.ac-contact-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer; transition: background 0.1s;
}
.ac-contact-row:hover         { background: #f8fafc; }
.ac-contact-row:last-child    { border-bottom: none; }

.ac-contact-info              { flex: 1; }
.ac-contact-name              { font-size: 12.5px; font-weight: 600; color: #0f172a; }
.ac-contact-title             { font-size: 11px; color: #64748b; }
.ac-contact-right             { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }

/* ─────────────────────────────────────────────
   TOUCH ICONS (interactive activity count pills)
───────────────────────────────────────────── */
.touch-icons  { display: flex; gap: 4px; }
.ti {
  width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer; transition: transform 0.12s;
  position: relative;
}
.ti:hover { transform: scale(1.15); }
.ti.email  { background: #eff6ff; color: #2563eb; }
.ti.teams  { background: #f5f3ff; color: #7c3aed; }
.ti.ado    { background: #f0fdf4; color: #16a34a; }

/* ─────────────────────────────────────────────
   EMAIL HOVER POPOVER
───────────────────────────────────────────── */
.ti-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  width: 240px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 10px 12px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.ti:hover .ti-popover { opacity: 1; pointer-events: auto; }

.ti-popover-title {
  font-size: 10px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 7px;
}
.ti-popover-item        { padding: 5px 0; border-bottom: 1px solid #f1f5f9; }
.ti-popover-item:last-child { border-bottom: none; }
.ti-popover-subject     { font-size: 11.5px; font-weight: 500; color: #0f172a; line-height: 1.3; }
.ti-popover-meta        { font-size: 10.5px; color: #94a3b8; margin-top: 2px; }

/* ─────────────────────────────────────────────
   RELATIONSHIP MAP
───────────────────────────────────────────── */
.ac-rel-map { padding: 14px 18px; overflow-y: auto; }
.ac-rel-map::-webkit-scrollbar { width: 3px; }

.rel-node {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 7px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  margin-bottom: 6px; cursor: pointer; transition: all 0.12s;
}
.rel-node:hover     { border-color: #93c5fd; background: #fff; }
.rel-node-info      { flex: 1; }
.rel-node-name      { font-size: 12.5px; font-weight: 600; color: #0f172a; }
.rel-node-role      { font-size: 11px; color: #64748b; }
.rel-node-right     { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rel-deal-badge {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px;
  background: #eff6ff; color: #2563eb;
}
.rel-connector {
  margin: 0 0 6px 20px;
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: #94a3b8;
}
.rel-connector::before {
  content: '';
  width: 1px; height: 14px;
  background: #e2e8f0;
  margin-left: 9px;
}

/* ─────────────────────────────────────────────
   ACTIVITY TIMELINE
───────────────────────────────────────────── */
.tl-filters {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.tl-filters-label { font-size: 11.5px; font-weight: 600; color: #64748b; }

.tl-scroll {
  display: flex; flex-direction: column; gap: 8px;
}

.event-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 12px 14px; display: flex; gap: 11px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: all 0.12s; flex-shrink: 0;
}
.event-card:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(59,130,246,0.08); }

.ev-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.ev-icon.email  { background: #eff6ff; color: #2563eb; }
.ev-icon.teams  { background: #f5f3ff; color: #7c3aed; }
.ev-icon.ado    { background: #f0fdf4; color: #16a34a; }
.ev-icon.note   { background: #f8fafc; color: #64748b; }

.ev-body        { flex: 1; min-width: 0; }
.ev-head        { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 3px; }
.ev-title       { font-size: 12.5px; font-weight: 600; color: #0f172a; line-height: 1.4; }
.ev-time        { font-size: 11px; color: #94a3b8; white-space: nowrap; margin-left: 10px; flex-shrink: 0; }
.ev-content     { font-size: 11.5px; color: #64748b; line-height: 1.5; margin-bottom: 5px; }
.ev-meta        { display: flex; flex-wrap: wrap; gap: 4px; }
.ev-pill        { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.ev-pill.email  { background: #eff6ff; color: #2563eb; }
.ev-pill.teams  { background: #f5f3ff; color: #7c3aed; }
.ev-pill.ado    { background: #f0fdf4; color: #16a34a; }
.ev-pill.gray   { background: #f1f5f9; color: #475569; }
.ev-pill.out    { background: #fff7ed; color: #ea580c; }

/* ─────────────────────────────────────────────
   INLINE LOG NOTE PANEL
───────────────────────────────────────────── */
.ac-log-panel {
  background: #fff; border: 1px solid #3b82f6;
  border-radius: 8px; padding: 14px 16px;
  margin-top: 8px; box-shadow: 0 0 0 3px rgba(59,130,246,0.06);
}
.ac-log-panel textarea {
  width: 100%; min-height: 70px;
  border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 8px 10px; font-size: 12.5px; font-family: 'Inter', sans-serif;
  color: #0f172a; resize: vertical; outline: none;
  background: #f8fafc;
}
.ac-log-panel textarea:focus { border-color: #3b82f6; background: #fff; }
.ac-log-actions { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
.ac-log-title   { font-size: 12px; font-weight: 600; color: #0f172a; margin-bottom: 8px; }

/* ─────────────────────────────────────────────
   LIFECYCLE STAGE
───────────────────────────────────────────── */
.lifecycle-stage {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
}
.ls-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ─────────────────────────────────────────────
   SECTION DIVIDER / FIELD LIST / DEAL MINI
───────────────────────────────────────────── */
.section-label {
  font-size: 10px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.6px;
  padding: 0 0 6px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 10px;
}

.field-list {}
.field-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px;
}
.field-row:last-child { border-bottom: none; }
.fk { color: #64748b; }
.fv { color: #0f172a; font-weight: 500; }

.deal-mini {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 7px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  transition: all 0.12s;
}
.deal-mini:hover           { border-color: #93c5fd; background: #fff; }
.deal-mini-top             { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.deal-mini-name            { font-size: 12.5px; font-weight: 600; color: #0f172a; }
.deal-mini-val             { font-size: 12.5px; font-weight: 700; color: #0f172a; }
.deal-mini-meta            { font-size: 11px; color: #64748b; display: flex; gap: 8px; }

/* ─────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────── */
.empty-state          { text-align: center; padding: 48px 20px; color: #94a3b8; }
.empty-state .es-icon { font-size: 32px; margin-bottom: 10px; }
.empty-state .es-title { font-size: 14px; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.empty-state .es-sub  { font-size: 12.5px; }

/* ─────────────────────────────────────────────
   SLIDE PANEL (add / edit)
───────────────────────────────────────────── */
.crm-slide-panel {
  position: fixed; top: 0; right: -480px;
  width: 480px; height: 100vh;
  background: #fff; border-left: 1px solid #e2e8f0;
  box-shadow: -8px 0 32px rgba(0,0,0,0.08);
  transition: right 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 200;
  display: flex; flex-direction: column; overflow: hidden;
}
.crm-slide-panel.open { right: 0; }
.crm-sp-header {
  padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.crm-sp-title { font-size: 15px; font-weight: 700; color: #0f172a; }
.crm-sp-close {
  width: 28px; height: 28px; border-radius: 6px;
  background: #f1f5f9; border: none; cursor: pointer;
  font-size: 16px; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.crm-sp-close:hover { background: #e2e8f0; }
.crm-sp-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.crm-sp-body::-webkit-scrollbar { width: 4px; }
.crm-sp-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.crm-sp-actions {
  padding: 12px 20px; border-top: 1px solid #e2e8f0;
  display: flex; gap: 8px; flex-shrink: 0;
}
.crm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.15);
  z-index: 199;
}

/* ─────────────────────────────────────────────
   CRM PAGE LAYOUT HELPERS
───────────────────────────────────────────── */
.crm-page { padding: 20px 24px; background: #f8fafc; min-height: 100%; }
.crm-topbar-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.crm-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #94a3b8;
}
.crm-page-title { font-size: 18px; font-weight: 600; color: #0f172a; }

/* ─────────────────────────────────────────────
   LOG ACTIVITY PANEL  (lap-*)
───────────────────────────────────────────── */
.lap-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
}
.lap-tab {
  flex: 1; padding: 6px 4px; border-radius: 6px; border: 1px solid #e2e8f0;
  background: #f8fafc; color: #64748b; font-size: 11.5px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer; transition: all 0.12s;
  text-align: center;
}
.lap-tab:hover { background: #f1f5f9; color: #334155; }
.lap-tab.active { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }

.lap-field { margin-bottom: 10px; }
.lap-label {
  display: block; font-size: 10.5px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.lap-input {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 7px 10px; font-size: 12.5px; font-family: 'Inter', sans-serif;
  color: #0f172a; background: #f8fafc; outline: none;
  transition: border-color 0.12s;
}
.lap-input:focus { border-color: #3b82f6; background: #fff; }
.lap-textarea {
  width: 100%; min-height: 70px; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 8px 10px; font-size: 12.5px; font-family: 'Inter', sans-serif;
  color: #0f172a; background: #f8fafc; resize: vertical; outline: none;
  transition: border-color 0.12s;
}
.lap-textarea:focus { border-color: #3b82f6; background: #fff; }

/* ─────────────────────────────────────────────
   PROSPECTS PAGE
───────────────────────────────────────────── */
.crm-th {
  padding: 10px 14px; font-size: 11px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .04em; text-align: left;
  background: #f8fafc; white-space: nowrap;
}
.crm-td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.prosp-search {
  border: 1px solid #e2e8f0; border-radius: 7px; padding: 7px 12px;
  font-size: 13px; width: 260px; outline: none; background: #fff; color: #0f172a;
}
.prosp-search:focus { border-color: #3b82f6; }

/* Stat pills */
.prosp-stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: all 0.12s;
}
.prosp-stat-pill.is-selected { box-shadow: 0 0 0 2px #2563eb; }
.prosp-stat-count { font-size: 11px; opacity: 0.75; }

/* Row */
.prosp-row { transition: background 0.1s; }
.prosp-row:hover td { background: #f8fafc; }
.prosp-row-converted td { opacity: 0.55; }

/* Status select pill */
.prosp-status-select {
  font-size: 11px; font-weight: 600; padding: 3px 22px 3px 8px; border-radius: 12px;
  cursor: pointer; border: none; white-space: nowrap; appearance: none;
  -webkit-appearance: none; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23475569' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
  background-size: 10px 6px; max-width: 160px;
}

/* Status color variants */
.prosp-status-new       { background: #f1f5f9; color: #475569; }
.prosp-status-email     { background: #eff6ff; color: #2563eb; }
.prosp-status-called    { background: #fff7ed; color: #c2410c; }
.prosp-status-meeting   { background: #f5f3ff; color: #7c3aed; }
.prosp-status-converted { background: #f0fdf4; color: #15803d; }
.prosp-status-disq      { background: #fef2f2; color: #dc2626; }

/* Prospect Add/Edit form grid */
.prosp-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.prosp-form-field { display: flex; flex-direction: column; gap: 4px; }
.prosp-form-field-full { grid-column: 1 / -1; }
.prosp-form-field label {
  font-size: 11px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .04em;
}
.prosp-form-field input,
.prosp-form-field select,
.prosp-form-field textarea {
  padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 13px; color: #0f172a; background: #fff; outline: none;
  transition: border-color .15s;
}
.prosp-form-field input:focus,
.prosp-form-field select:focus,
.prosp-form-field textarea:focus { border-color: #2563eb; }
.prosp-form-field textarea { resize: vertical; }

/* Panel drawer (pd-*) — clean sectioned form inside prosp-drawer */
.prosp-drawer-wide { width: 520px; }
.pd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 0;
  border-bottom: 1px solid #f1f5f9; flex-shrink: 0;
}
.pd-body {
  flex: 1; overflow-y: auto; padding: 20px 0 4px;
}
.pd-close {
  background: none; border: none; font-size: 18px; color: #94a3b8;
  cursor: pointer; padding: 4px 6px; border-radius: 4px; line-height: 1;
}
.pd-close:hover { background: #f1f5f9; color: #0f172a; }
.pd-section-title {
  font-size: 10px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .08em;
  padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; margin-bottom: 12px;
}
.pd-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.pd-field { display: flex; flex-direction: column; gap: 5px; }
.pd-field-full { grid-column: 1 / -1; }
.pd-field label {
  font-size: 11px; font-weight: 600; color: #64748b;
}
.pd-field input,
.pd-field select,
.pd-field textarea {
  padding: 8px 11px; border: 1px solid #e2e8f0; border-radius: 7px;
  font-size: 13px; color: #0f172a; background: #fff; outline: none;
  transition: border-color .15s; width: 100%; box-sizing: border-box;
  font-family: inherit;
}
.pd-field input:focus,
.pd-field select:focus,
.pd-field textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.pd-field textarea { resize: vertical; }
.pd-error {
  color: #dc2626; font-size: 12px; margin-top: 10px;
  background: #fef2f2; border-radius: 6px; padding: 8px 12px;
}
.pd-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 16px; border-top: 1px solid #f1f5f9; flex-shrink: 0;
}

/* Drawer / dialog */
.prosp-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 200;
  display: flex; align-items: center; justify-content: flex-end;
}
.prosp-drawer {
  background: #fff; width: 420px; max-width: 95vw; height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 24px 20px;
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  animation: slideInRight 0.18s ease-out; overflow: hidden;
}
@keyframes slideInRight { from { transform: translateX(40px); opacity:0; } to { transform: translateX(0); opacity:1; } }
.prosp-dialog {
  background: #fff; border-radius: 12px; padding: 24px; width: 460px; max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18); margin: auto;
  animation: scaleIn 0.15s ease-out;
}
@keyframes scaleIn { from { transform: scale(0.95); opacity:0; } to { transform: scale(1); opacity:1; } }

/* ─────────────────────────────────────────────
   REP PICKER
───────────────────────────────────────────── */
.rep-picker { position: relative; }
.rep-picker-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 7px;
  background: #fff; cursor: pointer; min-height: 36px;
  transition: border-color .15s; user-select: none;
}
.rep-picker-trigger:hover, .rep-picker-trigger.is-open { border-color: #2563eb; }
.rep-picker-name { flex: 1; font-size: 13px; color: #0f172a; }
.rep-picker-chevron { font-size: 10px; color: #94a3b8; }
.rep-picker-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1); z-index: 300;
  max-height: 220px; overflow-y: auto; padding: 4px;
}
.rep-picker-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: #0f172a;
}
.rep-picker-item:hover { background: #f1f5f9; }
.rep-picker-item.is-active { background: #eff6ff; color: #2563eb; }
.rep-picker-backdrop { position: fixed; inset: 0; z-index: 299; }

/* ─────────────────────────────────────────────
   PIPELINE KANBAN
───────────────────────────────────────────── */
.pipeline-board {
  display: flex; gap: 14px; overflow-x: auto;
  padding-bottom: 12px; align-items: flex-start;
}
.pipeline-col {
  width: 240px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 0;
}
.pipeline-col-header {
  border-radius: 10px 10px 0 0; padding: 12px 14px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-top: 4px solid var(--stage-color, #64748b);
  display: flex; flex-direction: column; gap: 4px;
}
.pipeline-col-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--stage-color, #64748b);
}
.pipeline-col-meta { display: flex; gap: 8px; align-items: center; }
.pipeline-count {
  background: #e2e8f0; color: #64748b; border-radius: 10px;
  padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.pipeline-value { font-size: 11px; color: #64748b; font-weight: 500; flex: 1; }
.pipeline-add-col-btn {
  background: none; border: none; color: #94a3b8;
  cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px;
}
.pipeline-add-col-btn:hover { color: #2563eb; }
.pipeline-cards {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 60px; padding: 8px;
  background: #f1f5f9; border: 1px solid #e2e8f0; border-top: none;
  border-radius: 0 0 10px 10px;
}
.pipeline-empty-col {
  font-size: 12px; color: #cbd5e1; text-align: center; padding: 20px 0;
}
.deal-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-left: 3px solid var(--stage-color, #64748b);
  border-radius: 8px; padding: 11px 13px; cursor: pointer;
  transition: box-shadow .12s, transform .12s;
}
.deal-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.deal-card-title { font-size: 13px; font-weight: 600; color: #0f172a; margin-bottom: 5px; }
.deal-card-acct {
  font-size: 11px; color: #3b82f6; margin-bottom: 8px;
  cursor: pointer; text-decoration: none; display: block;
}
.deal-card-acct:hover { text-decoration: underline; }
.deal-card-foot {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}
.deal-card-value { font-size: 12px; font-weight: 700; color: #0f172a; }
.deal-card-date  { font-size: 11px; color: #94a3b8; }
.deal-card-date.overdue { color: #dc2626; font-weight: 600; }
.deal-card-owner {
  display: flex; align-items: center; gap: 5px;
  margin-top: 6px; font-size: 11px; color: #64748b;
}
.deal-stage-btns { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.deal-stage-btn {
  background: #f1f5f9; border: none; border-radius: 4px;
  padding: 2px 7px; font-size: 10px; color: #64748b;
  cursor: pointer; white-space: nowrap;
}
.deal-stage-btn:hover { background: #e2e8f0; }
.deal-stage-btn.next { background: #eff6ff; color: #2563eb; }
.deal-stage-btn.next:hover { background: #dbeafe; }
.pipeline-add-btn {
  width: 100%; padding: 8px; background: none;
  border: 1px dashed #cbd5e1; border-radius: 7px;
  color: #94a3b8; font-size: 12px; cursor: pointer; text-align: center;
}
.pipeline-add-btn:hover { background: #f8fafc; color: #64748b; }

/* ─────────────────────────────────────────────
   CONTACTS — GROUP BY ACCOUNT VIEW
───────────────────────────────────────────── */
.ct-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0; border-top: 2px solid #3b82f6;
}
.ct-group-name {
  font-size: 13px; font-weight: 700; color: #0f172a; flex: 1;
}
.ct-group-count {
  font-size: 11px; font-weight: 600; color: #64748b;
  background: #e2e8f0; border-radius: 8px; padding: 1px 8px;
}
.ct-view-toggle {
  display: flex; gap: 2px; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: 7px; padding: 2px;
}
.ct-view-btn {
  padding: 4px 12px; border-radius: 5px; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  color: #64748b; background: transparent; font-family: inherit;
  transition: all .12s;
}
.ct-view-btn.active { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ── Campaign Module ───────────────────────────────────────────── */

/* Status badges */
.camp-badge          { display:inline-block; padding:2px 8px; border-radius:12px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.camp-badge-draft    { background:#f1f5f9; color:#64748b; }
.camp-badge-active   { background:#dcfce7; color:#16a34a; }
.camp-badge-paused   { background:#fef9c3; color:#ca8a04; }
.camp-badge-complete { background:#e0f2fe; color:#0369a1; }
.camp-badge-enrolled { background:#eff6ff; color:#2563eb; }

/* Stats row */
.camp-stats-row { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.camp-stat-card { background:#fff; border:1px solid #e2e8f0; border-radius:10px; padding:12px 18px; display:flex; flex-direction:column; align-items:center; min-width:90px; }
.camp-stat-num  { font-size:22px; font-weight:700; color:#0f172a; line-height:1.2; }
.camp-stat-label{ font-size:11px; color:#94a3b8; font-weight:500; margin-top:2px; }

/* Campaign grid */
.camp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }

/* Campaign card */
.camp-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:16px; cursor:pointer; transition:box-shadow .15s,border-color .15s; }
.camp-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.08); border-color:#c7d0de; }
.camp-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.camp-card-date   { font-size:11px; color:#94a3b8; }
.camp-card-name   { font-size:16px; font-weight:700; color:#0f172a; margin-bottom:4px; }
.camp-card-from   { font-size:12px; color:#64748b; margin-bottom:4px; }
.camp-card-steps  { font-size:12px; color:#94a3b8; margin-bottom:10px; }

/* Inline metrics */
.camp-card-metrics { display:flex; gap:16px; padding-top:10px; border-top:1px solid #f1f5f9; }
.camp-metric       { display:flex; flex-direction:column; align-items:center; min-width:48px; }
.camp-metric-num   { font-size:18px; font-weight:700; color:#0f172a; line-height:1.2; }
.camp-metric-lbl   { font-size:11px; color:#94a3b8; }
.text-ok           { color:#16a34a; }

/* Tabs */
.tab-bar    { display:flex; gap:4px; border-bottom:2px solid #e2e8f0; }
.tab-btn    { background:none; border:none; padding:8px 16px; font-size:13px; font-weight:500; color:#64748b; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; font-family:inherit; }
.tab-btn:hover  { color:#0f172a; }
.tab-btn.active { color:#2563eb; border-bottom-color:#2563eb; font-weight:600; }

/* Recipient search candidates */
.camp-candidate-row { display:flex; align-items:center; gap:10px; padding:10px 12px; cursor:pointer; transition:background .1s; border-bottom:1px solid var(--color-border,#f1f5f9); }
.camp-candidate-row:last-child { border-bottom:none; }
.camp-candidate-row:hover   { background:#f8fafc; }
.camp-candidate-row.selected{ background:#eff6ff; }
.camp-candidate-row.disabled{ opacity:.5; cursor:default; }

/* ── Compose Module ────────────────────────────────────────────── */

.compose-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    align-items: start;
}

.compose-sidebar { display:flex; flex-direction:column; gap:12px; }

.compose-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Contact chip */
.compose-contact-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}
.compose-contact-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.compose-contact-info { flex: 1; min-width: 0; }
.compose-contact-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.compose-contact-email { font-size: 11px; color: #64748b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.compose-chip-remove {
    background: none; border: none; cursor: pointer;
    color: #94a3b8; font-size: 18px; line-height: 1;
    padding: 0 2px; flex-shrink: 0;
}
.compose-chip-remove:hover { color: #475569; }

/* ─────────────────────────────────────────────
   GLOBAL CONSISTENCY OVERRIDES
   Used by CRM + Accounting pages sharing crm-page/crm-card markup.
───────────────────────────────────────────── */
.crm-page {
  padding: 24px !important;
  background: var(--color-bg) !important;
}

.crm-topbar-row {
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px !important;
}

.crm-topbar-row > h1,
.crm-topbar-row > h2,
.crm-topbar-row > h3,
.crm-page-title {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: var(--color-text) !important;
  letter-spacing: -0.01em;
}

.crm-topbar-row p,
.crm-topbar-row .crm-breadcrumb,
.crm-page .crm-breadcrumb,
.crm-page .filter-bar-label {
  font-size: 12.5px !important;
  color: var(--color-text-muted) !important;
}

.crm-card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
}

.crm-card-head,
.crm-card > .card-header {
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--color-border) !important;
}

.crm-card-head-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--color-text) !important;
}

.crm-page .form-group > label,
.crm-card label {
  display: block;
  margin-bottom: 4px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--color-text-muted) !important;
}

.crm-page .input-field,
.crm-page input.input-field,
.crm-page select.input-field,
.crm-page textarea.input-field {
  font-size: 13px !important;
}

.crm-page .btn-outline,
.crm-page .btn.btn-outline,
.crm-page .btn.btn-outline-secondary,
.crm-page .btn.btn-primary,
.crm-page .btn-primary {
  min-height: 34px;
}

.crm-tbl-wrap th,
.crm-page .crm-th {
  padding: 10px 14px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--color-text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  background: var(--color-bg) !important;
  border-bottom: 1px solid var(--color-border) !important;
}

.crm-tbl-wrap td,
.crm-page .crm-td {
  padding: 10px 14px !important;
  font-size: 13px !important;
  color: #334155 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.crm-tbl-wrap tbody tr:hover td {
  background: #f8fafc !important;
}

.crm-page .crm-search-input,
.crm-page .prosp-search {
  font-size: 13px !important;
  min-height: 36px;
  border-radius: var(--radius-sm) !important;
}

.crm-page .tab-bar {
  gap: 6px;
  border-bottom: 1px solid var(--color-border) !important;
}

.crm-page .tab-btn {
  font-size: 13px !important;
  font-weight: 500 !important;
}

@media (max-width: 768px) {
  .crm-page {
    padding: 16px !important;
  }

  .crm-topbar-row {
    align-items: flex-start;
  }
}

/* ─────────────────────────────────────────────
   STRICT PAGE WRAPPERS
───────────────────────────────────────────── */
.acct-dashboard .crm-topbar-row,
.acct-list-page .crm-topbar-row,
.acct-form-page .crm-topbar-row,
.acct-report-page .crm-topbar-row,
.crm-strict-page .crm-topbar-row {
  margin-bottom: 20px !important;
}

.acct-list-page .tab-bar,
.acct-form-page .tab-bar,
.crm-strict-page .tab-bar {
  margin-bottom: 14px !important;
}

.acct-dashboard h1,
.acct-dashboard h2,
.acct-list-page h1,
.acct-list-page h2,
.acct-form-page h1,
.acct-form-page h2,
.acct-report-page h1,
.acct-report-page h2,
.crm-strict-page h1,
.crm-strict-page h2 {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: var(--color-text) !important;
}

.acct-dashboard label,
.acct-list-page label,
.acct-form-page label,
.acct-report-page label,
.crm-strict-page label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--color-text-muted) !important;
}

.acct-dashboard .btn,
.acct-dashboard .btn-primary,
.acct-dashboard .btn-outline,
.acct-list-page .btn,
.acct-list-page .btn-primary,
.acct-list-page .btn-outline,
.acct-form-page .btn,
.acct-form-page .btn-primary,
.acct-form-page .btn-outline,
.acct-report-page .btn,
.acct-report-page .btn-primary,
.acct-report-page .btn-outline,
.crm-strict-page .btn,
.crm-strict-page .btn-primary,
.crm-strict-page .btn-outline {
  font-size: 13px !important;
}

.acct-dashboard .input-field,
.acct-list-page .input-field,
.acct-form-page .input-field,
.acct-report-page .input-field,
.crm-strict-page .input-field,
.crm-strict-page select,
.crm-strict-page input,
.crm-strict-page textarea {
  font-size: 13px !important;
  font-family: inherit !important;
}

.acct-dashboard .crm-card,
.acct-list-page .crm-card,
.acct-form-page .crm-card,
.acct-report-page .crm-card,
.crm-strict-page .crm-card {
  border-radius: 10px !important;
}

.acct-dashboard .crm-card-head-title,
.acct-list-page .crm-card-head-title,
.acct-form-page .crm-card-head-title,
.acct-report-page .crm-card-head-title,
.crm-strict-page .crm-card-head-title {
  font-size: 13px !important;
}

.acct-dashboard .crm-card div[style*='text-transform:uppercase'],
.acct-dashboard .crm-card span[style*='text-transform:uppercase'] {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--color-text-muted) !important;
  letter-spacing: .06em !important;
}

.acct-dashboard .crm-card div[style*='font-size:26px'] {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: var(--color-text) !important;
}

.acct-report-page > div[style*='max-width'] {
  max-width: 760px !important;
}

.acct-report-page .crm-card > div:first-child {
  color: var(--color-text) !important;
}

.acct-report-page .crm-card table th,
.acct-report-page .crm-card table td,
.acct-report-page .crm-card > div[style*='display:flex'][style*='justify-content:space-between'] {
  font-size: 13px !important;
}

.acct-report-page .crm-card table th {
  font-size: 12px !important;
  color: var(--color-text-muted) !important;
}

.acct-list-page .crm-tbl-wrap th,
.acct-list-page table th,
.acct-form-page .crm-tbl-wrap th,
.acct-form-page table th {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--color-text-muted) !important;
}

.acct-list-page .crm-tbl-wrap td,
.acct-list-page table td,
.acct-form-page .crm-tbl-wrap td,
.acct-form-page table td {
  font-size: 13px !important;
}

.acct-form-page a[style],
.acct-list-page a[style],
.crm-strict-page a[style] {
  font-family: inherit !important;
}

.crm-strict-page p[style],
.crm-strict-page span[style*='font-size:12'],
.crm-strict-page div[style*='font-size:12'] {
  font-size: 12.5px !important;
}

.crm-strict-page div[style*='font-size:16px'][style*='font-weight:700'],
.crm-strict-page div[style*='font-size:20px'][style*='font-weight:700'] {
  color: var(--color-text) !important;
}

/* Contact search dropdown */
.compose-search-results {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 210px;
    overflow-y: auto;
}
.compose-search-row {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background .1s;
}
.compose-search-row:last-child { border-bottom: none; }
.compose-search-row:hover { background: #f8fafc; }
.compose-search-name { font-size: 13px; font-weight: 500; color: #0f172a; }
.compose-search-sub  { font-size: 11px; color: #64748b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Helper texts */
.compose-hint { font-size: 12px; color: #94a3b8; }
.compose-attach-count { font-size: 11px; color: #64748b; font-weight: 500; }

/* Link-style button */
.compose-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #2563eb;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: fit-content;
}
.compose-link-btn:hover { text-decoration: underline; color: #1d4ed8; }

/* File list */
.compose-file-list { display: flex; flex-direction: column; gap: 2px; }
.compose-file-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #f8fafc;
    transition: background .1s;
}
.compose-file-row:hover { background: #f8fafc; }
.compose-file-row.is-checked { background: #eff6ff; }
.compose-file-name { font-size: 12px; font-weight: 500; color: #0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 180px; }
.compose-file-size { font-size: 11px; color: #94a3b8; }

/* Upload zone */
.compose-upload-zone {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}
.compose-upload-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}
.compose-upload-ok    { font-size: 11px; color: #16a34a; margin-top: 4px; }
.compose-upload-error { font-size: 11px; color: #dc2626; margin-top: 4px; }

/* Main compose panel */
.compose-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Email header rows (From / To / Subject) */
.compose-header {
    border-bottom: 1px solid #e2e8f0;
}
.compose-header-row {
    display: flex;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid #f1f5f9;
    min-height: 42px;
}
.compose-header-row:last-child { border-bottom: none; }
.compose-header-row-subject .compose-header-label { border-bottom: none; }
.compose-header-label {
    width: 68px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    padding: 0 14px;
    text-align: right;
    user-select: none;
}
.compose-header-fields {
    display: flex;
    flex: 1;
    gap: 0;
}
.compose-inline-input {
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 13px;
    color: #0f172a;
    background: transparent;
    font-family: inherit;
    min-width: 0;
    flex: 1;
}
.compose-inline-input::placeholder { color: #cbd5e1; }
.compose-inline-input:focus { background: #fafbff; }
.compose-inline-email {
    color: #2563eb;
    flex: 1.4;
    border-left: 1px solid #f1f5f9;
}
.compose-subject-input {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

/* Body area */
.compose-body-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 0;
}
.compose-tags-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.compose-tags-label { font-size: 11px; color: #94a3b8; font-weight: 500; }
.compose-tag-pill {
    font-size: 11px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    cursor: default;
    user-select: all;
}
.compose-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    font-family: inherit;
    color: #0f172a;
    resize: vertical;
    min-height: 340px;
    outline: none;
    line-height: 1.6;
    background: #fafbff;
    box-sizing: border-box;
}
.compose-textarea:focus { border-color: #93c5fd; background: #fff; }

/* Footer */
.compose-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fafbff;
    border-radius: 0 0 10px 10px;
}

/* Alert banner */
.compose-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}
.compose-alert-ok    { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.compose-alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.camp-cand-check { font-size:16px; color:#2563eb; width:22px; flex-shrink:0; }
