:root {
  --brand-blue: #051EDD;
  --brand-red: #FF0000;
  --brand-white: #FFFFFF;

  --bg-soft: #eef2ff;
  --bg-dark: #0b1020;
  --text-dark: #111827;
  --text-muted: #6b7280;
  --border-soft: rgba(255, 255, 255, 0.18);
  --success: #0f9d58;
  --danger: #d93025;

  --shadow: 0 18px 45px rgba(5, 30, 221, 0.14);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* RESET */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--bg-soft);
  color: var(--text-dark);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
   AUTH / LOGIN PAGE
========================= */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(5, 30, 221, 0.38), transparent 28%),
    radial-gradient(circle at 80% 75%, rgba(255, 0, 0, 0.28), transparent 25%),
    linear-gradient(135deg, #050c2f 0%, #16052b 45%, #25050f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.auth-shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.auth-left {
  color: #fff;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  margin-bottom: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-title {
  font-size: 3.2rem;
  line-height: 1.02;
  margin: 0 0 16px;
  font-weight: 800;
}

.brand-text {
  font-size: 1.06rem;
  line-height: 1.8;
  max-width: 560px;
  opacity: 0.92;
  margin: 0;
}

.brand-colors {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.color-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.12);
}

.color-chip.blue {
  background: var(--brand-blue);
}

.color-chip.red {
  background: var(--brand-red);
}

.color-chip.white {
  background: var(--brand-white);
}

.auth-card {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.2);
  padding: 36px;
  width: 100%;
  max-width: 500px;
  justify-self: end;
  color: #fff;
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 2.3rem;
  font-weight: 800;
}

.muted {
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0;
  margin-bottom: 0;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 26px 0 20px;
}

.role-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 14px;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.22s ease;
}

.role-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.role-btn.active {
  background: linear-gradient(135deg, #1733ff, #051edd);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(5, 30, 221, 0.35);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 4px;
  color: #fff;
}

.auth-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
  transition: all 0.22s ease;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.auth-form input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
  margin-bottom: 0;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  user-select: none;
  opacity: 0.9;
}

.primary-btn {
  background: linear-gradient(135deg, #ff1212, #ff4d4d);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.22s ease;
  box-shadow: 0 14px 30px rgba(255, 0, 0, 0.22);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(255, 0, 0, 0.3);
}

.primary-btn-2 {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.22s ease;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.22);
}

.primary-btn-2:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 211, 102, 0.3);
}

.primary-btn-2 img {
  height: 20px;
  display: inline-block;
}

.form-message {
  margin-top: 16px;
  min-height: 24px;
  font-weight: 700;
}

.form-message.error {
  color: #FF0000;
}

.form-message.success {
  color: #000044;
}

/* =========================
   APP LAYOUT / DASHBOARDS
========================= */
.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background:
    radial-gradient(circle at top left, rgba(5, 30, 221, 0.06), transparent 28%),
    linear-gradient(180deg, #f7f9ff 0%, #eef2ff 100%);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(5, 30, 221, 0.97), rgba(12, 20, 88, 0.98));
  color: var(--brand-white);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  min-height: 100vh;
  box-shadow: 8px 0 26px rgba(5, 30, 221, 0.18);
}

.sidebar h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.55rem;
  line-height: 1.2;
  text-align: center;
}

.sidebar .nav-btn,
.sidebar .logout-btn {
  width: 100%;
  display: block;
  margin: 10px 0;
  padding: 13px 14px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand-white);
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.sidebar .nav-btn:hover,
.sidebar .logout-btn:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.16);
}

.sidebar .logout-btn {
  background: linear-gradient(135deg, #ff1a1a, #e10000);
}

.main-content {
  padding: 24px;
}

.topbar {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.topbar p {
  margin: 0;
  color: var(--text-muted);
}

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

.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--brand-blue);
}

.card p {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf0fb;
  text-align: left;
  vertical-align: top;
}

table th {
  color: var(--brand-blue);
  background: #f8f9ff;
  font-size: 0.94rem;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-online,
.status-ready,
.status-passed {
  background: rgba(15, 157, 88, 0.12);
  color: var(--success);
}

.status-offline,
.status-pending {
  background: rgba(217, 48, 37, 0.1);
  color: var(--danger);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.section-title {
  margin: 0 0 12px;
  color: var(--brand-blue);
}

.field-row {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.field-row label {
  font-weight: 700;
}

.field-row input,
.field-row select,
.field-row textarea {
  width: 100%;
  border: 1px solid #d8def2;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  background: #fff;
}

.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(5, 30, 221, 0.08);
}

.secondary-btn {
  background: linear-gradient(135deg, #1733ff, #051edd);
  color: var(--brand-white);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(5, 30, 221, 0.2);
}

.danger-btn {
  background: linear-gradient(135deg, #ff1c1c, #d90000);
  color: var(--brand-white);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.link-btn {
  display: inline-block;
  background: linear-gradient(135deg, #1733ff, #051edd);
  color: var(--brand-white);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  margin: 6px 8px 0 0;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-card {
    justify-self: stretch;
    max-width: none;
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }

  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }
}

@media (max-width: 700px) {
  .auth-page {
    padding: 16px;
  }

  .auth-left,
  .auth-card {
    padding: 24px;
  }

  .brand-title {
    font-size: 2.35rem;
  }

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

  .main-content {
    padding: 14px;
  }

  .topbar,
  .card {
    padding: 16px;
  }
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#questionOptionsWrap .card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#questionOptionsWrap .card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(5, 30, 221, 0.08);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.exam-option-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.exam-option-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(5, 30, 221, 0.08);
}

.exam-media-image {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  border: 1px solid #dbe2ff;
  background: #fff;
  box-shadow: 0 10px 24px rgba(5, 30, 221, 0.08);
}

/* ===== MODERN TOGGLE SWITCH ===== */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}

.toggle-label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

/* Switch container */
.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
}

/* Hide default checkbox */
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 1px solid rgba(5,30,221,0.2);
  transition: 0.3s;
}

/* Circle knob */
.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ON state */
.toggle-switch input:checked + .slider {
  background: linear-gradient(135deg, #051EDD, #FF0000);
  box-shadow: 0 0 12px rgba(5,30,221,0.4);
}

/* Move knob */
.toggle-switch input:checked + .slider::before {
  transform: translateX(24px);
}

/* ===== CUSTOM FILE UPLOAD ===== */

.upload-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;

  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(5,30,221,0.2);

  transition: all 0.25s ease;
}

.upload-btn:hover {
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: #fff;
  box-shadow: 0 0 12px rgba(5,30,221,0.3);
}

.upload-icon {
  font-size: 16px;
}

.file-name {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

/* =========================
   MOBILE RESPONSIVENESS UPGRADE
========================= */

html, body {
  overflow-x: hidden;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
}

.main-content {
  min-width: 0;
}

.sidebar {
  min-width: 0;
}

.cards-grid,
.two-col {
  min-width: 0;
}

.card,
.topbar,
.auth-card,
.auth-left {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: 720px;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

.upload-field {
  flex-wrap: wrap;
}

.file-name {
  word-break: break-word;
}

/* Better button wrapping */
.secondary-btn,
.primary-btn,
.primary-btn-2,
.danger-btn,
.link-btn,
.nav-btn,
.logout-btn {
  white-space: normal;
}

/* Images should scale nicely */
.exam-media-image,
img {
  max-width: max-content;
  height: 7cm;
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    width: 100%;
    padding: 16px;
  }

  .main-content {
    padding: 16px;
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .auth-page {
    padding: 14px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
  }

  .auth-left,
  .auth-card {
    padding: 20px;
    border-radius: 18px;
  }

  .brand-title {
    font-size: 2rem;
    line-height: 1.15;
  }

  .brand-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 14px;
    border-radius: 0 0 18px 18px;
  }

  .sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
  }

  .sidebar .nav-btn,
  .sidebar .logout-btn,
  .link-btn {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
    text-align: center;
  }

  .main-content {
    padding: 12px;
  }

  .topbar {
    padding: 16px;
    border-radius: 16px;
  }

  .topbar h1 {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .topbar p {
    font-size: 0.92rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .section-title {
    font-size: 1.05rem;
  }

  .field-row {
    gap: 8px;
    margin-bottom: 10px;
  }

  .field-row input,
  .field-row select,
  .field-row textarea,
  .auth-form input {
    padding: 11px 12px;
    font-size: 15px;
  }

  .primary-btn,
  .primary-btn-2,
  .secondary-btn,
  .danger-btn {
    width: 100%;
    padding: 12px 14px;
  }

  .role-switch {
    grid-template-columns: 1fr;
  }

  .toggle-row {
    align-items: center;
    gap: 10px;
  }

  .upload-field {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .upload-btn {
    justify-content: center;
    width: 100%;
  }

  .file-name {
    font-size: 12px;
  }

  #questionOptionsWrap {
    gap: 10px !important;
  }

  #questionOptionsWrap .card,
  .exam-option-card {
    padding: 12px !important;
  }

  #examRunnerSection .cards-grid {
    grid-template-columns: 1fr !important;
  }

  #examRunnerSection .card,
  #examResultSection .card,
  #studentHomeSection .card,
  #studySection .card,
  #profileSection .card {
    width: 100%;
  }
}

/* =========================
   SMALL PHONES
========================= */
@media (max-width: 480px) {
  .auth-page,
  .main-content {
    padding: 10px;
  }

  .auth-left,
  .auth-card,
  .topbar,
  .card {
    padding: 14px;
  }

  .brand-title {
    font-size: 1.7rem;
  }

  .sidebar {
    padding: 12px;
  }

  .sidebar h2 {
    font-size: 1.05rem;
  }

  .topbar h1 {
    font-size: 1.2rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  .primary-btn,
  .primary-btn-2,
  .secondary-btn,
  .danger-btn,
  .link-btn {
    font-size: 14px;
  }

  .color-chip {
    width: 26px;
    height: 26px;
  }

  table {
    min-width: 640px;
  }
}

/* =========================
   MOBILE SIDEBAR / TOPBAR
========================= */

.mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  padding: 12px 14px;
  background: rgba(5, 30, 221, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1200;
  box-shadow: 0 10px 24px rgba(5, 30, 221, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-menu-btn {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-topbar-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.mobile-overlay {
  display: none;
}

@media (max-width: 768px) {
  .mobile-topbar {
    display: flex;
  }

  .mobile-overlay {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    height: calc(100vh - 68px);
    background: rgba(0, 0, 0, 0.45);
    z-index: 1090;
  }

  .mobile-overlay.show {
    display: block;
  }

  .page-shell {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    position: fixed !important;
    top: 68px;
    left: 0;
    width: min(82vw, 320px);
    height: calc(100vh - 68px);
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    border-radius: 0 0 18px 0;
    padding-top: 14px;
  }

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

  .main-content {
    padding-top: 74px;
  }
} 

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #051EDD #f3f5ff;
}

/* Chrome, Edge, Safari */
*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: #f3f5ff;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #051EDD, #000044);
  border-radius: 999px;
  border: 2px solid #f3f5ff;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #051EDD, #FF0000);
}

#adminOverviewSection,
#adminStudentSettingsSection,
#adminExamSettingsSection,
#adminQuestionBankSection,
#adminNotesUploadSection,
#adminActivityLogSection {
  scroll-margin-top: 95px;
}

#studentHomeSection,
#studySection,
#profileSection,
#examRunnerSection,
#examResultSection {
  scroll-margin-top: 95px;
}

/* ===== Toggle Switch (Modern Glass Style) ===== */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #000044;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border-radius: 20px;
  background: rgba(0, 0, 68, 0.15);
  backdrop-filter: blur(6px);
  transition: 0.3s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #000044;
  transition: 0.3s ease;
}

/* ACTIVE STATE */
.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #000044, #3a3aff);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: #ffffff;
}


/* ===== Change Password Page Upgrade ===== */

.modern-password-form {
  display: grid;
  gap: 18px;
}

.password-field-wrap {
  display: grid;
  gap: 8px;
}

.password-field-wrap label {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.96rem;
  letter-spacing: 0.2px;
}

.password-glass {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.password-glass:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 32px rgba(5, 30, 221, 0.18);
  transform: translateY(-1px);
}

.password-glass input {
  flex: 1;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  padding: 12px 4px;
  outline: none;
  box-shadow: none;
}

.password-glass input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.password-toggle-btn {
  border: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  color: #ffffff;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.password-toggle-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(255,255,255,0.24), rgba(255,255,255,0.12));
}

.password-toggle-btn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .password-glass {
    padding: 4px 6px 4px 12px;
    border-radius: 16px;
  }

  .password-glass input {
    font-size: 0.96rem;
    padding: 11px 2px;
  }

  .password-toggle-btn {
    padding: 9px 12px;
    font-size: 0.8rem;
  }
}

.auth-card {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-logo-wrap {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.brand-logo-preview {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
}

/* ===== TOUCH DESKTOP INPUT IMPROVEMENT ===== */
button,
a,
label,
input[type="button"],
input[type="submit"] {
  touch-action: manipulation;
}


/* =========================
   FLOATING FONT CONTROL
========================= */

.font-control {
  position: fixed;
  top: 90px;
  right: 16px;
  z-index: 2000;
  display: flex;
  gap: 6px;
}

.font-control button {
  background: linear-gradient(135deg, #051EDD, #1733ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(5, 30, 221, 0.25);
}

.font-control button:hover {
  transform: translateY(-1px);
}

/* Font scaling variable */
:root {
  --font-scale: 1;
}

/* Apply scaling ONLY to main content */
.main-content {
  font-size: calc(1rem * var(--font-scale));
}

.exam-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.exam-action-buttons .secondary-btn {
  margin: 0;
}

@media (max-width: 768px) {
  .exam-action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .exam-action-buttons .secondary-btn {
    width: 100%;
  }
}

.back-to-top-btn {
  position: fixed;
  right: 18px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #051EDD;
  color: #FFFFFF;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0.5;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.back-to-top-btn:hover {
  opacity: 0.85;
}