/* ============================================================
   Elephant Ed — V1 Platform Prototype
   Light compliance-LMS in Elephant Ed blues.
   Type DNA from Mat: Bricolage Grotesque / DM Sans / DM Mono.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Mono:wght@400;500&display=swap");

:root {
  /* ---- Elephant Ed brand blues ---- */
  --brand:        #2160C4;   /* royal blue primary            */
  --brand-2:      #2E6CD6;   /* gradient royal end            */
  --cyan:         #15A6C9;   /* teal / gradient start         */
  --sky:          #5BB8E8;   /* logo light blue               */
  --grad:         linear-gradient(100deg, #15A6C9 0%, #2E6CD6 100%);
  --grad-soft:    linear-gradient(100deg, #E7F4F9 0%, #E8EFFB 100%);

  /* ---- ink ---- */
  --navy:         #14273F;   /* deep heading ink              */
  --ink:          #1C2E45;   /* primary text                  */
  --muted:        #5C6E80;   /* secondary text                */
  --faint:        #8493A2;   /* tertiary / metadata           */

  /* ---- surfaces ---- */
  --bg:           #EEF2F6;
  --surface:      #FFFFFF;
  --surface-2:    #F4F7FA;
  --surface-3:    #EAEFF4;
  --border:       #E2E8EF;
  --border-2:     #D4DDE6;

  /* ---- sidebar (deep navy-blue) ---- */
  --side:         #102B47;
  --side-2:       #0C2238;
  --side-ink:     #E8F0F7;
  --side-muted:   rgba(232,240,247,0.58);
  --side-faint:   rgba(232,240,247,0.34);
  --side-hover:   rgba(255,255,255,0.07);
  --side-active:  rgba(91,184,232,0.16);

  /* ---- status ---- */
  --ok:           #1E9E6A;   --ok-bg:   #E4F5EC;
  --warn:         #C9821C;   --warn-bg: #FBF1DD;
  --danger:       #D24B43;   --danger-bg:#FCE9E7;
  --info:         #2160C4;   --info-bg: #E7EFFB;
  --neutral:      #6A7989;   --neutral-bg:#EDF1F5;

  /* ---- type ---- */
  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-body:    "DM Sans", system-ui, sans-serif;
  --f-mono:    "DM Mono", ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20,39,63,0.05);
  --shadow:    0 4px 16px rgba(20,39,63,0.08);
  --shadow-lg: 0 18px 50px rgba(20,39,63,0.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { height: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(33,96,196,0.18); }

/* ---- scrollbars ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c7d2dd; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aab9c8; background-clip: content-box; }

/* ============================================================
   App frame
   ============================================================ */
.app { display: flex; flex-direction: column; height: 100%; }

/* demo / role bar */
.demobar {
  display: flex; align-items: center; gap: 18px;
  height: 56px; flex: 0 0 56px;
  padding: 0 20px;
  background: var(--side-2);
  color: var(--side-ink);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 60;
}
.demobar .wordmark { display: flex; align-items: center; gap: 9px; }
.demobar .wordmark .logo-text {
  font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em;
  color: #fff;
}
.demobar .wordmark .logo-text b { color: var(--sky); font-weight: 700; }
.demobar .demo-label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--side-faint); margin-left: 4px;
}
.demobar .spacer { flex: 1; }

/* segmented role switcher */
.roleseg { display: flex; background: rgba(255,255,255,0.07); border-radius: var(--r-pill); padding: 4px; gap: 2px; }
.roleseg button {
  border: 0; background: transparent; color: var(--side-muted);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 16px; border-radius: var(--r-pill); transition: all .18s ease; white-space: nowrap;
}
.roleseg button:hover { color: var(--side-ink); }
.roleseg button.active { background: var(--grad); color: #fff; box-shadow: 0 2px 8px rgba(33,96,196,0.4); }

/* body split */
.shell { display: flex; flex: 1; min-height: 0; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  flex: 0 0 248px; width: 248px;
  background: linear-gradient(185deg, var(--side) 0%, var(--side-2) 100%);
  color: var(--side-ink);
  display: flex; flex-direction: column;
  padding: 22px 14px 16px;
  position: relative;
}
.sidebar::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 70%; height: 45%;
  background: radial-gradient(ellipse at bottom right, rgba(33,96,196,0.30), transparent 70%);
  pointer-events: none;
}
.side-head { padding: 4px 10px 18px; position: relative; z-index: 1; }
.side-head .role-name { font-family: var(--f-display); font-weight: 700; font-size: 17px; color: #fff; letter-spacing: -0.01em; }
.side-head .role-sub { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--side-faint); margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.nav-section { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--side-faint); padding: 16px 10px 7px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--side-muted); font-size: 13.5px; font-weight: 500;
  border: 0; background: transparent; width: 100%; text-align: left;
  transition: all .15s ease; position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; stroke-width: 1.9; opacity: .85; }
.nav-item:hover { background: var(--side-hover); color: var(--side-ink); }
.nav-item.active { background: var(--side-active); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sky); }
.nav-item.active svg { opacity: 1; color: var(--sky); }
.nav-item .badge-count { margin-left: auto; font-family: var(--f-mono); font-size: 10px; background: rgba(255,255,255,0.12); padding: 1px 7px; border-radius: var(--r-pill); }
.nav-item.active .badge-count { background: var(--sky); color: var(--side-2); }

.side-foot { margin-top: auto; position: relative; z-index: 1; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.side-user .avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 13px; color: #fff; }
.side-user .u-name { font-size: 13px; font-weight: 600; color: var(--side-ink); }
.side-user .u-role { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-faint); margin-top: 1px; }

/* ============================================================
   Main column
   ============================================================ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  height: 64px; flex: 0 0 64px; padding: 0 30px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .page-title { font-family: var(--f-display); font-weight: 700; font-size: 21px; color: var(--navy); letter-spacing: -0.02em; }
.topbar .page-crumb { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.topbar .spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 8px 15px; width: 270px; color: var(--muted);
}
.search input { border: 0; background: transparent; outline: none; font-family: var(--f-body); font-size: 13.5px; color: var(--ink); width: 100%; }
.search svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .6; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--muted); position: relative; transition: all .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; background: var(--danger); border-radius: 50%; border: 1.5px solid var(--surface); }

.content { flex: 1; overflow-y: auto; padding: 30px; }
.content-inner { max-width: 1240px; margin: 0 auto; }

/* ============================================================
   Typography helpers
   ============================================================ */
.kicker { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); }
.kicker.muted { color: var(--faint); }
.h-page { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.025em; color: var(--navy); line-height: 1.05; }
.h-sec { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--navy); margin: 0; }
.h-card { font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; color: var(--navy); margin: 0; }
.lbl { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 16px; }

/* ============================================================
   Cards & grids
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.pad { padding: 20px 22px; }
.grid { display: grid; gap: 16px; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; } .gap24 { gap: 24px; }

/* stat card */
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px 20px; position: relative; overflow: hidden;
}
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat .stat-ic { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; }
.stat .stat-ic svg { width: 18px; height: 18px; }
.stat .stat-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.stat .stat-value { font-family: var(--f-display); font-weight: 800; font-size: 34px; letter-spacing: -0.03em; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .stat-value em { font-style: normal; font-size: 18px; color: var(--muted); font-weight: 600; }
.stat .stat-sub { font-size: 12px; color: var(--muted); margin-top: 7px; display: flex; align-items: center; gap: 6px; }
.trend { font-family: var(--f-mono); font-size: 11px; display: inline-flex; align-items: center; gap: 3px; }
.trend.up { color: var(--ok); } .trend.down { color: var(--danger); }

/* ============================================================
   Badges / pills / chips
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--r-pill); font-weight: 500; white-space: nowrap;
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.ok .bdot { background: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.warn .bdot { background: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); } .badge.danger .bdot { background: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); } .badge.info .bdot { background: var(--info); }
.badge.neutral { background: var(--neutral-bg); color: var(--neutral); } .badge.neutral .bdot { background: var(--neutral); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); padding: 6px 12px; border-radius: var(--r-pill); transition: all .15s;
}
.chip.clickable { cursor: pointer; }
.chip.clickable:hover { border-color: var(--border-2); color: var(--ink); }
.chip.active { background: var(--info-bg); border-color: rgba(33,96,196,0.3); color: var(--brand); font-weight: 600; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-body); font-size: 13.5px; font-weight: 600;
  padding: 9px 17px; border-radius: var(--r-sm); border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 2px 10px rgba(33,96,196,0.28); }
.btn.primary:hover { box-shadow: 0 4px 16px rgba(33,96,196,0.4); transform: translateY(-1px); }
.btn.success { background: var(--ok); color: #fff; box-shadow: 0 2px 10px rgba(30,158,106,0.24); }
.btn.success:hover { box-shadow: 0 4px 16px rgba(30,158,106,0.34); transform: translateY(-1px); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--border-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--faint); }
.btn.subtle { background: var(--surface-2); color: var(--brand); }
.btn.subtle:hover { background: var(--info-bg); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.lg { padding: 12px 24px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl thead th {
  text-align: left; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); font-weight: 500; padding: 14px 22px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.tbl thead th:first-child, table.tbl tbody td:first-child { padding-left: 22px; }
table.tbl thead th:last-child, table.tbl tbody td:last-child { padding-right: 22px; }
table.tbl tbody td { padding: 17px 22px; border-bottom: 1px solid var(--border); color: var(--ink); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tbody tr.row-active { background: var(--info-bg); }
table.tbl tbody tr.row-active:hover { background: var(--info-bg); }
.td-strong { font-weight: 600; color: var(--navy); }
.td-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; font-family: var(--f-mono); }

/* avatar in cells */
.avatar { display: grid; place-items: center; border-radius: 50%; font-family: var(--f-display); font-weight: 700; color: #fff; flex: none; }
.av-sm { width: 30px; height: 30px; font-size: 12px; }
.av-md { width: 40px; height: 40px; font-size: 15px; }
.av-lg { width: 56px; height: 56px; font-size: 20px; }

/* progress */
.pbar { height: 7px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; width: 100%; }
.pbar > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--grad); }
.pbar.thin { height: 5px; }
.pmini { display: flex; align-items: center; gap: 9px; }
.pmini .num { font-size: 12px; color: var(--muted); min-width: 34px; }

/* segmented tabs */
.tabs { display: flex; gap: 3px; background: var(--surface-2); padding: 4px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.tabs button { border: 0; background: transparent; padding: 7px 15px; border-radius: 6px; font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

/* underline tabs (detail pages) */
.utabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); }
.utabs button { border: 0; background: transparent; padding: 12px 2px; font-family: var(--f-body); font-size: 14px; font-weight: 600; color: var(--muted); position: relative; }
.utabs button.active { color: var(--brand); }
.utabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); border-radius: 2px; }

/* ============================================================
   Modal
   ============================================================ */
.overlay { position: fixed; inset: 0; background: rgba(16,43,71,0.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 30px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; animation: pop .22s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.modal.wide { max-width: 820px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ============================================================
   Side drawer
   ============================================================ */
.drawer-scrim { position: fixed; inset: 0; background: rgba(16,43,71,0.42); backdrop-filter: blur(3px); z-index: 110; animation: fade .2s ease; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw; background: var(--surface); box-shadow: -18px 0 48px -16px rgba(16,43,71,0.32); z-index: 111; display: flex; flex-direction: column; animation: slideIn .28s cubic-bezier(.2,.8,.2,1); }
.drawer.wide { width: 660px; }
@keyframes slideIn { from { transform: translateX(100%); } }
.drawer-head { padding: 22px 24px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 22px 24px 32px; overflow-y: auto; flex: 1; }
.drawer-statrow { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.drawer-stat { padding: 14px 16px; }
.drawer-stat + .drawer-stat { border-left: 1px solid var(--border); }
.drawer-stat .dv { font-family: var(--f-display); font-weight: 700; font-size: 22px; color: var(--navy); line-height: 1.1; }
.drawer-stat .dl { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.drawer-course { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }

/* popover */
.pop-anchor { position: relative; display: inline-flex; }
.pop-scrim { position: fixed; inset: 0; z-index: 119; }
.pop { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 120; animation: popDrop .16s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
@keyframes popDrop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.pop-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pop-body { padding: 12px 14px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.pop-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* form */
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--f-body); font-size: 14px; color: var(--ink);
  border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 10px 13px; background: var(--surface); outline: none; transition: border .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(33,96,196,0.12); }

/* dropzone */
.dropzone { border: 1.5px dashed var(--border-2); border-radius: var(--r-md); padding: 34px; text-align: center; background: var(--surface-2); transition: all .15s; }
.dropzone.hot { border-color: var(--brand); background: var(--info-bg); }
.dropzone svg { width: 34px; height: 34px; color: var(--brand); }

/* divider */
.hr { height: 1px; background: var(--border); border: 0; margin: 0; }

/* empty / misc */
.pill-soft { display: inline-flex; align-items:center; gap:6px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing:0.06em; text-transform: uppercase; padding: 4px 11px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }

/* course swatch */
.swatch { border-radius: var(--r-sm); flex: none; display: grid; place-items: center; color: #fff; font-family: var(--f-display); font-weight: 700; }

.fade-in { animation: fade .25s ease; }

/* donut */
.donut-wrap { position: relative; display: grid; place-items: center; }
.donut-center { position: absolute; text-align: center; }
.donut-center .dc-val { font-family: var(--f-display); font-weight: 800; font-size: 30px; color: var(--navy); letter-spacing: -0.02em; line-height: 1; }
.donut-center .dc-lbl { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }

/* legend */
.legend { display: flex; flex-direction: column; gap: 9px; }
.legend .lg-item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend .lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .lg-val { margin-left: auto; font-family: var(--f-mono); font-weight: 500; color: var(--navy); }

/* course hero (employee) */
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: all .18s; display: flex; flex-direction: column; }
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-2); }
.course-banner { height: 96px; position: relative; display: flex; align-items: flex-end; padding: 13px 15px; }
.course-banner .cat { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.92); }
.course-banner::after { content:""; position:absolute; inset:0; background: linear-gradient(160deg, rgba(255,255,255,0.16), transparent 60%); }

/* player */
.player-stage { background: #0C2238; border-radius: var(--r-md); aspect-ratio: 16/9; position: relative; overflow: hidden; display: grid; place-items: center; }

/* ============================================================
   Employees — assign-course popover + graceful select mode
   ============================================================ */
/* course option in popover */
.course-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer; transition: all .14s; font-family: inherit;
}
.course-opt:hover { border-color: var(--border-2); background: var(--surface-2); }
.course-opt.active { border-color: rgba(33,96,196,0.4); background: var(--info-bg); }
.course-opt-check { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; }

/* assign popover */
.pop.assign-pop { width: 380px; }
.pop.assign-pop .pop-body { gap: 9px; }
.assign-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: rgba(255,255,255,0.25); font-size: 12px; font-weight: 700; }

/* assign info bar */
.assign-infobar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 14px;
  background: var(--info-bg); border: 1px solid rgba(33,96,196,0.2); border-radius: var(--r-sm);
  color: var(--brand); font-size: 13px; font-weight: 500;
}
.assign-infobar > svg { flex: none; }
.assign-infobar .ai-course { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); }
.assign-infobar .ai-course b { font-weight: 700; }
.assign-infobar .ai-due-wrap { position: relative; display: inline-flex; }
.assign-infobar .ai-due { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--brand); background: var(--surface); border: 1px solid rgba(33,96,196,0.22); padding: 3px 9px; border-radius: var(--r-pill); cursor: pointer; }
.assign-infobar .ai-due:hover { border-color: rgba(33,96,196,0.38); background: #fff; }
.assign-infobar .ai-due-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.assign-infobar .ai-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; }
.assign-infobar .ai-cancel { border: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.assign-infobar .ai-cancel:hover { color: var(--danger); }

/* graceful select-mode checkbox column */
.tbl .sel-cell {
  width: 0; box-sizing: border-box; padding-left: 0 !important; padding-right: 0 !important;
  overflow: hidden; white-space: nowrap;
  transition: width .26s cubic-bezier(.2,.8,.2,1), padding .26s cubic-bezier(.2,.8,.2,1);
}
.tbl.select-mode .sel-cell { width: 52px; padding-left: 22px !important; }
.sel-box {
  display: inline-flex; align-items: center;
  opacity: 0; transform: scale(.55);
  transition: opacity .2s ease .05s, transform .22s cubic-bezier(.2,.8,.2,1) .05s;
}
.tbl.select-mode .sel-box { opacity: 1; transform: scale(1); }
.sel-box input { width: 17px; height: 17px; accent-color: #2160C4; cursor: pointer; }
.sel-box input:disabled { cursor: not-allowed; opacity: .4; }
