/* =========================================================
   Own Outright CRM — Stylesheet
   Brand: navy / cream / orange
   Fonts: Bricolage Grotesque (display) + Inter Tight (body)
   ========================================================= */

:root{
  --ink:#0d1b2a;
  --ink-soft:#1e2d3d;
  --ink-mute:#3a4858;
  --cream:#fbf7f0;
  --cream-deep:#f3ecdd;
  --paper:#ffffff;
  --accent:#ff6b35;
  --accent-deep:#e85225;
  --accent-soft:#fff1ea;
  --sage:#3d8168;
  --sage-soft:#e7f3ed;
  --rose:#c2455e;
  --rose-soft:#fce5ea;
  --amber:#d4a056;
  --amber-soft:#fdf3df;
  --indigo:#5468d8;
  --indigo-soft:#eaedfb;
  --muted:#6b7480;
  --line:rgba(13,27,42,0.08);
  --line-strong:rgba(13,27,42,0.16);
  --shadow:0 1px 2px rgba(13,27,42,0.04), 0 8px 24px rgba(13,27,42,0.06);
  --shadow-lg:0 12px 40px rgba(13,27,42,0.14);
  --display:'Bricolage Grotesque',sans-serif;
  --body:'Inter Tight',system-ui,sans-serif;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html,body{height:100%;}
body{
  background:var(--cream);
  color:var(--ink);
  font-family:var(--body);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}

button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit;}
input,select,textarea{font-family:inherit;font-size:14px;}

/* ============ LOGIN ============ */
.login-page{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  padding:20px;background:radial-gradient(circle at 30% 20%, rgba(255,107,53,0.08), transparent 50%), var(--cream);
}
.login-card{
  background:var(--paper);max-width:420px;width:100%;
  padding:44px 40px;border-radius:24px;box-shadow:var(--shadow-lg);
  border:1px solid var(--line);
}
.login-brand{
  display:flex;align-items:center;gap:10px;
  font-family:var(--display);font-weight:600;letter-spacing:-0.01em;font-size:15px;
  color:var(--ink-soft);margin-bottom:32px;
}
.logo-dot{
  display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--accent);
}
.login-title{
  font-family:var(--display);font-size:36px;letter-spacing:-0.03em;
  line-height:1.05;font-weight:600;margin-bottom:8px;
}
.login-title em{font-style:italic;color:var(--accent);font-weight:500;}
.login-sub{color:var(--muted);margin-bottom:28px;font-size:14px;}
#loginForm label{
  display:block;font-size:13px;font-weight:500;margin:14px 0 6px;color:var(--ink-soft);
}
#loginForm input{
  width:100%;padding:12px 14px;border:1px solid var(--line-strong);border-radius:10px;
  background:var(--paper);transition:border 0.15s, box-shadow 0.15s;
}
#loginForm input:focus{
  outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(13,27,42,0.08);
}
#loginBtn{
  margin-top:22px;width:100%;padding:13px;
  background:var(--ink);color:var(--cream);
  border-radius:10px;font-weight:500;font-size:15px;
  transition:background 0.2s;
}
#loginBtn:hover{background:var(--accent);}
#loginBtn:disabled{opacity:0.6;cursor:wait;}
.login-error{
  margin-top:14px;font-size:13px;color:#a92e15;min-height:18px;
}

/* ============ TOPBAR ============ */
.topbar{
  position:sticky;top:0;z-index:40;
  background:rgba(251,247,240,0.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{
  display:flex;align-items:center;gap:20px;
  padding:14px 28px;
  max-width:1440px;margin:0 auto;
}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:600;letter-spacing:-0.01em;}
.brand-name{font-size:16px;}
.brand-tag{
  font-size:11px;text-transform:uppercase;letter-spacing:0.1em;
  background:var(--ink);color:var(--cream);padding:3px 8px;border-radius:6px;font-weight:500;
}
.tabs{display:flex;gap:4px;margin-left:24px;flex:1;}
.tab{
  padding:8px 14px;border-radius:10px;font-size:14px;font-weight:500;color:var(--ink-mute);
  transition:all 0.15s;display:inline-flex;align-items:center;gap:6px;
}
.tab:hover{background:var(--cream-deep);color:var(--ink);}
.tab.active{background:var(--ink);color:var(--cream);}
.tab-badge{
  background:var(--accent);color:#fff;border-radius:999px;padding:1px 7px;
  font-size:11px;font-weight:600;min-width:18px;text-align:center;
}
.tab.active .tab-badge{background:var(--cream);color:var(--ink);}
.top-actions{display:flex;gap:8px;}
.btn-add{
  background:var(--accent);color:#fff;padding:9px 16px;border-radius:10px;
  font-size:14px;font-weight:500;transition:all 0.2s;
}
.btn-add:hover{background:var(--accent-deep);transform:translateY(-1px);}
.btn-icon{
  width:36px;height:36px;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--ink-soft);background:var(--cream-deep);font-size:16px;
  transition:all 0.15s;
}
.btn-icon:hover{background:var(--ink);color:var(--cream);}

/* ============ VIEW LAYOUT ============ */
.view{display:none;padding:32px 28px;max-width:1440px;margin:0 auto;}
.view.view-active{display:block;}
.view-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:24px;
  margin-bottom:24px;flex-wrap:wrap;
}
.view-title{
  font-family:var(--display);font-size:34px;letter-spacing:-0.03em;
  font-weight:600;line-height:1.1;
}
.view-sub{color:var(--muted);font-size:14px;margin-top:4px;}
.view-stats{display:flex;gap:20px;font-size:13px;color:var(--muted);}
.view-stats strong{color:var(--ink);font-weight:600;}

.search-input{
  padding:10px 14px;border:1px solid var(--line-strong);border-radius:10px;
  background:var(--paper);width:320px;max-width:100%;font-size:14px;
}
.search-input:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(13,27,42,0.08);}

/* ============ KANBAN ============ */
.kanban{
  display:grid;grid-template-columns:repeat(8, minmax(200px, 1fr));
  gap:14px;overflow-x:auto;padding-bottom:8px;
}
.col{
  background:var(--cream-deep);border-radius:16px;padding:14px;
  min-height:200px;
}
.col-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 4px 12px;
}
.col-name{
  font-family:var(--display);font-weight:600;font-size:14px;letter-spacing:-0.01em;
  display:flex;align-items:center;gap:8px;
}
.col-dot{width:8px;height:8px;border-radius:50%;}
.col-new .col-dot{background:var(--indigo);}
.col-call_booked .col-dot{background:#9b59b6;}
.col-contacted .col-dot{background:var(--amber);}
.col-replied .col-dot{background:var(--accent);}
.col-proposal_sent .col-dot{background:#2980b9;}
.col-negotiating .col-dot{background:var(--sage);}
.col-closed .col-dot{background:#1a8651;}
.col-lost .col-dot{background:var(--rose);}
.col-count{
  background:rgba(13,27,42,0.08);color:var(--ink-soft);
  border-radius:999px;padding:2px 8px;font-size:12px;font-weight:500;
}
.col-list{display:flex;flex-direction:column;gap:10px;min-height:60px;}
.col-list.drag-over{outline:2px dashed var(--accent);outline-offset:-4px;}

.card{
  background:var(--paper);border-radius:12px;padding:14px;
  border:1px solid var(--line);cursor:pointer;
  transition:all 0.15s;box-shadow:var(--shadow);
}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);border-color:var(--line-strong);}
.card.sortable-ghost{opacity:0.3;}
.card.sortable-drag{transform:rotate(2deg);box-shadow:var(--shadow-lg);}
.card-business{font-weight:600;font-size:14px;letter-spacing:-0.01em;margin-bottom:4px;line-height:1.3;}
.card-contact{color:var(--muted);font-size:12px;margin-bottom:8px;}
.card-meta{display:flex;flex-wrap:wrap;gap:6px;}
.card-chip{
  font-size:11px;padding:2px 7px;border-radius:6px;font-weight:500;
  background:var(--cream-deep);color:var(--ink-soft);
}
.card-chip.chip-mrr{background:var(--sage-soft);color:var(--sage);}
.card-chip.chip-stale{background:var(--rose-soft);color:var(--rose);}
.card-chip.chip-source-inbound{background:var(--accent-soft);color:var(--accent-deep);}
.card-empty{
  text-align:center;color:var(--muted);font-size:12px;padding:20px 10px;
  border:2px dashed var(--line-strong);border-radius:10px;
}

/* ============ FOLLOW-UPS VIEW ============ */
.followups{display:flex;flex-direction:column;gap:32px;}
.fu-section{
  background:var(--paper);border-radius:20px;padding:24px;
  border:1px solid var(--line);
}
.fu-section-head{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--line);
}
.fu-title{
  font-family:var(--display);font-size:18px;letter-spacing:-0.02em;font-weight:600;
  display:flex;align-items:center;gap:10px;
}
.fu-day-badge{
  font-size:11px;padding:3px 9px;border-radius:6px;font-weight:600;
  background:var(--cream-deep);color:var(--ink-soft);text-transform:uppercase;letter-spacing:0.06em;
}
.fu-day-badge.urgent{background:var(--rose-soft);color:var(--rose);}
.fu-day-badge.warning{background:var(--amber-soft);color:#8a6420;}
.fu-day-badge.normal{background:var(--indigo-soft);color:var(--indigo);}
.fu-count{font-size:13px;color:var(--muted);}
.fu-list{display:flex;flex-direction:column;gap:10px;}
.fu-item{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 16px;border-radius:12px;background:var(--cream-deep);
  transition:background 0.15s;
}
.fu-item:hover{background:var(--cream);}
.fu-item-info{cursor:pointer;flex:1;min-width:0;}
.fu-item-business{font-weight:600;font-size:14px;margin-bottom:2px;}
.fu-item-meta{font-size:12px;color:var(--muted);}
.fu-item-actions{display:flex;gap:6px;flex-shrink:0;}
.btn-fu-done{
  background:var(--sage);color:#fff;padding:7px 12px;border-radius:8px;font-size:13px;font-weight:500;
  transition:background 0.15s;
}
.btn-fu-done:hover{background:#2e6d56;}
.btn-fu-open{
  background:var(--cream);color:var(--ink-soft);padding:7px 12px;border-radius:8px;font-size:13px;font-weight:500;
  border:1px solid var(--line-strong);
}
.btn-fu-open:hover{background:var(--ink);color:var(--cream);border-color:var(--ink);}
.btn-fu-compose{
  background:#eef3ff;color:var(--accent);padding:7px 12px;border-radius:8px;font-size:13px;font-weight:500;
  border:1px solid rgba(26,108,245,0.18);transition:background 0.15s;
}
.btn-fu-compose:hover{background:var(--accent);color:#fff;border-color:var(--accent);}
.fu-empty{
  text-align:center;color:var(--muted);font-size:14px;padding:30px;
}

/* ============ DASHBOARD ============ */
.dashboard{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;}
.stat-card{
  background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:24px;
  transition:transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);}
.stat-card.span-2{grid-column:span 2;}
.stat-label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:0.08em;font-weight:500;margin-bottom:8px;}
.stat-value{font-family:var(--display);font-size:38px;font-weight:700;letter-spacing:-0.03em;line-height:1;}
.stat-value em{font-style:normal;color:var(--accent);font-size:24px;font-weight:600;}
.stat-sub{margin-top:8px;font-size:13px;color:var(--muted);}
.stat-row{display:flex;gap:6px;align-items:flex-end;}

.funnel{margin-top:18px;display:flex;flex-direction:column;gap:6px;}
.funnel-row{display:flex;align-items:center;gap:12px;}
.funnel-label{width:110px;font-size:13px;color:var(--ink-soft);font-weight:500;}
.funnel-bar-wrap{flex:1;background:var(--cream-deep);border-radius:6px;height:18px;overflow:hidden;}
.funnel-bar{height:100%;border-radius:6px;transition:width 0.6s ease;display:flex;align-items:center;padding:0 8px;color:#fff;font-size:11px;font-weight:600;}
.funnel-count{font-size:13px;font-weight:600;width:36px;text-align:right;}

/* ============ ALL PROSPECTS TABLE ============ */
.table-wrap{
  background:var(--paper);border-radius:18px;border:1px solid var(--line);
  overflow-x:auto;
}
.prospect-table{width:100%;border-collapse:collapse;font-size:14px;}
.prospect-table th{
  text-align:left;padding:14px 18px;font-size:12px;color:var(--muted);
  text-transform:uppercase;letter-spacing:0.06em;font-weight:600;
  border-bottom:1px solid var(--line);
}
.prospect-table td{padding:14px 18px;border-bottom:1px solid var(--line);}
.prospect-table tbody tr{transition:background 0.1s;cursor:pointer;}
.prospect-table tbody tr:hover{background:var(--cream-deep);}
.prospect-table tbody tr:last-child td{border-bottom:none;}
.cell-business{font-weight:600;}
.cell-muted{color:var(--muted);font-size:13px;}

.stage-pill{
  display:inline-block;padding:3px 10px;border-radius:999px;
  font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;
}
.stage-new{background:var(--indigo-soft);color:var(--indigo);}
.stage-call_booked{background:#f3e8fa;color:#9b59b6;}
.stage-contacted{background:var(--amber-soft);color:#8a6420;}
.stage-replied{background:var(--accent-soft);color:var(--accent-deep);}
.stage-proposal_sent{background:#dbeeff;color:#2980b9;}
.stage-negotiating{background:var(--sage-soft);color:var(--sage);}
.stage-closed{background:#d8efe2;color:#1a8651;}
.stage-lost{background:var(--rose-soft);color:var(--rose);}

/* ============ DRAWER ============ */
.drawer{position:fixed;inset:0;z-index:100;display:none;}
.drawer.open{display:block;}
.drawer-backdrop{position:absolute;inset:0;background:rgba(13,27,42,0.4);}
.drawer-panel{
  position:absolute;top:0;right:0;height:100%;width:520px;max-width:90vw;
  background:var(--cream);box-shadow:-12px 0 40px rgba(13,27,42,0.15);
  display:flex;flex-direction:column;
  animation:slideIn 0.25s ease;
}
@keyframes slideIn{from{transform:translateX(100%);}to{transform:translateX(0);}}
.drawer-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
  padding:24px 28px 18px;border-bottom:1px solid var(--line);
}
.drawer-title-input{
  font-family:var(--display);font-size:24px;letter-spacing:-0.02em;font-weight:600;
  border:none;background:transparent;outline:none;width:100%;padding:0;
}
.drawer-title-input:focus{background:var(--cream-deep);border-radius:6px;padding:2px 6px;margin:-2px -6px;}
.drawer-subline{font-size:13px;color:var(--muted);margin-top:6px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.dot-sep{opacity:0.5;}
.drawer-actions{
  display:flex;gap:8px;padding:14px 28px;border-bottom:1px solid var(--line);
  flex-wrap:wrap;background:var(--cream-deep);
}
.btn-action{
  padding:8px 14px;border-radius:10px;font-size:13px;font-weight:500;
  background:var(--paper);color:var(--ink);border:1px solid var(--line-strong);
  transition:all 0.15s;
}
.btn-action:hover{background:var(--ink);color:var(--cream);border-color:var(--ink);}
.btn-action.btn-danger{color:var(--rose);}
.btn-action.btn-danger:hover{background:var(--rose);color:#fff;border-color:var(--rose);}
.drawer-body{flex:1;overflow-y:auto;padding:24px 28px 40px;}
.drawer-section{margin-bottom:32px;}
.drawer-section h3{
  font-family:var(--display);font-size:14px;text-transform:uppercase;letter-spacing:0.08em;
  font-weight:600;color:var(--ink-soft);margin-bottom:14px;
}

.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.grid-full{grid-column:span 2;}
.grid-2 label{
  display:block;font-size:12px;font-weight:500;color:var(--ink-soft);
  margin-bottom:5px;letter-spacing:-0.01em;
}
.grid-2 input,.grid-2 select,.grid-2 textarea{
  width:100%;padding:9px 12px;border:1px solid var(--line-strong);border-radius:9px;
  background:var(--paper);font-size:14px;
}
.grid-2 textarea{resize:vertical;min-height:60px;font-family:inherit;}
.grid-2 input:focus,.grid-2 select:focus,.grid-2 textarea:focus{
  outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(13,27,42,0.06);
}
.btn-save{
  margin-top:14px;padding:10px 20px;background:var(--ink);color:var(--cream);
  border-radius:10px;font-size:14px;font-weight:500;transition:background 0.15s;
}
.btn-save:hover{background:var(--accent);}
.save-status{margin-left:10px;font-size:13px;color:var(--sage);opacity:0;transition:opacity 0.2s;}
.save-status.show{opacity:1;}

/* Notes timeline */
.add-note-row{display:flex;gap:8px;margin-bottom:16px;}
.add-note-row input{
  flex:1;padding:10px 12px;border:1px solid var(--line-strong);border-radius:9px;
  background:var(--paper);
}
.add-note-row input:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(13,27,42,0.06);}
.btn-add-note{
  padding:10px 18px;background:var(--accent);color:#fff;border-radius:9px;
  font-size:14px;font-weight:500;transition:background 0.15s;
}
.btn-add-note:hover{background:var(--accent-deep);}
.notes-timeline{list-style:none;display:flex;flex-direction:column;gap:10px;}
.note-item{
  background:var(--paper);border:1px solid var(--line);border-radius:10px;
  padding:11px 14px;
}
.note-item.note-system{background:var(--indigo-soft);border-color:transparent;}
.note-item.note-stage_change{background:var(--cream-deep);border-color:transparent;}
.note-item.note-followup_day3,
.note-item.note-followup_day7,
.note-item.note-followup_day21{background:var(--sage-soft);border-color:transparent;}
.note-item.note-outreach{background:var(--accent-soft);border-color:transparent;}
.note-content{font-size:14px;line-height:1.5;}
.note-date{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:0.04em;margin-top:6px;font-weight:500;}

/* ============ MODAL ============ */
.modal{position:fixed;inset:0;z-index:110;display:none;align-items:center;justify-content:center;padding:20px;}
.modal.open{display:flex;}
.modal-backdrop{position:absolute;inset:0;background:rgba(13,27,42,0.5);}
.modal-card{
  position:relative;background:var(--cream);border-radius:20px;
  width:100%;max-width:560px;max-height:90vh;overflow-y:auto;
  box-shadow:var(--shadow-lg);
  animation:popIn 0.2s ease;
}
.modal-wide{max-width:680px;}
@keyframes popIn{from{transform:scale(0.95);opacity:0;}to{transform:scale(1);opacity:1;}}
.modal-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:22px 26px;border-bottom:1px solid var(--line);
}
.modal-head h3{font-family:var(--display);font-size:20px;letter-spacing:-0.02em;font-weight:600;}
#addForm,.compose-body{padding:24px 26px;}
.req{color:var(--accent);}
.modal-actions{
  display:flex;gap:10px;justify-content:flex-end;
  padding-top:18px;margin-top:18px;border-top:1px solid var(--line);
}
.btn-primary{
  padding:10px 18px;background:var(--ink);color:var(--cream);border-radius:10px;
  font-weight:500;font-size:14px;transition:background 0.15s;
}
.btn-primary:hover{background:var(--accent);}
.btn-secondary{
  padding:10px 18px;background:var(--cream-deep);color:var(--ink);border-radius:10px;
  font-weight:500;font-size:14px;transition:background 0.15s;
}
.btn-secondary:hover{background:var(--line-strong);}

/* Compose modal */
.compose-row{margin-bottom:14px;}
.compose-row label{
  display:block;font-size:13px;font-weight:500;color:var(--ink-soft);margin-bottom:5px;
}
.compose-row label small{font-weight:400;color:var(--muted);font-size:12px;margin-left:6px;}
.compose-row input,.compose-row textarea{
  width:100%;padding:11px 14px;border:1px solid var(--line-strong);border-radius:9px;
  background:var(--paper);font-size:14px;font-family:inherit;
}
.compose-row textarea{resize:vertical;line-height:1.55;}
.compose-row input:focus,.compose-row textarea:focus{
  outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(13,27,42,0.06);
}
.compose-actions{
  display:flex;gap:10px;justify-content:flex-end;
  padding-top:18px;margin-top:18px;border-top:1px solid var(--line);flex-wrap:wrap;
}

/* ============ TOAST ============ */
.toast-wrap{
  position:fixed;bottom:24px;right:24px;z-index:200;
  display:flex;flex-direction:column;gap:10px;
}
.toast{
  background:var(--ink);color:var(--cream);padding:12px 18px;border-radius:12px;
  box-shadow:var(--shadow-lg);font-size:14px;font-weight:500;
  animation:toastIn 0.25s ease;max-width:340px;
}
.toast.toast-success{background:var(--sage);}
.toast.toast-error{background:#a92e15;}
@keyframes toastIn{from{transform:translateX(20px);opacity:0;}to{transform:translateX(0);opacity:1;}}

.muted{color:var(--muted);}

/* ============ RESPONSIVE ============ */
/* ============ MINE FILTER BUTTON ============ */
.btn-mine{
  padding:9px 14px;border-radius:10px;font-size:14px;font-weight:500;
  background:var(--cream-deep);color:var(--ink-soft);border:1px solid var(--line-strong);
  transition:all 0.15s;
}
.btn-mine:hover{background:var(--ink-soft);color:var(--cream);}
.btn-mine.mine-active{background:var(--ink);color:var(--cream);border-color:var(--ink);}

/* ============ ASSIGNEE CHIP ============ */
.card-chip.chip-assignee{
  background:#e8eeff;color:#3a5bd9;font-weight:700;letter-spacing:0.02em;font-size:10px;
}

/* ============ NOTE AUTHOR ============ */
.note-author{
  font-weight:600;color:var(--ink-soft);
}

/* ============ ROLE PILLS ============ */
.role-pill{
  display:inline-block;padding:3px 10px;border-radius:999px;
  font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;
}
.role-admin{background:#fdf3df;color:#8a6420;}
.role-rep{background:var(--indigo-soft);color:var(--indigo);}

/* ============ SMALL ACTION BUTTON ============ */
.btn-sm{
  padding:5px 10px !important;font-size:12px !important;
}

/* ============ STAT CARD SPAN-4 ============ */
.stat-card.span-4{grid-column:span 4;}

/* ============ DASHBOARD TEAM TABLE ============ */
.stat-card .table-wrap{
  border-radius:10px;border:1px solid var(--line);margin-top:12px;
}
.stat-card .prospect-table th{font-size:11px;}
.stat-card .prospect-table td{padding:10px 14px;}

/* ============ CLIENTS HUB ============ */

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 4px 2px;
}
.clients-empty {
  grid-column: 1/-1; text-align: center; padding: 72px 20px; color: var(--muted);
}
.clients-empty-icon { font-size: 48px; margin-bottom: 14px; }
.clients-empty h3   { font-size: 18px; color: var(--fg); margin-bottom: 8px; }

.client-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 16px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 12px;
}
.client-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.cc-top   { display: flex; align-items: center; gap: 10px; }
.cc-avatar {
  width:40px; height:40px; border-radius:10px;
  background:var(--accent); color:#fff; font-size:14px; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.cc-info  { flex:1; min-width:0; }
.cc-name  { font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cc-meta  { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px; }
.cc-mrr   { font-size:16px; font-weight:700; color:var(--accent); white-space:nowrap; }
.cc-mrr em{ font-style:normal; font-size:11px; color:var(--muted); font-weight:400; }

.cc-progress { display:flex; flex-direction:column; gap:4px; }
.cc-bar  { height:6px; background:var(--border); border-radius:3px; overflow:hidden; }
.cc-fill { height:100%; background:linear-gradient(90deg,#1a8651,#2563eb); border-radius:3px; transition:width .4s; }
.cc-prog-label { font-size:11px; color:var(--muted); }

.cc-steps   { display:flex; gap:4px; flex-wrap:wrap; }
.cc-step    { font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; background:var(--border); color:var(--muted); }
.cc-step.cc-done { background:#dcfce7; color:#166534; }

.cc-footer   { display:flex; align-items:center; justify-content:space-between; margin-top:2px; }
.cc-sites    { font-size:12px; font-weight:600; color:#1a8651; background:#f0fdf4; padding:2px 10px; border-radius:20px; }
.btn-hub-open {
  font-size:12px; font-weight:600; color:var(--accent);
  background:#eff6ff; border:1px solid #bfdbfe; border-radius:6px;
  padding:5px 12px; cursor:pointer; transition:background .15s;
}
.btn-hub-open:hover { background:#dbeafe; }

/* Hub Modal */
.modal-hub { max-width:900px; width:95vw; max-height:90vh; overflow:hidden; display:flex; flex-direction:column; }
.hub-subtitle { font-size:12.5px; color:var(--muted); margin-top:3px; }
.hub-body {
  display:grid; grid-template-columns:1fr 1fr; gap:0; flex:1; overflow:hidden;
}
.hub-col   { overflow-y:auto; padding:24px 28px; display:flex; flex-direction:column; gap:22px; }
.hub-left  { border-right:1px solid var(--border); background:var(--bg); }
.hub-right { background:var(--surface); }
.hub-section { display:flex; flex-direction:column; gap:10px; }
.hub-section-title {
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px;
  color:var(--accent); padding-bottom:6px; border-bottom:1.5px solid var(--border);
}
.hub-hint { font-size:12px; color:var(--muted); line-height:1.5; margin-top:-4px; }

/* Onboarding checklist */
.ob-row { display:flex; align-items:center; gap:10px; cursor:pointer; padding:7px 0; border-bottom:1px solid var(--border); }
.ob-row:last-child { border-bottom:none; }
.ob-chk { accent-color:var(--accent); width:16px; height:16px; cursor:pointer; flex-shrink:0; }
.ob-text { font-size:13px; color:var(--fg); transition:color .15s; }
.ob-done { color:var(--muted); text-decoration:line-through; }

/* Portfolio tracker */
.pt-row { display:flex; align-items:center; gap:8px; font-size:13px; padding:4px 0; }
.pt-row label { min-width:90px; color:var(--muted); font-size:12px; }
.pt-row input[type="number"],
.pt-row input[type="date"] {
  border:1.5px solid var(--border); border-radius:5px; padding:5px 8px;
  font-size:13px; font-family:inherit; color:var(--fg); background:var(--surface);
}
.pt-row input:focus { outline:none; border-color:var(--accent); }
.pt-of { color:var(--muted); font-size:12px; }

.hub-notes-ta {
  width:100%; min-height:80px; resize:vertical;
  border:1.5px solid var(--border); border-radius:6px;
  padding:10px 12px; font-family:inherit; font-size:13px;
  color:var(--fg); background:var(--surface); line-height:1.6;
}
.hub-notes-ta:focus { outline:none; border-color:var(--accent); }

/* Email buttons */
.hub-email-btn {
  display:flex; align-items:center; gap:12px; width:100%;
  padding:12px 14px; margin-bottom:8px;
  background:var(--bg); border:1.5px solid var(--border);
  border-radius:8px; cursor:pointer; text-align:left;
  transition:border-color .15s, background .15s;
}
.hub-email-btn:hover { border-color:var(--accent); background:#eff6ff; }
.hub-enum {
  width:24px; height:24px; border-radius:50%; background:var(--accent); color:#fff;
  font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.hub-einfo { flex:1; display:flex; flex-direction:column; gap:2px; }
.hub-ename { font-size:13px; font-weight:600; color:var(--fg); }
.hub-ewhen { font-size:11.5px; color:var(--muted); }
.hub-earrow { font-size:14px; color:var(--accent); flex-shrink:0; }

/* Document buttons */
.hub-doc-btn {
  display:flex; align-items:center; gap:12px; width:100%;
  padding:11px 14px; margin-bottom:8px;
  background:var(--bg); border:1.5px solid var(--border);
  border-radius:8px; cursor:pointer; text-align:left;
  transition:border-color .15s, background .15s;
}
.hub-doc-btn:hover { border-color:var(--accent); background:#eff6ff; }
.hub-doc-internal { background:#fffbeb; border-color:#fde68a; }
.hub-doc-internal:hover { border-color:#f59e0b; background:#fef3c7; }
.hub-dicon { font-size:18px; flex-shrink:0; }
.hub-dinfo { flex:1; display:flex; flex-direction:column; gap:2px; }
.hub-dname { font-size:13px; font-weight:600; color:var(--fg); }
.hub-dnote { font-size:11px; color:var(--muted); }
.hub-dopen { font-size:12px; color:var(--accent); flex-shrink:0; font-weight:600; }

/* Email Preview Modal */
.ep-body    { padding:24px 28px; display:flex; flex-direction:column; gap:16px; }
.ep-meta    { background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:12px 16px; display:flex; flex-direction:column; gap:6px; }
.ep-row     { display:flex; gap:10px; font-size:13px; }
.ep-label   { font-weight:600; color:var(--muted); min-width:54px; }
.ep-text    {
  background:var(--bg); border:1px solid var(--border); border-radius:6px;
  padding:16px; font-family:inherit; font-size:13px; line-height:1.7;
  color:var(--fg); white-space:pre-wrap; max-height:340px; overflow-y:auto;
}
.ep-actions { display:flex; gap:10px; flex-wrap:wrap; }

/* Closed Deal Banner */
.closed-banner {
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%);
  z-index:9999; animation:slideUp .3s ease;
}
@keyframes slideUp {
  from{opacity:0;transform:translateX(-50%) translateY(20px)}
  to  {opacity:1;transform:translateX(-50%) translateY(0)}
}
.closed-banner-inner {
  display:flex; align-items:center; gap:12px;
  background:#1a1a2e; color:#fff; padding:14px 20px;
  border-radius:12px; box-shadow:0 8px 32px rgba(0,0,0,0.3);
  font-size:14px; font-weight:500; white-space:nowrap;
}
.closed-banner-emoji { font-size:20px; }
.btn-start-ob {
  background:#2563eb; color:#fff; border:none; border-radius:6px;
  padding:7px 16px; font-size:13px; font-weight:600; cursor:pointer;
  font-family:inherit; transition:opacity .15s;
}
.btn-start-ob:hover { opacity:.85; }
.closed-banner-x {
  background:none; border:none; color:rgba(255,255,255,.5);
  font-size:16px; cursor:pointer; padding:0 4px; margin-left:4px;
}
.closed-banner-x:hover { color:#fff; }

/* ============ OUTBOUND ============ */

/* Campaign grid */
.outbound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  padding: 0 24px 32px;
}
.campaign-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid rgba(0,0,0,0.07);
  padding: 20px;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.12s;
}
.campaign-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.camp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.camp-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--dark);
  line-height: 1.3;
}
.camp-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-draft     { background: #f0f0f0; color: #666; }
.status-active    { background: #e7f7ee; color: #0a5d2a; }
.status-completed { background: #e8f0fe; color: #1a5faf; }
.camp-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.camp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.camp-stat { text-align: center; }
.camp-stat-n {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--dark);
}
.camp-stat-calls { color: #1a8651; }
.camp-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.camp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.camp-date { font-size: 12px; color: var(--muted); }

/* Campaign detail modal */
.modal-campaign {
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.camp-detail-body {
  padding: 0 26px 26px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Stats row */
.camp-stats-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: #f8f6f1;
  border-radius: 12px;
  padding: 16px;
}
.camp-stat-input {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 80px;
}
.camp-stat-input label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.camp-stat-input input,
.camp-stat-input select {
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

/* Leads section */
.camp-leads-section {
  background: #fff;
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  overflow: hidden;
}
.camp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  background: #fafafa;
}
.camp-section-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
}
.btn-upload-csv {
  display: inline-block;
  padding: 7px 14px;
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.btn-upload-csv:hover { background: #1a6cf5; }

/* Empty state */
.leads-empty {
  padding: 24px 16px;
  color: var(--muted);
  font-size: 14px;
}
.leads-empty-help {
  margin-top: 10px;
  padding: 10px 14px;
  background: #f0f4ff;
  border-radius: 8px;
  font-size: 13px;
  color: #2a4fa0;
  line-height: 1.5;
}

/* Loaded state */
.leads-loaded { padding: 16px; }
.leads-count-badge {
  display: inline-block;
  padding: 5px 12px;
  background: #f0f4ff;
  color: #1a5faf;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.leads-count-done {
  background: #e7f7ee;
  color: #0a5d2a;
}
.leads-mini-preview {
  background: #f8f6f1;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}
.leads-mini-row {
  display: flex;
  gap: 12px;
  padding: 3px 0;
  color: var(--muted);
}
.lmr-name { font-weight: 500; color: var(--dark); min-width: 120px; }
.lmr-biz  { flex: 1; }
.lmr-city { min-width: 80px; }
.lmr-more { color: var(--muted); font-style: italic; padding-top: 4px; font-size: 12px; }
.leads-actions { margin-top: 4px; }

/* Generate / export buttons */
.btn-generate {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1a6cf5, #0d1b2a);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  margin-bottom: 6px;
}
.btn-generate:hover { opacity: 0.88; }
.btn-export {
  display: inline-block;
  padding: 12px 24px;
  background: #1a8651;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  margin-bottom: 6px;
}
.btn-export:hover { opacity: 0.88; }
.leads-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.leads-hint code {
  background: #f0f0f0;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

/* Processing state */
.leads-processing { padding: 20px 16px; }
.leads-progress-label {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--dark);
}
.leads-progress-bar {
  height: 8px;
  background: #e8eaf0;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 6px;
}
.leads-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a6cf5, #1a8651);
  border-radius: 20px;
  transition: width 0.3s ease;
}
.leads-progress-pct {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* Done state */
.leads-done { padding: 16px; }
.leads-preview { margin: 12px 0; overflow-x: auto; }
.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.leads-table th {
  text-align: left;
  padding: 7px 10px;
  background: #f8f6f1;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.leads-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--dark);
  font-size: 13px;
}
.opener-cell {
  font-style: italic;
  color: #2a4fa0;
  max-width: 300px;
  line-height: 1.4;
}
.preview-more {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  font-style: italic;
}
.leads-export-row { margin-top: 14px; }

/* Notes section */
.camp-notes-section {
  background: #f8f6f1;
  border-radius: 12px;
  padding: 16px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px){
  .dashboard{grid-template-columns:repeat(2,1fr);}
  .stat-card.span-2{grid-column:span 2;}
  .stat-card.span-4{grid-column:span 2;}
  .kanban{grid-template-columns:repeat(8, minmax(180px, 1fr));}
}
@media (max-width: 768px){
  .topbar-inner{padding:12px 16px;flex-wrap:wrap;gap:10px;}
  .tabs{margin-left:0;width:100%;order:3;overflow-x:auto;}
  .view{padding:24px 16px;}
  .view-title{font-size:26px;}
  .dashboard{grid-template-columns:1fr;}
  .stat-card.span-2,.stat-card.span-4{grid-column:span 1;}
  .drawer-panel{width:100%;}
  .grid-2{grid-template-columns:1fr;}
  .grid-full{grid-column:span 1;}
  .kanban{grid-template-columns:repeat(8, 220px);}
}
