/* SecureTech Commerce Hub — isolated staff-portal module. */
.commerce-hub{display:grid;gap:18px}
.commerce-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.commerce-head h3{margin:0;color:#082843;font-size:26px;letter-spacing:-.02em}
.commerce-head p{margin:6px 0 0;color:#64788a;max-width:760px;line-height:1.55}
.commerce-status{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #cfe3d8;background:#eef8f2;border-radius:999px;color:#246449;font-size:12px;font-weight:850}
.commerce-tabs{display:flex;gap:7px;flex-wrap:wrap;border-bottom:1px solid #dfe8ee;padding-bottom:10px}
.commerce-tabs button{border:1px solid #d8e3ea;background:#fff;color:#425a6e;border-radius:10px;padding:9px 12px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.commerce-tabs button.active{background:#082843;border-color:#082843;color:#fff}
.commerce-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.commerce-kpi{background:#fff;border:1px solid #dfe8ee;border-radius:16px;padding:18px;box-shadow:0 7px 20px rgba(8,40,67,.045)}
.commerce-kpi span{display:block;color:#718293;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
.commerce-kpi strong{display:block;color:#082843;font-size:25px;margin-top:7px}
.commerce-kpi small{display:block;color:#8a99a7;margin-top:4px}
.commerce-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:14px}
.commerce-panel{background:#fff;border:1px solid #dfe8ee;border-radius:16px;padding:18px;box-shadow:0 7px 20px rgba(8,40,67,.04)}
.commerce-panel h4{margin:0 0 5px;color:#082843;font-size:17px}
.commerce-panel>p{margin:0 0 14px;color:#718293;font-size:13px;line-height:1.5}
.commerce-actions{display:flex;gap:8px;flex-wrap:wrap}
.commerce-actions button{border:1px solid #cfdce4;background:#fff;color:#173b58;border-radius:9px;padding:9px 12px;font:inherit;font-weight:800;font-size:12px;cursor:pointer}
.commerce-actions button.primary{background:#b90e20;color:#fff;border-color:#b90e20}
.commerce-actions button:disabled{opacity:.45;cursor:not-allowed}
.commerce-table-wrap{overflow:auto;border:1px solid #e1e9ee;border-radius:13px}
.commerce-table{width:100%;border-collapse:collapse;min-width:760px;background:#fff}
.commerce-table th,.commerce-table td{text-align:left;padding:11px 12px;border-bottom:1px solid #e8eef2;font-size:12px;vertical-align:top}
.commerce-table th{background:#f7f9fb;color:#627688;font-size:10px;text-transform:uppercase;letter-spacing:.04em;position:sticky;top:0}
.commerce-table td strong{color:#183b57}.commerce-table td small{color:#7c8e9d}
.commerce-pill{display:inline-flex;padding:4px 8px;border-radius:999px;background:#edf3f7;color:#345268;font-size:10px;font-weight:850;white-space:nowrap}
.commerce-pill.ok{background:#e8f5ed;color:#246449}.commerce-pill.warn{background:#fff4de;color:#855d10}.commerce-pill.bad{background:#fce9eb;color:#a12835}
.commerce-empty{padding:26px;text-align:center;color:#7b8b98;font-size:13px}
.commerce-form{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:14px;padding-top:14px;border-top:1px solid #e2e9ee}
.commerce-form.hidden{display:none}.commerce-form label{display:grid;gap:5px;color:#425a6e;font-size:11px;font-weight:800}.commerce-form input,.commerce-form select,.commerce-form textarea{width:100%;border:1px solid #cbd9e2;border-radius:9px;padding:10px;background:#fff;color:#183b57;font:inherit;font-size:13px}.commerce-form .wide{grid-column:1/-1}.commerce-form button{min-height:42px;border:0;border-radius:9px;background:#b90e20;color:#fff;font:inherit;font-weight:850;cursor:pointer}.commerce-form .msg{grid-column:1/-1;min-height:17px;color:#a12835;font-size:11px}
.commerce-flow{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.commerce-step{padding:11px 9px;background:#f6f9fb;border:1px solid #dfe8ee;border-radius:11px;text-align:center;color:#566d80;font-size:10px;font-weight:800}.commerce-step b{display:block;color:#b90e20;font-size:15px;margin-bottom:3px}
@media(max-width:1050px){.commerce-kpis{grid-template-columns:repeat(3,1fr)}.commerce-grid{grid-template-columns:1fr}.commerce-flow{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.commerce-head h3{font-size:22px}.commerce-kpis{grid-template-columns:repeat(2,1fr)}.commerce-kpi{padding:14px}.commerce-kpi strong{font-size:21px}.commerce-tabs{display:grid;grid-template-columns:1fr 1fr}.commerce-tabs button{width:100%}.commerce-form{grid-template-columns:1fr}.commerce-form .wide{grid-column:auto}.commerce-flow{grid-template-columns:repeat(2,1fr)}}

.commerce-role-select{min-width:155px;max-width:220px;border:1px solid #cbd9e2;border-radius:8px;padding:7px 9px;background:#fff;color:#183b57;font:inherit;font-size:11px}
.commerce-table .btn.small{padding:6px 9px;border:1px solid #cfdce4;border-radius:8px;background:#fff;color:#173b58;font-size:10px;font-weight:850;cursor:pointer}
.commerce-table .btn.small:hover{border-color:#aebfca;background:#f7f9fb}

.commerce-period{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.commerce-period>span{color:#718293;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.04em;margin-right:4px}.commerce-period button{border:1px solid #d2dfe7;background:#fff;color:#405c70;border-radius:9px;padding:7px 9px;font:inherit;font-size:11px;font-weight:850;cursor:pointer}.commerce-period button.active{background:#082843;border-color:#082843;color:#fff}
.commerce-legend{display:flex;gap:12px;align-items:center;color:#6f8291;font-size:10px;font-weight:800}.commerce-legend span{display:flex;align-items:center;gap:5px}.commerce-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;background:#8099aa}.commerce-legend i.invoiced{background:#0e4b75}.commerce-legend i.collected{background:#b90e20}
.commerce-mini-chart{display:grid;gap:8px;margin-top:8px}.commerce-bar-row{display:grid;grid-template-columns:64px minmax(140px,1fr) 190px;gap:10px;align-items:center}.commerce-bar-row>span{color:#4e6679;font-size:10px;font-weight:850}.commerce-bar-row>small{text-align:right;color:#708392;font-size:9px}.commerce-bar-stack{display:grid;gap:3px}.commerce-bar{height:7px;border-radius:999px;min-width:2px}.commerce-bar.invoiced{background:#0e4b75}.commerce-bar.collected{background:#b90e20}
.commerce-definition-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.commerce-definition-grid>div{display:grid;gap:4px;padding:12px;border:1px solid #e1e9ee;border-radius:11px;background:#f9fbfc}.commerce-definition-grid strong{font-size:10px;color:#173b58}.commerce-definition-grid span{font-size:11px;line-height:1.5;color:#718293}
@media(max-width:650px){.commerce-bar-row{grid-template-columns:54px 1fr}.commerce-bar-row>small{grid-column:1/-1;text-align:left;padding-left:64px}.commerce-definition-grid{grid-template-columns:1fr}.commerce-period{width:100%}}

/* Commercial Hub cross-device stability and compact navigation. */
.commerce-hub{min-width:0;max-width:100%;overflow-x:hidden}
.commerce-intro{margin:0;color:#64788a;max-width:880px;line-height:1.55}
.commerce-mobile-nav{display:none}
.commerce-nav-desktop{min-width:0}
.commerce-tabs-primary{align-items:center}
.commerce-more{position:relative}
.commerce-more summary{list-style:none;border:1px solid #d8e3ea;background:#fff;color:#425a6e;border-radius:10px;padding:9px 12px;font-size:12px;font-weight:800;cursor:pointer;user-select:none}
.commerce-more summary::-webkit-details-marker{display:none}
.commerce-more summary::after{content:' ▾'}
.commerce-more summary.active{background:#082843;border-color:#082843;color:#fff}
.commerce-more-menu{position:absolute;z-index:20;right:0;top:calc(100% + 7px);width:min(720px,80vw);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:10px;background:#fff;border:1px solid #dfe8ee;border-radius:12px;box-shadow:0 14px 38px rgba(8,40,67,.18)}
.commerce-more-menu button{width:100%}
.commerce-panel,.commerce-kpi,.commerce-grid,.commerce-head{min-width:0}
.commerce-table-wrap{max-width:100%;-webkit-overflow-scrolling:touch}
@media(max-width:900px){
  .commerce-more-menu{grid-template-columns:repeat(2,minmax(0,1fr));width:min(560px,84vw)}
}
@media(max-width:650px){
  #content{min-width:0;max-width:100%;overflow-x:hidden}
  .commerce-hub{gap:12px;width:100%}
  .commerce-head{display:flex;align-items:center;gap:8px}
  .commerce-intro{display:none}
  .commerce-status{font-size:10px;padding:6px 9px}
  .commerce-nav-desktop{display:none!important}
  .commerce-mobile-nav{display:grid;gap:5px;background:#fff;border:1px solid #dfe8ee;border-radius:12px;padding:10px;position:sticky;top:8px;z-index:8;box-shadow:0 6px 20px rgba(8,40,67,.08)}
  .commerce-mobile-nav label{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#61778a}
  .commerce-mobile-nav select{width:100%;min-height:44px;border:1px solid #cbd9e2;border-radius:9px;background:#fff;color:#173b58;padding:9px 11px;font:inherit;font-size:16px;font-weight:800}
  .commerce-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .commerce-kpi{padding:12px;border-radius:13px}
  .commerce-kpi span{font-size:9px;line-height:1.25}
  .commerce-kpi strong{font-size:20px;margin-top:5px}
  .commerce-kpi small{font-size:10px;line-height:1.3}
  .commerce-grid{grid-template-columns:1fr;gap:10px}
  .commerce-panel{padding:13px;border-radius:13px}
  .commerce-panel h4{font-size:15px}
  .commerce-panel>p{font-size:11px;margin-bottom:10px}
  .commerce-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .commerce-actions button{width:100%;min-height:40px;padding:8px;font-size:11px}
  .commerce-form{grid-template-columns:1fr;gap:9px}
  .commerce-form input,.commerce-form select,.commerce-form textarea{font-size:16px;min-height:44px}
  .commerce-form button{min-height:44px}
  .commerce-table-wrap{overflow-x:auto!important;overflow-y:visible!important;border-radius:11px}
  .commerce-table{min-width:680px!important;display:table!important}
  .commerce-table thead{display:table-header-group!important}
  .commerce-table tbody{display:table-row-group!important}
  .commerce-table tr{display:table-row!important}
  .commerce-table th,.commerce-table td{display:table-cell!important;padding:9px 10px;font-size:11px}
  .commerce-table th{font-size:9px}
  .commerce-flow{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .commerce-step{padding:9px 7px}
  .commerce-definition-grid{grid-template-columns:1fr}
}
@media(max-width:390px){
  .commerce-kpis{grid-template-columns:1fr}
  .commerce-actions{grid-template-columns:1fr}
}


/* Commercial Hub tab interaction lock — keep Hub controls independent from platform-wide button styles. */
#content .commerce-hub .commerce-tabs{display:flex!important;gap:8px!important;flex-wrap:wrap!important;border-bottom:1px solid #29415f!important;padding-bottom:10px!important}
#content .commerce-hub .commerce-tabs [data-commerce-tab]{appearance:none!important;-webkit-appearance:none!important;border:1px solid #2b4b68!important;background:#071a2e!important;color:#f3f7fb!important;border-radius:10px!important;padding:10px 13px!important;min-height:42px!important;font:inherit!important;font-size:13px!important;font-weight:800!important;line-height:1.2!important;cursor:pointer!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;opacity:1!important;transition:background .16s ease,border-color .16s ease,transform .16s ease!important}
#content .commerce-hub .commerce-tabs [data-commerce-tab]:hover,
#content .commerce-hub .commerce-tabs [data-commerce-tab]:focus-visible{background:#123655!important;border-color:#4b7193!important;color:#fff!important;outline:none!important}
#content .commerce-hub .commerce-tabs [data-commerce-tab].active,
#content .commerce-hub .commerce-tabs [data-commerce-tab][aria-current="page"]{background:#f05a3c!important;border-color:#f05a3c!important;color:#fff!important;box-shadow:0 7px 18px rgba(240,90,60,.28)!important}
#content .commerce-hub .commerce-more summary{background:#071a2e!important;border-color:#2b4b68!important;color:#f3f7fb!important}
#content .commerce-hub .commerce-more summary:hover,
#content .commerce-hub .commerce-more summary:focus-visible{background:#123655!important;border-color:#4b7193!important;color:#fff!important;outline:none!important}
#content .commerce-hub .commerce-more summary.active{background:#f05a3c!important;border-color:#f05a3c!important;color:#fff!important}
#content .commerce-hub .commerce-more-menu{background:#061526!important;border-color:#27435f!important;box-shadow:0 16px 40px rgba(0,0,0,.34)!important}
#content .commerce-hub .commerce-mobile-nav{display:none!important}

@media(max-width:650px){
  #content .commerce-hub .commerce-nav-desktop{display:block!important}
  #content .commerce-hub .commerce-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  #content .commerce-hub .commerce-tabs [data-commerce-tab]{width:100%!important;min-width:0!important;white-space:normal!important;text-align:center!important;font-size:13px!important}
  #content .commerce-hub .commerce-more{grid-column:1/-1!important;width:100%!important}
  #content .commerce-hub .commerce-more summary{width:100%!important;box-sizing:border-box!important;text-align:center!important}
  #content .commerce-hub .commerce-more-menu{position:static!important;width:100%!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-top:8px!important;box-sizing:border-box!important}
  #content .commerce-hub .commerce-mobile-nav{display:none!important}
}
@media(max-width:390px){
  #content .commerce-hub .commerce-tabs{grid-template-columns:1fr!important}
  #content .commerce-hub .commerce-more-menu{grid-template-columns:1fr!important}
}


/* Finance Control desktop/readability refinement */
#content .commerce-hub .finance-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#content .commerce-hub .finance-action-panel{padding:14px 16px!important}
#content .commerce-hub .finance-action-panel .commerce-head{align-items:center!important}
#content .commerce-hub .finance-action-panel .commerce-actions{justify-content:flex-end!important}
@media(max-width:1100px){
  #content .commerce-hub .finance-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:650px){
  #content .commerce-hub .finance-kpis{grid-template-columns:1fr!important}
  #content .commerce-hub .finance-action-panel .commerce-actions{width:100%;display:grid!important;grid-template-columns:1fr 1fr!important}
}


/* Commercial Hub action-first workspace — 2026-09-23 */
#content .commerce-hub .commerce-quick-actions{
  margin:0 0 14px!important;
  padding:14px 16px!important;
  scroll-margin-top:86px;
}
#content .commerce-hub .commerce-quick-actions .commerce-head{
  margin-bottom:10px!important;
}
#content .commerce-hub .commerce-quick-actions .commerce-head h4{
  margin:0!important;
}
#content .commerce-hub .commerce-quick-actions .commerce-actions{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
}
#content .commerce-hub .commerce-quick-actions .commerce-actions button{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  padding:9px 10px!important;
  white-space:normal!important;
  line-height:1.2!important;
  text-align:center!important;
}
#content .commerce-hub .commerce-quick-actions .commerce-actions button.primary{
  background:#f05a3c!important;
  border-color:#f05a3c!important;
  color:#fff!important;
}
#content .commerce-hub :where(
  #commerceAccountForm,#commerceQuoteForm,#commerceInvoiceForm,#commerceSubscriptionForm,
  #commercePaymentForm,#commerceAccessForm,#commercePlanForm,#commerceCrmLeadForm,
  #commerceHardwareAssetForm,#commerceHardwareInstallForm,#commercePricingManager
){
  scroll-margin-top:92px;
}
@media(max-width:1050px){
  #content .commerce-hub .commerce-quick-actions .commerce-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:650px){
  #content .commerce-hub .commerce-quick-actions{
    padding:12px!important;
  }
  #content .commerce-hub .commerce-quick-actions .commerce-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  #content .commerce-hub .commerce-quick-actions .commerce-actions button{
    min-height:48px!important;
    padding:8px 6px!important;
    font-size:11px!important;
  }
  #content .commerce-hub .finance-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:360px){
  #content .commerce-hub .commerce-quick-actions .commerce-actions,
  #content .commerce-hub .finance-kpis{
    grid-template-columns:1fr!important;
  }
}
