/* =========================================================
   AUTHENTICATED SQUARE UI v6
   - flat maroon header and workspace menu
   - menu names only with light separators
   - square cards, inputs, actions and filters
   - tablet/mobile breakpoint fixed at 900px
   - removes empty hero/filter space on user pages
========================================================= */
:root{
 --he-shell-top:64px;
 --he-shell-side:270px;
 --he-shell-brand:var(--he-primary,#800040);
 --he-shell-brand-2:var(--he-primary-88,#710637);
 --he-shell-deep:var(--he-primary-deep,#65063A);
 --he-shell-gold:#f6bd55;
 --he-shell-bg:#f4f5f7;
 --he-shell-line:var(--he-primary-soft-3,#EBCBD9);
 --he-shell-text:#172033;
 --he-shell-muted:#5b6678;
}
html body.he-shell-active{background:var(--he-shell-bg)!important;color:var(--he-shell-text)!important}
.he-shell-topbar{height:var(--he-shell-top)!important;background:var(--he-primary-gradient,var(--he-shell-brand))!important;box-shadow:0 2px 0 rgba(var(--he-primary-rgb,128,0,64),.18)!important;border-bottom:1px solid rgba(255,255,255,.18)!important}
.he-shell-brand,.he-shell-page-context,.he-shell-account,.he-shell-icon-action,.he-shell-toggle,.he-shell-avatar,.he-shell-page-context-icon,.he-shell-sidebar,.he-shell-sidebar-head,.he-shell-role-icon,.he-shell-close,.he-shell-nav a,.he-shell-nav-icon,.he-shell-main-link,.he-shell-logout{border-radius:0!important}
.he-shell-brand{padding:0 16px!important}.he-shell-brand img{width:38px!important;height:38px!important}
.he-shell-page-context{padding:0 16px!important}.he-shell-page-context-icon{width:34px!important;height:34px!important;flex-basis:34px!important}
.he-shell-page-context b{font-size:14px!important}.he-shell-page-context small{font-size:10px!important}
.he-shell-sidebar{background:var(--he-primary-gradient,var(--he-shell-deep))!important;padding:0 14px 14px!important;box-shadow:6px 0 18px rgba(39,4,14,.16)!important}
.he-shell-sidebar-head{min-height:72px;padding:12px 4px!important;margin:0!important;border-bottom:1px solid rgba(255,255,255,.18)!important}
.he-shell-sidebar-head b{font-size:14px!important;letter-spacing:.04em!important}.he-shell-role-icon{width:38px!important;height:38px!important;flex-basis:38px!important}
.he-shell-nav-label{padding:13px 4px 8px!important;color:var(--he-shell-gold)!important;font-size:10px!important}
.he-shell-nav{display:block!important}
.he-shell-nav a{min-height:52px!important;padding:8px 4px!important;gap:10px!important;background:transparent!important;border:0!important;border-bottom:1px solid rgba(255,255,255,.13)!important;box-shadow:none!important}
.he-shell-nav a:first-child{border-top:1px solid rgba(255,255,255,.13)!important}
.he-shell-nav a:hover,.he-shell-nav a.active{background:rgba(255,255,255,.09)!important;box-shadow:inset 4px 0 0 var(--he-shell-gold)!important}
.he-shell-nav-icon{width:34px!important;height:34px!important;flex-basis:34px!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.16)!important}
.he-shell-nav strong{font-size:12.5px!important;line-height:1.25!important;letter-spacing:.02em!important}
.he-shell-nav small{display:none!important}
.he-shell-sidebar-footer{padding-top:14px!important}.he-shell-main-link,.he-shell-logout{min-height:42px!important}

/* Square system across every authenticated role/page. */
html body.he-shell-active :is(
 .a-hero,.t-hero,.tg-hero,.mg-hero,.inf-hero,.sm-hero,.he-dash-hero,
 .a-card,.t-card,.inf-card,.sm-card,.seller-card,.ia-card,.he-panel,
 .a-stat,.t-stat,.inf-stat,.sm-stat,.seller-stat,.tia-stat,.tsv-stat,.is-stat,.idash-stat,
 .a-btn,.t-btn,.inf-btn,.sm-btn,.seller-btn,.he-btn-sm,
 .a-input,.t-input,.inf-input,.sm-input,.a-select,.t-select,.inf-select,.sm-select,.a-textarea,.t-textarea,
 .a-table-wrap,.t-table-wrap,.inf-table-wrap,.sm-table-wrap,.ti-table-wrap,.mi-table-wrap,.tid-table-wrap,
 .a-badge,.t-badge,.inf-badge,.sm-badge,.a-chip,.t-chip,.inf-chip,.sm-chip,
 .az-order-hero,.az-order-pill,.az-order-hero-card,.az-order-hero-icon,.az-order-btn,.az-order-filter,.az-order-list-panel,.az-order-filter-icon,.az-order-filter-close,.az-order-select,.az-order-count-badge,.az-order-stat,.az-order-stat i,.az-order-empty,.az-order-item,.az-order-no,.az-order-state,.az-order-renew,.az-order-money,.az-order-note,
 .az-bill-hero,.az-bill-pill,.az-bill-wallet-card,.az-bill-wallet-icon,.az-bill-btn,.az-bill-stat,.az-bill-stat i,.az-bill-filter,.az-bill-select,.az-bill-panel,.az-bill-panel-icon,.az-bill-card,.az-cycle-card,.az-cycle-money,.az-cycle-pay-box,.az-cycle-pay-row,.az-options-empty,.az-option-chip,.az-bill-status,.az-bill-table-wrap,
 .hew-badge,.hew-balance-card,.hew-balance-icon,.hew-alert,.hew-summary-card,.hew-summary-card i,.hew-panel,.hew-field,.hew-input,.hew-select,.hew-btn,.hew-table-card,.hew-table-wrap,.hew-pill,.hew-sheet-close,
 .he-aff-hero,.he-aff-badge,.he-ref-copy-box,.he-aff-quick-actions a,.he-aff-mobile-filter,.he-filter-sheet,.he-aff-filter-close,.he-summary-card,.he-summary-icon,.he-panel,.he-table-wrap,
 .he-exp-mini,.he-exp-stat,.he-user-quick-grid a,.he-user-quick-grid a>span,.he-order-item,.he-order-actions a,.he-ref-box,.he-copy-row input,.he-copy-row button,.he-ref-mini,.he-renew-item,.he-badge,.he-category-badge
){border-radius:0!important}
html body.he-shell-active :is(button,input,select,textarea){border-radius:0!important}
html body.he-shell-active :is(.a-card,.t-card,.inf-card,.sm-card,.seller-card,.ia-card,.he-panel,.az-order-list-panel,.az-bill-panel,.hew-panel,.he-summary-card,.he-user-quick-grid a){box-shadow:0 2px 8px rgba(15,23,42,.05)!important}

/* Compact common page rhythm. */
html body.he-shell-active :is(.a-page,.t-page,.sm-page,#he-inf-page,.he-service-dash,.ia-page,.az-order-page,.az-bill-page,.hew-page,.he-aff-page){padding-bottom:22px!important}
html body.he-shell-active :is(.a-wrap,.t-wrap,.sm-wrap,.inf-wrap,.he-dash-wrap,.he-body-wrap,.ia-wrap,.az-order-wrap,.az-bill-wrap,.hew-wrap,.he-aff-wrap){max-width:1320px!important}
html body.he-shell-active :is(.a-card,.t-card,.inf-card,.sm-card,.seller-card,.ia-card,.he-panel,.az-order-list-panel,.az-bill-panel,.hew-panel)+:is(.a-card,.t-card,.inf-card,.sm-card,.seller-card,.ia-card,.he-panel,.az-order-list-panel,.az-bill-panel,.hew-panel){margin-top:10px!important}

/* My Orders: no blank filter column/empty gap at tablet and mobile widths. */
.az-order-hero{margin:10px auto 0!important;padding:10px 12px!important;border-radius:0!important;box-shadow:none!important}
.az-order-hero-inner{gap:10px!important}.az-order-pill{margin-bottom:3px!important;min-height:22px!important}.az-order-title{font-size:28px!important}.az-order-sub{margin-top:3px!important}
.az-order-hero-card{padding:7px 8px!important;min-width:300px!important}.az-order-wrap{margin-top:8px!important}
.az-order-board{gap:10px!important}.az-order-list-head{min-height:52px!important;padding:9px 11px!important}
.az-order-stats{gap:7px!important;padding:8px 10px!important}.az-order-stat{min-height:58px!important;padding:7px 8px!important}.az-order-stat i{width:30px!important;height:30px!important}
.az-order-item{padding:10px!important}.az-order-money{padding:6px!important}

/* My Wallet: compact header, icon-led square KPI grid. */
.hew-page{background:var(--he-shell-bg)!important;padding-bottom:22px!important}
.hew-hero{padding:14px 0!important;margin-bottom:0!important;background:var(--he-primary-gradient,var(--he-shell-brand))!important;overflow:hidden!important}
.hew-hero:before,.hew-hero:after{display:none!important}.hew-hero-inner{grid-template-columns:minmax(0,1fr) 250px!important;gap:14px!important}.hew-hero-text{text-align:left!important}
.hew-badge{padding:0!important;border:0!important;background:transparent!important;margin:0 0 3px!important;font-size:10px!important;justify-content:flex-start!important}
.hew-hero h1{font-size:30px!important;line-height:1.05!important;margin:0 0 3px!important;text-align:left!important;text-shadow:none!important}.hew-hero p{font-size:12px!important;line-height:1.35!important;text-align:left!important;max-width:700px!important;margin:0!important;text-shadow:none!important}
.hew-balance-card{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:center!important;gap:4px 10px!important;padding:10px!important;text-align:left!important;box-shadow:none!important}.hew-balance-icon{grid-row:1/3!important;width:42px!important;height:42px!important;margin:0!important}.hew-balance-card span{margin:0!important;font-size:10px!important}.hew-balance-card b{font-size:23px!important}
.hew-content{padding-top:10px!important}.hew-summary-grid{gap:8px!important;margin-bottom:10px!important}.hew-summary-card{display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-items:center!important;gap:2px 9px!important;min-height:70px!important;padding:10px!important;text-align:left!important}.hew-summary-card i{grid-row:1/3!important;width:36px!important;height:36px!important;margin:0!important}.hew-summary-card b{font-size:19px!important;margin:0!important}.hew-summary-card span{font-size:10px!important}
.hew-top-grid{gap:10px!important;margin-bottom:10px!important}.hew-panel-strip{height:3px!important}.hew-panel-body{padding:14px!important}.hew-panel-title{font-size:18px!important}.hew-panel-sub{margin-bottom:10px!important}.hew-field{min-height:42px!important}.hew-btn{min-height:42px!important}

/* Bills & Pay: keep icons visible and pair icon + amount in a square grid. */
.az-bill-hero{padding:12px max(12px,calc((100% - 1320px)/2))!important;background:var(--he-primary-gradient,var(--he-shell-brand))!important}.az-bill-hero-inner{grid-template-columns:minmax(0,1fr) 250px!important}.az-bill-pill{background:transparent!important;border:0!important;padding:0!important;margin-bottom:3px!important}.az-bill-title{font-size:30px!important}.az-bill-sub{margin-top:3px!important}.az-bill-wallet-card{padding:9px!important;box-shadow:none!important}
.az-bill-wrap{width:min(1320px,calc(100% - 24px))!important;margin-top:10px!important}.az-bill-stats{gap:8px!important;margin-bottom:10px!important}.az-bill-stat{display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;grid-template-rows:auto auto!important;align-items:center!important;gap:2px 9px!important;min-height:70px!important;padding:10px!important;text-align:left!important}.az-bill-stat i{display:grid!important;grid-row:1/3!important;width:36px!important;height:36px!important;margin:0!important;place-items:center!important}.az-bill-stat b{font-size:18px!important;line-height:1.1!important}.az-bill-stat span{font-size:10px!important}.az-bill-filter{padding:9px!important}.az-bill-panel{margin-bottom:10px!important}

/* Affiliate and service dashboard square/compact layout. */
.he-aff-hero{padding:14px!important;margin-bottom:10px!important}.he-aff-title{font-size:30px!important}.he-summary-grid{gap:8px!important}.he-summary-card{min-height:72px!important;padding:10px!important}.he-summary-icon{width:36px!important;height:36px!important}
.he-dash-hero{padding:12px 0!important;margin-bottom:10px!important}.he-exp-mini{margin-bottom:3px!important}.he-exp-title{font-size:30px!important}.he-exp-sub{margin-top:3px!important}.he-exp-stats{gap:8px!important;margin-top:10px!important}.he-exp-stat{min-height:68px!important;padding:9px!important}.he-user-quick-grid{gap:8px!important;margin-bottom:10px!important}.he-user-quick-grid a{min-height:62px!important;padding:9px!important}.he-main-grid{gap:10px!important}.he-panel-head{padding:10px 12px!important}.he-panel-body{padding:10px 12px!important}

@media(max-width:900px){
 :root{--he-shell-top:60px}
 .he-shell-topbar{height:60px!important}.he-shell-sidebar{padding:0 12px 12px!important}.he-shell-sidebar-head{min-height:66px!important}.he-shell-nav-label{padding-top:11px!important}.he-shell-nav a{min-height:50px!important}.he-shell-nav{gap:0!important}
 html body.he-shell-active :is(.a-wrap,.t-wrap,.sm-wrap,.inf-wrap,.he-dash-wrap,.he-body-wrap,.ia-wrap,.az-order-wrap,.az-bill-wrap,.hew-wrap,.he-aff-wrap){width:calc(100% - 16px)!important}
 /* Correct tablet/mobile order layout, including 768px devices. */
 .az-order-hero{width:calc(100% - 16px)!important;margin-top:8px!important;padding:9px!important}.az-order-hero-inner{display:grid!important;grid-template-columns:1fr!important}.az-order-hero-card{width:100%!important;min-width:0!important;grid-template-columns:34px minmax(0,1fr) auto!important}.az-order-title{font-size:25px!important}.az-order-sub{font-size:11.5px!important;line-height:1.4!important}.az-order-wrap{width:calc(100% - 16px)!important;margin-top:8px!important}.az-order-board{display:block!important}.az-order-list-panel{width:100%!important;margin:0!important}.az-order-filter{position:fixed!important;z-index:13051!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;max-height:82dvh!important;margin:0!important;transform:translateY(105%)!important;visibility:hidden!important;pointer-events:none!important;overflow-y:auto!important;border-width:1px 0 0!important}.az-order-filter.open{transform:translateY(0)!important;visibility:visible!important;pointer-events:auto!important}.az-order-filter-backdrop{display:block!important;position:fixed!important;z-index:13050!important;inset:0!important}.az-order-mobile-filter{display:inline-flex!important}.az-order-list-head{margin:0!important}.az-order-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.az-order-stat span{font-size:10px!important}.az-order-list{padding:8px!important}.az-order-item{grid-template-columns:1fr!important}.az-order-side{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0!important}
 /* Wallet: no oversized banner or blank description area. */
 .hew-hero{padding:9px 0!important}.hew-hero-inner{grid-template-columns:1fr!important;gap:7px!important}.hew-hero-text{text-align:center!important}.hew-badge{justify-content:center!important}.hew-hero h1{text-align:center!important;font-size:25px!important}.hew-hero p{display:none!important}.hew-balance-card{width:100%!important;grid-template-columns:36px minmax(0,1fr)!important;padding:8px!important}.hew-balance-icon{width:36px!important;height:36px!important}.hew-balance-card b{font-size:20px!important}.hew-content{padding-top:8px!important}.hew-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.hew-summary-card{min-height:62px!important;grid-template-columns:32px minmax(0,1fr)!important;padding:8px!important}.hew-summary-card:last-child:nth-child(odd){grid-column:1/-1!important}.hew-summary-card i{width:32px!important;height:32px!important}.hew-summary-card b{font-size:17px!important}.hew-top-grid{display:block!important}.hew-panel{margin-bottom:8px!important}.hew-panel-body{padding:10px!important}.hew-filter-panel{border-radius:0!important}.hew-filter-panel:before{display:none!important}.hew-filter-panel.open{transform:translateY(0)!important}.hew-table-head{gap:8px!important}.hew-table-title-box p{display:none!important}
 /* Bills mobile icons stay visible. */
 .az-bill-hero{padding:9px!important}.az-bill-hero-inner{grid-template-columns:1fr!important;gap:7px!important}.az-bill-title{font-size:25px!important}.az-bill-sub{display:none!important}.az-bill-wallet-card{grid-template-columns:34px minmax(0,1fr) auto!important}.az-bill-wallet-icon{width:34px!important;height:34px!important}.az-bill-wrap{width:calc(100% - 16px)!important}.az-bill-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.az-bill-stat{min-height:62px!important;grid-template-columns:31px minmax(0,1fr)!important;padding:8px!important}.az-bill-stat i{display:grid!important;width:31px!important;height:31px!important}.az-bill-stat b{font-size:16px!important}.az-bill-stat span{font-size:9.5px!important}.az-bill-filter{border-radius:0!important}.az-bill-panel-head,.az-bill-panel-body{padding:9px!important}
 /* Service dashboard mobile: clean 2-column actions and single flow. */
 .he-dash-hero{padding:9px 0!important}.he-exp-title{font-size:25px!important}.he-exp-sub{display:none!important}.he-exp-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.he-exp-stat{min-height:62px!important}.he-user-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.he-user-quick-grid a{min-height:66px!important;padding:8px!important}.he-user-quick-grid a small{display:none!important}.he-main-grid{grid-template-columns:1fr!important}.he-panel-head{align-items:center!important}.he-order-item,.he-renew-item{padding:9px!important}.he-ref-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.he-ref-mini:last-child:nth-child(odd){grid-column:1/-1!important}
 .he-aff-hero{padding:10px!important}.he-aff-sub{display:none!important}.he-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:520px){
 .he-shell-brand{padding:0 8px!important}.he-shell-brand img{width:34px!important;height:34px!important}.he-shell-wordmark{font-size:13px!important}.he-shell-top-actions{padding-right:6px!important}.he-shell-toggle,.he-shell-icon-action{width:36px!important;height:36px!important}
 .az-order-hero-card{grid-template-columns:32px minmax(0,1fr)!important}.az-order-hero-card .az-order-btn{grid-column:1/-1!important;width:100%!important}.az-order-list-head{align-items:center!important}.az-order-count-badge{padding:0 7px!important}.az-order-money-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .hew-summary-card b,.az-bill-stat b{font-size:15px!important}.hew-panel-title{font-size:16px!important}
}


/* Final cascade corrections: loaded after every page-level stylesheet. */
@media(max-width:900px){
 .az-order-filter-backdrop{background:rgba(32,6,16,.56)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:.2s ease!important}
 .az-order-filter-backdrop.open{opacity:1!important;visibility:visible!important;pointer-events:auto!important}
 body.az-order-filter-open{overflow:hidden!important}

 .hew-filter-panel{position:fixed!important;z-index:13051!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;max-height:84dvh!important;margin:0!important;border-width:1px 0 0!important;box-shadow:0 -16px 40px rgba(31,7,16,.28)!important;transform:translateY(105%)!important;visibility:hidden!important;pointer-events:none!important;transition:transform .22s ease,visibility .22s!important;overflow-y:auto!important}
 .hew-filter-panel.open{transform:translateY(0)!important;visibility:visible!important;pointer-events:auto!important}
 .hew-filter-panel .hew-panel-strip{display:none!important}.hew-filter-panel .hew-desktop-filter-title{display:none!important}.hew-filter-panel>.hew-panel-body>.hew-panel-sub{display:none!important}.hew-sheet-head{display:flex!important}.hew-sheet-close{display:grid!important;place-items:center!important}.hew-mobile-filter{display:inline-flex!important}
 .hew-filter-backdrop{display:block!important;position:fixed!important;z-index:13050!important;inset:0!important;background:rgba(32,6,16,.56)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:.2s!important}.hew-filter-backdrop.open{opacity:1!important;visibility:visible!important;pointer-events:auto!important}body.hew-filter-open{overflow:hidden!important}

 .az-bill-mobile-tools{display:flex!important}.az-bill-mobile-filter{display:inline-flex!important}
 .az-bill-filter{position:fixed!important;z-index:13051!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;max-height:82dvh!important;margin:0!important;padding:10px 12px calc(16px + env(safe-area-inset-bottom))!important;border-width:1px 0 0!important;box-shadow:0 -16px 40px rgba(31,7,16,.28)!important;transform:translateY(105%)!important;visibility:hidden!important;pointer-events:none!important;transition:transform .22s ease,visibility .22s!important;overflow-y:auto!important}.az-bill-filter.open{transform:translateY(0)!important;visibility:visible!important;pointer-events:auto!important}.az-bill-filter-head{display:flex!important}.az-bill-filter-close{display:grid!important;place-items:center!important}.az-bill-form{grid-template-columns:1fr!important}
 .az-bill-filter-backdrop{display:block!important;position:fixed!important;z-index:13050!important;inset:0!important;background:rgba(32,6,16,.56)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:.2s!important}.az-bill-filter-backdrop.open{opacity:1!important;visibility:visible!important;pointer-events:auto!important}body.az-bill-filter-open{overflow:hidden!important}

 .he-aff-mobile-filter{display:flex!important}.he-filter-sheet-head{display:flex!important}.he-aff-filter-close{display:grid!important;place-items:center!important}
 .he-filter-bar{position:fixed!important;z-index:13051!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;max-height:84dvh!important;margin:0!important;padding:10px 12px calc(16px + env(safe-area-inset-bottom))!important;border-width:1px 0 0!important;background:#fff!important;box-shadow:0 -16px 40px rgba(31,7,16,.28)!important;transform:translateY(105%)!important;visibility:hidden!important;pointer-events:none!important;transition:transform .22s ease,visibility .22s!important;overflow-y:auto!important;display:grid!important;grid-template-columns:1fr!important}.he-filter-bar.open{transform:translateY(0)!important;visibility:visible!important;pointer-events:auto!important}
 .he-aff-filter-backdrop{display:block!important;position:fixed!important;z-index:13050!important;inset:0!important;background:rgba(32,6,16,.56)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:.2s!important}.he-aff-filter-backdrop.open{opacity:1!important;visibility:visible!important;pointer-events:auto!important}body.he-aff-filter-open{overflow:hidden!important}

 .he-summary-icon{display:grid!important;place-items:center!important}
}

