/**
 * DosiPlot v5.0 — Simulation Monte Carlo Interactive
 * © 2025 Pr. Yassine OULHOUQ
 * Université Mohammed Premier (UMP) — Oujda, Maroc
 * Module: Components — Buttons, Cards, Modals, Forms, Tabs, Toggle, Toast, Tooltips, Tables, Scrollbars
 */

/* ============================================
   HEADER
   ============================================ */
.hdr {
  background: var(--gradient-header, linear-gradient(180deg, rgba(14, 21, 37, 0.98), rgba(8, 12, 20, 0.95)));
  border-bottom: 1px solid var(--border);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: var(--z-header, 100);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border-glow), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hdr-l {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hdr-r {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--t3);
}

/* --- Logo --- */
.logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  box-shadow: var(--glow-blue);
  position: relative;
  overflow: hidden;
}

.logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
  animation: shimmer 3s ease-in-out infinite;
}

/* --- App Title --- */
.app-t {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -0.5px;
}

.app-t span {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-st {
  font-size: 10px;
  color: var(--t3);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 1px;
}

.app-author {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  margin-top: 3px;
  letter-spacing: 0.3px;
}

.app-author::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 1px;
  margin-right: 7px;
  vertical-align: middle;
}

/* --- Status Dot --- */
.dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green), 0 0 20px rgba(0, 230, 118, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  margin-left: 6px;
  letter-spacing: 0.5px;
}

.tag-e {
  background: var(--blue-lt);
  color: var(--blue);
  border: 1px solid rgba(0, 180, 255, 0.2);
}

.tag-v {
  background: var(--amber-lt);
  color: var(--amber);
  border: 1px solid rgba(255, 176, 32, 0.2);
}

/* ============================================
   LINAC TREE
   ============================================ */
.linac-tree {
  display: inline-flex;
  align-items: center;
  margin-left: 14px;
  vertical-align: middle;
}

.linac-root {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--t2);
  background: var(--bg2);
  border: 1.5px solid var(--border2);
  border-radius: 6px;
  padding: 5px 10px;
  -webkit-text-fill-color: var(--t2);
  -webkit-background-clip: unset;
  background-clip: unset;
}

.linac-conn {
  width: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

.linac-conn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1.5px;
  background: var(--border2);
}

.linac-conn .lc-h {
  height: 50%;
  display: flex;
  align-items: center;
}

.linac-conn .lc-h::after {
  content: '';
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--border2);
}

.linac-branches {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.linac-branch {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
}

.branch-ph {
  background: rgba(255, 184, 51, 0.12);
  color: #FFB833;
  border: 1px solid rgba(255, 184, 51, 0.35);
  -webkit-text-fill-color: #FFB833;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.branch-el {
  background: rgba(0, 229, 255, 0.12);
  color: #00E5FF;
  border: 1px solid rgba(0, 229, 255, 0.35);
  -webkit-text-fill-color: #00E5FF;
  -webkit-background-clip: unset;
  background-clip: unset;
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.lang-sel {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  height: 32px;
}

.lang-btn {
  padding: 0 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  color: var(--t3);
  -webkit-text-fill-color: var(--t3);
  -webkit-background-clip: unset;
  background-clip: unset;
}

.lang-btn:hover {
  color: var(--t1);
  -webkit-text-fill-color: var(--t1);
  background: var(--bg2);
}

.lang-btn.active {
  background: var(--blue);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--border);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--t2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.theme-btn:hover {
  border-color: var(--border2);
  background: var(--bg3);
  transform: scale(1.05);
}

.theme-btn .icon-sun,
.theme-btn .icon-moon {
  position: absolute;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-btn .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-btn .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* ============================================
   TABS
   ============================================ */
.tabs {
  display: flex;
  background: linear-gradient(180deg, var(--bg1), var(--bg0));
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  overflow-x: auto;
  gap: 2px;
}

.tab {
  padding: 12px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--t3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
  position: relative;
  border-radius: 6px 6px 0 0;
}

.tab:hover {
  color: var(--t2);
  background: rgba(0, 180, 255, 0.04);
}

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: rgba(0, 180, 255, 0.06);
  box-shadow: 0 1px 0 var(--blue);
}

/* ============================================
   BUTTONS — Simulate, Pause, Export
   ============================================ */
.btn-run {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.btn-run::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-run:hover::before {
  opacity: 1;
}

.btn-run.photon {
  background: linear-gradient(135deg, #b8860b, #FFB833);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 184, 51, 0.25);
}

.btn-run.photon:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 184, 51, 0.35), 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-run.electron {
  background: linear-gradient(135deg, #0097a7, #00E5FF);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.btn-run.electron:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.35), 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-run:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.btn-grp {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.btn-grp .btn-run {
  flex: 1;
}

/* Pause Button */
.btn-pause {
  flex: 0 0 50px;
  padding: 13px 0;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg2);
  color: var(--t2);
  border: 1.5px solid var(--border);
  display: none;
}

.btn-pause:hover {
  background: var(--bg3);
  color: var(--t1);
  border-color: var(--border2);
}

.btn-pause.active {
  display: block;
}

.btn-pause.paused {
  background: var(--amber-lt);
  color: var(--amber);
  border-color: rgba(255, 176, 32, 0.3);
}

/* Secondary / Export Button */
.btn-s {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg2);
  color: var(--t2);
  border: 1.5px solid var(--border);
  margin-top: 6px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-s:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(0, 180, 255, 0.06);
  box-shadow: var(--glow-blue);
}

/* ============================================
   FORM ELEMENTS — Selects, Inputs
   ============================================ */
select {
  width: 100%;
  padding: 10px 30px 10px 12px;
  background: var(--bg2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23607090'%3E%3Cpath d='M5 7L0 2h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--t1);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  appearance: none;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.1), var(--glow-blue);
}

select option {
  background: var(--bg2);
  color: var(--t1);
}

.fg {
  margin-bottom: 10px;
}

.fl {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

/* ============================================
   MODE TOGGLE (Teacher/Student)
   ============================================ */
.mode-toggle {
  margin: 10px 0;
  padding: 10px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-toggle:hover {
  border-color: var(--border2);
  background: var(--bg3);
}

.mode-switch {
  width: 38px;
  height: 22px;
  background: var(--bg3);
  border-radius: 11px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border);
}

.mode-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--t3);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.mode-toggle.on .mode-switch {
  background: rgba(0, 230, 118, 0.15);
  border-color: rgba(0, 230, 118, 0.3);
}

.mode-toggle.on .mode-switch::after {
  left: 18px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.mode-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mode-toggle.on .mode-label {
  color: var(--green);
}

/* ============================================
   TEACHER MODE VISIBILITY
   ============================================ */
.teacher-only {
  display: none !important;
}

body.teacher-mode .teacher-only {
  display: block !important;
}

body.teacher-mode .teacher-only.pg {
  display: grid !important;
}

body.teacher-mode .teacher-only.tab {
  display: block !important;
}

body.teacher-mode .teacher-only.dtc {
  display: block !important;
}

body.teacher-mode button.teacher-only {
  display: block !important;
}

/* ============================================
   PASSWORD MODAL
   ============================================ */
.pw-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: var(--z-max, 9999);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pw-modal.show {
  display: flex;
}

.pw-box {
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 28px;
  width: 340px;
  box-shadow: var(--shadow2), var(--glow-blue);
}

.pw-box h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 14px;
}

.pw-box p {
  font-size: 11px;
  color: var(--t3);
  margin-bottom: 14px;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.6;
}

.pw-input {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  outline: none;
  margin-bottom: 10px;
  background: var(--bg2);
  color: var(--t1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pw-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.1);
}

.pw-err {
  color: var(--red);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  display: none;
  margin-bottom: 8px;
}

.pw-btns {
  display: flex;
  gap: 10px;
}

.pw-btns button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pw-ok {
  background: linear-gradient(135deg, #00994d, var(--green));
  color: #000;
  font-weight: 700;
}

.pw-cancel {
  background: var(--bg2);
  color: var(--t2);
  border: 1.5px solid var(--border) !important;
}

.pw-cancel:hover {
  border-color: var(--border2) !important;
  background: var(--bg3);
}

/* ============================================
   RESULT CARDS
   ============================================ */
.pg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pc {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pc:hover {
  border-color: var(--border2);
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.06);
}

.pc-l {
  font-size: 8px;
  color: var(--t3);
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.pc-v {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  text-shadow: 0 0 10px rgba(0, 180, 255, 0.2);
}

.pc-v.elec {
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 176, 32, 0.2);
}

.pc-u {
  font-size: 8px;
  color: var(--t3);
  font-weight: 400;
}

.sep {
  height: 1px;
  background: var(--border);
  margin: 7px 0;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg1);
  border: 1px solid var(--green);
  border-radius: 10px;
  padding: 12px 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--green);
  font-weight: 700;
  box-shadow: var(--shadow2), var(--glow-blue);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: var(--z-toast, 999);
}

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

/* ============================================
   GLOSSARY TOOLTIPS
   ============================================ */
.gloss {
  border-bottom: 1px dashed rgba(100, 160, 255, 0.4);
  cursor: help;
  position: relative;
  color: var(--blue);
  font-weight: 600;
}

.gloss:hover .gloss-tip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.gloss-tip {
  visibility: hidden;
  opacity: 0;
  transform: translateY(4px);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  min-width: 200px;
  max-width: 280px;
  margin-left: -100px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1.5px solid rgba(100, 160, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--t2);
  line-height: 1.5;
  z-index: var(--z-tooltip, 1000);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.gloss-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--bg2);
}

/* ============================================
   DATA TABLE
   ============================================ */
.dtc {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.dt {
  width: 100%;
  border-collapse: collapse;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
}

.dt th {
  background: var(--bg2);
  color: var(--blue);
  padding: 7px;
  text-align: center;
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.dt td {
  padding: 6px;
  text-align: center;
  border-bottom: 1px solid rgba(100, 160, 255, 0.06);
  color: var(--t2);
}

.dt tr:hover td {
  background: rgba(0, 180, 255, 0.04);
  color: var(--t1);
}

.dt .hl td {
  color: var(--red);
  font-weight: 700;
  background: var(--red-lt);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg0);
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 160, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 160, 255, 0.25);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 160, 255, 0.15) var(--bg0);
}

/* ============================================
   INTERACTIVE CURSOR
   ============================================ */
.cursor-info {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #e0e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  pointer-events: none;
  z-index: var(--z-tooltip, 100);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cursor-crosshair {
  cursor: crosshair !important;
}

/* ============================================
   15MV NOTE
   ============================================ */
.mv-note {
  font-size: 9px;
  color: #6b7d93;
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid #3b82f6;
  padding: 6px 8px;
  margin: 8px 0;
  line-height: 1.5;
  font-family: 'IBM Plex Mono', monospace;
}

/* Electron profile depth note */
.eprof-depth-note {
  font-size: 9px;
  color: #b45309;
  background: rgba(180, 83, 9, 0.08);
  border-left: 3px solid #b45309;
  padding: 6px 8px;
  margin: 8px 0;
  line-height: 1.5;
  font-family: 'IBM Plex Mono', monospace;
}

/* ============================================
   AUTH BADGE
   ============================================ */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.auth-badge-student {
  color: var(--blue, #00b4ff);
  background: rgba(0, 180, 255, 0.08);
  border-color: rgba(0, 180, 255, 0.2);
}

.auth-badge-teacher {
  color: var(--amber, #f59e0b);
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
}

/* ============================================
   ABOUT BUTTON
   ============================================ */
.about-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(100, 160, 255, 0.12));
  background: transparent;
  color: var(--t2, #a0b0c8);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.about-btn:hover {
  background: rgba(0, 180, 255, 0.08);
  border-color: var(--blue, #00b4ff);
  color: var(--blue, #00b4ff);
  transform: scale(1.1);
}

/* ============================================
   LOGOUT BUTTON
   ============================================ */
.logout-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.06);
  color: #ef4444;
  font-size: 14px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.05);
}

.logout-btn.show {
  display: flex;
}

/* ============================================
   PASSWORD PROGRESS BAR
   ============================================ */
.pw-progress {
  width: 100%;
  height: 3px;
  background: var(--bg3, #1a2540);
  border-radius: 9999px;
  overflow: hidden;
  margin: 10px 0;
}

.pw-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue, #00b4ff), var(--cyan, #00e5cc));
  border-radius: 9999px;
  animation: pwProgressAnim 1.5s ease-in-out infinite;
}

@keyframes pwProgressAnim {
  0% { width: 0%; }
  50% { width: 80%; }
  100% { width: 0%; }
}

/* ============================================
   ABOUT MODAL ENHANCEMENTS
   ============================================ */
.about-box {
  max-width: 420px;
  text-align: center;
}

/* ============================================
   COMPARISON MODE SELECT
   ============================================ */
.cmp-mode {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.cmp-mode select {
  background: var(--bg2, #141c30);
  border: 1px solid var(--border, rgba(100, 160, 255, 0.12));
  color: var(--t1, #e8ecf4);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}

.cmp-mode select:focus {
  border-color: var(--blue, #00b4ff);
  box-shadow: 0 0 0 2px rgba(0, 180, 255, 0.15);
}

/* ============================================
   TRS TYPE SELECT
   ============================================ */
.trs-type {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.trs-type select,
.trs-xe select,
.trs-xf select,
.trs-ee select,
.trs-ea select {
  background: var(--bg2, #141c30);
  border: 1px solid var(--border, rgba(100, 160, 255, 0.12));
  color: var(--t1, #e8ecf4);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}

.trs-type select:focus,
.trs-xe select:focus,
.trs-xf select:focus,
.trs-ee select:focus,
.trs-ea select:focus {
  border-color: var(--blue, #00b4ff);
  box-shadow: 0 0 0 2px rgba(0, 180, 255, 0.15);
}

/* TRS sub-sections */
.trs-xe, .trs-xf, .trs-ee, .trs-ea {
  margin-top: 6px;
}

/* TP Score styling */
.tp-score {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--t2, #a0b0c8);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg2, #141c30);
  border-radius: 8px;
  border: 1px solid var(--border, rgba(100, 160, 255, 0.12));
}

.tp-score-val {
  font-weight: 700;
  font-size: 16px;
  color: var(--blue, #00b4ff);
}

.tp-score-val.excellent { color: var(--green, #10b981); }
.tp-score-val.good { color: var(--cyan, #00e5cc); }
.tp-score-val.needs-work { color: var(--amber, #f59e0b); }
.tp-score-val.poor { color: var(--red, #ef4444); }
