:root{
  --shell-sidebar:82px;
  --shell-blue:#d4af37;
  --shell-navy:#071a38;
  --shell-line:rgba(15,23,42,.10);
  --shell-surface:rgba(255,255,255,.94);
}

body{
  background:
    radial-gradient(850px 460px at 96% 0%,rgba(225,184,56,.08),transparent 60%),
    linear-gradient(180deg,#17140f 0%,#f5f7fb 100%);
}

.app{min-width:0}
.topbar{
  min-height:66px;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid rgba(148,163,184,.18);
  box-shadow:0 4px 18px rgba(15,23,42,.035);
}
.topbar,.searchbar,.content,.moduleRibbon,.contextRibbon{
  margin-left:var(--shell-sidebar);
}
.compactHomeBtn{display:none!important}
.shellMenuBtn{display:none!important}
.brandMark{display:none;width:38px;height:38px;border-radius:12px;place-items:center;background:linear-gradient(145deg,#f0cf65,#d4af37);color:#fff;font-weight:950;box-shadow:0 8px 22px rgba(212,175,55,.24)}

/* Desktop: compact icon rail for global actions only. */
.appSidebar{
  position:fixed;
  inset:0 auto 0 0;
  width:82px;
  z-index:10020;
  display:flex;
  flex-direction:column;
  padding:16px 12px;
  overflow:hidden;
  color:#eadba9;
  background:linear-gradient(180deg,#061a38,#082448);
  border-right:1px solid rgba(255,255,255,.08);
  box-shadow:12px 0 38px rgba(2,6,23,.12);
  transition:width .2s ease;
}
.appSidebar:hover{width:188px}
.sidebarBrand{
  min-height:52px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 8px 14px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.sidebarLogo{
  width:42px;height:42px;flex:0 0 42px;border-radius:13px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,#f0cf65,#d4af37);
  color:#fff;font-size:23px;font-weight:950;
  box-shadow:0 10px 28px rgba(212,175,55,.28);
}
.sidebarBrandText,.shellLabel{
  opacity:0;
  transform:translateX(-5px);
  white-space:nowrap;
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;
}
.sidebarBrandText{font-size:20px;font-weight:900}
.appSidebar:hover .sidebarBrandText,.appSidebar:hover .shellLabel{opacity:1;transform:none}
.sidebarNav{display:flex;flex-direction:column;gap:7px}
.shellNavItem{
  width:58px;min-height:52px;
  border:0;border-radius:16px;
  background:transparent;color:#d9e7fb;
  display:flex;align-items:center;gap:13px;
  padding:0 16px;
  font-weight:800;cursor:pointer;text-align:left;
  transition:width .2s ease,background .16s ease,color .16s ease,transform .16s ease;
}
.appSidebar:hover .shellNavItem{width:164px}
.shellNavItem:hover{background:rgba(255,255,255,.08);color:#fff;transform:translateY(-1px)}
.shellNavItem.active{background:linear-gradient(135deg,#e3bf4a,#8f6811);color:#fff;box-shadow:0 12px 28px rgba(212,175,55,.27)}
.shellIcon{width:25px;height:25px;display:grid;place-items:center;flex:0 0 25px}
.shellIcon svg{width:24px;height:24px}
.sidebarFooter{margin-top:auto;padding-top:14px;border-top:1px solid rgba(255,255,255,.10)}
.shellBackdrop{display:none!important}

/* One module navigation. No Home duplication here. */
.moduleRibbon{
  position:sticky;
  top:66px;
  z-index:16;
  min-height:76px;
  margin-top:10px;
  margin-right:12px;
  padding:0 8px;
  display:flex;
  align-items:stretch;
  overflow-x:auto;
  scrollbar-width:none;
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  background:var(--shell-surface);
  box-shadow:0 10px 30px rgba(15,23,42,.07);
  backdrop-filter:blur(18px);
}
.moduleRibbon::-webkit-scrollbar,.contextRibbon::-webkit-scrollbar{display:none}
.ribbonItem{
  position:relative;
  min-width:94px;
  border:0;
  border-right:1px solid rgba(148,163,184,.12);
  background:transparent;
  color:#18243d;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:10px 13px;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
  white-space:nowrap;
}
.ribbonItem:last-child{border-right:0}
.ribbonItem:hover{background:#17140f}
.ribbonItem.active{color:var(--shell-blue);background:linear-gradient(180deg,rgba(212,175,55,.06),rgba(212,175,55,.01))}
.ribbonItem.active::after{content:"";position:absolute;left:18px;right:18px;bottom:0;height:3px;border-radius:4px 4px 0 0;background:var(--shell-blue)}
.ribbonIcon{width:25px;height:25px;display:grid;place-items:center}
.ribbonIcon svg{width:24px;height:24px}

/* One-word module actions, icon first. */
.contextRibbon{
  min-height:52px;
  margin-top:8px;
  margin-right:12px;
  padding:6px;
  display:flex;
  gap:7px;
  overflow-x:auto;
  scrollbar-width:none;
  border:1px solid rgba(148,163,184,.15);
  border-radius:15px;
  background:rgba(255,255,255,.84);
  box-shadow:0 7px 22px rgba(15,23,42,.045);
}
.contextAction{
  min-width:86px;
  min-height:40px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:#475569;
  padding:0 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
  cursor:pointer;
}
.contextAction:hover{background:#17140f;color:#d4af37}
.contextAction svg{width:18px;height:18px}
.contextAction.active{background:#211b0d;color:#d4af37;border-color:rgba(212,175,55,.18)}

.content{width:auto;max-width:none;padding:18px 18px 42px}
.legacyModuleBar{display:none!important}

/* Desktop global actions live in sidebar. Mobile gets the 5-button bar. */
.globalBottomBar{display:none!important}

/* Clean hub: widgets + scores only. Modules already live in the ribbon. */
#viewMain{max-width:1500px;margin:0 auto}
.hubTop{gap:14px}
.hubTile{
  position:relative;
  overflow:hidden;
  min-height:142px;
  border-radius:24px;
  padding:23px;
  background:radial-gradient(circle at 92% 18%,rgba(225,184,56,.18),transparent 34%),linear-gradient(135deg,#fff,#17140f);
  border-color:rgba(212,175,55,.14);
  box-shadow:0 14px 38px rgba(15,23,42,.075);
}
.hubTile:first-child::after{
  content:"R";
  position:absolute;right:26px;top:30px;
  width:72px;height:72px;border-radius:23px;
  display:grid;place-items:center;
  color:#fff;font-size:36px;font-weight:950;
  background:linear-gradient(145deg,#f0cf65,#d4af37);
  box-shadow:0 14px 30px rgba(212,175,55,.28);
}
.hubTileK{color:#d4af37;font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.hubTileS:first-of-type{font-size:20px;font-weight:900;color:#0f172a;opacity:1}
#viewMain .sectionTitle{font-size:21px;letter-spacing:-.02em}
.hubScoreGrid{gap:12px;grid-template-columns:repeat(5,minmax(0,1fr))}
.hubScoreCard{
  min-height:126px;
  border-radius:20px;
  padding:16px;
  text-align:left;
  background:linear-gradient(180deg,#fff,#17140f);
  box-shadow:0 10px 28px rgba(15,23,42,.055);
}
.hubScoreIcon{
  width:38px;height:38px;margin-bottom:9px;border-radius:12px;
  display:grid;place-items:center;
  color:#d4af37;
  background:linear-gradient(145deg,#211b0d,#f7fbff);
  border:1px solid rgba(212,175,55,.09);
}
.hubScoreIcon svg{width:21px;height:21px}
.hubScoreCard::before{display:none!important}
.hubScoreK{font-size:12px;color:#64748b}
.hubScoreV{font-size:21px;margin-top:4px}

/* Icon sheets */
.shellSheet{position:fixed;inset:0;z-index:11000;display:grid;place-items:center;padding:18px}
.shellSheetBackdrop{position:absolute;inset:0;border:0;background:rgba(2,6,23,.44);backdrop-filter:blur(4px)}
.shellSheetCard{position:relative;width:min(560px,100%);max-height:min(720px,calc(100vh - 36px));overflow:auto;border:1px solid rgba(148,163,184,.20);border-radius:24px;background:#fff;padding:18px;box-shadow:0 30px 80px rgba(2,6,23,.28)}
.shellSheetHeader{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;font-size:18px}
.shellSheetGrid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.shellSheetGrid button{
  min-height:88px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:16px;
  background:#17140f;color:#0f172a;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  font-size:12px;font-weight:850;cursor:pointer;
}
.shellSheetGrid button:hover{background:#211b0d;color:#d4af37;border-color:rgba(212,175,55,.20)}
.sheetIcon{width:28px;height:28px;display:grid;place-items:center;color:#d4af37}
.sheetIcon svg{width:26px;height:26px}
.globalSearchInput{width:100%;height:52px;border:1px solid rgba(148,163,184,.24);border-radius:15px;padding:0 16px;font-size:15px;outline:none}
.globalSearchInput:focus{border-color:rgba(212,175,55,.45);box-shadow:0 0 0 4px rgba(212,175,55,.10)}
.globalSearchResults{display:grid;gap:8px;margin-top:12px}
.globalSearchResult{min-height:50px;border:1px solid rgba(148,163,184,.18);border-radius:14px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 14px;font-weight:800;cursor:pointer}
.globalSearchResult:hover{background:#17140f;color:#d4af37}

.card{border-radius:20px;box-shadow:0 10px 28px rgba(15,23,42,.05)}
.btn{background:linear-gradient(145deg,#f0cf65,#d4af37);border-color:#d4af37;box-shadow:0 10px 22px rgba(212,175,55,.19)}

@media(max-width:1100px){
  .hubScoreGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:980px){
  :root{--shell-sidebar:0px}
  .appSidebar{display:none!important}
  .topbar,.searchbar,.content,.moduleRibbon,.contextRibbon{margin-left:0}
  .brandMark{display:grid}
  .moduleRibbon{top:66px;margin:8px 8px 0;min-height:74px;border-radius:17px}
  .ribbonItem{min-width:84px;padding:9px 10px;font-size:11px}
  .contextRibbon{margin:7px 8px 0}
  .contextAction{min-width:78px;padding:0 10px}
  .content{padding:14px 10px 108px}
  .globalBottomBar{
    position:fixed;
    left:50%;bottom:max(7px,env(safe-area-inset-bottom));
    transform:translateX(-50%);
    z-index:10010;
    width:calc(100vw - 16px);
    min-height:72px;
    padding:7px 5px;
    display:grid!important;
    grid-template-columns:repeat(5,1fr);
    align-items:center;
    border:1px solid rgba(148,163,184,.20);
    border-radius:22px;
    background:rgba(255,255,255,.96);
    box-shadow:0 18px 48px rgba(15,23,42,.17);
    backdrop-filter:blur(20px) saturate(150%);
  }
  .globalBottomBar.hidden{display:none!important}
  .globalNavItem{
    min-width:0;height:54px;border:0;border-radius:15px;background:transparent;color:#334155;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    font-size:10px;font-weight:850;cursor:pointer;
  }
  .globalNavItem.active{color:#d4af37;background:#211b0d}
  .globalNavIcon{width:24px;height:24px;display:grid;place-items:center}
  .globalNavIcon svg{width:23px;height:23px}
  .globalAdd{
    width:66px;height:66px;justify-self:center;margin-top:-29px;border-radius:50%;
    background:linear-gradient(145deg,#f0cf65,#d4af37);color:#fff;
    box-shadow:0 13px 30px rgba(212,175,55,.34),0 0 0 7px rgba(232,241,255,.95);
  }
  .globalAdd.active{color:#fff;background:linear-gradient(145deg,#4388ff,#d4af37)}
  .hubScoreGrid{grid-template-columns:repeat(5,minmax(138px,1fr));overflow-x:auto;padding-bottom:4px}
}

@media(max-width:640px){
  .topbar{padding:9px 10px;gap:7px}.title{font-size:18px}.coinPill{padding:0 10px}
  .moduleRibbon{min-height:70px}.ribbonItem{min-width:78px;font-size:10px}.ribbonIcon{width:23px;height:23px}.ribbonIcon svg{width:22px;height:22px}
  .contextAction span{display:none}.contextAction{min-width:48px;width:48px;padding:0}.contextAction svg{width:20px;height:20px}
  .hubTop{grid-template-columns:1fr}.hubTile{min-height:124px}.hubTile:first-child::after{width:62px;height:62px;right:18px;top:28px;font-size:31px}
  .hubScoreGrid{grid-template-columns:repeat(5,minmax(125px,1fr))}.hubScoreCard{min-height:116px}
  .shellSheetGrid{grid-template-columns:repeat(2,1fr)}
}

@media(prefers-reduced-motion:reduce){
  .appSidebar,.sidebarBrandText,.shellLabel,.shellNavItem{transition:none}
}
.hubTileGraphic{
  position:absolute;right:26px;top:34px;width:66px;height:66px;border-radius:22px;
  display:grid;place-items:center;color:#d4af37;
  background:rgba(255,255,255,.76);border:1px solid rgba(212,175,55,.13);
  box-shadow:0 12px 28px rgba(212,175,55,.10);
}
.hubTileGraphic svg{width:30px;height:30px}
.hubScoreGrid{scrollbar-width:none}
.hubScoreGrid::-webkit-scrollbar{display:none}
@media(max-width:640px){.hubTileGraphic{width:58px;height:58px;right:18px;top:32px}.hubTileGraphic svg{width:27px;height:27px}}

/* ================================================================
   GLOBAL CLIENT-FACE RULE — all visible controls must fit the screen
   ================================================================ */
*,*::before,*::after{box-sizing:border-box}
html,body,.app{width:100%;max-width:100%;overflow-x:clip}
button,a,input,select,textarea,.card,.moduleCard,.hubTile,.hubScoreCard,.serviceProCard{min-width:0;max-width:100%}
button,.ribbonItem,.contextAction,.globalNavItem,.shellNavItem{overflow:hidden}
button span,.ribbonItem span,.contextAction span,.globalNavItem span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row,.serviceActions,.propertyActions,.mediaActions,.historyActions,.orderActionRow{flex-wrap:wrap}
.row>*{min-width:0}

/* Desktop: every module is visible at once; no hidden horizontal ribbon. */
@media(min-width:981px){
  .moduleRibbon{
    display:grid;
    grid-template-columns:repeat(8,minmax(72px,1fr));
    overflow:visible;
  }
  .ribbonItem{min-width:0;width:100%;padding-inline:8px}
  .contextRibbon{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(74px,1fr));
    overflow:visible;
  }
  .contextAction{min-width:0;width:100%;padding-inline:8px}
}

/* Tablet and phone: compact two-row module face, no sideways scrolling. */
@media(max-width:980px){
  .topbar{min-width:0}
  .title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .topicons{min-width:0;gap:5px}
  .coinPill{min-width:0;max-width:116px}
  .coinAmt{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  .moduleRibbon{
    position:sticky;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    grid-auto-rows:60px;
    align-items:stretch;
    min-height:0;
    padding:5px;
    gap:4px;
    overflow:visible;
  }
  .ribbonItem{
    min-width:0;
    width:100%;
    height:60px;
    padding:5px 2px;
    gap:2px;
    border:0;
    border-radius:12px;
    font-size:10px;
    line-height:1;
  }
  .ribbonItem.active::after{left:22%;right:22%;height:3px}
  .ribbonIcon,.ribbonIcon svg{width:22px;height:22px}

  .contextRibbon{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:4px;
    min-height:0;
    padding:5px;
    overflow:visible;
  }
  .contextAction{
    min-width:0;
    width:100%;
    height:44px;
    padding:3px 2px;
    flex-direction:column;
    gap:1px;
    font-size:9px;
    line-height:1;
  }
  .contextAction span{display:block!important;font-size:9px}
  .contextAction svg{width:18px;height:18px;flex:0 0 18px}

  /* The two account cards remain visible together instead of becoming huge stacks. */
  .hubTop{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .hubTile{min-height:108px;padding:14px;border-radius:18px}
  .hubTileK{font-size:10px;letter-spacing:.05em}
  .hubTileS:first-of-type{font-size:16px}
  .hubTileS{font-size:11px}
  .hubTile:first-child::after{width:48px;height:48px;right:12px;top:28px;border-radius:16px;font-size:24px}
  .hubTileGraphic{width:46px;height:46px;right:12px;top:30px;border-radius:15px}
  .hubTileGraphic svg{width:23px;height:23px}

  /* Five score buttons fit in one face row, never a clipped carousel. */
  .hubScoreGrid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    overflow:visible;
    padding:0;
  }
  .hubScoreCard{
    min-height:102px;
    width:100%;
    padding:8px 4px;
    border-radius:15px;
    text-align:center;
  }
  .hubScoreIcon{width:30px;height:30px;margin:0 auto 5px;border-radius:10px}
  .hubScoreIcon svg{width:17px;height:17px}
  .hubScoreK{font-size:9px;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hubScoreV{font-size:15px;line-height:1.1;margin-top:4px;white-space:nowrap}
  .hubScoreS{font-size:8px;line-height:1.1;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  /* The permanent five controls always fit the phone width. */
  .globalBottomBar{grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible}
  .globalNavItem{min-width:0;width:100%;padding-inline:2px}
  .globalNavItem span{font-size:9px}
  .globalAdd{width:58px;height:58px;margin-top:-22px}

  /* General grids wrap instead of leaving cards/buttons outside the screen. */
  .serviceCategoryGrid,.moduleCategoryGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .serviceProGrid,.propertyGrid,.mediaGrid,.gridProd,.moduleGrid,.publicFeatureGrid,.publicActionGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .serviceProCard,.propertyCard,.mediaCard,.moduleCard,.publicFeatureCard{min-width:0}
  .serviceProMeta,.moduleSub,.s{overflow:hidden;text-overflow:ellipsis}
  .serviceActions>button,.propertyActions>button,.mediaActions>button,.historyActions>button,.orderActionRow>button{min-width:0;flex:1 1 42%}
}

@media(max-width:520px){
  .content{padding-inline:8px}
  .moduleRibbon{margin-inline:6px;grid-auto-rows:56px}
  .ribbonItem{height:56px;font-size:9px}
  .contextRibbon{margin-inline:6px}
  .hubTop{gap:6px}
  .hubTile{min-height:100px;padding:12px}
  .hubTile:first-child::after,.hubTileGraphic{width:42px;height:42px;right:9px;top:28px}
  .hubTile:first-child::after{font-size:21px}
  .hubTileGraphic svg{width:21px;height:21px}
  .hubScoreGrid{gap:4px}
  .hubScoreCard{min-height:96px;padding:7px 2px}
  .hubScoreV{font-size:14px}
  .globalBottomBar{width:calc(100vw - 10px);padding-inline:3px}
  .globalNavIcon,.globalNavIcon svg{width:21px;height:21px}
  .serviceCategoryGrid,.moduleCategoryGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .serviceCategoryTile,.moduleCategoryTile{min-height:78px;padding:7px 3px}
  .serviceCategoryTile strong,.moduleCategoryTile strong{font-size:10px}
}

@media(max-width:380px){
  .moduleRibbon{grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}
  .ribbonItem{font-size:8.5px}
  .contextRibbon{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
  .contextAction span{font-size:8px}
  .hubTileS:first-of-type{font-size:14px}
  .hubTileS{font-size:10px}
  .hubScoreCard{min-height:92px}
  .hubScoreK{font-size:8px}
  .hubScoreV{font-size:12px}
  .hubScoreS{display:none}
  .globalNavItem span{font-size:8px}
  .serviceCategoryGrid,.moduleCategoryGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Final small-screen action fit: labels stay readable, cards never crush buttons. */
@media(max-width:980px){
  .contextRibbon{grid-template-columns:repeat(auto-fit,minmax(58px,1fr))}
}
@media(max-width:640px){
  .serviceProGrid,.propertyGrid,.mediaGrid,.publicFeatureGrid,.publicActionGrid{grid-template-columns:1fr}
  .serviceProCard{min-height:0}
  .serviceProBottom{align-items:center;flex-wrap:wrap}
  .serviceBookBtn{min-width:92px;min-height:40px;flex:1}
  .serviceBookBtn span{display:inline!important}
  .serviceSaveBtn{flex:0 0 32px}
  .propertyActions>button,.mediaActions>button,.serviceActions>button{min-width:110px}
}
@media(max-width:640px){
  .serviceSaveBtn{width:40px;height:40px;flex:0 0 40px}
  .serviceTextBtn{min-height:40px;padding:0 10px}
}


/* Main hub cleanup: no score panel, all core modules visible at once. */
#viewMain{
  display:flex;
  flex-direction:column;
  gap:16px;
}
#viewMain .hubTop{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
#viewMain .hubTile{
  min-height:116px;
  padding:18px;
  border-radius:21px;
}
#viewMain .hubTile:first-child::after{
  width:58px;
  height:58px;
  right:18px;
  top:22px;
  border-radius:19px;
  font-size:29px;
}
#viewMain .hubTileGraphic{
  width:56px;
  height:56px;
  right:18px;
  top:24px;
  border-radius:18px;
}
#viewMain .hubTileGraphic svg{width:26px;height:26px}
.hubModulesHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:2px;
}
.hubModulesHint{
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.hubModuleGrid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:9px;
}
.hubModuleTile{
  min-width:0;
  min-height:96px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:19px;
  background:linear-gradient(180deg,#fff,#17140f);
  color:#0f172a;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:11px 7px;
  box-shadow:0 9px 24px rgba(15,23,42,.05);
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,color .16s ease;
}
.hubModuleTile:hover{
  transform:translateY(-2px);
  border-color:rgba(212,175,55,.24);
  box-shadow:0 14px 30px rgba(15,23,42,.08);
  color:#d4af37;
}
.hubModuleTile:active{transform:translateY(0)}
.hubModuleIcon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  color:#d4af37;
  background:linear-gradient(145deg,#211b0d,#17140f);
  border:1px solid rgba(212,175,55,.10);
}
.hubModuleIcon svg{width:23px;height:23px}

@media(max-width:980px){
  #viewMain{gap:12px}
  #viewMain .hubTop{gap:9px}
  #viewMain .hubTile{min-height:104px;padding:14px}
  #viewMain .hubTile:first-child::after{width:48px;height:48px;right:13px;top:19px;border-radius:16px;font-size:24px}
  #viewMain .hubTileGraphic{width:46px;height:46px;right:13px;top:21px;border-radius:15px}
  #viewMain .hubTileGraphic svg{width:23px;height:23px}
  #viewMain .hubTileK{font-size:11px}
  #viewMain .hubTileS:first-of-type{font-size:16px}
  #viewMain .hubTileS{font-size:12px;padding-right:52px}
  .hubModuleGrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
  .hubModuleTile{min-height:82px;border-radius:16px;padding:8px 3px;gap:6px;font-size:10px}
  .hubModuleIcon{width:36px;height:36px;border-radius:12px}
  .hubModuleIcon svg{width:21px;height:21px}
}

@media(max-width:390px){
  #viewMain .hubTile{min-height:98px;padding:12px}
  #viewMain .hubTile:first-child::after{width:44px;height:44px;right:10px;top:20px;font-size:22px}
  #viewMain .hubTileGraphic{width:42px;height:42px;right:10px;top:21px}
  #viewMain .hubTileS{padding-right:46px}
  .hubModuleGrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .hubModuleTile{min-height:76px;font-size:9px;border-radius:14px}
  .hubModuleIcon{width:33px;height:33px;border-radius:11px}
  .hubModuleIcon svg{width:19px;height:19px}
}

/* Full main-module set: 14 modules, balanced across screen sizes. */
@media(min-width:981px){
  .hubModuleTile{min-height:88px}
}
@media(min-width:600px) and (max-width:980px){
  .hubModuleGrid{grid-template-columns:repeat(7,minmax(0,1fr))}
}
@media(max-width:599px){
  .hubModuleGrid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hubModuleTile{min-height:70px;padding:7px 2px;gap:5px;font-size:9px}
  .hubModuleIcon{width:31px;height:31px;border-radius:10px}
  .hubModuleIcon svg{width:18px;height:18px}
}

/* Module actions live in the professional bottom dock; do not repeat them near the top. */
.contextRibbon{display:none!important}


/* 2026-07 clean module rule: no global module selector above module content. */
.moduleRibbon,.contextRibbon{display:none!important}

/* Mobile uses the gold R as the only route back to the main module grid. */
.brandHomeBtn{
  width:46px!important;height:46px!important;flex:0 0 46px!important;
  border-radius:15px!important;
  display:none!important;place-items:center!important;
  color:#171003!important;
  background:linear-gradient(145deg,#f3d46b,#d4af37 58%,#a47714)!important;
  border:1px solid rgba(255,239,176,.38)!important;
  font-size:22px!important;font-weight:950!important;line-height:1!important;
  box-shadow:0 10px 24px rgba(212,175,55,.25)!important;
}
@media(max-width:980px){
  .brandHomeBtn{display:grid!important}
  .topbar{padding-left:14px!important}
  .searchbar{margin-top:8px!important}
  .content{padding-top:12px!important}
}


/* --- Simplify module pages: remove extra top ribbon everywhere --- */
.moduleRibbon,
#moduleRibbon{
  display:none !important;
}

/* Keep content tight when module ribbon is removed */
@media (max-width: 900px){
  .content{padding-top:12px !important;}
}


/* ===== FINAL REAL CLEANUP OVERRIDES ===== */
/* remove extra top strips globally */
.searchbar,
.moduleRibbon,
#moduleRibbon{display:none !important;}

/* tighten content since strips are removed */
.content{padding-top:12px !important;}

/* smaller module buttons on main hub */
.hubModuleGrid{gap:8px !important;}
.hubModuleTile{
  min-height:72px !important;
  padding:6px 3px !important;
  gap:4px !important;
  border-radius:16px !important;
}
.hubModuleIcon{
  width:42px !important;
  height:42px !important;
  border-radius:12px !important;
}
.hubModuleIcon img,
.hubModuleIcon svg{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}
@media(max-width:599px){
  .hubModuleGrid{grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:6px !important;}
  .hubModuleTile{min-height:64px !important; padding:5px 2px !important; gap:3px !important; font-size:9px !important;}
  .hubModuleIcon{width:38px !important; height:38px !important; border-radius:10px !important;}
}
