/* ============================================================
   CORRECTO WMS
   SYNC CONTROL CENTER
   PHASE 1 - CANONICAL SHELL
   ============================================================ */

:root{
  --scc-bg:#07101e;
  --scc-surface:#0f1a2b;
  --scc-surface-2:#122039;
  --scc-surface-3:#17263f;
  --scc-line:#263754;
  --scc-line-soft:rgba(148,163,184,.15);
  --scc-text:#f8fafc;
  --scc-muted:#91a4bf;
  --scc-blue:#3b82f6;
  --scc-green:#22c55e;
  --scc-amber:#f59e0b;
  --scc-red:#ef4444;
}


/* ============================================================
   PAGE
   ============================================================ */

body.sync-premium-page{
  background:var(--wms-bg,var(--scc-bg));
  color:var(--wms-text,var(--scc-text));
}

.sync-premium-wrap{
  max-width:1580px;
  margin:0 auto;
  padding:22px;
}


/* ============================================================
   LEGACY STAGE
   Keep existing DOM alive for original sync.js.
   It will be moved module-by-module in phases 2-5.
   ============================================================ */

.sync-jump{
  display:none!important;
}

#syncOverview{
  display:none;
}


/* ============================================================
   HERO
   ============================================================ */

.scc-hero{
  position:relative;
  overflow:hidden;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;

  min-height:170px;
  margin-bottom:14px;
  padding:28px 30px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:24px;

  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(59,130,246,.18),
      transparent 33%
    ),
    linear-gradient(
      135deg,
      var(--wms-surface,var(--scc-surface)),
      var(--wms-bg)
    );

  box-shadow:0 20px 65px rgba(0,0,0,.16);
}

.scc-hero::after{
  content:"";
  position:absolute;
  right:-110px;
  top:-185px;

  width:330px;
  height:330px;

  border-radius:50%;
  background:rgba(59,130,246,.07);

  pointer-events:none;
}

.scc-hero-copy{
  position:relative;
  z-index:1;
  max-width:820px;
}

.scc-kicker{
  display:block;
  margin-bottom:12px;

  color:var(--wms-link);

  font-size:.71rem;
  font-weight:900;
  letter-spacing:.16em;
}

.scc-hero h1{
  margin:0 0 12px;

  font-size:clamp(2rem,4vw,3.25rem);
  line-height:1;
  letter-spacing:-.045em;
}

.scc-hero p{
  margin:0;

  color:var(--wms-muted,var(--scc-muted));

  font-size:1rem;
  line-height:1.55;
}

.scc-hero-actions{
  position:relative;
  z-index:1;

  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:9px;
}

.scc-btn{
  appearance:none;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-height:44px;
  padding:0 16px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:12px;

  background:var(--wms-surface-2,var(--scc-surface-2));
  color:var(--wms-text);

  text-decoration:none;
  font-weight:850;

  cursor:pointer;
}

.scc-btn:hover{
  border-color:rgba(59,130,246,.55);
}

.scc-btn-primary{
  border-color:transparent;
  background:var(--wms-brand);
  color:#ffffff;
}


/* ============================================================
   TABS
   ============================================================ */

.scc-tabs{
  position:sticky;
  top:0;
  z-index:30;

  display:flex;
  gap:5px;
  overflow-x:auto;

  margin-bottom:18px;
  padding:7px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:16px;

  background:var(--wms-surface);
  backdrop-filter:blur(18px);

  box-shadow:0 12px 30px rgba(0,0,0,.1);
}

.scc-tab{
  appearance:none;

  min-height:43px;
  padding:0 16px;

  border:0;
  border-radius:10px;

  background:transparent;
  color:var(--wms-muted,var(--scc-muted));

  font-size:.89rem;
  font-weight:850;
  white-space:nowrap;

  cursor:pointer;
}

.scc-tab:hover{
  background:var(--wms-hover);
  color:var(--wms-text);
}

.scc-tab.is-active{
  background:var(--wms-brand);
  color:#ffffff;

  box-shadow:0 7px 22px rgba(59,130,246,.22);
}


/* ============================================================
   PANELS
   ============================================================ */

.scc-panel{
  display:none;
}

.scc-panel.is-active{
  display:block;
}

.scc-panel-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;

  margin:7px 2px 13px;
}

.scc-eyebrow{
  color:var(--wms-link);

  font-size:.69rem;
  font-weight:900;
  letter-spacing:.15em;
}

.scc-panel-head h2{
  margin:4px 0 4px;

  font-size:1.65rem;
  letter-spacing:-.03em;
}

.scc-panel-head p{
  margin:0;

  color:var(--wms-muted,var(--scc-muted));
}


/* ============================================================
   MASTER HEALTH
   ============================================================ */

.scc-master{
  display:flex;
  align-items:center;
  gap:14px;

  margin-bottom:13px;
  padding:14px 17px;

  border:1px solid rgba(34,197,94,.35);
  border-radius:17px;

  background:
    linear-gradient(
      90deg,
      rgba(34,197,94,.105),
      rgba(34,197,94,.02)
    );
}

.scc-master.is-warning{
  border-color:rgba(245,158,11,.4);

  background:
    linear-gradient(
      90deg,
      rgba(245,158,11,.11),
      rgba(245,158,11,.02)
    );
}

.scc-master.is-error{
  border-color:rgba(239,68,68,.42);

  background:
    linear-gradient(
      90deg,
      rgba(239,68,68,.11),
      rgba(239,68,68,.02)
    );
}

.scc-master-dot{
  flex:0 0 auto;

  width:11px;
  height:11px;

  border-radius:50%;

  background:var(--scc-green);
  box-shadow:0 0 0 5px rgba(34,197,94,.1);
}

.scc-master.is-warning .scc-master-dot{
  background:var(--scc-amber);
  box-shadow:0 0 0 5px rgba(245,158,11,.1);
}

.scc-master.is-error .scc-master-dot{
  background:var(--scc-red);
  box-shadow:0 0 0 5px rgba(239,68,68,.1);
}

.scc-master-copy{
  min-width:0;
  flex:1;
}

.scc-master strong{
  display:block;
  font-size:.94rem;
}

.scc-master small{
  display:block;
  margin-top:3px;

  color:var(--wms-muted,var(--scc-muted));
}

.scc-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;

  margin-top:9px;
}

.scc-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;

  min-height:25px;
  padding:0 9px;

  border:1px solid rgba(148,163,184,.15);
  border-radius:999px;

  background:rgba(148,163,184,.045);
  color:var(--wms-muted,var(--scc-muted));

  font-size:.67rem;
  font-weight:780;
}

.scc-chip b{
  color:var(--wms-text);
}


/* ============================================================
   HEALTH CARDS
   ============================================================ */

.scc-health-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;

  margin-bottom:13px;
}

.scc-health-card{
  position:relative;
  overflow:hidden;

  min-height:132px;
  padding:17px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:18px;

  background:
    linear-gradient(
      145deg,
      var(--wms-surface,var(--scc-surface)),
      var(--wms-bg)
    );
}

.scc-health-card::after{
  content:"";

  position:absolute;
  right:-33px;
  bottom:-55px;

  width:125px;
  height:125px;

  border-radius:50%;

  background:rgba(59,130,246,.055);
}

.scc-health-top{
  position:relative;
  z-index:1;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.scc-health-name{
  color:var(--wms-muted,var(--scc-muted));

  font-size:.73rem;
  font-weight:900;
  letter-spacing:.065em;
}

.scc-dot{
  width:9px;
  height:9px;

  border-radius:50%;

  background:#64748b;
}

.scc-dot.ok{
  background:var(--scc-green);
  box-shadow:0 0 0 4px rgba(34,197,94,.1);
}

.scc-dot.warn{
  background:var(--scc-amber);
}

.scc-dot.bad{
  background:var(--scc-red);
}

.scc-health-value{
  position:relative;
  z-index:1;

  margin-top:15px;

  font-size:1.35rem;
  font-weight:900;
  letter-spacing:-.025em;
}

.scc-health-meta{
  position:relative;
  z-index:1;

  margin-top:5px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.78rem;
  line-height:1.5;
}


/* ============================================================
   BLOCK
   ============================================================ */

.scc-block{
  margin-bottom:13px;
  padding:17px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:18px;

  background:var(--wms-surface,var(--scc-surface));
}

.scc-block-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;

  margin-bottom:12px;
}

.scc-block-head h3{
  margin:0 0 3px;
  font-size:1.08rem;
}

.scc-block-head small{
  color:var(--wms-muted,var(--scc-muted));
}


/* ============================================================
   JOBS
   ============================================================ */

.scc-jobs{
  display:grid;
  gap:8px;
}

.scc-job{
  display:grid;
  grid-template-columns:
    minmax(220px,1.45fr)
    115px
    130px
    105px
    minmax(155px,.8fr)
    auto;

  align-items:center;
  gap:11px;

  padding:11px 13px;

  border:1px solid var(--scc-line-soft);
  border-radius:13px;

  background:var(--wms-surface-2,var(--scc-surface-2));
}

.scc-job strong{
  display:block;
  font-size:.84rem;
}

.scc-job-main small{
  display:block;
  margin-top:3px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.69rem;
}

.scc-field-label{
  display:block;

  margin-bottom:4px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.61rem;
  font-weight:850;
  letter-spacing:.08em;
}

.scc-field-value{
  font-size:.75rem;
  font-weight:760;
}

.scc-status{
  display:inline-flex;
  align-items:center;

  min-height:27px;
  padding:0 9px;

  border-radius:999px;

  font-size:.7rem;
  font-weight:900;
}

.scc-status.ok{
  background:rgba(34,197,94,.12);
  color:var(--wms-success);
}

.scc-status.warn{
  background:var(--wms-warning-soft)!important;
  color:var(--wms-warning);
}

.scc-status.bad{
  background:rgba(239,68,68,.12);
  color:var(--wms-danger);
}

.scc-status.info{
  background:rgba(59,130,246,.13);
  color:var(--wms-link);
}

.scc-job-result{
  min-width:0;
}

.scc-job-result strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  font-size:.74rem;
}

.scc-job-result small{
  display:block;
  margin-top:2px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.64rem;
}

.scc-run{
  appearance:none;

  min-height:35px;
  padding:0 12px;

  border:1px solid rgba(59,130,246,.35);
  border-radius:9px;

  background:rgba(59,130,246,.11);
  color:var(--wms-link);

  font-size:.72rem;
  font-weight:850;

  cursor:pointer;
}

.scc-run:hover{
  background:rgba(59,130,246,.2);
}

.scc-run:disabled{
  opacity:.55;
  cursor:wait;
}


/* ============================================================
   ACTIVITY
   ============================================================ */

.scc-activity{
  display:grid;
}

.scc-activity-row{
  display:grid;
  grid-template-columns:
    105px
    minmax(190px,1fr)
    115px
    230px;

  align-items:center;
  gap:14px;

  min-height:49px;
  padding:7px 3px;

  border-bottom:1px solid var(--scc-line-soft);
}

.scc-activity-row:last-child{
  border-bottom:0;
}

.scc-activity-time{
  color:var(--wms-muted,var(--scc-muted));
  font-size:.73rem;
}

.scc-activity-name{
  font-size:.78rem;
  font-weight:800;
}

.scc-activity-meta{
  color:var(--wms-muted,var(--scc-muted));

  font-size:.69rem;
  line-height:1.4;
}


/* ============================================================
   FUTURE PHASE PLACEHOLDERS
   ============================================================ */

.scc-placeholder{
  padding:30px;

  border:1px dashed var(--wms-line,var(--scc-line));
  border-radius:17px;

  background:rgba(148,163,184,.025);
  color:var(--wms-muted,var(--scc-muted));

  text-align:center;
}

.scc-placeholder strong{
  display:block;
  margin-bottom:5px;

  color:var(--wms-text);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media(max-width:1200px){

  .scc-health-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .scc-job{
    grid-template-columns:
      minmax(210px,1.4fr)
      110px
      125px
      minmax(150px,.8fr)
      auto;
  }

  .scc-job > :nth-child(4){
    display:none;
  }
}


@media(max-width:800px){

  .sync-premium-wrap{
    padding:10px!important;
  }

  .scc-hero{
    align-items:flex-start;
    flex-direction:column;

    min-height:auto;
    padding:20px;
  }

  .scc-hero-actions{
    width:100%;
    justify-content:stretch;
  }

  .scc-hero-actions > *{
    flex:1 1 150px;
  }

  .scc-health-grid{
    grid-template-columns:1fr;
  }

  .scc-job{
    grid-template-columns:1fr auto;
  }

  .scc-job > div{
    grid-column:1/-1;
  }

  .scc-job .scc-run{
    grid-column:2;
    grid-row:1;
  }

  .scc-job > :nth-child(4){
    display:block;
  }

  .scc-activity-row{
    grid-template-columns:88px 1fr;
    gap:6px 10px;
  }

  .scc-activity-row > :nth-child(3),
  .scc-activity-row > :nth-child(4){
    grid-column:2;
  }
}


@media(max-width:520px){

  .scc-tab{
    padding:0 12px;
  }

  .scc-master{
    align-items:flex-start;
  }

  .scc-health-card{
    min-height:116px;
  }
}

/* ============================================================
   PHASE 2 - BIZNISOFT TAB
   ============================================================ */

.scc-module-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;

  margin-bottom:12px;
  padding:16px 18px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:17px;

  background:
    linear-gradient(
      110deg,
      rgba(59,130,246,.08),
      var(--wms-surface,var(--scc-surface)) 55%
    );
}

.scc-module-status-main{
  display:flex;
  align-items:center;
  gap:13px;

  min-width:0;
}

.scc-module-icon{
  display:grid;
  place-items:center;

  flex:0 0 auto;

  width:42px;
  height:42px;

  border-radius:12px;

  background:rgba(59,130,246,.14);
  color:var(--wms-link);

  font-size:1.08rem;
  font-weight:900;
}

.scc-module-status-main strong{
  display:block;

  font-size:.94rem;
}

.scc-module-status-main small{
  display:block;
  margin-top:3px;

  color:var(--wms-muted,var(--scc-muted));
}

.scc-module-status-side{
  flex:0 0 auto;
}


.scc-module-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;

  margin-bottom:12px;
}

.scc-module-card{
  min-height:105px;
  padding:15px 16px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:16px;

  background:var(--wms-surface,var(--scc-surface));
}

.scc-module-card > div{
  margin-top:11px;
}

.scc-module-card strong{
  display:block;

  color:var(--wms-text);

  font-size:.92rem;
}

.scc-module-card small{
  display:block;
  margin-top:4px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.7rem;
}


.scc-module-stack{
  display:grid;
  gap:12px;
}

.scc-mounted-card{
  width:100%;
  max-width:none;
  margin:0;

  grid-column:1/-1;

  background:var(--wms-surface,var(--scc-surface));
  border:1px solid var(--wms-line,var(--scc-line))!important;
  border-radius:17px!important;

  box-shadow:none!important;
}


/* Existing configuration KPI is now nested inside canonical card. */

#sccBizConfigSlot .scc-biz-config-card{
  min-height:auto;
  padding:0!important;

  border:0!important;
  background:transparent!important;
}

#sccBizConfigSlot .scc-biz-config-card .muted{
  display:none;
}

#sccBizConfigSlot .scc-biz-config-card .stat{
  margin:0;

  color:var(--wms-text);

  font-size:.98rem;
  font-weight:900;
}

#sccBizConfigSlot #cfg{
  margin-top:4px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.7rem;
  line-height:1.4;
}


/* Normalize existing BizniSoft cards */

[data-scc-panel="biznisoft"] .section-heading{
  margin-bottom:13px;
}

[data-scc-panel="biznisoft"] .section-heading h2{
  margin-top:3px;
}

[data-scc-panel="biznisoft"] .commerce-grid{
  gap:9px!important;
}

[data-scc-panel="biznisoft"] .mini-card{
  background:var(--wms-surface-2,var(--scc-surface-2))!important;
  color:var(--wms-text)!important;

  border:1px solid var(--wms-line,var(--scc-line))!important;
}

[data-scc-panel="biznisoft"] .mini-card strong{
  color:var(--wms-text)!important;
}

[data-scc-panel="biznisoft"] .mini-card span{
  color:var(--wms-muted,var(--scc-muted))!important;
}

[data-scc-panel="biznisoft"] button{
  min-height:40px;
}

[data-scc-panel="biznisoft"] .status-pill{
  white-space:nowrap;
}


@media(max-width:900px){

  .scc-module-grid{
    grid-template-columns:1fr;
  }

  .scc-module-status{
    align-items:flex-start;
  }
}


@media(max-width:560px){

  .scc-module-status{
    flex-direction:column;
  }

  .scc-module-status-side{
    width:100%;
  }

  .scc-module-status-side .scc-status{
    width:100%;
    justify-content:center;
  }

  [data-scc-panel="biznisoft"] .commerce-grid{
    grid-template-columns:1fr!important;
  }

  [data-scc-panel="biznisoft"] button{
    width:100%;
    margin:4px 0;
  }
}

/* ============================================================
   SYNC_CONTROL_CENTER_PHASE3_CSS
   WooCommerce tab
   ============================================================ */

.scc-woo-sites{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;

  margin-bottom:12px;
}

.scc-woo-site{
  min-height:124px;
  padding:16px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:16px;

  background:
    linear-gradient(
      145deg,
      var(--wms-surface,var(--scc-surface)),
      var(--wms-bg)
    );
}

.scc-woo-site-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.scc-woo-site-head strong{
  display:block;
  margin-top:2px;

  color:var(--wms-text);
  font-size:.86rem;
}

.scc-woo-site-state{
  margin-top:17px;

  color:var(--wms-text);

  font-size:1.18rem;
  font-weight:900;
  letter-spacing:-.02em;
}

.scc-woo-site > small{
  display:block;
  margin-top:5px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.69rem;
  line-height:1.4;
}


/* Existing WooCommerce cards moved from legacy staging area */

[data-scc-panel="woocommerce"] .scc-mounted-card{
  width:100%;
  max-width:none;
  margin:0;

  grid-column:1/-1;

  background:var(--wms-surface,var(--scc-surface));
  border:1px solid var(--wms-line,var(--scc-line))!important;
  border-radius:17px!important;

  box-shadow:none;
}

[data-scc-panel="woocommerce"] .section-heading{
  margin-bottom:14px;
}

[data-scc-panel="woocommerce"] .section-heading h2{
  margin-top:3px;
}

[data-scc-panel="woocommerce"] .commerce-grid{
  gap:9px;
}

[data-scc-panel="woocommerce"] .mini-card{
  background:var(--wms-surface-2,var(--scc-surface-2))!important;
  color:var(--wms-text);

  border:1px solid var(--wms-line,var(--scc-line));
}

[data-scc-panel="woocommerce"] .mini-card strong{
  color:var(--wms-text);
}

[data-scc-panel="woocommerce"] .mini-card span{
  color:var(--wms-muted,var(--scc-muted));
}

[data-scc-panel="woocommerce"] .form-grid{
  gap:10px;
}

[data-scc-panel="woocommerce"] input,
[data-scc-panel="woocommerce"] select{
  width:100%;
}

[data-scc-panel="woocommerce"] button{
  min-height:40px;
}

[data-scc-panel="woocommerce"] .table{
  overflow:auto;
  max-height:520px!important;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:12px;
}

[data-scc-panel="woocommerce"] table{
  width:100%;
  border-collapse:collapse;
}

[data-scc-panel="woocommerce"] th{
  position:sticky;
  top:0;
  z-index:2;

  background:var(--wms-surface-2,var(--scc-surface-2));
}


/* Keep long API / audit text under control */

[data-scc-panel="woocommerce"] #wooResult,
[data-scc-panel="woocommerce"] #wooDiagnostics,
[data-scc-panel="woocommerce"] #wooControlResult{
  overflow-wrap:anywhere;
}


/* Tablet */

@media(max-width:1100px){

  .scc-woo-sites{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* Mobile */

@media(max-width:620px){

  .scc-woo-sites{
    grid-template-columns:1fr;
  }

  [data-scc-panel="woocommerce"] .sync-mobile-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  [data-scc-panel="woocommerce"] button{
    width:100%;
    margin:4px 0;
  }
}

/* ============================================================
   SYNC_CONTROL_CENTER_PHASE4_CSS
   AKS tab
   ============================================================ */

.scc-aks-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;

  margin-bottom:12px;
}

.scc-aks-summary-card{
  min-height:108px;
  padding:15px 16px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:16px;

  background:
    linear-gradient(
      145deg,
      var(--wms-surface,var(--scc-surface)),
      var(--wms-bg)
    );
}

.scc-aks-summary-card strong{
  display:block;
  margin-top:10px;

  color:var(--wms-text);

  font-size:1.25rem;
  font-weight:900;
}

.scc-aks-summary-card small{
  display:block;
  margin-top:4px;

  color:var(--wms-muted,var(--scc-muted));

  font-size:.69rem;
}


/* Existing AKS card moved from legacy staging area */

[data-scc-panel="aks"] .scc-mounted-card{
  width:100%;
  max-width:none;
  margin:0;

  grid-column:1/-1;

  background:var(--wms-surface,var(--scc-surface));
  border:1px solid var(--wms-line,var(--scc-line))!important;
  border-radius:17px!important;

  box-shadow:none;
}

[data-scc-panel="aks"] .section-heading{
  margin-bottom:14px;
}

[data-scc-panel="aks"] .section-heading h2{
  margin-top:3px;
}

[data-scc-panel="aks"] .commerce-grid{
  gap:9px;
}

[data-scc-panel="aks"] .mini-card{
  background:var(--wms-surface-2,var(--scc-surface-2))!important;
  color:var(--wms-text);

  border:1px solid var(--wms-line,var(--scc-line));
}

[data-scc-panel="aks"] .mini-card strong{
  color:var(--wms-text);
}

[data-scc-panel="aks"] .mini-card span{
  color:var(--wms-muted,var(--scc-muted));
}

[data-scc-panel="aks"] button{
  min-height:40px;
}

[data-scc-panel="aks"] input,
[data-scc-panel="aks"] select{
  width:100%;
}

[data-scc-panel="aks"] .table{
  overflow:auto;
  max-height:540px!important;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:12px;
}

[data-scc-panel="aks"] table{
  width:100%;
}

[data-scc-panel="aks"] th{
  position:sticky;
  top:0;
  z-index:2;

  background:var(--wms-surface-2,var(--scc-surface-2));
}


/* Reconciliation search/actions */

[data-scc-panel="aks"] #syncReconSearch{
  min-height:40px;
}

[data-scc-panel="aks"] #syncAksResult,
[data-scc-panel="aks"] #syncReconStatus{
  overflow-wrap:anywhere;
}


@media(max-width:1050px){

  .scc-aks-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


@media(max-width:600px){

  .scc-aks-summary{
    grid-template-columns:1fr;
  }

  [data-scc-panel="aks"] button{
    width:100%;
    margin:4px 0;
  }
}

/* ============================================================
   SYNC_CONTROL_CENTER_PHASE5_CSS
   Diagnostics tab
   ============================================================ */

.scc-diag-jump{
  display:flex;
  flex-wrap:wrap;
  gap:8px;

  margin-bottom:12px;
}

.scc-diag-jump-btn{
  appearance:none;

  min-height:38px;
  padding:0 13px;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:10px;

  background:var(--wms-surface-2,var(--scc-surface-2));
  color:var(--wms-text);

  font-size:.74rem;
  font-weight:850;

  cursor:pointer;
}

.scc-diag-jump-btn:hover{
  border-color:rgba(59,130,246,.5);
  color:var(--wms-text);
}


/* Existing diagnostic cards */

[data-scc-panel="diagnostics"] .scc-mounted-card{
  width:100%;
  max-width:none;
  margin:0;

  grid-column:1/-1;

  background:var(--wms-surface,var(--scc-surface));
  border:1px solid var(--wms-line,var(--scc-line))!important;
  border-radius:17px!important;

  box-shadow:none;
}

[data-scc-panel="diagnostics"] #connectionLab,
[data-scc-panel="diagnostics"] #bizDebugCard{
  scroll-margin-top:82px;
}


/* Connection path */

[data-scc-panel="diagnostics"] .connection-path{
  display:grid;
  grid-template-columns:
    minmax(120px,1fr)
    auto
    minmax(120px,1fr)
    auto
    minmax(120px,1fr)
    auto
    minmax(120px,1fr);

  align-items:center;
  gap:9px;

  margin:18px 0;
}

[data-scc-panel="diagnostics"] .connection-node{
  min-width:0;
}


/* Diagnostic status cards */

[data-scc-panel="diagnostics"] .diagnostic-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}

[data-scc-panel="diagnostics"] .diagnostic-panel{
  min-width:0;

  background:var(--wms-surface-2,var(--scc-surface-2));
  border:1px solid var(--wms-line,var(--scc-line));
}

[data-scc-panel="diagnostics"] .diagnostic-panel strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


/* Details/debug groups */

[data-scc-panel="diagnostics"] details{
  border:0;
}

[data-scc-panel="diagnostics"] details > summary{
  padding:7px 0;

  cursor:pointer;
}

[data-scc-panel="diagnostics"] pre{
  max-height:460px;
  overflow:auto;

  white-space:pre-wrap;
  overflow-wrap:anywhere;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:12px;

  background:var(--wms-surface-3)!important;
}


/* Inputs and buttons */

[data-scc-panel="diagnostics"] input,
[data-scc-panel="diagnostics"] select,
[data-scc-panel="diagnostics"] textarea{
  width:100%;

  background:var(--wms-surface)!important;
  color:var(--wms-text);

  border:1px solid var(--wms-line,var(--scc-line))!important;
}

[data-scc-panel="diagnostics"] button{
  min-height:39px;
}


/* Tables */

[data-scc-panel="diagnostics"] .table{
  overflow:auto;
  max-height:560px!important;

  border:1px solid var(--wms-line,var(--scc-line));
  border-radius:12px;
}

[data-scc-panel="diagnostics"] table{
  width:100%;
}

[data-scc-panel="diagnostics"] th{
  position:sticky;
  top:0;
  z-index:2;

  background:var(--wms-surface-2,var(--scc-surface-2));
}


/* Timeline */

[data-scc-panel="diagnostics"] .connection-timeline{
  border-color:var(--wms-line,var(--scc-line));
}


/* Tablet */

@media(max-width:1100px){

  [data-scc-panel="diagnostics"] .diagnostic-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  [data-scc-panel="diagnostics"] .connection-path{
    grid-template-columns:1fr;
  }

  [data-scc-panel="diagnostics"] .path-arrow{
    transform:rotate(90deg);
    justify-self:center;
  }
}


/* Mobile */

@media(max-width:620px){

  [data-scc-panel="diagnostics"] .diagnostic-grid{
    grid-template-columns:1fr;
  }

  [data-scc-panel="diagnostics"] button{
    width:100%;
    margin:4px 0!important;
  }

  .scc-diag-jump{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}

/* ============================================================
   SYNC_CONTROL_CENTER_PHASE6_CSS
   Final polish + responsive/mobile
   ============================================================ */


/* ============================================================
   LEGACY COMPATIBILITY
   ============================================================ */

.scc-legacy-hidden{
  display:none;
}

#syncOverview{
  display:none;
}


/* ============================================================
   PAGE
   ============================================================ */

.scc-canonical-ready .sync-premium-wrap{
  width:100%;
  max-width:1580px!important;

  margin:0 auto;
  padding:20px 22px 34px!important;
}

.scc-panel{
  min-width:0;
}

.scc-panel.is-active{
  animation:sccPanelIn .14s ease-out;
}

@keyframes sccPanelIn{

  from{
    opacity:.74;
    transform:translateY(3px);
  }

  to{
    opacity:1;
    transform:none;
  }
}


/* ============================================================
   HERO
   ============================================================ */

.scc-hero{
  min-height:158px;
  padding:25px 28px;
}

.scc-hero-copy{
  max-width:760px;
}

.scc-hero h1{
  margin-bottom:10px;
}

.scc-hero-actions{
  max-width:520px;
}

.scc-hero-actions .scc-btn{
  margin:0!important;
}


/* ============================================================
   TABS
   ============================================================ */

.scc-tabs{
  scrollbar-width:none;
}

.scc-tabs::-webkit-scrollbar{
  display:none;
}

.scc-tab{
  flex:0 0 auto;

  margin:0;

  transition:
    background .14s ease,
    color .14s ease,
    transform .14s ease;
}

.scc-tab:hover{
  transform:translateY(-1px);
}

.scc-tab:focus-visible,
.scc-btn:focus-visible,
.scc-run:focus-visible,
.scc-diag-jump-btn:focus-visible{
  outline:2px solid var(--wms-link);
  outline-offset:2px;
}


/* ============================================================
   CARDS
   ============================================================ */

.scc-panel .card,
.scc-block,
.scc-module-card,
.scc-health-card,
.scc-woo-site,
.scc-aks-summary-card{
  min-width:0;

  transition:
    border-color .14s ease,
    background .14s ease;
}

.scc-panel .card:hover,
.scc-block:hover,
.scc-module-card:hover,
.scc-health-card:hover,
.scc-woo-site:hover,
.scc-aks-summary-card:hover{
  border-color:rgba(96,165,250,.28)!important;
}


/* ============================================================
   EXISTING MODULE HEADINGS
   ============================================================ */

.scc-panel .section-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;

  gap:18px;
}

.scc-panel .section-heading h2{
  margin-bottom:5px;
}

.scc-panel .section-heading p{
  line-height:1.5;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.scc-panel button,
.scc-hero button{
  transition:
    filter .13s ease,
    transform .13s ease,
    opacity .13s ease;
}

.scc-panel button:hover:not(:disabled),
.scc-hero button:hover:not(:disabled){
  filter:brightness(1.08);
}

.scc-panel button:active:not(:disabled),
.scc-hero button:active:not(:disabled){
  transform:translateY(1px);
}

.scc-panel button:disabled,
.scc-hero button:disabled{
  opacity:.55;
  cursor:not-allowed;
}


/* ============================================================
   FORMS
   ============================================================ */

.scc-panel label{
  color:var(--wms-text);

  font-size:.8rem;
  font-weight:700;
}

.scc-panel input,
.scc-panel select,
.scc-panel textarea{
  min-height:40px;

  margin-top:5px;
  padding:9px 11px;

  border-radius:9px!important;
}

.scc-panel textarea{
  min-height:110px;
  resize:vertical;
}


/* ============================================================
   TABLES
   ============================================================ */

.scc-panel .table{
  width:100%;
  max-width:100%;

  overflow:auto;

  -webkit-overflow-scrolling:touch;
}

.scc-panel table{
  min-width:720px;
}

.scc-panel th,
.scc-panel td{
  line-height:1.35;
}

.scc-panel th{
  white-space:nowrap!important;
}

.scc-panel td{
  vertical-align:top;
}


/* ============================================================
   STATUS / TEXT
   ============================================================ */

.scc-status{
  white-space:nowrap;
}

.status-pill{
  max-width:100%;
}

.muted{
  line-height:1.5;
}


/* ============================================================
   MOUNTED MODULES
   ============================================================ */

.scc-module-stack > .scc-mounted-card{
  overflow:hidden;
}

.scc-module-stack > .scc-mounted-card +
.scc-mounted-card{
  margin-top:0;
}


/* ============================================================
   DESKTOP <= 1280
   ============================================================ */

@media(max-width:1280px){

  .scc-canonical-ready .sync-premium-wrap{
    padding-left:16px!important;
    padding-right:16px!important;
  }

  .scc-job{
    grid-template-columns:
      minmax(190px,1.3fr)
      105px
      115px
      minmax(140px,.75fr)
      auto;
  }

  .scc-job > :nth-child(4){
    display:none;
  }
}


/* ============================================================
   TABLET <= 900
   ============================================================ */

@media(max-width:900px){

  .scc-canonical-ready .sync-premium-wrap{
    padding:12px!important;
  }

  .scc-hero{
    min-height:auto;

    padding:20px;
  }

  .scc-hero h1{
    font-size:2.35rem;
  }

  .scc-tabs{
    top:0;

    margin-left:-2px;
    margin-right:-2px;

    border-radius:13px;
  }

  .scc-panel-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .scc-panel-head h2{
    font-size:1.45rem;
  }

  .scc-health-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .scc-module-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .scc-module-grid >
  :last-child:nth-child(odd){
    grid-column:1/-1;
  }

  .scc-panel .section-heading{
    flex-direction:column;
  }

  .scc-panel .section-heading .status-pill{
    align-self:flex-start;
  }

  .scc-panel table{
    min-width:680px;
  }
}


/* ============================================================
   MOBILE <= 640
   ============================================================ */

@media(max-width:640px){

  .scc-canonical-ready .sync-premium-wrap{
    padding:8px 8px 24px!important;
  }


  /* Hero */

  .scc-hero{
    gap:18px;

    margin-bottom:9px;
    padding:17px;

    border-radius:17px;
  }

  .scc-kicker{
    font-size:.62rem;
  }

  .scc-hero h1{
    font-size:2rem;
  }

  .scc-hero p{
    font-size:.88rem;
  }

  .scc-hero-actions{
    display:grid;

    grid-template-columns:1fr;

    width:100%;
    max-width:none;
  }

  .scc-hero-actions > *{
    width:100%;
  }


  /* Tabs */

  .scc-tabs{
    gap:3px;

    margin-bottom:12px;
    padding:5px;
  }

  .scc-tab{
    min-height:40px;
    padding:0 12px;

    font-size:.78rem;
  }


  /* Master health */

  .scc-master{
    align-items:flex-start;
    gap:11px;

    padding:13px;
  }

  .scc-chips{
    gap:5px;
  }

  .scc-chip{
    min-height:23px;
    padding:0 7px;

    font-size:.61rem;
  }


  /* Integration cards */

  .scc-health-grid{
    grid-template-columns:1fr;
  }

  .scc-health-card{
    min-height:105px;
  }


  /* Module header */

  .scc-module-status{
    flex-direction:column;
    gap:13px;

    padding:14px;
  }

  .scc-module-status-side{
    width:100%;
  }

  .scc-module-status-side .scc-status{
    justify-content:center;

    width:100%;
  }

  .scc-module-grid{
    grid-template-columns:1fr;
  }

  .scc-module-grid >
  :last-child:nth-child(odd){
    grid-column:auto;
  }


  /* Jobs */

  .scc-job{
    display:grid;

    grid-template-columns:1fr auto;

    gap:8px;
    padding:12px;
  }

  .scc-job > div{
    grid-column:1/-1;
  }

  .scc-job > :nth-child(4){
    display:block;
  }

  .scc-job .scc-run{
    grid-column:2;
    grid-row:1;

    min-height:36px;
  }


  /* Activity */

  .scc-activity-row{
    grid-template-columns:80px 1fr;

    gap:5px 9px;
    padding:10px 2px;
  }

  .scc-activity-row > :nth-child(3),
  .scc-activity-row > :nth-child(4){
    grid-column:2;
  }


  /* Legacy mounted action bars */

  .scc-panel .actions,
  .scc-panel .test-toolbar,
  .scc-panel .sync-mobile-actions{
    display:grid;

    grid-template-columns:1fr;

    gap:6px!important;
  }

  .scc-panel .actions button,
  .scc-panel .test-toolbar button,
  .scc-panel .sync-mobile-actions button{
    width:100%;

    margin:0!important;
  }

  .scc-panel button{
    min-height:42px;
  }


  /* Tables */

  .scc-panel table{
    min-width:640px;

    font-size:.75rem;
  }

  .scc-panel th,
  .scc-panel td{
    padding:8px!important;
  }


  /* Diagnostics */

  .scc-diag-jump{
    grid-template-columns:1fr;
  }

  [data-scc-panel="diagnostics"]
  .connection-path{
    margin-top:13px;
    margin-bottom:13px;
  }

  [data-scc-panel="diagnostics"] pre{
    max-height:360px;

    font-size:.7rem;
  }
}


/* ============================================================
   VERY SMALL MOBILE <= 420
   ============================================================ */

@media(max-width:420px){

  .scc-hero h1{
    font-size:1.8rem;
  }

  .scc-panel-head h2{
    font-size:1.3rem;
  }

  .scc-health-value,
  .scc-woo-site-state,
  .scc-aks-summary-card strong{
    font-size:1.12rem;
  }

  .scc-module-icon{
    width:38px;
    height:38px;
  }
}
