.crm360-nav{display:flex;gap:7px;overflow:auto;padding:4px 0 14px;scrollbar-width:thin}.crm360-nav button{min-height:44px;white-space:nowrap;border:1px solid #d7e2e8;border-radius:12px;background:#fff;color:#425e70;padding:9px 14px;font-weight:850}.crm360-nav button.on{background:#173957;color:#fff}.crm360-panel{display:none}.crm360-panel.on{display:block}.crm360-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.crm360-overview article,.crm360-tool-card{border:1px solid #dce5ea;border-radius:16px;background:#fff;padding:16px}.crm360-overview b{display:block;font-size:25px;color:#173957;margin-top:5px}.crm360-tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.crm360-tool-card h3,.crm360-tool-card p{margin:0}.crm360-tool-card p{margin-top:6px;color:#657987;line-height:1.4}.crm360-empty{padding:30px;text-align:center;color:#6a7d89}.crm360-sheet{width:min(1120px,96vw);height:min(860px,94dvh);border:0;border-radius:24px;padding:0;box-shadow:0 25px 80px #102b3f44}.crm360-sheet::backdrop{background:#102b3f80}.crm360-shell{height:100%;display:grid;grid-template-rows:auto auto 1fr;background:#f5f8fa;color:#173145}.crm360-head{display:flex;gap:14px;align-items:center;padding:20px 22px;background:linear-gradient(135deg,#173957,#2f7eb0);color:#fff}.crm360-avatar{width:54px;height:54px;border-radius:16px;background:#ffffff22;display:grid;place-items:center;font-size:23px;font-weight:900}.crm360-head div{min-width:0;flex:1}.crm360-head h2,.crm360-head p{margin:0}.crm360-head p{margin-top:4px;color:#dcecf6}.crm360-close{width:44px;height:44px;border:0;border-radius:50%;background:#ffffff22;color:#fff;font-size:22px}.crm360-tabs{display:flex;gap:6px;padding:10px 16px;overflow:auto;background:#fff;border-bottom:1px solid #dbe4e9}.crm360-tabs button{min-height:42px;border:0;border-radius:10px;background:#eef3f6;color:#456173;padding:8px 13px;font-weight:800;white-space:nowrap}.crm360-tabs button.on{background:#173957;color:#fff}.crm360-body{overflow:auto;padding:18px}.crm360-view{display:none}.crm360-view.on{display:block}.crm360-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.crm360-kpis article,.crm360-section{border:1px solid #dbe5ea;border-radius:15px;background:#fff;padding:14px}.crm360-kpis small,.crm360-kpis b{display:block}.crm360-kpis b{font-size:20px;margin-top:4px}.crm360-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:12px;margin-top:12px}.crm360-section h3{margin:0 0 10px}.crm360-data{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.crm360-data div{background:#f4f7f9;border-radius:10px;padding:9px;min-width:0}.crm360-data small,.crm360-data b{display:block}.crm360-data b{overflow-wrap:anywhere;margin-top:3px}.crm360-pill{display:inline-flex;padding:6px 9px;border-radius:999px;background:#e7f1f7;color:#245d80;font-weight:850;margin:2px}.crm360-alert{padding:12px;border-radius:12px;background:#fff3d7;color:#795a16}.crm360-list{display:grid;gap:8px}.crm360-row{display:grid;grid-template-columns:minmax(110px,.7fr) minmax(0,1.8fr) auto;gap:10px;align-items:center;border:1px solid #e1e8ec;border-radius:11px;padding:10px;background:#fff}.crm360-row small{color:#6d7e89}.crm360-row strong{text-align:right}.crm360-editor{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.crm360-editor label{display:grid;gap:5px;font-weight:800;color:#526b7b}.crm360-editor input,.crm360-editor textarea,.crm360-editor select{width:100%;min-height:44px;border:1px solid #cad8e0;border-radius:10px;padding:9px;background:#fff;font:inherit}.crm360-editor .wide{grid-column:1/-1}.crm360-address{grid-column:1/-1;border:1px solid #dbe5ea;border-radius:14px;padding:12px;background:#f7fafb}.crm360-address-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.crm360-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.crm360-actions button{min-height:44px;border:0;border-radius:11px;padding:9px 14px;background:#173957;color:#fff;font-weight:850}.crm360-actions .secondary{background:#eaf1f5;color:#31586f}.crm360-actions .danger{background:#a93636}.crm360-segment-form{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;align-items:end}.crm360-channel-off{color:#a16a19}.crmcard .crmbadges:after{content:'CRM 360°';padding:4px 7px;border-radius:11px;background:#e7eff8;color:#2f668b;font-size:8px;font-weight:900}
@media(max-width:1050px){.crm360-overview{grid-template-columns:repeat(2,1fr)}.crm360-tool-grid{grid-template-columns:repeat(2,1fr)}.crm360-kpis{grid-template-columns:repeat(3,1fr)}.crm360-layout{grid-template-columns:1fr}.crm360-editor{grid-template-columns:repeat(2,1fr)}.crm360-address-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.crm360-sheet{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0}.crm360-overview,.crm360-tool-grid,.crm360-kpis{grid-template-columns:1fr 1fr}.crm360-editor,.crm360-address-grid{grid-template-columns:1fr}.crm360-editor .wide{grid-column:auto}.crm360-row{grid-template-columns:1fr}.crm360-row strong{text-align:left}.crm360-body{padding:12px}}


@media (max-width: 1050px) {
  .crm360-segment-form{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;width:100%;box-sizing:border-box}
  .crm360-segment-form>.wide{grid-column:1/-1}
}
@media (max-width:700px) {
  .crm360-segment-form{grid-template-columns:minmax(0,1fr)}
  .crm360-segment-form > *{min-width:0;max-width:100%;box-sizing:border-box}
  .crm360-segment-form :is(input,select,textarea,fieldset){min-width:0;max-width:100%;box-sizing:border-box}
  #clienti .crmgrid{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}
  #clienti .crmcard{box-sizing:border-box;min-width:0;max-width:100%;width:100%}
  #blog{box-sizing:border-box;min-width:0;max-width:100%}
  #blog .blog-admin-toolbar{flex-wrap:wrap;min-width:0}
  #blog :is(input,select,textarea,button){max-width:100%;box-sizing:border-box}
}
@media(max-width:700px){
  #clienti>.top,#blog>.top{display:flex;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%;box-sizing:border-box;align-items:flex-start}
  #clienti>.top>*,#blog>.top>*{min-width:0;max-width:100%;flex-shrink:1}
  #clienti>.top button,#blog>.top button{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%;box-sizing:border-box}
}

/* QA 18.70: responsive CRM automation and nested segment rules */
@media (max-width:1050px){
  #clienti [data-auto-form].crm360-segment-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0;max-width:100%;box-sizing:border-box}
  #clienti [data-auto-form] .wide{grid-column:1/-1;min-width:0;max-width:100%;box-sizing:border-box}
  #clienti [data-auto-form] :is(fieldset,select,input,textarea,[data-auto-steps],[data-auto-step]){min-width:0;max-width:100%;box-sizing:border-box}
  #clienti [data-auto-form] :is(fieldset,[data-auto-step]){width:100%}
}
@media (max-width:700px){
  #clienti [data-auto-form].crm360-segment-form{grid-template-columns:minmax(0,1fr)!important}
  #clienti [data-crm360-panel="segments"],#clienti [data-crm360-panel="segments"] .crm360-section,
  #clienti [data-rule-tree],#clienti .crm360-rule-group,#clienti .crm360-rule-group>div,
  #clienti .crm360-rule,#clienti .crm360-segment-actions{min-width:0;max-width:100%;box-sizing:border-box}
  #clienti .crm360-rule-group,#clienti .crm360-rule-group>div,#clienti .crm360-rule{width:100%}
  #clienti .crm360-rule :is(input,select),#clienti .crm360-rule-group>select{min-width:0;max-width:100%;box-sizing:border-box;width:100%}
  #clienti .crm360-segment-actions{display:flex;flex-wrap:wrap;gap:8px}
  #clienti .crm360-segment-actions button{max-width:100%;min-width:0;white-space:normal}
}

/* Segmenti CRM: pannello marketing separato da #clienti */
@media (max-width:700px){
  [data-crm360-panel="segments"] [data-rule-tree],
  [data-crm360-panel="segments"] .crm360-rule-group,
  [data-crm360-panel="segments"] .crm360-rule-group>div,
  [data-crm360-panel="segments"] .crm360-rule,
  [data-crm360-panel="segments"] .crm360-segment-actions{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  [data-crm360-panel="segments"] .crm360-rule-group{width:calc(100% - 4px)!important}
  [data-crm360-panel="segments"] .crm360-rule-group>div{width:100%}
  [data-crm360-panel="segments"] .crm360-rule{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%}
  [data-crm360-panel="segments"] .crm360-rule :is(input,select),
  [data-crm360-panel="segments"] .crm360-rule-group>select{min-width:0!important;width:100%;max-width:100%;box-sizing:border-box}
  [data-crm360-panel="segments"] .crm360-segment-actions{display:flex;flex-wrap:wrap;gap:8px}
  [data-crm360-panel="segments"] .crm360-segment-actions button{max-width:100%;white-space:normal}
}

/* TR Suite UI/UX — existing Marketing modules only. No app state or API changes. */
#marketing .marketing-shell{
  display:grid;
  grid-template-columns:minmax(182px,210px) minmax(0,1fr);
  align-items:start;
  gap:16px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
#marketing .marketing-menu{
  display:grid;
  gap:7px;
  min-width:0;
  padding:12px;
  position:sticky;
  top:12px;
  border:1px solid #dfeaf3;
  border-radius:17px;
  background:linear-gradient(160deg,#f8fbff,#f0f6fb);
  box-shadow:0 8px 24px #1b4d7310;
}
#marketing .marketing-menu button{
  min-height:44px;
  min-width:0;
  padding:10px 12px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:#3a5973;
  font-size:13px;
  font-weight:750;
  line-height:1.25;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
  cursor:pointer;
}
#marketing .marketing-menu button:is(:hover,:focus-visible){
  background:#eaf4fc;
  border-color:#c6deed;
}
#marketing .marketing-menu button.on{
  background:linear-gradient(135deg,#194967,#286e9b);
  border-color:#286e9b;
  box-shadow:0 5px 12px #1f5e8526;
  color:#fff;
}
#marketing .marketing-workspace{
  min-width:0;
  border:1px solid #dce7f0;
  border-radius:20px;
  background:linear-gradient(145deg,#fbfdff,#f6fafe);
  padding:18px;
  box-shadow:0 12px 30px #1739570e;
}
#marketing .marketing-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  margin-bottom:17px;
  padding:0 0 14px;
  border-bottom:1px solid #e4eef5;
}
#marketing .marketing-heading>div{min-width:0}
#marketing .marketing-heading h2{
  margin:0 0 4px;
  font-size:clamp(20px,2vw,28px);
  line-height:1.2;
  color:#173957;
  letter-spacing:-.02em;
}
#marketing .marketing-heading p{
  margin:0;
  color:#597186;
  font-size:13px;
  line-height:1.45;
}
#marketing [data-marketing-refresh]{
  flex:0 0 auto;
  min-height:43px;
  padding:8px 14px;
  border:1px solid #bdd7e8;
  border-radius:12px;
  background:#eaf5fd;
  color:#235a81;
  font-weight:750;
}
#marketing [data-marketing-content]{
  min-width:0;
  max-width:100%;
}
#marketing [data-marketing-content] :is(.crm360-panel,.crm360-section,.marketing-embedded){
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}
#marketing .crm360-section{
  border:1px solid #dfe8ef;
  border-radius:17px;
  background:#fff;
  padding:17px;
  box-shadow:0 6px 19px #17395709;
}
#marketing .crm360-section>h3{
  margin-top:0;
  color:#1c496b;
  font-size:18px;
  letter-spacing:-.01em;
}
#marketing :is(.crm360-tool-card,.crm360-overview article,.crmcard,.crmkpi){
  border-radius:15px;
  box-shadow:0 7px 18px #17466a0d;
  transition:border-color .15s ease,box-shadow .15s ease;
}
#marketing :is(.crm360-tool-card,.crm360-overview article,.crmcard):hover{
  border-color:#aecce1;
  box-shadow:0 9px 21px #17466a14;
}
#marketing .crm360-tool-card:nth-child(3n+1){border-top:3px solid #2c91c9}
#marketing .crm360-tool-card:nth-child(3n+2){border-top:3px solid #24a78d}
#marketing .crm360-tool-card:nth-child(3n){border-top:3px solid #d9a24d}
#marketing .crm360-overview article:nth-child(4n+1){border-top:3px solid #288ec6}
#marketing .crm360-overview article:nth-child(4n+2){border-top:3px solid #31a891}
#marketing .crm360-overview article:nth-child(4n+3){border-top:3px solid #9b83d2}
#marketing .crm360-overview article:nth-child(4n){border-top:3px solid #dda455}
#marketing :is(.crm360-actions,.crm360-segment-actions){gap:8px}
#marketing :is(.crm360-actions,.crm360-segment-actions) button{
  border-radius:11px;
  min-height:42px;
  font-weight:750;
}
#marketing .crm360-nav{max-width:100%;min-width:0}
#marketing .crm360-segment-form,
#marketing [data-auto-form]{max-width:100%;min-width:0}
#marketing .crm360-rule-group{max-width:100%;min-width:0}
#marketing .marketing-embedded{
  padding:0;
  background:transparent;
}
#marketing .marketing-embedded>.top{
  min-height:auto;
  padding:9px 0 13px;
  margin:0 0 13px;
  border-bottom:1px solid #e7eef5;
}
#marketing :is(input,select,textarea):focus-visible,
#marketing button:focus-visible{
  outline:2px solid #398fc5;
  outline-offset:2px;
}
@media(max-width:1100px){
  #marketing .marketing-shell{grid-template-columns:minmax(0,1fr);gap:11px}
  #marketing .marketing-menu{
    position:static;
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    padding:9px;
  }
  #marketing .marketing-menu button{
    flex:1 1 142px;
    text-align:center;
    min-height:43px;
    padding:8px 10px;
  }
}
@media(max-width:700px){
  #marketing .marketing-workspace{padding:12px;border-radius:15px}
  #marketing .marketing-menu{
    flex-wrap:nowrap;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
  }
  #marketing .marketing-menu button{
    flex:0 0 auto;
    white-space:nowrap;
    min-width:112px;
  }
  #marketing .marketing-heading{align-items:flex-start;flex-wrap:wrap}
  #marketing .marketing-heading h2{font-size:21px}
  #marketing [data-marketing-refresh]{min-height:42px}
  #marketing .crm360-section{padding:12px}
  #marketing .crm360-tool-grid{grid-template-columns:minmax(0,1fr)}
  #marketing .crm360-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  #marketing :is(.crm360-tool-card,.crm360-section,.crm360-overview article){overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){
  #marketing :is(.crm360-tool-card,.crm360-overview article,.crmcard){transition:none}
}

/* Marketing automation: prevent intrinsic column widths on desktop workspaces. */
@media(min-width:1051px) and (max-width:1600px){
  #marketing [data-auto-form].crm360-segment-form{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  #marketing [data-auto-form] .wide{grid-column:1/-1;min-width:0;max-width:100%}
  #marketing [data-auto-form] :is(label,fieldset,select,input,textarea,[data-auto-steps],[data-auto-step]){
    min-width:0;max-width:100%;box-sizing:border-box;
  }
  #marketing [data-auto-form] :is(fieldset,[data-auto-step]){width:100%}
}

/* 18.73 Marketing visual alignment: Statistics is the unmodified reference.
   Scope strictly to #marketing; no new APIs, widgets, state or modules. */
#marketing .marketing-shell{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;
  width:100%!important;
  align-items:start;
  box-sizing:border-box;
}
#marketing .marketing-menu{
  display:flex!important;
  flex-wrap:wrap;
  align-items:center;
  gap:8px!important;
  position:relative!important;
  top:auto!important;
  width:100%;
  max-width:100%;
  min-width:0;
  padding:0 0 12px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  box-sizing:border-box;
}
#marketing .marketing-menu button{
  flex:0 0 auto;
  min-width:0;
  min-height:44px!important;
  padding:9px 12px!important;
  font-size:14px!important;
  font-weight:650!important;
  color:#173a58!important;
  background:linear-gradient(#fff,#ecf5ff)!important;
  border:1px solid #cddfeb!important;
  border-radius:11px!important;
  white-space:nowrap!important;
  text-align:center!important;
  box-shadow:none!important;
  line-height:1.3!important;
}
#marketing .marketing-menu button.on,
#marketing .marketing-menu button[aria-current="page"]{
  color:#fff!important;
  border-color:#1c65b4!important;
  background:linear-gradient(140deg,#368fff,#034aa7)!important;
  box-shadow:0 5px 14px #2265bc33!important;
}
#marketing .marketing-menu button:is(:hover,:focus-visible):not(.on){
  background:linear-gradient(#f6fbff,#e4f1fe)!important;
  border-color:#8dbbe5!important;
}
#marketing .marketing-workspace{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:16px!important;
  border:1px solid #dce8f5!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,#f4f9ff,#fff)!important;
  color:#163656!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}
#marketing .marketing-heading{
  min-height:56px;
  margin:0 0 14px!important;
  padding:0 0 12px!important;
  gap:12px!important;
  align-items:center!important;
  flex-wrap:wrap;
  border-bottom:1px solid #dce8f5!important;
}
#marketing .marketing-heading h2{
  font-size:clamp(21px,2vw,25px)!important;
  font-weight:780!important;
  line-height:1.2!important;
  color:#163656!important;
  letter-spacing:-.02em!important;
}
#marketing .marketing-heading p{
  font-size:13px!important;
  line-height:1.55!important;
  color:#527089!important;
}
#marketing [data-marketing-refresh]{
  min-height:44px!important;
  padding:9px 12px!important;
  background:linear-gradient(#fff,#ecf5ff)!important;
  border:1px solid #cddfeb!important;
  border-radius:11px!important;
  color:#173a58!important;
  font-size:14px!important;
  font-weight:650!important;
}
#marketing [data-marketing-content]{
  min-width:0;
  width:100%;
}
#marketing .crm360-panel{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  color:#163656;
}
#marketing .crm360-panel :is(button,select,input,textarea){
  box-sizing:border-box;
  min-width:0;
}
#marketing .crm360-panel :is(button,select,input){
  border-radius:11px;
  border-color:#cddfeb;
  font-size:14px;
}
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article){
  background:linear-gradient(145deg,#fff,#f8fbff)!important;
  border:1px solid #dce8f5!important;
  border-radius:16px!important;
  box-shadow:0 7px 20px #1739570e!important;
  color:#163656;
}
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article) h3{
  color:#173a58;
  line-height:1.28;
}
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article) p,
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article) small{
  color:#527089;
}
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article):nth-child(4n+1){
  border-top:3px solid #368fff!important;
}
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article):nth-child(4n+2){
  border-top:3px solid #31b385!important;
}
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article):nth-child(4n+3){
  border-top:3px solid #9470e5!important;
}
#marketing .crm360-panel :is(.crm360-section,.crm360-tool-card,.crm360-overview article):nth-child(4n){
  border-top:3px solid #efa928!important;
}
#marketing [data-marketing-content] :is(table,.crm360-table){
  border-spacing:0;
  border-collapse:separate;
  max-width:100%;
}
#marketing [data-marketing-content] :is(.crm360-table-wrap,.crm360-results,.crm360-table-wrapper){
  overflow-x:auto;
  max-width:100%;
}
#marketing [data-marketing-content] :is(th,td){
  border-bottom:1px solid #e5eef7;
}
#marketing [data-marketing-content] :is(th,thead){
  color:#244d70;
}
#marketing .marketing-embedded{
  width:100%;
  min-width:0;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#marketing .marketing-embedded>.top{
  min-height:0!important;
  margin:0 0 12px!important;
  padding:0 0 12px!important;
  border-bottom:1px solid #dce8f5!important;
}
#marketing .marketing-embedded>.top h1{
  font-size:clamp(20px,2vw,25px)!important;
  line-height:1.24!important;
  font-weight:750!important;
  color:#163656!important;
}
/* Explicitly isolate the Marketing h1 from inherited CRM headings. */
html#tr-management-layout body.tr-shared-page .main>#marketing.on>.top h1{
  font-size:38px!important;
  font-weight:850!important;
  letter-spacing:-1px!important;
  line-height:normal!important;
  color:#0b2b51!important;
}
@media(max-width:900px){
  #marketing .marketing-menu{
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    scrollbar-width:thin;
    overscroll-behavior-inline:contain;
    padding-bottom:11px!important;
  }
  #marketing .marketing-menu button{
    flex:0 0 auto!important;
    min-width:0!important;
    padding:9px 11px!important;
    white-space:nowrap!important;
  }
  #marketing .marketing-workspace{
    padding:12px!important;
  }
  #marketing .marketing-heading h2{
    font-size:21px!important;
  }
}
@media(max-width:500px){
  #marketing .marketing-heading{align-items:flex-start!important}
  #marketing [data-marketing-refresh]{min-height:44px!important}
  #marketing [data-marketing-content] .crm360-panel{
    min-width:0!important;
    width:100%;
  }
}
@media(prefers-reduced-motion:reduce){
  #marketing *{scroll-behavior:auto!important}
}

/* Marketing 18.73: nested Blog form widths must fit the Statistics-like workspace. */
@media(max-width:700px){
  #marketing #blog,
  #marketing #blog :is(form,fieldset,label,input,select,textarea){
    box-sizing:border-box!important;
    min-width:0!important;
    max-width:100%!important;
  }
  #marketing #blog :is(form,fieldset){
    width:100%!important;
  }
  #marketing #blog label{
    width:auto!important;
  }
}

/* 18.74 QA: remove only the duplicated CRM navigation when the legacy
   customer page is embedded inside Marketing. The original .crm360-nav DOM
   remains available outside Marketing and for internal compatibility. */
#marketing #clienti.marketing-embedded .crm360-nav{display:none!important}
#marketing #clienti.marketing-embedded>.top>div{display:none!important}
#marketing #clienti.marketing-embedded>.top{
  min-height:0!important;
  margin:0 0 10px!important;
  padding:0!important;
  border:0!important;
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px!important;
}
#marketing #clienti.marketing-embedded [data-marketing-return]{display:none!important}
#marketing #clienti.marketing-embedded>.top button:not([data-marketing-return]){
  min-height:44px!important;
  border-radius:11px!important;
}
#marketing #clienti.marketing-embedded>.module{
  margin:0!important;
  padding:0!important;
  max-width:100%!important;
  min-width:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border:0!important;
}
#marketing #clienti.marketing-embedded .crm360-panel[data-crm360-panel=customers]{
  min-width:0!important;
}
#marketing #clienti.marketing-embedded :is(.customer-kpi,.crm-kpi,.kpi){
  border-radius:16px!important;
  box-shadow:0 7px 20px #1739570e!important;
}
/* Marketing 18.74: KPI clienti ispirati ai report di Statistiche, non blocchi pieni. */
#marketing #clienti.marketing-embedded .crmhero{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0 0 15px!important;
  max-width:100%;
}
#marketing #clienti.marketing-embedded .crmhero .crmkpi{
  box-sizing:border-box!important;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  min-height:80px!important;
  padding:11px 14px!important;
  min-width:0!important;
  color:#173a58!important;
  border:1px solid #dce8f5!important;
  border-left:4px solid var(--cc,#368fff)!important;
  border-radius:15px!important;
  background:linear-gradient(145deg,#fff,#f4f9ff)!important;
  box-shadow:0 7px 20px #1739570e!important;
}
#marketing #clienti.marketing-embedded .crmhero .crmkpi small{
  margin:0!important;
  color:#527089!important;
  font-size:11px!important;
  font-weight:740!important;
  line-height:1.3!important;
  opacity:1!important;
  letter-spacing:.02em;
}
#marketing #clienti.marketing-embedded .crmhero .crmkpi b{
  margin:5px 0 0!important;
  color:#163656!important;
  font-size:clamp(19px,2vw,25px)!important;
  font-weight:830!important;
  line-height:1.12!important;
  overflow-wrap:anywhere;
}
#marketing #clienti.marketing-embedded .crmsearch{
  min-width:0!important;
  max-width:100%!important;
  margin:7px 0!important;
}
#marketing #clienti.marketing-embedded .crmsearch>div{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
#marketing #clienti.marketing-embedded .crmsearch :is(input,button){
  min-height:42px!important;
  border-radius:11px!important;
}
#marketing #clienti.marketing-embedded .crmsegments{
  display:flex;
  flex-wrap:wrap!important;
  gap:7px!important;
  overflow:visible!important;
  padding:7px 0 10px!important;
}
#marketing #clienti.marketing-embedded .crmsegments button{
  min-height:39px!important;
  border-radius:10px!important;
}
@media(max-width:1100px){
  #marketing #clienti.marketing-embedded .crmhero{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:550px){
  #marketing #clienti.marketing-embedded .crmhero{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  #marketing #clienti.marketing-embedded .crmhero .crmkpi{
    padding:9px!important;
    min-height:72px!important;
  }
  #marketing #clienti.marketing-embedded .crmhero .crmkpi b{
    font-size:18px!important;
  }
}
