/* Ôn thi (exam.js) — tên lớp bắt đầu bằng xm- để không trùng app.css / session.css */
.t-exam { --c: #FF6B35; --cd: #D94E1F; }
.xm-card .clip, .xm-li .clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xm-card { border: 3px solid #FFE0CC; cursor: pointer; }
.xm-card.urgent { border-color: #FF8A5B; background: #FFF4EE; }
.xm-count { flex: none; width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(135deg, #FF9F1C, #FF6B35); color: #fff; display: grid; place-items: center; align-content: center; line-height: 1; box-shadow: 0 4px 0 #D94E1F; }
.xm-count b { font-family: 'Baloo 2'; font-size: 26px; }
.xm-count small { font-size: 11px; font-weight: 800; opacity: .95; }
.xm-count.sm { width: 50px; height: 50px; border-radius: 15px; }
.xm-count.sm b { font-size: 22px; }
.xm-li.old { opacity: .65; }
.xm-li.old .xm-count { background: var(--muted); box-shadow: 0 4px 0 #7F819B; }

.xm-lbl { font-weight: 800; margin: 0 2px 6px; }
.xm-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.xm-tp { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.xm-tp.on { border-color: var(--orange); background: #FFF1DA; color: var(--orange-d); }
span.xm-tp { cursor: default; }
.xm-struct { display: grid; gap: 6px; }

.xm-hero { display: flex; gap: 16px; align-items: center; margin-top: 8px; padding: 18px; border-radius: 26px; color: #fff; background: linear-gradient(135deg, #FF9F1C, #FF6B35); box-shadow: 0 6px 0 #D94E1F; }
.xm-hero.urgent { background: linear-gradient(135deg, #EF476F, #FF6B35); box-shadow: 0 6px 0 #C9284F; }
.xm-hero b { font-family: 'Baloo 2'; font-size: 24px; }
.xm-big { flex: none; width: 84px; height: 84px; border-radius: 24px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-family: 'Baloo 2'; font-size: 46px; font-weight: 800; }
.xm-today { border: 3px solid #CFE3FF; }
.xm-today.done { border-color: #BFEBD2; background: #F4FCF7; }

.xm-plan { padding: 8px 12px; }
.xm-day { display: flex; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px dashed var(--line); font-size: 15px; }
.xm-day:last-child { border-bottom: 0; }
.xm-day .d { flex: none; width: 74px; font-weight: 800; color: var(--ink-2); font-size: 13px; }
.xm-day.past { opacity: .6; }
.xm-day.today { background: #FFF1DA; border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.xm-day[data-mk] { cursor: pointer; }
.xm-ok { font-weight: 900; color: var(--green-d); white-space: nowrap; }
.xm-now { font-weight: 900; color: var(--orange-d); white-space: nowrap; font-size: 13px; }

.xm-bar .rtr { height: 10px; background: #F1ECE0; border-radius: 999px; overflow: hidden; margin: 4px 0 2px; }
.xm-bar .rtr i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.xm-bar.mid .rtr i { background: var(--yellow); }
.xm-bar.low .rtr i { background: var(--red); }
.xm-bar { font-size: 15px; }

.xm-chart { width: 100%; height: auto; display: block; }
.xm-chart .gl { stroke: #EFE6D3; stroke-width: 1; }
.xm-chart .tl, .xm-chart .tx { font-size: 9px; fill: var(--muted); font-weight: 700; }
.xm-chart .tx { text-anchor: middle; }
.xm-chart .tv { font-size: 10px; fill: var(--ink); font-weight: 800; text-anchor: middle; }
.xm-chart .ln { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.xm-chart .pt { fill: var(--orange); stroke: #fff; stroke-width: 2; }
.xm-chart .pt.topic, .xm-chart .pt.weak { fill: var(--purple); }
.xm-chart .pt.mini { fill: var(--teal); }

/* làm bài */
.xm-timer { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; margin: 4px -4px 0; padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); font-family: 'Baloo 2'; font-weight: 800; font-size: 20px; }
.xm-timer.low { background: #FFF1DA; color: var(--orange-d); }
.xm-timer.over { background: #FDE5EB; color: var(--red-d); }
.xm-sec-h { display: flex; align-items: center; gap: 10px; margin: 22px 2px 0; font-family: 'Baloo 2'; font-size: 19px; }
.xm-pts { flex: none; background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 800; }
.xm-ip { flex: none; font-size: 12px; font-weight: 800; color: var(--muted); padding-top: 6px; }
.xm-listen { border: 3px solid #CFE3FF; }
.xm-pass { white-space: normal; line-height: 1.6; }
.xm-item u { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* tờ tóm tắt */
.xm-sheet h2 { font-size: 24px; }
.xm-blocks { display: grid; gap: 10px; }
.xm-block { background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.xm-block.weak { border-left: 6px solid var(--red); }
.xm-block.trap { background: #FFF4EE; }
.xm-block ul { margin: 6px 0 0; padding-left: 20px; }
.xm-block li { margin: 2px 0; }
.xm-f { margin-top: 6px; background: #F4F0FF; border-radius: 10px; padding: 6px 10px; font-weight: 700; }
@media (min-width: 640px) { .xm-blocks { grid-template-columns: 1fr 1fr; } }
@media print {
  .xm-sheet { font-size: 12px; }
  .xm-block { box-shadow: none; border: 1px solid #999; break-inside: avoid; padding: 6px 8px; }
  .xm-blocks { grid-template-columns: 1fr 1fr; gap: 6px; }
  .xm-timer { display: none; }
}
