/* EHS Expert - Student Panel Custom Styles */

:root {
  --std-navy: #0e1f3d;
  --std-navy-hover: #16305c;
  --std-primary: #e84545;
  --std-gold: #f6a821;
}

body {
  background: #f4f6fb;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
}

.student-wrap {
  display: flex;
  min-height: 100vh;
}

.student-sidebar {
  width: 250px;
  background: var(--std-navy);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.student-sidebar-logo {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: var(--std-navy);
  z-index: 2;
}

.student-sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.student-sidebar-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.student-sidebar-logo strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.student-sidebar-logo span {
  font-size: 12px;
  color: var(--std-primary);
}

.student-nav {
  list-style: none;
  margin: 0;
  padding: 10px 0 30px;
}

.student-nav-title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 22px 6px;
}

.student-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.75);
  padding: 11px 22px;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: 0.25s;
}

.student-nav li a i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.student-nav li a:hover {
  background: var(--std-navy-hover);
  color: #fff;
}

.student-nav li.active > a {
  background: var(--std-navy-hover);
  color: #fff;
  border-left-color: var(--std-primary);
}

.student-main {
  flex: 1;
  margin-left: 250px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.student-topbar {
  background: #fff;
  border-bottom: 1px solid #e7eaf3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.student-topbar h5 {
  font-weight: 700;
  color: var(--std-navy);
}

.student-toggle {
  border: 1px solid #e7eaf3;
  background: #fff;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 20px;
  color: var(--std-navy);
}

.student-content {
  padding: 24px;
  flex: 1;
}

.student-overlay {
  display: none;
}

/* ---------- Profile card ---------- */
.student-profile {
  background: linear-gradient(120deg, var(--std-navy) 0%, #16305c 100%);
  border-radius: 16px;
  color: #fff;
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.student-profile::after {
  content: "\F142";
  font-family: "bootstrap-icons";
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 120px;
  opacity: 0.08;
  color: #fff;
}

.student-profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--std-primary);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232, 69, 69, 0.4);
}

.student-profile .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

.info-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50rem;
  padding: 5px 14px;
  font-size: 13px;
}

.pill-green {
  background: rgba(40, 167, 69, 0.25);
  border-color: rgba(40, 167, 69, 0.4);
}

.btn-std-primary {
  background: var(--std-primary);
  border: none;
  color: #fff;
}

.btn-std-primary:hover {
  background: #d63a3a;
  color: #fff;
}

/* ---------- Stat cards ---------- */
.std-stat {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(14, 31, 61, 0.06);
  height: 100%;
}

.std-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.icon-navy { background: #eef1f8; color: var(--std-navy); }
.icon-blue { background: #e3f1ff; color: #0d6efd; }
.icon-green { background: #e2f7ea; color: #198754; }
.icon-gold { background: #fdf3e0; color: var(--std-gold); }

.std-stat h4 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--std-navy);
  line-height: 1.1;
}

.std-stat span {
  font-size: 13px;
  color: #6c757d;
}

/* ---------- Badges & tables ---------- */
.std-badge {
  display: inline-block;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50rem;
}

.student-content .card-header {
  border-bottom: 1px solid #f0f2f7;
}

.student-content .table thead th {
  background: #f8f9fc;
  color: var(--std-navy);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #e7eaf3;
  white-space: nowrap;
}

/* ---------- Exam page ---------- */
.std-timer {
  display: inline-block;
  background: var(--std-navy);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 10px;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.std-option {
  border: 1px solid #e7eaf3;
  border-radius: 10px;
  padding: 12px 16px;
  transition: 0.2s;
  cursor: pointer;
}

.std-option:hover {
  border-color: var(--std-primary);
  background: #fff8f5;
}

.std-option .form-check-input:checked ~ .form-check-label {
  font-weight: 600;
}

/* ---------- Result boxes ---------- */
.result-box {
  border: 1px solid #e7eaf3;
  border-radius: 12px;
  padding: 18px 12px;
  background: #fafbfe;
}

@media (max-width: 991px) {
  .student-sidebar {
    transform: translateX(-100%);
  }
  .student-wrap.sidebar-open .student-sidebar {
    transform: translateX(0);
  }
  .student-main {
    margin-left: 0;
  }
  .student-wrap.sidebar-open .student-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
  }
}
