/* ALPLINE 4.0.28 — Admin Visual Repair
   Purpose: remove repeated oversized decorative blobs, restore purposeful functional icons,
   compact admin action cards, and fix low-contrast public story panel without touching logic. */

:root{
  --a428-bg:#061d19;
  --a428-panel:#0a2b25;
  --a428-panel2:#0b342c;
  --a428-line:rgba(255,255,255,.09);
  --a428-text:#edf8f4;
  --a428-muted:#9fc2b8;
  --a428-gold:#efc45a;
  --a428-green:#20c997;
}

/* ---------- ADMIN: purposeful application cards, no decorative blobs ---------- */
body.admin-portal.release-428 .admin-quick-launch,
body.admin-portal.release-428 .ap419-action-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
}

body.admin-portal.release-428 .admin-quick-launch>a,
body.admin-portal.release-428 .ap419-action-grid>a{
  min-height:76px!important;
  padding:10px 12px!important;
  display:grid!important;
  grid-template-columns:36px minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:10px!important;
  position:relative!important;
  overflow:hidden!important;
  border-radius:13px!important;
  background:linear-gradient(145deg,#0b312a,#08251f)!important;
  border:1px solid var(--a428-line)!important;
  color:var(--a428-text)!important;
  box-shadow:0 9px 22px rgba(0,0,0,.12)!important;
  text-decoration:none!important;
}
body.admin-portal.release-428 .admin-quick-launch>a:hover,
body.admin-portal.release-428 .ap419-action-grid>a:hover{
  transform:translateY(-2px)!important;
  border-color:rgba(239,196,90,.34)!important;
  background:linear-gradient(145deg,#0c382f,#092b24)!important;
}

/* kill every legacy decorative disc/pseudo graphic on functional cards */
body.admin-portal.release-428 .admin-quick-launch>a::before,
body.admin-portal.release-428 .admin-quick-launch>a::after,
body.admin-portal.release-428 .ap419-action-grid>a::before,
body.admin-portal.release-428 .ap419-action-grid>a::after,
body.admin-portal.release-428 .admin-kpis>article::before,
body.admin-portal.release-428 .admin-kpis>article::after,
body.admin-portal.release-428 .ap419-kpi::before,
body.admin-portal.release-428 .ap419-kpi::after{
  content:none!important;
  display:none!important;
  background:none!important;
  box-shadow:none!important;
}

/* each function keeps its own symbol inside a small controlled app icon */
body.admin-portal.release-428 .admin-quick-launch>a>i,
body.admin-portal.release-428 .ap419-action-grid>a>i{
  position:static!important;
  inset:auto!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  flex:0 0 34px!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  padding:0!important;
  border-radius:10px!important;
  font-style:normal!important;
  font-size:15px!important;
  font-weight:900!important;
  line-height:1!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:none!important;
  background:linear-gradient(145deg,#0fa87b,#08745f)!important;
  overflow:hidden!important;
}
body.admin-portal.release-428 .admin-quick-launch>a:nth-child(6n+2)>i,
body.admin-portal.release-428 .ap419-action-grid>a:nth-child(6n+2)>i{background:linear-gradient(145deg,#3e8df5,#245fb8)!important}
body.admin-portal.release-428 .admin-quick-launch>a:nth-child(6n+3)>i,
body.admin-portal.release-428 .ap419-action-grid>a:nth-child(6n+3)>i{background:linear-gradient(145deg,#8c66e9,#6844b8)!important}
body.admin-portal.release-428 .admin-quick-launch>a:nth-child(6n+4)>i,
body.admin-portal.release-428 .ap419-action-grid>a:nth-child(6n+4)>i{background:linear-gradient(145deg,#d7a531,#9d721a)!important;color:#17271f!important}
body.admin-portal.release-428 .admin-quick-launch>a:nth-child(6n+5)>i,
body.admin-portal.release-428 .ap419-action-grid>a:nth-child(6n+5)>i{background:linear-gradient(145deg,#26a7b6,#16727c)!important}
body.admin-portal.release-428 .admin-quick-launch>a:nth-child(6n)>i,
body.admin-portal.release-428 .ap419-action-grid>a:nth-child(6n)>i{background:linear-gradient(145deg,#d76372,#9e3447)!important}

body.admin-portal.release-428 .admin-quick-launch>a>span,
body.admin-portal.release-428 .ap419-action-grid>a>span{
  min-width:0!important;
  display:grid!important;
  gap:3px!important;
  align-content:center!important;
}
body.admin-portal.release-428 .admin-quick-launch>a b,
body.admin-portal.release-428 .ap419-action-grid>a b{
  color:#fff!important;
  font-size:10px!important;
  line-height:1.15!important;
  letter-spacing:.025em!important;
  white-space:normal!important;
}
body.admin-portal.release-428 .admin-quick-launch>a small,
body.admin-portal.release-428 .ap419-action-grid>a small{
  color:#90b5aa!important;
  font-size:8px!important;
  line-height:1.25!important;
  white-space:normal!important;
}
body.admin-portal.release-428 .admin-quick-launch .data-badge,
body.admin-portal.release-428 .ap419-action-grid .data-badge{
  position:absolute!important;
  top:7px!important;
  right:7px!important;
  z-index:4!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 6px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:99px!important;
  background:#efc45a!important;
  color:#14241f!important;
  font-size:9px!important;
  font-weight:950!important;
  box-shadow:0 3px 10px rgba(0,0,0,.2)!important;
}
body.admin-portal.release-428 .admin-quick-launch .data-badge.critical,
body.admin-portal.release-428 .ap419-action-grid .data-badge.critical{background:#ff6678!important;color:#fff!important}

/* calm KPIs; real data is the graphic, not a giant circle */
body.admin-portal.release-428 .admin-kpis,
body.admin-portal.release-428 .ap419-kpi-grid{gap:7px!important}
body.admin-portal.release-428 .admin-kpis>article,
body.admin-portal.release-428 .ap419-kpi{
  overflow:hidden!important;
  background:linear-gradient(150deg,#0b3029,#08241f)!important;
  border:1px solid var(--a428-line)!important;
  box-shadow:inset 0 2px 0 rgba(32,201,151,.28),0 8px 20px rgba(0,0,0,.10)!important;
}

/* analytics: no white canvas, no excessive height */
body.admin-portal.release-428 .executive-intelligence{
  grid-template-columns:minmax(0,1.35fr) minmax(210px,.72fr) minmax(240px,.82fr) minmax(260px,.92fr)!important;
  gap:9px!important;
  background:transparent!important;
}
body.admin-portal.release-428 .executive-intelligence>article{
  min-height:245px!important;
  padding:13px!important;
  background:linear-gradient(155deg,#0b302a,#08221e)!important;
  border:1px solid var(--a428-line)!important;
  color:var(--a428-text)!important;
}
body.admin-portal.release-428 .executive-intelligence>article svg{
  max-width:100%!important;
  max-height:165px!important;
}

/* system strip remains compact and purely functional */
body.admin-portal.release-428 .ap420-system-strip{gap:7px!important}
body.admin-portal.release-428 .ap420-system-strip>a,
body.admin-portal.release-428 .ap420-system-strip>span{
  min-height:54px!important;
  padding:8px 10px!important;
  border-radius:12px!important;
}

/* ---------- PUBLIC: fix the low-contrast cream story panel only ---------- */
body.public-body.release-428 .alp-story--accent{
  background:linear-gradient(145deg,#fffdf7,#efe4ca)!important;
  border-color:#dec995!important;
}
body.public-body.release-428 .alp-story--accent h2{
  color:#0b3028!important;
  text-shadow:none!important;
}
body.public-body.release-428 .alp-story--accent p{
  color:#4b6259!important;
}
body.public-body.release-428 .alp-story--accent .alp-overline{
  color:#16856a!important;
}
body.public-body.release-428 .alp-story--accent .alp-text-link{
  color:#0b3028!important;
  border-color:#0b3028!important;
}

/* ---------- responsive ---------- */
@media(max-width:1280px){
  body.admin-portal.release-428 .admin-quick-launch,
  body.admin-portal.release-428 .ap419-action-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.admin-portal.release-428 .executive-intelligence{grid-template-columns:1fr 1fr!important}
  body.admin-portal.release-428 .executive-intelligence>article:first-child{grid-column:1/-1!important}
}
@media(max-width:860px){
  body.admin-portal.release-428 .admin-quick-launch,
  body.admin-portal.release-428 .ap419-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.admin-portal.release-428 .executive-intelligence{grid-template-columns:1fr!important}
  body.admin-portal.release-428 .executive-intelligence>article:first-child{grid-column:auto!important}
}
@media(max-width:520px){
  body.admin-portal.release-428 .admin-quick-launch>a,
  body.admin-portal.release-428 .ap419-action-grid>a{min-height:70px!important;padding:9px!important;grid-template-columns:32px minmax(0,1fr)!important;column-gap:8px!important}
  body.admin-portal.release-428 .admin-quick-launch>a>i,
  body.admin-portal.release-428 .ap419-action-grid>a>i{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-width:30px!important;max-height:30px!important;flex-basis:30px!important;font-size:13px!important}
}

/* ================================================================
   4.0.28 LAYOUT + READABILITY CORRECTION
   User-verified defects addressed here:
   - narrow left menu on Admin / Member / Franchise
   - historical double-offset (grid sidebar + legacy portal-stage margin-left)
   - excessive black gutter before dashboard content
   - over-dark KPI/action cards and unreadable helper copy
   - repeated decorative graphics on functional cards
   ================================================================ */

/* Desktop portal geometry: one sidebar offset only. */
@media (min-width: 981px){
  body.portal-body.release-428 .portal-shell{
    display:grid!important;
    grid-template-columns:304px minmax(0,1fr)!important;
    width:100%!important;
    max-width:none!important;
    min-height:100vh!important;
    background:#092821!important;
  }
  body.portal-body.release-428 .portal-sidebar{
    position:sticky!important;
    left:auto!important;
    top:0!important;
    width:304px!important;
    min-width:304px!important;
    max-width:304px!important;
    height:100vh!important;
    transform:none!important;
    padding:14px 12px 20px!important;
    overflow-y:auto!important;
    background:linear-gradient(180deg,#06231d 0%,#0a332a 56%,#08281f 100%)!important;
    border-right:1px solid rgba(136,226,198,.14)!important;
    box-shadow:12px 0 32px rgba(0,0,0,.12)!important;
  }
  /* Critical: older design-lock CSS added a second 232px/296px offset. */
  body.portal-body.release-428 .portal-stage{
    margin-left:0!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
  body.portal-body.release-428 .portal-content{
    width:100%!important;
    max-width:none!important;
    padding:16px 18px 30px!important;
  }
  body.portal-body.release-428 .portal-content>*{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
}

/* Sidebar becomes a readable application rail, not a compressed index. */
body.portal-body.release-428 .portal-brand{
  min-height:68px!important;
  height:auto!important;
  padding:9px 10px!important;
  margin:0 0 10px!important;
  border-radius:14px!important;
  border:1px solid rgba(255,255,255,.08)!important;
  background:rgba(255,255,255,.035)!important;
}
body.portal-body.release-428 .portal-brand img{
  width:46px!important;height:46px!important;min-width:46px!important;
}
body.portal-body.release-428 .portal-brand b{font-size:17px!important;letter-spacing:.085em!important;color:#fff!important}
body.portal-body.release-428 .portal-brand small{font-size:9px!important;letter-spacing:.12em!important;color:#87d6bd!important}
body.portal-body.release-428 .live-data-badge{
  margin:8px 0 12px!important;padding:9px 11px!important;min-height:36px!important;
  font-size:9px!important;letter-spacing:.08em!important;
}
body.portal-body.release-428 .portal-nav-label{
  margin:13px 9px 6px!important;font-size:9px!important;letter-spacing:.14em!important;color:#79a99b!important
}
body.portal-body.release-428 .portal-nav{padding:0!important;gap:3px!important}
body.portal-body.release-428 .portal-nav>a,
body.portal-body.release-428 .portal-nav-group>summary{
  min-height:44px!important;
  padding:7px 10px!important;
  gap:10px!important;
  border-radius:11px!important;
  font-size:12.5px!important;
  line-height:1.2!important;
  font-weight:780!important;
  color:#d8eae4!important;
}
body.portal-body.release-428 .portal-nav>a i,
body.portal-body.release-428 .portal-nav-group>summary i{
  width:30px!important;height:30px!important;min-width:30px!important;
  border-radius:9px!important;font-size:13px!important;color:#f1ca63!important;
  background:rgba(255,255,255,.055)!important;
}
body.portal-body.release-428 .portal-nav>a span,
body.portal-body.release-428 .portal-nav-group>summary span{font-size:inherit!important;color:inherit!important}
body.portal-body.release-428 .portal-nav>a.active{
  background:linear-gradient(100deg,#14a97e,#0a7c66)!important;
  color:#fff!important;
  box-shadow:0 8px 20px rgba(5,116,88,.20)!important;
}
body.portal-body.release-428 .portal-public-link{
  margin:12px 0 0!important;min-height:45px!important;font-size:10px!important;border-radius:11px!important
}

/* Stage is intentionally lighter than 4.0.27 so labels and functions can be read instantly. */
body.portal-body.release-428 .portal-stage{background:#0a2b25!important}
body.portal-body.release-428 .portal-topbar{
  min-height:64px!important;height:64px!important;
  background:rgba(6,31,26,.97)!important;
  border-bottom-color:rgba(255,255,255,.10)!important;
}
body.portal-body.release-428 .portal-content{
  color:#eff9f5!important;
  background:radial-gradient(circle at 90% 0,rgba(41,190,143,.12),transparent 26%),linear-gradient(180deg,#0a2c26 0%,#0b312a 100%)!important;
}
body.portal-body.release-428 .portal-content h1,
body.portal-body.release-428 .portal-content h2,
body.portal-body.release-428 .portal-content h3,
body.portal-body.release-428 .portal-content h4,
body.portal-body.release-428 .portal-content strong,
body.portal-body.release-428 .portal-content b{color:#fff!important}
body.portal-body.release-428 .portal-content p{color:#c6ddd6!important}
body.portal-body.release-428 .portal-content small{color:#a9c9bf!important}
body.portal-body.release-428 .portal-content .eyebrow,
body.portal-body.release-428 .portal-content .eyebrow.dark,
body.portal-body.release-428 .portal-content .command-kicker{color:#69e3b8!important}

/* Admin hero stretches into the recovered gutter and gains readable contrast. */
body.admin-portal.release-428 .admin-console{width:100%!important;max-width:none!important;gap:13px!important}
body.admin-portal.release-428 .ap419-admin-hero{
  width:100%!important;
  padding:22px 24px!important;
  border-radius:20px!important;
  background:radial-gradient(circle at 88% 18%,rgba(246,205,94,.16),transparent 22%),linear-gradient(122deg,#0b352d 0%,#0e5748 58%,#137356 100%)!important;
  border:1px solid rgba(130,232,198,.22)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.16)!important;
}
body.admin-portal.release-428 .ap419-hero-top{grid-template-columns:minmax(0,1fr) minmax(230px,300px)!important;gap:18px!important}
body.admin-portal.release-428 .ap419-hero-copy h1{
  font-size:clamp(48px,4.45vw,72px)!important;
  line-height:.94!important;
  max-width:920px!important;
  color:#fff!important;
}
body.admin-portal.release-428 .ap419-hero-copy h1 em{color:#f4c85f!important}
body.admin-portal.release-428 .ap419-hero-copy>p{max-width:980px!important;font-size:13.5px!important;color:#d0e7df!important}
body.admin-portal.release-428 .ap419-owner-panel{
  max-width:none!important;min-width:0!important;
  background:rgba(4,38,31,.62)!important;
  border-color:rgba(255,255,255,.13)!important;
}

/* Live KPI cards: values first, high contrast, no decorative discs. */
body.admin-portal.release-428 .ap419-kpi-grid{
  display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:8px!important;margin-top:15px!important
}
body.admin-portal.release-428 .ap419-kpi{
  min-height:98px!important;padding:12px 12px 15px!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#124a3f,#0d3a32)!important;
  border:1px solid rgba(255,255,255,.13)!important;
  box-shadow:inset 0 3px 0 var(--kpi,#27d2a0),0 7px 18px rgba(0,0,0,.10)!important;
}
body.admin-portal.release-428 .ap419-kpi:nth-child(2n){background:linear-gradient(145deg,#123f49,#0c3540)!important}
body.admin-portal.release-428 .ap419-kpi:nth-child(3n){background:linear-gradient(145deg,#4a3f22,#39321e)!important}
body.admin-portal.release-428 .ap419-kpi small{font-size:9px!important;line-height:1.15!important;letter-spacing:.07em!important;color:#bce0d5!important}
body.admin-portal.release-428 .ap419-kpi b{font-size:25px!important;line-height:1.05!important;margin:6px 0!important;color:#fff!important}
body.admin-portal.release-428 .ap419-kpi span{font-size:9px!important;line-height:1.25!important;color:#c2d9d2!important}

/* Secondary KPI strip on dashboard: same readable family. */
body.admin-portal.release-428 .admin-kpis{
  display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:8px!important;margin:0!important
}
body.admin-portal.release-428 .admin-kpis>article{
  min-height:78px!important;padding:11px 12px!important;border-radius:13px!important;
  background:linear-gradient(145deg,#11463c,#0b352e)!important;
  border:1px solid rgba(255,255,255,.11)!important;
}
body.admin-portal.release-428 .admin-kpis>article:nth-child(even){background:linear-gradient(145deg,#113c46,#0b313a)!important}
body.admin-portal.release-428 .admin-kpis small{font-size:9px!important;color:#b8d9cf!important}
body.admin-portal.release-428 .admin-kpis b{font-size:22px!important;color:#fff!important}

/* Functional action tiles: small purposeful icon; text remains readable. */
body.admin-portal.release-428 .admin-quick-launch>a,
body.admin-portal.release-428 .ap419-action-grid>a{
  min-height:82px!important;
  background:linear-gradient(145deg,#104239,#0c342d)!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.admin-portal.release-428 .admin-quick-launch>a:nth-child(even),
body.admin-portal.release-428 .ap419-action-grid>a:nth-child(even){background:linear-gradient(145deg,#103944,#0b3039)!important}
body.admin-portal.release-428 .admin-quick-launch>a b,
body.admin-portal.release-428 .ap419-action-grid>a b{font-size:11.5px!important;line-height:1.15!important;letter-spacing:.01em!important}
body.admin-portal.release-428 .admin-quick-launch>a small,
body.admin-portal.release-428 .ap419-action-grid>a small{font-size:9.5px!important;line-height:1.25!important;color:#b2d0c7!important}

/* Information / graph panels are lighter than the surrounding stage. */
body.admin-portal.release-428 .control-card,
body.admin-portal.release-428 .glass-panel,
body.admin-portal.release-428 .workspace-card,
body.admin-portal.release-428 .coverage-card,
body.admin-portal.release-428 .admin-action-inbox{
  background:linear-gradient(150deg,#104138,#0c342d)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  color:#eff9f6!important;
}
body.admin-portal.release-428 .executive-intelligence>article{
  background:linear-gradient(155deg,#104239,#0d352f)!important;
  border-color:rgba(255,255,255,.12)!important;
}
body.admin-portal.release-428 .executive-intelligence h2{font-size:21px!important;color:#fff!important}
body.admin-portal.release-428 .executive-intelligence .eyebrow{color:#73e4bd!important}

/* Member / Franchise: same enlarged menu and readable application cards. */
body.member-portal.release-428 .seller-kpis article,
body.franchise-portal.release-428 .seller-kpis article,
body.member-portal.release-428 .command-grid>a,
body.franchise-portal.release-428 .command-grid>a,
body.franchise-portal.release-428 .franchise-command-grid>a,
body.member-portal.release-428 .income-mix>a{
  background:linear-gradient(145deg,#11463c,#0d372f)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  color:#f2faf7!important;
}
body.member-portal.release-428 .seller-kpis small,
body.franchise-portal.release-428 .seller-kpis small,
body.member-portal.release-428 .command-grid small,
body.franchise-portal.release-428 .command-grid small{color:#b3d2c8!important;font-size:9px!important}
body.member-portal.release-428 .seller-kpis b,
body.franchise-portal.release-428 .seller-kpis b{font-size:21px!important;color:#fff!important}
body.member-portal.release-428 .command-grid b,
body.franchise-portal.release-428 .command-grid b{font-size:11px!important;color:#fff!important}

/* Laptop widths: preserve space while keeping sidebar meaningfully larger than 4.0.27. */
@media (min-width:981px) and (max-width:1320px){
  body.portal-body.release-428 .portal-shell{grid-template-columns:280px minmax(0,1fr)!important}
  body.portal-body.release-428 .portal-sidebar{width:280px!important;min-width:280px!important;max-width:280px!important}
  body.admin-portal.release-428 .ap419-kpi-grid,
  body.admin-portal.release-428 .admin-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body.admin-portal.release-428 .ap419-hero-copy h1{font-size:clamp(44px,4.5vw,60px)!important}
}

/* Mobile drawer follows the enlarged rail and never reserves desktop gutter. */
@media (max-width:980px){
  body.portal-body.release-428 .portal-shell{display:block!important}
  body.portal-body.release-428 .portal-stage{margin-left:0!important;width:100%!important}
  body.portal-body.release-428 .portal-sidebar{
    position:fixed!important;left:-304px!important;top:0!important;z-index:90!important;
    width:304px!important;min-width:304px!important;max-width:304px!important;height:100vh!important;
    transition:left .22s ease!important;transform:none!important;
  }
  body.portal-body.release-428.sidebar-open .portal-sidebar{left:0!important}
  body.portal-body.release-428 .portal-content{padding:10px!important}
  body.admin-portal.release-428 .ap419-hero-top{grid-template-columns:1fr!important}
  body.admin-portal.release-428 .ap419-owner-panel{max-width:none!important}
  body.admin-portal.release-428 .ap419-kpi-grid,
  body.admin-portal.release-428 .admin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
