:root {
  --bg: #f4f6fb; --card: #fff; --line: #e3e8f0; --text: #172033; --muted: #64748b; --soft: #f8fafc;
  --primary: #2563eb; --lab: #7c3aed; --ok: #16a34a; --warn: #d97706; --err: #dc2626;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
.grow { flex: 1; }

.top { position: sticky; top: 0; z-index: 10; height: 62px; display: flex; align-items: center; gap: 22px; padding: 0 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { color: var(--text); font-size: 17px; white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--soft); color: var(--text); }
.nav a.active { color: var(--text); background: #eef2ff; }
.pill { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); color: var(--text); background: #fff; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.pill.ok .dot { background: var(--ok); } .pill.no .dot { background: var(--warn); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn.ghost { color: var(--muted); }
.btn.ghost:hover { background: var(--soft); }
.btn.light { background: #fff; color: #0f172a; }
.btn.light:hover { background: #f1f5f9; }
.btn.outline { border-color: rgba(255,255,255,.45); color: #fff; }
.btn.outline:hover { background: rgba(255,255,255,.12); }

main { max-width: 1320px; margin: 0 auto; padding: 30px 28px 50px; }
.hello h1 { font-size: 30px; margin: 0 0 4px; letter-spacing: -.02em; }
.hello p { color: var(--muted); margin: 0 0 24px; font-size: 15px; }

.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.module { position: relative; overflow: hidden; display: flex; gap: 18px; padding: 26px 26px 24px; border-radius: 20px; color: #fff; box-shadow: var(--shadow); min-height: 220px; }
.module::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.m-author { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%); }
.m-lab { background: linear-gradient(135deg, #2e1065 0%, #6d28d9 55%, #a855f7 100%); }
.m-icon { flex: none; width: 54px; height: 54px; border-radius: 14px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.m-body { position: relative; z-index: 1; display: flex; flex-direction: column; }
.m-body h2 { margin: 2px 0 6px; font-size: 22px; }
.m-body p { margin: 0 0 18px; color: rgba(255,255,255,.82); max-width: 520px; }
.m-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat span { display: block; color: var(--muted); font-size: 12.5px; }
.stat b { font-size: 24px; letter-spacing: -.02em; }
.stat small { color: var(--muted); margin-left: 4px; }

.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head a { font-size: 13px; font-weight: 500; }
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.course { display: block; color: var(--text); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .12s, box-shadow .12s; background: #fff; }
.course:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.1); }
.thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.thumb-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.course .info { padding: 8px 10px 10px; }
.course .t { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course .m { color: var(--muted); font-size: 12px; }
.pkgrow { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid #f1f5f9; color: var(--text); }
.pkgrow:last-child { border-bottom: 0; }
.pkgrow:hover { background: var(--soft); border-radius: 8px; }
.pkgrow .n { flex: 1; min-width: 0; }
.pkgrow .n b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkgrow .n span { color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.b-scorm { background: #ede9fe; color: #6d28d9; } .b-xapi { background: #e0f2fe; color: #0369a1; } .b-cmi5 { background: #ccfbf1; color: #0f766e; }
.b-unknown { background: #f1f5f9; color: #475569; }
.b-ok { background: #dcfce7; color: var(--ok); } .b-warn { background: #fef3c7; color: var(--warn); } .b-err { background: #fee2e2; color: var(--err); }
.empty { color: var(--muted); padding: 24px 6px; text-align: center; }
footer { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 30px; }

@media (max-width: 960px) {
  .modules, .cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  /* the header on a tablet or phone: one line for the name and the account, the menu on a line of its own under it
     (it scrolls sideways when it is longer than the screen); nothing in it breaks into two lines */
  .top { height: auto; min-height: 56px; flex-wrap: wrap; gap: 6px 10px; padding: 8px 16px 0; }
  .top > * { flex: none; white-space: nowrap; }
  .top .grow { flex: 1 1 0; }
  .top .nav { order: 10; flex: 1 1 100%; margin: 0 -16px; padding: 4px 12px 6px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
  .top .nav::-webkit-scrollbar { display: none; }
  .top .nav a { white-space: nowrap; }
  .top #aiStatus { display: none; }   /* the same is said on the page below */
}
@media (max-width: 600px) {
  .top [data-helpdesk], .top #balance, .top #who { display: none; }   /* both are a step away in the menu: Hỗ trợ, Tài khoản */
  .top .btn { padding-left: 8px; padding-right: 8px; }
}
/* free trial: days left, or why the account is locked */
.trial-note { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; }
.trial-note.locked { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.trial-note a { font-weight: 600; }
