/* ALX CRM v4.3.42 - verified application facts within lead detail, no new columns. */
body.alx-crm-page #leadDetail .alx-intake-panel {
  grid-column: 1 / -1;
  padding: 14px 16px;
  margin: 6px 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(83, 146, 222, .28);
  background: linear-gradient(120deg, #10294b 0%, #0c203b 100%);
  color: #e5f0ff;
  box-shadow: 0 7px 22px rgba(0, 11, 31, .12);
}
body.alx-crm-page #leadDetail .alx-intake-heading {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 5px 12px; margin-bottom: 10px;
}
body.alx-crm-page #leadDetail .alx-intake-heading strong {
  font-size: 13px; font-weight: 800; color: #f2f7ff;
}
body.alx-crm-page #leadDetail .alx-intake-heading small {font-size: 10px; color: #9db9da;}
body.alx-crm-page #leadDetail .alx-intake-fields {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
body.alx-crm-page #leadDetail .alx-intake-field {
  min-width: 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(44, 77, 124, .23);
  border: 1px solid rgba(93, 145, 212, .23);
}
body.alx-crm-page #leadDetail .alx-intake-field span,
body.alx-crm-page #leadDetail .alx-intake-message span {
  display: block; font-size: 10px; font-weight: 650;
  margin-bottom: 5px; color: #a7c7ef;
}
body.alx-crm-page #leadDetail .alx-intake-field strong {
  display: block; max-width: 100%; font-size: 12px; font-weight: 750;
  color: #eaf3ff; line-height: 1.4; overflow-wrap: anywhere;
}
body.alx-crm-page #leadDetail .alx-intake-message {
  margin-top: 9px; border-top: 1px solid rgba(129, 169, 222, .2); padding-top: 9px;
}
body.alx-crm-page #leadDetail .alx-intake-message p {
  font-size: 11px; line-height: 1.5; margin: 0; color: #e0edfb;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
body.alx-crm-page #leadDetail .alx-intake-disclaimer {
  margin: 8px 0 0; font-size: 10px; line-height: 1.3; color: #8da9cd;
}
html:not([data-alx-theme="dark"]) body.alx-crm-page #leadDetail .alx-intake-panel,
body.alx-crm-page:not(.alx-dark) #leadDetail .alx-intake-panel {
  background: linear-gradient(120deg, #f1f7ff, #eaf4ff);
  border-color: #c3dcf6; color: #264567;
}
html:not([data-alx-theme="dark"]) body.alx-crm-page #leadDetail .alx-intake-heading strong,
body.alx-crm-page:not(.alx-dark) #leadDetail .alx-intake-heading strong,
html:not([data-alx-theme="dark"]) body.alx-crm-page #leadDetail .alx-intake-field strong,
body.alx-crm-page:not(.alx-dark) #leadDetail .alx-intake-field strong { color: #163d68; }
html:not([data-alx-theme="dark"]) body.alx-crm-page #leadDetail .alx-intake-field,
body.alx-crm-page:not(.alx-dark) #leadDetail .alx-intake-field {
  background: rgba(255,255,255,.75);border-color:#d4e5f8;
}
html:not([data-alx-theme="dark"]) body.alx-crm-page #leadDetail .alx-intake-field span,
body.alx-crm-page:not(.alx-dark) #leadDetail .alx-intake-field span,
html:not([data-alx-theme="dark"]) body.alx-crm-page #leadDetail .alx-intake-heading small,
body.alx-crm-page:not(.alx-dark) #leadDetail .alx-intake-heading small { color: #58799e; }
html:not([data-alx-theme="dark"]) body.alx-crm-page #leadDetail .alx-intake-message p,
body.alx-crm-page:not(.alx-dark) #leadDetail .alx-intake-message p { color: #2d4a6b; }
@media(max-width:980px){
  body.alx-crm-page #leadDetail .alx-intake-fields {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:500px){
  body.alx-crm-page #leadDetail .alx-intake-panel {padding:12px;}
  body.alx-crm-page #leadDetail .alx-intake-fields {grid-template-columns:1fr;}
}


/* ALX CRM v4.3.44 - compact card-based lead detail layout */
body.alx-crm-page #leadDetail .alx-detail-top-grid{display:grid;grid-template-columns:minmax(300px,.92fr) minmax(430px,1.08fr);gap:12px;align-items:stretch;margin-bottom:10px}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity,
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel{margin:0!important;min-height:100%}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity{padding:12px 14px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity .lead-avatar{width:52px!important;height:52px!important;min-width:52px!important;font-size:19px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity h2{font-size:17px!important;margin-bottom:4px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity .contact-lines{gap:6px!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity .contact-lines>*{display:inline-flex!important;align-items:center!important;gap:4px!important;padding:4px 8px!important;border-radius:999px!important;background:rgba(90,124,184,.12)!important;border:1px solid rgba(97,148,214,.18)!important;font-size:10px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity .detail-top-actions{display:flex!important;gap:8px!important;align-items:flex-start!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity .detail-top-actions button{height:34px!important;padding:0 12px!important;font-size:10px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel{grid-column:auto!important;padding:12px 14px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-heading{margin-bottom:8px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-heading strong{font-size:12px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-heading small{font-size:9px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-field{padding:9px 10px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-field strong{font-size:12px!important;line-height:1.35!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-message{margin-top:8px!important;padding-top:8px!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-message p{font-size:10.5px!important;line-height:1.45!important}
body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-disclaimer{font-size:9px!important;margin-top:6px!important}
body.alx-crm-page #leadDetail .alx-detail-stats-grid{margin:0 0 10px!important}
body.alx-crm-page #leadDetail .alx-detail-stats-grid .lead-workbar{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important;padding:8px!important;min-height:auto!important}
body.alx-crm-page #leadDetail .alx-detail-stats-grid .kpi-card,
body.alx-crm-page #leadDetail .alx-detail-stats-grid .workbar-call,
body.alx-crm-page #leadDetail .alx-detail-stats-grid .workbar-appt{min-height:54px!important;height:54px!important}
body.alx-crm-page #leadDetail .alx-detail-middle-grid,body.alx-crm-page #leadDetail .alx-detail-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:0 0 10px}
body.alx-crm-page #leadDetail .alx-detail-middle-grid{margin-bottom:10px}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid{align-items:start}
body.alx-crm-page #leadDetail .alx-detail-middle-grid>.alx-ref-result,
body.alx-crm-page #leadDetail .alx-detail-middle-grid>.alx-ref-general,
body.alx-crm-page #leadDetail .alx-detail-bottom-grid>.alx-ref-note,
body.alx-crm-page #leadDetail .alx-detail-bottom-grid>.alx-ref-extra{margin:0!important;min-width:0}
body.alx-crm-page #leadDetail .alx-detail-middle-grid .call-result-panel,
body.alx-crm-page #leadDetail .alx-detail-middle-grid .alx-ref-general,
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .section,
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .alx-ref-extra{min-height:100%}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .timeline{max-height:420px;overflow:auto;padding-right:4px}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .section-title{margin-bottom:8px!important}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .note-box textarea{min-height:150px!important}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .timeline-item{padding:8px 10px!important}
body.alx-crm-page #leadDetail .alx-ref-shell{display:block!important}
@media (max-width:1180px){
  body.alx-crm-page #leadDetail .alx-detail-top-grid{grid-template-columns:1fr!important}
  body.alx-crm-page #leadDetail .alx-detail-middle-grid,body.alx-crm-page #leadDetail .alx-detail-bottom-grid{grid-template-columns:1fr!important}
  body.alx-crm-page #leadDetail .alx-detail-stats-grid .lead-workbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:760px){
  body.alx-crm-page #leadDetail .alx-detail-stats-grid .lead-workbar{grid-template-columns:1fr!important}
  body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-intake-panel .alx-intake-fields{grid-template-columns:1fr!important}
  body.alx-crm-page #leadDetail .alx-detail-top-grid>.alx-ref-identity .contact-lines{display:grid!important;grid-template-columns:1fr!important}
}

/* ALX CRM v4.3.45 — professional compact Customer 360 card system.
   Works only in the lead detail view. Calling, notes and assignment logic unchanged. */
body.alx-crm-page #leadDetail .alx-reference-detail {
  padding: 9px 12px 14px !important;
}
body.alx-crm-page #leadDetail .alx-ref-shell {
  gap: 9px !important;
}
body.alx-crm-page #leadDetail .alx-detail-top-grid {
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr) !important;
  gap: 10px !important;
  margin: 0 0 9px !important;
  align-items: stretch !important;
}
/* The old CRM styles used a three-column grid inside a narrow customer card.
   Reset that layout explicitly; do not inherit avatar / name / button columns. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-top-grid > .alx-ref-identity.alx-profile-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  grid-template-columns: none !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
  padding: 13px 15px 12px !important;
  gap: 0 !important;
  border-radius: 13px !important;
  background: linear-gradient(138deg, #172e55 0%, #172342 73%, #202849 100%) !important;
  border: 1px solid rgba(111, 157, 230, .32) !important;
  box-shadow: inset 0 1px 0 rgba(207, 228, 255, .05) !important;
  position: relative !important;
  overflow: hidden !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg,#56b6fc,#7469f0 55%,transparent 95%);
}
body.alx-crm-page #leadDetail .alx-profile-overline {
  display: flex; align-items: center; gap: 7px;
  color: #9ab9e8; text-transform: uppercase; letter-spacing: .105em;
  font-size: 9px; font-weight: 800; line-height: 1.3;
  margin-bottom: 12px;
}
body.alx-crm-page #leadDetail .alx-profile-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px;
  background: #54d6b0; box-shadow: 0 0 0 3px rgba(84,214,176,.11);
}
body.alx-crm-page #leadDetail .alx-profile-body {
  display: grid !important;
  grid-template-columns: 52px minmax(0,1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  min-width: 0 !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-body > .lead-avatar {
  width: 50px !important; height: 50px !important; min-width: 50px !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  font-size: 17px !important; border-radius: 13px !important;
  background: linear-gradient(140deg,#337ce0,#5952c9) !important;
  border: 1px solid rgba(181, 215, 255, .32) !important;
  color: #fff !important; box-shadow: none !important;
  position: static !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-body > .identity-main {
  display: flex !important; flex-direction: column !important;
  gap: 7px !important; min-width: 0 !important;
  align-items: flex-start !important; justify-content: center !important;
  padding: 0 !important; margin: 0 !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-body .identity-main h2 {
  font-size: 18px !important; line-height: 1.2 !important;
  letter-spacing: -.02em !important; font-weight: 800 !important;
  margin: 0 !important; padding: 0 !important;
  color: #f4f8ff !important;
  word-break: break-word;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-body .contact-lines {
  display: flex !important; flex-wrap: wrap !important;
  align-items: center !important; gap: 5px 8px !important;
  margin: 0 !important; min-width: 0 !important; max-width: 100% !important;
  font-size: 10px !important; color:#b9cfee !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-body .contact-lines > * {
  border: 0 !important; margin: 0 !important; padding: 0 !important;
  display: inline-flex !important; align-items: center !important;
  color: #b9cfee !important;
  font-size: 10px !important; line-height: 1.45 !important;
  background: transparent !important;
  max-width: 100%; overflow-wrap: anywhere;
}
body.alx-crm-page #leadDetail .alx-profile-phone-row {
  display:inline-flex !important; align-items: center !important;
  border: 1px solid rgba(115,160,231,.28) !important;
  border-radius: 9px !important; background:rgba(10,27,54,.51) !important;
  padding: 2px 2px 2px 8px !important; gap: 6px !important;
  max-width:100% !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-phone-row #detailPhone {
  padding: 2px 0 !important; margin: 0 !important;
  white-space: nowrap !important; color: #e7f1ff !important;
  font-size: 10px !important; text-decoration: none !important;
  border: 0 !important; min-width: 0 !important;
}
body.alx-crm-page #leadDetail .alx-profile-phone-row #detailPhone:hover {
  color: #92c9ff !important;
}
body.alx-crm-page #leadDetail .alx-profile-copy {
  display: inline-grid !important; place-items:center !important;
  flex: 0 0 27px !important; width:27px !important; height:27px !important;
  padding:0 !important; margin:0 !important; border-radius:7px !important;
  border: 1px solid rgba(114,170,249,.4) !important;
  background: linear-gradient(155deg, #284f8e,#1c3a69) !important;
  color: #d9ebff !important; cursor: pointer !important;
  transition: background .13s ease,border-color .13s ease,transform .13s ease !important;
}
body.alx-crm-page #leadDetail .alx-profile-copy svg {width: 14px; height:14px; display:block;pointer-events:none;}
body.alx-crm-page #leadDetail .alx-profile-copy:is(:hover,:focus-visible) {
  border-color: #9cd0ff !important; background: #3567aa !important;
  transform:translateY(-1px);
  outline-offset: 2px;
}
body.alx-crm-page #leadDetail .alx-profile-copy.is-copied {
  background:#167a60 !important; border-color:#68dab0 !important; color:white !important;
}
body.alx-crm-page #leadDetail .alx-profile-footer {
  display: flex !important; justify-content:flex-end !important;
  align-items:center !important;
  min-height: 32px !important;
  border-top:1px solid rgba(149,181,231,.14) !important;
  margin-top:auto !important; padding-top: 9px !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-footer > .detail-top-actions {
  display: flex !important; align-items:center !important; justify-content:flex-end !important;
  flex-wrap:wrap !important; gap:7px !important;
  width:100% !important; margin:0 !important; padding:0 !important;
  position:static !important; align-self:center !important;
}
body.alx-crm-page #leadDetail .alx-profile-footer :is(.alxmail-open,#deleteLeadBtn) {
  font-size: 10px !important; height:31px !important;
  min-height:31px !important; line-height: 1 !important;
  padding:0 12px !important; border-radius:8px !important;
  white-space:nowrap !important;
}
body.alx-crm-page #leadDetail .alx-profile-footer .alxmail-open {
  background: linear-gradient(125deg,#2567b3,#514fc4) !important;
  color:#fff !important; border:1px solid rgba(135,174,244,.45) !important;
  box-shadow:none !important;
}
body.alx-crm-page #leadDetail .alx-profile-footer #deleteLeadBtn {
  background:rgba(117,36,45,.17) !important;
  border: 1px solid rgba(217,107,113,.4) !important;
  color:#f8b4b4 !important; box-shadow:none !important;
}
/* Right-hand application card uses the same visual rhythm, without oversized filler. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-top-grid > .alx-intake-panel {
  padding: 12px 14px !important; min-height:0 !important; border-radius:13px !important;
  background:linear-gradient(138deg,#112948,#10213b) !important;
  border:1px solid rgba(101,154,225,.29) !important; box-shadow:none !important;
}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-heading {margin-bottom:7px !important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-fields {gap:6px !important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-field {
  padding:7px 9px !important; border-radius:8px !important;
  background:rgba(66,110,174,.14) !important;
}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-field span {font-size:9px !important;margin-bottom:3px !important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-field strong {font-size:11px !important;line-height:1.3 !important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-message {padding-top:6px !important;margin-top:6px !important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-message span {margin-bottom:3px !important;font-size:9px !important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-message p {font-size:10px !important;line-height:1.4 !important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-disclaimer {display:none !important;}
body.alx-crm-page #leadDetail .alx-detail-stats-grid .lead-workbar {margin-bottom:0 !important;gap:7px !important;padding:7px !important;}
body.alx-crm-page #leadDetail .alx-detail-middle-grid,
body.alx-crm-page #leadDetail .alx-detail-bottom-grid {gap:10px !important;}
body.alx-crm-page #leadDetail .alx-detail-middle-grid > :is(.alx-ref-result,.alx-ref-general),
body.alx-crm-page #leadDetail .alx-detail-bottom-grid > :is(.alx-ref-note,.alx-ref-extra) {
  border-radius:12px !important; border:1px solid rgba(95,151,222,.29) !important;
  box-shadow:none !important;
}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .timeline {max-height:310px !important;scrollbar-width:thin;}
/* Preserve the existing stacked layout on tablets and narrow RDP windows. */
@media (max-width:1180px) {
  body.alx-crm-page #leadDetail .alx-detail-top-grid {grid-template-columns:1fr !important;}
  body.alx-crm-page #leadDetail .alx-profile-footer {margin-top:12px !important;}
}
@media (max-width:700px) {
  body.alx-crm-page #leadDetail .alx-profile-body {grid-template-columns:42px minmax(0,1fr) !important;gap:9px !important;}
  body.alx-crm-page #leadDetail .alx-profile-body > .lead-avatar {width:42px !important;height:42px !important;min-width:42px !important;}
  body.alx-crm-page #leadDetail .alx-profile-overline {margin-bottom:10px !important;}
}
/* Light UI remains legible without dark-only backgrounds. */
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-detail-top-grid > .alx-ref-identity.alx-profile-card {
  background:linear-gradient(130deg,#f3f8ff,#e9f1fc) !important;
  border-color:#c7d8ef !important;box-shadow:none !important;
}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-profile-body .identity-main h2 {color:#17365c !important;}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-profile-body .contact-lines > * {color:#3b5a80 !important;}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-profile-phone-row {background:#e5f0ff !important;border-color:#bed4f1 !important;}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-profile-phone-row #detailPhone {color:#174574 !important;}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-detail-top-grid > .alx-intake-panel {background:linear-gradient(135deg,#f3f8ff,#eaf3ff) !important;border-color:#c6dbee !important;}

html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-detail-top-grid .alx-intake-field {
  background:rgba(255,255,255,.72) !important;
  border-color:rgba(142,180,222,.44) !important;
}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-profile-overline {color:#5a779b !important;}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-profile-footer {border-color:#cfdcf0 !important;}


/* ALX CRM v4.3.46 — slim lead 360, no redundant combined result form.
   Only the Lead Detail view is affected; SIP and data operations are untouched. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-top-grid {
  gap: 10px !important; margin-bottom: 8px !important;
  align-items: stretch !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-top-grid > .alx-ref-identity.alx-profile-card {
  padding: 10px 13px !important;
  min-height: 0 !important;
  justify-content: flex-start !important;
}
body.alx-crm-page #leadDetail .alx-profile-overline {
  margin-bottom: 7px !important;
  font-size: 9px !important;
}
body.alx-crm-page #leadDetail .alx-profile-body {
  gap: 9px !important;
}
body.alx-crm-page #leadDetail .alx-profile-body > .identity-main {
  gap: 5px !important;
}
body.alx-crm-page #leadDetail .alx-profile-footer {
  margin-top: 9px !important;
  padding-top: 7px !important;
  min-height: 28px !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-footer > .detail-top-actions {
  gap: 6px !important;
}
body.alx-crm-page #leadDetail .alx-profile-footer :is(.alxmail-open,#deleteLeadBtn) {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
}
/* Application information stays next to the customer card but uses less vertical space. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-top-grid > .alx-intake-panel {
  padding: 10px 12px !important;
}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-heading {
  margin-bottom: 5px !important;
}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-field {
  padding: 6px 8px !important;
}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-message {
  margin-top: 5px !important;
  padding-top: 5px !important;
}
/* General settings is now the only editing panel in this row, taking full width. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-middle-grid {
  display:block !important;
  width: 100% !important;
  margin: 0 0 9px !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-middle-grid > .alx-ref-general {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 10px 13px !important;
  border-radius: 12px !important;
}
body.alx-crm-page #leadDetail .alx-ref-general-head {
  margin-bottom: 7px !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-general-row {
  display:grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}
body.alx-crm-page #leadDetail .alx-ref-general-row .alx-ref-field {
  min-width:0 !important;
}
body.alx-crm-page #leadDetail .alx-ref-general-row .alx-ref-field select,
body.alx-crm-page #leadDetail .alx-ref-general-row .alx-ref-field button {
  height: 34px !important;
  min-height: 34px !important;
  width:100% !important;
  font-size: 11px !important;
}
/* Not panel: less filler, keep the independent note save button. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-bottom-grid {
  align-items:stretch !important;
  gap: 10px !important;
}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid > .alx-ref-note {
  padding: 10px 12px !important;
  border-radius: 12px !important;
}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .alx-ref-note .section-title {
  font-size: 13px !important;
  line-height: 1.25 !important;
  margin: 0 0 8px !important;
}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .alx-ref-note textarea {
  min-height: 85px !important;
  height: 85px !important;
  max-height: 180px !important;
  resize:vertical !important;
  padding: 9px 10px !important;
  font-size: 11px !important;
}
body.alx-crm-page #leadDetail .alx-detail-bottom-grid .alx-ref-note .primary {
  min-height: 32px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
}
/* History title is inside its card (not on/over the border). Scroll only its events. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-bottom-grid > .alx-ref-extra:has(.alx-ref-history) {
  padding: 10px 12px !important;
  margin: 0 !important;
  overflow: hidden !important;
  min-height: 0 !important;
  border-radius: 12px !important;
}
body.alx-crm-page #leadDetail .alx-ref-history {
  display:block !important;
  margin:0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history > .alx-history-title {
  display:block !important;
  position:static !important;
  inset:auto !important;
  margin:0 0 9px !important;
  padding:0 0 9px !important;
  border-bottom: 1px solid rgba(119,166,232,.2) !important;
  background:transparent !important;
  color:#eaf3ff !important;
  font-size: 13px !important;
  font-weight:800 !important;
  line-height:1.3 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  white-space:normal !important;
}
body.alx-crm-page #leadDetail .alx-ref-history > .alx-history-title::before {
  content: '▤';
  display:inline-block;
  margin-right:7px;
  color:#89baff;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .timeline {
  display:block !important;
  width:100% !important;
  max-height: 300px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  margin:0 !important;
  padding:0 5px 0 0 !important;
  scrollbar-width:thin;
  scrollbar-color:#365d93 transparent;
}
body.alx-crm-page #leadDetail .alx-ref-history .timeline-item {
  width:100% !important;
  padding: 7px 9px !important;
  margin: 0 0 6px !important;
  font-size: 11px !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-bottom-grid > .alx-ref-extra:not(:has(.alx-ref-history)) {
  padding: 10px 12px !important;
}
html:not([data-alx-theme="dark"]) body.alx-crm-page:not(.alx-dark) #leadDetail .alx-ref-history > .alx-history-title {
  color: #17395f !important;
  border-bottom-color:#d6e4f6 !important;
}
@media(max-width:1180px){
  body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-general-row {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:700px){
  body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-general-row {
    grid-template-columns: 1fr !important;
  }
}

/* ALX CRM v4.3.47 — readable and editable Customer 360 timeline. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-top-grid > .alx-ref-identity.alx-profile-card {
  padding:11px 14px 10px !important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-profile-overline {margin-bottom:6px!important;}
body.alx-crm-page #leadDetail .alx-profile-footer {padding-top:7px!important;margin-top:10px!important;}
body.alx-crm-page #leadDetail .alx-detail-top-grid .alx-intake-heading small {opacity:.8;}
/* KPI text was nearly illegible at 8.5px even on desktop. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-stats-grid .kpi-card span {
  font-size:10.5px !important;line-height:1.3!important;letter-spacing:0!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-stats-grid .kpi-card strong {
  font-size:13px !important;line-height:1.25!important;margin-top:3px!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-detail-stats-grid .lead-workbar {gap:7px!important;}
/* Keep the note-save action always visible above the editor, even when the
   history card on the right is scrolled. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-note-editor-toolbar {
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:12px!important;margin:0 0 8px!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-note-editor-toolbar .section-title {
  margin:0!important;padding:0!important;min-width:0!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-note-editor-toolbar #saveNote {
  margin:0!important;min-height:31px!important;height:31px!important;
  padding:0 13px!important;white-space:nowrap!important;flex:none;
  border-radius:8px!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-note #noteText {
  min-height:96px!important;height:96px!important;line-height:1.5!important;
  padding:10px 11px!important;
}
/* Actual mixed timeline is newest first; every item receives its own
   admin-only remove control without making the content unreadable. */
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .timeline {
  max-height:370px!important;scrollbar-width:thin!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-history-event {
  display:flex!important;align-items:flex-start!important;justify-content:space-between!important;
  gap:10px!important;padding:9px 10px!important;border-radius:10px!important;
  min-height:0!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-history-event-main {
  display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;overflow-wrap:anywhere;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-history-type {
  color:#90b7ef!important;font-size:10px!important;font-weight:750!important;
  line-height:1.2!important;letter-spacing:.015em!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-history-event-main strong {
  margin:0!important;line-height:1.4!important;font-size:11px!important;
  max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-history-event-main small {
  font-size:10px!important;line-height:1.3!important;color:#97b2d4!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-timeline-remove {
  flex:0 0 auto!important;align-self:flex-start!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  height:28px!important;min-height:28px!important;padding:0 10px!important;
  border:1px solid rgba(231,103,122,.4)!important;border-radius:8px!important;
  background:rgba(136,42,62,.21)!important;color:#ffc4d0!important;
  font-size:11px!important;font-weight:700!important;cursor:pointer!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-timeline-remove:is(:hover,:focus-visible) {
  background:rgba(184,42,65,.35)!important;border-color:#ed889d!important;
  outline-offset:2px!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .alx-timeline-remove:disabled {
  opacity:.5!important;cursor:wait!important;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-history-empty {
  color:#99b6d9;font-size:11px;padding:14px;text-align:center;
}
body.alx-crm-page #viewLeadDetail #leadDetail .alx-history-footnote {
  margin:7px 0 0;font-size:10px;color:#90a9ca;line-height:1.4;
}
@media(max-width:700px){
  body.alx-crm-page #viewLeadDetail #leadDetail .alx-ref-history .timeline{max-height:300px!important;}
  body.alx-crm-page #viewLeadDetail #leadDetail .alx-note-editor-toolbar {gap:8px!important;}
  body.alx-crm-page #viewLeadDetail #leadDetail .alx-note-editor-toolbar #saveNote {padding:0 9px!important;}
}
