/* Resources V2 clean rebuild */

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0 0 14px;
}
.stat-card{
  background:#142538;
  border:1px solid rgba(120,160,210,.16);
  border-radius:10px;
  padding:18px;
  min-height:72px;
}
.stat-card span{display:block;color:#b9cbe2;font-size:13px;margin-bottom:6px;}
.stat-card strong{display:inline-block;color:#fff;font-size:20px;margin-right:10px;}
.stat-card small{display:inline-block;color:#36f28d;font-size:12px;font-weight:800;}

.res-grid{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(360px,.9fr);
  gap:14px;
  margin-top:14px;
  align-items:start;
}
.res-bottom{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:14px;
  align-items:start;
}
.res-grid > .panel,
.res-bottom > .panel{
  background:#142538;
  border:1px solid rgba(120,160,210,.16);
  border-radius:10px;
  padding:16px;
}

.panel-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.panel-title h2{margin:0;font-size:18px;}
.panel-title a{color:#58aaff;text-decoration:none;font-weight:800;font-size:12px;}

.bp-btn{
  border:1px solid rgba(120,160,210,.24);
  background:#0a2034;
  color:#fff;
  border-radius:8px;
  padding:7px 12px;
  font-weight:800;
}

.res-search{display:flex;gap:12px;margin:10px 0 12px;}
.res-search input{
  flex:1;
  background:#07182b;
  border:1px solid rgba(120,160,210,.18);
  color:#fff;
  border-radius:9px;
  padding:11px 12px;
}
.res-chip{
  display:inline-block;
  margin:0 6px 8px 0;
  padding:7px 11px;
  border-radius:999px;
  background:#22344a;
  color:#d8e7f7;
  font-size:12px;
}
.res-chip:hover,.res-chip.active{background:#ff981a;color:#07111e;}

.featured-res{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:12px;
}
.res-card,.live-featured-card{
  position:relative;
  background:#0a2034;
  border:1px solid rgba(120,160,210,.14);
  border-radius:10px;
  overflow:hidden;
}
.res-img{
  height:95px;
  background:#e9edf4;
  background-size:cover;
  background-position:center;
  display:flex;
  align-items:flex-end;
  padding:8px;
}
.res-tag{
  font-size:10px;
  background:#1769ff;
  color:#fff;
  padding:4px 7px;
  border-radius:5px;
  text-transform:uppercase;
  font-weight:900;
}
.res-card-body{padding:12px;}
.res-cat-pill,.kb-pill,.kb-blue{
  display:inline-block;
  background:#145da6;
  color:#dcebff;
  border-radius:7px;
  padding:4px 8px;
  font-size:10px;
  font-weight:800;
  margin-bottom:8px;
}
.res-card h3,.res-card-body h3{
  margin:6px 0 6px;
  color:#fff;
  font-size:14px;
  line-height:1.25;
}
.res-card p,.res-card-body p{
  margin:0;
  color:#b9cbe2;
  font-size:12px;
  line-height:1.4;
}
.res-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#cbd7e6;
  font-size:11px;
  margin-top:10px;
}
.resource-bookmark{
  position:absolute;
  top:8px;
  right:8px;
  z-index:3;
  width:28px;
  height:28px;
  border:0;
  border-radius:7px;
  background:#6b7280;
  color:#fff;
  cursor:pointer;
  font-weight:900;
}
.resource-bookmark.saved{background:#ff981a;}
.row-bookmark{position:static;}

.category-list,.update-list,.bookmark-list,.download-list{
  display:flex;
  flex-direction:column;
}
.cat-row,.update-row,.bookmark-row,.download-row,.recent-item,.viewed-row{
  display:grid;
  grid-template-columns:36px 1fr auto;
  gap:10px;
  align-items:center;
  padding:11px 0;
  border-bottom:1px solid rgba(120,160,210,.12);
}
.cat-row:last-child,.update-row:last-child,.bookmark-row:last-child,.download-row:last-child,.recent-item:last-child,.viewed-row:last-child{
  border-bottom:0;
}
.cat-icon{
  width:30px;
  height:30px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:#1d4775;
  color:#fff;
}
.cat-row b,.update-row b,.bookmark-row b,.download-row b,.recent-item b,.viewed-row b{
  display:block;
  color:#fff;
  font-size:12px;
}
.cat-row span,.update-row span,.bookmark-row span,.download-row span,.recent-item span,.viewed-row span{
  display:block;
  color:#9fb0c5;
  font-size:11px;
  margin-top:2px;
}
.rank-num{color:#ff981a;font-weight:900;font-size:16px;}

.tool-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.tool-card{
  background:#182a3f;
  border:1px solid rgba(120,160,210,.14);
  border-radius:10px;
  padding:15px 10px;
  text-align:center;
  text-decoration:none;
  color:#fff;
}
.tool-card i{display:block;font-size:20px;margin-bottom:6px;font-style:normal;}
.tool-card b{display:block;color:#fff;font-size:12px;}
.tool-card span{display:block;color:#9fb0c5;font-size:11px;margin-top:3px;}
.res-action{
  display:block;
  margin-top:10px;
  text-align:center;
  background:#0e63ca;
  color:#fff !important;
  text-decoration:none;
  padding:10px;
  border-radius:8px;
  font-weight:900;
}

.res-empty{
  color:#9fb0c5;
  padding:12px;
  background:#0a2034;
  border:1px solid rgba(120,160,210,.12);
  border-radius:9px;
}

@media(max-width:1200px){
  .stats-grid{grid-template-columns:repeat(2,1fr);}
  .res-grid,.res-bottom{grid-template-columns:1fr;}
  .featured-res{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:700px){
  .stats-grid,.featured-res,.tool-grid{grid-template-columns:1fr;}
}

/* FINAL FORCE: Resources route scoped */
body:has(.featured-res) .stats-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:14px !important;
  margin:0 0 14px !important;
}

body:has(.featured-res) .stats-grid .stat-card{
  display:block !important;
  background:#142538 !important;
  border:1px solid rgba(120,160,210,.16) !important;
  border-radius:10px !important;
  padding:18px !important;
  min-height:72px !important;
}

body:has(.featured-res) .stats-grid .stat-card span{
  display:block !important;
  color:#b9cbe2 !important;
  font-size:13px !important;
  margin:0 0 6px !important;
}

body:has(.featured-res) .stats-grid .stat-card strong{
  display:inline-block !important;
  color:#fff !important;
  font-size:20px !important;
  margin-right:10px !important;
}

body:has(.featured-res) .stats-grid .stat-card small{
  display:inline-block !important;
  color:#36f28d !important;
  font-size:12px !important;
  font-weight:800 !important;
}

body:has(.featured-res) .res-grid{
  display:grid !important;
  grid-template-columns:minmax(0,1.7fr) minmax(360px,.9fr) !important;
  gap:14px !important;
  margin-top:14px !important;
  align-items:start !important;
}

body:has(.featured-res) .res-bottom{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:14px !important;
  margin-top:14px !important;
}

body:has(.featured-res) .res-grid > .panel,
body:has(.featured-res) .res-bottom > .panel{
  display:block !important;
  background:#142538 !important;
  border:1px solid rgba(120,160,210,.16) !important;
  border-radius:10px !important;
  padding:16px !important;
  min-height:auto !important;
  height:auto !important;
}

/* Recent Updates clean columns */
.resources-v2-page .recent-clean-head,
.resources-v2-page .recent-clean-row{
  display:grid !important;
  grid-template-columns:minmax(360px,1fr) 150px 150px 150px 34px !important;
  gap:18px !important;
  align-items:center !important;
}

.resources-v2-page .recent-clean-head{
  padding:0 0 12px !important;
  border-bottom:1px solid rgba(120,160,210,.16) !important;
  color:#9fbbe0 !important;
  font-size:12px !important;
  font-weight:900 !important;
  letter-spacing:.04em !important;
}

.resources-v2-page .recent-clean-row{
  padding:18px 0 !important;
  border-bottom:1px solid rgba(120,160,210,.14) !important;
}

.resources-v2-page .recent-clean-row:last-child{
  border-bottom:0 !important;
}

.resources-v2-page .recent-clean-article{
  display:grid !important;
  grid-template-columns:24px 1fr !important;
  gap:12px !important;
  align-items:start !important;
}

.resources-v2-page .recent-clean-article b{
  color:#fff !important;
  display:block !important;
  font-size:15px !important;
  margin-bottom:4px !important;
}

.resources-v2-page .recent-clean-article p{
  color:#9fb0c5 !important;
  font-size:13px !important;
  line-height:1.35 !important;
  margin:0 !important;
  max-width:560px !important;
}

.resources-v2-page .recent-clean-status{
  color:#dceaff !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}

.resources-v2-page .recent-clean-date b{
  display:block !important;
  color:#fff !important;
  font-size:14px !important;
}

.resources-v2-page .recent-clean-date small{
  display:block !important;
  color:#9fb0c5 !important;
  font-size:12px !important;
}

.resources-v2-page .recent-clean-row .row-bookmark{
  position:static !important;
  justify-self:end !important;
}
