/* ==========================================================
   NB Notice Table — Premium Dashboard v3.0
   Layout: Left date column | Right notice card grid
   Font: Noto Sans Bengali
   ========================================================== */

/* Self-hosted Noto Sans Bengali (no external Google Fonts request).
   unicode-range keeps the browser fetching only the subset it needs. */
@font-face{font-family:'Noto Sans Bengali';font-style:normal;font-weight:400;font-display:swap;
  src:url('../fonts/noto-sans-bengali-bengali-400-normal.woff2') format('woff2');
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1;}
@font-face{font-family:'Noto Sans Bengali';font-style:normal;font-weight:600;font-display:swap;
  src:url('../fonts/noto-sans-bengali-bengali-600-normal.woff2') format('woff2');
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1;}
@font-face{font-family:'Noto Sans Bengali';font-style:normal;font-weight:700;font-display:swap;
  src:url('../fonts/noto-sans-bengali-bengali-700-normal.woff2') format('woff2');
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+1CD0,U+1CD2,U+1CD5-1CD6,U+1CD8,U+1CE1,U+1CEA,U+1CED,U+1CF2,U+1CF5-1CF7,U+200C-200D,U+20B9,U+25CC,U+A8F1;}
@font-face{font-family:'Noto Sans Bengali';font-style:normal;font-weight:400;font-display:swap;
  src:url('../fonts/noto-sans-bengali-latin-400-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Noto Sans Bengali';font-style:normal;font-weight:600;font-display:swap;
  src:url('../fonts/noto-sans-bengali-latin-600-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Noto Sans Bengali';font-style:normal;font-weight:700;font-display:swap;
  src:url('../fonts/noto-sans-bengali-latin-700-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

:root {
  --g:        #1E293B;
  --gd:       #0F172A;
  --gm:       #334155;
  --gl:       #E9EEF6;
  --gg:       #CBD5E1;
  --acc:      #F59E0B;
  --accb:     #FFFBEB;
  --sur:      #FFFFFF;
  --bg:       #F1F5F9;
  --bdr:      #D9E1EB;
  --bdrk:     #A5B2C4;
  --tx:       #0F172A;
  --txm:      #334155;
  --txmu:     #64748B;
  --txf:      #94A3B8;
  --fn:       'Noto Sans Bengali', 'Hind Siliguri', Arial, sans-serif;
  --r:        10px;
  --rl:       14px;
  --rxl:      18px;
  --sh:       0 1px 4px rgba(15,23,42,.08), 0 1px 2px rgba(0,0,0,.04);
  --shm:      0 4px 18px rgba(15,23,42,.11), 0 2px 8px rgba(0,0,0,.05);
  --tr:       all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Wrapper ─────────────────────────────────── */
.nb-notice-wrap {
  font-family: var(--fn);
  font-size: 14.5px;
  color: var(--tx);
  margin: 24px 0;
}

/* Each panel hosts a full widget; trim its outer margin under the tabs. */
.nb-notice-tabs-wrap .nb-notice-wrap { margin: 0; }

/* ── App body + loading overlay (lazy-loaded frontend) ── */
.nb-app-body { position: relative; min-height: 80px; }

.nb-loading {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(242,246,243,0.72);
  backdrop-filter: blur(1px);
  border-radius: var(--rl);
  z-index: 3;
}

.nb-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--gg);
  border-top-color: var(--g);
  border-radius: 50%;
  animation: nb-spin 0.7s linear infinite;
}

@keyframes nb-spin { to { transform: rotate(360deg); } }

.nb-header-badge {
  background: var(--gl);
  color: var(--gd);
  border: 1px solid var(--gg);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Stats Row ───────────────────────────────── */
.nb-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.nb-stat-card {
  background: var(--sur);
  border-radius: var(--r);
  border: 1px solid var(--bdr);
  padding: 12px 14px;
  box-shadow: var(--sh);
  transition: var(--tr);
}

.nb-stat-card:hover {
  box-shadow: var(--shm);
  transform: translateY(-1px);
  border-color: var(--bdrk);
}

.nb-stat-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--txmu);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.nb-stat-value {
  font-size: 23px;
  font-weight: 700;
  color: var(--g);
  line-height: 1.1;
  margin: 3px 0 2px;
}

.nb-stat-desc {
  font-size: 11px;
  color: var(--txf);
}

/* ── Controls Panel ──────────────────────────── */
.nb-controls-panel {
  background: var(--sur);
  border-radius: var(--rl);
  border: 1px solid var(--bdr);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: var(--sh);
}

.nb-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Search */
.nb-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.nb-search-input {
  width: 100%;
  padding: 9px 36px 9px 14px;
  border: 1.5px solid var(--bdr);
  border-radius: var(--r);
  font-family: var(--fn);
  font-size: 13.5px;
  color: var(--tx);
  background: var(--bg);
  outline: none;
  transition: var(--tr);
  box-sizing: border-box;
}

.nb-search-input::placeholder { color: var(--txf); }

.nb-search-input:focus {
  border-color: var(--g);
  background: var(--sur);
  box-shadow: 0 0 0 3px rgba(15,23,42,.09);
}

.nb-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--txmu);
  padding: 4px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--tr);
}

.nb-search-clear.visible { display: flex; }
.nb-search-clear:hover { background: var(--gl); color: var(--g); }
.nb-search-clear svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* Selects */
.nb-filter-select {
  padding: 9px 28px 9px 11px;
  border: 1.5px solid var(--bdr);
  border-radius: var(--r);
  font-family: var(--fn);
  font-size: 12.5px;
  color: var(--tx);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: var(--tr);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.nb-filter-select:focus {
  border-color: var(--g);
  box-shadow: 0 0 0 3px rgba(15,23,42,.09);
}

/* Filter chips */
.nb-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  min-height: 2px;
}

.nb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gl);
  color: var(--gd);
  border: 1px solid var(--gg);
  border-radius: 999px;
  padding: 3px 10px 3px 12px;
  font-size: 12px;
  font-weight: 600;
}

.nb-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--g);
  display: flex;
  align-items: center;
  transition: var(--tr);
}

.nb-chip-remove:hover { color: #DC2626; }
.nb-chip-remove svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 3; }

/* ── Results bar ─────────────────────────────── */
.nb-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.nb-results-count {
  font-size: 12.5px;
  color: var(--txmu);
}

.nb-results-count strong {
  color: var(--tx);
  font-weight: 700;
}

/* ══════════════════════════════════════════════
   TIMELINE LAYOUT — Left date | Right card
   ══════════════════════════════════════════════ */

.nb-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

/* Each row = one notice */
.nb-timeline-row {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 0;
  align-items: stretch;
  animation: nb-fadein .28s ease both;
}

.nb-timeline-row:nth-child(1)  { animation-delay: .02s; }
.nb-timeline-row:nth-child(2)  { animation-delay: .05s; }
.nb-timeline-row:nth-child(3)  { animation-delay: .08s; }
.nb-timeline-row:nth-child(4)  { animation-delay: .11s; }
.nb-timeline-row:nth-child(5)  { animation-delay: .14s; }
.nb-timeline-row:nth-child(6)  { animation-delay: .17s; }
.nb-timeline-row:nth-child(7)  { animation-delay: .20s; }
.nb-timeline-row:nth-child(8)  { animation-delay: .23s; }
.nb-timeline-row:nth-child(9)  { animation-delay: .26s; }
.nb-timeline-row:nth-child(10) { animation-delay: .29s; }

@keyframes nb-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Left: date column — single vertical date, reads bottom → top */
.nb-date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 10px 4px;
  position: relative;
}

/* Vertical timeline line */
.nb-date-col::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 18px;
  bottom: -10px;
  width: 1.5px;
  background: var(--gg);
}

.nb-timeline-row:last-child .nb-date-col::after {
  display: none;
}

/* Dot on the line */
.nb-date-col::before {
  content: '';
  position: absolute;
  right: 1px;
  top: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--g);
  border: 2.5px solid var(--sur);
  box-shadow: 0 0 0 1.5px var(--g);
  z-index: 1;
}

/* The vertical date string: e.g. "১৮ নভেম্বর ২০২৬" rotated to read upward */
.nb-date-vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--g);
  line-height: 1;
  letter-spacing: .4px;
  text-align: center;
}

.nb-date-vertical .nb-dv-year {
  font-weight: 500;
  color: var(--txf);
}

/* Right: notice card */
.nb-notice-card {
  background: var(--sur);
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  padding: 13px 16px;
  box-shadow: var(--sh);
  transition: var(--tr);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.nb-notice-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--g);
  border-radius: 0;
  opacity: 0;
  transition: var(--tr);
}

.nb-notice-card:hover {
  box-shadow: var(--shm);
  border-color: var(--bdrk);
  transform: translateX(3px);
}

.nb-notice-card:hover::before {
  opacity: 1;
}

/* Notice title */
.nb-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tx);
  line-height: 1.55;
  margin: 0 0 10px;
  word-break: break-word;
}

.nb-card-title mark {
  background: #FEF9C3;
  color: #713F12;
  border-radius: 3px;
  padding: 0 2px;
}

/* Card actions row */
.nb-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.nb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--r);
  font-family: var(--fn);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--tr);
  white-space: nowrap;
  padding: 7px 14px;
  line-height: 1;
}

.nb-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.nb-btn-primary {
  background: var(--g);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,41,59,.22);
}

.nb-btn-primary:hover {
  background: var(--gd);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(30,41,59,.28);
}

/* ── No Results ───────────────────────────────── */
.nb-no-results {
  text-align: center;
  padding: 44px 24px;
  background: var(--sur);
  border-radius: var(--rl);
  border: 1.5px dashed var(--bdr);
  color: var(--txmu);
}

.nb-no-results p:first-child {
  font-size: 15px;
  font-weight: 700;
  color: var(--tx);
  margin: 0 0 5px;
}

.nb-no-results p:last-child {
  font-size: 13px;
  color: var(--txf);
  margin: 0;
}

/* ── Error ───────────────────────────────────── */
.nb-notice-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--rl);
  padding: 14px 18px;
  color: #DC2626;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nb-notice-error svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

/* ── Bottom bar ──────────────────────────────── */
.nb-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--bdr);
  margin-top: 4px;
}

.nb-notice-info {
  font-size: 12.5px;
  color: var(--txmu);
  margin: 0;
}

.nb-notice-info strong { color: var(--g); font-weight: 700; }

/* ── Pagination ──────────────────────────────── */
.nb-pagination { margin: 0; }

.nb-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.nb-pagination li { margin: 0; padding: 0; }

.nb-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid var(--bdr);
  border-radius: var(--r);
  background: var(--sur);
  color: var(--txm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--tr);
  cursor: pointer;
  font-family: var(--fn);
}

.nb-page-btn:hover {
  background: var(--gl);
  color: var(--g);
  border-color: var(--gg);
  text-decoration: none;
}

.nb-page-btn.nb-page-current {
  background: var(--g);
  color: #fff;
  border-color: var(--g);
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(30,41,59,.22);
}

.nb-page-ellipsis {
  color: var(--txf);
  font-size: 13px;
  padding: 0 4px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
  .nb-stats-row { grid-template-columns: 1fr 1fr; }
  .nb-timeline-row { grid-template-columns: 54px 1fr; }
  .nb-date-vertical { font-size: 12.5px; }
  .nb-controls-row { flex-direction: column; align-items: stretch; }
  .nb-search-wrap { min-width: unset; }
  .nb-bottom-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .nb-stats-row { grid-template-columns: 1fr 1fr; }
  .nb-timeline-row { grid-template-columns: 48px 1fr; }
  .nb-date-col { padding-right: 12px; }
}

/* ════════════════════════════════════════════
   v5 — Institution header + Landing grid
   ════════════════════════════════════════════ */

/* Institution header (single board) */
.nb-inst-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--bdr);
}
.nb-inst-logo {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: var(--rl);
  overflow: hidden;
  background: var(--gl);
  border: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nb-inst-logo img { width: 100%; height: 100%; object-fit: cover; }
.nb-inst-logo-ph { color: var(--g); }
.nb-inst-logo-ph svg { width: 30px; height: 30px; }
.nb-inst-meta { flex: 1 1 auto; min-width: 0; }
.nb-inst-name { margin: 0 0 4px; font-size: 21px; font-weight: 700; color: var(--gd); line-height: 1.25; }
.nb-inst-desc { margin: 0 0 10px; font-size: 13.5px; color: var(--txmu); line-height: 1.55; }
.nb-inst-sub { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nb-inst-web {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--g);
  text-decoration: none; padding: 4px 10px; border: 1px solid var(--gg);
  border-radius: 999px; transition: var(--tr);
}
.nb-inst-web:hover { background: var(--gl); }
.nb-inst-web svg { width: 13px; height: 13px; }
.nb-no-file { font-size: 12.5px; color: var(--txf); font-style: italic; }

/* Landing grid */
.nb-landing { font-family: var(--fn); margin: 24px 0; color: var(--tx); }
.nb-landing-title { font-size: 24px; font-weight: 700; color: var(--gd); margin: 0 0 16px; }
.nb-landing-search { margin-bottom: 20px; max-width: 520px; }
.nb-landing-search .nb-search-input {
  width: 100%; padding: 12px 16px; font-family: var(--fn); font-size: 15px;
  border: 1.5px solid var(--bdr); border-radius: var(--r); background: var(--sur);
  color: var(--tx); outline: none; box-sizing: border-box; box-shadow: var(--sh);
}
.nb-landing-search .nb-search-input:focus { border-color: var(--gm); box-shadow: 0 0 0 3px rgba(30,41,59,.12); }

.nb-inst-grid {
  display: grid;
  grid-template-columns: repeat(var(--nb-cols, 3), 1fr);
  gap: 18px;
}
.nb-inst-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--sur); border: 1px solid var(--bdr); border-radius: var(--rl);
  padding: 18px; box-shadow: var(--sh); transition: var(--tr);
}
.nb-inst-card:hover { box-shadow: var(--shm); transform: translateY(-2px); border-color: var(--gg); }
.nb-inst-card-head { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nb-inst-card-head .nb-inst-logo { width: 52px; height: 52px; }
.nb-inst-card-name { margin: 0; font-size: 16px; font-weight: 700; color: var(--gd); line-height: 1.3; }
.nb-inst-card-desc { margin: 0; font-size: 13px; color: var(--txmu); line-height: 1.5; flex: 1 1 auto; }
.nb-inst-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.nb-inst-card .nb-inst-web { align-self: flex-start; }

@media (max-width: 880px) { .nb-inst-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .nb-inst-grid { grid-template-columns: 1fr; }
  .nb-inst-header { flex-direction: column; }
}

/* ── Categories (filter pills + per-notice badge) ── */
.nb-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}
.nb-cat-pill {
  font-family: var(--fn);
  font-size: 13px;
  font-weight: 600;
  color: var(--txm);
  background: var(--sur);
  border: 1.5px solid var(--bdr);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: var(--tr);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.nb-cat-pill:hover { border-color: var(--gg); background: var(--gl); color: var(--g); }
.nb-cat-pill.active { background: var(--g); border-color: var(--g); color: #fff; box-shadow: 0 3px 10px rgba(30,41,59,.22); }
.nb-cat-n {
  font-size: 11px;
  font-weight: 700;
  background: var(--gl);
  color: var(--g);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}
.nb-cat-pill.active .nb-cat-n { background: rgba(255,255,255,.22); color: #fff; }

/* Per-notice category badge */
.nb-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 7px;
  background: var(--gl);
  color: var(--g);
  border: 1px solid var(--gg);
}
.nb-cat-jobs         { background:#E7F1FB; color:#1C5D9B; border-color:#C5DCF3; }
.nb-cat-exam         { background:#F3ECFB; color:#7A3D9B; border-color:#E1D2F2; }
.nb-cat-result       { background:#FBF8E7; color:#8A6D1C; border-color:#EFE6B6; }
.nb-cat-edu          { background:#E8F5EE; color:#0A6B3A; border-color:#BFE0CD; }
.nb-cat-notice       { background:#EFF1F3; color:#555E6B; border-color:#DCE1E6; }
.nb-cat-other        { background:#F4F5F6; color:#6B7280; border-color:#E2E5E8; }

@media (max-width: 560px) {
  .nb-cat-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .nb-cat-pill { flex: 0 0 auto; }
}

/* ════════════════════════════════════════════
   v5.9 — National homepage  [nb_home]  (premium)
   ════════════════════════════════════════════ */
.nb-home {
  font-family: var(--fn);
  color: var(--tx);
  margin: 24px 0;
}
.nb-home svg { stroke-width: 1.8; }

/* ── Hero (centered) ── */
.nb-hero {
  text-align: center;
  padding: 24px 24px 20px;
}
.nb-hero-title {
  margin: 0 0 10px;
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 700;
  color: var(--gd);
  line-height: 1.2;
  letter-spacing: -.3px;
}
.nb-hero-sub {
  margin: 0 auto 14px;
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 600;
  color: var(--g);
}
.nb-hero-desc {
  margin: 0 auto;
  max-width: 660px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--txmu);
}

/* ── Hero stats (premium icon tiles) ── */
.nb-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.nb-hstat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--sur);
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  padding: 16px 18px;
  box-shadow: var(--sh);
  transition: var(--tr);
}
.nb-hstat-card:hover {
  box-shadow: var(--shm);
  transform: translateY(-2px);
  border-color: var(--gg);
}
.nb-hstat-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.nb-hstat-icon svg { width: 23px; height: 23px; }
.nb-hstat-building { background: linear-gradient(150deg, #334155, #1E293B); }
.nb-hstat-filetext { background: linear-gradient(150deg, #2E8FD6, #1C5D9B); }
.nb-hstat-calcheck { background: linear-gradient(150deg, #F0A93B, #D9821C); }
.nb-hstat-caldays  { background: linear-gradient(150deg, #9A6BD6, #6E3D9B); }
.nb-hstat-body { min-width: 0; }
.nb-hstat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--tx);
  line-height: 1.05;
}
.nb-hstat-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--txm);
  margin-top: 3px;
}
.nb-hstat-desc {
  font-size: 11px;
  color: var(--txf);
  margin-top: 1px;
}

/* ── Home controls (search + filter selects) ── */
.nb-home-controls { margin-bottom: 20px; border-radius: var(--rl); }
.nb-home-controls .nb-controls-row { gap: 10px; }
.nb-home-controls .nb-filter-select { flex: 1 1 150px; min-width: 130px; }

/* Search input with leading icon */
.nb-search-wrap-icon { position: relative; }
.nb-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txf);
  display: flex;
  pointer-events: none;
}
.nb-search-icon svg { width: 16px; height: 16px; }
.nb-search-wrap-icon .nb-search-input { padding-left: 38px; }

/* ── Section heads (with icon accents) ── */
.nb-home-section { margin-bottom: 30px; }
.nb-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--bdr);
}
.nb-section-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--gd);
  line-height: 1.25;
}
.nb-section-title svg {
  width: 22px;
  height: 22px;
  color: var(--g);
  flex-shrink: 0;
}

/* ── Feed row meta (institution tag + category badge) ── */
.nb-card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.nb-card-meta-row .nb-cat-badge { margin-bottom: 0; }
.nb-src-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--g);
  background: var(--gl);
  border: 1px solid var(--gg);
  border-radius: 7px;
  padding: 3px 11px;
  text-decoration: none;
  transition: var(--tr);
  max-width: 100%;
}
.nb-src-tag svg { width: 13px; height: 13px; flex-shrink: 0; }
.nb-src-tag:hover { background: var(--g); color: #fff; border-color: var(--g); text-decoration: none; }

/* ── Directory tweaks ── */
.nb-dir .nb-inst-card-head { align-items: flex-start; }
.nb-inst-card-headtext { min-width: 0; }
.nb-inst-type-tag {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--txm);
  background: var(--gl);
  border: 1px solid var(--gg);
  border-radius: 999px;
  padding: 2px 10px;
}
.nb-inst-card-foot .nb-btn svg { width: 13px; height: 13px; }

/* ── Category cards (vertical centered tiles) ── */
.nb-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}
.nb-cat-card {
  font-family: var(--fn);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  width: 100%;
  background: var(--sur);
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  padding: 22px 14px 18px;
  cursor: pointer;
  box-shadow: var(--sh);
  transition: var(--tr);
  overflow: hidden;
  --cat-c: var(--g);
  --cat-bg: var(--gl);
  --cat-bd: var(--gg);
}
/* color top accent strip */
.nb-cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-c);
  opacity: .85;
}
.nb-cat-card:hover {
  box-shadow: var(--shm);
  transform: translateY(-3px);
  border-color: var(--cat-bd);
}
.nb-cat-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cat-bg);
  color: var(--cat-c);
  border: 1px solid var(--cat-bd);
  transition: var(--tr);
}
.nb-cat-card-icon svg { width: 26px; height: 26px; }
.nb-cat-card:hover .nb-cat-card-icon {
  background: var(--cat-c);
  color: #fff;
  border-color: var(--cat-c);
  transform: scale(1.05);
}
.nb-cat-card-count {
  font-size: 27px;
  font-weight: 700;
  color: var(--tx);
  line-height: 1;
  letter-spacing: -.5px;
}
.nb-cat-card-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--txmu);
  line-height: 1.4;
}

/* Per-category color theming (drives icon tile + accent strip + hover) */
.nb-cat-card.nb-cat-jobs   { --cat-c:#1C5D9B; --cat-bg:#E7F1FB; --cat-bd:#C5DCF3; }
.nb-cat-card.nb-cat-edu    { --cat-c:#0A6B3A; --cat-bg:#E8F5EE; --cat-bd:#BFE0CD; }
.nb-cat-card.nb-cat-result { --cat-c:#8A6D1C; --cat-bg:#FBF8E7; --cat-bd:#EFE6B6; }
.nb-cat-card.nb-cat-exam   { --cat-c:#7A3D9B; --cat-bg:#F3ECFB; --cat-bd:#E1D2F2; }
.nb-cat-card.nb-cat-notice { --cat-c:#B23F86; --cat-bg:#FBEEF6; --cat-bd:#F2CFE3; }
.nb-cat-card.nb-cat-other  { --cat-c:#3D5567; --cat-bg:#EEF2F4; --cat-bd:#D3DEE5; }

/* ── Responsive ── */
@media (max-width: 880px) {
  .nb-hero-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nb-home-controls .nb-controls-row { flex-direction: column; align-items: stretch; }
  .nb-home-controls .nb-filter-select { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .nb-hero { padding: 36px 16px 30px; }
  .nb-hero-stats { grid-template-columns: 1fr; }
  .nb-hstat-value { font-size: 26px; }
  .nb-cats-grid { grid-template-columns: 1fr 1fr; }
  .nb-cat-card-count { font-size: 24px; }
}

/* ══════════════════════════════════════════════
   NU-style sections: Today / All / FAQ / Manual
   ══════════════════════════════════════════════ */
.nb-section { margin-bottom: 26px; }

/* Section head: title + subtitle only (no icon) */
.nb-section .nb-section-head,
.nb-section-head.nb-section-head-today {
  justify-content: flex-start;
  border-bottom: none;
  padding-bottom: 0;
  gap: 12px;
  margin-bottom: 14px;
}
.nb-section .nb-section-title {
  display: block;
  font-size: 18px;
  margin: 0;
}
.nb-section .nb-section-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--txmu);
  font-weight: 500;
}

/* Today section — slate themed (NOT yellow) */
.nb-section-today {
  background: linear-gradient(165deg, #FFFFFF 0%, var(--gl) 100%);
  border: 1px solid var(--bdr);
  border-radius: var(--rxl);
  padding: 18px;
}
.nb-section-today .nb-timeline { margin-top: 4px; }

/* ── FAQ accordion ── */
.nb-section-faq {
  background: var(--sur);
  border: 1px solid var(--bdr);
  border-radius: var(--rxl);
  padding: 20px;
}
.nb-faq-list { display: flex; flex-direction: column; gap: 10px; }
.nb-faq-item {
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  background: var(--bg);
  overflow: hidden;
  transition: var(--tr);
}
.nb-faq-item.is-open {
  border-color: var(--gg);
  background: var(--sur);
  box-shadow: var(--sh);
}
.nb-faq-q {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 14px 16px;
  font-family: inherit;
}
.nb-faq-qtext {
  margin: 0; flex: 1 1 auto;
  font-size: 14.5px; font-weight: 600;
  color: var(--gd); line-height: 1.5;
}
.nb-faq-chevron {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--g); background: var(--gl);
  border: 1px solid var(--gg);
  transition: var(--tr);
}
.nb-faq-chevron svg { width: 16px; height: 16px; }
.nb-faq-item.is-open .nb-faq-chevron {
  transform: rotate(180deg);
  color: #fff; background: var(--g); border-color: var(--g);
}
.nb-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.nb-faq-a p {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 13.5px; line-height: 1.7;
  color: var(--txm);
}

/* ── User manual ── */
.nb-section-manual {
  background: var(--sur);
  border: 1px solid var(--bdr);
  border-radius: var(--rxl);
  padding: 20px;
}
.nb-manual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.nb-manual-step { display: flex; gap: 12px; align-items: flex-start; }
.nb-manual-icon {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(140deg, var(--g), var(--gd));
  box-shadow: 0 3px 8px rgba(15,23,42,.2);
}
.nb-manual-icon svg { width: 19px; height: 19px; color: #fff; }
.nb-manual-body h3 {
  margin: 4px 0 4px;
  font-size: 14.5px; font-weight: 700;
  color: var(--gd); line-height: 1.3;
}
.nb-manual-body p {
  margin: 0;
  font-size: 13px; line-height: 1.65;
  color: var(--txm);
}
.nb-manual-body strong { color: var(--gd); font-weight: 700; }

@media (max-width: 640px) {
  .nb-manual-grid { grid-template-columns: 1fr; }
  .nb-section-today { padding: 14px; }
  .nb-section-faq, .nb-section-manual { padding: 16px; }
}
