*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:Arial,sans-serif;background:#F8FAFA;color:#111A1E;min-height:100vh;}
:root{
  --forest:#1F3635;--teal:#045B5C;--teal-light:#EBF2F2;--orange:#F36B21;
  --chartreuse:#C9CD2D;--near-black:#111A1E;--gray:#555555;--footer-gray:#F4F7F7;
  --white:#FFFFFF;--orange-light:#FEF3EC;--pilot-blue:#1B6FA0;--pilot-blue-bg:#EDF5FA;
  --border:#E2E8E8;--green:#2e7d32;--green-light:#F0FBF0;--red:#c0392b;--red-light:#fff5f5;
  --sidebar-w:220px;
}

/* ── LOGIN ── */
#login-screen{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-height:100vh;background:var(--forest);
}
#login-screen .card{
  background:white;border-radius:12px;padding:48px 56px;max-width:420px;width:90%;
  box-shadow:0 8px 40px rgba(0,0,0,0.25);text-align:center;
}
#login-screen .logo-bar{
  display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:32px;
}
#login-screen .logo-mark{
  width:40px;height:40px;
  display:flex;align-items:center;justify-content:center;
}
#login-screen .logo-mark img{height:40px;width:auto;}
#login-screen h1{font-size:22px;font-weight:700;color:var(--forest);margin-bottom:6px;}
#login-screen p{font-size:13px;color:var(--gray);margin-bottom:32px;line-height:1.5;}
#btn-login{
  width:100%;padding:14px;background:var(--teal);color:white;border:none;
  border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:10px;
  transition:background 0.2s;
}
#btn-login:hover{background:var(--forest);}
#btn-login svg{width:20px;height:20px;fill:white;}
.login-note{font-size:11px;color:rgba(255,255,255,0.5);margin-top:20px;}
#login-error{
  display:none;margin-top:16px;padding:10px 14px;background:#fff5f5;
  border:1px solid #f5c6c6;border-radius:7px;font-size:12px;color:var(--red);
  text-align:left;line-height:1.5;
}
#login-error.visible{display:block;}

/* ── APP SHELL ── */
#app{display:none;flex-direction:column;height:100vh;overflow:hidden;}

/* ── TOPBAR ── */
#topbar{
  background:var(--forest);padding:0 20px;height:56px;
  display:flex;align-items:center;justify-content:space-between;
  position:sticky;top:0;z-index:200;flex-shrink:0;
}
#topbar .brand{display:flex;align-items:center;gap:10px;}

#topbar .brand-name{color:white;font-size:14px;font-weight:700;letter-spacing:0.5px;}
#topbar .brand-sub{color:rgba(255,255,255,0.45);font-size:11px;margin-left:4px;}
#topbar .topbar-right{display:flex;align-items:center;gap:14px;}
#user-name{color:rgba(255,255,255,0.8);font-size:12px;}
.role-badge{
  font-size:9px;font-weight:700;padding:2px 7px;border-radius:10px;
  text-transform:uppercase;letter-spacing:0.5px;
}
.role-badge.admin{background:var(--chartreuse);color:var(--forest);}
.role-badge.contractor{background:rgba(255,255,255,0.15);color:rgba(255,255,255,0.7);}
.role-badge.tech{background:var(--pilot-blue);color:white;}

/* ── NOTIFICATION BELL ── */
.notif-wrap{position:relative;}
#btn-notif{
  background:none;border:none;cursor:pointer;padding:6px;
  display:flex;align-items:center;justify-content:center;
  border-radius:6px;transition:background 0.15s;
}
#btn-notif:hover{background:rgba(255,255,255,0.1);}
#btn-notif svg{fill:rgba(255,255,255,0.7);width:18px;height:18px;}
#notif-count{
  display:none;position:absolute;top:2px;right:2px;
  background:var(--orange);color:white;font-size:9px;font-weight:700;
  min-width:14px;height:14px;border-radius:7px;
  display:flex;align-items:center;justify-content:center;padding:0 3px;
}
#notif-count.hidden{display:none;}
#notif-panel{
  display:none;position:absolute;top:calc(100% + 10px);right:0;
  width:340px;background:white;border-radius:10px;
  box-shadow:0 8px 30px rgba(0,0,0,0.15);border:1px solid var(--border);
  z-index:300;
}
#notif-panel.open{display:block;}
.notif-panel-head{
  padding:12px 16px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
}
.notif-panel-head h3{font-size:12px;font-weight:700;color:var(--forest);}
#btn-clear-notif{
  font-size:11px;color:var(--teal);background:none;border:none;
  cursor:pointer;padding:0;font-weight:600;
}
#btn-clear-notif:hover{text-decoration:underline;}
#notif-list{max-height:320px;overflow-y:auto;}
.notif-empty{
  padding:24px 16px;text-align:center;font-size:12px;color:var(--gray);
}
.notif-item{
  padding:10px 16px;border-bottom:1px solid var(--border);cursor:pointer;
  transition:background 0.1s;
}
.notif-item:last-child{border-bottom:none;}
.notif-item:hover{background:#FAFAFA;}
.notif-item.unread{background:var(--teal-light);}
.notif-item .ni-msg{font-size:12px;color:var(--near-black);line-height:1.4;margin-bottom:3px;}
.notif-item .ni-meta{font-size:10px;color:var(--gray);}
.notif-item .ni-ref{color:var(--teal);font-weight:600;}

#btn-logout{
  background:rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border:none;
  padding:5px 12px;border-radius:4px;font-size:11px;cursor:pointer;
  transition:background 0.2s;
}
#btn-logout:hover{background:rgba(255,255,255,0.2);}

/* ── BODY LAYOUT: sidebar + content ── */
#body-layout{
  display:flex;flex:1;overflow:hidden;height:calc(100vh - 56px);
}

/* ── HAMBURGER (mobile only) ── */
#btn-hamburger{
  display:none;background:none;border:none;cursor:pointer;
  padding:6px;margin-right:8px;
  flex-direction:column;justify-content:center;align-items:center;gap:5px;
}
#btn-hamburger span{
  display:block;width:20px;height:2px;background:white;border-radius:1px;
}

/* ── SIDEBAR ── */
#sidebar{
  width:var(--sidebar-w);flex-shrink:0;
  background:var(--forest);display:flex;flex-direction:column;
  overflow-y:auto;
}
#btn-sidebar-close{
  display:none;background:none;border:none;cursor:pointer;
  color:rgba(255,255,255,0.7);font-size:20px;line-height:1;
  padding:12px 16px 4px;align-self:flex-end;
}
#btn-sidebar-close:hover{color:white;}

/* ── SIDEBAR BACKDROP (mobile only) ── */
#sidebar-backdrop{
  display:none;position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:299;
}

/* ── MOBILE SIDEBAR ── */
@media (max-width:768px){
  #btn-hamburger{display:flex;}
  #sidebar{
    position:fixed;top:56px;left:-260px;bottom:0;
    width:260px;z-index:300;
    transition:left 0.2s ease;
  }
  #sidebar.open{left:0;}
  #btn-sidebar-close{display:block;}
  #sidebar-backdrop.open{display:block;}
}
.nav-section-label{
  font-size:9px;font-weight:700;color:rgba(255,255,255,0.3);
  text-transform:uppercase;letter-spacing:1.5px;
  padding:18px 16px 6px;
}
.nav-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 16px;cursor:pointer;
  color:rgba(255,255,255,0.65);font-size:13px;
  border-left:3px solid transparent;
  transition:all 0.15s;user-select:none;
}
.nav-item:hover{background:rgba(255,255,255,0.06);color:white;}
.nav-item.active{
  background:rgba(255,255,255,0.1);color:white;
  border-left-color:var(--chartreuse);
}
.nav-item svg{fill:currentColor;width:15px;height:15px;flex-shrink:0;}
.nav-item .nav-badge{
  margin-left:auto;background:var(--orange);color:white;
  font-size:9px;font-weight:700;padding:1px 6px;border-radius:8px;
}
.nav-divider{height:1px;background:rgba(255,255,255,0.08);margin:8px 0;}

/* ── MAIN CONTENT ── */
#main-content{
  flex:1;overflow-y:auto;background:#F0F3F3;
}

/* ── VIEWS ── */
.view{display:none;padding:24px;}
.view.active{display:block;}

/* ── PAGE HEADER ── */
.page-header{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:20px;
}
.page-header h2{font-size:18px;font-weight:700;color:var(--forest);}
.page-header p{font-size:12px;color:var(--gray);margin-top:3px;}

/* ── CARDS ── */
.card-grid{display:grid;gap:16px;}
.card-grid.cols2{grid-template-columns:repeat(2,1fr);}
.card-grid.cols3{grid-template-columns:repeat(3,1fr);}
.card-grid.cols4{grid-template-columns:repeat(4,1fr);}

.stat-card{
  background:white;border-radius:10px;padding:18px 20px;
  border:1px solid var(--border);
}
.stat-card .sc-label{font-size:10px;font-weight:700;color:var(--gray);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px;}
.stat-card .sc-value{font-size:26px;font-weight:700;color:var(--forest);}
.stat-card .sc-sub{font-size:11px;color:var(--gray);margin-top:4px;}

.panel{
  background:white;border-radius:10px;border:1px solid var(--border);overflow:hidden;
}
.panel-head{
  padding:12px 16px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
}
.panel-head h3{font-size:12px;font-weight:700;color:var(--forest);text-transform:uppercase;letter-spacing:1px;}
.panel-body{padding:16px;}

/* ── EMPTY STATE ── */
.empty-state{
  text-align:center;padding:48px 24px;
}
.empty-state svg{fill:var(--border);width:40px;height:40px;margin-bottom:12px;}
.empty-state h3{font-size:14px;font-weight:700;color:var(--gray);margin-bottom:6px;}
.empty-state p{font-size:12px;color:var(--gray);line-height:1.5;max-width:320px;margin:0 auto;}

/* ── BUTTONS ── */
.btn-primary{
  padding:9px 18px;background:var(--teal);color:white;border:none;
  border-radius:7px;font-size:13px;font-weight:600;cursor:pointer;
  display:inline-flex;align-items:center;gap:7px;transition:background 0.2s;
}
.btn-primary:hover{background:var(--forest);}
.btn-primary svg{fill:white;width:14px;height:14px;}
.btn-secondary{
  padding:8px 16px;background:white;color:var(--forest);
  border:2px solid var(--border);border-radius:7px;font-size:13px;font-weight:600;
  cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:all 0.2s;
}
.btn-secondary:hover{border-color:var(--teal);color:var(--teal);}
.btn-secondary svg{fill:currentColor;width:14px;height:14px;}

/* ── STATUS BADGES ── */
.status-badge{
  display:inline-flex;align-items:center;
  font-size:10px;font-weight:700;padding:3px 9px;border-radius:10px;
  text-transform:capitalize;letter-spacing:0.3px;white-space:nowrap;
}
.status-proposalSigned{background:#FEF9EC;color:#B45309;}
.status-msaSigned{background:#F0FBF0;color:#2e7d32;}
.status-intakeSubmitted{background:#EDF5FA;color:var(--pilot-blue);}
.status-workOrderSent{background:#EDF5FA;color:var(--pilot-blue);}
.status-invoiceSent{background:var(--orange-light);color:var(--orange);}
.status-paymentReceived{background:#F0FBF0;color:#2e7d32;}
.status-suiteBuilt{background:#F0FBF0;color:#2e7d32;}
.status-onboardingScheduled{background:var(--teal-light);color:var(--teal);}
.status-active{background:#E8F5E9;color:#1B5E20;}
.status-renewalReminderSent{background:#FEF9EC;color:#B45309;}
.status-outreachLogged{background:#F0FBF0;color:#2e7d32;}
.status-renewalQuoteSent{background:var(--orange-light);color:var(--orange);}
.status-renewed{background:#E8F5E9;color:#1B5E20;}
.status-pilotComplete{background:var(--teal-light);color:var(--teal);}
.status-converted{background:#E8F5E9;color:#1B5E20;}
.status-cancelled{background:#FEE2E2;color:#991B1B;}

/* ── HEALTH BADGES ── */
.health-badge{
  font-size:10px;font-weight:700;padding:2px 8px;border-radius:8px;
}
.health-healthy{background:#E8F5E9;color:#1B5E20;}
.health-monitoring{background:#FEF9EC;color:#B45309;}
.health-at-risk{background:#FEE2E2;color:#991B1B;}
.health-critical{background:#991B1B;color:white;}

/* ── NEW DEAL FORM ── */
.lookup-row{display:flex;gap:8px;align-items:flex-end;}
.lookup-row .field{flex:1;margin-bottom:0;}
#btn-load-quote{
  padding:9px 16px;background:var(--teal);color:white;border:none;
  border-radius:7px;font-size:12px;font-weight:700;cursor:pointer;
  white-space:nowrap;transition:background 0.2s;height:38px;flex-shrink:0;
}
#btn-load-quote:hover{background:var(--forest);}
#btn-load-quote:disabled{background:#aaa;cursor:not-allowed;}
#deal-lookup-status,#deal-submit-status{
  font-size:12px;padding:9px 12px;border-radius:7px;
  display:none;margin-top:10px;line-height:1.5;
}
#deal-lookup-status.loading,#deal-submit-status.loading{
  display:block;background:var(--teal-light);color:var(--teal);
}
#deal-lookup-status.success,#deal-submit-status.success{
  display:block;background:var(--green-light);color:var(--green);
}
#deal-lookup-status.error,#deal-submit-status.error{
  display:block;background:var(--red-light);color:var(--red);
}
.q-summary{
  background:var(--teal-light);border:1px solid #C8DCDC;border-radius:8px;
  padding:12px 14px;display:none;margin-top:12px;
}
.q-summary.visible{display:block;}
.q-summary-label{font-size:9px;font-weight:700;color:var(--teal);text-transform:uppercase;letter-spacing:1.5px;margin-bottom:8px;}
.q-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;}
.q-summary-item label{font-size:9px;color:var(--teal);font-weight:600;display:block;margin-bottom:1px;}
.q-summary-item span{font-size:12px;font-weight:700;color:var(--forest);}
.q-products-list{margin-top:8px;display:flex;flex-wrap:wrap;gap:4px;}
.q-prod-tag{font-size:10px;padding:2px 8px;border-radius:10px;background:var(--orange);color:white;font-weight:700;}
.q-prod-tag.pilot{background:var(--pilot-blue);}
.post-load{display:none;}
.post-load.visible{display:block;}
#btn-submit-deal{margin-top:8px;}
.field input[readonly]{background:#F8FAFA;color:var(--gray);cursor:default;}
.deal-type-display{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 11px;border:2px solid var(--border);border-radius:7px;
  font-size:13px;font-weight:600;color:var(--forest);background:#F8FAFA;
  min-height:38px;
}
.deal-type-display.pilot{border-color:var(--pilot-blue);color:var(--pilot-blue);background:var(--pilot-blue-bg);}
.deal-type-display.full{border-color:var(--teal);color:var(--teal);background:var(--teal-light);}

/* ── DEAL LIST ── */
.filter-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:14px;}
.filter-bar select{padding:7px 10px;border:2px solid var(--border);border-radius:7px;font-size:12px;color:var(--near-black);background:white;outline:none;cursor:pointer;}
.filter-bar select:focus{border-color:var(--teal);}
.deal-load-msg{font-size:11px;color:var(--gray);}
.deal-load-msg.loading{color:var(--teal);}
.deal-load-msg.error{color:var(--red);}
table.deal-table{width:100%;border-collapse:collapse;font-size:12px;}
.deal-table th{
  padding:9px 12px;text-align:left;font-size:10px;font-weight:700;
  color:var(--gray);text-transform:uppercase;letter-spacing:0.8px;
  border-bottom:2px solid var(--border);background:#FAFAFA;white-space:nowrap;
}
.deal-table th.sortable{cursor:pointer;user-select:none;}
.deal-table th.sortable:hover{color:var(--teal);}
.deal-table th.sorted{color:var(--teal);}
.deal-table td{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:middle;}
.deal-table tbody tr{cursor:pointer;transition:background 0.1s;}
.deal-table tbody tr:hover{background:#F5F8F8;}
.deal-table tbody tr:last-child td{border-bottom:none;}
.deal-table .co-name{font-weight:700;color:var(--forest);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.deal-table .acv-col{font-weight:700;white-space:nowrap;}
.deal-table .days-col{font-size:11px;color:var(--gray);white-space:nowrap;}
.deal-table .days-col.overdue{color:var(--red);font-weight:700;}
.deal-table .rep-col{font-size:11px;color:var(--gray);}
.deal-empty{padding:40px 20px;text-align:center;color:var(--gray);font-size:13px;}

/* ── DEAL DETAIL ── */
.detail-topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;flex-wrap:wrap;gap:8px;}
.btn-back{
  display:inline-flex;align-items:center;gap:6px;padding:7px 14px;
  border:2px solid var(--border);border-radius:7px;background:white;
  color:var(--gray);font-size:12px;font-weight:700;cursor:pointer;transition:all 0.15s;
}
.btn-back:hover{border-color:var(--teal);color:var(--teal);}
.btn-back svg{fill:currentColor;width:13px;height:13px;}
.detail-badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.detail-company{font-size:21px;font-weight:700;color:var(--forest);margin-bottom:14px;}
.detail-meta-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:12px;
  background:white;border:1px solid var(--border);border-radius:10px;
  padding:16px;margin-bottom:16px;
}
.detail-meta-item label{font-size:9px;font-weight:700;color:var(--gray);text-transform:uppercase;letter-spacing:1px;display:block;margin-bottom:3px;}
.detail-meta-item .val{font-size:13px;font-weight:600;color:var(--forest);overflow-wrap:break-word;}
.detail-meta-item .val.mono{font-size:11px;font-family:monospace;color:var(--teal);}
.advance-area{display:flex;flex-direction:column;gap:10px;}
.advance-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.btn-advance{
  padding:9px 18px;background:var(--teal);color:white;border:none;
  border-radius:7px;font-size:13px;font-weight:700;cursor:pointer;
  display:inline-flex;align-items:center;gap:7px;transition:background 0.2s;
}
.btn-advance:hover{background:var(--forest);}
.btn-advance:disabled{background:#aaa;cursor:not-allowed;}
.btn-advance svg{fill:white;width:14px;height:14px;}
.btn-cancel-deal{
  padding:7px 14px;background:none;color:var(--red);
  border:2px solid #FECACA;border-radius:7px;font-size:12px;font-weight:700;
  cursor:pointer;transition:all 0.15s;
}
.btn-cancel-deal:hover{background:var(--red-light);}
.advance-msg{font-size:11px;padding:7px 10px;border-radius:6px;display:none;}
.advance-msg.saving{display:block;background:var(--teal-light);color:var(--teal);}
.advance-msg.success{display:block;background:var(--green-light);color:var(--green);}
.advance-msg.error{display:block;background:var(--red-light);color:var(--red);}
.health-select-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.health-select-row select{padding:7px 10px;border:2px solid var(--border);border-radius:7px;font-size:12px;color:var(--near-black);background:white;outline:none;}
.health-select-row select:focus{border-color:var(--teal);}
.health-save-msg{font-size:11px;padding:6px 10px;border-radius:6px;display:none;margin-top:8px;}
.health-save-msg.saving{display:block;background:var(--teal-light);color:var(--teal);}
.health-save-msg.success{display:block;background:var(--green-light);color:var(--green);}
.health-save-msg.error{display:block;background:var(--red-light);color:var(--red);}
.inline-form{display:none;margin-top:12px;padding:14px;background:#FAFBFB;border:1px solid var(--border);border-radius:8px;}
.inline-form.open{display:block;}
.inline-form label{display:block;font-size:10px;font-weight:700;color:var(--teal);text-transform:uppercase;letter-spacing:1px;margin-bottom:4px;}
.inline-form textarea,.inline-form input[type=text],.inline-form input[type=date],.inline-form select{
  width:100%;padding:8px 10px;border:2px solid var(--border);border-radius:6px;
  font-size:12px;font-family:Arial,sans-serif;outline:none;transition:border-color 0.15s;background:white;
}
.inline-form textarea:focus,.inline-form input:focus,.inline-form select:focus{border-color:var(--teal);}
.inline-form textarea{resize:vertical;min-height:80px;}
.inline-form .form-field{margin-bottom:10px;}
.inline-form .form-actions{margin-top:12px;display:flex;gap:8px;align-items:center;}
.btn-form-submit{padding:7px 14px;background:var(--teal);color:white;border:none;border-radius:6px;font-size:12px;font-weight:700;cursor:pointer;transition:background 0.2s;}
.btn-form-submit:hover{background:var(--forest);}
.btn-form-submit:disabled{background:#aaa;cursor:not-allowed;}
.btn-form-cancel{padding:7px 14px;background:none;border:2px solid var(--border);border-radius:6px;font-size:12px;color:var(--gray);cursor:pointer;font-weight:600;}
.btn-form-cancel:hover{border-color:var(--gray);}
.form-save-msg{font-size:11px;margin-left:4px;padding:4px 8px;border-radius:5px;display:none;}
.form-save-msg.saving{display:inline-block;background:var(--teal-light);color:var(--teal);}
.form-save-msg.error{display:inline-block;background:var(--red-light);color:var(--red);}
.activity-log{display:flex;flex-direction:column;}
.activity-item{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);}
.activity-item:last-child{border-bottom:none;}
.ai-icon{width:28px;height:28px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-top:1px;}
.ai-icon svg{width:13px;height:13px;}
.ai-icon.type-status{background:var(--teal-light);}
.ai-icon.type-status svg{fill:var(--teal);}
.ai-icon.type-note{background:var(--orange-light);}
.ai-icon.type-note svg{fill:var(--orange);}
.ai-icon.type-checkin{background:var(--pilot-blue-bg);}
.ai-icon.type-checkin svg{fill:var(--pilot-blue);}
.ai-icon.type-health{background:#FEF9EC;}
.ai-icon.type-health svg{fill:#B45309;}
.ai-body{flex:1;min-width:0;}
.ai-text{font-size:12px;color:var(--near-black);line-height:1.5;}
.ai-note-text{font-size:12px;color:var(--near-black);line-height:1.5;font-style:italic;background:#FAFAFA;border-left:2px solid var(--border);padding:4px 8px;border-radius:0 4px 4px 0;margin:4px 0 0;}
.ai-meta{font-size:10px;color:var(--gray);margin-top:2px;}
.note-item{padding:10px 0;border-bottom:1px solid var(--border);}
.note-item:last-child{border-bottom:none;}
.note-body{font-size:13px;color:var(--near-black);line-height:1.5;margin-bottom:4px;}
.note-meta{font-size:10px;color:var(--gray);}
.note-locked{font-size:9px;padding:1px 6px;border-radius:8px;background:#F0F0F0;color:var(--gray);margin-left:6px;}
.checkin-item{padding:10px 0;border-bottom:1px solid var(--border);}
.checkin-item:last-child{border-bottom:none;}
.checkin-method-tag{display:inline-block;font-size:9px;font-weight:700;padding:2px 7px;border-radius:8px;background:var(--pilot-blue-bg);color:var(--pilot-blue);text-transform:uppercase;letter-spacing:0.5px;margin-right:6px;}
.checkin-summary{font-size:12px;color:var(--near-black);line-height:1.5;margin-top:3px;}
.checkin-meta{font-size:10px;color:var(--gray);margin-top:2px;}

/* ── COMMISSION ── */
.comm-status{display:inline-block;font-size:10px;font-weight:700;padding:2px 8px;border-radius:8px;}
.comm-pending{background:#FEF9EC;color:#B45309;}
.comm-approved{background:var(--green-light);color:var(--green);}
.comm-paid{background:#E8F5E9;color:#1B5E20;}
.streak-on{background:var(--chartreuse);color:var(--forest);display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:700;padding:2px 8px;border-radius:8px;}
.streak-off{background:#F0F0F0;color:var(--gray);font-size:10px;font-weight:700;padding:2px 8px;border-radius:8px;display:inline-block;}
.streak-hero{background:var(--forest);border-radius:10px;padding:14px 18px;display:flex;align-items:center;gap:14px;}
.streak-hero svg{fill:var(--chartreuse);width:28px;height:28px;flex-shrink:0;}
.streak-hero.off svg{fill:rgba(255,255,255,0.25);}
.comm-breakdown{font-size:10px;color:var(--gray);margin-top:3px;line-height:1.7;}
.btn-approve{padding:5px 12px;background:var(--green);color:white;border:none;border-radius:5px;font-size:11px;font-weight:700;cursor:pointer;transition:background 0.15s;}
.btn-approve:hover{background:#1B5E20;}
.btn-approve:disabled{background:#aaa;cursor:not-allowed;}
.btn-override{padding:5px 11px;background:none;color:var(--orange);border:2px solid #FDBA74;border-radius:5px;font-size:11px;font-weight:700;cursor:pointer;margin-left:6px;transition:all 0.15s;}
.btn-override:hover{background:var(--orange-light);}
.comm-record{padding:12px 0;border-bottom:1px solid var(--border);}
.comm-record:last-child{border-bottom:none;}
.comm-record .cr-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.comm-record .cr-co{font-size:13px;font-weight:700;color:var(--forest);flex:1;min-width:0;}
.comm-record .cr-amt{font-size:15px;font-weight:700;color:var(--teal);white-space:nowrap;}
.comm-record .cr-meta{font-size:10px;color:var(--gray);margin-top:3px;}
.comm-empty{padding:28px 16px;text-align:center;font-size:12px;color:var(--gray);}
.override-form{margin-top:10px;padding:12px;background:#FAFBFB;border:1px solid var(--border);border-radius:7px;display:none;}
.override-form.open{display:block;}
.override-form label{display:block;font-size:10px;font-weight:700;color:var(--teal);text-transform:uppercase;letter-spacing:1px;margin-bottom:3px;margin-top:8px;}
.override-form label:first-child{margin-top:0;}
.override-form input[type=number],.override-form textarea{width:100%;padding:7px 10px;border:2px solid var(--border);border-radius:6px;font-size:12px;outline:none;font-family:Arial,sans-serif;transition:border-color 0.15s;background:white;}
.override-form input:focus,.override-form textarea:focus{border-color:var(--teal);}
.comm-load-msg{font-size:11px;color:var(--gray);}
.comm-load-msg.loading{color:var(--teal);}
.comm-load-msg.error{color:var(--red);}

/* ── COMING SOON PLACEHOLDER ── */
.coming-soon{
  background:white;border-radius:10px;border:2px dashed var(--border);
  padding:56px 24px;text-align:center;margin-top:8px;
}
.coming-soon .phase-label{
  display:inline-block;font-size:10px;font-weight:700;padding:3px 10px;
  border-radius:10px;background:var(--teal-light);color:var(--teal);
  text-transform:uppercase;letter-spacing:1px;margin-bottom:14px;
}
.coming-soon h3{font-size:15px;font-weight:700;color:var(--forest);margin-bottom:6px;}
.coming-soon p{font-size:12px;color:var(--gray);line-height:1.5;}

/* ── DASHBOARD PIPELINE STRIP ── */
.pipeline-strip{
  display:flex;gap:0;background:white;border-radius:10px;
  border:1px solid var(--border);overflow:hidden;margin-bottom:20px;
}
.pipeline-stage{
  flex:1;padding:14px 12px;text-align:center;
  border-right:1px solid var(--border);
}
.pipeline-stage:last-child{border-right:none;}
.pipeline-stage .ps-label{font-size:9px;font-weight:700;color:var(--gray);text-transform:uppercase;letter-spacing:0.8px;margin-bottom:6px;}
.pipeline-stage .ps-count{font-size:22px;font-weight:700;color:var(--forest);}
.pipeline-stage .ps-acv{font-size:10px;color:var(--gray);margin-top:2px;}

/* ── SECTION CARD (matches existing .sc pattern) ── */
.sc{border:1px solid var(--border);border-radius:10px;overflow:hidden;background:white;}
.sc-head{
  padding:10px 14px;display:flex;align-items:center;gap:8px;
  border-bottom:2px solid var(--chartreuse);background:var(--teal-light);
}
.sc-head h3{font-size:11px;font-weight:700;color:var(--forest);text-transform:uppercase;letter-spacing:1.5px;}
.sc-head .badge{font-size:10px;padding:2px 7px;border-radius:10px;font-weight:700;background:var(--orange);color:white;}
.sc-body{padding:14px;}

/* ── ALERT BANNER ── */
.alert-banner{
  padding:10px 14px;border-radius:8px;font-size:12px;line-height:1.5;
  display:flex;align-items:flex-start;gap:8px;
}
.alert-banner svg{width:14px;height:14px;flex-shrink:0;margin-top:1px;}
.alert-banner.warn{background:#FEF9EC;color:#92400E;border:1px solid #FDE68A;}
.alert-banner.warn svg{fill:#B45309;}
.alert-banner.info{background:var(--teal-light);color:var(--teal);border:1px solid #C8DCDC;}
.alert-banner.info svg{fill:var(--teal);}
.alert-banner.error{background:var(--red-light);color:var(--red);border:1px solid #FECACA;}
.alert-banner.error svg{fill:var(--red);}

/* ── LOADING SPINNER ── */
.spinner{
  display:inline-block;width:18px;height:18px;
  border:2px solid var(--border);border-top-color:var(--teal);
  border-radius:50%;animation:spin 0.7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}

/* ── OVERLAY for notification panel close ── */
#notif-overlay{display:none;position:fixed;inset:0;z-index:250;}
#notif-overlay.open{display:block;}

/* ── ROLE BADGES (extended) ── */
.role-badge.superAdmin { background: #C9CD2D; color: #1F3635; }
.role-badge.opsAdmin   { background: #F36B21; color: white; }
.role-badge.viewAdmin  { background: #555555; color: white; }

/* ── ADMIN SETTINGS TABS ── */
.admin-tab-nav {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: white; border: 1px solid var(--border);
  border-radius: 10px; padding: 6px;
}
.admin-tab {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; flex: 1; padding: 8px 18px;
  border: none; border-radius: 7px; font-size: 13px; font-weight: 600;
  color: var(--gray); background: none; cursor: pointer; transition: all 0.15s;
}
.admin-tab svg { fill: currentColor; width: 14px; height: 14px; }
.admin-tab:hover { background: var(--teal-light); color: var(--teal); }
.admin-tab.active { background: var(--teal); color: white; }

/* ── CONTRACTOR FORM ── */
.cf-row { display: flex; gap: 14px; margin-bottom: 12px; }
.cf-field { flex: 1; min-width: 0; }
.cf-field-full { flex: none; width: 100%; }
.cf-label {
  display: block; font-size: 10px; font-weight: 700;
  color: var(--teal); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.cf-input {
  width: 100%; padding: 8px 10px;
  border: 2px solid var(--border); border-radius: 6px;
  font-size: 12px; font-family: Arial, sans-serif;
  outline: none; background: white; transition: border-color 0.15s;
}
.cf-input:focus { border-color: var(--teal); }
.cf-input[readonly] { background: #F8FAFA; color: var(--gray); cursor: default; }
.cf-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}

/* ── ROLES TAB ── */
.roles-section-head {
  font-size: 11px; font-weight: 700; color: var(--forest);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px; margin-top: 4px;
}

/* ── PROSPECT STATUS BADGES ── */
.prospect-status-new          { background: #E3F0FF; color: #1B5FA8; }
.prospect-status-contacted    { background: #FFF4E0; color: #B8600A; }
.prospect-status-engaged      { background: #FFF0D0; color: #A85000; }
.prospect-status-discoveryScheduled { background: #EEF0FF; color: #3740AA; }
.prospect-status-discoveryHeld      { background: #E5EEFF; color: #2A40C0; }
.prospect-status-qualified    { background: #E8F8E8; color: #1B6B1B; }
.prospect-status-proposalPending    { background: #F3F0FF; color: #5030C0; }
.prospect-status-proposalSent       { background: #EDE0FF; color: #6020B0; }
.prospect-status-proposalSigned     { background: var(--green-light); color: var(--green); font-weight: 700; }
.prospect-status-nurture      { background: #FFF8E0; color: #80600A; }
.prospect-status-dead         { background: var(--red-light); color: var(--red); }

/* ── PROSPECT PRODUCT TAGS ── */
.prospect-tag {
  display: inline-block; padding: 2px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; margin-right: 3px; white-space: nowrap;
}
.prospect-tag-externalHiring     { background: #E3F0FF; color: #1B5FA8; }
.prospect-tag-internalHiring     { background: #E8F8E8; color: #1B6B1B; }
.prospect-tag-successionPlanning { background: #FFF4E0; color: #B8600A; }
.prospect-tag-teamAssessments    { background: #F3F0FF; color: #5030C0; }

/* ── MY PROSPECTS STAGE PILLS ── */
.my-prospects-stages {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.my-prospect-stage-pill {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 16px; background: white; border: 1px solid var(--border);
  border-radius: 10px; min-width: 90px; cursor: default;
}
.mps-count {
  font-size: 22px; font-weight: 800; color: var(--teal); line-height: 1;
}
.mps-label {
  font-size: 10px; color: var(--gray); margin-top: 3px; text-align: center;
}

/* ── PROSPECT LIST VIEW ── */
.prospect-filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.prospect-filter-bar select,
.prospect-filter-bar input {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; outline: none; background: white;
}
.prospect-filter-bar select:focus,
.prospect-filter-bar input:focus { border-color: var(--teal); }

.prospect-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.prospect-table th {
  text-align: left; padding: 8px 12px;
  font-size: 10px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.8px;
  border-bottom: 2px solid var(--border); cursor: pointer; user-select: none;
}
.prospect-table th:hover { color: var(--teal); }
.prospect-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.prospect-table tr:hover td { background: var(--teal-light); cursor: pointer; }

/* ── PROSPECT DETAIL ── */
.prospect-pipeline-bar {
  display: flex; gap: 0; margin-bottom: 20px; overflow-x: auto;
}
.ppb-stage {
  flex: 1; min-width: 80px; text-align: center; padding: 8px 4px;
  font-size: 10px; font-weight: 600; border-bottom: 3px solid var(--border);
  color: var(--gray); white-space: nowrap;
}
.ppb-stage.done   { border-color: var(--teal); color: var(--teal); }
.ppb-stage.active { border-color: var(--orange); color: var(--orange); font-weight: 700; }

.prospect-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
@media(max-width:700px){ .prospect-detail-grid { grid-template-columns: 1fr; } }

.prospect-handoff-callout {
  background: var(--green-light); border: 1px solid var(--green);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 14px;
}
.prospect-handoff-callout h4 { color: var(--green); font-size: 13px; margin-bottom: 6px; }
.prospect-handoff-callout p  { font-size: 12px; color: var(--gray); margin-bottom: 10px; }

.prospect-nurture-form,
.prospect-dead-form {
  background: var(--footer-gray); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 14px;
}
.prospect-nurture-form h4,
.prospect-dead-form h4 { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--forest); }

.automatch-confirm-panel {
  background: white; border: 2px solid var(--teal); border-radius: 10px;
  padding: 20px; margin-bottom: 20px;
}
.automatch-confirm-panel h3 { color: var(--teal); font-size: 14px; margin-bottom: 12px; }
.automatch-rep-group { margin-bottom: 10px; }
.automatch-rep-group strong { font-size: 12px; color: var(--forest); }
.automatch-rep-group ul { margin: 4px 0 0 16px; font-size: 12px; color: var(--gray); }

/* ════════════════════════════════════════════
   ACTIVITY ENGINE — Log Panel + Feed
════════════════════════════════════════════ */
.act-btn-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.act-type-btn {
  flex: 1; min-width: 120px; padding: 12px 10px; font-size: 13px; font-weight: 600;
  background: white; border: 2px solid var(--border); border-radius: 8px;
  cursor: pointer; color: var(--near-black); transition: border-color .15s, background .15s;
}
.act-type-btn:hover { border-color: var(--teal); background: #f0f9f7; }

.act-log-panel { display: none; }
.act-log-panel.open { display: block; }
.act-panel-body {
  background: #f8fafa; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 8px;
}
.act-outcome-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.act-radio { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer;
  padding: 7px 12px; border: 2px solid var(--border); border-radius: 20px; background: white;
  transition: border-color .15s;
}
.act-radio:has(input:checked) { border-color: var(--teal); background: #f0f9f7; color: var(--forest); }
.act-radio input[type="radio"] { width: 14px; height: 14px; accent-color: var(--teal); }
.act-textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 13px;
  border: 2px solid var(--border); border-radius: 6px; resize: vertical; outline: none;
  font-family: inherit; color: var(--near-black); margin-bottom: 8px;
}
.act-textarea:focus { border-color: var(--teal); }
.act-text-input { width: 100%; box-sizing: border-box; padding: 8px 10px; font-size: 13px;
  border: 2px solid var(--border); border-radius: 6px; outline: none; font-family: inherit;
  color: var(--near-black); margin-bottom: 8px;
}
.act-text-input:focus { border-color: var(--teal); }
.act-toggle-label { display: flex; align-items: center; gap: 6px; font-size: 13px;
  cursor: pointer; margin-bottom: 8px;
}
.act-followup-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.act-followup-row input[type="date"] { padding: 7px 10px; border: 2px solid var(--border);
  border-radius: 6px; font-size: 12px; outline: none;
}
.act-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.act-field label { font-size: 10px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 4px;
}
.act-field input[type="date"] { width: 100%; box-sizing: border-box; padding: 7px 10px;
  border: 2px solid var(--border); border-radius: 6px; font-size: 12px; outline: none;
}
.act-field-label { font-size: 10px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: .5px;
}
.act-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.act-loading { padding: 12px 0; font-size: 12px; color: var(--gray); }

/* Activity feed items */
.afi { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.afi:last-child { border-bottom: none; }
.afi-icon { font-size: 20px; flex-shrink: 0; width: 28px; text-align: center; }
.afi-body { flex: 1; min-width: 0; }
.afi-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.afi-type { font-size: 12px; font-weight: 700; color: var(--forest); }
.afi-meta { font-size: 10px; color: var(--gray); margin-left: auto; }
.afi-summary { font-size: 12px; color: var(--near-black); margin-bottom: 2px; }
.afi-nextstep { font-size: 11px; color: var(--teal); font-weight: 600; }
.afi-email-preview { font-size: 11px; color: var(--gray); font-style: italic; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.afi-email-link { font-size: 11px; color: var(--teal); text-decoration: none; display: inline-block; margin-top: 3px; }
.afi-email-link:hover { text-decoration: underline; }
.email-dir-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; letter-spacing: .3px; }
.email-dir-out { background: #dbeafe; color: #1e40af; }
.email-dir-in  { background: #d1fae5; color: #065f46; }

/* Outlook sync chip */
.outlook-sync-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--teal); background: #e0f2fe; border-radius: 12px; padding: 3px 10px; margin-bottom: 6px; }
.meta-tooltip { font-size: 9px; color: var(--gray); cursor: help; }

/* Outcome badges */
.out-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: .5px; }
.out-positive { background: #d4edda; color: #155724; }
.out-neutral  { background: #fff3cd; color: #856404; }
.out-negative { background: #f8d7da; color: #721c24; }

/* Next-step chip */
.nsc { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 12px; letter-spacing: .3px;
}
.nsc-green { background: #d4edda; color: #155724; }
.nsc-amber { background: #fff3cd; color: #856404; }
.nsc-red   { background: #f8d7da; color: #721c24; }

/* ════════════════════════════════════════════
   TASKS VIEW
════════════════════════════════════════════ */
.task-section { margin-bottom: 20px; }
.task-sec-head {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
  color: var(--gray); padding: 8px 0 6px; border-bottom: 2px solid var(--border); margin-bottom: 4px;
}
.task-sec-overdue { color: var(--red); border-color: var(--red); }
.task-sec-toggle  { cursor: pointer; user-select: none; }
.task-sec-toggle:hover { color: var(--forest); }
.task-done-list svg { transition: transform .2s; }
.task-empty-msg { padding: 10px 0; font-size: 12px; color: var(--gray); }

.task-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px;
  border-bottom: 1px solid var(--border); transition: background .1s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: #f8fafa; }
.task-row-overdue { background: #fff5f5; }
.task-row-overdue:hover { background: #ffeaea; }
.task-row-done { opacity: .55; }
.task-row-check { padding-top: 2px; flex-shrink: 0; }
.task-cb { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.task-done-mark { font-size: 14px; color: var(--teal); }
.task-row-body { flex: 1; min-width: 0; }
.task-row-title { font-size: 13px; font-weight: 600; color: var(--near-black); margin-bottom: 2px; }
.task-row-done .task-row-title { text-decoration: line-through; }
.task-row-meta { font-size: 11px; color: var(--gray); }
.task-co-link { color: var(--forest); text-decoration: none; font-weight: 600; }
.task-co-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════════
   RESOURCE HUB
════════════════════════════════════════════ */
.rh-layout { display: flex; gap: 20px; align-items: flex-start; }
.rh-sidebar { width: 200px; flex-shrink: 0; }
.rh-main { flex: 1; min-width: 0; }

.rh-category-list {
  background: white; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; margin-bottom: 12px;
}
.rh-cat-item {
  display: flex; align-items: center; gap: 9px; padding: 10px 14px;
  cursor: pointer; font-size: 12px; font-weight: 500; color: var(--near-black);
  border-bottom: 1px solid var(--border); transition: background .15s;
  user-select: none;
}
.rh-cat-item:last-child { border-bottom: none; }
.rh-cat-item svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.rh-cat-item:hover { background: var(--teal-light); }
.rh-cat-item.active { background: var(--teal); color: white; }

.rh-admin-info {
  background: var(--footer-gray); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; font-size: 11px; color: var(--gray); line-height: 1.6;
}
.rh-admin-info a { color: var(--teal); text-decoration: underline; }

.rh-pricing-ref {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: white; border: 2px solid var(--teal); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 20px;
}
.rh-pricing-ref-label { font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 2px; }
.rh-pricing-ref-sub   { font-size: 11px; color: var(--gray); }

.rh-search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.rh-search-bar input {
  flex: 1; padding: 8px 12px; border: 2px solid var(--border);
  border-radius: 7px; font-size: 12px; outline: none; transition: border-color .15s;
}
.rh-search-bar input:focus { border-color: var(--teal); }
.rh-search-bar button {
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 7px;
  background: white; font-size: 12px; color: var(--gray); cursor: pointer; transition: background .15s;
}
.rh-search-bar button:hover { background: var(--border); }

.rh-file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .rh-file-grid { grid-template-columns: 1fr; } }

.rh-file-card {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s;
}
.rh-file-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.rh-file-card-top { display: flex; align-items: flex-start; gap: 10px; }
.rh-file-icon { flex-shrink: 0; }
.rh-file-info { flex: 1; min-width: 0; }
.rh-file-name { font-size: 13px; font-weight: 600; color: var(--near-black); line-height: 1.35; word-break: break-word; }
.rh-file-desc { font-size: 11px; color: var(--gray); line-height: 1.5; margin-top: 4px; }
.rh-file-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rh-file-cat-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  background: var(--teal-light); color: var(--teal); white-space: nowrap;
}
.rh-file-date { font-size: 10px; color: var(--gray); }
.rh-file-open-btn {
  display: block; text-align: center; padding: 8px 14px;
  background: var(--teal); color: white; border: none; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s; margin-top: auto;
}
.rh-file-open-btn:hover { background: var(--forest); }
.rh-pricing-open { display: inline-block; width: auto; margin-top: 0; white-space: nowrap; }

@keyframes rh-spin { to { transform: rotate(360deg); } }
.rh-spin { animation: rh-spin .8s linear infinite; display: inline-block; }

/* ════════════════════════════════════════════
   ANALYTICS + EARNINGS
════════════════════════════════════════════ */

/* Leaderboard table */
.lb-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lb-table th, .lb-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.lb-table thead th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray); }
.lb-th { cursor: pointer; user-select: none; white-space: nowrap; }
.lb-th:hover { color: var(--teal); }
.lb-active { color: var(--teal) !important; }
.lb-table tbody tr:hover { background: var(--teal-light); }
.lb-me { background: #f0f8f8; }
.lb-you-tag { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 8px; background: var(--teal); color: white; vertical-align: middle; }

/* Funnel */
.funnel-wrap { padding: 4px 0; }
.funnel-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gray); margin-bottom: 10px; }
.funnel-section-divider { border-top: 1px dashed var(--border); margin: 16px 0; }
.funnel-stages { display: flex; flex-direction: column; gap: 8px; }
.funnel-stage { display: grid; grid-template-columns: 140px 1fr 120px; align-items: center; gap: 10px; }
.funnel-stage-label { font-size: 12px; font-weight: 500; color: var(--near-black); }
.funnel-bar-wrap { height: 16px; background: #f0f4f4; border-radius: 8px; overflow: hidden; }
.funnel-bar { height: 100%; background: var(--teal); border-radius: 8px; transition: width .3s; min-width: 2px; }
.funnel-stage-meta { display: flex; align-items: center; gap: 8px; }
.funnel-count { font-size: 13px; font-weight: 700; color: var(--near-black); min-width: 28px; }
.funnel-pct { font-size: 10px; color: var(--gray); }
.funnel-pct-low { color: var(--red); }

/* Lost deal analysis */
.lost-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gray); margin-bottom: 8px; }
.lost-row { display: grid; grid-template-columns: 1fr 80px 50px; align-items: center; gap: 8px; margin-bottom: 6px; }
.lost-row-label { font-size: 12px; color: var(--near-black); }
.lost-row-bar-wrap { height: 10px; background: #f0f4f4; border-radius: 5px; overflow: hidden; }
.lost-row-bar { height: 100%; background: var(--orange); border-radius: 5px; }
.lost-row-meta { font-size: 11px; color: var(--gray); text-align: right; }

/* Sales cycle */
.cycle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cycle-card { background: var(--teal-light); border-radius: 8px; padding: 14px; }
.cycle-card-warn { background: #fff8e1; }
.cycle-num { font-size: 24px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.cycle-card-warn .cycle-num { color: #7b5e00; }
.cycle-label { font-size: 12px; font-weight: 600; color: var(--near-black); margin-bottom: 2px; }
.cycle-sub { font-size: 10px; color: var(--gray); }

/* Earnings hero */
.earn-hero {
  background: var(--forest); color: white; border-radius: 10px;
  padding: 24px 28px; margin-bottom: 16px; text-align: center;
}
.eh-label { font-size: 12px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px; }
.eh-amount { font-size: 40px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 4px; }
.eh-sub { font-size: 12px; color: rgba(255,255,255,.55); }

/* Tier progress */
.tier-indicator { font-size: 13px; color: var(--near-black); margin-bottom: 10px; }
.tier-bar-wrap { margin-bottom: 8px; }
.tier-bar-track { height: 12px; background: #e8f0f0; border-radius: 6px; overflow: hidden; margin-bottom: 4px; }
.tier-bar-fill { height: 100%; background: var(--teal); border-radius: 6px; transition: width .4s; min-width: 4px; }
.tier-bar-label { font-size: 11px; color: var(--gray); }

/* Earn streak chip */
.earn-streak { font-size: 12px; color: var(--gray); padding: 8px 12px; background: #f4f7f7; border-radius: 6px; margin-top: 8px; }
.earn-streak-on { background: var(--green-light); color: var(--green); font-weight: 600; }

/* ══════════════════════════════════════════════
   HELP SYSTEM
══════════════════════════════════════════════ */

/* ── "?" button ── */
.btn-help {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--teal);
  font-size: 14px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}
.btn-help:hover { background: var(--teal-light); border-color: var(--teal); }

/* ── Contextual help panel ── */
#help-panel-overlay {
  display: none;
  position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.18);
  z-index: 180;
}
#help-panel-overlay.open { display: block; }

#help-panel {
  position: fixed; top: 56px; right: -320px; bottom: 0;
  width: 320px;
  background: white;
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.13);
  z-index: 190;
  display: flex; flex-direction: column;
  transition: right 0.25s ease;
}
#help-panel.open { right: 0; }

.help-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.help-panel-head span {
  font-size: 13px; font-weight: 700; color: var(--forest);
}
.help-panel-close {
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 4px;
  color: var(--gray); display: flex; align-items: center;
  line-height: 1;
}
.help-panel-close:hover { background: var(--footer-gray); color: var(--near-black); }
.help-panel-close svg { width: 18px; height: 18px; fill: currentColor; }

.help-panel-body {
  flex: 1; overflow-y: auto;
  padding: 14px 16px;
}
.help-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.help-panel-footer a {
  font-size: 12px; color: var(--teal); text-decoration: none; font-weight: 600;
}
.help-panel-footer a:hover { text-decoration: underline; }

/* ── Help articles (shared by panel + page) ── */
.help-article {
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}
.help-article-title {
  font-size: 13px; font-weight: 700; color: var(--forest); margin-bottom: 6px;
}
.help-article-body {
  font-size: 12px; color: var(--gray); line-height: 1.65;
}
.help-article-feedback {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--footer-gray);
  font-size: 11px; color: var(--gray);
}
.help-vote-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
  line-height: 1;
}
.help-vote-btn span { font-size: 11px; color: var(--gray); }
.help-vote-btn:hover { background: var(--footer-gray); }
.help-vote-btn.voted { background: var(--teal-light); border-color: var(--teal); }

/* ── Full Help page ── */
.help-search-wrap {
  position: relative; max-width: 560px; margin-bottom: 20px;
}
.help-search-wrap svg {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; fill: var(--gray);
  pointer-events: none;
}
#help-search {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px 9px 38px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; outline: none; background: white;
}
#help-search:focus { border-color: var(--teal); }

.help-page-layout {
  display: flex; gap: 20px; align-items: flex-start;
}
.help-cat-sidebar {
  width: 170px; flex-shrink: 0;
}
.help-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 7px;
  cursor: pointer; font-size: 12px; color: var(--gray);
  font-weight: 500; margin-bottom: 2px;
  transition: background 0.12s;
}
.help-cat-item:hover { background: var(--footer-gray); color: var(--near-black); }
.help-cat-item.active { background: var(--teal-light); color: var(--teal); font-weight: 700; }
.help-cat-count { font-size: 10px; color: var(--gray); }
.help-articles-pane { flex: 1; min-width: 0; }
