/* Interactive CRM demo — keeps Hilens visual style */
.crm-demo-metrics { margin-bottom: 18px; }
.crm-live-panel { overflow: visible; }
.crm-board { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; align-items:start; }
.crm-column { min-height: 220px; padding:14px; border-radius:22px; background:rgba(248,250,252,.75); border:1px solid rgba(15,23,42,.08); }
.crm-column h3 { margin:0 0 10px; font-size:16px; }
.crm-column small { color:var(--muted); }
.lead-card { width:100%; text-align:left; margin:10px 0 0; padding:14px; border:1px solid rgba(15,23,42,.08); border-radius:18px; background:#fff; box-shadow:0 10px 24px rgba(15,23,42,.06); cursor:pointer; color:inherit; }
.lead-card.active { outline:3px solid rgba(194,139,44,.35); }
.lead-card strong, .lead-card span { display:block; }
.lead-card span { margin-top:6px; color:var(--muted); font-size:13px; }
.lead-card .overdue { color:#b45309; font-weight:800; }
.crm-demo-layout { display:grid; grid-template-columns:1.1fr .9fr; gap:18px; margin-top:18px; align-items:start; }
.empty-state { color:var(--muted); }
.lead-work-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; margin-bottom:14px; }
.lead-work-head h2 { margin-bottom:6px; }
.lead-status { display:inline-flex; padding:7px 10px; border-radius:999px; background:#fff3da; color:#8a5a10; font-weight:900; font-size:12px; }
.crm-form { display:grid; gap:10px; margin:14px 0; }
.crm-form label { font-weight:900; font-size:13px; color:#374151; }
.crm-select,.crm-input,.crm-textarea { width:100%; border:1px solid rgba(15,23,42,.12); border-radius:16px; background:#fff; padding:12px 14px; color:#111827; font:inherit; }
.crm-textarea { min-height:95px; resize:vertical; }
.crm-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.history-log { padding:14px; border-radius:18px; background:#f8fafc; color:#475569; line-height:1.65; font-size:14px; max-height:260px; overflow:auto; }
.history-log p { margin:0 0 10px; }
.ai-result { margin-top:12px; min-height:30px; color:var(--muted); }
.ai-result .task-preview, .task-preview { padding:16px; border-radius:20px; background:linear-gradient(135deg,#101827,#2f3a4f); color:#fff; }
.task-preview span { display:block; color:#f6d38b; font-weight:900; margin-bottom:6px; }
.task-preview strong { display:block; font-size:20px; line-height:1.15; margin-bottom:6px; }
.task-preview p { color:rgba(255,255,255,.74); margin:0; }
.role-switch,.report-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.role-switch button,.report-tabs button { border:0; border-radius:999px; padding:10px 13px; background:#f1f5f9; color:#334155; font-weight:900; cursor:pointer; }
.role-switch button.active,.report-tabs button.active { background:#111827; color:#fff; }
.role-output,.report-output { padding:14px; border-radius:18px; background:#f8fafc; color:#475569; line-height:1.65; }
.account-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.account-card { padding:18px; border-radius:22px; background:#fff; border:1px solid rgba(15,23,42,.08); box-shadow:0 12px 26px rgba(15,23,42,.06); }
.account-card strong { display:block; font-size:20px; margin-bottom:8px; }
.progress-line { height:14px; background:#edf2f7; border-radius:999px; overflow:hidden; margin:12px 0; }
.progress-line span { display:block; height:100%; background:linear-gradient(90deg,#c28b2c,#e9bd68); }
.toast { position:fixed; right:22px; bottom:22px; z-index:50; padding:14px 16px; border-radius:18px; background:#111827; color:#fff; box-shadow:0 20px 42px rgba(15,23,42,.22); opacity:0; transform:translateY(12px); transition:.2s ease; }
.toast.show { opacity:1; transform:translateY(0); }
@media(max-width:1180px){ .crm-board{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-demo-layout{grid-template-columns:1fr}.account-grid{grid-template-columns:1fr} }
@media(max-width:720px){ .crm-board{grid-template-columns:1fr}.lead-work-head{display:block} }

/* CRM demo v2 — stronger interactive controls */
.crm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.role-switch.compact {
  margin: 0;
}
.new-lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr 180px auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(248,250,252,.86);
  border: 1px solid rgba(15,23,42,.08);
}
.new-lead-form[hidden] { display: none; }
.decline-wrap {
  display: grid;
  gap: 8px;
}
.decline-wrap[hidden] { display: none; }
.subsection-title {
  margin-top: 26px;
}
.interactive-chart {
  min-height: 260px;
}
.interactive-chart svg {
  width: 100%;
  height: 230px;
}
.muted-chart,
.muted-empty {
  color: var(--muted);
  font-size: 13px;
}
.lead-status {
  max-width: 240px;
  text-align: right;
}
@media(max-width: 980px) {
  .new-lead-form { grid-template-columns: 1fr; }
  .lead-status { max-width: none; text-align: left; }
}

.focus-flash {
  animation: crmFocusFlash .9s ease;
}
@keyframes crmFocusFlash {
  0% { box-shadow: 0 0 0 0 rgba(194,139,44,.55), 0 18px 45px rgba(15,23,42,.08); }
  55% { box-shadow: 0 0 0 7px rgba(194,139,44,.18), 0 18px 45px rgba(15,23,42,.08); }
  100% { box-shadow: 0 0 0 0 rgba(194,139,44,0), 0 18px 45px rgba(15,23,42,.08); }
}


#leadWorkspace {
  scroll-margin-top: 116px;
}
.lead-work-head {
  scroll-margin-top: 116px;
}
