/* Customer Mail Manager composer / UX layer */
.cmm-compose-shell{display:grid;grid-template-columns:minmax(240px,300px) minmax(0,1fr);gap:12px;align-items:start}
.cmm-compose-meta,.cmm-compose-editor{background:#fff;border:1px solid var(--cmm-border);border-radius:13px}
.cmm-compose-meta{padding:13px;position:sticky;top:0}
.cmm-compose-editor{padding:14px;min-width:0}
.cmm-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.cmm-section-title h3{margin:0!important;font-size:15px!important}.cmm-section-title .cmm-sub{font-size:10px}
.cmm-mode-switch{display:inline-flex;gap:3px;padding:3px;background:#eef2f7;border:1px solid #dbe3ee;border-radius:10px}
.cmm-mode-btn{border:0!important;background:transparent!important;box-shadow:none!important;color:#64748b!important;padding:7px 12px!important;border-radius:7px!important;font-size:11px!important;font-weight:750!important;cursor:pointer}
.cmm-mode-btn.active{background:#fff!important;color:#0f172a!important;box-shadow:0 1px 4px rgba(15,23,42,.10)!important}
.cmm-mode-panel[hidden]{display:none!important}
.cmm-normal-editor{position:relative}.cmm-normal-editor textarea{min-height:310px!important;line-height:1.55!important;font-size:13px!important}
.cmm-html-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,1fr);gap:10px;min-width:0}
.cmm-code-pane,.cmm-preview-pane{border:1px solid #dbe3ee;border-radius:11px;overflow:hidden;background:#fff;min-width:0}
.cmm-pane-head{height:36px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:10px;font-weight:750;color:#475569}
.cmm-pane-head .cmm-live-dot{display:inline-flex;align-items:center;gap:6px}.cmm-pane-head .cmm-live-dot:before{content:"";width:7px;height:7px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.12)}
.cmm-html-input{display:block;width:100%!important;height:330px!important;min-height:330px!important;max-height:330px!important;border:0!important;border-radius:0!important;padding:12px!important;resize:none!important;box-shadow:none!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace!important;font-size:11px!important;line-height:1.55!important;background:#0f172a!important;color:#dbeafe!important;tab-size:2}
.cmm-html-input:focus{box-shadow:none!important;border:0!important;outline:none!important}
.cmm-live-preview{display:block;width:100%;height:330px;border:0;background:#fff}
.cmm-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px;padding-top:9px;border-top:1px solid #edf1f5}.cmm-editor-meta{font-size:10px;color:#64748b}.cmm-editor-meta strong{color:#334155}
.cmm-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:11px}.cmm-compose-actions .cmm-actions{margin-left:auto}
.cmm-help-line{font-size:10px;line-height:1.45;color:#64748b;margin-top:5px}
.cmm-template-select-wrap{position:relative}.cmm-template-hint{margin-top:5px;font-size:9px;color:#64748b}
.cmm-recipient-card{padding:10px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;margin-bottom:10px}
.cmm-recipient-card .cmm-row{margin-bottom:8px}
.cmm-recipient-card .cmm-row:last-child{margin-bottom:0}
.cmm-campaign-layout{display:grid;grid-template-columns:minmax(240px,320px) minmax(0,1fr);gap:12px}
.cmm-templates-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:12px}
.cmm-template-list{max-height:calc(100vh - 225px);overflow:auto}
.cmm-saved-template-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px;border:1px solid #e5eaf1;border-radius:10px;margin-bottom:7px;background:#fff}
.cmm-saved-template-row:last-child{margin-bottom:0}.cmm-saved-template-row .name{font-weight:750;font-size:11px}.cmm-saved-template-row .subject{font-size:9px;color:#64748b;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmm-placeholder-bar{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.cmm-placeholder-pill{font-size:9px;padding:3px 6px;border-radius:6px;background:#eef2ff;color:#3730a3;border:1px solid #e0e7ff;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.cmm-template-brief{margin-bottom:12px;padding:11px;border:1px solid #dbe3ee;border-radius:11px;background:#f8fafc}.cmm-template-brief-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.cmm-template-brief-row input{max-width:none!important}.cmm-template-brief input[aria-invalid="true"]{border-color:#dc2626!important;box-shadow:0 0 0 1px #dc2626!important}@media(max-width:640px){.cmm-template-brief-row{grid-template-columns:1fr}.cmm-template-brief-row .cmm-btn{width:100%;justify-content:center}}
@media(min-width:1100px){
 .cmm-compose-meta{padding:10px}.cmm-compose-editor{padding:10px}.cmm-html-input,.cmm-live-preview{height:285px!important;min-height:285px!important;max-height:285px!important}.cmm-normal-editor textarea{min-height:285px!important;max-height:285px!important}.cmm-pane-head{height:30px;padding:0 8px}.cmm-mode-btn{padding:5px 9px!important;font-size:10px!important}.cmm-compose-actions{margin-top:8px}.cmm-recipient-card{padding:8px}.cmm-field{margin-bottom:8px!important}.cmm-row{gap:8px!important;margin-bottom:8px!important}
}
@media(max-width:1180px){.cmm-html-workspace{grid-template-columns:1fr}.cmm-html-input,.cmm-live-preview{height:280px!important;min-height:280px!important;max-height:280px!important}}
@media(max-width:900px){.cmm-compose-shell,.cmm-campaign-layout,.cmm-templates-layout{grid-template-columns:1fr}.cmm-compose-meta{position:static}.cmm-template-list{max-height:none}.cmm-html-workspace{grid-template-columns:1fr}.cmm-html-input,.cmm-live-preview{height:320px!important;min-height:320px!important;max-height:320px!important}}

/* v0.9.0 reliable preview + desktop/mobile device switch */
.cmm-preview-pane{display:flex;flex-direction:column}
.cmm-preview-pane .cmm-pane-head{flex:0 0 auto}
.cmm-preview-stage{position:relative;display:flex;justify-content:center;align-items:flex-start;min-height:330px;height:330px;overflow:auto;background:#e8edf4;padding:10px;box-sizing:border-box}
.cmm-live-preview{flex:0 0 auto;width:100%;height:100%;min-height:100%;border:0;background:#fff;box-shadow:0 1px 4px rgba(15,23,42,.08);transition:width .18s ease,border-radius .18s ease,box-shadow .18s ease}
.cmm-preview-pane[data-device="mobile"] .cmm-live-preview{width:390px;max-width:100%;border-radius:18px;box-shadow:0 8px 24px rgba(15,23,42,.16)}
.cmm-preview-pane[data-device="mobile"] .cmm-preview-stage{padding:12px 16px}
.cmm-preview-error{background:#fff1f2!important}
.cmm-device-switch{display:inline-flex;gap:2px;padding:2px;background:#e7edf5;border:1px solid #d7e0eb;border-radius:8px}
.cmm-device-btn{appearance:none;border:0;background:transparent;color:#64748b;font:inherit;font-size:9px;font-weight:800;line-height:1;padding:5px 7px;border-radius:6px;cursor:pointer}
.cmm-device-btn.active{background:#fff;color:#0f172a;box-shadow:0 1px 3px rgba(15,23,42,.12)}
.cmm-device-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:1px}
@media(min-width:1100px){
 .cmm-preview-stage{height:285px;min-height:285px;padding:8px}
 .cmm-live-preview{height:100%!important;min-height:100%!important;max-height:none!important}
 .cmm-preview-pane[data-device="mobile"] .cmm-live-preview{width:375px}
}
@media(max-width:1180px){
 .cmm-preview-stage{height:320px;min-height:320px}
 .cmm-live-preview{height:100%!important;min-height:100%!important;max-height:none!important}
}
@media(max-width:520px){
 .cmm-preview-pane[data-device="mobile"] .cmm-live-preview{width:100%;border-radius:12px}
 .cmm-device-btn{font-size:10px;padding:6px 8px}
}

/* v0.9.1 multi-recipient To / CC / BCC composer */
.cmm-recipient-label{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cmm-link-btn{appearance:none;border:0;background:transparent;color:#2563eb;font-size:10px;font-weight:800;padding:2px 0;cursor:pointer}
.cmm-link-btn:hover{text-decoration:underline}
.cmm-recipient-card textarea{min-height:58px!important;max-height:88px!important;resize:vertical!important;line-height:1.35!important;font-size:11px!important}
.cmm-copy-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cmm-copy-fields[hidden]{display:none!important}
.cmm-recipient-rule{font-size:9px;line-height:1.45;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:7px 8px;margin:-2px 0 9px}
.cmm-recipient-rule.marketing{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
@media(max-width:620px){.cmm-copy-fields{grid-template-columns:1fr}}

/* v0.9.3 Brevo pool provider detail */
.cmm-provider-detail{display:flex;flex-direction:column;gap:2px;margin-top:5px;padding:7px 8px;border:1px solid #dbe3ee;border-radius:8px;background:#f8fafc;font-size:9px;line-height:1.35;color:#64748b}
.cmm-provider-detail strong{font-size:10px;color:#0f172a}.cmm-provider-detail span{display:block}

/* Central Operations Suite bundled mobile table pattern. */
@media (max-width:760px){
  .cmm-responsive-table-wrap{overflow:visible!important}
  .cmm-responsive-table{min-width:0!important;width:100%!important}
  .cmm-responsive-table thead{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
  .cmm-responsive-table,.cmm-responsive-table tbody,.cmm-responsive-table tr,.cmm-responsive-table td{display:block!important;width:100%!important}
  .cmm-responsive-table tbody{display:grid!important;gap:12px!important}
  .cmm-responsive-table tbody tr{overflow:hidden;background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 8px 22px rgba(15,23,42,.06)}
  .cmm-responsive-table tbody td{display:grid!important;grid-template-columns:minmax(100px,34%) minmax(0,1fr);gap:12px;align-items:start;padding:12px 14px!important;border:0!important;border-bottom:1px solid #eef2f7!important;white-space:normal!important;overflow:visible!important}
  .cmm-responsive-table tbody td:last-child{border-bottom:0!important}
  .cmm-responsive-table tbody td:before{content:attr(data-label);color:#64748b;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;line-height:1.35}
  .cmm-responsive-table tbody td.cmm-card-full-row{display:block!important}.cmm-responsive-table tbody td.cmm-card-full-row:before{display:none}
}
