/* ============================================================
   WCSH DGAS v2 — Complete Design System
   Brand: Deep Navy + Warm Orange + Clean White
   Font: Outfit (headings) + Plus Jakarta Sans (body)
   Changes:
   #3  scroll-top → bottom-right, clear of content
   #4  quick-cards → orange gradient tiles
   #7  brand-logo CSS for logo.png (192x192, no crop)
   +   dept-card, quick-card all orange themed
   +   BP filter bar styles
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* === ROOT VARIABLES === */
:root {
  --orange:        #F26522;
  --orange-dark:   #D4541A;
  --orange-light:  #FF8A50;
  --orange-pale:   #FEF0E8;
  --navy:          #0B1F3A;
  --navy-mid:      #152D50;
  --navy-light:    #1E3D6E;
  --navy-pale:     #E8EEF6;
  --white:         #FFFFFF;
  --surface:       #F8F9FC;
  --surface-2:     #F0F3F8;
  --border:        #E2E8F0;
  --border-dark:   #CBD5E1;
  --text:          #0F172A;
  --text-mid:      #475569;
  --text-light:    #94A3B8;
  --success:       #059669;
  --success-bg:    #ECFDF5;
  --warning:       #D97706;
  --warning-bg:    #FFFBEB;
  --danger:        #DC2626;
  --danger-bg:     #FEF2F2;
  --info:          #0284C7;
  --info-bg:       #F0F9FF;

  --shadow-xs:     0 1px 2px rgba(15,23,42,0.06);
  --shadow-sm:     0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md:     0 4px 6px rgba(15,23,42,0.07), 0 2px 4px rgba(15,23,42,0.06);
  --shadow-lg:     0 10px 25px rgba(15,23,42,0.10), 0 4px 10px rgba(15,23,42,0.06);
  --shadow-orange: 0 4px 20px rgba(242,101,34,0.30);

  --sidebar-w:  270px;
  --topbar-h:   60px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  22px;
  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* === APP SHELL === */
.app { display: flex; min-height: 100vh; }

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 300;
  overflow-y: auto;
  overflow-x: hidden;
  transition: var(--transition);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── Brand / Logo (#7) ── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

/* Logo container — fixed 36x36, never clips the image */
.brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;   /* never crops — shows full logo */
  object-position: center;
  border-radius: 4px;
  display: block;
}
/* Fallback icon shown when logo.png fails */
.brand-logo-fallback {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
  box-shadow: var(--shadow-orange);
}

.brand-text { min-width: 0; }
.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.brand-sub {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

/* Search */
.sidebar-search {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-search-inner {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
  overflow: hidden;
}
.sidebar-search-inner:focus-within {
  background: rgba(255,255,255,0.12);
  border-color: var(--orange);
}
.sidebar-search-inner i { padding: 0 10px; color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.sidebar-search-inner input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: white;
  font-size: 0.82rem;
  padding: 8px 10px 8px 0;
}
.sidebar-search-inner input::placeholder { color: rgba(255,255,255,0.35); }

/* Nav */
.nav-section { padding: 14px 0 2px; }
.nav-section-label {
  padding: 0 16px 6px;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255,255,255,0.62);
  font-size: 0.855rem;
  font-weight: 500;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: var(--transition);
  user-select: none;
  position: relative;
}
.nav-item i.nav-icon { width: 16px; text-align: center; font-size: 0.82rem; flex-shrink: 0; }
.nav-item .nav-label { flex: 1; min-width: 0; }
.nav-item .nav-arrow { font-size: 0.65rem; transition: transform 0.2s; color: rgba(255,255,255,0.3); flex-shrink: 0; }
.nav-item .nav-count { font-size: 0.65rem; background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.5); padding: 1px 6px; border-radius: 10px; flex-shrink: 0; }
.nav-item:hover { color: white; background: rgba(255,255,255,0.06); border-left-color: rgba(242,101,34,0.4); }
.nav-item.active { color: white; background: rgba(242,101,34,0.15); border-left-color: var(--orange); }
.nav-item.active i.nav-icon { color: var(--orange); }
.nav-item.open .nav-arrow { transform: rotate(90deg); }

.nav-sub { display: none; background: rgba(0,0,0,0.15); border-left: 2px solid rgba(255,255,255,0.06); margin-left: 28px; }
.nav-sub.open { display: block; }
.nav-sub .nav-item { padding: 7px 14px 7px 12px; font-size: 0.82rem; color: rgba(255,255,255,0.5); border-left: none; }
.nav-sub .nav-item:hover { color: white; background: rgba(255,255,255,0.05); border-left: none; }
.nav-sub .nav-item.active { color: var(--orange); background: none; border-left: none; }
.nav-sub .nav-item.active::before { content: ''; position: absolute; left: -2px; top: 50%; transform: translateY(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }

.sidebar-footer { margin-top: auto; padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.sidebar-footer-links { display: flex; flex-direction: column; gap: 2px; }
.sidebar-footer-link { display: flex; align-items: center; gap: 9px; padding: 7px 8px; color: rgba(255,255,255,0.4); font-size: 0.8rem; border-radius: var(--radius-sm); transition: var(--transition); cursor: pointer; }
.sidebar-footer-link:hover { color: white; background: rgba(255,255,255,0.07); }
.sidebar-footer-link i { width: 14px; text-align: center; font-size: 0.8rem; }

/* === MAIN === */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.topbar-search { flex: 1; max-width: 480px; position: relative; }
.topbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 0.85rem; pointer-events: none; }
.topbar-search input { width: 100%; padding: 9px 14px 9px 36px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 30px; font-size: 0.875rem; color: var(--text); outline: none; transition: var(--transition); }
.topbar-search input:focus { border-color: var(--orange); background: white; box-shadow: 0 0 0 3px rgba(242,101,34,0.1); }
.topbar-search input::placeholder { color: var(--text-light); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-btn { display: flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 8px; font-size: 0.84rem; font-weight: 600; transition: var(--transition); }
.topbar-btn-primary { background: var(--orange); color: white; }
.topbar-btn-primary:hover { background: var(--orange-dark); box-shadow: var(--shadow-orange); transform: translateY(-1px); }
.topbar-btn-ghost { background: var(--surface); color: var(--text-mid); border: 1px solid var(--border); }
.topbar-btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.hamburger { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; background: none; color: var(--text-mid); font-size: 1.1rem; border-radius: var(--radius-sm); transition: var(--transition); }
.hamburger:hover { background: var(--surface); }

/* Page */
.page { flex: 1; padding: 28px 32px 48px; animation: pageIn 0.25s ease; }
@keyframes pageIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* Footer */
.footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 28px 32px; font-size: 0.82rem; border-top: 3px solid var(--orange); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; color: white; margin-bottom: 4px; }
.footer-links { display: flex; gap: 20px; }
.footer-link { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.55); transition: var(--transition); cursor: pointer; }
.footer-link:hover { color: var(--orange); }
.footer-social { display: flex; gap: 8px; }
.social-btn { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: var(--transition); color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.08); }
.social-btn:hover { background: var(--orange); color: white; transform: translateY(-2px); }

/* === PAGE HERO === */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  color: white;
  position: relative;
  overflow: hidden;
}
.page-hero::before { content:''; position:absolute; top:-40px; right:-40px; width:220px; height:220px; border-radius:50%; background:rgba(242,101,34,0.12); }
.page-hero::after  { content:''; position:absolute; bottom:-60px; right:100px; width:160px; height:160px; border-radius:50%; background:rgba(255,255,255,0.04); }
.hero-eyebrow { display:inline-flex; align-items:center; gap:6px; background:rgba(242,101,34,0.2); border:1px solid rgba(242,101,34,0.3); color:var(--orange-light); padding:4px 12px; border-radius:20px; font-size:0.75rem; font-weight:600; letter-spacing:0.5px; text-transform:uppercase; margin-bottom:14px; }
.hero-title { font-family:'Outfit',sans-serif; font-size:1.9rem; font-weight:800; line-height:1.2; margin-bottom:10px; position:relative; z-index:1; }
.hero-desc { font-size:0.92rem; color:rgba(255,255,255,0.7); max-width:560px; line-height:1.7; position:relative; z-index:1; }
.hero-meta { display:flex; gap:20px; margin-top:20px; flex-wrap:wrap; position:relative; z-index:1; }
.hero-meta-item { display:flex; align-items:center; gap:6px; font-size:0.8rem; color:rgba(255,255,255,0.6); }
.hero-meta-item i { color:var(--orange-light); }

/* Breadcrumb */
.breadcrumb { display:flex; align-items:center; gap:6px; font-size:0.8rem; color:var(--text-light); margin-bottom:18px; flex-wrap:wrap; }
.breadcrumb-sep { color:var(--border-dark); font-size:0.7rem; }

/* === CARDS === */
.card { background:white; border-radius:var(--radius-lg); border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.card-body { padding:24px; }
.card-header { padding:18px 24px 14px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.card-title { font-family:'Outfit',sans-serif; font-size:1rem; font-weight:700; color:var(--navy); }

/* === HOME HERO === */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}
.home-hero::after { content:''; position:absolute; top:-80px; right:-60px; width:300px; height:300px; border-radius:50%; background:radial-gradient(circle,rgba(242,101,34,0.2) 0%,transparent 70%); pointer-events:none; }
.home-hero-title { font-family:'Outfit',sans-serif; font-size:2.4rem; font-weight:800; line-height:1.15; margin-bottom:14px; position:relative; z-index:1; }
.home-hero-title span { color:var(--orange-light); }
.home-hero-sub { font-size:1rem; color:rgba(255,255,255,0.7); max-width:500px; line-height:1.7; position:relative; z-index:1; margin-bottom:28px; }
.home-hero-stats { display:flex; gap:32px; flex-wrap:wrap; position:relative; z-index:1; }
.hero-stat-num { font-family:'Outfit',sans-serif; font-size:1.8rem; font-weight:800; color:white; line-height:1; }
.hero-stat-label { font-size:0.78rem; color:rgba(255,255,255,0.55); margin-top:3px; }
.home-image { position:absolute; right:0; top:0; bottom:0; width:320px; overflow:hidden; border-radius:0 var(--radius-xl) var(--radius-xl) 0; }
.home-image img { width:100%; height:100%; object-fit:cover; opacity:0.35; }

/* Section label */
.section-label { display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.section-title { font-family:'Outfit',sans-serif; font-size:1.1rem; font-weight:700; color:var(--navy); }
.section-title-line { flex:1; height:1px; background:var(--border); }

/* === QUICK ACCESS CARDS (#4 — orange-gradient colored tiles) === */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.quick-card {
  /* background set inline via JS gradient, overridden here with orange fallback */
  background: linear-gradient(135deg, var(--orange-dark), var(--orange-light));
  border: none;
  border-radius: var(--radius-md);
  padding: 20px 16px 18px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
}
.quick-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  filter: brightness(1.08);
}
.quick-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: white;
  margin-bottom: 2px;
}
.quick-card-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: white;
  line-height: 1.2;
}
.quick-card-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.3;
}

/* === DEPARTMENT / SUB-SECTION CARDS — orange themed === */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.dept-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
/* Orange top accent always visible */
.dept-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
}
.dept-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--orange);
  transform: translateY(-3px);
}
.dept-card-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(242,101,34,0.35);
}
.dept-card-title { font-weight: 700; font-size: 0.9rem; color: var(--navy); line-height: 1.3; }
.dept-card-desc { font-size: 0.78rem; color: var(--text-light); line-height: 1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.dept-card-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:10px; border-top:1px solid var(--surface-2); }
.dept-card-count { font-size:0.72rem; color:var(--text-light); display:flex; align-items:center; gap:4px; }
.dept-card-arrow { color:var(--orange); font-size:0.78rem; opacity:0; transition:var(--transition); transform:translateX(-4px); }
.dept-card:hover .dept-card-arrow { opacity:1; transform:translateX(0); }

/* === DOCUMENT CARDS === */
.docs-section { margin-bottom: 32px; }
.docs-section-header { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.docs-section-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 14px; border-radius:20px; font-size:0.78rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; }
.badge-national { background:var(--navy-pale); color:var(--navy-light); }
.badge-national i { color:var(--navy-light); }
.badge-wcsh { background:var(--orange-pale); color:var(--orange-dark); }
.badge-wcsh i { color:var(--orange); }
.badge-count { background:var(--border); color:var(--text-mid); padding:2px 8px; border-radius:10px; font-size:0.72rem; font-weight:700; }

.doc-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:10px; }
.doc-card { display:flex; align-items:center; gap:14px; padding:14px 16px; background:white; border:1px solid var(--border); border-radius:var(--radius-md); cursor:pointer; transition:var(--transition); text-decoration:none; color:inherit; }
.doc-card:hover { border-color:var(--orange); box-shadow:var(--shadow-sm); transform:translateX(3px); }
.doc-icon { width:40px; height:40px; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.doc-icon.national { background:var(--navy-pale); color:var(--navy-light); }
.doc-icon.wcsh     { background:var(--orange-pale); color:var(--orange); }
.doc-info { flex:1; min-width:0; }
.doc-title { font-weight:700; font-size:0.875rem; color:var(--navy); line-height:1.3; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.doc-meta { display:flex; gap:10px; font-size:0.72rem; color:var(--text-light); }
.doc-id { font-family:monospace; }
.doc-action { color:var(--orange); font-size:0.8rem; flex-shrink:0; opacity:0; transition:var(--transition); }
.doc-card:hover .doc-action { opacity:1; }
.doc-placeholder { display:flex; align-items:center; gap:12px; padding:14px 18px; background:var(--surface); border:1.5px dashed var(--border); border-radius:var(--radius-md); font-size:0.82rem; color:var(--text-light); }

/* === SEARCH RESULTS === */
.search-result { display:flex; align-items:start; gap:14px; padding:16px 18px; background:white; border:1px solid var(--border); border-radius:var(--radius-md); cursor:pointer; transition:var(--transition); margin-bottom:8px; text-decoration:none; color:inherit; }
.search-result:hover { border-color:var(--orange); box-shadow:var(--shadow-sm); }
.search-result-icon { width:38px; height:38px; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:0.9rem; flex-shrink:0; background:var(--orange-pale); color:var(--orange); }
.search-result-title { font-weight:700; font-size:0.9rem; color:var(--navy); margin-bottom:3px; }
.search-result-path { font-size:0.75rem; color:var(--text-light); }
mark { background:#FEF08A; color:var(--navy); border-radius:2px; padding:0 1px; }

/* === BEST PRACTICE === */
.bp-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.bp-filter-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.bp-filter-search i { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-light); font-size:0.82rem; pointer-events:none; }
.bp-filter-search input { width:100%; padding:9px 14px 9px 36px; border:1.5px solid var(--border); border-radius:var(--radius-sm); font-size:0.875rem; outline:none; transition:var(--transition); background:white; color:var(--text); }
.bp-filter-search input:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(242,101,34,0.1); }
.bp-filter-select { padding:9px 14px; border:1.5px solid var(--border); border-radius:var(--radius-sm); font-size:0.875rem; outline:none; cursor:pointer; background:white; color:var(--text); transition:var(--transition); }
.bp-filter-select:focus { border-color:var(--orange); }

.bp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.bp-card { background:white; border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:var(--transition); cursor:pointer; display:flex; flex-direction:column; }
.bp-card:hover { border-color:var(--orange); box-shadow:var(--shadow-md); transform:translateY(-3px); }
.bp-card-top { padding:20px 20px 14px; flex:1; }
.bp-card-meta { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.bp-tag { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:20px; font-size:0.72rem; font-weight:700; }
.bp-tag-dept { background:var(--navy-pale); color:var(--navy-light); }
.bp-tag-cat  { background:var(--orange-pale); color:var(--orange-dark); }
.bp-card-title { font-family:'Outfit',sans-serif; font-size:1rem; font-weight:700; color:var(--navy); line-height:1.3; margin-bottom:8px; }
.bp-card-desc { font-size:0.82rem; color:var(--text-mid); line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.bp-card-bottom { padding:12px 20px; background:var(--surface); border-top:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.bp-score { display:flex; align-items:center; gap:6px; font-size:0.78rem; font-weight:700; }
.bp-score-num { background:linear-gradient(135deg,var(--orange),var(--orange-dark)); color:white; padding:3px 10px; border-radius:20px; font-size:0.8rem; }
.bp-author { font-size:0.75rem; color:var(--text-light); }

/* BP Detail Modal inner elements */
#bp-modal-overlay .bp-modal-section { margin-bottom:16px; }
#bp-modal-overlay .bp-modal-label { font-size:0.72rem; text-transform:uppercase; letter-spacing:0.5px; color:var(--text-light); font-weight:700; margin-bottom:4px; }
#bp-modal-overlay .bp-modal-value { font-size:0.9rem; color:var(--text); line-height:1.6; }

/* Score bars */
.score-bar-wrap { margin-bottom:10px; }
.score-bar-label { display:flex; justify-content:space-between; font-size:0.8rem; color:var(--text-mid); margin-bottom:4px; font-weight:600; }
.score-bar-track { height:7px; background:var(--surface-2); border-radius:4px; overflow:hidden; }
.score-bar-fill  { height:100%; border-radius:4px; background:linear-gradient(90deg,var(--orange),var(--orange-light)); transition:width 0.6s ease; }

/* === OVERLAY / MODAL === */
.overlay { position:fixed; inset:0; background:rgba(11,31,58,0.6); backdrop-filter:blur(4px); z-index:1000; display:flex; align-items:center; justify-content:center; padding:20px; opacity:0; pointer-events:none; transition:opacity 0.2s; }
.overlay.open { opacity:1; pointer-events:all; }
.modal { background:white; border-radius:var(--radius-xl); box-shadow:var(--shadow-lg); width:100%; max-width:640px; max-height:90vh; overflow-y:auto; transform:scale(0.96) translateY(10px); transition:transform 0.22s ease; }
.overlay.open .modal { transform:scale(1) translateY(0); }
.modal-head { padding:24px 28px 20px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:start; gap:16px; }
.modal-title { font-family:'Outfit',sans-serif; font-size:1.15rem; font-weight:700; color:var(--navy); }
.modal-close { width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--surface); color:var(--text-mid); font-size:0.9rem; transition:var(--transition); flex-shrink:0; cursor:pointer; }
.modal-close:hover { background:var(--danger-bg); color:var(--danger); }
.modal-body { padding:24px 28px; }
.modal-foot { padding:16px 28px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:10px; background:var(--surface); border-radius:0 0 var(--radius-xl) var(--radius-xl); }

/* === BUTTONS === */
.btn { display:inline-flex; align-items:center; gap:7px; padding:10px 20px; border-radius:var(--radius-sm); font-size:0.875rem; font-weight:700; transition:var(--transition); border:none; line-height:1; white-space:nowrap; cursor:pointer; }
.btn:disabled { opacity:0.5; cursor:not-allowed; pointer-events:none; }
.btn-primary { background:var(--orange); color:white; }
.btn-primary:hover { background:var(--orange-dark); box-shadow:var(--shadow-orange); transform:translateY(-1px); }
.btn-navy    { background:var(--navy); color:white; }
.btn-navy:hover { background:var(--navy-mid); }
.btn-ghost   { background:white; color:var(--text-mid); border:1.5px solid var(--border); }
.btn-ghost:hover { border-color:var(--navy); color:var(--navy); background:var(--surface); }
.btn-success { background:var(--success); color:white; }
.btn-success:hover { opacity:0.9; }
.btn-sm  { padding:7px 14px; font-size:0.8rem; }
.btn-lg  { padding:13px 26px; font-size:0.95rem; }
.btn-full { width:100%; justify-content:center; }

/* === TOAST === */
.toast-stack { position:fixed; bottom:24px; right:24px; z-index:9999; display:flex; flex-direction:column; gap:8px; pointer-events:none; }
.toast { display:flex; align-items:center; gap:10px; padding:13px 18px; background:var(--navy); color:white; border-radius:var(--radius-md); font-size:0.875rem; font-weight:600; box-shadow:var(--shadow-lg); pointer-events:all; border-left:4px solid var(--orange); max-width:360px; animation:toastIn 0.3s ease; }
.toast.success { border-left-color:var(--success); }
.toast.error   { border-left-color:var(--danger); }
@keyframes toastIn { from{opacity:0;transform:translateX(16px);}to{opacity:1;transform:translateX(0);} }
.toast-out { animation:toastOut 0.25s ease forwards; }
@keyframes toastOut { to{opacity:0;transform:translateX(16px);} }

/* === GALLERY === */
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.gallery-item { border-radius:var(--radius-md); overflow:hidden; aspect-ratio:4/3; cursor:pointer; position:relative; }
.gallery-item img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s ease; }
.gallery-item:hover img { transform:scale(1.06); }
.gallery-item-cap { position:absolute; bottom:0; left:0; right:0; background:linear-gradient(transparent,rgba(11,31,58,0.8)); color:white; padding:20px 12px 10px; font-size:0.78rem; font-weight:600; transform:translateY(100%); transition:var(--transition); }
.gallery-item:hover .gallery-item-cap { transform:translateY(0); }

/* === EMPTY STATE === */
.empty { text-align:center; padding:56px 24px; color:var(--text-light); }
.empty-icon { font-size:3rem; margin-bottom:16px; opacity:0.3; }
.empty h3 { font-size:1rem; color:var(--text-mid); margin-bottom:6px; }
.empty p  { font-size:0.85rem; }

/* === INFO ALERT === */
.info-alert { display:flex; gap:12px; padding:14px 18px; border-radius:var(--radius-sm); font-size:0.875rem; margin-bottom:20px; border-left:3px solid; line-height:1.6; }
.info-alert i { flex-shrink:0; margin-top:1px; }
.alert-info    { background:var(--info-bg);    color:var(--info);    border-color:var(--info); }
.alert-warning { background:var(--warning-bg); color:var(--warning); border-color:var(--warning); }
.alert-success { background:var(--success-bg); color:var(--success); border-color:var(--success); }

/* === SCROLL TO TOP (#3 — bottom RIGHT, clear of content) === */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 24px;          /* RIGHT side, never overlapping the page */
  width: 42px;
  height: 42px;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 150;
  border: 2px solid rgba(255,255,255,0.12);
}
.scroll-top.show { opacity: 1; pointer-events: all; }
.scroll-top:hover { background: var(--orange); transform: translateY(-3px); box-shadow: var(--shadow-orange); }

/* === MOBILE OVERLAY === */
.mobile-overlay { display:none; position:fixed; inset:0; background:rgba(11,31,58,0.5); z-index:250; }
.mobile-overlay.show { display:block; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .home-image { display:none; }
  .dept-grid { grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); }
}
@media (max-width: 768px) {
  .sidebar { transform:translateX(-100%); box-shadow:var(--shadow-lg); }
  .sidebar.open { transform:translateX(0); }
  .main { margin-left:0; }
  .page { padding:20px 18px 40px; }
  .topbar { padding:0 18px; }
  .hamburger { display:flex; }
  .topbar-search { max-width:none; }
  .home-hero { padding:28px 24px; }
  .home-hero-title { font-size:1.7rem; }
  .home-hero-stats { gap:20px; }
  .quick-grid { grid-template-columns:repeat(3,1fr); }
  .scroll-top { right:16px; bottom:20px; }
  .footer-inner { flex-direction:column; gap:12px; }
}
@media (max-width: 480px) {
  .quick-grid { grid-template-columns:repeat(2,1fr); }
  .doc-list { grid-template-columns:1fr; }
  .bp-grid { grid-template-columns:1fr; }
}
/* ============================================================
   BP CATALOG — Design System Extension
   Appended to styles.css — all classes prefixed with bp-
   to avoid collision with existing DGAS styles.
   Compatible with the existing navy/orange token set.
============================================================ */

/* ── SEARCH BAR ROW ────────────────────────────────────────── */
.bp-search-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 640px;
  margin: 0 auto 20px;
}
.bp-search-bar .topbar-search {
  flex: 1;
  max-width: none;
}
.bp-search-bar .topbar-search input {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
}
.bp-search-bar .btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  height: 40px;
  padding: 0 18px;
  flex-shrink: 0;
}

/* ── FILTER STRIP ──────────────────────────────────────────── */
.bp-filter-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.bp-cat-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.bp-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  transition: var(--transition);
  font-family: inherit;
}
.bp-cat-chip:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.bp-cat-chip.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.bp-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.bp-filter-selects {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bp-filter-select {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  transition: var(--transition);
}
.bp-filter-select:focus { border-color: var(--orange); }
.bp-results-count {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  margin-left: auto;
  white-space: nowrap;
}

/* ── CATALOG GRID ──────────────────────────────────────────── */
.bp-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

/* ── SKELETON CARDS ────────────────────────────────────────── */
.bp-skel-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bp-skel-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--border), var(--surface-2), var(--border));
  background-size: 200% 100%;
  animation: bp-shimmer 1.4s infinite;
}
.bp-skel-line {
  background: var(--border);
  border-radius: 4px;
  animation: bp-shimmer 1.4s infinite;
}
@keyframes bp-shimmer {
  0%   { opacity: 1; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ── PRACTICE CARD ─────────────────────────────────────────── */
.bp-practice-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.bp-practice-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(242,101,34,0.3);
}
.bp-practice-card.bp-featured {
  border-color: rgba(242,101,34,0.25);
}
.bp-card-accent {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
}
.bp-card-inner {
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.bp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 6px;
}
.bp-card-ref {
  font-family: monospace;
  font-size: 0.66rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.bp-featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--orange-pale);
  border: 1px solid rgba(242,101,34,0.2);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  flex-shrink: 0;
}
.bp-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bp-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.bp-dept-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--navy-pale);
  color: var(--navy-light);
}
.bp-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}
.bp-pill-blue   { background: rgba(37,99,235,0.09);  color: #1d4ed8; }
.bp-pill-orange { background: rgba(234,88,12,0.09);  color: #c2410c; }
.bp-pill-violet { background: rgba(124,58,237,0.09); color: #5b21b6; }
.bp-pill-green  { background: rgba(5,150,105,0.09);  color: #065f46; }
.bp-pill-amber  { background: rgba(180,83,9,0.09);   color: #92400e; }
.bp-pill-purple { background: rgba(109,40,217,0.09); color: #5b21b6; }
.bp-pill-gray   { background: var(--surface-2);      color: var(--text-mid); }
.bp-file-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.66rem;
  font-weight: 700;
  background: rgba(11,31,58,0.06);
  color: var(--navy-light);
  border: 1px solid rgba(11,31,58,0.1);
}
.bp-card-excerpt {
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.bp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--surface-2);
}
.bp-card-meta {
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.5;
}
.bp-card-meta i { width: 12px; }
.bp-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-light);
  transition: var(--transition);
  flex-shrink: 0;
}
.bp-practice-card:hover .bp-card-arrow {
  background: var(--orange);
  color: var(--white);
}
.bp-score-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.bp-chip-green { background: var(--success-bg); color: var(--success); border: 1px solid rgba(5,150,105,0.2); }
.bp-chip-amber { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }

/* ── DETAIL HERO BAND ──────────────────────────────────────── */
.bp-detail-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
  color: var(--white);
  position: relative;
}
.bp-detail-hero-accent {
  height: 5px;
  width: 100%;
}
.bp-dh-inner {
  padding: 28px 32px 32px;
  position: relative;
  z-index: 1;
}
.bp-dh-inner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(242,101,34,0.12);
  pointer-events: none;
}
.bp-dh-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.bp-dh-ref {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255,255,255,0.14);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}
.bp-dh-cpill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.16);
  color: var(--white);
}
.bp-dh-featured {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}
.bp-dh-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
}
.bp-dh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.78rem;
  opacity: 0.82;
  margin-bottom: 16px;
}
.bp-dh-meta i { margin-right: 4px; }
.bp-dh-score {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 4px;
  max-width: 380px;
}
.bp-dh-score-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}
.bp-dh-score-lbl {
  font-size: 0.66rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.bp-dh-score-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
  width: 180px;
}
.bp-dh-score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s var(--transition);
}
.bp-dh-score-rec {
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── DETAIL META GRID ──────────────────────────────────────── */
.bp-detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px;
}
.bp-dmf {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.bp-dmf-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.bp-dmf-val {
  font-size: 0.84rem;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.45;
}

/* ── DETAIL CONTENT SECTIONS ───────────────────────────────── */
.bp-sec-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.bp-sec-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.bp-sec-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--navy);
}
.bp-sec-body {
  padding: 16px 20px;
  font-size: 0.86rem;
  color: var(--text-mid);
  line-height: 1.75;
  white-space: pre-line;
}
.bp-files-count-badge {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-light);
  background: var(--surface-2);
  padding: 2px 9px;
  border-radius: 20px;
}

/* ── STANDARDS ALIGNMENT TAGS ──────────────────────────────── */
.bp-std-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(217,119,6,0.18);
}

/* ── SUPPORTING FILES — IMAGE GALLERY ──────────────────────── */
.bp-files-sublabel {
  padding: 8px 20px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bp-img-gallery {
  display: grid;
  gap: 10px;
  padding: 10px 20px;
}
.bp-img-g1    { grid-template-columns: 1fr; max-width: 400px; }
.bp-img-g2    { grid-template-columns: 1fr 1fr; }
.bp-img-g3    { grid-template-columns: 1fr 1fr 1fr; }
.bp-img-gmany { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.bp-gallery-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bp-gallery-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-gallery-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--surface-2);
  border: 2px solid transparent;
  transition: var(--transition);
}
.bp-gallery-thumb:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
  transform: scale(1.03);
}
.bp-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,31,58,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  color: var(--white);
  font-size: 1.4rem;
}
.bp-gallery-thumb:hover .bp-img-overlay { opacity: 1; }
.bp-img-err {
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface-2);
  font-size: 0.72rem;
  color: var(--text-light);
  text-align: center;
  padding: 8px;
}
.bp-img-err i { font-size: 1.4rem; opacity: 0.4; }
.bp-img-err a { color: var(--orange); font-weight: 600; font-size: 0.7rem; }

/* ── SUPPORTING FILES — DOCUMENT CARDS ─────────────────────── */
.bp-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 20px 14px;
}
.bp-doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--white);
  transition: var(--transition);
}
.bp-doc-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}
.bp-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.bp-di-img   { background: rgba(37,99,235,0.1);  color: #1d4ed8; }
.bp-di-pdf   { background: rgba(239,68,68,0.1);  color: #dc2626; }
.bp-di-word  { background: rgba(37,99,235,0.1);  color: #1d4ed8; }
.bp-di-excel { background: rgba(16,185,129,0.1); color: #047857; }
.bp-di-ppt   { background: rgba(234,88,12,0.1);  color: #c2410c; }
.bp-di-other { background: rgba(100,116,139,0.1);color: #475569; }
.bp-doc-info { flex: 1; min-width: 0; }
.bp-doc-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-doc-type {
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bp-doc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── LIGHTBOX ──────────────────────────────────────────────── */
.bp-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.bp-lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.bp-lb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 92vw;
  max-height: 90vh;
  position: relative;
  z-index: 1;
}
.bp-lb-img {
  max-width: 88vw;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  display: block;
  object-fit: contain;
}
.bp-lb-title {
  color: rgba(255,255,255,0.88);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
  max-width: 80vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-lb-btn {
  position: fixed;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1001;
}
.bp-lb-btn:hover { background: rgba(255,255,255,0.28); }
.bp-lb-close { top: 20px;  right: 20px; }
.bp-lb-prev  { top: 50%;   left: 16px;  transform: translateY(-50%); }
.bp-lb-next  { top: 50%;   right: 16px; transform: translateY(-50%); }
.bp-lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: var(--white);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  z-index: 1001;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bp-catalog-grid {
    grid-template-columns: 1fr;
  }
  .bp-filter-strip {
    padding: 12px 14px;
  }
  .bp-cat-chips {
    gap: 6px;
  }
  .bp-cat-chip {
    padding: 5px 10px;
    font-size: 0.74rem;
  }
  .bp-filter-selects {
    flex-wrap: wrap;
  }
  .bp-detail-meta-grid {
    grid-template-columns: 1fr;
  }
  .bp-dh-inner {
    padding: 20px 18px 24px;
  }
  .bp-dh-title {
    font-size: 1.3rem;
  }
  .bp-dh-score {
    max-width: 100%;
  }
  .bp-dh-score-bar-track {
    width: 120px;
  }
  .bp-img-g2,
  .bp-img-g3 {
    grid-template-columns: 1fr 1fr;
  }
  .bp-search-bar {
    flex-direction: column;
    gap: 8px;
  }
  .bp-search-bar .topbar-search input {
    border-radius: var(--radius-md);
    border-right: 1.5px solid var(--border);
  }
  .bp-search-bar .btn {
    border-radius: var(--radius-md);
    width: 100%;
  }
  .bp-lb-prev { left: 6px; }
  .bp-lb-next { right: 6px; }
}

@media (max-width: 480px) {
  .bp-img-g2,
  .bp-img-g3,
  .bp-img-gmany {
    grid-template-columns: 1fr;
  }
  .bp-doc-actions {
    flex-direction: column;
    gap: 4px;
  }
}