:root{
  --bg1:#070b17;
  --bg2:#0b1630;
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --border:rgba(255,255,255,.14);
  --card:rgba(255,255,255,.06);
}

.site-body{
  min-height:100vh;
  margin:0;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 10% 10%, rgba(124,58,237,.25), transparent 55%),
    radial-gradient(900px 600px at 90% 30%, rgba(34,197,94,.18), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.site-nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.site-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--text);
  text-decoration:none;
  font-weight: 700;
}
.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(124,58,237,.9);
  box-shadow: 0 0 20px rgba(124,58,237,.55);
}

.site-main{ min-height: calc(100vh - 120px); }

.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.18);
}

/* reusable components */
.card-glass{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

.brand-badge{
  display:flex; align-items:center; justify-content:center;
  background: rgba(124,58,237,.18);
  border: 1px solid rgba(124,58,237,.35);
  color: var(--text);
}

.text-muted{ color: var(--muted) !important; }

.form-control, .form-select{
  background: rgba(255,255,255,.06) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.form-control::placeholder{ color: rgba(234,240,255,.55) !important; }
.form-control:focus, .form-select:focus{
  box-shadow: 0 0 0 .2rem rgba(124,58,237,.18) !important;
  border-color: rgba(124,58,237,.6) !important;
}
/* ===========================
   Student Panel Layout
=========================== */
.student-shell{
  display:flex;
  min-height:100vh;
}

.student-sidebar{
  width: 270px;
  padding: 14px;
  border-right: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .2s ease, transform .2s ease;
}

.student-sidebar.collapsed{
  width: 78px;
}

.student-brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}

.student-menu{ margin-top: 14px; display:flex; flex-direction:column; gap:6px; }
.student-menu-label{
  margin-top: 10px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.student-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: rgba(234,240,255,.88);
  border: 1px solid transparent;
}
.student-link i{ font-size: 18px; width: 22px; text-align:center; }

.student-link:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border);
  color: #fff;
}

.student-link.active{
  background: rgba(124,58,237,.18);
  border-color: rgba(124,58,237,.35);
}

.student-sidebar-footer{
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.student-main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width: 0;
}

.student-topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}

.student-content{
  padding: 18px;
}

.student-footer{
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.12);
}

@media (max-width: 991px){
  .student-sidebar{
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(0);
    z-index: 60;
  }
  .student-sidebar.collapsed{
    transform: translateX(-100%);
    width: 270px;
  }
  .student-main{ margin-left: 0; }
}
.table-glass .empty-state{
  color: rgba(255,255,255,0.9) !important;
  font-weight: 600;
}
/* --- Student purchases/attempts empty rows visibility fix --- */
.table-glass .text-muted,
.table-glass td.text-muted,
.table-glass tbody td {
  color: rgba(255,255,255,0.85) !important;
}

.table-glass tbody tr td.text-center {
  color: rgba(255,255,255,0.85) !important;
}

/* If your glass background is too bright, add subtle contrast */
.table-glass tbody tr td {
  background: transparent;
}

/* ensure no display/visibility issues */
.table-glass table,
.table-glass tbody,
.table-glass tr,
.table-glass td {
  visibility: visible !important;
  opacity: 1 !important;
}
/* Exam Player compact UI */
.question-box{
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
}

.option-tile{
  padding: 10px 12px !important;
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform .12s ease, border-color .12s ease;
}
.option-tile:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
}

.option-head{
  font-size: 12px;
  opacity: .9;
}
.option-text{
  font-size: 14px;
  line-height: 1.25;
}

/* Make palette stay visible */
.palette-sticky{
  position: sticky;
  top: 90px;
}
/* ===== Exam Fullscreen Mode ===== */
body.exam-fullscreen .admin-sidebar,
body.exam-fullscreen .admin-topbar {
  display: none !important;
}

body.exam-fullscreen .admin-shell{
  grid-template-columns: 1fr !important;
}

body.exam-fullscreen .admin-main{
  margin: 0 !important;
}

body.exam-fullscreen .admin-content{
  padding: 18px !important;
}

body.exam-fullscreen{
  overflow: hidden;
}
/* ===== Student Layout ===== */
.student-shell{
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.student-sidebar{
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.10);
  padding: 14px;
}

.student-brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}

.brand-dot{
  width:12px;height:12px;border-radius:50%;
  background: rgba(255,255,255,0.7);
  display:inline-block;
}

.student-menu-label{
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 12px;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.student-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255,255,255,0.85);
  text-decoration:none;
  border: 1px solid transparent;
}

.student-link:hover{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}

.student-link.active{
  background: rgba(13,110,253,0.18);
  border-color: rgba(13,110,253,0.35);
}

.student-sidebar-footer{
  margin-top: 14px;
}

/* Main */
.student-main{
  min-width: 0;
}

.student-topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.student-content{
  padding: 18px;
}

/* ===== Mobile Responsive Sidebar ===== */
.student-overlay{
  display:none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 40;
}

@media (max-width: 991.98px){
  .student-shell{
    grid-template-columns: 1fr;
  }

  .student-sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 290px;
    z-index: 50;
    transform: translateX(-110%);
    transition: transform .18s ease;
  }

  body.student-sidebar-open .student-sidebar{
    transform: translateX(0);
  }

  body.student-sidebar-open .student-overlay{
    display:block;
  }

  .student-content{
    padding: 14px;
  }
}

/* ===== Exam Fullscreen Mode (hide student layout) ===== */
body.exam-fullscreen .student-sidebar,
body.exam-fullscreen .student-topbar,
body.exam-fullscreen .student-overlay{
  display:none !important;
}

body.exam-fullscreen .student-shell{
  grid-template-columns: 1fr !important;
}

body.exam-fullscreen .student-content{
  padding: 12px !important;
}
body.student-sidebar-open .student-sidebar{ transform: translateX(0); }
body.student-sidebar-open .student-overlay{ display:block; }
/* =========================
   Glass Table (Student/Admin)
========================= */

.table-glass {
  --bs-table-bg: transparent;
  --bs-table-color: rgba(255,255,255,.92);
  --bs-table-border-color: rgba(255,255,255,.12);
}

.table-glass thead th {
  background: rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.9);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.table-glass tbody tr {
  background: transparent;
  border-color: rgba(255,255,255,.08);
}

.table-glass tbody td {
  color: rgba(255,255,255,.88);
  vertical-align: middle;
}

/* Hover effect */
.table-glass tbody tr:hover {
  background: rgba(255,255,255,.06);
}

/* Remove default bootstrap white */
.table > :not(caption) > * > * {
  background-color: transparent;
}

/* Small screens readability */
@media (max-width: 768px) {
  .table-glass thead {
    font-size: 13px;
  }
  .table-glass tbody td {
    font-size: 13px;
  }
}
