/* =========================================================================
   WBASS Design System
   Concept: an academic "seal & ledger" aesthetic — deep archive-navy paired
   with a muted diploma gold, a serif display face for headings (the seal),
   and a quiet sans body face (the ledger). Status pills read like wax
   seals; report stats read like a ring engraved into the page.
   ========================================================================= */

:root {
  /* --- Palette -------------------------------------------------------- */
  --ink-900: #0a1a2f;
  --ink-800: #0f2440;
  --ink-700: #163050;
  --ink-600: #1f3d5c;
  --gold-600: #b8862c;
  --gold-500: #cf9c3f;
  --gold-100: #f4e6c8;
  --sage-600: #3f6b52;
  --sage-100: #e2efe6;
  --rose-600: #9c3b3b;
  --rose-100: #f6e3e3;
  --amber-600: #a06a1f;
  --amber-100: #f6ecd8;

  --paper: #f6f4ee;
  --paper-raised: #ffffff;
  --paper-line: #e4ded0;
  --ink-text: #16233b;
  --ink-muted: #5b6b85;

  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --surface-border: rgba(255, 255, 255, 0.55);
  --sidebar-glass: rgba(10, 31, 61, 0.92);

  --shadow-soft: 0 10px 30px rgba(15, 42, 82, 0.10);
  --shadow-lift: 0 18px 44px rgba(15, 42, 82, 0.16);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-school: 'Times New Roman', Times, 'Liberation Serif', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  color-scheme: light;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(184, 134, 44, 0.10), transparent 60%),
    var(--paper);
  color: var(--ink-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

::selection {
  background: var(--gold-100);
  color: var(--ink-900);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- App shell ----------------------------------------------------------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background:
    linear-gradient(180deg, var(--ink-900) 0%, var(--ink-700) 100%);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
  z-index: 100;
}

.sidebar-seal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 18px;
}

.sidebar-seal .mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(207, 156, 63, 0.25);
  flex-shrink: 0;
}

.sidebar-seal .mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-seal .brand-text {
  line-height: 1.15;
}

.sidebar-seal .brand-text strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.2px;
}

.sidebar-seal .brand-text span {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.school-name {
  font-family: var(--font-school);
}

.sidebar-role {
  margin: 0 8px 20px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-role .name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.sidebar-role .role-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-100);
  font-weight: 600;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  padding: 12px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.78);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(207, 156, 63, 0.22), rgba(207, 156, 63, 0.04));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold-500);
}

.nav-link.active i {
  color: var(--gold-500);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link.logout {
  color: var(--rose-100);
}

.nav-link.logout i {
  color: #e08787;
}

.nav-link.logout:hover {
  background: rgba(156, 59, 59, 0.18);
}

/* --- Main column ---------------------------------------------------------- */

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 34px;
  gap: 20px;
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--paper-line);
}

.topbar-title h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  color: var(--ink-text);
}

.topbar-title p {
  color: var(--ink-muted);
  font-size: 13.5px;
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}


.content {
  padding: 28px 34px 60px;
}

/* --- Cards / glass surfaces ------------------------------------------------ */

.panel {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.panel-solid {
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--paper-line);
  gap: 14px;
  flex-wrap: wrap;
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 600;
}

.panel-header p {
  color: var(--ink-muted);
  font-size: 13px;
  margin-top: 2px;
}

.panel-body {
  padding: 22px 24px;
}

/* --- Bento stat grid -------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(207, 156, 63, 0.08), transparent 55%);
  pointer-events: none;
}

.stat-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 14px;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.stat-card .label {
  color: var(--ink-muted);
  font-size: 13px;
  margin-top: 6px;
}

.tone-gold .icon {
  background: var(--gold-100);
  color: var(--gold-600);
}

.tone-sage .icon {
  background: var(--sage-100);
  color: var(--sage-600);
}

.tone-rose .icon {
  background: var(--rose-100);
  color: var(--rose-600);
}

.tone-amber .icon {
  background: var(--amber-100);
  color: var(--amber-600);
}

.tone-ink .icon {
  background: rgba(15, 42, 82, 0.08);
  color: var(--ink-700);
}

/* --- Seal ring (report stats signature element) ---------------------------- */

.seal-ring {
  --ring-size: 132px;
  width: var(--ring-size);
  height: var(--ring-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--gold-500) calc(var(--pct, 0) * 1%), var(--paper-line) 0);
  position: relative;
  flex-shrink: 0;
}

.seal-ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--paper-raised);
  box-shadow: inset 0 0 0 1px var(--paper-line);
}

.seal-ring .ring-inner {
  position: relative;
  text-align: center;
}

.seal-ring .ring-inner strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
}

.seal-ring .ring-inner span {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* --- Tables --------------------------------------------------------------- */

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

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--paper-line);
  white-space: nowrap;
}

table.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--paper-line);
  vertical-align: middle;
}

table.data-table tbody tr:last-child td {
  border-bottom: none;
}

table.data-table tbody tr:hover {
  background: rgba(184, 134, 44, 0.05);
}

.cell-title {
  font-weight: 600;
}

.cell-sub {
  color: var(--ink-muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* --- Pills / seals ---------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill-gold {
  background: var(--gold-100);
  color: var(--gold-600);
}

.pill-sage {
  background: var(--sage-100);
  color: var(--sage-600);
}

.pill-rose {
  background: var(--rose-100);
  color: var(--rose-600);
}

.pill-amber {
  background: var(--amber-100);
  color: var(--amber-600);
}

.pill-ink {
  background: rgba(15, 42, 82, 0.08);
  color: var(--ink-700);
}

/* --- Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--ink-700), var(--ink-900));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #21170a;
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background: transparent;
  border-color: var(--paper-line);
  color: var(--ink-text);
}

.btn-outline:hover {
  border-color: var(--ink-600);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
}

.btn-ghost:hover {
  color: var(--ink-text);
}

.btn-danger {
  background: linear-gradient(135deg, #b24747, var(--rose-600));
  color: #fff;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12.5px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- Forms ------------------------------------------------------------------ */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-text);
}

.field .hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 5px;
}

.input,
select.input,
textarea.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--paper-line);
  background: var(--paper-raised);
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
select.input:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(207, 156, 63, 0.18);
}

textarea.input {
  resize: vertical;
  min-height: 90px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 18px;
}

.file-drop {
  border: 1.5px dashed var(--paper-line);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop:hover {
  border-color: var(--gold-500);
  background: rgba(207, 156, 63, 0.05);
}

/* --- Alerts / toasts ---------------------------------------------------------- */

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--sage-100);
  color: var(--sage-600);
  border-color: rgba(63, 107, 82, 0.25);
}

.alert-error {
  background: var(--rose-100);
  color: var(--rose-600);
  border-color: rgba(156, 59, 59, 0.25);
}

/* --- Modal -------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.5);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--paper-raised);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--paper-line);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--paper-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
}

.modal-body {
  padding: 22px 24px;
}

.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--paper-line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- Empty state --------------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--ink-muted);
}

.empty-state i {
  font-size: 30px;
  color: var(--paper-line);
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

/* --- Activity feed --------------------------------------------------------------- */

.feed-item {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--paper-line);
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-500);
  margin-top: 6px;
  flex-shrink: 0;
}

.feed-text {
  font-size: 13.5px;
}

.feed-time {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* --- Bar chart (pure CSS, used in Reports) ---------------------------------------- */

.bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 160px;
  padding-top: 10px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 8px;
}

.bar-col .bar {
  width: 100%;
  max-width: 34px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
  min-height: 4px;
}

.bar-col .bar-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
}

.bar-col .bar-value {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-text);
}

/* --- Login page ------------------------------------------------------------------- */

@keyframes loginFadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginSealPop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }

  70% {
    transform: scale(1.08);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes loginTagFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-28px) scale(1.06);
  }
}

@keyframes bgPan {
  0% {
    background-position: center center;
  }

  50% {
    background-position: center 52%;
  }

  100% {
    background-position: center center;
  }
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: url('images/ilinkcst.jpg') no-repeat center center / cover;
}

.login-shell::before {
  display: none;
}

.login-shell .login-crest-bg {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  right: -80px;
  bottom: -80px;
  width: 520px;
  height: 520px;
}

@media (max-width: 640px) {
  .login-shell .login-crest-bg {
    display: none;
  }
}

.login-campus-tag {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  animation: loginTagFade 0.8s ease 0.9s both;
  text-transform: uppercase;
  text-align: center;
  width: 92%;
  max-width: 420px;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
  animation: orbFloat 7s ease-in-out infinite;
}

.login-orb:nth-child(2) {
  animation-delay: -2.5s;
}

.login-orb:nth-child(3) {
  animation-delay: -4.5s;
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 22px;
  padding: 64px 34px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  animation: loginFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.login-seal {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 22px;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px rgba(207, 156, 63, 0.18);
  animation: loginSealPop 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.login-seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-card h1 {
  font-family: var(--font-display);
  text-align: center;
  color: #000;
  font-size: 30px;
  font-weight: 600;
}

.login-card p.sub {
  text-align: center;
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  margin-top: 8px;
  margin-bottom: 30px;
}

.login-card .field label {
  color: rgba(0, 0, 0, 0.85);
}

.login-card .input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.18);
  color: #000;
}

.login-card .input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.login-card .input:focus {
  box-shadow: 0 0 0 3px rgba(207, 156, 63, 0.25);
}

.login-card .btn-gold {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
}

.login-campus-tag-inline {
  text-align: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 11px;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.04em;
}

.login-demo {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.login-demo p {
  color: rgba(0, 0, 0, 0.5);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.login-demo .demo-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.65);
  padding: 3px 0;
}

.login-demo .demo-row b {
  color: #000;
  font-weight: 600;
}

/* --- Forgot Password Wizard & OTP ------------------------------------------- */

.forgot-link {
  font-size: 12px;
  color: #000000;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.forgot-link:hover {
  color: #222222;
  text-decoration: underline;
}

.forgot-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}

.forgot-step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.4);
  letter-spacing: 0.02em;
}

.forgot-step-item.active {
  color: var(--ink-900);
}

.forgot-step-item.completed {
  color: var(--sage-600);
}

.forgot-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: inherit;
}

.forgot-step-item.active .forgot-step-num {
  background: var(--gold-500);
  color: #21170a;
  box-shadow: 0 0 0 2px rgba(207, 156, 63, 0.35);
}

.forgot-step-item.completed .forgot-step-num {
  background: var(--sage-100);
  color: var(--sage-600);
}

.forgot-step-divider {
  width: 16px;
  height: 2px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 1px;
}

.otp-input-wrap {
  position: relative;
  margin: 14px 0 6px;
}

.otp-input {
  font-family: 'Consolas', 'Courier New', monospace !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: 12px !important;
  text-align: center !important;
  padding: 12px 14px !important;
  background: rgba(255, 255, 255, 0.6) !important;
  border: 2px solid rgba(0, 0, 0, 0.18) !important;
  border-radius: var(--radius-md) !important;
  color: var(--ink-900) !important;
  transition: all 0.2s ease !important;
}

.otp-input:focus {
  border-color: var(--gold-500) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(207, 156, 63, 0.25) !important;
}

.otp-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 42, 82, 0.06);
  border: 1px solid rgba(15, 42, 82, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
}

.otp-timer-badge.urgent {
  background: var(--rose-100);
  border-color: rgba(156, 59, 59, 0.25);
  color: var(--rose-600);
}

.back-to-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
  margin-top: 14px;
  transition: color 0.15s ease;
}

.back-to-login:hover {
  color: var(--ink-900);
}

/* --- Utility ------------------------------------------------------------------- */

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.text-muted {
  color: var(--ink-muted);
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

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

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ink-700), var(--ink-900));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--paper-line);
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 20px;
}

.tab-link {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

.tab-link.active {
  background: var(--paper-raised);
  color: var(--ink-text);
  box-shadow: var(--shadow-soft);
}

.mobile-toggle {
  display: none;
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

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

  .main {
    margin-left: 0;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--paper-line);
    background: var(--paper-raised);
    cursor: pointer;
  }

  .topbar {
    padding: 16px 18px;
  }

  .content {
    padding: 18px 18px 50px;
  }

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

/* =========================================================================
   Notification bell
   ========================================================================= */

.notif-wrap {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--rose-600);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  z-index: 9999;
  overflow: hidden;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--paper-line);
  font-weight: 600;
  font-size: 13px;
}

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--paper-line);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--ink-text);
}

.notif-item:hover {
  background: rgba(196, 154, 40, 0.06);
}

.notif-item.unread {
  background: rgba(196, 154, 40, 0.08);
}

.notif-item.unread .notif-dot {
  background: var(--gold-600);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-msg {
  font-size: 12px;
  line-height: 1.45;
}

.notif-time {
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
}

.notif-empty i {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

/* =========================================================================
   Calendar page tweaks
   ========================================================================= */
.fc-scroller {
  scrollbar-width: thin;
}

/* =========================================================================
   Availability badge on panelist select options
   ========================================================================= */
.panelist-option-blocked {
  color: var(--rose-600);
}

/* =========================================================================
   Workload bar (reports)
   ========================================================================= */
.workload-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workload-bar-track {
  flex: 1;
  height: 8px;
  background: var(--paper-line);
  border-radius: 99px;
  overflow: hidden;
}

.workload-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gold-600);
  transition: width 0.6s ease;
}

.workload-bar-fill.overload {
  background: var(--rose-600);
}

/* =========================================================================
   Checkbox list (panelist picker)
   ========================================================================= */

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.checkbox-item:hover {
  background: rgba(196, 154, 40, 0.08);
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-600);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.checkbox-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-text);
}

.checkbox-item:has(input:checked) {
  background: rgba(196, 154, 40, 0.12);
}

.checkbox-item:has(input:checked) .checkbox-name {
  color: var(--gold-600);
}

/* =========================================================================
   Notification bell — circle container
   ========================================================================= */

.notif-bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  background: var(--surface) !important;
  border: 1px solid var(--paper-line) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative;
}

.notif-bell-btn:hover {
  background: var(--surface-strong) !important;
  border-color: var(--gold-600) !important;
  box-shadow: 0 0 0 3px rgba(196, 154, 40, 0.15);
}

.notif-bell-btn i {
  font-size: 15px;
  color: var(--ink-text);
}

/* =========================================================================
   System-wide loading overlay (replaces reliance on the browser tab spinner)
   ========================================================================= */

#wbassLoader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: color-mix(in srgb, var(--ink-900) 78%, transparent);
  backdrop-filter: blur(4px);
}

#wbassLoader.show {
  display: flex;
}

#wbassLoader .wbass-spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(207, 156, 63, 0.22);
  border-top-color: var(--gold-500);
  animation: wbassSpin 0.75s linear infinite;
}

#wbassLoader .wbass-loader-msg {
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 260px;
}

@keyframes wbassSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Inline (in-panel) loading state, e.g. inside the appointment side panel */
.inline-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.inline-loading .wbass-spinner-sm {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(184, 134, 44, 0.25);
  border-top-color: var(--gold-600);
  animation: wbassSpin 0.7s linear infinite;
}

/* Button "busy" state used while a form submits */
.btn.is-busy {
  opacity: 0.75;
  pointer-events: none;
}

.btn.is-busy .fa-solid,
.btn.is-busy .fa-regular {
  visibility: hidden;
  position: relative;
}

.btn.is-busy::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: wbassSpin 0.6s linear infinite;
}

.btn.is-busy {
  position: relative;
  color: transparent !important;
}

.btn.is-busy::after {
  left: 50%;
  top: 50%;
  margin: -8px 0 0 -8px;
}

/* =========================================================================
   Appointment side panel — quick-view without leaving the current page
   ========================================================================= */

#apptSidePanel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 420px;
  max-width: 92vw;
  background: var(--paper-raised);
  border-left: 1px solid var(--paper-line);
  box-shadow: -18px 0 44px rgba(15, 42, 82, 0.18);
  z-index: 9000;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

#apptSidePanel.open {
  transform: translateX(0);
}

#apptSidePanelBackdrop {
  position: fixed;
  inset: 0;
  z-index: 8999;
  background: rgba(10, 20, 40, 0.42);
  display: none;
}

#apptSidePanelBackdrop.show {
  display: block;
}

.appt-panel-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--paper-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.appt-panel-head h3 {
  font-family: var(--font-display);
  font-size: 17px;
}

.appt-panel-head p {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.appt-panel-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.appt-panel-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--paper-line);
  font-size: 13px;
}

.appt-panel-row:last-child {
  border-bottom: none;
}

.appt-panel-row .k {
  color: var(--ink-muted);
  font-weight: 500;
}

.appt-panel-row .v {
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

.appt-panel-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 18px 0 8px;
}

.appt-panel-section-title:first-child {
  margin-top: 0;
}

.appt-open-btn {
  cursor: pointer;
}

/* Review / comment thread (panel member document review) */
.review-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--paper-line);
  background: var(--paper);
}

.review-item.is-approved {
  border-left: 3px solid var(--sage-600);
}

.review-item.is-revision {
  border-left: 3px solid var(--rose-600);
}

.review-item .review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.review-item .review-name {
  font-weight: 600;
  font-size: 13px;
}

.review-item .review-time {
  font-size: 11px;
  color: var(--ink-muted);
}

.review-item .review-comment {
  font-size: 13px;
  color: var(--ink-text);
  line-height: 1.5;
  white-space: pre-line;
}

/* Department chips */
.dept-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(184, 134, 44, 0.14);
  color: var(--gold-600);
  margin: 2px 3px 2px 0;
  letter-spacing: 0.02em;
}

.dept-chip-list {
  display: flex;
  flex-wrap: wrap;
}

/* =========================================================================
   Responsive data tables (JS adds data-label to <td> from <thead>; see app.js)
   ========================================================================= */

@media (max-width: 760px) {
  table.data-table.is-responsive-cards {
    border: none;
  }

  table.data-table.is-responsive-cards thead {
    display: none;
  }

  table.data-table.is-responsive-cards,
  table.data-table.is-responsive-cards tbody,
  table.data-table.is-responsive-cards tr,
  table.data-table.is-responsive-cards td {
    display: block;
    width: 100%;
  }

  table.data-table.is-responsive-cards tr {
    margin-bottom: 14px;
    border: 1px solid var(--paper-line);
    border-radius: var(--radius-md);
    padding: 6px 4px;
    background: var(--paper-raised);
    box-shadow: var(--shadow-soft);
  }

  table.data-table.is-responsive-cards tbody tr:last-child {
    margin-bottom: 0;
  }

  table.data-table.is-responsive-cards td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px dashed var(--paper-line);
    text-align: right;
  }

  table.data-table.is-responsive-cards td:last-child {
    border-bottom: none;
  }

  table.data-table.is-responsive-cards td::before {
    content: attr(data-label);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    font-weight: 700;
    text-align: left;
    flex-shrink: 0;
    padding-top: 1px;
  }

  table.data-table.is-responsive-cards td:empty::before {
    content: none;
  }

  table.data-table.is-responsive-cards td>* {
    margin-left: auto;
  }

  table.data-table.is-responsive-cards .cell-title,
  table.data-table.is-responsive-cards .cell-sub {
    text-align: right;
  }
}

/* =========================================================================
   Comprehensive responsive breakpoints — tablet / large phone / small phone
   ========================================================================= */

@media (max-width: 1180px) {
  .content {
    padding: 24px 24px 50px;
  }

  .bento {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
}

@media (max-width: 980px) {
  .grid-2[style*="300px"] {
    grid-template-columns: 1fr !important;
  }

  .grid-2[style*="1.3fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {

  html,
  body {
    overflow-x: clip;
  }

  .topbar {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 90;
    padding: 14px 16px;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(10, 26, 47, 0.06);
  }

  .topbar-title h1 {
    font-size: 20px;
  }

  .topbar-title p {
    font-size: 12px;
  }

  .content {
    padding: 16px 14px 44px;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 18px;
  }

  .stat-card {
    padding: 15px 14px;
    border-radius: var(--radius-md);
  }

  .stat-card .value {
    font-size: 23px;
  }

  .stat-card .label {
    font-size: 11.5px;
  }

  .stat-card .icon {
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    font-size: 13px;
  }

  .panel-header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .panel-header>div:last-child:not(:only-child) {
    width: 100%;
  }

  .panel-body {
    padding: 16px;
  }

  .panel-header h2 {
    font-size: 16.5px;
  }

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

  .modal-box {
    max-width: 96vw !important;
    width: 96vw !important;
    margin: 0 auto;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .btn {
    padding: 10px 15px;
    font-size: 13px;
  }

  .checkbox-list {
    max-height: 200px;
    overflow-y: auto;
  }

  #apptSidePanel {
    width: 100%;
    max-width: 100%;
  }

  .avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr !important;
  }

  .flex.gap-8,
  .flex.gap-12 {
    flex-wrap: wrap;
  }

  .notif-dropdown {
    position: fixed !important;
    top: 64px !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
  }

  .login-card {
    padding: 44px 22px;
    max-width: 94vw;
  }
}

@media (max-width: 480px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card .value {
    font-size: 20px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .notif-bell-btn {
    width: 36px;
    height: 36px;
  }

  table.data-table.is-responsive-cards td {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 3px;
  }

  table.data-table.is-responsive-cards td>* {
    margin-left: 0;
  }

  table.data-table.is-responsive-cards td::before {
    text-align: left;
  }

  .sidebar-seal .brand-text strong {
    font-size: 15px;
  }

  .login-card h1 {
    font-size: 25px;
  }

  .btn-sm {
    padding: 6px 11px;
    font-size: 12px;
  }

  .pill {
    font-size: 11px;
    padding: 4px 9px;
  }
}

/* Sidebar mobile backdrop */
.sidebar-backdrop {
  display: none;
}

@media (max-width: 980px) {
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.45);
    z-index: 99;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .sidebar {
    width: 264px;
    max-width: 84vw;
  }
}

/* --- Animated Burger Menu Button (Morphs to 'X') -------------------------- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  color: var(--ink-text);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  z-index: 101;
}

.mobile-toggle:hover {
  background: var(--paper);
  border-color: var(--gold-600);
}

.mobile-toggle .burger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--ink-text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, background-color 0.3s ease;
  transform-origin: center;
}

/* Active State: Morphs bars into an 'X' */
.mobile-toggle.active {
  background: var(--ink-900);
  border-color: var(--ink-900);
  box-shadow: 0 4px 12px rgba(10, 26, 47, 0.2);
}

.mobile-toggle.active .burger-bar {
  background-color: var(--gold-500);
}

.mobile-toggle.active .burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active .burger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active .burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

/* --- Sidebar close button (mobile only) ----------------------------------- */
.sidebar-close-btn {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(207, 156, 63, 0.22);
  color: var(--gold-500);
  border-color: rgba(207, 156, 63, 0.4);
}

@media (max-width: 980px) {
  .sidebar-close-btn {
    display: flex;
  }
}