/* =====================================================
   ARTHQUAKE ADMIN PORTAL
   ===================================================== */

/* =====================================================
   FONTS
   ===================================================== */

@import url("https://fonts.googleapis.com/css2?family=Lilita+One&family=Outfit:wght@400;500;600;700;800;900&family=Nunito+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap");

/* =====================================================
   COLORS & TOKENS
   ===================================================== */

:root {
  /* ARthquake brand colors */
  --moss-rock-green: #272e21;
  --sidebar-bg: var(--moss-rock-green);
  --green: #7b8e56;
  --green-hover: #697a48;
  --green-light: rgba(123, 142, 86, 0.12);
  --light-green: #afc967;
  --coral: #d48365;
  --brown: #9a714d;
  --dark: #2f3328;

  /* Neutral colors */
  --background: #f8f8f5;
  --white: #ffffff;
  --text: #2f3328;
  --muted-text: #73776d;
  --border: #e5e7df;
  --border-light: #f0f0ed;

  /* Status colors - Crisp solid contrast */
  --status-completed-bg: #059669;
  --status-completed-text: #ffffff;
  --status-progress-bg: #d97706;
  --status-progress-text: #ffffff;

  /* Typography tokens */
  --font-heading: "Outfit", "Lilita One", sans-serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* =====================================================
   RESET
   ===================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Nunito Sans", sans-serif;

  background: var(--background);

  color: var(--text);
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */

.login-container {
  min-height: 100vh;

  display: flex;

  justify-content: center;

  align-items: center;

  background: var(--background);
}

.login-card {
  width: 380px;

  background: var(--white);

  padding: 40px;

  border-radius: 18px;

  border: 1px solid var(--border);

  box-shadow: 0 8px 30px rgba(47, 51, 40, 0.08);
}

.login-card h1 {
  text-align: center;

  margin-bottom: 5px;

  font-family: "Lilita One", cursive;

  font-size: 34px;

  font-weight: 400;

  color: var(--green);
}

.subtitle {
  text-align: center;

  color: var(--muted-text);

  margin-bottom: 24px;

  font-size: 14px;
}

.admin-login-logo {
  display: block;
  max-width: 130px;
  height: auto;
  margin: 0 auto 14px auto;
  object-fit: contain;
}

.login-error {
  background: #fdf2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
  text-align: center;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.login-footer .back-link {
  color: var(--muted-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.login-footer .back-link:hover {
  color: var(--green);
}

.login-card label {
  display: block;

  margin-top: 15px;

  margin-bottom: 6px;

  font-size: 14px;

  font-weight: 700;
}

.login-card input {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid var(--border);

  border-radius: 10px;

  font-family: "Nunito Sans", sans-serif;

  font-size: 14px;

  outline: none;
}

.login-card input:focus {
  border-color: var(--green);
}

.login-card button {
  width: 100%;

  padding: 12px;

  margin-top: 25px;

  border: none;

  border-radius: 10px;

  cursor: pointer;

  font-family: "Nunito Sans", sans-serif;

  font-size: 15px;

  font-weight: 800;

  background: var(--green);

  color: var(--white);

  transition: 0.2s ease;
}

.login-card button:hover {
  background: #687a48;
}

/* =====================================================
   MAIN ADMIN LAYOUT
   ===================================================== */

.admin-layout {
  min-height: 100vh;
  display: flex;
  background: var(--background);
  color: var(--text);
}

/* =====================================================
   SIDEBAR
   ===================================================== */

.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* SIDEBAR BRAND */
.sidebar-logo {
  padding: 6px 12px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 22px;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.sidebar-brand-img,
.admin-logo {
  width: 100%;
  max-width: 175px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
  transition: transform 0.2s ease;
}

.sidebar-logo a:hover .sidebar-brand-img,
.sidebar-logo a:hover .admin-logo {
  transform: scale(1.03);
}

.admin-logo {
  width: 140px;
  height: auto;
  object-fit: contain;
}

/* NAVIGATION */
.nav-section-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.6);
  padding: 0 12px;
  margin-bottom: 8px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 11px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.nav-item.active {
  background: #ffffff;
  color: var(--sidebar-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

.nav-item.active svg {
  color: var(--sidebar-bg);
}

.nav-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
}

/* SIDEBAR BOTTOM */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-bottom .nav-item {
  font-size: 13px;
}

.sidebar-bottom .nav-item.external-link {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-bottom .nav-item.external-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-bottom .nav-item.logout-link {
  color: #fee2e2;
}

.sidebar-bottom .nav-item.logout-link:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
}

/* =====================================================
   MAIN CONTENT AREA
   ===================================================== */

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  overflow-y: auto;
}

/* TOPBAR */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 18px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 3px 0;
  letter-spacing: -0.4px;
}

.topbar-left p {
  font-size: 13px;
  color: var(--muted-text);
  margin: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-profile-wrap {
  position: relative;
}

.topbar-profile-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.15s ease;
  user-select: none;
}

.topbar-profile-btn:hover {
  background: #f8f8f5;
  border-color: var(--border);
}

.topbar-profile-btn:focus-visible {
  outline: none;
  border-color: var(--moss-rock-green);
  box-shadow: 0 0 0 2px rgba(39, 46, 33, 0.12);
}

.topbar-meta {
  text-align: right;
}

.topbar-user {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.topbar-date {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted-text);
  font-weight: 600;
  margin-top: 1px;
}

.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.topbar-chevron {
  width: 14px;
  height: 14px;
  color: var(--muted-text);
  transition: transform 0.2s ease, color 0.15s ease;
  flex-shrink: 0;
}

.topbar-profile-btn:hover .topbar-chevron,
.topbar-profile-btn[aria-expanded="true"] .topbar-chevron {
  color: var(--text);
}

.topbar-profile-btn[aria-expanded="true"] .topbar-chevron {
  transform: rotate(180deg);
}

/* FLOATING DROPDOWN */
.profile-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 250px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  z-index: 100;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.profile-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: #fcfcfa;
}

.dropdown-user-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  line-height: 1.2;
}

.dropdown-user-email {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
  margin-top: 2px;
}

.dropdown-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(39, 46, 33, 0.08);
  color: var(--moss-rock-green);
  margin-top: 6px;
  letter-spacing: 0.03em;
}

.dropdown-items {
  padding: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.dropdown-item svg {
  width: 15px;
  height: 15px;
  color: var(--muted-text);
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.dropdown-item:hover {
  background: #f8f8f5;
  color: var(--moss-rock-green);
}

.dropdown-item:hover svg {
  color: var(--moss-rock-green);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.dropdown-item.danger {
  color: #dc2626;
}

.dropdown-item.danger svg {
  color: #ef4444;
}

.dropdown-item.danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.dropdown-item.danger:hover svg {
  color: #dc2626;
}

/* DASHBOARD BODY */
.dashboard-body {
  padding: 28px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =====================================================
   STATISTICS GRID
   ===================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(47, 51, 40, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 126px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 51, 40, 0.06);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted-text);
  display: block;
  margin-bottom: 4px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  font-feature-settings: "tnum";
}

/* UNIFIED NEUTRAL/BRAND ICON WRAPPER - NO MULTI-COLOR TILES */
.stat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.stat-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--muted-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-footer strong {
  color: var(--green);
}

.stat-progress-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #eceee7;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-emerald {
  background: #059669;
}

.progress-green {
  background: var(--green);
}

.progress-brown {
  background: var(--brown);
}

/* =====================================================
   2-COLUMN DASHBOARD GRID
   ===================================================== */

.dashboard-grid-2col {
  display: grid;
  grid-template-columns: 1.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.dashboard-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(47, 51, 40, 0.04);
  overflow: hidden;
}

.card-header-flex {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 2px 0;
}

.card-header-desc {
  font-size: 12px;
  color: var(--muted-text);
  margin: 0;
}

.btn-header-action {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-header-action:hover {
  background: var(--background);
  border-color: #d8dad2;
}

/* GENERAL SECTION (BACKWARD COMPATIBILITY) */
.dashboard-section {
  background: var(--white);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.section-header a {
  text-decoration: none;
  color: var(--green);
  font-weight: 700;
}

/* =====================================================
   TABLE STYLES
   ===================================================== */

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  font-size: 11px;
  color: var(--muted-text);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fbfbf9;
}

td {
  font-size: 13px;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: #fcfcfa;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.avatar-completed {
  background: #d1fae5;
  color: #065f46;
}

.avatar-progress {
  background: #fef3c7;
  color: #92400e;
}

.student-cell-meta {
  display: flex;
  flex-direction: column;
}

.student-cell-name {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
}

.student-cell-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
}

.stage-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid transparent;
}

.chip-active {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}

.chip-idle {
  background: #f3f4f0;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.points-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  font-feature-settings: "tnum";
}

/* =====================================================
   CRISP SOLID STATUS BADGES
   ===================================================== */

.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status.completed {
  background: var(--status-completed-bg);
  color: var(--status-completed-text);
}

.status.progress {
  background: var(--status-progress-bg);
  color: var(--status-progress-text);
}

/* CLEAN ACTION BUTTON - NO TRAILING ARROWS */
.btn-action-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--green-light);
  color: var(--green);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  transition: all 0.15s ease;
}

.btn-action-view:hover {
  background: var(--green);
  color: #ffffff;
}

/* SIDEBAR RIGHT STACK (FUNNEL & EXPORT) */
.sidebar-right-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.funnel-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.funnel-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.funnel-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.funnel-val {
  font-family: var(--font-mono);
  font-weight: 700;
}

.funnel-desc {
  font-size: 11px;
  color: var(--muted-text);
}

/* EXPORT CSV UTILITY BOX */
.export-card {
  background: var(--dark);
  color: #ffffff;
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.export-header {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.export-header svg {
  width: 17px;
  height: 17px;
  color: var(--light-green);
}

.export-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  margin: 0;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: background 0.2s ease;
  width: 100%;
  border: none;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
}

.export-btn:hover {
  background: var(--green-hover);
}

/* =====================================================
   STUDENTS PAGE
   ===================================================== */

.student-controls {
  display: flex;

  gap: 12px;

  margin-bottom: 22px;
}

.student-controls input,
.student-controls select {
  padding: 12px 14px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: var(--white);

  font-family: "Nunito Sans", sans-serif;

  font-size: 14px;

  color: var(--text);

  outline: none;
}

.student-controls input {
  width: 300px;
}

.student-controls select {
  min-width: 160px;
}

.student-controls input:focus,
.student-controls select:focus {
  border-color: var(--green);
}

/* =====================================================
   STUDENT DETAILS
   ===================================================== */

.back-button {
  display: inline-block;

  margin-bottom: 25px;

  text-decoration: none;

  color: var(--green);

  font-size: 14px;

  font-weight: 700;
}

.back-button:hover {
  text-decoration: underline;
}

/* =====================================================
   STUDENT PROFILE
   ===================================================== */

.student-profile {
  display: flex;

  align-items: center;

  gap: 20px;

  background: var(--white);

  padding: 25px;

  border-radius: 16px;

  border: 1px solid var(--border);

  margin-bottom: 20px;
}

.student-profile h1 {
  margin: 0 0 5px;

  font-family: "Lilita One", cursive;

  font-size: 28px;

  font-weight: 400;
}

.student-profile p {
  margin: 3px 0;

  color: var(--muted-text);

  font-size: 14px;
}

.student-avatar {
  width: 70px;

  height: 70px;

  border-radius: 50%;

  display: flex;

  align-items: center;

  justify-content: center;

  background: var(--light-green);

  color: var(--text);

  font-size: 20px;

  font-weight: 800;
}

/* =====================================================
   STUDENT OVERVIEW
   ===================================================== */

.student-overview {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;

  margin-bottom: 25px;
}

.detail-card {
  background: var(--white);

  padding: 25px;

  border-radius: 16px;

  border: 1px solid var(--border);
}

.detail-card span {
  display: block;

  color: var(--muted-text);

  font-size: 13px;

  font-weight: 700;

  margin-bottom: 10px;
}

.detail-card strong {
  font-family: "Lilita One", cursive;

  font-size: 27px;

  font-weight: 400;

  color: var(--text);
}

.completed-text {
  font-family: "Nunito Sans", sans-serif !important;

  font-size: 18px !important;

  color: var(--green) !important;
}

/* =====================================================
   PROGRESS SECTIONS
   ===================================================== */

.progress-section {
  background: var(--white);

  padding: 25px;

  border-radius: 16px;

  border: 1px solid var(--border);

  margin-bottom: 20px;
}

.progress-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 15px;
}

.progress-header h2 {
  margin: 0 0 5px;

  font-size: 18px;

  font-weight: 800;
}

.progress-header p {
  margin: 0;

  color: var(--muted-text);

  font-size: 14px;
}

.progress-header strong {
  font-family: "Lilita One", cursive;

  font-size: 24px;

  font-weight: 400;

  color: var(--green);
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */

.progress-bar {
  width: 100%;

  height: 10px;

  background: #eceee7;

  border-radius: 999px;

  overflow: hidden;
}

.progress-fill {
  height: 100%;

  background: var(--green);

  border-radius: 999px;
}

/* =====================================================
   STAGE RESULTS
   ===================================================== */

.stage-result {
  margin-top: 15px;

  color: var(--muted-text);
}

.stage-result p {
  margin: 0;
}

.result-summary {
  margin-top: 15px;

  color: var(--muted-text);

  font-size: 14px;
}

/* =====================================================
   STAGE ITEMS
   ===================================================== */

.items-list {
  margin-top: 20px;

  display: flex;

  flex-direction: column;

  gap: 10px;
}

.item {
  display: flex;

  align-items: center;

  gap: 12px;

  padding: 12px 15px;

  border-radius: 10px;

  font-size: 14px;
}

.item span:nth-child(2) {
  flex: 1;

  font-weight: 600;
}

.item small {
  color: var(--muted-text);

  font-weight: 700;
}

/* CORRECT */

.item.correct {
  background: #eef6e6;
}

/* INCORRECT */

.item.incorrect {
  background: #fff0ec;
}

/* =====================================================
   RESULTS PAGE
   ===================================================== */

.results-controls {
  display: flex;

  gap: 12px;

  margin-bottom: 25px;
}

.results-controls input,
.results-controls select {
  padding: 12px 14px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: var(--white);

  font-family: "Nunito Sans", sans-serif;

  font-size: 14px;

  color: var(--text);

  outline: none;
}

.results-controls input {
  width: 300px;
}

.results-controls select {
  min-width: 160px;
}

.results-controls input:focus,
.results-controls select:focus {
  border-color: var(--green);
}

/* RESULTS TABLE */

#resultsTable th {
  white-space: nowrap;
}

#resultsTable td {
  white-space: nowrap;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1100px) {
  .dashboard-grid-2col {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-body {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    padding: 16px;
  }

  .sidebar-logo {
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 13px;
  }

  .sidebar-bottom {
    margin-top: 14px;
    padding-top: 14px;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .topbar {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-body {
    padding: 18px 16px;
    gap: 20px;
  }

  .main-content {
    padding: 0;
  }

  .student-overview {
    grid-template-columns: 1fr;
  }

  .student-controls {
    flex-direction: column;
  }

  .student-controls input {
    width: 100%;
  }

  .results-controls {
    flex-direction: column;
  }

  .results-controls input {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .card-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .student-profile {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-header {
    align-items: flex-start;
    gap: 15px;
  }
}
.admin-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

/* =====================================================
   STUDENT DIRECTORY REVAMP COMPONENTS
   ===================================================== */

/* Top Summary KPI Grid */
.student-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.student-kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.student-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.student-kpi-lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-text);
}

.student-kpi-val {
  font-size: 26px;
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.15;
  margin: 4px 0 2px 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.student-kpi-val .unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-text);
  font-family: var(--font-body);
}

.student-kpi-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-text);
}

.student-kpi-sub.emerald {
  color: #059669;
}

.student-kpi-sub.amber {
  color: #d97706;
}

.student-kpi-sub.brand {
  color: var(--green);
}

/* Main Students Card Container */
.student-main-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-bottom: 30px;
}

.student-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--white);
}

/* Segmented Pill Tabs */
.student-segmented-tabs {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: #f0f1ec;
  border: 1px solid var(--border);
  border-radius: 12px;
  gap: 4px;
}

.student-tab-pill {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.student-tab-pill:hover {
  color: var(--text);
}

.student-tab-pill.active {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.student-tab-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.06);
  font-weight: 700;
  color: var(--muted-text);
  line-height: 1.2;
}

.student-tab-pill.active .student-tab-badge {
  background: #f0f1ec;
  color: var(--text);
}

/* Quick Action: Export Roster CSV */
.btn-export-roster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9px;
  background: var(--moss-rock-green);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-export-roster:hover {
  background: #1c2217;
  color: var(--white);
  transform: translateY(-1px);
}

.btn-export-roster svg {
  width: 14px;
  height: 14px;
  color: var(--light-green);
  flex-shrink: 0;
}

/* Tab Content Visibility */
.student-tab-content {
  display: none;
}

.student-tab-content.active-tab {
  display: block;
}

/* Search & Filter Toolbar */
.student-filter-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  background: #fcfcfa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.student-filter-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted-text);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: all 0.15s ease;
}

.search-input-wrap input:focus {
  border-color: var(--moss-rock-green);
  box-shadow: 0 0 0 2px rgba(39, 46, 33, 0.08);
}

.filter-select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-select:focus {
  border-color: var(--moss-rock-green);
  box-shadow: 0 0 0 2px rgba(39, 46, 33, 0.08);
}

.filter-count-hint {
  font-size: 12px;
  color: var(--muted-text);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Data Table Architecture */
.student-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.student-table thead tr {
  background: #f8f8f5;
  border-bottom: 1px solid var(--border);
}

.student-table th {
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-text);
}

.student-table th.text-right {
  text-align: right;
}

.student-table th.text-center {
  text-align: center;
}

.student-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text);
  font-size: 13px;
}

.student-table td.text-right {
  text-align: right;
}

.student-table td.text-center {
  text-align: center;
}

.student-table tbody tr {
  transition: background 0.12s ease;
}

.student-table tbody tr:hover {
  background: #fcfcfa;
}

.student-table tbody tr:last-child td {
  border-bottom: none;
}

.student-table-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted-text);
  font-size: 13px;
}

/* Student Identity & Avatar */
.student-ident {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.student-avatar.emerald {
  background: #d1fae5;
  color: #065f46;
}

.student-avatar.amber {
  background: #fef3c7;
  color: #92400e;
}

.student-ident-name {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.student-ident-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
  margin-top: 1px;
}

.mono-col {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-text);
}

.points-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Stage Breakdown Score Chips */
.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  min-width: 52px;
  font-variant-numeric: tabular-nums;
}

.score-chip.complete {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.score-chip.partial {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.score-chip.zero {
  background: #f4f4f2;
  color: #73776d;
  border-color: #e5e7df;
}

/* Pagination / View All Footer */
.student-pagination-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
  background: var(--white);
}

.btn-view-all {
  padding: 7px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
}

.btn-view-all:hover {
  background: #f4f4f0;
  border-color: #cbd0c0;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .student-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .student-kpi-grid {
    grid-template-columns: 1fr;
  }
  .student-card-header {
    flex-direction: column;
    align-items: stretch;
  }
  .student-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .student-filter-left {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input-wrap {
    max-width: none;
  }
}

/* =====================================================
   ADMIN PROFILE PAGE STYLES
   ===================================================== */

.profile-layout-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left Sidebar Profile Summary Card */
.profile-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar-lg {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--moss-rock-green);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #f0f1ec;
  box-shadow: 0 4px 12px rgba(39, 46, 33, 0.15);
  margin-bottom: 14px;
  flex-shrink: 0;
}

.profile-name-lg {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}

.profile-handle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-text);
  margin-top: 3px;
}

.profile-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: #059669;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 12px;
}

.profile-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.profile-divider {
  width: 100%;
  height: 1px;
  background: var(--border-light);
  margin: 20px 0;
}

.profile-meta-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.profile-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.profile-meta-lbl {
  font-weight: 700;
  color: var(--muted-text);
}

.profile-meta-val {
  font-weight: 700;
  color: var(--text);
}

.profile-meta-val.mono {
  font-family: var(--font-mono);
}

/* Security recommendation callout */
.profile-security-callout {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.profile-security-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.profile-security-title svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.profile-security-desc {
  font-size: 12px;
  color: var(--muted-text);
  line-height: 1.5;
}

/* Right Content Column Cards */
.profile-content-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.profile-form-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #fcfcfa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-form-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.profile-form-sub {
  font-size: 12px;
  color: var(--muted-text);
  margin-top: 2px;
}

.profile-form-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-text);
}

.profile-form-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-input-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.profile-input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: all 0.15s ease;
}

.profile-input.mono {
  font-family: var(--font-mono);
}

.profile-input:focus {
  border-color: var(--moss-rock-green);
  box-shadow: 0 0 0 2px rgba(39, 46, 33, 0.08);
}

.profile-input:disabled {
  background: #f4f4f0;
  color: var(--muted-text);
  cursor: not-allowed;
  border-color: var(--border);
}

.profile-input-hint {
  font-size: 11px;
  color: var(--muted-text);
  margin-top: 2px;
  line-height: 1.4;
}

.profile-form-footer {
  padding: 16px 24px;
  background: #fcfcfa;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-profile-save {
  padding: 9px 24px;
  border-radius: 9px;
  background: var(--moss-rock-green);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-profile-save:hover {
  background: #1c2217;
  transform: translateY(-1px);
}

.btn-profile-cancel {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-profile-cancel:hover {
  background: #f4f4f0;
}

/* Profile Alert Banners */
.profile-alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.profile-alert.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.profile-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.profile-alert-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-alert-left svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.profile-alert-close {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 900;
  color: inherit;
  cursor: pointer;
  padding: 0 4px;
}

/* Responsive Profile Queries */
@media (max-width: 992px) {
  .profile-layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-form-row {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   STAGE 2 QUESTIONNAIRE STYLES
   ===================================================== */

/* Summary Metric Cards */
.quiz-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.quiz-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.quiz-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-stat-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-text);
}

.quiz-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(39, 46, 33, 0.08);
  color: var(--moss-rock-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-stat-icon svg {
  width: 17px;
  height: 17px;
}

.quiz-stat-val {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.1;
}

.quiz-stat-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-text);
  margin-top: 6px;
}

.quiz-stat-sub.active {
  color: #059669;
}

/* Controls & Toolbar */
.quiz-toolbar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.quiz-tabs {
  display: inline-flex;
  align-items: center;
  background: #f4f5f0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.quiz-tab-btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quiz-tab-btn:hover {
  color: var(--text);
}

.quiz-tab-btn.active {
  background: var(--white);
  color: var(--moss-rock-green);
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.quiz-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.quiz-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.quiz-search-wrap svg {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--muted-text);
  pointer-events: none;
}

.quiz-search-input {
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  outline: none;
  width: 240px;
  transition: all 0.15s ease;
}

.quiz-search-input:focus {
  border-color: var(--moss-rock-green);
  box-shadow: 0 0 0 2px rgba(39, 46, 33, 0.08);
}

.btn-new-quiz {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 8px;
  background: var(--moss-rock-green);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-new-quiz:hover {
  background: #1c2217;
  transform: translateY(-1px);
}

.btn-new-quiz svg {
  width: 14px;
  height: 14px;
}

/* Question List & Cards */
.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quiz-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease;
}

.quiz-card:hover {
  border-color: rgba(39, 46, 33, 0.35);
}

.quiz-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.quiz-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quiz-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-key-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--moss-rock-green);
  color: var(--white);
}

.quiz-cat-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(39, 46, 33, 0.09);
  color: var(--moss-rock-green);
}

.quiz-cat-pill.bag {
  background: #fef3c7;
  color: #92400e;
}

.quiz-emotion-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
  padding: 2px 8px;
  border-radius: 5px;
  background: #f3f4f6;
  color: #374151;
}

.quiz-emotion-pill.safe,
.quiz-emotion-pill.happy {
  background: #ecfdf5;
  color: #065f46;
}

.quiz-emotion-pill.danger,
.quiz-emotion-pill.sad {
  background: #fef2f2;
  color: #991b1b;
}

.quiz-emotion-pill.warning,
.quiz-emotion-pill.shock,
.quiz-emotion-pill.fear {
  background: #fffbeb;
  color: #92400e;
}

.quiz-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
}

.quiz-status-pill.inactive {
  background: #fef2f2;
  color: #991b1b;
}

.quiz-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
}

.quiz-status-pill.inactive .quiz-status-dot {
  background: #dc2626;
}

.quiz-prompt-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
}

.quiz-prompt-body {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.55;
  margin-top: 2px;
}

.quiz-prompt-hint {
  font-size: 11px;
  color: var(--muted-text);
  font-style: italic;
  margin-top: 2px;
}

.quiz-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-quiz-action {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-quiz-action:hover {
  background: #f8f8f5;
  border-color: #d1d5db;
}

.btn-quiz-action.danger {
  color: #dc2626;
}

.btn-quiz-action.danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.btn-quiz-action svg {
  width: 14px;
  height: 14px;
}

/* Options & Answers Section */
.quiz-options-section {
  padding-top: 16px;
}

.quiz-options-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
  margin-bottom: 10px;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quiz-opt-item {
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fcfcfa;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #4b5563;
}

.quiz-opt-item.correct {
  border: 2px solid #059669;
  background: #ecfdf5;
  color: #064e3b;
  font-weight: 700;
}

.quiz-opt-letter {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #e5e7eb;
  color: #374151;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quiz-opt-item.correct .quiz-opt-letter {
  background: #059669;
  color: #ffffff;
}

.quiz-opt-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #059669;
  color: #ffffff;
  flex-shrink: 0;
}

/* Go Bag Item Target */
.quiz-bag-target-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.quiz-bag-target-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 9px;
  border: 2px solid #059669;
  background: #ecfdf5;
}

.quiz-bag-target-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #059669;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
}

.quiz-bag-target-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #065f46;
}

.quiz-bag-target-val {
  font-size: 13px;
  font-weight: 800;
  color: #064e3b;
}

/* Feedback Box */
.quiz-feedback-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 9px;
  background: #f9faf6;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
}

.quiz-feedback-box svg {
  width: 16px;
  height: 16px;
  color: #059669;
  flex-shrink: 0;
  margin-top: 2px;
}

.quiz-feedback-box strong {
  color: var(--text);
}

/* Questionnaire Modals */
.quiz-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 10, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.quiz-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.quiz-modal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-modal-overlay.show .quiz-modal-card {
  transform: translateY(0) scale(1);
}

.quiz-modal-header {
  padding: 18px 24px;
  background: #fcfcfa;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-modal-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
}

.quiz-modal-sub {
  font-size: 12px;
  color: var(--muted-text);
  margin-top: 2px;
}

.quiz-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--muted-text);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.quiz-modal-close:hover {
  color: var(--text);
  background: #f3f4f6;
}

.quiz-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-modal-footer {
  padding: 16px 24px;
  background: #fcfcfa;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-modal-cancel {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-cancel:hover {
  background: #f4f4f0;
}

.btn-modal-save {
  padding: 9px 24px;
  border-radius: 9px;
  background: var(--moss-rock-green);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-save:hover {
  background: #1c2217;
}

.btn-modal-delete {
  padding: 9px 24px;
  border-radius: 9px;
  background: #dc2626;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-delete:hover {
  background: #b91c1c;
}

/* Responsive Rules for Questionnaire */
@media (max-width: 1024px) {
  .quiz-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .quiz-options-grid {
    grid-template-columns: 1fr;
  }
  .quiz-card-header {
    flex-direction: column;
    align-items: stretch;
  }
  .quiz-card-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .quiz-stats-grid {
    grid-template-columns: 1fr;
  }
  .quiz-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .quiz-search-input {
    width: 100%;
  }
  .quiz-actions-group {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-new-quiz {
    justify-content: center;
  }
}

/* =====================================================
   STAGE 3 SCENARIO MANAGEMENT PORTAL
   ===================================================== */

.scenario-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(47, 51, 40, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scenario-card:hover {
  border-color: var(--light-green);
  box-shadow: 0 6px 18px rgba(47, 51, 40, 0.08);
}

.scenario-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scenario-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scenario-order-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 8px;
}

.scenario-title-text {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

/* Direction Badges - Crisp High Contrast */
.scenario-direction-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scenario-direction-badge.safe {
  background: #059669;
  color: #ffffff;
}

.scenario-direction-badge.unsafe {
  background: #dc2626;
  color: #ffffff;
}

/* Narrative & Action Boxes */
.scenario-narrative-box {
  background: #fafaf8;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.scenario-narrative-box .narrative-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-text);
  margin-bottom: 2px;
  display: block;
}

.scenario-action-highlight {
  background: #fdfbf7;
  border: 1.5px solid rgba(123, 142, 86, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #2f3328;
}

.scenario-action-highlight.unsafe-border {
  border-color: rgba(220, 38, 38, 0.25);
  background: #fefcfc;
}

.scenario-action-highlight .action-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 4px;
}

.scenario-action-highlight .action-tag.safe-tag {
  background: rgba(5, 150, 105, 0.12);
  color: #065f46;
}

.scenario-action-highlight .action-tag.unsafe-tag {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.scenario-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
}

.scenario-meta-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Direction Radio Selector in Add/Edit Modal */
.direction-toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.direction-radio-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--white);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.direction-radio-card:hover {
  border-color: #cbd5e1;
}

.direction-radio-card.selected-safe {
  border-color: #059669;
  background: #f0fdf4;
}

.direction-radio-card.selected-unsafe {
  border-color: #dc2626;
  background: #fef2f2;
}

.direction-radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.direction-indicator-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: inline-block;
  flex-shrink: 0;
}

.direction-radio-card.selected-safe .direction-indicator-dot {
  border-color: #059669;
  background: #059669;
}

.direction-radio-card.selected-unsafe .direction-indicator-dot {
  border-color: #dc2626;
  background: #dc2626;
}

/* Live Card Preview in Modal */
.scenario-modal-split {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.scenario-preview-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #272018;
  border-radius: 20px;
  padding: 20px 16px;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.3);
}

.preview-badge-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 245, 225, 0.7);
  margin-bottom: 12px;
}

.preview-mobile-card {
  width: 100%;
  max-width: 290px;
  min-height: 380px;
  border-radius: 28px;
  background: linear-gradient(180deg, #faf4e6 0%, #ecd8a8 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.7);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

@media (max-width: 900px) {
  .scenario-modal-split {
    grid-template-columns: 1fr;
  }
  .scenario-preview-sidebar {
    order: -1;
  }
}

/* Feedback Rationale Grid */
.scenario-feedback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .scenario-feedback-grid {
    grid-template-columns: 1fr;
  }
}

.scenario-feedback-box {
  border-radius: 10px;
  padding: 10px 14px;
}

.scenario-feedback-box.correct {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.scenario-feedback-box.incorrect {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.scenario-feedback-box .feedback-title {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.scenario-feedback-box.correct .feedback-title {
  color: #166534;
}

.scenario-feedback-box.incorrect .feedback-title {
  color: #991b1b;
}

/* Quiz / Scenario Empty State */
.quiz-empty-state {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
}

.quiz-empty-state h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.quiz-empty-state p {
  font-size: 13px;
  color: var(--muted-text);
  margin-top: 4px;
}

/* Preview Mobile Card Elements */
.preview-badge-pill {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d5438;
  background: rgba(109, 84, 56, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  margin: 0 auto;
}

.preview-scenario-box {
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px solid rgba(134, 111, 77, 0.16);
  text-align: center;
}

.preview-scenario-box .box-label {
  display: block;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c7352;
  margin-bottom: 2px;
}

.preview-scenario-box p {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #4a3625;
  margin: 0;
}

.preview-action-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid rgba(109, 132, 67, 0.38);
  border-radius: 16px;
  padding: 12px 10px;
  box-shadow: 0 6px 14px rgba(62, 38, 24, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s ease;
}

.preview-action-box.unsafe {
  border-color: rgba(220, 38, 38, 0.35);
}

.preview-action-tag {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c7637;
  background: rgba(92, 118, 55, 0.14);
  padding: 2px 8px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.preview-action-tag.unsafe {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.14);
}

.preview-action-text {
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 900;
  color: #3e2618;
}

.preview-direction-hint {
  font-size: 11px;
  font-weight: 800;
  color: #6d5438;
  margin-top: 8px;
}




