:root {
  --primary: #005f5f;
  --primary-mid: #008080;
  --primary-dark: #004040;
  --accent: #b8860b;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
}

body { font-family: 'Inter', 'Segoe UI', sans-serif; background: var(--slate-50); color: var(--slate-700); }

/* PAGE HEADER */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 44px 0 40px;
  position: relative;
}
.page-header > .container-xl { max-width: 1320px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.page-header .breadcrumb-row { font-size: 13px; opacity: .75; margin-bottom: 10px; }
.page-header .breadcrumb-row a { color: #fff; text-decoration: none; }
.page-header .breadcrumb-row a:hover { text-decoration: underline; }
.page-header h1 { font-size: 30px; font-weight: 800; margin: 0 0 6px; }
.page-header .lead { font-size: 15px; opacity: .9; margin: 0; }
@media (max-width: 768px) {
  .page-header h1 { font-size: 24px; }
  .page-header .lead { font-size: 14px; }
}

/* Main wrap */
.wrap { max-width: 1320px; margin: 36px auto 60px; padding: 0 16px; }

/* Category tabs */
.cat-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--slate-200); margin-bottom: 28px; overflow-x: auto; }
.cat-tab {
  background: transparent; border: none; padding: 14px 20px;
  font-weight: 600; font-size: 14px; color: var(--slate-500);
  cursor: pointer; transition: .2s; border-bottom: 3px solid transparent;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
}
.cat-tab:hover { color: var(--primary); }
.cat-tab.active { border-bottom-color: var(--primary); color: var(--primary); }
.cat-count { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #e6f4f4; color: var(--primary); }
.cat-section.hidden { display: none; }

/* Section headers */
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
@media (min-width: 640px) { .section-head { flex-direction: row; align-items: center; justify-content: space-between; } }
.section-head h2 { font-size: 20px; font-weight: 700; color: var(--slate-800); margin-bottom: 4px; }
.section-head .section-meta { font-size: 14px; color: var(--slate-500); margin: 0; }

/* Search input */
.search-wrap { position: relative; width: 100%; }
@media (min-width: 640px) { .search-wrap { width: 280px; } }
.search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate-400); font-size: 13px; pointer-events: none; }
.search-wrap input {
  width: 100%; padding: 10px 14px 10px 36px; border: 1px solid var(--slate-200);
  border-radius: 12px; font-size: 14px; background: #fff; transition: .15s;
}
.search-wrap input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,95,95,.1); }
.search-wrap input::-webkit-search-cancel-button { display: none; }

/* PDF grid */
.pdf-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .pdf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pdf-grid { grid-template-columns: repeat(3, 1fr); } }

.pdf-card {
  background: #fff; border-radius: 18px; padding: 16px;
  display: flex; gap: 12px; align-items: flex-start;
  border: 1.5px solid var(--slate-200); transition: .2s;
}
.pdf-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,95,95,.1); border-color: var(--primary); }
.pdf-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #e6f4f4; color: var(--primary); font-size: 18px;
}
.pdf-body { flex: 1; min-width: 0; }
.pdf-no { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.pdf-title { font-size: 14px; font-weight: 600; color: var(--slate-800); line-height: 1.4; margin-bottom: 12px; }
.pdf-actions { display: flex; gap: 8px; }
.pdf-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: 9px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: .15s; border: none; text-decoration: none !important;
}
.pdf-btn-primary { background: var(--primary); color: #fff !important; }
.pdf-btn-primary:hover { background: var(--primary-dark); }
.pdf-btn-outline { background: #fff; color: var(--slate-600) !important; border: 1px solid var(--slate-200); }
.pdf-btn-outline:hover { background: var(--slate-50); }

/* Empty / no-result */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px; text-align: center;
}
.empty-state .empty-icon-lg {
  width: 80px; height: 80px; border-radius: 20px; background: var(--slate-100);
  color: var(--slate-400); font-size: 30px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.empty-state h2 { font-size: 20px; font-weight: 700; color: var(--slate-700); margin-bottom: 6px; }
.empty-state p { color: var(--slate-500); max-width: 420px; margin: 0; }
.empty-state .soon-badge {
  margin-top: 14px; padding: 8px 16px; border-radius: 999px;
  background: var(--slate-100); color: var(--slate-500); font-size: 13px; font-weight: 600;
}
.no-result { text-align: center; padding: 70px 20px; color: var(--slate-400); }
.no-result i { font-size: 32px; margin-bottom: 14px; }
.no-result p { font-size: 16px; font-weight: 500; margin: 0; }

/* PDF MODAL */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px; overflow: hidden;
  width: 95vw; max-width: 900px; height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.modal-header {
  padding: 14px 20px; border-bottom: 1px solid var(--slate-200);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.modal-header .left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.modal-header .pdf-mini-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px;
}
.modal-header .modal-title {
  font-weight: 600; color: var(--slate-800); font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-header .right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 12px; }
.modal-header .dl-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: #fff !important; text-decoration: none !important; font-size: 13px; font-weight: 600;
}
.modal-header .dl-btn:hover { background: linear-gradient(135deg, var(--primary-dark), #006666); }
.modal-header .close-btn {
  width: 32px; height: 32px; border-radius: 9px; background: var(--slate-100);
  border: none; color: var(--slate-600); cursor: pointer; transition: .15s;
  display: flex; align-items: center; justify-content: center;
}
.modal-header .close-btn:hover { background: var(--slate-200); }
.modal-iframe { flex: 1; border: none; width: 100%; }
