:root {
  --blue: #2757d9;
  --blue-dark: #173ca7;
  --blue-soft: #eaf0ff;
  --cyan: #16a8d8;
  --green: #14b884;
  --green-soft: #e8fbf4;
  --orange: #ff7a17;
  --orange-soft: #fff1e6;
  --red: #f0444b;
  --red-soft: #fff0f1;
  --purple: #7d3de2;
  --purple-soft: #f3edff;
  --ink: #172033;
  --muted: #718096;
  --line: #dfe5ef;
  --surface: #ffffff;
  --bg: #f5f7fb;
  --shadow: 0 16px 40px rgba(34, 53, 92, 0.10);
  --shadow-sm: 0 6px 20px rgba(34, 53, 92, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* =========================
   ĐĂNG NHẬP
========================= */

.login-view {
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(
      135deg,
      #1f4bc7 0%,
      #285ee5 48%,
      #173ca7 100%
    );
}

.login-shell {
  min-height: calc(100vh - 56px);
  max-width: 1420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: hidden;
  background: white;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(4, 21, 69, 0.28);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 54px 64px;
  color: white;
  background:
    radial-gradient(
      circle at 70% 12%,
      rgba(255, 255, 255, 0.15),
      transparent 22%
    ),
    linear-gradient(145deg, #234dcc, #17399b);
}

.login-intro::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 44px rgba(255, 255, 255, 0.04),
    0 0 0 92px rgba(255, 255, 255, 0.03);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}

.brand-light {
  color: white;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #5ea2ff, #ffffff);
  color: var(--blue-dark);
  font-size: 22px;
  font-weight: 900;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0.03em;
}

.brand small {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.72;
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 630px;
  margin-top: auto;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.login-intro .eyebrow {
  color: #bbd5ff;
}

.intro-copy h1 {
  margin: 18px 0 24px;
  font-size: clamp(42px, 4.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.intro-copy p {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.62;
}

.benefit-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 40px;
}

.benefit-list article {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.benefit-list article > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 50%;
  background: white;
  color: var(--blue-dark);
  font-weight: 800;
}

.benefit-list strong,
.benefit-list small {
  display: block;
}

.benefit-list small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 48px;
  background: linear-gradient(#fff, #fbfcff);
}

.login-card {
  width: min(460px, 100%);
}

.login-heading h2 {
  margin: 10px 0 8px;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.login-heading p {
  margin: 0 0 28px;
  color: var(--muted);
}

.login-card label {
  display: block;
  margin: 0 0 7px;
  color: #39455c;
  font-size: 14px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  margin: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: white;
  transition: 0.2s;
}

.login-card input:focus,
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(39, 87, 217, 0.10);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 54px;
}

.password-wrap .icon-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

.primary-btn,
.secondary-btn {
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}

.primary-btn {
  color: white;
  background:
    linear-gradient(135deg, var(--blue), #396eef);
  box-shadow: 0 10px 24px rgba(39, 87, 217, 0.24);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(39, 87, 217, 0.30);
}

.secondary-btn {
  color: var(--blue);
  background: var(--blue-soft);
}

.secondary-btn:hover {
  opacity: 0.85;
}

.full {
  width: 100%;
}

.login-links {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.security-note {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f9fd;
  color: var(--muted);
}

.security-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.security-note strong {
  color: var(--ink);
}

.mobile-brand {
  display: none;
}

/* =========================
   BỐ CỤC ỨNG DỤNG
========================= */

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 272px;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  overflow-y: auto;
  color: white;
  background:
    linear-gradient(180deg, #173ca7 0%, #102d80 100%);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 22px;
}

.close-side {
  display: none;
  color: white !important;
}

.student-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #7aafff, #eaf2ff);
  color: var(--blue-dark);
  font-weight: 900;
}

.avatar.small {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.student-card small,
.student-card strong,
.student-card span {
  display: block;
}

.student-card small {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

.student-card strong {
  margin: 3px 0;
  font-size: 14px;
}

.student-card span {
  font-size: 11px;
  opacity: 0.7;
}

.student-card .icon-btn {
  color: white;
}

.student-menu {
  margin-top: 8px;
  padding: 6px;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.student-menu button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.student-menu button:hover {
  background: var(--blue-soft);
}

.mini-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
}

.mini-avatar.alt {
  background: #fff0df;
  color: #8a4a00;
}

.student-menu strong,
.student-menu small {
  display: block;
}

.student-menu strong {
  font-size: 13px;
}

.student-menu small {
  margin-top: 3px;
  color: var(--muted);
}

.main-nav {
  display: grid;
  gap: 6px;
  margin-top: 22px;
}

.nav-item {
  width: 100%;
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.70);
  font-weight: 700;
  text-align: left;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}

.nav-item span {
  width: 24px;
  font-size: 18px;
  text-align: center;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: var(--blue-dark);
  background: white;
  box-shadow: var(--shadow-sm);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 22px;
}

.support-box {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.support-box > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 900;
}

.support-box strong,
.support-box small {
  display: block;
}

.support-box strong {
  font-size: 12px;
}

.support-box small {
  margin-top: 3px;
  opacity: 0.65;
}

.logout-btn {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: transparent;
  color: white;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.app-shell {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid rgba(223, 229, 239, 0.8);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(16px);
}

.page-heading {
  min-width: 0;
}

.page-heading small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.page-heading h1 {
  margin: 5px 0 0;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-btn,
.notification-btn {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
}

.icon-btn:hover,
.notification-btn:hover {
  background: var(--blue-soft);
}

.notification-btn {
  position: relative;
  font-size: 20px;
}

.profile-chip {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.profile-chip strong,
.profile-chip small {
  display: block;
}

.profile-chip strong {
  font-size: 12px;
}

.profile-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.menu-btn {
  display: none;
}

.main-content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 30px 54px;
  outline: none;
}

/* =========================
   DASHBOARD
========================= */

.hero-strip {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #214dc8, #386feb);
  color: white;
  box-shadow: var(--shadow);
}

.hero-strip::after {
  content: "";
  position: absolute;
  top: -110px;
  right: -70px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.04);
}

.hero-strip > div {
  position: relative;
  z-index: 1;
}

.hero-strip small {
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.hero-strip h2 {
  margin: 6px 0 7px;
  font-size: 24px;
}

.hero-strip p {
  margin: 0;
  opacity: 0.82;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
}

.hero-stat {
  min-width: 112px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
}

.hero-stat strong,
.hero-stat small {
  display: block;
}

.hero-stat strong {
  font-size: 22px;
}

.hero-stat small {
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.72;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mt-18 {
  margin-top: 18px;
}

.mt-24 {
  margin-top: 24px;
}

.stat-card,
.panel,
.task-card,
.subject-row,
.video-card,
.roadmap-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 18px;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent, var(--blue));
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--soft, var(--blue-soft));
  color: var(--accent, var(--blue));
  font-weight: 900;
}

.stat-card small,
.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card small {
  color: var(--muted);
  font-size: 11px;
}

.stat-card strong {
  margin: 5px 0 2px;
  font-size: 20px;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.green {
  background: var(--green-soft);
  color: #078a62;
}

.badge.orange {
  background: var(--orange-soft);
  color: #b65407;
}

.badge.red {
  background: var(--red-soft);
  color: #bf242b;
}

.badge.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.attention-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.attention-item,
.activity-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.attention-item .icon,
.activity-item .icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--soft, var(--blue-soft));
  color: var(--accent, var(--blue));
  font-weight: 900;
}

.attention-item strong,
.attention-item small,
.activity-item strong,
.activity-item small {
  display: block;
}

.attention-item strong,
.activity-item strong {
  font-size: 13px;
}

.attention-item small,
.activity-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.progress-stack {
  display: grid;
  gap: 18px;
}

.progress-row {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.progress-meta strong {
  font-size: 13px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f7;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--blue), #5790ff);
}

.progress-fill.green {
  background:
    linear-gradient(90deg, #14b884, #54d5ad);
}

.progress-fill.orange {
  background:
    linear-gradient(90deg, #ff7a17, #ffa658);
}

/* =========================
   THANH CÔNG CỤ
========================= */

.section-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-toolbar .left {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--ink);
}

.pill-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.pill-tabs button {
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pill-tabs button.active {
  background: var(--blue-soft);
  color: var(--blue);
}

/* =========================
   THỜI KHÓA BIỂU
========================= */

.schedule-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  padding-bottom: 8px;
  overflow-x: auto;
}

.schedule-day {
  min-width: 180px;
}

.schedule-day h4 {
  margin: 0 0 10px;
  padding: 12px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--blue), #3b70ee);
  color: white;
  font-size: 13px;
  text-align: center;
}

.lesson {
  padding: 12px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.lesson b,
.lesson small {
  display: block;
}

.lesson b {
  font-size: 12px;
}

.lesson small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.lesson.blue {
  background: #edf3ff;
}

.lesson.green {
  background: #ebfaf4;
}

.lesson.orange {
  background: #fff4ea;
}

.lesson.purple {
  background: #f7f1ff;
}

/* =========================
   BÀI TẬP
========================= */

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  display: grid;
  grid-template-columns:
    120px minmax(220px, 1fr) 170px 120px auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.task-card strong,
.task-card small {
  display: block;
}

.task-card .subject {
  font-size: 13px;
}

.task-card .desc {
  font-size: 13px;
}

.task-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.status-select {
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--red-soft);
  color: #bd252c;
  font-size: 11px;
  font-weight: 800;
}

.status-select.doing {
  background: var(--orange-soft);
  color: #a84b06;
}

.status-select.done {
  background: var(--green-soft);
  color: #087b59;
}

.status-select.review {
  background: var(--purple-soft);
  color: var(--purple);
}

.file-btn {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

/* =========================
   THÔNG BÁO KIỂM TRA
========================= */

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 31px;
  right: 12.5%;
  left: 12.5%;
  height: 3px;
  background: var(--line);
}

.timeline-step {
  position: relative;
  padding: 0 10px;
  text-align: center;
}

.timeline-step .dot {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border: 8px solid white;
  border-radius: 50%;
  background: var(--soft, var(--blue-soft));
  color: var(--accent, var(--blue));
  font-weight: 900;
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-step h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.timeline-step p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* =========================
   ĐIỂM SỐ
========================= */

.subject-list {
  display: grid;
  gap: 10px;
}

.subject-row {
  display: grid;
  grid-template-columns: 160px 90px 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.subject-row strong {
  font-size: 13px;
}

.subject-row .score {
  color: var(--blue);
  font-size: 21px;
  font-weight: 900;
}

.subject-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.trend-chart {
  width: 100%;
  height: 230px;
  display: block;
  overflow: visible;
}

.chart-label {
  fill: #8b98ac;
  font-size: 10px;
}

/* =========================
   DẠY THÊM
========================= */

.tutoring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tutoring-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
}

.tutoring-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent, var(--blue));
}

.tutoring-card .big-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--soft, var(--blue-soft));
  color: var(--accent, var(--blue));
  font-size: 21px;
  font-weight: 900;
}

.tutoring-card h3 {
  margin: 16px 0 6px;
  font-size: 18px;
}

.tutoring-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tutoring-card button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.video-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 18px;
}

.video-stage {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(145deg, #101827, #17243e);
  color: white;
  box-shadow: var(--shadow);
}

.play-button {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: auto;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--blue);
  font-size: 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.video-stage h3 {
  margin: 0;
  font-size: 20px;
}

.video-stage p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.video-list {
  display: grid;
  gap: 10px;
}

.video-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 15px;
}

.video-thumb {
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #dce7ff, #edf3ff);
  color: var(--blue);
  font-weight: 900;
}

.video-card h4 {
  margin: 0 0 5px;
  font-size: 13px;
}

.video-card small {
  color: var(--muted);
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}

.workflow-step {
  position: relative;
  min-height: 145px;
  padding: 18px;
  border: 2px solid var(--accent, var(--blue));
  border-radius: 18px;
  text-align: center;
}

.workflow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -24px;
  transform: translateY(-50%);
  color: #bac4d4;
  font-size: 22px;
  font-weight: 900;
}

.workflow-step strong {
  display: block;
  margin: 14px 0 8px;
  color: var(--accent, var(--blue));
}

.workflow-step small {
  color: var(--muted);
  line-height: 1.5;
}

.workflow-step .num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  background: var(--accent, var(--blue));
  color: white;
  font-weight: 900;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.roadmap-card {
  padding: 22px 16px;
  background: var(--soft, white);
  text-align: center;
}

.roadmap-card span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent, var(--blue));
  color: white;
  font-weight: 900;
}

.roadmap-card h4 {
  margin: 12px 0 7px;
}

.roadmap-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

/* =========================
   BÁO CÁO
========================= */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.metric small,
.metric strong,
.metric span {
  display: block;
}

.metric small {
  color: var(--muted);
  font-weight: 700;
}

.metric strong {
  margin: 10px 0 6px;
  color: var(--blue);
  font-size: 34px;
}

.metric span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.empty-state {
  padding: 38px;
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 24px;
}

/* =========================
   OVERLAY, THÔNG BÁO, TÌM KIẾM
========================= */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12, 23, 49, 0.38);
  backdrop-filter: blur(2px);
}

.notification-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(105%);
  background: white;
  box-shadow: -18px 0 50px rgba(14, 27, 58, 0.18);
  transition: transform 0.25s ease;
}

.notification-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.drawer-head small {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.1em;
}

.drawer-head h2 {
  margin: 6px 0 0;
  font-size: 23px;
}

.notification-list {
  flex: 1;
  display: grid;
  gap: 10px;
  padding: 16px 2px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.notification-item.unread {
  border-color: #cddaff;
  background: #f7f9ff;
}

.notification-item .icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--soft, var(--blue-soft));
  color: var(--accent, var(--blue));
  font-weight: 900;
}

.notification-item strong,
.notification-item small {
  display: block;
}

.notification-item strong {
  font-size: 13px;
}

.notification-item p {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.notification-item small {
  color: #9aa6b8;
  font-size: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding-top: 9vh;
  background: rgba(12, 23, 49, 0.42);
  backdrop-filter: blur(3px);
}

.modal-card {
  width: min(640px, calc(100vw - 30px));
  max-height: 75vh;
  padding: 20px;
  overflow: auto;
  border-radius: 20px;
  background: white;
  box-shadow: 0 30px 70px rgba(14, 27, 58, 0.28);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h2 {
  margin: 0;
  font-size: 21px;
}

.search-input {
  width: 100%;
  padding: 13px 14px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}

.search-results {
  display: grid;
  gap: 8px;
}

.search-result {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.search-result:hover {
  border-color: #b7c8ff;
  background: #f8faff;
}

.search-result strong,
.search-result small {
  display: block;
}

.search-result small {
  margin-top: 4px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  min-width: 260px;
  max-width: 420px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #172033;
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  box-shadow: var(--shadow);
  transition:
    opacity 0.25s,
    transform 0.25s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   TƯƠNG THÍCH HTML MỚI
========================= */

#loginForm {
  display: grid;
  gap: 11px;
}

#loginForm > .password-wrap,
#loginForm > input {
  margin-bottom: 5px;
}

#loginForm .primary-btn {
  margin-top: 4px;
}

button,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(39, 87, 217, 0.28);
  outline-offset: 2px;
}

#notificationCount {
  position: absolute;
  top: 0;
  right: 1px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid white;
  border-radius: 9px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.modal-card > label {
  display: block;
  margin-top: 16px;
  color: #39455c;
  font-size: 13px;
  font-weight: 800;
}

.modal-card .search-input {
  margin-top: 8px;
}

body.no-scroll {
  overflow: hidden;
}

noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 200;
  padding: 14px 16px;
  border-radius: 12px;
  background: #172033;
  color: white;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1180px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-card {
    grid-template-columns:
      100px minmax(0, 1fr) 140px 110px;
  }

  .task-card .file-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-chip div:last-child {
    display: none;
  }
}

@media (max-width: 920px) {
  .login-view {
    padding: 0;
  }

  .login-shell {
    min-height: 100vh;
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .login-intro {
    display: none;
  }

  .login-panel {
    padding: 28px 20px;
  }

  .mobile-brand {
    display: flex;
    margin-bottom: 46px;
  }

  .app-view {
    display: block;
  }

  .app-shell {
    margin: 0;
  }

  .sidebar {
    transform: translateX(-105%);
    box-shadow: 18px 0 50px rgba(14, 27, 58, 0.20);
    transition: transform 0.25s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .close-side,
  .menu-btn {
    display: grid;
  }

  .topbar {
    padding: 0 18px;
  }

  .main-content {
    padding: 22px 18px 44px;
  }

  .page-heading h1 {
    font-size: 19px;
  }

  .profile-chip {
    display: none;
  }

  .video-layout {
    grid-template-columns: 1fr;
  }

  .workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-step:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 700px) {
  .topbar {
    height: 74px;
  }

  .topbar-actions {
    gap: 2px;
  }

  .page-heading small {
    display: none;
  }

  .page-heading h1 {
    max-width: 215px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hero-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    width: 100%;
    overflow-x: auto;
  }

  .hero-stat {
    min-width: 105px;
    flex: 1;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .tutoring-grid {
    grid-template-columns: 1fr;
  }

  .section-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .task-card > * {
    grid-column: 1;
  }

  .task-card .status-select {
    grid-row: 1;
    grid-column: 2;
  }

  .task-card .file-btn {
    grid-row: 2;
    grid-column: 2;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
    gap: 24px 10px;
  }

  .timeline::before {
    display: none;
  }

  .subject-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .subject-row .badge {
    justify-self: end;
  }

  .subject-row p {
    grid-column: 1 / -1;
  }

  .workflow {
    grid-template-columns: 1fr;
  }

  .workflow-step::after {
    display: none !important;
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .video-stage {
    min-height: 300px;
  }

  .attention-item,
  .activity-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .attention-item > .badge,
  .activity-item > small:last-child {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .main-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .login-heading h2 {
    font-size: 28px;
  }

  .stat-card {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 15px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .roadmap-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 10px;
  }

  .page-heading h1 {
    max-width: 175px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    min-width: 0;
    max-width: none;
  }
}

@supports (padding: max(0px)) {
  .login-view {
    padding-top: max(28px, env(safe-area-inset-top));
    padding-right: max(28px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    padding-left: max(28px, env(safe-area-inset-left));
  }

  @media (max-width: 920px) {
    .login-view {
      padding: 0;
    }

    .topbar {
      padding-left: max(18px, env(safe-area-inset-left));
      padding-right: max(18px, env(safe-area-inset-right));
    }

    .sidebar {
      padding-left: max(18px, env(safe-area-inset-left));
    }
  }
}

/* ==================================================
   SỬA MENU ĐIỆN THOẠI KHÔNG BẤM ĐƯỢC
================================================== */

@media (max-width: 920px) {
  .sidebar {
    z-index: 80;
  }

  .sidebar.open {
    z-index: 80;
    pointer-events: auto;
  }

  .overlay {
    z-index: 70;
  }

  .nav-item,
  .student-card,
  .student-menu,
  .sidebar-footer,
  .close-side {
    position: relative;
    z-index: 81;
  }

  .nav-item {
    touch-action: manipulation;
  }
}

.notification-drawer {
  z-index: 90;
}

.modal {
  z-index: 100;
}