/* =========================================================
   EduLabs – Bố cục chung: sidebar + topbar + vùng làm việc
   ========================================================= */
.app { display: flex; min-height: calc(100vh * var(--vz, 1));
  background: linear-gradient(90deg, var(--sidebar-bot) var(--sidebar-w), var(--bg-app) 0); }

/* ---------------- Sidebar ---------------- */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--grad-sidebar);
  padding: 14px 12px 24px;
  position: sticky; top: 0; height: calc(100vh * var(--vz, 1)); overflow-y: auto;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 18px 0; height: 52px; margin-bottom: 18px; }
.logo svg { width: 50px; height: 40px; }
.logo span { font-size: 26.5px; font-weight: 700; color: var(--text-strong); letter-spacing: -.6px; }

.nav-item {
  display: flex; align-items: center; gap: 18px;
  height: 45px; padding: 0 18px; border-radius: var(--radius-md);
  font-size: 15.5px; color: var(--text); font-weight: 400;
  white-space: nowrap; letter-spacing: -.45px;
  transition: background .15s;
}
.nav-item .icon { width: 27px; height: 27px; color: var(--brand-600); stroke-width: 1.6; }
.nav-item:hover { background: rgba(255,255,255,.55); }
.nav-item.active {
  background: var(--grad-brand); color: var(--text-on-brand); font-weight: 500;
  height: 48px; box-shadow: var(--shadow-brand); margin-bottom: 18px;
}
.nav-item.active .icon { color: #fff; stroke: #fff; fill: none; }
.nav-item.active .icon.solid { fill: #fff; stroke: none; }
.nav-item .icon-star { color: var(--warning-500); }

.nav-group-title {
  font-size: 13px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--brand-900); padding: 12px 10px 6px;
}
.nav-divider { height: 1px; background: var(--divider); margin: 14px 8px 10px; }

/* ---------------- Main ---------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); background: var(--bg-surface);
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 36px;
  padding: 0 24px 0 28px; position: sticky; top: 0; z-index: 5;
}
.page-title { font-size: 22.5px; font-weight: 700; color: var(--text-strong); margin: 0; letter-spacing: -.6px; }
.pill {
  display: flex; align-items: center; gap: 10px; height: 40px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 14px; background: var(--bg-surface);
  font-size: 15.5px; color: var(--text-strong); font-weight: 500;
}
.pill .icon { color: var(--brand-600); }
.class-select { min-width: 190px; justify-content: space-between; }
.class-select .chev { color: var(--text-strong); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.bell { position: relative; color: var(--text-muted); background: none; border: 0; padding: 6px 14px 6px 22px; }
.bell .icon { width: 28px; height: 28px; stroke-width: 1.6; }
.bell::after { content: ""; position: absolute; top: 6px; right: 14px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--brand-600); border: 2px solid #fff; }
.vsep { width: 1px; height: 30px; background: var(--border); }
.user { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 500; color: var(--text-strong); }
.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--brand-50); }

.content { padding: 18px 14px 16px 24px; display: flex; flex-direction: column; gap: 18px; }

/* ---------------- Lời chào + thống kê ---------------- */
.hero { display: flex; align-items: center; gap: 28px; padding: 2px 0; }
.greet { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0;
  padding-right: 34px; border-right: 2px solid var(--border); }
.sun-box { width: 66px; height: 66px; border-radius: var(--radius-md); background: var(--warning-50);
  display: grid; place-items: center; color: var(--warning-500); flex-shrink: 0; }
.sun-box .icon { width: 42px; height: 42px; stroke-width: 1.7; }
.greet h2 { margin: 0; font-size: 23.5px; font-weight: 800; color: var(--text-strong); letter-spacing: -.6px; line-height: 1.06; }
.greet p { margin: 4px 0 0; font-size: 15.5px; color: var(--text); }

.stats { display: flex; gap: 28px; }
.stat {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); height: 72px; padding: 0 16px 0 12px; min-width: 150px;
}
.stat-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.stat-ic .icon { width: 28px; height: 28px; stroke-width: 2; }
.stat b { display: block; font-size: 23px; font-weight: 700; color: var(--text-strong); line-height: 1; }
.stat small { font-size: 13.5px; color: var(--text); }
.stat.blue  .stat-ic { background: var(--brand-50);   color: var(--brand-600); }
.stat.green .stat-ic { background: var(--success-50); color: var(--success-500); }
.stat.green .stat-ic .icon { stroke-width: 3; }
.stat.red   .stat-ic { background: var(--danger-50);  color: var(--danger-500); }
.stat.red   .stat-ic .icon { stroke-width: 2.6; }
.stat.care  .stat-ic { background: var(--success-50); color: var(--success-700); }

/* ---------------- Bắt đầu dạy học ---------------- */
.quick { background: var(--bg-soft); border-radius: var(--radius-lg); padding: 10px 18px 16px; }
.quick-title { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 700;
  color: var(--text-strong); margin: 0 0 12px; letter-spacing: -.4px; }
.play-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-600);
  display: grid; place-items: center; }
.play-dot svg { width: 14px; height: 14px; fill: #fff; margin-left: 3px; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 13px; }
.tile {
  background: var(--bg-surface); border-radius: var(--radius-lg); height: 132px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; padding-bottom: 12px; gap: 4px;
  font-size: 18.5px; font-weight: 700; color: var(--text-strong); letter-spacing: -.3px;
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tile svg { width: 100px; height: 82px; }

/* ---------------- Lưới thẻ ---------------- */
.grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 20px; }
.grid.wide-right { grid-template-columns: 1.02fr 1fr; }

.lesson-row { display: grid; grid-template-columns: 78px 34px 112px 1fr auto; align-items: center;
  height: 32px; font-size: 15.5px; }
.lesson-row .dot { justify-self: center; }
.lesson-row .subj { padding-right: 16px; border-right: 1.5px solid var(--divider); height: 22px; display: flex; align-items: center; }
.lesson-row .topic { padding-left: 32px; }
.lesson-row .btn { width: 114px; height: 30px; font-size: 13px; }
.lesson-row .btn svg { width: 12px; height: 12px; fill: #fff; }

.todo { display: flex; align-items: center; gap: 20px; height: 32px; font-size: 15.5px; color: var(--text);
  border-bottom: 1px solid var(--border-soft); padding-left: 12px; cursor: pointer; }
.todo:last-child { border-bottom: 0; }
.todo input { appearance: none; width: 21px; height: 21px; border: 1.5px solid #a7afc6;
  border-radius: 4px; margin: 0; display: grid; place-items: center; cursor: pointer; }
.todo input:checked { background: var(--brand-600); border-color: var(--brand-600); }
.todo input:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }
.todo input:checked + span { color: var(--text-muted); text-decoration: line-through; }

.res { display: flex; align-items: center; gap: 12px; height: 30px; font-size: 14.5px;
  border-bottom: 1px solid var(--border-soft); padding-left: 8px; }
.res:last-child { border-bottom: 0; }
.res-ic { width: 32px; height: 30px; border-radius: 7px; display: grid; place-items: center; }
.res-ic svg { width: 22px; height: 22px; }
.res .btn-outline { margin-left: auto; width: 72px; font-size: 12px; gap: 6px; }

.hw { display: grid; grid-template-columns: 26px max-content minmax(120px,1fr) 56px; align-items: center; gap: 12px;
  height: 41px; font-size: 14.5px; font-weight: 600; letter-spacing: -.45px; color: var(--text-strong); }
.hw .icon { color: var(--brand-600); width: 22px; height: 22px; }
.hw .count { text-align: right; font-weight: 500; font-size: 15.5px; }
.track { height: 12px; border-radius: var(--radius-pill); background: var(--bg-track); overflow: hidden; }
.track > i { display: block; height: 100%; border-radius: inherit; background: var(--grad-bar); }

.legend { letter-spacing: -.4px; display: flex; justify-content: flex-end; gap: 22px; font-size: 12px; color: var(--text); padding: 2px 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 15px; height: 14px; border-radius: 3px; display: inline-block; }
.result-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; height: 31px; font-size: 15.5px; }
.stack { display: flex; height: 26px; border-radius: 5px; overflow: hidden; font-size: 13px; font-weight: 500; }
.stack > div { display: grid; place-items: center; }
.seg-good { background: var(--grad-bar); color: #fff; }
.seg-ok   { background: var(--brand-200); color: var(--text-strong); }
.seg-try  { background: var(--warning-100); color: var(--text-strong); }

.care-row { display: grid; grid-template-columns: 50px max-content 1fr; align-items: center; gap: 12px;
  height: 46px; font-size: 12.5px; letter-spacing: -.55px; border-bottom: 1px solid var(--border-soft); }
.care-row:last-child { border-bottom: 0; }
.care-av { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  font-size: 17px; font-weight: 700; }
.care-row b { white-space: nowrap; padding-right: 6px; font-size: 15.5px; color: var(--text-strong); }
.care-note { display: flex; align-items: center; gap: 10px; border-left: 1.5px solid var(--divider);
  padding-left: 14px; color: var(--text); letter-spacing: -.2px; }
.care-note .icon { width: 20px; height: 20px; }

/* ---------------- Responsive ---------------- */
