.student-body {
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --bg: #f4f7fb;
  --bg-soft: #eef4fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: #f4f8ff;
  --text: #334155;
  --text-muted: #7b8aa2;
  --heading: #0f172a;
  --border: rgba(122, 145, 176, 0.22);
}

body.dark-mode .student-body {
  --bg: #08111f;
  --bg-soft: #0f172a;
  --surface: rgba(15, 23, 42, 0.74);
  --surface-solid: #111c2f;
  --surface-2: #17243a;
  --text: #cbd5e1;
  --text-muted: #93a4bb;
  --heading: #f8fafc;
  --border: rgba(226, 232, 240, 0.12);
}

.student-body {
  direction: rtl;
  min-height: 100vh;
  padding-top: 96px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.13), transparent 27%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.11), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--text);
  overflow-x: hidden;
}

.student-body * {
  box-sizing: border-box;
}

.student-body a {
  text-decoration: none;
}

.student-body,
.student-main,
.student-topbar,
.student-sidebar {
  direction: rtl;
}

.student-body [dir="ltr"],
.challenge-number,
.timer-pill {
  direction: ltr;
}

.student-body button,
.student-body input,
.student-body select,
.student-body textarea {
  font-family: inherit;
}

.student-topbar .logo-mark img,
.student-sidebar .logo-mark img,
.auth-card .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.student-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(3, 10, 20, 0.48);
  opacity: 0;
  visibility: hidden;
  transition: 0.28s ease;
}

.student-overlay.show {
  opacity: 1;
  visibility: visible;
}

.student-topbar {
  position: fixed;
  top: 18px;
  right: 384px;
  left: 24px;
  min-height: 78px;
  z-index: 1040;
  border: 1px solid rgba(122, 145, 176, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68)), var(--surface);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.dark-mode .student-topbar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7)), var(--surface);
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.student-topbar .nav-wrapper,
.student-topbar .container,
.student-topbar > div {
  width: 100%;
  min-height: 78px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.student-mini-link,
.student-menu-btn,
.theme-toggle.student-theme-toggle {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--heading);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.student-mini-link:hover,
.student-menu-btn:hover,
.theme-toggle.student-theme-toggle:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.student-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.student-menu-btn span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--heading);
}

.student-sidebar {
  position: fixed;
  top: 18px;
  bottom: 18px;
  right: 24px;
  left: auto;
  width: 330px;
  height: auto;
  max-height: none;
  z-index: 1200;
  padding: 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 1px solid rgba(122, 145, 176, 0.2);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7)), var(--surface);
  box-shadow:
    0 26px 72px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.student-sidebar::-webkit-scrollbar {
  width: 6px;
}

.student-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.student-sidebar::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.28);
  border-radius: 999px;
}

body.dark-mode .student-sidebar {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.74)), var(--surface);
  box-shadow:
    0 30px 84px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.student-sidebar-head {
  position: relative;
  display: grid;
  grid-template-columns: 62px 1fr 38px;
  align-items: center;
  gap: 12px;
  min-height: 102px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.11), transparent 56%),
    var(--surface-solid);
}

.student-sidebar-head::after {
  content: "";
  position: absolute;
  left: -34px;
  bottom: -38px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: var(--primary-soft);
  pointer-events: none;
}

.student-avatar {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.student-sidebar-head strong {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 165px;
  color: var(--heading);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-sidebar-head span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.student-close {
  position: relative;
  z-index: 2;
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  place-items: center;
  color: var(--heading);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  font-size: 23px;
  transition: 0.25s ease;
}

.student-close:hover {
  color: #ef4444;
  transform: rotate(90deg);
}

.student-side-nav {
  display: grid;
  gap: 9px;
}

.student-side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 19px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 900;
  transition: 0.25s ease;
  overflow: hidden;
}

.student-side-nav a::before {
  content: "";
  position: absolute;
  inset-block: 12px;
  right: 0;
  width: 4px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  opacity: 0;
  transition: 0.25s ease;
}

.student-side-nav a i {
  width: 36px;
  height: 36px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--primary);
  background: var(--primary-soft);
  flex: 0 0 auto;
  transition: 0.25s ease;
}

.student-side-nav a:hover,
.student-side-nav a.active {
  color: var(--primary);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.08)), var(--surface-solid);
  border-color: rgba(37, 99, 235, 0.18);
  transform: translateX(-4px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.student-side-nav a:hover::before,
.student-side-nav a.active::before {
  opacity: 1;
}

.student-side-nav a:hover i,
.student-side-nav a.active i {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.student-side-nav .danger-link {
  color: #ef4444;
}

.student-side-nav .danger-link i {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.student-side-nav .danger-link:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.18);
}

.student-side-nav .danger-link:hover i {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.student-main {
  width: auto;
  max-width: none;
  margin: 0 384px 0 24px;
  padding: 18px 0 80px;
}

.student-auth-main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.student-page-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 162px;
  margin-bottom: 22px;
  padding: 26px 28px;
  border-radius: 32px;
  border: 1px solid rgba(122, 145, 176, 0.18);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 38%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.52)), var(--surface);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

body.dark-mode .student-page-head {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 38%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.64)), var(--surface);
}

.student-page-head::after {
  content: "";
  position: absolute;
  left: -52px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  pointer-events: none;
}

.student-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 10px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 900;
}

.student-page-head h1,
.student-card h1,
.student-card h2,
.student-card h3 {
  color: var(--heading);
  font-weight: 900;
}

.student-page-head h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.5px;
}

.student-page-head p {
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 700;
}

.student-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.student-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.student-card {
  grid-column: span 12;
  position: relative;
  border-radius: 30px;
  padding: 24px;
  border: 1px solid rgba(122, 145, 176, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.58)), var(--surface);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  transition: 0.25s ease;
  overflow: hidden;
}

body.dark-mode .student-card {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.64)), var(--surface);
}

.student-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 24px 62px rgba(15, 23, 42, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.student-card.solid {
  background: var(--surface-solid);
}

.student-card h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.student-card.span-2 {
  grid-column: span 2;
}
.student-card.span-3 {
  grid-column: span 3;
}
.student-card.span-4 {
  grid-column: span 4;
}
.student-card.span-5 {
  grid-column: span 5;
}
.student-card.span-6 {
  grid-column: span 6;
}
.student-card.span-7 {
  grid-column: span 7;
}
.student-card.span-8 {
  grid-column: span 8;
}
.student-card.span-9 {
  grid-column: span 9;
}
.student-card.span-12 {
  grid-column: span 12;
}

.stat-card {
  min-height: 158px;
  isolation: isolate;
}

.stat-card::after {
  content: "";
  position: absolute;
  left: -36px;
  bottom: -46px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: var(--primary-soft);
  z-index: -1;
}

.stat-card i {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  font-size: 23px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.22);
}

.stat-card strong {
  display: block;
  color: var(--heading);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 4px;
}

.stat-card span,
.student-muted {
  color: var(--text-muted);
  font-weight: 800;
}

.student-table-wrap {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border);
  overflow: auto;
  background: var(--surface-solid);
}

.student-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.student-table th,
.student-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: middle;
}

.student-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--heading);
  font-size: 13px;
  font-weight: 900;
  background: var(--surface-2);
}

.student-table td {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.student-table tr:hover td {
  background: var(--primary-soft);
}

.student-form {
  display: grid;
  gap: 14px;
}

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

.student-field label {
  display: block;
  color: var(--heading);
  font-weight: 900;
  margin-bottom: 7px;
}

.student-field input,
.student-field select,
.student-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  outline: none;
  transition: 0.25s ease;
}

.student-field textarea {
  min-height: 120px;
  resize: vertical;
}

.student-field input:focus,
.student-field select:focus,
.student-field textarea:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.student-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 18px;
  border: 0;
  font-weight: 900;
  transition: 0.25s ease;
  cursor: pointer;
}

.student-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.24);
}

.student-btn.secondary {
  color: var(--heading);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.student-btn.danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.22);
}

.student-btn:hover {
  transform: translateY(-2px);
}

.student-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border);
}

.student-badge.success {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
}

.student-badge.warning {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
}

.student-badge.danger {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.student-badge.muted {
  color: var(--text-muted);
  background: var(--surface-2);
}

.student-alert {
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--heading);
}

.student-alert-success {
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(22, 163, 74, 0.09);
}

.student-alert-error {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.1);
}

.student-alert-warning {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.1);
}

.empty-state {
  text-align: center;
  padding: 42px 18px;
  color: var(--text-muted);
  font-weight: 900;
}

.empty-state i {
  display: block;
  font-size: 44px;
  color: var(--primary);
  margin-bottom: 10px;
}

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

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span {
  color: var(--text-muted);
  font-weight: 900;
}

.info-row strong {
  color: var(--heading);
  font-weight: 900;
  text-align: left;
}

.progress-line {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.progress-line span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.training-console {
  display: grid;
  gap: 16px;
}

.challenge-box {
  text-align: center;
  padding: 28px 18px;
  border-radius: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.challenge-number {
  color: var(--heading);
  font-size: clamp(34px, 7vw, 78px);
  font-weight: 900;
  letter-spacing: 1px;
  direction: ltr;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.option-btn,
.mcq-option {
  min-height: 54px;
  border-radius: 18px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--heading);
  font-weight: 900;
  transition: 0.25s ease;
  cursor: pointer;
}

.option-btn:hover,
.mcq-option:hover {
  transform: translateY(-2px);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.38);
}

.option-btn.correct {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.option-btn.wrong {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.mcq-list {
  display: grid;
  gap: 18px;
}

.mcq-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-solid);
  padding: 18px;
}

.mcq-card h3 {
  margin-bottom: 12px;
  line-height: 1.8;
}

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

.mcq-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--heading);
  font-weight: 900;
  cursor: pointer;
}

.mcq-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, var(--primary));
  font-weight: 900;
  direction: ltr;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface-solid);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.09);
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.chat-body {
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
}

.chat-message {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 20px;
  font-weight: 800;
  line-height: 1.8;
}

.chat-message small {
  display: block;
  margin-top: 5px;
  color: inherit;
  opacity: 0.75;
  font-size: 11px;
}

.chat-message.admin {
  justify-self: start;
  background: var(--surface-2);
  color: var(--heading);
  border: 1px solid var(--border);
}

.chat-message.student {
  justify-self: end;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.auth-card {
  width: min(520px, 100%);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 30px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
}

.auth-card .logo {
  justify-content: center;
  margin-bottom: 18px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 8px;
}

.auth-card p {
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 20px;
}

.logout-confirm-card {
  text-align: center;
}

.logout-confirm-icon {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  margin: 24px auto 12px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-size: 38px;
  box-shadow: 0 18px 45px rgba(239, 68, 68, 0.24);
}

.student-toast {
  position: fixed;
  top: 112px;
  right: 26px;
  z-index: 9999;
  min-width: 320px;
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(122, 145, 176, 0.22);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation:
    studentToastIn 0.45s ease forwards,
    studentToastOut 0.45s ease forwards 4.5s;
}

body.dark-mode .student-toast {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

.student-toast-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  font-size: 22px;
  flex: 0 0 auto;
}

.student-toast-content {
  display: grid;
  gap: 2px;
  flex: 1;
}

.student-toast-content strong {
  color: var(--heading);
  font-size: 15px;
  font-weight: 900;
}

.student-toast-content span {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.student-toast-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--surface-2);
  font-size: 20px;
  line-height: 1;
  transition: 0.25s ease;
}

.student-toast-close:hover {
  color: #ef4444;
}

@keyframes studentToastIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes studentToastOut {
  to {
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
    visibility: hidden;
  }
}

@media (min-width: 1101px) {
  .student-menu-btn {
    display: none !important;
  }

  .student-card.span-3 {
    grid-column: span 3 !important;
  }

  .student-card.span-5 {
    grid-column: span 5 !important;
  }

  .student-card.span-7 {
    grid-column: span 7 !important;
  }

  .student-card.span-12 {
    grid-column: span 12 !important;
  }
}

@media (min-width: 1101px) and (max-width: 1380px) {
  .student-sidebar {
    right: 16px;
    left: auto;
    width: 300px;
  }

  .student-topbar {
    right: 336px;
    left: 18px;
  }

  .student-main {
    margin-right: 336px;
    margin-left: 18px;
  }

  .student-page-head h1 {
    font-size: clamp(28px, 3.4vw, 46px);
  }

  .stat-card {
    min-height: 148px;
  }
}

@media (min-width: 1101px) and (max-width: 1220px) {
  .student-sidebar {
    width: 280px;
    padding: 15px;
  }

  .student-topbar {
    right: 314px;
    left: 18px;
  }

  .student-main {
    margin-right: 314px;
    margin-left: 18px;
  }

  .student-card {
    padding: 20px;
  }

  .student-grid {
    gap: 14px;
  }

  .student-side-nav a {
    font-size: 13px;
  }
}

@media (max-width: 1100px) {
  .student-body {
    padding-top: 92px;
  }

  .student-topbar {
    top: 12px;
    left: 14px;
    right: 14px;
    min-height: 70px;
    border-radius: 24px;
  }

  .student-topbar .nav-wrapper,
  .student-topbar .container,
  .student-topbar > div {
    min-height: 70px;
    padding: 0 14px;
  }

  .student-main {
    width: min(100% - 28px, 1180px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 0 70px;
  }

  .student-sidebar {
    top: 0;
    right: 0;
    bottom: auto;
    left: auto;
    width: min(360px, 88vw);
    height: 100vh;
    max-height: none;
    border-radius: 30px 0 0 30px;
    transform: translateX(105%);
    transition: 0.35s ease;
    z-index: 1200;
  }

  .student-sidebar.show {
    transform: translateX(0);
  }

  .student-close {
    display: grid;
  }

  .student-menu-btn {
    display: flex;
  }
}

@media (max-width: 900px) {
  .student-page-head {
    display: grid;
    gap: 18px;
    min-height: auto;
    padding: 22px;
  }

  .student-page-head .student-actions {
    width: 100%;
  }

  .student-page-head .student-actions .student-btn {
    flex: 1;
  }

  .student-card.span-3,
  .student-card.span-4,
  .student-card.span-5,
  .student-card.span-6,
  .student-card.span-7,
  .student-card.span-8,
  .student-card.span-9 {
    grid-column: span 12;
  }

  .student-form-grid,
  .answer-options,
  .mcq-options {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 92%;
  }
}

@media (max-width: 640px) {
  .student-body {
    padding-top: 86px;
  }

  .student-main {
    width: min(100% - 20px, 1180px);
    padding-bottom: 54px;
  }

  .student-topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    border-radius: 22px;
  }

  .student-page-head {
    border-radius: 26px;
    padding: 20px;
  }

  .student-page-head h1 {
    font-size: 28px;
  }

  .student-kicker {
    font-size: 12px;
  }

  .student-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .student-actions .student-btn {
    width: 100%;
  }

  .student-card,
  .auth-card {
    border-radius: 24px;
    padding: 18px;
  }

  .stat-card {
    min-height: 128px;
  }

  .stat-card i {
    width: 48px;
    height: 48px;
    border-radius: 18px;
  }

  .stat-card strong {
    font-size: 30px;
  }

  .student-sidebar {
    width: min(330px, 90vw);
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .student-toast {
    top: 88px;
    left: 14px;
    right: 14px;
    min-width: auto;
  }
}

@media (max-width: 420px) {
  .student-main {
    width: min(100% - 14px, 1180px);
  }

  .student-page-head,
  .student-card {
    padding: 16px;
  }

  .student-sidebar {
    width: 92vw;
  }

  .student-sidebar-head {
    grid-template-columns: 52px 1fr 34px;
    padding: 12px;
  }

  .student-avatar {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
}

.student-sidebar.open,
.student-sidebar.active,
body.sidebar-open .student-sidebar,
body.student-sidebar-open .student-sidebar {
  transform: translateX(0) !important;
}

body.sidebar-open .student-overlay,
body.student-sidebar-open .student-overlay,
.student-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.student-body {
  direction: rtl;
  overflow-x: hidden;
}

@media (min-width: 1101px) {
  .student-sidebar {
    right: 24px !important;
    left: auto !important;
  }

  .student-topbar {
    right: 384px !important;
    left: 24px !important;
    width: auto !important;
  }

  .student-main {
    margin-right: 384px !important;
    margin-left: 24px !important;
    width: auto !important;
  }
}

@media (min-width: 1101px) and (max-width: 1380px) {
  .student-sidebar {
    right: 16px !important;
    left: auto !important;
    width: 300px !important;
  }

  .student-topbar {
    right: 336px !important;
    left: 18px !important;
  }

  .student-main {
    margin-right: 336px !important;
    margin-left: 18px !important;
  }
}

@media (min-width: 1101px) and (max-width: 1220px) {
  .student-sidebar {
    width: 280px !important;
  }

  .student-topbar {
    right: 314px !important;
    left: 18px !important;
  }

  .student-main {
    margin-right: 314px !important;
    margin-left: 18px !important;
  }
}

.student-side-nav a {
  direction: rtl;
  text-align: right;
  flex-direction: row !important;
  justify-content: flex-start !important;
}

.student-side-nav a::before {
  right: 0 !important;
  left: auto !important;
  border-radius: 999px 0 0 999px !important;
}

.student-side-nav a:hover,
.student-side-nav a.active {
  transform: translateX(-4px);
}

.student-page-head {
  direction: rtl;
}

.student-page-head > div:first-child {
  text-align: right;
}

.student-page-head .student-actions {
  justify-content: flex-start;
}

.student-table,
.student-table th,
.student-table td {
  direction: rtl;
  text-align: right;
}

@media (max-width: 1100px) {
  .student-topbar {
    right: 14px !important;
    left: 14px !important;
    width: auto !important;
  }

  .student-main {
    margin-right: auto !important;
    margin-left: auto !important;
  }

  .student-sidebar {
    right: 0 !important;
    left: auto !important;
    border-radius: 30px 0 0 30px !important;
    transform: translateX(105%) !important;
  }

  .student-sidebar.show,
  body.student-sidebar-open .student-sidebar {
    transform: translateX(0) !important;
  }
}

@media (max-width: 640px) {
  .student-topbar {
    right: 10px !important;
    left: 10px !important;
  }

  .student-page-head h1 {
    line-height: 1.25;
    word-break: normal;
  }
}

html,
body,
.student-body,
.student-sidebar,
.student-table-wrap,
.chat-body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.student-body::-webkit-scrollbar,
.student-sidebar::-webkit-scrollbar,
.student-table-wrap::-webkit-scrollbar,
.chat-body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

html,
body {
  overflow-x: hidden !important;
}

.student-body {
  min-height: 100vh;
  overflow-x: hidden !important;
}

body.student-sidebar-open,
body.sidebar-open {
  overflow: hidden !important;
}

@media (min-width: 1101px) {
  .student-sidebar {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 330px !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    padding: 22px 18px !important;
    border-radius: 32px 0 0 32px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .student-topbar {
    top: 18px !important;
    right: 354px !important;
    left: 24px !important;
    width: auto !important;
  }

  .student-main {
    margin-right: 354px !important;
    margin-left: 24px !important;
    width: auto !important;
  }
}

@media (min-width: 1101px) and (max-width: 1380px) {
  .student-sidebar {
    width: 300px !important;
  }

  .student-topbar {
    right: 318px !important;
    left: 18px !important;
  }

  .student-main {
    margin-right: 318px !important;
    margin-left: 18px !important;
  }
}

@media (min-width: 1101px) and (max-width: 1220px) {
  .student-sidebar {
    width: 280px !important;
  }

  .student-topbar {
    right: 298px !important;
    left: 18px !important;
  }

  .student-main {
    margin-right: 298px !important;
    margin-left: 18px !important;
  }
}

@media (max-width: 1100px) {
  .student-sidebar {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 28px 0 0 28px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: translateX(105%) !important;
  }

  .student-sidebar.show,
  .student-sidebar.open,
  .student-sidebar.active,
  body.sidebar-open .student-sidebar,
  body.student-sidebar-open .student-sidebar {
    transform: translateX(0) !important;
  }
}

@media (max-width: 640px) {
  .student-sidebar {
    width: min(340px, 92vw) !important;
    border-radius: 24px 0 0 24px !important;
  }
}

body.student-auth-page,
body:has(.student-auth-main) {
  overflow-x: hidden !important;
}

body.student-auth-page .student-sidebar,
body.student-auth-page .student-overlay,
body:has(.student-auth-main) .student-sidebar,
body:has(.student-auth-main) .student-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.student-auth-page .student-body,
body:has(.student-auth-main) .student-body {
  padding-top: 118px !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
}

body.student-auth-page .student-topbar,
body:has(.student-auth-main) .student-topbar {
  top: 22px !important;
  right: auto !important;
  left: 50% !important;
  width: min(1240px, calc(100% - 44px)) !important;
  min-height: 78px !important;
  transform: translateX(-50%) !important;
  border-radius: 30px !important;
}

body.student-auth-page .student-topbar .nav-wrapper,
body.student-auth-page .student-topbar .container,
body.student-auth-page .student-topbar > div,
body:has(.student-auth-main) .student-topbar .nav-wrapper,
body:has(.student-auth-main) .student-topbar .container,
body:has(.student-auth-main) .student-topbar > div {
  min-height: 78px !important;
  padding: 0 18px !important;
}

body.student-auth-page .student-menu-btn,
body:has(.student-auth-main) .student-menu-btn {
  display: none !important;
}

body.student-auth-page .student-main,
body.student-auth-page .student-auth-main,
body:has(.student-auth-main) .student-main,
body:has(.student-auth-main) .student-auth-main {
  width: min(100% - 32px, 1180px) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 34px 0 54px !important;
}

body.student-auth-page .student-auth-main,
body:has(.student-auth-main) .student-auth-main {
  min-height: calc(100vh - 118px) !important;
  min-height: calc(100dvh - 118px) !important;
  display: grid !important;
  place-items: center !important;
}

.auth-card.student-login-card,
body.student-auth-page .auth-card,
body:has(.student-auth-main) .auth-card {
  position: relative !important;
  width: min(560px, 100%) !important;
  margin: 0 auto !important;
  padding: 34px !important;
  border-radius: 34px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.11), transparent 42%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68)), var(--surface) !important;
  border: 1px solid rgba(122, 145, 176, 0.2) !important;
  box-shadow:
    0 26px 78px rgba(15, 23, 42, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.62) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
}

body.dark-mode .auth-card.student-login-card,
body.dark-mode.student-auth-page .auth-card,
body.dark-mode:has(.student-auth-main) .auth-card {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 42%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.68)), var(--surface) !important;
}

.auth-card.student-login-card::before,
body.student-auth-page .auth-card::before,
body:has(.student-auth-main) .auth-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  left: -70px;
  bottom: -85px;
  background: rgba(37, 99, 235, 0.08);
  pointer-events: none;
}

.auth-card.student-login-card .logo,
body.student-auth-page .auth-card .logo,
body:has(.student-auth-main) .auth-card .logo {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  width: auto !important;
  margin: 0 0 24px auto !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

.auth-card.student-login-card h1,
body.student-auth-page .auth-card h1,
body:has(.student-auth-main) .auth-card h1 {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 0 26px !important;
  color: var(--heading) !important;
  font-size: clamp(30px, 4vw, 42px) !important;
  font-weight: 900 !important;
  text-align: center !important;
}

.auth-card.student-login-card .student-form,
body.student-auth-page .auth-card .student-form,
body:has(.student-auth-main) .auth-card .student-form {
  position: relative !important;
  z-index: 1 !important;
  gap: 18px !important;
}

.auth-card.student-login-card .student-field label,
body.student-auth-page .auth-card .student-field label,
body:has(.student-auth-main) .auth-card .student-field label {
  font-size: 15px !important;
  margin-bottom: 8px !important;
  text-align: right !important;
}

.auth-card.student-login-card .student-field input,
body.student-auth-page .auth-card .student-field input,
body:has(.student-auth-main) .auth-card .student-field input {
  min-height: 58px !important;
  border-radius: 18px !important;
  padding: 14px 16px !important;
  background: rgba(255, 255, 255, 0.82) !important;
}

body.dark-mode .auth-card.student-login-card .student-field input,
body.dark-mode.student-auth-page .auth-card .student-field input,
body.dark-mode:has(.student-auth-main) .auth-card .student-field input {
  background: rgba(15, 23, 42, 0.72) !important;
}

.auth-card.student-login-card .student-btn,
body.student-auth-page .auth-card .student-btn,
body:has(.student-auth-main) .auth-card .student-btn {
  width: 100% !important;
  min-height: 58px !important;
  border-radius: 18px !important;
  font-size: 16px !important;
}

body.student-auth-page .student-toast,
body:has(.student-auth-main) .student-toast {
  top: 116px !important;
  right: 50% !important;
  left: auto !important;
  transform: translateX(50%) !important;
}

@media (max-width: 760px) {
  body.student-auth-page .student-body,
  body:has(.student-auth-main) .student-body {
    padding-top: 98px !important;
  }

  body.student-auth-page .student-topbar,
  body:has(.student-auth-main) .student-topbar {
    top: 12px !important;
    width: calc(100% - 20px) !important;
    min-height: 70px !important;
    border-radius: 24px !important;
  }

  body.student-auth-page .student-topbar .nav-wrapper,
  body.student-auth-page .student-topbar .container,
  body.student-auth-page .student-topbar > div,
  body:has(.student-auth-main) .student-topbar .nav-wrapper,
  body:has(.student-auth-main) .student-topbar .container,
  body:has(.student-auth-main) .student-topbar > div {
    min-height: 70px !important;
    padding: 0 12px !important;
  }

  body.student-auth-page .student-auth-main,
  body:has(.student-auth-main) .student-auth-main {
    width: min(100% - 20px, 560px) !important;
    min-height: calc(100vh - 98px) !important;
    min-height: calc(100dvh - 98px) !important;
    padding: 20px 0 34px !important;
  }

  .auth-card.student-login-card,
  body.student-auth-page .auth-card,
  body:has(.student-auth-main) .auth-card {
    padding: 24px 18px !important;
    border-radius: 28px !important;
  }

  body.student-auth-page .student-toast,
  body:has(.student-auth-main) .student-toast {
    top: 92px !important;
    right: 10px !important;
    left: 10px !important;
    transform: none !important;
    width: auto !important;
  }
}

body.student-auth-page.student-body,
body:has(.student-auth-main).student-body {
  padding-top: 118px !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
}

@media (max-width: 760px) {
  body.student-auth-page.student-body,
  body:has(.student-auth-main).student-body {
    padding-top: 98px !important;
  }
}

/* =========================
   Student Subscriptions Page
   ========================= */

.subscription-history-card {
  padding: 0 !important;
  overflow: hidden;
}

.subscription-history-head {
  padding: 24px 24px 14px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 38%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.22);
}

.subscription-history-head h2 {
  margin: 8px 0 4px;
  font-size: 24px;
}

.subscription-history-head p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 800;
}

.subscriptions-table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 18px 18px;
}

.subscriptions-table {
  min-width: 760px;
  border-collapse: separate !important;
  border-spacing: 0 12px !important;
}

.subscriptions-table thead th {
  position: static !important;
  padding: 14px 16px;
  border: 0 !important;
  color: var(--text-muted);
  background: transparent !important;
  font-size: 12px;
}

.subscriptions-table tbody tr {
  background: var(--surface-solid);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: 0.25s ease;
}

.subscriptions-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
}

.subscriptions-table tbody td {
  padding: 16px;
  border: 0 !important;
  background: transparent !important;
  vertical-align: middle;
}

.subscriptions-table tbody td:first-child {
  border-radius: 0 22px 22px 0;
}

.subscriptions-table tbody td:last-child {
  border-radius: 22px 0 0 22px;
}

.subscription-plan-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subscription-plan-icon {
  width: 46px;
  height: 46px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
  flex: 0 0 auto;
}

.subscription-plan-cell strong {
  display: block;
  color: var(--heading);
  font-size: 15px;
  font-weight: 900;
}

.subscription-plan-cell small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-price {
  color: var(--heading);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.subscription-period {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
}

.subscription-period span,
.subscription-method {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subscription-period i,
.subscription-method i {
  color: var(--primary);
  font-size: 16px;
}

.subscription-method {
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

/* Mobile: table becomes cards */
@media (max-width: 760px) {
  .subscription-history-card {
    padding: 0 !important;
  }

  .subscription-history-head {
    padding: 20px 18px 12px;
  }

  .subscriptions-table-wrap {
    padding: 0 14px 16px;
    overflow: visible !important;
  }

  .subscriptions-table {
    min-width: 0 !important;
    width: 100%;
    border-spacing: 0 12px !important;
  }

  .subscriptions-table thead {
    display: none;
  }

  .subscriptions-table,
  .subscriptions-table tbody,
  .subscriptions-table tr,
  .subscriptions-table td {
    display: block;
    width: 100%;
  }

  .subscriptions-table tbody tr {
    padding: 14px;
    border-radius: 22px;
    border: 1px solid var(--border);
  }

  .subscriptions-table tbody td {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border) !important;
    text-align: left !important;
  }

  .subscriptions-table tbody td:first-child,
  .subscriptions-table tbody td:last-child {
    border-radius: 0;
  }

  .subscriptions-table tbody td:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0;
  }

  .subscriptions-table tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    flex: 0 0 auto;
  }

  .subscriptions-table tbody td:first-child {
    display: block;
    padding-top: 0;
  }

  .subscriptions-table tbody td:first-child::before {
    display: none;
  }

  .subscription-plan-cell {
    justify-content: flex-start;
  }

  .subscription-period {
    text-align: left;
  }
}

/* =========================
   Fix Subscription Mobile Spacing
   ========================= */

@media (max-width: 760px) {
  .student-main {
    width: calc(100% - 28px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  .student-grid {
    gap: 16px !important;
  }

  .subscription-history-card {
    padding: 14px !important;
    border-radius: 28px !important;
  }

  .subscription-history-head {
    margin: -14px -14px 14px !important;
    padding: 22px 20px 18px !important;
    border-radius: 28px 28px 0 0 !important;
  }

  .subscription-history-head h2 {
    font-size: 25px !important;
    margin: 0 !important;
  }

  .subscriptions-table-wrap {
    padding: 0 !important;
    overflow: visible !important;
  }

  .subscriptions-table tbody tr {
    margin: 0 !important;
    padding: 18px !important;
    border-radius: 24px !important;
  }

  .subscriptions-table tbody td {
    padding: 14px 0 !important;
  }

  .subscriptions-table tbody td:first-child {
    padding-top: 0 !important;
    padding-bottom: 16px !important;
  }

  .subscription-plan-cell {
    gap: 14px !important;
  }

  .subscription-plan-icon {
    width: 52px !important;
    height: 52px !important;
    border-radius: 18px !important;
  }
}

@media (max-width: 420px) {
  .student-main {
    width: calc(100% - 22px) !important;
  }

  .subscription-history-card {
    padding: 12px !important;
  }

  .subscription-history-head {
    margin: -12px -12px 12px !important;
    padding: 20px 18px 16px !important;
  }

  .subscriptions-table tbody tr {
    padding: 16px !important;
  }
}

/* =========================
   Student Competitions Table
   ========================= */

.competition-list-card {
  padding: 0 !important;
  overflow: hidden;
}

.competition-list-head {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.11), transparent 38%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.22);
}

.competition-list-head h2 {
  margin: 8px 0 4px;
  color: var(--heading);
  font-size: 25px;
  font-weight: 900;
}

.competition-list-head p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 800;
}

.competitions-table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 4px 18px 20px;
}

.competitions-table {
  min-width: 900px;
  border-collapse: separate !important;
  border-spacing: 0 12px !important;
}

.competitions-table thead th {
  position: static !important;
  padding: 14px 16px;
  border: 0 !important;
  color: var(--text-muted);
  background: transparent !important;
  font-size: 12px;
  white-space: nowrap;
}

.competitions-table tbody tr {
  background: var(--surface-solid);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: 0.25s ease;
}

.competitions-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
}

.competitions-table tbody td {
  padding: 16px;
  border: 0 !important;
  background: transparent !important;
  vertical-align: middle;
}

.competitions-table tbody td:first-child {
  border-radius: 0 22px 22px 0;
}

.competitions-table tbody td:last-child {
  border-radius: 22px 0 0 22px;
}

.competition-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.competition-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 21px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
  flex: 0 0 auto;
}

.competition-name-cell strong {
  display: block;
  color: var(--heading);
  font-size: 15px;
  font-weight: 900;
}

.competition-name-cell small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.competition-date,
.competition-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.competition-date i,
.competition-duration i,
.competition-time i {
  color: var(--primary);
  font-size: 16px;
}

.competition-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--heading);
  font-weight: 900;
  direction: ltr;
  white-space: nowrap;
}

.competition-grade {
  display: inline-flex;
  min-width: 48px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 900;
}

.competition-action-btn {
  min-height: 42px !important;
  padding: 10px 14px !important;
  border-radius: 15px !important;
  white-space: nowrap;
}

/* Mobile: competitions table becomes clean cards */
@media (max-width: 760px) {
  .competition-list-card {
    padding: 12px !important;
    border-radius: 28px !important;
  }

  .competition-list-head {
    margin: -12px -12px 14px !important;
    padding: 22px 20px 18px !important;
    border-radius: 28px 28px 0 0 !important;
  }

  .competition-list-head h2 {
    margin: 0 !important;
    font-size: 24px !important;
  }

  .competition-list-head p {
    margin-top: 6px !important;
    font-size: 13px !important;
    line-height: 1.7;
  }

  .competitions-table-wrap {
    padding: 0 !important;
    overflow: visible !important;
  }

  .competitions-table {
    min-width: 0 !important;
    width: 100% !important;
    border-spacing: 0 14px !important;
  }

  .competitions-table thead {
    display: none;
  }

  .competitions-table,
  .competitions-table tbody,
  .competitions-table tr,
  .competitions-table td {
    display: block;
    width: 100%;
  }

  .competitions-table tbody tr {
    padding: 17px !important;
    border-radius: 24px;
    border: 1px solid var(--border);
    background:
      radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 42%),
      var(--surface-solid);
  }

  .competitions-table tbody td {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0 !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: left !important;
  }

  .competitions-table tbody td:first-child,
  .competitions-table tbody td:last-child {
    border-radius: 0 !important;
  }

  .competitions-table tbody td:first-child {
    display: block;
    padding-top: 0 !important;
    padding-bottom: 16px !important;
  }

  .competitions-table tbody td:first-child::before {
    display: none;
  }

  .competitions-table tbody td:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .competitions-table tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    flex: 0 0 auto;
  }

  .competition-name-cell {
    min-width: 0;
    gap: 14px;
  }

  .competition-icon {
    width: 52px;
    height: 52px;
    border-radius: 19px;
  }

  .competition-name-cell strong {
    font-size: 16px;
  }

  .competition-time,
  .competition-date,
  .competition-duration {
    justify-content: flex-end;
  }

  .competition-action-btn {
    width: 100%;
    min-height: 48px !important;
    margin-top: 4px;
  }

  .competitions-table tbody td:last-child::before {
    display: none;
  }
}

@media (max-width: 420px) {
  .competition-list-card {
    padding: 10px !important;
  }

  .competition-list-head {
    margin: -10px -10px 12px !important;
    padding: 20px 18px 16px !important;
  }

  .competitions-table tbody tr {
    padding: 15px !important;
  }

  .competition-name-cell strong {
    font-size: 15px;
  }
}


/* Dashboard stat cards: 6 across on desktop, 3 across on tablet, 2 across on mobile. */
@media (min-width: 1101px) {
  .student-card.span-2 { grid-column: span 2 !important; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .student-card.span-2 { grid-column: span 4 !important; }
}
@media (max-width: 640px) {
  .student-card.span-2 { grid-column: span 6 !important; }
}

/* =========================================================
   STUDENT DASHBOARD PRO — 2026-08-15
   ========================================================= */

/* Notification counter in the shared student header. */
.student-notification-link {
  position: relative;
}

.student-notification-count {
  position: absolute;
  top: -7px;
  left: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid var(--surface-solid);
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 7px 16px rgba(239, 68, 68, 0.28);
}

.dashboard-page-head p {
  margin-top: 8px;
}

.dashboard-grid {
  align-items: stretch;
}

.dashboard-section-title.span-12 {
  grid-column: span 12;
}

.dashboard-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px 0;
}

.dashboard-section-title span,
.dashboard-card-kicker,
.dashboard-eyebrow {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.dashboard-section-title h2 {
  margin: 2px 0 0;
  color: var(--heading);
  font-size: 22px;
}

.dashboard-section-title a,
.dashboard-small-link,
.dashboard-info-card > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

/* Main XP / Rank card */
.dashboard-rank-card {
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(135deg, rgba(26, 33, 84, 0.98), rgba(45, 72, 172, 0.96) 58%, rgba(6, 182, 212, 0.88));
  box-shadow: 0 24px 64px rgba(37, 99, 235, 0.22);
}

body.dark-mode .dashboard-rank-card {
  background:
    linear-gradient(135deg, rgba(13, 22, 55, 0.98), rgba(35, 48, 122, 0.98) 58%, rgba(8, 114, 140, 0.94));
}

.dashboard-rank-card:hover {
  box-shadow: 0 30px 72px rgba(37, 99, 235, 0.3);
}

.dashboard-rank-glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.dashboard-rank-glow-one {
  width: 290px;
  height: 290px;
  top: -170px;
  left: -70px;
  background: rgba(255, 255, 255, 0.12);
}

.dashboard-rank-glow-two {
  width: 220px;
  height: 220px;
  right: 30%;
  bottom: -175px;
  background: rgba(80, 220, 255, 0.18);
}

.dashboard-rank-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.dashboard-rank-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 38px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dashboard-rank-copy {
  min-width: 0;
}

.dashboard-rank-card .dashboard-eyebrow {
  color: rgba(235, 244, 255, 0.74);
}

.dashboard-rank-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 22px;
}

.dashboard-rank-title-row h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 900;
}

.dashboard-xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-xp-pill i {
  color: #ffd86a;
}

.dashboard-rank-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: rgba(242, 248, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-rank-progress-head strong {
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff3a5, #ffd15c, #58e5ff);
  box-shadow: 0 0 18px rgba(255, 220, 108, 0.48);
}

.dashboard-streak-box {
  position: relative;
  z-index: 1;
  min-width: 178px;
  min-height: 126px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 28px;
  background: rgba(6, 13, 38, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dashboard-streak-box > i {
  font-size: 35px;
  color: #ffb45c;
  filter: drop-shadow(0 8px 16px rgba(255, 159, 67, 0.35));
}

.dashboard-streak-box strong {
  display: block;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.dashboard-streak-box span {
  display: block;
  margin-top: 6px;
  color: rgba(242, 248, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

/* Today cards */
.dashboard-today-card {
  min-height: 110px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
}

.dashboard-stat-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 23px;
}

.dashboard-today-card strong {
  display: block;
  color: var(--heading);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.dashboard-today-card span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-overall-card {
  min-height: 150px;
  padding: 20px;
}

.dashboard-overall-card i {
  width: 48px;
  height: 48px;
  margin-bottom: 13px;
  border-radius: 16px;
}

.dashboard-overall-card strong {
  font-size: 30px;
}

.dashboard-overall-card .dashboard-time-value {
  font-size: 22px;
  line-height: 1.3;
}

/* Payment warning */
.dashboard-payment-alert {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  border-color: rgba(245, 158, 11, 0.28);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.11), rgba(251, 191, 36, 0.04)), var(--surface-solid);
}

.dashboard-payment-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  font-size: 24px;
}

.dashboard-payment-copy > span {
  color: #d97706;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-payment-copy strong {
  display: block;
  margin: 3px 0;
  color: var(--heading);
  font-size: 18px;
  font-weight: 900;
}

.dashboard-payment-copy small {
  color: var(--text-muted);
  font-weight: 700;
}

/* Shared dashboard card headers */
.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-card-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0 0;
}

/* Battle card */
.dashboard-battle-card {
  overflow: hidden;
  background:
    radial-gradient(circle at left top, rgba(124, 92, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(72, 55, 160, 0.05), transparent),
    var(--surface-solid);
}

.dashboard-battle-card .dashboard-card-kicker {
  color: #7c5cff;
}

.dashboard-battle-card h2 i {
  color: #7c5cff;
}

.dashboard-battle-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-battle-metrics > div {
  min-width: 0;
  padding: 14px 10px;
  border-radius: 18px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.dashboard-battle-metrics span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-battle-metrics strong {
  display: block;
  margin-top: 7px;
  color: var(--heading);
  font-size: 21px;
  font-weight: 900;
  white-space: nowrap;
}

/* Next lesson / Exam cards */
.dashboard-info-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.dashboard-info-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 21px;
}

.dashboard-info-card h2 {
  margin: 5px 0 12px;
  font-size: 17px;
  line-height: 1.45;
}

.dashboard-info-main {
  display: block;
  color: var(--heading);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
}

.dashboard-info-main em {
  display: inline-flex;
  margin-right: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  font-size: 11px;
  font-style: normal;
}

.dashboard-info-card small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.65;
}

.dashboard-info-card > a {
  margin-top: auto;
  padding-top: 18px;
}

.dashboard-exam-card .dashboard-info-icon {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.dashboard-next-lesson-card .dashboard-info-icon {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
}

/* Tables */
.dashboard-table-card {
  padding: 22px;
}

.dashboard-table-card .student-table th {
  white-space: nowrap;
}

.dashboard-table-card .student-table td {
  white-space: nowrap;
}

.dashboard-answer-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 7px;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-answer-count.success {
  color: #16a34a;
}

.dashboard-answer-count.danger {
  color: #ef4444;
}

.dashboard-xp-text {
  color: #d99b10;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-rank-position {
  color: #7c5cff;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-details-btn {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 12px;
  font-size: 11px;
}

@media (max-width: 1100px) {
  .dashboard-rank-card {
    min-height: 210px;
  }

  .dashboard-battle-metrics {
    grid-template-columns: repeat(5, minmax(90px, 1fr));
    overflow-x: auto;
    padding-bottom: 3px;
  }
}

@media (max-width: 900px) {
  .dashboard-rank-card {
    grid-template-columns: 1fr;
  }

  .dashboard-streak-box {
    min-width: 0;
    min-height: 90px;
    justify-content: flex-start;
  }

  .dashboard-today-card {
    grid-column: span 6 !important;
  }

  .dashboard-payment-alert {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .dashboard-payment-alert .student-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .dashboard-section-title {
    align-items: flex-start;
  }

  .dashboard-rank-card {
    padding: 20px;
    gap: 18px;
  }

  .dashboard-rank-content {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 13px;
  }

  .dashboard-rank-icon {
    width: 64px;
    height: 64px;
    border-radius: 21px;
    font-size: 29px;
  }

  .dashboard-rank-title-row {
    margin-bottom: 15px;
  }

  .dashboard-rank-title-row h2 {
    font-size: 27px;
  }

  .dashboard-rank-progress-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .dashboard-streak-box {
    padding: 15px;
    border-radius: 20px;
  }

  .dashboard-battle-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .dashboard-battle-metrics > div:nth-child(4),
  .dashboard-battle-metrics > div:nth-child(5) {
    grid-column: span 1;
  }

  /* Mobile: recent trainings and competitions become clean cards instead of a wide horizontal table. */
  .recent-training-wrap,
  .dashboard-competitions-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .recent-training-table,
  .dashboard-competitions-table {
    display: block;
    min-width: 0;
  }

  .recent-training-table thead,
  .dashboard-competitions-table thead {
    display: none;
  }

  .recent-training-table tbody,
  .dashboard-competitions-table tbody {
    display: grid;
    gap: 12px;
  }

  .recent-training-table tr,
  .dashboard-competitions-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-2);
  }

  .recent-training-table td,
  .dashboard-competitions-table td {
    min-width: 0;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    white-space: normal;
    border-bottom: 1px dashed var(--border);
    background: transparent !important;
  }

  .recent-training-table td::before,
  .dashboard-competitions-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
  }

  .recent-training-table td:nth-last-child(1),
  .dashboard-competitions-table td:nth-last-child(1) {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .recent-training-table td:first-child,
  .dashboard-competitions-table td:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-details-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .dashboard-section-title {
    display: grid;
    gap: 8px;
  }

  .dashboard-section-title h2 {
    font-size: 19px;
  }

  .dashboard-today-card {
    min-height: 102px;
    padding: 14px;
    gap: 10px;
  }

  .dashboard-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    font-size: 19px;
  }

  .dashboard-today-card strong {
    font-size: 23px;
  }

  .dashboard-today-card span {
    font-size: 10px;
  }

  .dashboard-rank-content {
    grid-template-columns: 1fr;
  }

  .dashboard-rank-icon {
    width: 58px;
    height: 58px;
  }

  .dashboard-xp-pill {
    padding: 7px 9px;
    font-size: 11px;
  }

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

  .dashboard-battle-metrics > div:last-child {
    grid-column: 1 / -1;
  }

  .dashboard-payment-alert {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .dashboard-payment-icon {
    margin: auto;
  }

  .dashboard-card-head {
    display: grid;
    gap: 8px;
  }

  .recent-training-table tr,
  .dashboard-competitions-table tr {
    grid-template-columns: 1fr;
  }

  .recent-training-table td,
  .dashboard-competitions-table td,
  .recent-training-table td:first-child,
  .dashboard-competitions-table td:first-child,
  .recent-training-table td:nth-last-child(1),
  .dashboard-competitions-table td:nth-last-child(1) {
    grid-column: 1;
  }
}


/* Student dashboard competition data */
.dashboard-competition-summary-card .dashboard-stat-icon {
  background: rgba(124, 92, 255, 0.12);
  color: #7c5cff;
}

.dashboard-competition-summary-card.summary-correct .dashboard-stat-icon {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.dashboard-competition-summary-card.summary-wrong .dashboard-stat-icon {
  background: rgba(239, 68, 68, 0.11);
  color: #ef4444;
}

.dashboard-competition-summary-card.summary-average .dashboard-stat-icon {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
}

@media (max-width: 720px) {
  .dashboard-competition-summary-card {
    grid-column: span 6 !important;
  }
}

@media (max-width: 520px) {
  .dashboard-competition-summary-card {
    grid-column: span 12 !important;
  }
}

/* Student comprehensive reports */
.student-report-page-head p {
  margin: 7px 0 0;
  max-width: 760px;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 13px;
}

.student-report-grid {
  align-items: stretch;
}

.student-report-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.student-report-summary-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  left: -42px;
  bottom: -50px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.06);
}

.student-report-summary-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  margin-bottom: 4px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  font-size: 20px;
}

.student-report-summary-card.competition .student-report-summary-icon {
  background: rgba(124, 92, 255, 0.11);
  color: #7c5cff;
}

.student-report-summary-card.exams .student-report-summary-icon {
  background: rgba(6, 182, 212, 0.11);
  color: #0891b2;
}

.student-report-summary-card.xp .student-report-summary-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.student-report-summary-card > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.student-report-summary-card > strong {
  color: var(--heading);
  font-size: 29px;
  font-weight: 950;
  line-height: 1.2;
}

.student-report-summary-card > small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

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

.student-report-section-head > div > span {
  display: block;
  margin-bottom: 4px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .4px;
}

.student-report-section-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: 20px;
}

.student-report-section-head > a {
  color: #2563eb;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.student-report-head-note {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

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

.student-report-insight {
  min-width: 0;
  min-height: 112px;
  padding: 15px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface-2);
}

.student-report-insight > i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.09);
  color: #2563eb;
  font-size: 19px;
}

.student-report-insight.success > i {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.student-report-insight.warning > i {
  background: rgba(245, 158, 11, 0.11);
  color: #d97706;
}

.student-report-insight.danger > i {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.student-report-insight span,
.student-report-insight small {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.student-report-insight strong {
  display: block;
  margin: 3px 0;
  color: var(--heading);
  font-size: 17px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.student-report-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.student-report-type-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
}

.student-report-type-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.student-report-type-head strong {
  color: var(--heading);
  font-size: 15px;
  font-weight: 950;
}

.student-report-type-head span {
  color: #2563eb;
  font-size: 15px;
  font-weight: 950;
}

.student-report-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
}

.student-report-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #7c5cff);
}

.student-report-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.student-report-mini-metrics > div {
  min-width: 0;
  padding: 9px;
  border-radius: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
}

.student-report-mini-metrics span {
  display: block;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
}

.student-report-mini-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--heading);
  font-size: 13px;
  font-weight: 950;
}

.student-report-competition-stats,
.student-report-battle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.student-report-battle-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 0;
}

.student-report-competition-stats > div,
.student-report-battle-grid > div {
  min-width: 0;
  padding: 13px 10px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-2);
}

.student-report-competition-stats span,
.student-report-battle-grid span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.student-report-competition-stats strong,
.student-report-battle-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--heading);
  font-size: 17px;
  font-weight: 950;
}

.student-report-table-wrap small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.student-report-positive {
  color: #16a34a;
  font-weight: 950;
}

.student-report-negative {
  color: #dc2626;
  font-weight: 950;
}

.student-report-exam-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.student-report-exam-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface-2);
}

.student-report-exam-head,
.student-report-exam-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.student-report-exam-head > div {
  min-width: 0;
}

.student-report-exam-head span:first-child {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.student-report-exam-head strong {
  color: var(--heading);
  font-size: 15px;
  font-weight: 950;
}

.student-report-exam-meta {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.student-report-exam-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.student-report-exam-meta strong {
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--heading);
  font-size: 14px;
  font-weight: 950;
}

@media (max-width: 1100px) {
  .student-report-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-report-competition-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .student-report-page-head {
    align-items: stretch;
  }

  .student-report-page-head .student-btn {
    width: 100%;
    justify-content: center;
  }

  .student-report-summary-card {
    grid-column: span 6 !important;
    min-height: 135px;
  }

  .student-report-type-grid,
  .student-report-exam-grid {
    grid-template-columns: 1fr;
  }

  .student-report-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .student-report-table-wrap {
    overflow: visible !important;
  }

  .student-report-activity-table thead,
  .student-report-competitions-table thead {
    display: none;
  }

  .student-report-activity-table,
  .student-report-activity-table tbody,
  .student-report-competitions-table,
  .student-report-competitions-table tbody {
    display: block;
    width: 100%;
  }

  .student-report-activity-table tbody,
  .student-report-competitions-table tbody {
    display: grid;
    gap: 10px;
  }

  .student-report-activity-table tr,
  .student-report-competitions-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-2);
  }

  .student-report-activity-table td,
  .student-report-competitions-table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 0 !important;
    border: 0 !important;
    text-align: right;
  }

  .student-report-activity-table td::before,
  .student-report-competitions-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
  }

  .student-report-competitions-table td:first-child,
  .student-report-competitions-table td:last-child {
    grid-column: 1 / -1;
  }

  .student-report-competitions-table td:last-child .student-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .student-report-summary-card {
    grid-column: span 12 !important;
  }

  .student-report-insights,
  .student-report-competition-stats,
  .student-report-battle-grid {
    grid-template-columns: 1fr 1fr;
  }

  .student-report-mini-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-report-exam-head,
  .student-report-exam-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}
