/* ==========================================================================
   Research & Briefings + Admin  (loaded by services, research and admin pages)
   ========================================================================== */
[hidden] { display: none !important; }

@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.btn-sm { padding: 11px 20px; font-size: 13.5px; }

/* stacked document illustration */
.research-banner-art, .research-hero-art {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 270px;
  margin-inline: auto;
}
.art-doc {
  position: absolute;
  width: 168px; height: 214px;
  top: 28px; left: 50%;
  margin-left: -84px;
  background: var(--white);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; gap: 9px;
}
.art-doc i { display: block; height: 7px; border-radius: 4px; background: var(--gray-200); }
.art-doc i:nth-of-type(2) { width: 82%; }
.art-doc i:nth-of-type(3) { width: 60%; }
.art-doc-3 { transform: translateX(62px) rotate(9deg); opacity: 0.55; }
.art-doc-2 { transform: translateX(-62px) rotate(-9deg); opacity: 0.78; }
.art-doc-1 { transform: translateY(8px); }
.art-pdf {
  align-self: flex-start;
  background: var(--teal); color: var(--navy-dark);
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: var(--radius-pill);
  margin-bottom: 6px;
}
.art-bars { margin-top: auto; display: flex; align-items: flex-end; gap: 7px; height: 56px; }
.art-bars b { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--teal), var(--teal-dark)); }
.art-bars b:nth-child(1) { height: 38%; } .art-bars b:nth-child(2) { height: 62%; }
.art-bars b:nth-child(3) { height: 48%; } .art-bars b:nth-child(4) { height: 84%; } .art-bars b:nth-child(5) { height: 70%; }

/* services page banner */
.btn-dark { background: var(--navy); color: var(--white); box-shadow: 0 18px 36px -16px rgba(11, 30, 63, 0.55); }
.btn-dark:hover { background: var(--navy-3); transform: translateY(-3px); }
.research-banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: center;
  padding: 56px clamp(28px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #00d1b6 0%, var(--teal) 45%, #00a08c 100%);
  color: var(--navy-dark);
  box-shadow: 0 30px 60px -28px rgba(0, 168, 147, 0.6);
}
.research-banner::before {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.09) 0 2px, transparent 2px 22px);
}
.research-banner::after {
  content: ''; position: absolute; z-index: -1; width: 360px; height: 360px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.28); filter: blur(80px); right: -60px; top: -140px;
}
.research-banner h2 { color: var(--navy-dark); margin-bottom: 14px; }
.research-banner p { color: rgba(6, 15, 34, 0.82); max-width: 520px; margin-bottom: 28px; font-weight: 500; }
.research-banner .eyebrow { color: var(--navy); background: rgba(11, 30, 63, 0.12); }

/* research page hero */
.research-hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.research-stats { display: flex; gap: 48px; margin-top: 44px; flex-wrap: wrap; }
.research-stats > div { display: flex; flex-direction: column; gap: 4px; }
.research-stat-num { font-size: clamp(26px, 3vw, 34px); font-weight: 800; color: var(--teal-light); }
.research-stat-label { font-size: 13.5px; color: var(--text-on-navy); }

.research-section { background: var(--off-white); padding: 64px 0 110px; }
.research-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1.5px solid var(--gray-200); color: var(--gray-600);
  padding: 10px 18px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 700;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip-count { font-size: 12px; min-width: 22px; padding: 2px 7px; border-radius: var(--radius-pill); background: var(--gray-100); color: var(--gray-600); text-align: center; }
.chip.active .chip-count { background: var(--teal); color: var(--navy-dark); }

.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius-pill);
  padding: 0 18px; width: min(100%, 300px); color: var(--gray-500);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0, 194, 168, 0.15); }
.search-box input { border: none; outline: none; background: transparent; font: inherit; font-size: 14.5px; color: var(--navy); padding: 13px 0; width: 100%; }

/* covers */
.report-cover {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 170px; padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--white);
  background: linear-gradient(135deg, #0b1e3f, #17335e 55%, #00a893);
}
.cat-morning-briefing .report-cover { background: linear-gradient(135deg, #006e61, #00a893 55%, #00c2a8); }
.cat-sector-update .report-cover { background: linear-gradient(135deg, #122a52, #2c4f8c); }
.cat-company-note .report-cover { background: linear-gradient(135deg, #17335e, #00867a); }
.cat-other .report-cover { background: linear-gradient(135deg, #4d5872, #2a3350); }
.report-cover::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 18px);
}
.report-cat-badge {
  align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(255,255,255,0.16); backdrop-filter: blur(6px);
}
.report-cover-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 20px; background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
}
.report-cover-icon svg { width: 30px; height: 30px; }
.report-cover-bars { position: absolute; right: 18px; bottom: 0; display: flex; align-items: flex-end; gap: 6px; height: 64px; opacity: 0.22; }
.report-cover-bars b { width: 9px; background: var(--white); border-radius: 3px 3px 0 0; }
.report-cover-bars b:nth-child(1) { height: 40%; } .report-cover-bars b:nth-child(2) { height: 65%; } .report-cover-bars b:nth-child(3) { height: 50%; }
.report-cover-bars b:nth-child(4) { height: 85%; } .report-cover-bars b:nth-child(5) { height: 60%; } .report-cover-bars b:nth-child(6) { height: 100%; }
.report-pdf-tag { align-self: flex-start; font-size: 12px; font-weight: 700; opacity: 0.9; }

/* cards */
.research-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.report-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  animation: riseIn 0.5s ease both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.report-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.report-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.report-date { font-size: 13px; font-weight: 700; color: var(--teal-dark); margin-bottom: 8px; }
.report-title { font-size: 19px; line-height: 1.25; margin-bottom: 10px; }
.report-summary { font-size: 14.5px; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }

.report-featured {
  display: grid; grid-template-columns: 0.85fr 1.15fr; overflow: hidden; margin-bottom: 32px;
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  animation: riseIn 0.5s ease both;
}
.report-featured .report-cover { min-height: 320px; padding: 24px; }
.report-featured .report-cover-icon { width: 84px; height: 84px; border-radius: 26px; }
.report-featured .report-cover-icon svg { width: 40px; height: 40px; }
.report-featured-body { padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.report-featured-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.report-featured-meta .report-date { margin: 0; }
.latest-pill { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--teal); color: var(--navy-dark); }
.report-featured .report-title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.report-featured .report-summary { font-size: 16px; -webkit-line-clamp: 4; }

.research-empty { text-align: center; padding: 70px 20px; background: var(--white); border: 1.5px dashed var(--gray-300); border-radius: var(--radius-lg); }
.research-empty-icon { width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 24px; background: var(--teal-soft); color: var(--teal-dark); display: flex; align-items: center; justify-content: center; }
.research-empty-icon svg { width: 34px; height: 34px; }
.research-empty h3 { margin-bottom: 8px; }

/* pdf viewer */
.viewer-overlay { position: fixed; inset: 0; z-index: 1300; background: rgba(6, 15, 34, 0.86); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.viewer { width: min(1100px, 100%); height: 100%; background: var(--white); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-soft); }
.viewer-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--gray-100); }
.viewer-title { flex: 1; font-weight: 800; font-size: 16px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-download { padding: 10px 20px; font-size: 13.5px; }
.viewer-close { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--gray-200); background: var(--white); color: var(--gray-600); font-size: 22px; line-height: 1; transition: all 0.2s ease; }
.viewer-close:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.viewer iframe { flex: 1; width: 100%; border: 0; background: var(--gray-100); }
.viewer-fallback { padding: 10px 18px; font-size: 13px; text-align: center; border-top: 1px solid var(--gray-100); }
.viewer-fallback a { color: var(--teal-dark); font-weight: 700; text-decoration: underline; }

@media (max-width: 1024px) {
  .research-banner, .research-hero-grid, .report-featured { grid-template-columns: 1fr; }
  .research-banner-art, .research-hero-art { display: none; }
}
@media (max-width: 720px) {
  .research-banner { padding: 40px 24px; }
  .report-featured-body { padding: 28px 24px; }
  .research-stats { gap: 32px; }
  .viewer-overlay { padding: 0; }
  .viewer { border-radius: 0; }
  .viewer-title { font-size: 14px; }
}

html[dir="rtl"] .research-banner::after { right: auto; left: -60px; }
html[dir="rtl"] .report-cover-bars { right: auto; left: 18px; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background: var(--off-white); min-height: 100vh; }
.admin-bar { background: var(--navy); color: var(--white); padding: 14px 0; }
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-bar .brand img { height: 34px; filter: brightness(0) invert(1); }
.admin-bar-title { font-weight: 800; letter-spacing: 0.02em; }
.admin-bar-actions { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 700; }
.admin-bar-actions a, .admin-bar-actions button { color: var(--text-on-navy); background: none; border: none; font: inherit; }
.admin-bar-actions a:hover, .admin-bar-actions button:hover { color: var(--teal-light); }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 48px var(--pad) 90px; }
.admin-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 36px; margin-bottom: 32px; }
.admin-card h1 { font-size: 30px; margin-bottom: 8px; }
.admin-card h2 { font-size: 22px; margin-bottom: 6px; }
.admin-card > p { margin-bottom: 26px; font-size: 14.5px; }
.admin-login { max-width: 440px; margin: 9vh auto 0; text-align: center; }
.admin-login .field { text-align: left; }
.admin-login .brand { justify-content: center; margin-bottom: 26px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-grid .span-2 { grid-column: 1 / -1; }
.field .hint { font-size: 12.5px; color: var(--gray-500); margin-top: 6px; display: block; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 34px 20px; border: 2px dashed var(--gray-300); border-radius: var(--radius-md); background: var(--off-white); color: var(--gray-600); transition: all 0.2s ease; }
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.dropzone.has-file { border-style: solid; border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone svg { width: 34px; height: 34px; }
.dropzone strong { font-size: 15px; }
.progress { height: 8px; border-radius: 8px; background: var(--gray-100); overflow: hidden; margin-top: 18px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--teal-dark)); transition: width 0.15s ease; }
.admin-msg { margin-top: 18px; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px; }
.admin-msg.ok { background: var(--teal-soft); color: var(--teal-dark); }
.admin-msg.err { background: #fdecec; color: #b42318; }
.admin-list { display: flex; flex-direction: column; }
.admin-row { display: flex; align-items: center; gap: 18px; padding: 18px 0; border-top: 1px solid var(--gray-100); }
.admin-row:first-child { border-top: none; }
.admin-row-main { flex: 1; min-width: 0; }
.admin-row-title { font-weight: 800; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-meta { font-size: 13px; color: var(--gray-500); margin-top: 3px; }
.admin-row-actions { display: flex; gap: 8px; }
.tag-cat { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--teal-soft); color: var(--teal-dark); margin-right: 8px; }
.btn-danger { border: 1.5px solid #f3b8b3; color: #b42318; background: var(--white); }
.btn-danger:hover { background: #b42318; border-color: #b42318; color: var(--white); }
@media (max-width: 720px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-card { padding: 26px 20px; }
  .admin-row { flex-wrap: wrap; }
  .admin-row-title { white-space: normal; }
}
