:root{--bg:#f4f7fb;--surface:#fff;--surface-2:#f8fafc;--text:#172033;--muted:#667085;--line:#e5eaf1;--nav:#0d1729;--nav-2:#16233a;--brand:#2367e8;--brand-dark:#164db7;--green:#12845b;--red:#c0392b;--amber:#b96b0c;--shadow:0 10px 30px rgba(21,33,56,.08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}
:root.dark{--bg:#0b1220;--surface:#111b2e;--surface-2:#162237;--text:#edf2fa;--muted:#a4afc1;--line:#29354a;--shadow:0 10px 30px rgba(0,0,0,.25)}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--bg)}button,input,textarea,select{font:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:250px;background:linear-gradient(180deg,var(--nav),#101c31);color:#fff;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:22px 16px;z-index:30}.brand{display:flex;align-items:center;gap:12px;padding:2px 8px 26px}.brand-mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#4c86ff,#1b56cf);font-weight:900;font-size:21px;box-shadow:0 8px 24px rgba(34,99,232,.35)}.brand strong{display:block;font-size:19px;letter-spacing:.06em}.brand span{display:block;color:#aab7ce;font-size:11px;margin-top:2px}.nav{display:grid;gap:5px}.nav-link{border:0;background:transparent;color:#b9c4d6;border-radius:10px;padding:11px 12px;text-align:left;display:flex;align-items:center;gap:12px;cursor:pointer;font-weight:650}.nav-link span{width:20px;text-align:center}.nav-link:hover,.nav-link.active{background:var(--nav-2);color:#fff}.nav-link.active{box-shadow:inset 3px 0 #4c86ff}.sidebar-foot{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding:18px 8px 0}.sidebar-foot small{display:block;color:#7f8ba0;margin-top:10px}.health{font-size:12px;color:#c8d2e2;display:flex;align-items:center;gap:8px}.health-dot{width:8px;height:8px;border-radius:50%;background:#f4a62a;box-shadow:0 0 0 4px rgba(244,166,42,.12)}.health.ok .health-dot{background:#31c48d}.health.bad .health-dot{background:#ff6b6b}.workspace{margin-left:250px;width:calc(100% - 250px);min-width:0}.topbar{height:84px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px;position:sticky;top:0;z-index:20}.topbar-title p{margin:0 0 2px;color:var(--muted);font-size:12px}.topbar-title h1{margin:0;font-size:23px}.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.global-search{width:310px;height:42px;border:1px solid var(--line);background:var(--surface-2);border-radius:12px;display:flex;align-items:center;gap:8px;padding:0 12px}.global-search input{border:0;outline:0;background:transparent;width:100%;color:var(--text)}.icon-button,.avatar{border:1px solid var(--line);background:var(--surface);color:var(--text);height:42px;min-width:42px;border-radius:11px;cursor:pointer}.avatar{background:var(--nav);color:#fff;font-weight:800}.menu-button{display:none}.content{padding:26px 28px 48px;max-width:1600px;margin:auto}.view{display:none}.view.active{display:block}.welcome-card{background:linear-gradient(120deg,#0e1a2d,#173765 62%,#2468e8);color:#fff;border-radius:18px;padding:28px 30px;display:flex;justify-content:space-between;align-items:center;box-shadow:var(--shadow);margin-bottom:20px}.welcome-card h2{margin:6px 0 7px;font-size:28px}.welcome-card p{margin:0;color:#d5e2fa}.eyebrow{font-size:10px;letter-spacing:.13em;font-weight:800;color:#6f7e93}.welcome-card .eyebrow{color:#a9c7ff}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:20px}.metric-card{background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:18px;display:flex;gap:14px;align-items:flex-start;box-shadow:var(--shadow)}.metric-icon{width:42px;height:42px;border-radius:12px;background:#edf4ff;color:var(--brand);display:grid;place-items:center;font-weight:900}.dark .metric-icon{background:#1c3155}.metric-card span{display:block;color:var(--muted);font-size:13px}.metric-card strong{display:block;font-size:28px;margin:3px 0 1px}.metric-card small{color:var(--muted)}.dashboard-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.span-2{grid-column:span 2}.panel{background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:20px;box-shadow:var(--shadow)}.panel-head,.section-toolbar,.modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.panel-head{margin-bottom:16px}.panel h3{margin:3px 0 0}.section-toolbar{margin-bottom:18px}.section-toolbar h2{margin:0 0 5px;font-size:25px}.section-toolbar p{margin:0;color:var(--muted)}.primary-button,.secondary-button,.text-button{border:0;border-radius:10px;padding:10px 15px;font-weight:750;cursor:pointer}.primary-button{background:var(--brand);color:#fff}.primary-button:hover{background:var(--brand-dark)}.secondary-button{background:var(--surface-2);border:1px solid var(--line);color:var(--text)}.text-button{background:transparent;color:var(--brand);padding:5px}.full{width:100%}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:720px}.data-table th{text-align:left;color:var(--muted);font-size:11px;letter-spacing:.05em;text-transform:uppercase;padding:10px 12px;border-bottom:1px solid var(--line)}.data-table td{padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:middle}.data-table tbody tr:hover{background:var(--surface-2)}.table-primary{font-weight:750}.table-secondary{font-size:12px;color:var(--muted);margin-top:3px}.status-pill{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;background:#eef2f7;color:#516071}.status-pill.new-lead,.status-pill.draft{background:#edf4ff;color:#215fc7}.status-pill.scheduled,.status-pill.approved,.status-pill.completed{background:#eaf8f2;color:#08734d}.status-pill.in-progress,.status-pill.sent{background:#fff5e6;color:#a15c06}.status-pill.cancelled,.status-pill.declined{background:#fff0ef;color:#b62d25}.row-actions{display:flex;gap:6px}.action-button{border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:8px;padding:6px 9px;cursor:pointer;font-size:12px}.action-button.danger{color:var(--red)}.stack-list{display:grid;gap:10px}.stack-item{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:11px}.initials{width:36px;height:36px;border-radius:10px;background:#edf4ff;color:var(--brand);display:grid;place-items:center;font-size:12px;font-weight:850}.stack-item strong{display:block}.stack-item span{display:block;color:var(--muted);font-size:12px;margin-top:2px}.megan-card{text-align:center}.megan-avatar{width:44px;height:44px;border-radius:14px;background:linear-gradient(145deg,#8b5cf6,#4f46e5);color:#fff;display:grid;place-items:center;font-weight:900;box-shadow:0 8px 20px rgba(79,70,229,.25)}.megan-card .megan-avatar{margin:8px auto 12px}.megan-card p{color:var(--muted);line-height:1.55}.ai-badge,.online-pill{font-size:10px;border-radius:999px;padding:5px 8px;font-weight:850}.ai-badge{background:#f1ecff;color:#6542cc}.online-pill{background:#eaf8f2;color:#08734d;margin-left:auto}.activity-feed{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.activity-item{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:14px}.activity-item strong{display:block;font-size:18px}.activity-item span{font-size:12px;color:var(--muted)}.filter-row{display:flex;gap:10px;margin-bottom:16px}.filter-row input{flex:1}.filter-row select{width:190px}input,textarea,select{width:100%;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:10px;padding:10px 12px;outline:none}input:focus,textarea:focus,select:focus{border-color:#7da7f8;box-shadow:0 0 0 3px rgba(35,103,232,.12)}textarea{min-height:90px;resize:vertical}.chat-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,1fr);gap:18px}.chat-panel{padding:0;overflow:hidden}.chat-head{display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line)}.chat-head strong,.chat-head span{display:block}.chat-head span{color:var(--muted);font-size:12px;margin-top:2px}.chat-thread{height:430px;overflow:auto;padding:20px;background:var(--surface-2);display:flex;flex-direction:column;gap:12px}.chat-message{max-width:78%;border-radius:14px;padding:12px 14px;line-height:1.5;white-space:pre-wrap}.chat-message.assistant{align-self:flex-start;background:var(--surface);border:1px solid var(--line)}.chat-message.user{align-self:flex-end;background:var(--brand);color:#fff}.chat-compose{display:grid;grid-template-columns:190px 1fr auto;gap:10px;padding:15px;border-top:1px solid var(--line);align-items:end}.chat-compose textarea{min-height:70px}.helper-panel{height:max-content}.prompt-chip{width:100%;text-align:left;border:1px solid var(--line);background:var(--surface-2);color:var(--text);border-radius:10px;padding:12px;margin-top:9px;cursor:pointer;line-height:1.4}.calendar-list{display:grid;gap:12px}.calendar-item{display:grid;grid-template-columns:90px 1fr auto;gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:12px}.calendar-date{font-weight:800;color:var(--brand)}.empty-state{text-align:center;padding:60px 20px}.empty-icon{font-size:40px}.empty-state p{color:var(--muted)}.settings-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.settings-grid label{font-size:12px;font-weight:750;color:var(--muted)}.settings-grid input{margin-top:6px}.settings-note{grid-column:1/-1;background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:15px}.settings-note p{margin:5px 0 0;color:var(--muted)}.modal{width:min(760px,calc(100% - 28px));max-height:90vh;border:0;border-radius:17px;padding:0;background:var(--surface);color:var(--text);box-shadow:0 30px 80px rgba(0,0,0,.28);z-index:60}.modal::backdrop{background:rgba(7,14,26,.6);backdrop-filter:blur(3px)}.modal form{padding:22px}.modal-head{border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:18px}.modal-head h2{margin:4px 0 0}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.form-grid label{font-size:12px;font-weight:750;color:var(--muted)}.form-grid input,.form-grid select,.form-grid textarea{margin-top:6px}.wide{grid-column:1/-1}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.form-message{min-height:18px;margin:12px 0 0;font-size:13px}.form-message.error{color:var(--red)}.form-message.success{color:var(--green)}.estimate-total{display:flex;justify-content:space-between;align-items:center;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:14px;margin-top:15px}.estimate-total strong{font-size:19px;color:var(--brand)}.toast{position:fixed;right:24px;bottom:24px;background:#172033;color:#fff;padding:12px 16px;border-radius:10px;box-shadow:var(--shadow);transform:translateY(20px);opacity:0;pointer-events:none;transition:.2s;z-index:90}.toast.show{transform:none;opacity:1}.toast.error{background:#9f2f28}.empty-row{text-align:center;color:var(--muted);padding:34px!important}
@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr 1fr}.span-2{grid-column:span 2}.global-search{width:240px}.chat-compose{grid-template-columns:1fr}.chat-compose select{width:100%}}
@media(max-width:820px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:none}.workspace{margin-left:0;width:100%}.menu-button{display:inline-grid;place-items:center;margin-right:12px}.topbar{padding:0 16px}.global-search{display:none}.content{padding:18px 15px 40px}.dashboard-grid,.chat-layout{grid-template-columns:1fr}.span-2{grid-column:auto}.activity-feed{grid-template-columns:1fr}.welcome-card{align-items:flex-start;gap:20px}.section-toolbar{align-items:flex-start}.settings-grid{grid-template-columns:1fr}.settings-note{grid-column:auto}}
@media(max-width:560px){.metric-grid,.form-grid{grid-template-columns:1fr}.wide{grid-column:auto}.welcome-card,.section-toolbar{flex-direction:column}.filter-row{flex-direction:column}.filter-row select{width:100%}.calendar-item{grid-template-columns:1fr}.topbar-title h1{font-size:20px}.content{padding-inline:12px}}

/* Customer Profile Update 3 */
.stack-button{width:100%;text-align:left;background:var(--surface);color:var(--text);cursor:pointer}.stack-button:hover{border-color:#9cbaf4;background:var(--surface-2)}.stack-arrow{margin-left:auto!important;font-size:22px!important;color:var(--muted)!important}.initials.small{width:34px;height:34px;flex:0 0 34px}.customer-name-button{display:flex;align-items:center;gap:10px;border:0;background:transparent;color:var(--text);padding:0;text-align:left;cursor:pointer}.customer-name-button:hover .table-primary{color:var(--brand)}.primary-action{color:var(--brand);border-color:#b8cef8;background:#f3f7ff}.dark .primary-action{background:#172a49}.profile-modal{width:min(1040px,calc(100% - 28px))}.profile-shell{padding:22px}.profile-head{margin-bottom:0}.profile-identity{display:flex;align-items:center;gap:14px}.profile-avatar{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#2367e8,#164db7);color:#fff;font-size:18px;font-weight:900;box-shadow:0 8px 22px rgba(35,103,232,.25)}.profile-head h2{font-size:24px}.profile-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.profile-content{padding:18px 0 4px}.client-summary{background:linear-gradient(120deg,#eef4ff,#f8faff);border:1px solid #d8e5ff;border-radius:13px;padding:15px 17px;margin-bottom:15px}.dark .client-summary{background:#14233e;border-color:#263e68}.client-summary p{margin:5px 0 0;line-height:1.5;font-weight:600}.profile-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:15px}.profile-metrics>div{border:1px solid var(--line);border-radius:12px;background:var(--surface-2);padding:13px}.profile-metrics span{display:block;color:var(--muted);font-size:11px}.profile-metrics strong{display:block;font-size:20px;margin-top:3px}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.profile-card{border:1px solid var(--line);border-radius:13px;padding:16px;background:var(--surface)}.profile-wide{grid-column:1/-1}.profile-section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.profile-section-head h3{margin:0;font-size:16px}.profile-section-head span{font-size:12px;color:var(--muted)}.detail-row{display:grid;grid-template-columns:92px 1fr;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}.detail-row:last-child{border-bottom:0}.detail-row span{color:var(--muted)}.detail-row strong{font-weight:650;word-break:break-word}.detail-row a{color:var(--brand);text-decoration:none}.notes-box{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:13px;min-height:142px;white-space:pre-wrap;line-height:1.55;color:var(--muted)}.timeline{display:grid;gap:10px}.timeline-item{display:grid;grid-template-columns:12px 1fr auto;gap:11px;padding:12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2)}.timeline-dot{width:9px;height:9px;border-radius:50%;background:var(--brand);margin-top:5px;box-shadow:0 0 0 4px rgba(35,103,232,.12)}.timeline-head{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.timeline-item p{margin:5px 0;color:var(--muted);font-size:13px}.timeline-item small{color:var(--muted)}.estimate-mini-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.estimate-mini{border:1px solid var(--line);border-radius:11px;padding:13px;background:var(--surface-2)}.estimate-mini>div{display:flex;justify-content:space-between;gap:10px}.estimate-mini p{font-size:18px;font-weight:800;margin:10px 0}.profile-empty{padding:22px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:10px}.profile-actions{border-top:1px solid var(--line);padding-top:16px}.profile-actions #profileMessageButton{margin-right:auto}@media(max-width:760px){.profile-metrics{grid-template-columns:repeat(2,1fr)}.profile-grid,.estimate-mini-grid{grid-template-columns:1fr}.profile-wide{grid-column:auto}.timeline-item{grid-template-columns:10px 1fr}.timeline-item>.action-button{grid-column:2}.profile-actions{flex-wrap:wrap}.profile-actions button{flex:1;min-width:130px}.profile-actions #profileMessageButton{margin-right:0}.profile-identity{align-items:flex-start}.profile-avatar{width:48px;height:48px;flex:0 0 48px}}

/* Lead Center */
.lead-layout{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px;align-items:start}
.lead-input-panel,.lead-result-panel{display:grid;gap:16px}
.lead-input-panel label{display:grid;gap:8px;font-weight:700;color:var(--text)}
.lead-input-panel input,.lead-input-panel select,.lead-input-panel textarea,.lead-reply{width:100%;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);color:var(--text);padding:13px 14px;font:inherit;box-sizing:border-box}
.lead-message{min-height:190px;resize:vertical}
.lead-actions{display:flex;gap:10px}
.lead-result{display:grid;gap:18px}
.lead-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.lead-metrics>div{padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);display:grid;gap:5px}
.lead-metrics span{font-size:.78rem;color:var(--muted)}
.lead-metrics strong{font-size:1rem}
.lead-block{padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.lead-block h4{margin:0 0 10px}
.lead-block ul{margin:0;padding-left:20px;display:grid;gap:8px;color:var(--muted)}
.lead-block-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.lead-reply{min-height:220px;resize:vertical;line-height:1.55;background:var(--surface)}
.empty-state.compact{padding:36px 20px}
@media(max-width:900px){.lead-layout{grid-template-columns:1fr}.lead-metrics{grid-template-columns:1fr}}

/* ATLAS 2.3 editable deterministic pricing */
.settings-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.settings-layout>.span-2{grid-column:1/-1}.pricing-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.pricing-form-grid label{display:grid;gap:7px;font-size:12px;font-weight:750;color:var(--muted)}.pricing-form-grid textarea{min-height:86px;resize:vertical}.checkbox-label{display:flex!important;align-items:center;gap:9px;padding-top:26px;color:var(--text)!important}.checkbox-label input{width:auto;margin:0}.pricing-actions{display:flex;justify-content:flex-end}.inline-pricing-form{display:grid;grid-template-columns:1.3fr 1fr 1fr auto;gap:10px;margin-bottom:16px}.service-pricing-form{display:grid;grid-template-columns:1.4fr 1fr repeat(5,.8fr) auto;gap:9px;margin-bottom:14px}.inline-pricing-form input,.service-pricing-form input,.pricing-form-grid input,.pricing-form-grid textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);padding:10px 11px}.pricing-filter{margin-bottom:12px}.pricing-table-wrap{max-height:430px;overflow:auto;border:1px solid var(--line);border-radius:12px}.pricing-data-table{min-width:760px}.pricing-data-table thead{position:sticky;top:0;background:var(--surface);z-index:2}.pricing-data-table td,.pricing-data-table th{padding:11px 12px}.row-actions{display:flex;gap:7px}.action-button.danger{color:var(--red)}
@media(max-width:1200px){.service-pricing-form{grid-template-columns:repeat(4,1fr)}.service-pricing-form button{grid-column:span 1}}
@media(max-width:900px){.settings-layout{grid-template-columns:1fr}.settings-layout>.span-2{grid-column:auto}.inline-pricing-form,.service-pricing-form,.pricing-form-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.inline-pricing-form,.service-pricing-form,.pricing-form-grid{grid-template-columns:1fr}.checkbox-label{padding-top:0}}

/* ATLAS mobile/PWA and integration status */
.install-app-button { white-space: nowrap; }
.integration-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.integration-card { border:1px solid var(--border); border-radius:14px; padding:14px; background:var(--surface-soft); }
.integration-card strong { display:block; margin-bottom:4px; }
.integration-card span { font-size:13px; color:var(--muted); }
.integration-state { display:inline-flex; align-items:center; gap:6px; margin-top:10px; font-weight:700; font-size:12px; }
.integration-state.ready { color:#15803d; }
.integration-state.pending { color:#b45309; }
.integration-panel code { word-break:break-all; }
@media (max-width: 760px) {
  .workspace { min-width:0; }
  .content { padding:14px 12px 92px; }
  .topbar { padding:10px 12px; }
  .topbar-actions .global-search { display:none; }
  .topbar-actions { gap:6px; }
  .install-app-button { padding:8px 10px; font-size:12px; }
  .metric-grid, .dashboard-grid, .lead-layout, .chat-layout, .settings-layout, .integration-grid { grid-template-columns:1fr; }
  .span-2 { grid-column:auto; }
  .sidebar { width:min(86vw,320px); }
  .table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .section-toolbar { align-items:flex-start; gap:10px; }
  .section-toolbar > button { width:100%; }
  .lead-actions { display:grid; grid-template-columns:1fr; }
  button, input, select, textarea { font-size:16px; }
}

/* ATLAS 3.0 unified communications */
.communications-panel{padding:0;overflow:hidden}.communications-toolbar{display:flex;justify-content:space-between;gap:14px;padding:16px;border-bottom:1px solid var(--line);background:var(--surface)}.comm-tabs{display:flex;gap:8px;flex-wrap:wrap}.comm-tab{border:1px solid var(--line);background:var(--surface-2);color:var(--text);border-radius:999px;padding:9px 14px;font-weight:800;cursor:pointer}.comm-tab.active{background:var(--brand);border-color:var(--brand);color:#fff}.comm-search-row{display:flex;gap:8px;min-width:min(430px,50%)}.communications-layout{display:grid;grid-template-columns:minmax(340px,42%) minmax(0,1fr);min-height:650px}.communications-list-wrap{border-right:1px solid var(--line);min-width:0}.communications-status{padding:12px 16px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted)}.communications-list{max-height:700px;overflow:auto}.comm-row{display:block;width:100%;border:0;border-bottom:1px solid var(--line);background:var(--surface);color:var(--text);text-align:left;padding:14px 16px;cursor:pointer}.comm-row:hover,.comm-row.active{background:var(--surface-2)}.comm-row.unread .comm-subject,.comm-row.unread .comm-sender{font-weight:900}.comm-row-top{display:flex;justify-content:space-between;gap:12px;align-items:center}.comm-sender{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.comm-date{font-size:11px;color:var(--muted);white-space:nowrap}.comm-subject{font-size:13px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.comm-snippet{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.comm-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.comm-badge{font-size:10px;font-weight:800;padding:4px 7px;border-radius:999px;background:#eef2f7;color:#516071}.comm-badge.lead{background:#e8f0ff;color:#205ec7}.comm-badge.sms{background:#eaf8f2;color:#08734d}.communications-detail{padding:20px;min-width:0;overflow:auto;max-height:740px}.comm-message-head h3{margin:4px 0 10px;font-size:22px}.comm-meta{font-size:12px;color:var(--muted);line-height:1.6;margin-bottom:14px}.comm-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.comm-email-frame{width:100%;min-height:540px;border:1px solid var(--line);border-radius:12px;background:#fff}.comm-text-body{white-space:pre-wrap;line-height:1.6;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:16px}.comm-attachments{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.comm-attachment{display:inline-flex;padding:8px 10px;border:1px solid var(--line);border-radius:8px;text-decoration:none;color:var(--brand);font-size:12px}.integration-help{font-size:12px;color:var(--muted);line-height:1.55}.communications-error{padding:18px;color:var(--red)}
@media(max-width:900px){.communications-toolbar{flex-direction:column}.comm-search-row{min-width:0;width:100%}.communications-layout{grid-template-columns:1fr;min-height:0}.communications-list-wrap{border-right:0;border-bottom:1px solid var(--line)}.communications-list{max-height:420px}.communications-detail{max-height:none}.comm-email-frame{min-height:500px}}
.secondary-button[href]{display:inline-flex;align-items:center;text-decoration:none}

/* ATLAS Lead Generator */
.lead-pipeline{display:grid;gap:12px}.lead-pipeline-card{border:1px solid var(--line);border-radius:14px;padding:15px;background:var(--surface-2)}.lead-pipeline-card.blocked{border-color:#efb4ad;background:rgba(192,57,43,.06)}.lead-pipeline-top{display:flex;justify-content:space-between;gap:12px}.lead-pipeline-top strong,.lead-pipeline-top span{display:block}.lead-pipeline-top span{font-size:12px;color:var(--muted);margin-top:3px}.lead-pipeline-card h4{margin:12px 0 6px}.lead-pipeline-card p{margin:0;color:var(--muted);line-height:1.5}.lead-pipeline-meta{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px;font-size:12px}.lead-pipeline-card.blocked .lead-pipeline-meta strong{color:var(--red)}.lead-draft{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.lead-draft small{font-weight:800}.lead-draft p{margin:6px 0 10px}.status-pill{font-size:11px;font-weight:800;border-radius:999px;background:var(--surface);border:1px solid var(--line);padding:5px 8px;height:max-content}.stack-list code{word-break:break-all}
.lead-finder-panel{margin-bottom:16px}.lead-finder-controls{display:grid;grid-template-columns:1fr 2fr 110px auto;gap:10px;align-items:end}.lead-finder-controls label{display:grid;gap:6px;font-size:12px;font-weight:800;color:var(--muted)}.lead-finder-controls input,.lead-finder-controls select{width:100%}@media(max-width:900px){.lead-finder-controls{grid-template-columns:1fr}.lead-finder-controls button{width:100%}}
.lead-source-link{display:inline-block;margin-top:9px;font-size:12px;font-weight:800;color:var(--brand);text-decoration:none}.lead-source-link:hover{text-decoration:underline}
.master-source-row{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--border)}
.master-source-row:last-child{border-bottom:0}.master-source-row p{margin:4px 0 0;color:var(--muted);font-size:13px}.master-source-row .status-pill{text-transform:capitalize;white-space:nowrap}
