/* Staking reward-by-rarity information */
.staking-rarity-info{
  display:grid;
  grid-template-columns:auto repeat(5,minmax(0,1fr));
  align-items:stretch;
  margin:0 0 18px;
  border-top:1px solid rgba(214,254,80,.09);
  border-bottom:1px solid rgba(214,254,80,.09);
}
.staking-rarity-title{
  display:flex;
  align-items:center;
  padding:12px 14px 12px 0;
  color:#7f8d74;
  font-size:9px;
  line-height:1.4;
  letter-spacing:.6px;
  text-transform:uppercase;
  white-space:nowrap;
}
.staking-rarity-cell{
  padding:11px 12px;
  border-left:1px solid rgba(214,254,80,.07);
  text-align:center;
}
.staking-rarity-cell span{
  display:block;
  margin-bottom:5px;
  color:#77846e;
  font-size:8px;
  line-height:1.2;
  text-transform:uppercase;
}
.staking-rarity-cell b{
  color:var(--lime);
  font-family:var(--pixel);
  font-size:8px;
  line-height:1.35;
  white-space:nowrap;
}
.staking-rarity-caption{
  grid-column:1/-1;
  padding:9px 0 0;
  color:#66725e;
  font-size:9px;
  line-height:1.45;
}
@media(max-width:900px){
  .staking-rarity-info{grid-template-columns:repeat(5,minmax(0,1fr))}
  .staking-rarity-title{grid-column:1/-1;padding:10px 0}
}
@media(max-width:600px){
  .staking-rarity-info{grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
  .staking-rarity-title{grid-column:1/-1}
  .staking-rarity-cell{border-left:0;border-top:1px solid rgba(214,254,80,.06);text-align:left;padding:10px 0}
  .staking-rarity-cell:nth-child(even){padding-right:12px}
  .staking-rarity-cell:nth-child(odd){padding-left:12px;border-left:1px solid rgba(214,254,80,.06)}
  .staking-rarity-cell:last-of-type{grid-column:1/-1;border-left:0;padding-left:0}
}

/* ================================================================
   UX CLEANUP PASS — PRESENTATION ONLY
   No wallet, contract, API, transaction, reward, or job logic here.
   This file is loaded last so cleanup stays isolated from runtime code.
   ================================================================ */

/* Keep the application rail focused on things users act on repeatedly. */
.sidebar-flow-group[data-flow="shift"],
.sidebar-flow-group[data-flow="loop"],
.sidebar-flow-group[data-flow="recent"],
.sidebar-flow-group[data-flow="rules"]{
  display:none!important;
}

.sidebar-flow-group[data-flow="wallet"],
.sidebar-flow-group[data-flow="active-job"],
.sidebar-flow-group[data-flow="rewards"]{
  margin-bottom:24px!important;
}

.sidebar-flow-group[data-flow="wallet"]>.side-title,
.sidebar-flow-group[data-flow="active-job"]>.side-title,
.sidebar-flow-group[data-flow="rewards"]>.side-title{
  margin-bottom:9px!important;
  color:#9ba890!important;
}

.wallet-avatar{
  width:42px!important;
  height:42px!important;
  margin-bottom:13px!important;
  font-size:8px!important;
}
.wallet-address{
  margin-bottom:14px!important;
  font-size:15px!important;
}
.wallet-card .balance-row{
  min-height:36px!important;
  padding:9px 0!important;
}

/* Desktop: give the task area more room and make the rail feel secondary. */
@media(min-width:801px){
  .shell.shell{
    grid-template-columns:248px minmax(0,1fr)!important;
  }
  .shell>aside:first-child{
    padding:24px 18px!important;
  }
  .left-sidebar-content{
    position:sticky;
    top:108px;
    width:100%;
    min-width:0;
    max-width:100%;
    max-height:calc(100vh - 128px);
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:thin;
  }
  .left-sidebar-content>*{
    min-width:0;
    max-width:100%;
  }
}

/* App hero: retain brand character without delaying the actual task. */
main .hero{
  min-height:0!important;
  padding:24px 0 25px!important;
  margin-bottom:28px!important;
}
main .hero h1{
  max-width:650px!important;
  margin-bottom:15px!important;
  font-size:clamp(25px,2.65vw,40px)!important;
  line-height:1.15!important;
}
main .hero p{
  max-width:580px!important;
  font-size:12px!important;
  line-height:1.65!important;
}
main .eyebrow{
  margin-bottom:12px!important;
}

/* Compress supporting metrics so the main action remains above the fold. */
#statsPanel.stats{
  margin-bottom:32px!important;
}
#statsPanel .stat{
  min-height:88px!important;
  padding-top:15px!important;
  padding-bottom:14px!important;
}
#statsPanel .stat .v{
  margin-top:11px!important;
}

.section{
  margin-bottom:34px!important;
}
.section-head{
  margin-bottom:16px!important;
}
.section-note{
  opacity:.66!important;
}

/* Reduce decorative UI noise around repeated controls. */
.staking-info-note{
  margin-bottom:11px!important;
  padding-bottom:9px!important;
}
.staking-rarity-info{
  margin-bottom:14px!important;
}
.staking-toolbar-clean{
  padding:12px 0!important;
  gap:12px!important;
}
.staking-selected-count{
  opacity:.82;
}

/* Preserve compact, stable NFT cards while making scanning easier. */
.nft-grid{
  gap:18px 16px!important;
}
.nft .nft-info{
  padding-top:13px!important;
}
.nft .meta{
  margin-top:8px!important;
}
.nft .actions{
  margin-top:9px!important;
  padding-top:9px!important;
}
.nft.selected:before{
  top:9px!important;
  left:9px!important;
}

/* Job Market: tier choice first, worker/order second. */
#tab-jobs .tiers{
  margin-bottom:18px!important;
}
#tab-jobs .workbench{
  gap:18px!important;
}
#tab-jobs .workbench>.panel{
  margin-bottom:0!important;
}
#tab-jobs #startJobBtn{
  min-height:44px!important;
}

/* Worker profiles read as identities instead of dense data tables. */
.worker-card{
  padding:15px!important;
}
.worker-profile-shell{
  gap:15px!important;
}
.worker-profile-body>.nft-line{
  padding-bottom:10px;
  border-bottom:1px solid rgba(214,254,80,.08);
}
.worker-card .profile-grid{
  gap:7px!important;
}
.worker-card .profile-stat{
  padding:8px 6px!important;
  background:rgba(214,254,80,.018)!important;
  border-color:rgba(214,254,80,.08)!important;
}

/* Disconnected state: show onboarding, not a dashboard full of empty states. */
body:has(#connectBtn:not(.connected)) .sidebar-flow-group:not([data-flow="wallet"]){
  display:none!important;
}
body:has(#connectBtn:not(.connected)) #tab-staking>.section{
  display:none!important;
}
body:has(#connectBtn:not(.connected)) main .hero{
  margin-bottom:16px!important;
}
body:has(#connectBtn:not(.connected)) #notice{
  margin-bottom:12px!important;
  color:#98a68d!important;
}
body:has(#connectBtn:not(.connected)) main{
  min-height:calc(100vh - 88px);
}

/* Keep keyboard affordances obvious in the low-contrast theme. */
button:focus-visible,
a:focus-visible,
.nft:focus-visible,
.tier:focus-visible,
.worker-item:focus-visible{
  outline:1px solid var(--lime)!important;
  outline-offset:3px!important;
}

/* ================================================================
   SECTION SEPARATION — FLAT TERMINAL STYLE, NOT CARD-HEAVY
   ================================================================ */

/* Hero becomes a deliberate intro band. */
main .hero{
  padding:30px 28px 31px!important;
  margin:0 0 24px!important;
  border:1px solid rgba(214,254,80,.11)!important;
  border-left:3px solid rgba(214,254,80,.68)!important;
  background:linear-gradient(90deg,rgba(214,254,80,.032),rgba(214,254,80,.008) 46%,transparent 78%)!important;
}

/* Stats read as their own instrument strip instead of blending into content below. */
#statsPanel.stats{
  margin:0 0 28px!important;
  padding:0!important;
  border:1px solid rgba(214,254,80,.12)!important;
  background:rgba(214,254,80,.012)!important;
}
#statsPanel .stat{
  padding:18px 20px!important;
  border-right:1px solid rgba(214,254,80,.095)!important;
}
#statsPanel .stat:last-child{
  border-right:0!important;
}

/* Each main tab gets an unmistakable workspace boundary. */
#tab-staking>.section,
#tab-jobs>.section,
#tab-workers>.section{
  position:relative;
  padding:26px 28px 30px!important;
  margin:0 0 32px!important;
  border:1px solid rgba(214,254,80,.105)!important;
  border-top:2px solid rgba(214,254,80,.28)!important;
  background:linear-gradient(180deg,rgba(214,254,80,.018),rgba(214,254,80,.004) 120px,transparent 260px)!important;
}

#tab-staking>.section>.section-head,
#tab-jobs>.section>.section-head,
#tab-workers>.section>.section-head{
  min-height:34px;
  margin:-2px 0 18px!important;
  padding:0 0 14px!important;
  border-bottom:1px solid rgba(214,254,80,.13)!important;
}

#tab-staking>.section>.section-head .section-title,
#tab-jobs>.section>.section-head .section-title,
#tab-workers>.section>.section-head .section-title{
  position:relative;
  padding-left:13px;
}
#tab-staking>.section>.section-head .section-title:before,
#tab-jobs>.section>.section-head .section-title:before,
#tab-workers>.section>.section-head .section-title:before{
  content:'';
  position:absolute;
  left:0;
  top:50%;
  width:4px;
  height:16px;
  background:var(--lime);
  transform:translateY(-50%);
}

/* Inside staking, metadata and actions become two clearly separated sub-zones. */
.staking-info-note{
  margin:0 0 15px!important;
  padding:11px 13px!important;
  border:1px solid rgba(214,254,80,.075)!important;
  background:rgba(214,254,80,.014)!important;
}
.staking-rarity-info{
  margin:0 0 18px!important;
  border:1px solid rgba(214,254,80,.085)!important;
  background:rgba(0,0,0,.12)!important;
}
.staking-rarity-title{
  padding-left:13px!important;
}
.staking-rarity-caption{
  padding:10px 13px!important;
  border-top:1px solid rgba(214,254,80,.06);
}
.staking-toolbar-clean{
  margin:0 0 24px!important;
  padding:14px 13px!important;
  border:1px solid rgba(214,254,80,.09)!important;
  background:rgba(214,254,80,.012)!important;
}

/* Give the NFT inventory a distinct start line and breathing room. */
#tab-staking #nftGrid{
  position:relative;
  padding-top:24px!important;
  border-top:1px solid rgba(214,254,80,.16)!important;
}
#tab-staking #nftGrid:before{
  content:'NFT INVENTORY';
  position:absolute;
  left:0;
  top:7px;
  color:#6f7d65;
  font-size:7px;
  line-height:1;
  letter-spacing:1.5px;
}

/* Job Market sub-areas need separation too. */
#tab-jobs .tiers{
  padding:10px 0 20px!important;
  margin:0 0 24px!important;
  border-bottom:1px solid rgba(214,254,80,.13)!important;
}
#tab-jobs .workbench{
  padding-top:2px;
}
#tab-jobs .workbench>.panel{
  padding:20px!important;
  border:1px solid rgba(214,254,80,.09)!important;
  background:rgba(214,254,80,.01)!important;
}

/* Worker area gets the same workspace treatment. */
#tab-workers .workers-grid{
  padding-top:4px;
}

@media(max-width:800px){
  main .hero{
    padding:22px 18px 23px!important;
  }
  #tab-staking>.section,
  #tab-jobs>.section,
  #tab-workers>.section{
    padding:20px 16px 24px!important;
  }
  #statsPanel .stat{
    padding:15px 14px!important;
  }
  .staking-toolbar-clean{
    padding:13px!important;
  }
}

@media(max-width:560px){
  main .hero{
    border-left-width:2px!important;
  }
  #statsPanel.stats{
    border-left:0!important;
    border-right:0!important;
  }
  #tab-staking>.section,
  #tab-jobs>.section,
  #tab-workers>.section{
    margin-left:-2px!important;
    margin-right:-2px!important;
  }
}

@media(max-width:800px){
  main .hero{
    padding:21px 0 22px!important;
    margin-bottom:24px!important;
  }
  main .hero h1{
    font-size:clamp(22px,6.8vw,29px)!important;
  }
  #statsPanel.stats{
    margin-bottom:26px!important;
  }
  .section{
    margin-bottom:28px!important;
  }
  .left-sidebar-content{
    gap:0 16px!important;
  }
  .sidebar-flow-group[data-flow="wallet"],
  .sidebar-flow-group[data-flow="active-job"],
  .sidebar-flow-group[data-flow="rewards"]{
    margin-bottom:18px!important;
  }
}

@media(max-width:560px){
  .left-sidebar-content{
    grid-template-columns:1fr!important;
  }
  main{
    padding-top:16px!important;
  }
  main .hero{
    padding-top:17px!important;
  }
  #statsPanel .stat{
    min-height:78px!important;
  }
  .nft-grid{
    gap:15px 12px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .nft,
  .nft .art img,
  .tier,
  .worker-card,
  .worker-profile-art img,
  .stat .v{
    transition:none!important;
    transform:none!important;
  }
}
