#hub-view .hub-final-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid #dce5f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(23, 50, 77, 0.06);
}

#hub-view .hub-final-title {
  margin: 0;
  color: #0e2166;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.15;
}

#hub-view .hub-final-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#hub-view .hub-final-create {
  font-weight: 400 !important;
}

#hub-view .hub-final-refresh {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0 !important;
  display: inline-grid;
  place-items: center;
}

#hub-view .hub-final-refresh svg,
#hub-view .hub-final-action-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#hub-view .hub-final-tabs {
  display: flex;
  align-items: flex-end;
  min-height: 46px;
  margin: 0 0 18px;
  padding: 0 4px;
  border-bottom: 1px solid #dce5f0;
  background: transparent;
}

/* The Hub tabs share one visual contract, rather than styling only the
   original Google Ads tab. Selection is owned by the active Hub module. */
#hub-view .hub-final-tabs .hub-subnav__item {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #667085;
  font-weight: 600;
}
#hub-view .hub-final-tabs .hub-subnav__item.is-active,
#hub-view .hub-final-tabs .hub-subnav__item[aria-current="page"] {
  border-bottom-color: #1769d2;
  background: transparent;
  color: #1769d2;
}
/* Google Ads owns its action buttons; hide them on the Strategie panel. */
#hub-view[data-hub-section="check"] .hub-final-actions,
#hub-view[data-hub-section="check"] .hub-subnav__actions,
#hub-view[data-hub-section]:not([data-hub-section="ads"]) .hub-subnav__actions {
  display:none!important;
}
/* The top Hub row is shared: Google Ads buttons are specific to Ads,
   the Pay and BRT buttons are specific to their corresponding section. */
#hub-view[data-hub-section]:not([data-hub-section="ads"]) .hub-final-actions > [data-hub-refresh],
#hub-view[data-hub-section]:not([data-hub-section="ads"]) .hub-final-actions > [data-hub-new] {
  display:none!important;
}
#hub-view .hub-final-actions > .hub-convention__top-actions {display:none!important}
#hub-view[data-hub-section="pay"] .hub-final-actions > .hub-pay__top-actions,
#hub-view[data-hub-section="brt"] .hub-final-actions > .hub-brt__top-actions {
  display:flex!important;
  align-items:center;justify-content:flex-end;
  gap:8px;
}

#hub-view .hub-final-table tbody tr.hub-final-row {
  cursor: pointer;
}

#hub-view .hub-final-table tbody tr.hub-final-row:focus-visible {
  outline: 2px solid #1769d2;
  outline-offset: -2px;
}

#hub-view .hub-final-table .hub-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

#hub-view .hub-final-action-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d7e0eb;
  border-radius: 9px;
  background: #fff;
  color: #3d5268;
}

#hub-view .hub-final-action-icon:hover {
  color: #1769d2;
  border-color: #aac8ec;
  background: #f5f9ff;
}

@media (max-width: 720px) {
  #hub-view .hub-final-header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  #hub-view .hub-final-actions {
    justify-content: flex-end;
  }

  #hub-view .hub-final-table td[data-label="Azioni"] .hub-actions {
    justify-content: flex-start;
  }
}


/* Keep the compact result total aligned with the table edge. */
#hub-view .hub-state {
  text-align: right;
}


/* 1.79.4 — Consistent Hub surface with the CRM Aziende / Task layout.
   One centered white container; child sections do not add fake nested shells. */
#hub-view {background:#f3f6fb!important}
#hub-view .hub-shell {
  width:calc(100% - clamp(24px,4vw,64px))!important;
  max-width:1680px!important;
  margin:0 auto!important;
  padding:clamp(16px,2vw,26px)!important;
  border:1px solid #dce5f0!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:none!important;
}
#hub-view .hub-final-header {
  margin:0 0 14px!important;
  padding:5px 2px 16px!important;
  border:0!important;
  border-bottom:1px solid #e5edf6!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#hub-view .hub-final-tabs {
  border-color:#dfe8f3!important;
  background:transparent!important;
}
#hub-view .hub-final-tabs .hub-subnav__item {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center;
  gap:8px!important;
  font-family:"Open Sans",sans-serif!important;
  font-size:12px!important;
  font-weight:650!important;
  white-space:nowrap;
}
#hub-view .hub-final-tabs .hub-subnav__item svg {
  display:block!important;
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.85!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#hub-view .hub-google-ads,
#hub-view #hub-migliorshop-pay,
#hub-view #hub-brt,
#hub-view #check-strategie {
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
#hub-view .hub-google-ads .hub-summary article {
  border:1px solid #dfe6f0!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:none!important;
}
#hub-view .hub-google-ads .hub-summary article::after {content:none!important}
#hub-view .hub-google-ads .hub-table-wrap,
#hub-view #hub-brt .hub-brt__table-wrap,
#hub-view #hub-migliorshop-pay .hub-pay__table-wrap {
  box-shadow:none!important;
  border-color:#dfe6f0!important;
}
#hub-view #check-strategie .check-strategie__card,
#hub-view #check-strategie .check-strategie__views,
#hub-view #check-strategie .check-strategie__toolbar {
  box-shadow:none!important;
}
@media(max-width:700px) {
  #hub-view .hub-shell {
    width:calc(100% - 16px)!important;
    padding:13px!important;
  }
  #hub-view .hub-final-tabs {
    overflow-x:auto;
    flex-wrap:nowrap!important;
    scrollbar-width:thin;
  }
  #hub-view .hub-final-tabs .hub-subnav__item {flex:0 0 auto!important;padding:0 11px!important}
}

/* Compact, familiar actions on the same Hub heading row. */
#hub-view .hub-final-actions .hub-convention__top-actions {flex-wrap:nowrap!important;gap:8px}
#hub-view .hub-final-actions .hub-convention__top-actions button {
  flex:0 0 auto!important;min-height:41px!important;
  padding:8px 14px!important;border-radius:10px!important;
  font:400 13px "Open Sans",sans-serif!important;
  white-space:nowrap;
}
#hub-view .hub-final-actions .hub-convention__top-actions .hub-convention__refresh {
  display:grid!important;place-items:center!important;
  width:41px!important;min-width:41px!important;height:41px!important;
  padding:0!important;
  border:1px solid #cadcf0!important;
  background:#f2f8ff!important;color:#1765b8!important;
}
#hub-view .hub-final-actions .hub-convention__refresh svg {
  width:19px;height:19px;fill:none;stroke:currentColor;
  stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round;
}
#hub-view .hub-final-actions .hub-convention__top-actions .btn-primary {
  background:#0b7ff0!important;border-color:#0b7ff0!important;color:#fff!important;
  box-shadow:none!important;
}
#hub-view .hub-final-actions .hub-convention__top-actions .btn-secondary {
  background:#fff!important;border:1px solid #cbd7e6!important;color:#0e2166!important;
}
#hub-view .hub-final-actions .hub-convention__top-actions button:hover {filter:brightness(.97)}
#hub-view .hub-final-header .hub-final-actions {margin-left:auto;min-width:0}
@media(max-width:800px){
 #hub-view .hub-final-header {flex-wrap:wrap}
 #hub-view .hub-final-header .hub-final-actions {margin-left:auto}
 #hub-view .hub-final-actions .hub-convention__top-actions {flex-wrap:wrap!important;justify-content:flex-end}
}
@media(max-width:530px){
 #hub-view .hub-final-actions .hub-convention__top-actions button {padding:8px 10px!important;font-size:11px!important}
 #hub-view .hub-final-actions .hub-convention__top-actions .hub-convention__refresh {width:38px!important;min-width:38px!important}
}


/* Google Ads KPIs share Pay/BRT card geometry; a restrained blue identity. */
#hub-view .hub-google-ads .hub-summary[data-polished="1"]{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:11px!important;margin:0 0 16px!important;
}
#hub-view .hub-google-ads .hub-summary[data-polished="1"] article.hub-ads__kpi{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) auto!important;
  grid-template-rows:auto!important;
  align-items:center!important;
  justify-content:start!important;
  gap:12px!important;min-width:0;min-height:96px!important;
  padding:15px 17px!important;
  border:1px solid #d7e5f8!important;
  border-radius:13px!important;
  background:linear-gradient(128deg,#fff 60%,#f8fbff)!important;
  color:#213d64!important;
  box-shadow:none!important;
}
#hub-view .hub-google-ads .hub-summary[data-polished="1"] article.hub-ads__kpi::before,
#hub-view .hub-google-ads .hub-summary[data-polished="1"] article.hub-ads__kpi::after{
  content:none!important;display:none!important;
}
#hub-view .hub-google-ads .hub-ads__kpi .hub-convention__kpi-icon{
  display:grid!important;grid-column:1;grid-row:1;
  width:42px;height:42px;place-items:center;
  border-radius:12px;background:#e9f3ff;color:#176fca;
}
#hub-view .hub-google-ads .hub-ads__kpi .hub-convention__kpi-icon svg{
  display:block;width:20px;height:20px;
  fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
#hub-view .hub-google-ads .hub-ads__kpi .hub-convention__kpi-copy{
  display:flex;flex-direction:column;justify-content:center;
  grid-column:2;grid-row:1;min-width:0;gap:6px;
}
#hub-view .hub-google-ads .hub-summary[data-polished="1"] article.hub-ads__kpi .hub-convention__kpi-copy span{
  display:block!important;padding:0!important;
  font:700 12px/1.45 "Open Sans",sans-serif!important;
  color:#344f70!important;
}
#hub-view .hub-google-ads .hub-summary[data-polished="1"] article.hub-ads__kpi .hub-convention__kpi-copy small{
  font:400 10px/1.4 "Open Sans",sans-serif!important;
  color:#8190a4!important;
}
#hub-view .hub-google-ads .hub-summary[data-polished="1"] article.hub-ads__kpi strong{
  display:block!important;
  grid-column:3;grid-row:1;align-self:center!important;justify-self:end!important;
  min-width:2ch;text-align:right;
  color:#243d67!important;
  font:650 clamp(21px,2vw,28px)/1.15 Poppins,"Open Sans",sans-serif!important;
  letter-spacing:-.03em;overflow-wrap:anywhere;
}
@media(max-width:1150px){
 #hub-view .hub-google-ads .hub-summary[data-polished="1"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
 #hub-view .hub-google-ads .hub-summary[data-polished="1"]{grid-template-columns:minmax(0,1fr)!important}
}

/* Desktop: current five-column Ads table, with centered actions rather than
   a 1600px legacy ten-column minimum that clips the controls. */
#hub-view .hub-google-ads .hub-table-wrap{width:100%;max-width:none;margin-inline:0}
#hub-view .hub-google-ads .hub-final-table{
  width:100%;min-width:900px;table-layout:fixed;
}
#hub-view .hub-google-ads .hub-final-table th:nth-child(1){width:29%}
#hub-view .hub-google-ads .hub-final-table th:nth-child(2){width:16%}
#hub-view .hub-google-ads .hub-final-table th:nth-child(3){width:19%}
#hub-view .hub-google-ads .hub-final-table th:nth-child(4){width:18%}
#hub-view .hub-google-ads .hub-final-table th:nth-child(5){width:18%}
#hub-view .hub-google-ads .hub-final-table th:last-child,
#hub-view .hub-google-ads .hub-final-table td[data-label="Azioni"]{text-align:center}
#hub-view .hub-google-ads .hub-final-table .hub-actions{justify-content:center}
#hub-view .hub-google-ads .hub-summary[data-polished="1"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
@media(max-width:640px){
 #hub-view .hub-google-ads .hub-summary[data-polished="1"]{grid-template-columns:minmax(0,1fr)!important}
}

/* Match the desktop full-width policy used by Aziende, Task and Strategie.
   Keep the existing compact gutters on tablet and mobile. */
@media (min-width:1024px) {
  #hub-view .hub-shell {
    box-sizing:border-box!important;
    width:calc(100% - 56px)!important;
    max-width:none!important;
  }
}

/* Hub compact density parity: match Strategie instead of reserving an extra
   blank toolbar/card block between the navigation and the dashboard.
   All rules are scoped to the four requested tabs (not Strategie). */
#hub-view[data-hub-section="ads"] .hub-final-tabs,
#hub-view[data-hub-section="chatgpt"] .hub-final-tabs,
#hub-view[data-hub-section="pay"] .hub-final-tabs,
#hub-view[data-hub-section="brt"] .hub-final-tabs{
  margin-bottom:10px!important;
}
#hub-view[data-hub-section="pay"] #hub-migliorshop-pay .hub-pay__header,
#hub-view[data-hub-section="brt"] #hub-brt .hub-brt__header{
  display:none!important; /* Empty after controls move to the shared Hub toolbar. */
}
#hub-view[data-hub-section="ads"] .hub-google-ads,
#hub-view[data-hub-section="chatgpt"] #hub-chatgpt-ads,
#hub-view[data-hub-section="pay"] #hub-migliorshop-pay,
#hub-view[data-hub-section="brt"] #hub-brt{
  padding-top:0!important;margin-top:0!important;
}
#hub-view[data-hub-section="ads"] .hub-google-ads .hub-summary,
#hub-view[data-hub-section="chatgpt"] #hub-chatgpt-ads .hub-chatgpt__summary,
#hub-view[data-hub-section="pay"] #hub-migliorshop-pay .hub-pay__summary,
#hub-view[data-hub-section="brt"] #hub-brt .hub-brt__summary{
  margin-top:0!important;margin-bottom:12px!important;gap:10px!important;
}
#hub-view[data-hub-section="pay"] #hub-migliorshop-pay .hub-pay__summary article,
#hub-view[data-hub-section="brt"] #hub-brt .hub-brt__summary article{
  min-height:102px!important;padding:13px 16px!important;
}
#hub-view[data-hub-section="chatgpt"] #hub-chatgpt-ads .hub-chatgpt__summary article,
#hub-view[data-hub-section="ads"] .hub-google-ads .hub-summary article{
  min-height:96px!important;
}
#hub-view[data-hub-section="ads"] .hub-google-ads .hub-filters,
#hub-view[data-hub-section="chatgpt"] #hub-chatgpt-ads .hub-filters,
#hub-view[data-hub-section="pay"] #hub-migliorshop-pay .hub-pay__filters,
#hub-view[data-hub-section="brt"] #hub-brt .hub-brt__filters{
  margin-top:0!important;margin-bottom:10px!important;
}
#hub-view[data-hub-section="ads"] .hub-google-ads .hub-state:empty,
#hub-view[data-hub-section="chatgpt"] #hub-chatgpt-ads .hub-state:empty,
#hub-view[data-hub-section="pay"] #hub-migliorshop-pay .hub-state:empty,
#hub-view[data-hub-section="brt"] #hub-brt .hub-state:empty{
  min-height:0!important;margin:0!important;padding:0!important;
}
@media(max-width:700px){
  #hub-view[data-hub-section="pay"] #hub-migliorshop-pay .hub-pay__summary article,
  #hub-view[data-hub-section="brt"] #hub-brt .hub-brt__summary article{
    min-height:96px!important;
  }
}
