/* CRM uses the workspace's theme tokens; emails themselves retain the customer's chosen brand. */
.crm-page{max-width:1320px;margin:0 auto;font-size:16px}.crm-page h2{font-size:clamp(25px,3vw,35px);line-height:1.17;letter-spacing:-1px;margin:7px 0 12px}.crm-page h3{font-size:20px;margin:0 0 12px}.crm-page p{color:var(--muted);margin:8px 0 18px}.crm-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:20px 0 24px}.crm-eyebrow{font-size:12px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted)}.crm-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:16px 0}.crm-page button{font-size:15px;min-height:44px;padding:10px 16px}.crm-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:20px 0 28px}.crm-kpis>div{border-left:3px solid var(--primary);padding:4px 18px}.crm-kpis b{display:block;font-size:34px;letter-spacing:-1px}.crm-kpis span{color:var(--muted);font-size:15px}.crm-panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:22px;min-width:0}.crm-campaigns{display:grid;gap:12px}.crm-page .crm-campaign{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;padding:20px;text-align:left;background:var(--panel);border:1px solid var(--line);border-radius:10px}.crm-campaign>span:first-child{display:grid;gap:6px}.crm-campaign strong{font-size:18px}.crm-row-count{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:14px;white-space:nowrap}.crm-row-count b{font-size:21px;color:var(--ink)}.crm-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.crm-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.crm-page label{display:grid;gap:7px;font-weight:500;margin:0 0 14px;font-size:15px}.crm-page input,.crm-page textarea,.crm-page select{font:inherit;padding:10px 12px;min-width:0;width:100%;max-width:100%;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--ink)}.crm-page input[type=color]{height:44px;padding:4px}.crm-page textarea{resize:vertical}.crm-page details{padding:16px 0;border-top:1px solid var(--line)}.crm-page summary{font-weight:650;cursor:pointer;margin-bottom:14px;min-height:30px}.crm-editor-grid{display:grid;grid-template-columns:minmax(320px,430px) minmax(0,1fr);gap:24px;align-items:start}.crm-editor .crm-panel{padding:20px}.crm-layouts{display:flex;gap:12px;margin:12px 0 24px}.crm-layouts label{flex:1;text-align:center;border:1px solid var(--line);border-radius:8px;padding:12px 4px;background:var(--bg);cursor:pointer;font-size:14px}.crm-layouts label:has(input:checked){border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}.crm-layouts input{width:auto;justify-self:center}.crm-layout-icon{font-size:27px;line-height:1}.crm-preview-wrap{min-width:0;background:var(--bg);border:1px solid var(--line);border-radius:12px;overflow:hidden}.crm-preview-bar{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;border-bottom:1px solid var(--line);font-size:12px;letter-spacing:1px}.crm-preview-bar button{padding:8px 12px;font-size:14px}.crm-preview-wrap iframe{display:block;width:100%;height:680px;border:0;background:white}.crm-preview-empty{min-height:500px;padding:70px 40px;display:flex;flex-direction:column;justify-content:center;text-align:center}.crm-preview-empty h3{font-size:28px}.crm-send-bar{padding:12px 18px 18px;border-top:1px solid var(--line)}.crm-send-bar p{font-size:14px}.crm-send-bar button{width:100%}#crm-preview-stage{padding:12px;display:flex;justify-content:center;overflow:hidden}#crm-preview-stage.phone iframe{max-width:360px}.crm-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:24px 0}.crm-metrics b{font-size:34px;display:block;line-height:1.2}.crm-metrics span{display:block;font-size:16px}.crm-metrics small,.crm-note{font-size:14px;color:var(--muted)}.crm-public{margin:0;padding:30px 16px;background:#edf2f7;color:#142b38;font:16px/1.6 Arial,sans-serif}.crm-public main{box-sizing:border-box;max-width:600px;margin:0 auto;background:white;border-top:6px solid #175c63;border-radius:10px;padding:28px}.crm-public h1{font-size:32px;line-height:1.15}.crm-public label{display:grid;gap:6px;margin:14px 0}.crm-public input,.crm-public textarea{font:inherit;border:1px solid #b6c5d0;border-radius:5px;padding:12px;width:100%;box-sizing:border-box}.crm-public button{background:#175c63;color:white;border:0;border-radius:5px;padding:14px 24px;font-size:16px;min-height:48px}.crm-honey{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
@media(min-width:1100px){.crm-editor .crm-panel{max-height:calc(100dvh - 250px);overflow:auto}.crm-preview-wrap iframe{height:620px}}
@media(max-width:1000px){.crm-editor-grid{grid-template-columns:1fr}.crm-editor .crm-panel{max-height:none}.crm-preview-empty{min-height:230px}.crm-preview-wrap iframe{height:680px}.crm-columns{grid-template-columns:1fr}.crm-top{align-items:flex-start}}
@media(max-width:600px){.crm-page{font-size:16px}.crm-top{display:block;margin:14px 0}.crm-top>.primary{width:100%}.crm-kpis{gap:8px}.crm-kpis>div{padding:4px 8px}.crm-kpis b{font-size:27px}.crm-kpis span{font-size:14px}.crm-page .crm-campaign{display:grid;gap:12px;padding:16px}.crm-row-count{white-space:normal}.crm-fields{grid-template-columns:1fr}.crm-metrics{grid-template-columns:repeat(2,1fr);gap:10px}.crm-metrics .crm-panel{padding:15px}.crm-panel{padding:16px}.crm-layouts{gap:7px}.crm-preview-bar{padding:10px}.crm-toolbar{gap:8px}.crm-toolbar button{flex:1}.crm-editor-grid{gap:16px}}

.crm-page{padding:0 20px 90px}.crm-mobile-tabs{display:none}
@media(max-width:1000px){.crm-mobile-tabs{display:flex;gap:10px;margin:0 0 16px}.crm-mobile-tabs button{flex:1;border:1px solid var(--line);border-radius:6px}.crm-editor:not(.crm-show-preview) .crm-preview-wrap{display:none}.crm-editor.crm-show-preview #crm-design{display:none}.crm-show-preview #crm-preview-tab,.crm-editor:not(.crm-show-preview) #crm-edit-tab{background:var(--primary);color:var(--on-primary)}.crm-page{padding:0 14px 110px}.crm-preview-wrap iframe{height:650px}}

.crm-segment-row{display:flex;gap:8px;align-items:center;margin:8px 0}.crm-segment-row>.crm-campaign{flex:1;min-width:0}.crm-segment-row>button:last-child{border:1px solid var(--line);border-radius:6px}

.crm-inbox{min-width:0;overflow-wrap:anywhere}.crm-inbox h3{font-size:26px}.crm-inbox .crm-toolbar{margin-top:24px}.crm-inbox p{line-height:1.6}

/* CL-06: Compact phone CRM, customer records, pipeline and campaign dialogs. */
@media(max-width:600px){
  :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer){padding:12px 14px 90px;min-width:0;overflow-wrap:anywhere;font-size:16px}
  :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer) :is(p,small,label,.small,.facts,.chip,.eyebrow,.metric span,.customer-line span,.dupe-side span,.pipe-card span,.pipe-col-head span,.crm-eyebrow,.crm-preview-bar){font-size:14px}
  :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer) :is(button,summary,label:has(input[type=checkbox])){min-height:44px;font-size:14px;white-space:normal}
  :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:44px;min-width:0;max-width:100%;font-size:16px;box-sizing:border-box}
  :is(.customers-page,.customer-detail,.pipeline-page,#customer-transfer) .page-head,.crm-page .crm-top{margin:0 0 12px}
  :is(.customers-page,.customer-detail) .customers-head{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  :is(.customers-page,.customer-detail) .customers-head>div{grid-column:1/-1}
  .customers-page .customer-toolbar{gap:8px;margin:8px 0}
  .customers-page .customers-table{font-size:14px}
  .customers-page .customers-table td::before{font-size:14px;flex:0 1 40%;overflow-wrap:anywhere}
  .customers-page .customer-who>span:last-child{min-width:0}
  .customers-page .dupe-pair{grid-template-columns:minmax(0,1fr)}
  .pipeline-page .pipe-board{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:minmax(0,1fr)}
  .pipeline-page .pipe-col{min-height:0;min-width:0}
  .pipeline-page .pipe-col-head{flex-wrap:wrap}
  .crm-page .crm-kpis{grid-template-columns:repeat(3,minmax(0,1fr));margin:12px 0}
  .crm-page :is(.crm-campaign,.crm-campaign>span,.crm-layouts label,.crm-mobile-tabs button){min-width:0;overflow-wrap:anywhere}
  .crm-page .crm-row-count,.crm-page .crm-preview-bar{flex-wrap:wrap;gap:8px}
  .crm-page .crm-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .crm-page .crm-segment-row{flex-wrap:wrap}
  .crm-page .crm-preview-empty{min-height:0;padding:16px}
  body:has(#content :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer)) #dialog-host .dialog{font-size:16px;overflow-wrap:anywhere}
  body:has(#content :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer)) #dialog-host :is(label,p,small,.facts){font-size:14px}
  body:has(#content :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer)) #dialog-host :is(button,summary,label:has(input[type=checkbox])){min-height:44px;font-size:14px;white-space:normal}
  body:has(#content :is(.crm-page,.customers-page,.customer-detail,.pipeline-page,#customer-transfer)) #dialog-host :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-width:0;max-width:100%;min-height:44px;font-size:16px}
  .crm-public{padding:12px;overflow-wrap:anywhere}.crm-public main{padding:18px}.crm-public .crm-eyebrow{font-size:14px}
  .crm-public a{display:inline-block;min-height:44px}
}
