/* ALPLINE 4.0.27 — LOCKED MASTER VISUAL REPAIR
   Purpose: eliminate stretched/empty layouts and unify public/admin/member/franchise
   without touching business data or calculations. Loaded last; intentionally decisive. */
:root{
  --a427-bg:#041713;--a427-bg2:#07241f;--a427-panel:#0a2d27;--a427-panel2:#0d3a31;
  --a427-line:rgba(255,255,255,.085);--a427-text:#eef8f4;--a427-muted:#91b2a7;
  --a427-green:#1dc48f;--a427-green2:#0b8f69;--a427-gold:#efc45a;--a427-blue:#58a8ff;
  --a427-purple:#a17bff;--a427-orange:#ff9b55;--a427-red:#ff6b70;
  --a427-shadow:0 18px 48px rgba(0,0,0,.20);
}

/* ===== GLOBAL ===== */
.release-427 *{box-sizing:border-box}
.release-427 a{text-underline-offset:3px}
.release-427 .flash{border-radius:12px!important;margin:10px auto!important;width:min(1480px,calc(100% - 24px))!important}
.release-427 .portal-content>*{max-width:1480px!important}
.release-427 .portal-content{overflow-x:hidden!important}

/* ===== PUBLIC HEADER: remove giant white pill / stretched navigation ===== */
body.public-body.release-427{background:#041713!important;color:var(--a427-text)!important}
body.public-body.release-427 .premium-company-header{position:sticky!important;top:0!important;z-index:200!important;background:rgba(4,23,19,.96)!important;border-bottom:1px solid var(--a427-line)!important;box-shadow:0 10px 30px rgba(0,0,0,.22)!important;backdrop-filter:blur(16px)!important}
body.public-body.release-427 .utility-bar{height:28px!important;min-height:28px!important;padding:0 clamp(16px,3vw,42px)!important;background:#020d0b!important;border:0!important}
body.public-body.release-427 .utility-bar nav{gap:14px!important}
body.public-body.release-427 .utility-bar a,body.public-body.release-427 .utility-bar span{font-size:9px!important;color:#9fc0b5!important}
body.public-body.release-427 .main-header{min-height:68px!important;padding:8px clamp(16px,3vw,42px)!important;display:grid!important;grid-template-columns:230px minmax(0,1fr) auto!important;align-items:center!important;gap:18px!important;background:linear-gradient(90deg,#041713,#07332c 58%,#07372d)!important}
body.public-body.release-427 .brand{min-width:0!important;padding:0!important;border:0!important;gap:10px!important;color:#fff!important}
body.public-body.release-427 .brand .crest{width:44px!important;height:44px!important;flex:0 0 44px!important;padding:0!important;border:0!important;background:transparent!important}
body.public-body.release-427 .brand b{font-size:20px!important;line-height:1!important;color:#fff!important;letter-spacing:.10em!important}
body.public-body.release-427 .brand small{font-size:7px!important;color:#80b7a5!important;letter-spacing:.12em!important}
body.public-body.release-427 .primary-nav{min-width:0!important;width:auto!important;max-width:none!important;display:flex!important;justify-content:center!important;align-items:center!important;gap:4px!important;margin:0!important;padding:4px!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(255,255,255,.065)!important;border-radius:14px!important;box-shadow:none!important;overflow:visible!important}
body.public-body.release-427 .primary-nav a{min-height:38px!important;padding:0 14px!important;display:flex!important;align-items:center!important;border:0!important;border-radius:10px!important;color:#b9d3ca!important;font-size:10px!important;font-weight:850!important;white-space:nowrap!important}
body.public-body.release-427 .primary-nav a:hover,body.public-body.release-427 .primary-nav a.active{background:linear-gradient(135deg,rgba(27,196,143,.18),rgba(239,196,90,.10))!important;color:#fff!important;box-shadow:inset 0 0 0 1px rgba(239,196,90,.18)!important}
body.public-body.release-427 .header-actions{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important}
body.public-body.release-427 .site-header .vip-command{width:auto!important;min-width:0!important;flex:0 0 auto!important}
body.public-body.release-427 .site-header .vip-command__trigger{width:42px!important;min-width:42px!important;height:38px!important;padding:0!important;border-radius:10px!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.10)!important;color:#fff!important}
body.public-body.release-427 .site-header .vip-command__trigger b,body.public-body.release-427 .site-header .vip-command__trigger kbd{display:none!important}
body.public-body.release-427 .site-header .vip-command__trigger>span{color:#8bd9bd!important;font-size:18px!important}
body.public-body.release-427 .public-portal-menu>summary,body.public-body.release-427 .public-mobile-menu>summary{height:38px!important;padding:0 12px!important;border-radius:10px!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.10)!important;color:#fff!important;font-size:9px!important;font-weight:900!important}
body.public-body.release-427 .header-join{height:38px!important;min-height:38px!important;padding:0 14px!important;border-radius:10px!important;background:linear-gradient(135deg,#f4d375,#dcae3b)!important;color:#183027!important;font-size:9px!important;font-weight:950!important}

/* ===== PUBLIC HOME: compact premium first fold ===== */
body.public-body.release-427 .alp-page{background:#041713!important}
body.public-body.release-427 .ap426-home-hero,body.public-body.release-427 .ap422-home-hero{width:min(1500px,calc(100% - 24px))!important;min-height:500px!important;margin:12px auto 0!important;padding:28px 30px!important;display:grid!important;grid-template-columns:minmax(0,.92fr) minmax(500px,1.08fr)!important;gap:28px!important;align-items:center!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:24px!important;overflow:hidden!important;background:radial-gradient(circle at 83% 12%,rgba(239,196,90,.16),transparent 19%),radial-gradient(circle at 70% 82%,rgba(29,196,143,.18),transparent 28%),linear-gradient(130deg,#041713 0%,#083b33 58%,#0a5945 100%)!important;box-shadow:var(--a427-shadow)!important}
body.public-body.release-427 .ap426-home-hero:before,body.public-body.release-427 .ap422-home-hero:before{content:""!important;position:absolute!important;inset:auto -5% -55px 32%!important;height:190px!important;background:linear-gradient(150deg,transparent 0 10%,rgba(255,255,255,.025) 10.5% 11.2%,transparent 11.7%),linear-gradient(25deg,transparent 0 35%,rgba(255,255,255,.02) 35.5% 36.2%,transparent 36.7%)!important;clip-path:polygon(0 72%,12% 42%,20% 60%,31% 19%,42% 65%,52% 38%,60% 57%,69% 24%,77% 57%,87% 35%,100% 69%,100% 100%,0 100%)!important;pointer-events:none!important}
body.public-body.release-427 .ap422-hero-copy{max-width:650px!important;padding:0!important}
body.public-body.release-427 .ap422-hero-copy .alp-overline{font-size:9px!important;letter-spacing:.15em!important;color:#72e3bb!important}
body.public-body.release-427 .ap422-hero-copy h1{max-width:650px!important;margin:10px 0 14px!important;font-size:clamp(45px,4.55vw,68px)!important;line-height:.93!important;letter-spacing:-.052em!important;color:#fff!important}
body.public-body.release-427 .ap422-hero-copy h1 em{color:var(--a427-gold)!important;font-style:normal!important}
body.public-body.release-427 .ap422-hero-copy>p{max-width:620px!important;margin:0!important;font-size:14px!important;line-height:1.55!important;color:#b8d1c8!important}
body.public-body.release-427 .ap422-hero-actions{gap:8px!important;margin-top:18px!important}
body.public-body.release-427 .ap422-hero-actions .alp-btn{min-height:42px!important;padding:0 16px!important;border-radius:11px!important;font-size:9px!important;font-weight:950!important}
body.public-body.release-427 .ap422-trust-ribbon{margin-top:20px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
body.public-body.release-427 .ap422-trust-ribbon>span{min-height:54px!important;padding:8px 10px!important;border-radius:12px!important;background:rgba(0,0,0,.15)!important;border:1px solid rgba(255,255,255,.07)!important}
body.public-body.release-427 .ap422-trust-ribbon i{width:28px!important;height:28px!important}
body.public-body.release-427 .ap422-trust-ribbon b{font-size:9px!important}body.public-body.release-427 .ap422-trust-ribbon small{font-size:7px!important}

body.public-body.release-427 .ap422-product-stage{min-width:0!important;min-height:390px!important;height:410px!important;max-height:410px!important;padding:12px!important;grid-template-columns:minmax(260px,1.15fr) minmax(220px,.85fr)!important;gap:9px!important;border-radius:22px!important;background:linear-gradient(145deg,rgba(5,29,25,.95),rgba(7,42,35,.93))!important;border:1px solid rgba(255,255,255,.10)!important;box-shadow:0 26px 65px rgba(0,0,0,.26)!important}
body.public-body.release-427 .ap422-stage-product{border-radius:15px!important;box-shadow:none!important}
body.public-body.release-427 .ap422-stage-product--main{padding:10px!important;background:linear-gradient(160deg,#0a322c,#071f1b)!important}
body.public-body.release-427 .ap422-stage-product--main img{height:300px!important;width:100%!important;object-fit:contain!important;object-position:center!important;padding:8px!important;border-radius:12px!important;background:radial-gradient(circle at 50% 35%,#ffffff 0%,#f0f6f3 55%,#dceae5 100%)!important;filter:none!important}
body.public-body.release-427 .ap422-stage-product--main>span{font-size:7px!important}
body.public-body.release-427 .ap422-stage-stack{gap:7px!important}
body.public-body.release-427 .ap422-stage-stack .ap422-stage-product{grid-template-columns:82px 1fr!important;padding:6px!important;background:#eef5f2!important}
body.public-body.release-427 .ap422-stage-stack img{width:82px!important;height:94px!important;object-fit:contain!important;padding:3px!important;background:#fff!important}
body.public-body.release-427 .ap422-stage-stack b{font-size:11px!important;color:#10362f!important}
body.public-body.release-427 .ap422-stage-seal{transform:scale(.86)!important;transform-origin:right bottom!important}
body.public-body.release-427 .ap422-public-command{width:min(1500px,calc(100% - 24px))!important;margin:10px auto 0!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important}
body.public-body.release-427 .ap422-public-command>a{min-height:70px!important;padding:10px!important;border-radius:13px!important;background:linear-gradient(145deg,#0a3029,#07231f)!important;box-shadow:none!important}
body.public-body.release-427 .ap422-public-command i{width:34px!important;height:34px!important;border-radius:10px!important}
body.public-body.release-427 .ap422-public-command b{font-size:10px!important}body.public-body.release-427 .ap422-public-command small{font-size:7px!important}
body.public-body.release-427 .alp-section{padding:44px 0!important}
body.public-body.release-427 .alp-shell{width:min(1500px,calc(100% - 24px))!important}
body.public-body.release-427 .alp-section-head h2{font-size:clamp(30px,3.2vw,48px)!important}
body.public-body.release-427 .alp-product-grid{grid-template-columns:1.2fr repeat(3,minmax(0,1fr))!important;gap:10px!important}
body.public-body.release-427 .alp-product-card{border-radius:16px!important}
body.public-body.release-427 .alp-product-image{min-height:210px!important;max-height:230px!important}
body.public-body.release-427 .alp-product-image img{height:220px!important;object-fit:contain!important;padding:10px!important}

/* ===== ADMIN / PORTAL SHELL ===== */
body.portal-body.release-427{background:#041713!important}
body.portal-body.release-427 .portal-shell{grid-template-columns:232px minmax(0,1fr)!important;background:#041713!important}
body.portal-body.release-427 .portal-sidebar{width:232px!important;min-width:232px!important;background:linear-gradient(180deg,#031512,#06251f 58%,#041b17)!important;border-right:1px solid rgba(255,255,255,.07)!important}
body.portal-body.release-427 .portal-stage{background:#061d19!important}
body.portal-body.release-427 .portal-topbar{height:60px!important;min-height:60px!important;padding:7px 14px!important;background:rgba(3,21,18,.96)!important}
body.portal-body.release-427 .portal-content{padding:12px 14px 24px!important;background:radial-gradient(circle at 91% -8%,rgba(27,196,143,.12),transparent 24%),#061d19!important;min-height:calc(100vh - 60px)!important}
body.portal-body.release-427 .portal-nav a{min-height:38px!important;padding:7px 8px!important;font-size:12px!important}
body.portal-body.release-427 .portal-nav a i{width:28px!important;height:28px!important}

/* Hero + KPI compact and powerful */
body.admin-portal.release-427 .admin-console{gap:10px!important}
body.admin-portal.release-427 .ap419-admin-hero{padding:16px!important;border-radius:18px!important;background:radial-gradient(circle at 92% 16%,rgba(239,196,90,.15),transparent 20%),linear-gradient(130deg,#082a24,#0a4538 58%,#0b5a43)!important}
body.admin-portal.release-427 .ap419-hero-copy h1{font-size:clamp(36px,3.6vw,58px)!important;margin:5px 0 8px!important}
body.admin-portal.release-427 .ap419-hero-copy>p{font-size:12px!important;line-height:1.45!important}
body.admin-portal.release-427 .ap419-owner-panel{max-width:280px!important}
body.admin-portal.release-427 .ap419-kpi-grid{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:7px!important;margin-top:12px!important}
body.admin-portal.release-427 .ap419-kpi{min-height:88px!important;padding:10px!important;border-radius:13px!important}
body.admin-portal.release-427 .ap419-kpi small{font-size:8px!important}body.admin-portal.release-427 .ap419-kpi b{font-size:21px!important}body.admin-portal.release-427 .ap419-kpi span{font-size:8px!important;line-height:1.2!important}

/* Fix the giant white analytics canvas seen on live dashboard */
body.admin-portal.release-427 .executive-intelligence{width:100%!important;margin:0!important;padding:0!important;display:grid!important;grid-template-columns:minmax(0,1.45fr) minmax(230px,.72fr) minmax(260px,.80fr)!important;gap:10px!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:var(--a427-text)!important;overflow:visible!important}
body.admin-portal.release-427 .executive-intelligence>article{min-width:0!important;min-height:258px!important;margin:0!important;padding:14px!important;border-radius:16px!important;background:linear-gradient(155deg,#0b302a,#08221e)!important;border:1px solid rgba(255,255,255,.08)!important;box-shadow:0 12px 28px rgba(0,0,0,.14)!important;color:var(--a427-text)!important}
body.admin-portal.release-427 .executive-intelligence h2{margin:3px 0 8px!important;font-size:20px!important;line-height:1.05!important;color:#fff!important}
body.admin-portal.release-427 .executive-intelligence .eyebrow{font-size:8px!important;color:#58ddb2!important}
body.admin-portal.release-427 .executive-intelligence svg{max-width:100%!important}
body.admin-portal.release-427 .intelligence-trend{min-height:170px!important}
body.admin-portal.release-427 .intelligence-trend svg{max-height:160px!important}
body.admin-portal.release-427 .intelligence-ring svg{max-width:155px!important;max-height:155px!important;margin:auto!important}
body.admin-portal.release-427 .activity-heatmap{overflow:hidden!important}
body.admin-portal.release-427 .activity-heatmap i{height:8px!important;border-radius:3px!important}
body.admin-portal.release-427 .activity-heatmap footer{background:transparent!important;color:#8eaaa1!important}

/* All dashboard / inner-module functional cards: dense, graphical, no waste */
body.admin-portal.release-427 .admin-quick-launch,body.admin-portal.release-427 .ap419-action-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important}
body.admin-portal.release-427 .admin-quick-launch>a,body.admin-portal.release-427 .ap419-action-grid>a{min-height:74px!important;padding:10px!important;border-radius:13px!important;position:relative!important;overflow:hidden!important}
body.admin-portal.release-427 .admin-quick-launch>a:after,body.admin-portal.release-427 .ap419-action-grid>a:after{content:"";position:absolute;right:-20px;bottom:-24px;width:70px;height:70px;border-radius:50%;background:radial-gradient(circle,rgba(29,196,143,.16),transparent 68%);pointer-events:none}
body.admin-portal.release-427 .control-card,body.admin-portal.release-427 .glass-panel,body.admin-portal.release-427 .workspace-card,body.admin-portal.release-427 .coverage-card{background:linear-gradient(150deg,#0a2d27,#071f1b)!important;border:1px solid rgba(255,255,255,.075)!important;color:#eef8f4!important;box-shadow:0 12px 28px rgba(0,0,0,.13)!important}
body.admin-portal.release-427 .control-card th{background:#0c362e!important;color:#78d7b1!important}

/* Member + Franchise: same application family */
body.member-portal.release-427 .seller-kpis,body.franchise-portal.release-427 .seller-kpis{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important}
body.member-portal.release-427 .seller-kpis article,body.franchise-portal.release-427 .seller-kpis article{min-height:96px!important;padding:11px!important;border-radius:14px!important}
body.member-portal.release-427 .command-grid,body.franchise-portal.release-427 .command-grid,body.franchise-portal.release-427 .franchise-command-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important}
body.member-portal.release-427 .command-grid>a,body.franchise-portal.release-427 .command-grid>a,body.franchise-portal.release-427 .franchise-command-grid>a{min-height:76px!important;padding:10px!important;border-radius:13px!important}
body.member-portal.release-427 .income-mix{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important}
body.member-portal.release-427 .income-mix>a{min-height:94px!important;padding:11px!important;position:relative!important;overflow:hidden!important}
body.member-portal.release-427 .income-mix>a:nth-child(5n+1){box-shadow:inset 0 3px 0 var(--a427-green)!important}body.member-portal.release-427 .income-mix>a:nth-child(5n+2){box-shadow:inset 0 3px 0 var(--a427-blue)!important}body.member-portal.release-427 .income-mix>a:nth-child(5n+3){box-shadow:inset 0 3px 0 var(--a427-purple)!important}body.member-portal.release-427 .income-mix>a:nth-child(5n+4){box-shadow:inset 0 3px 0 var(--a427-orange)!important}body.member-portal.release-427 .income-mix>a:nth-child(5n){box-shadow:inset 0 3px 0 var(--a427-gold)!important}

/* ===== RESPONSIVE ===== */
@media(max-width:1280px){
 body.public-body.release-427 .main-header{grid-template-columns:210px minmax(0,1fr) auto!important;gap:10px!important}
 body.public-body.release-427 .primary-nav a{padding:0 10px!important;font-size:9px!important}
 body.public-body.release-427 .ap426-home-hero,body.public-body.release-427 .ap422-home-hero{grid-template-columns:minmax(0,.9fr) minmax(430px,1.1fr)!important;padding:24px!important}
 body.admin-portal.release-427 .ap419-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 body.admin-portal.release-427 .admin-quick-launch,body.admin-portal.release-427 .ap419-action-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:980px){
 body.public-body.release-427 .main-header{display:flex!important;flex-wrap:wrap!important;padding:8px 14px!important}
 body.public-body.release-427 .primary-nav{order:3!important;width:100%!important;justify-content:flex-start!important;overflow:auto!important}
 body.public-body.release-427 .ap426-home-hero,body.public-body.release-427 .ap422-home-hero{grid-template-columns:1fr!important;min-height:0!important}
 body.public-body.release-427 .ap422-product-stage{height:auto!important;max-height:none!important;min-height:360px!important}
 body.public-body.release-427 .ap422-public-command{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 body.public-body.release-427 .alp-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.admin-portal.release-427 .executive-intelligence{grid-template-columns:1fr 1fr!important}
 body.admin-portal.release-427 .executive-intelligence>article:first-child{grid-column:1/-1!important}
 body.member-portal.release-427 .seller-kpis,body.franchise-portal.release-427 .seller-kpis,body.member-portal.release-427 .command-grid,body.franchise-portal.release-427 .command-grid,body.franchise-portal.release-427 .franchise-command-grid,body.member-portal.release-427 .income-mix{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
 body.public-body.release-427 .utility-bar{display:none!important}
 body.public-body.release-427 .main-header{min-height:58px!important;flex-wrap:nowrap!important}
 body.public-body.release-427 .brand{margin-right:auto!important}
 body.public-body.release-427 .brand .crest{width:38px!important;height:38px!important;flex-basis:38px!important}
 body.public-body.release-427 .brand b{font-size:17px!important}body.public-body.release-427 .brand small{display:none!important}
 body.public-body.release-427 .primary-nav{display:none!important}
 body.public-body.release-427 .public-mobile-menu{display:block!important}
 body.public-body.release-427 .header-join{display:none!important}
 body.public-body.release-427 .ap426-home-hero,body.public-body.release-427 .ap422-home-hero{width:calc(100% - 12px)!important;margin-top:6px!important;padding:18px!important;border-radius:18px!important;gap:16px!important}
 body.public-body.release-427 .ap422-hero-copy h1{font-size:clamp(38px,12vw,52px)!important}
 body.public-body.release-427 .ap422-hero-copy>p{font-size:13px!important}
 body.public-body.release-427 .ap422-product-stage{grid-template-columns:1fr!important;min-height:0!important;padding:9px!important}
 body.public-body.release-427 .ap422-stage-product--main img{height:230px!important}
 body.public-body.release-427 .ap422-stage-stack{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:none!important}
 body.public-body.release-427 .ap422-stage-stack .ap422-stage-product{display:block!important;padding:5px!important}.public-body.release-427 .ap422-stage-stack img{width:100%!important;height:90px!important}.public-body.release-427 .ap422-stage-stack .ap422-stage-product>div{padding:5px!important}.public-body.release-427 .ap422-stage-stack small{display:none!important}
 body.public-body.release-427 .ap422-stage-seal{display:none!important}
 body.public-body.release-427 .ap422-public-command{width:calc(100% - 12px)!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.public-body.release-427 .alp-shell{width:calc(100% - 16px)!important}.public-body.release-427 .alp-product-grid{grid-template-columns:1fr!important}
 body.portal-body.release-427 .portal-shell{display:block!important}.release-427 .portal-sidebar{position:fixed!important;left:-245px!important;z-index:90!important}.release-427.sidebar-open .portal-sidebar{left:0!important}
 body.admin-portal.release-427 .ap419-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.admin-portal.release-427 .executive-intelligence{grid-template-columns:1fr!important}body.admin-portal.release-427 .executive-intelligence>article:first-child{grid-column:auto!important}
 body.admin-portal.release-427 .admin-quick-launch,body.admin-portal.release-427 .ap419-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.member-portal.release-427 .seller-kpis,body.franchise-portal.release-427 .seller-kpis,body.member-portal.release-427 .command-grid,body.franchise-portal.release-427 .command-grid,body.franchise-portal.release-427 .franchise-command-grid,body.member-portal.release-427 .income-mix{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
