:root {
  --brand: #2c87da;       /* DataQ Health blue */
  --brand-dark: #1d64a8;
  --ink: #393939;         /* DataQ Health charcoal */
  --header-h: 64px;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --text: #2b2b2b;
  --muted: #6b7785;
  --border: #dde3ea;
  --active: #e3eefa;
  --danger: #b42318;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); }

/* Header */
header { height: var(--header-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: #fff; color: var(--ink); border-bottom: 3px solid var(--brand); }
header .logo { height: 40px; width: auto; display: block; }
header .divider { width: 1px; height: 30px; background: var(--border); }
header h1 { font-size: 17px; font-weight: 500; margin: 0; flex: 1; color: var(--ink); letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: none; background: none; border: 0; color: var(--ink); font-size: 22px; cursor: pointer; }

/* Layout */
.layout { display: flex; height: calc(100% - var(--header-h)); }
nav { width: 300px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.search { padding: 12px; border-bottom: 1px solid var(--border); }
.search input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; }
.menu { overflow-y: auto; flex: 1; padding: 6px 0; }
.category > button { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--brand-dark); display: flex; align-items: center; gap: 8px; }
.category > button:hover { background: var(--bg); }
.category > button .arrow { transition: transform .15s; font-size: 10px; width: 10px; }
.category.open > button .arrow { transform: rotate(90deg); }
.category ul { list-style: none; margin: 0; padding: 0; display: none; }
.category.open ul { display: block; }
.category li a { display: block; padding: 7px 14px 7px 32px; font-size: 13.5px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; }
.category li a:hover { background: var(--bg); }
.category li a.active { background: var(--active); border-left-color: var(--brand); font-weight: 600; }
.no-results { padding: 14px; color: var(--muted); font-size: 13px; display: none; }

/* Content */
main { flex: 1; overflow-y: auto; padding: 28px 36px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
main h2 { margin: 0 0 16px; font-size: 24px; color: var(--brand-dark); }
.player { position: relative; width: min(100%, calc((100vh - var(--header-h) - 150px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.description { margin-top: 18px; line-height: 1.55; font-size: 15px; }
.pager { display: flex; justify-content: space-between; margin-top: 24px; }
.pager a { padding: 8px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; text-decoration: none; color: var(--brand); font-size: 14px; }
.pager a:hover { background: var(--active); }
.pager a.hidden { visibility: hidden; }

/* Buttons */
.btn { display: inline-block; padding: 7px 14px; border: 1px solid var(--border); background: var(--panel); color: var(--brand); border-radius: 4px; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn:hover { background: var(--active); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

@media (max-width: 800px) {
  .icon-btn { display: block; }
  nav { position: fixed; top: var(--header-h); bottom: 0; left: 0; z-index: 10; transform: translateX(-100%); transition: transform .2s; }
  nav.show { transform: translateX(0); box-shadow: 2px 0 12px rgba(0,0,0,.2); }
  main { padding: 18px; }
  header { gap: 10px; padding: 0 12px; }
  header .logo { height: 32px; }
  header .divider { display: none; }
}
