/* ================================================================
   ExamPilot AI — Design System v3  (Premium SaaS Edition)
   ================================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --ep-primary:          #6366f1;
  --ep-primary-dark:     #4f46e5;
  --ep-primary-darker:   #3730a3;
  --ep-primary-light:    #e0e7ff;
  --ep-primary-glow:     rgba(99,102,241,0.35);
  --ep-accent:           #06b6d4;
  --ep-accent-light:     #e0f7fa;

  --ep-success:  #10b981;
  --ep-warning:  #f59e0b;
  --ep-danger:   #ef4444;
  --ep-info:     #3b82f6;

  --ep-sidebar-bg:          #0d1117;
  --ep-sidebar-border:      rgba(255,255,255,0.07);
  --ep-sidebar-text:        #8b949e;
  --ep-sidebar-text-hover:  #e6edf3;
  --ep-sidebar-active-bg:   rgba(99,102,241,0.15);
  --ep-sidebar-active-text: #a5b4fc;
  --ep-sidebar-width:       260px;

  --ep-bg:        #f0f2f5;
  --ep-surface:   #ffffff;
  --ep-surface-2: #f8fafc;
  --ep-border:    #e2e8f0;
  --ep-border-light: #f1f5f9;

  --ep-text:        #0f172a;
  --ep-text-muted:  #64748b;
  --ep-text-light:  #94a3b8;

  --ep-shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --ep-shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --ep-shadow:     0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --ep-shadow-md:  0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --ep-shadow-lg:  0 20px 25px -5px rgba(0,0,0,0.10), 0 10px 10px -5px rgba(0,0,0,0.04);
  --ep-shadow-xl:  0 25px 50px -12px rgba(0,0,0,0.18);
  --ep-glow:       0 0 24px rgba(99,102,241,0.35);

  --ep-radius-sm: 8px;
  --ep-radius:    12px;
  --ep-radius-lg: 16px;
  --ep-radius-xl: 24px;
  --ep-radius-full: 9999px;

  --ep-transition:        200ms cubic-bezier(0.4, 0, 0.2, 1);
  --ep-transition-slow:   350ms cubic-bezier(0.4, 0, 0.2, 1);
  --ep-transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  background: var(--ep-bg);
  color: var(--ep-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: ep-page-in 0.35s ease both;
}

a { color: var(--ep-primary); text-decoration: none; }
a:hover { color: var(--ep-primary-dark); }

/* ── Page Fade-In ────────────────────────────────────────────── */
@keyframes ep-page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Layout ──────────────────────────────────────────────────── */
.ep-layout {
  min-height: 100vh;
  padding-top: 64px;
}

/* ── Top Navigation Bar ──────────────────────────────────────── */
.ep-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: var(--ep-sidebar-bg);
  border-bottom: 1px solid var(--ep-sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 300;
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

/* Brand (left) */
.ep-topnav-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  min-width: 150px;
}

.ep-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f0f6fc;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.ep-logo-text em {
  font-style: normal;
  color: var(--ep-primary);
}
.ep-logo-sub {
  font-size: 0.58rem;
  color: var(--ep-sidebar-text);
  letter-spacing: 0.06em;
  font-weight: 500;
  text-transform: uppercase;
}

/* Center trigger button */
.ep-topnav-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.22);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 1.2rem;
  border-radius: var(--ep-radius-full);
  cursor: pointer;
  letter-spacing: 0.025em;
  transition: background var(--ep-transition), border-color var(--ep-transition),
              color var(--ep-transition), box-shadow var(--ep-transition);
}
.ep-topnav-trigger:hover {
  background: rgba(99,102,241,0.18);
  border-color: rgba(129,140,248,0.42);
  color: #c7d2fe;
  box-shadow: 0 0 18px rgba(99,102,241,0.22);
}
.ep-topnav-trigger.open {
  background: rgba(99,102,241,0.22);
  border-color: rgba(129,140,248,0.55);
  color: #e0e7ff;
}

.ep-trigger-icon {
  font-size: 0.78rem;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.ep-topnav-trigger.open .ep-trigger-icon {
  transform: rotate(180deg);
}

/* User section (right) */
.ep-topnav-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 150px;
  justify-content: flex-end;
}

.ep-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ep-primary), var(--ep-primary-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.3);
}
.ep-topnav-user-info { display: flex; flex-direction: column; gap: 1px; }
.ep-user-name {
  font-size: 0.77rem;
  font-weight: 600;
  color: #e6edf3;
  white-space: nowrap;
  line-height: 1.2;
}
.ep-user-role-label {
  font-size: 0.6rem;
  color: var(--ep-sidebar-text);
  font-weight: 500;
}
.ep-logout-btn {
  background: none;
  border: none;
  color: var(--ep-sidebar-text);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ep-transition), background var(--ep-transition);
  flex-shrink: 0;
  font-size: 1rem;
}
.ep-logout-btn:hover {
  color: #fca5a5;
  background: rgba(239,68,68,0.12);
}

/* ── Nav Dropdown Panel — Glassmorphism ──────────────────────── */
.ep-nav-dropdown {
  position: fixed;
  top: 64px; left: 0; right: 0;
  z-index: 299;
  /* Glassmorphism panel */
  background: rgba(10, 13, 22, 0.86);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 24px 56px rgba(0,0,0,0.5),
              inset 0 1px 0 rgba(255,255,255,0.07),
              0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  /* Closed state */
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px) scale(0.98);
  transform-origin: top center;
  transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              opacity    0.22s ease,
              transform  0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ep-nav-dropdown.open {
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Real bounce jump animation for each nav item */
@keyframes ep-nav-item-bounce {
  0%   { opacity: 0; transform: translateY(-28px) scale(0.78); }
  55%  { opacity: 1; transform: translateY(7px)   scale(1.06); }
  72%  { transform: translateY(-4px) scale(0.97); }
  86%  { transform: translateY(2px)  scale(1.02); }
  100% { transform: translateY(0)    scale(1); }
}

.ep-nav-dropdown.open .ep-nav-item {
  animation: ep-nav-item-bounce 0.48s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Per-group stagger — all groups animate simultaneously ── */

/* Group 1 (Main) */
.ep-nav-dropdown.open .ep-nav-group:nth-child(1) .ep-nav-item:nth-child(2)  { animation-delay: 0.02s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(1) .ep-nav-item:nth-child(3)  { animation-delay: 0.06s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(1) .ep-nav-item:nth-child(4)  { animation-delay: 0.10s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(1) .ep-nav-item:nth-child(5)  { animation-delay: 0.14s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(1) .ep-nav-item:nth-child(6)  { animation-delay: 0.18s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(1) .ep-nav-item:nth-child(7)  { animation-delay: 0.22s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(1) .ep-nav-item:nth-child(8)  { animation-delay: 0.26s; }

/* Group 2 (IELTS) */
.ep-nav-dropdown.open .ep-nav-group:nth-child(2) .ep-nav-item:nth-child(2)  { animation-delay: 0.02s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(2) .ep-nav-item:nth-child(3)  { animation-delay: 0.06s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(2) .ep-nav-item:nth-child(4)  { animation-delay: 0.10s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(2) .ep-nav-item:nth-child(5)  { animation-delay: 0.14s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(2) .ep-nav-item:nth-child(6)  { animation-delay: 0.18s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(2) .ep-nav-item:nth-child(7)  { animation-delay: 0.22s; }

/* ── IELTS group icon colour ── */
.ep-ielts-group .ep-nav-item i { color: #7c3aed; }

/* Group 3 (TOEFL) */
.ep-nav-dropdown.open .ep-nav-group:nth-child(3) .ep-nav-item:nth-child(2)  { animation-delay: 0.02s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(3) .ep-nav-item:nth-child(3)  { animation-delay: 0.06s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(3) .ep-nav-item:nth-child(4)  { animation-delay: 0.10s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(3) .ep-nav-item:nth-child(5)  { animation-delay: 0.14s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(3) .ep-nav-item:nth-child(6)  { animation-delay: 0.18s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(3) .ep-nav-item:nth-child(7)  { animation-delay: 0.22s; }

/* Group 4 (PTE) */
.ep-nav-dropdown.open .ep-nav-group:nth-child(4) .ep-nav-item:nth-child(2)  { animation-delay: 0.02s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(4) .ep-nav-item:nth-child(3)  { animation-delay: 0.06s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(4) .ep-nav-item:nth-child(4)  { animation-delay: 0.10s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(4) .ep-nav-item:nth-child(5)  { animation-delay: 0.14s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(4) .ep-nav-item:nth-child(6)  { animation-delay: 0.18s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(4) .ep-nav-item:nth-child(7)  { animation-delay: 0.22s; }

/* Group 5 (Duolingo) */
.ep-nav-dropdown.open .ep-nav-group:nth-child(5) .ep-nav-item:nth-child(2)  { animation-delay: 0.02s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(5) .ep-nav-item:nth-child(3)  { animation-delay: 0.06s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(5) .ep-nav-item:nth-child(4)  { animation-delay: 0.10s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(5) .ep-nav-item:nth-child(5)  { animation-delay: 0.14s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(5) .ep-nav-item:nth-child(6)  { animation-delay: 0.18s; }
.ep-nav-dropdown.open .ep-nav-group:nth-child(5) .ep-nav-item:nth-child(7)  { animation-delay: 0.22s; }

.ep-nav-dropdown-inner {
  width: 100%;
  padding: 1.4rem 3rem;
  display: flex;
  gap: 0;
  align-items: flex-start;
  justify-content: space-between;
}

/* Each group takes proportional space */
.ep-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding: 0 1.25rem;
  position: relative;
}

/* Subtle divider between groups */
.ep-nav-group + .ep-nav-group::before {
  content: '';
  position: absolute;
  left: 0; top: 0.25rem; bottom: 0.25rem;
  width: 1px;
  background: rgba(255,255,255,0.07);
}


.ep-nav-section {
  font-size: 0.57rem;
  font-weight: 700;
  color: rgba(139,148,158,0.7);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0 0.625rem 0.5rem;
}

.ep-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--ep-radius-sm);
  color: #8b949e;
  text-decoration: none;
  font-size: 0.855rem;
  font-weight: 500;
  transition: background var(--ep-transition), color var(--ep-transition),
              transform var(--ep-transition), box-shadow var(--ep-transition);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: none;
}
.ep-nav-item i {
  font-size: 0.9rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
  transition: transform var(--ep-transition-spring);
}
.ep-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #e6edf3;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}
.ep-nav-item:hover i {
  transform: scale(1.18) rotate(-4deg);
}
.ep-nav-item.active {
  background: rgba(99,102,241,0.18);
  color: #a5b4fc;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.28),
              0 2px 10px rgba(99,102,241,0.18);
}
.ep-nav-item.active i { color: #818cf8; }
.ep-nav-item.disabled {
  opacity: 0.32;
  cursor: default;
  pointer-events: none;
}

/* Overlay — blur-only, no dark color */
.ep-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 298;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
body.nav-open .ep-overlay { display: block; }

/* ── Main Content ─────────────────────────────────────────────── */
.ep-main {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

/* ── Sub-topbar (breadcrumb / page title) ─────────────────────── */
.ep-topbar {
  background: var(--ep-surface);
  border-bottom: 1px solid var(--ep-border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 64px;
  z-index: 100;
  box-shadow: var(--ep-shadow-xs);
}

.ep-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ep-text);
}

.ep-topbar-crumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ep-text-muted);
}
.ep-topbar-crumb a {
  color: var(--ep-text-muted);
  text-decoration: none;
  transition: color var(--ep-transition);
}
.ep-topbar-crumb a:hover { color: var(--ep-primary); }
.ep-topbar-crumb strong { color: var(--ep-text); font-weight: 600; }

/* ── Content ──────────────────────────────────────────────────── */
.ep-content {
  padding: 2rem;
  flex: 1;
}

/* ── Hero Section ─────────────────────────────────────────────── */
.ep-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e3a5f 100%);
  border-radius: var(--ep-radius-lg);
  padding: 2.25rem 2.5rem;
  color: #fff;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}
.ep-hero::before {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  top: -120px; right: -80px;
  pointer-events: none;
}
.ep-hero::after {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
  bottom: -60px; right: 320px;
  pointer-events: none;
}

.ep-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.82);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--ep-radius-full);
  margin-bottom: 0.875rem;
  position: relative; z-index: 1;
  letter-spacing: 0.02em;
}

.ep-hero h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  position: relative; z-index: 1;
  line-height: 1.2;
}
.ep-hero p {
  opacity: 0.78;
  margin: 0;
  font-size: 0.9rem;
  position: relative; z-index: 1;
  line-height: 1.5;
}
.ep-hero em {
  font-style: normal;
  color: #a5b4fc;
}

/* ── Feature Cards ────────────────────────────────────────────── */
.ep-feature-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--ep-transition-spring), box-shadow var(--ep-transition-slow), border-color var(--ep-transition);
  animation: ep-card-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  overflow: hidden;
}
.ep-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ep-shadow-lg);
  border-color: rgba(99,102,241,0.15);
}

.ep-feature-card.ep-live {
  border-color: rgba(99,102,241,0.25);
}
.ep-feature-card.ep-live::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ep-primary), var(--ep-accent));
  border-radius: var(--ep-radius) var(--ep-radius) 0 0;
}

/* Staggered card animation delays */
.row > *:nth-child(1) .ep-feature-card { animation-delay: 0.05s; }
.row > *:nth-child(2) .ep-feature-card { animation-delay: 0.12s; }
.row > *:nth-child(3) .ep-feature-card { animation-delay: 0.19s; }
.row > *:nth-child(4) .ep-feature-card { animation-delay: 0.26s; }
.row > *:nth-child(5) .ep-feature-card { animation-delay: 0.33s; }
.row > *:nth-child(6) .ep-feature-card { animation-delay: 0.40s; }

@keyframes ep-card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.ep-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--ep-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  transition: transform var(--ep-transition-spring);
}
.ep-feature-card:hover .ep-feature-icon {
  transform: scale(1.1) rotate(-4deg);
}

.ep-feature-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--ep-text);
}
.ep-feature-card p {
  font-size: 0.82rem;
  color: var(--ep-text-muted);
  line-height: 1.6;
  margin-bottom: auto;
  padding-bottom: 0.875rem;
}

.ep-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--ep-radius-full);
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  margin-top: auto;
  width: fit-content;
}
.ep-badge-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ep-success);
  animation: ep-dot-pulse 2s ease-in-out infinite;
}

.ep-badge-soon {
  font-size: 0.72rem;
  color: var(--ep-text-light);
  font-style: italic;
  margin-top: auto;
  display: block;
}

/* ── Institute Banner (institute admin) ──────────────────────── */
.ep-inst-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: var(--ep-radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(129,140,248,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}
.ep-inst-banner-icon {
  width: 46px; height: 46px;
  background: rgba(165,180,252,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(165,180,252,0.2);
}
.ep-inst-banner-name {
  font-size: 1rem;
  font-weight: 700;
  color: #f0f6fc;
}
.ep-inst-banner-meta {
  font-size: 0.78rem;
  color: #a5b4fc;
  margin-top: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────── */

/* Primary */
.btn-ep-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--ep-radius-sm);
  padding: 0.5rem 1.25rem;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
  transition: transform var(--ep-transition), box-shadow var(--ep-transition), background var(--ep-transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-ep-primary::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.18);
  border-radius: inherit;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}
.btn-ep-primary:active::after {
  transform: translate(-50%, -50%) scale(2);
  opacity: 0;
}
.btn-ep-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(99,102,241,0.48);
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  color: #fff;
}
.btn-ep-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}
.btn-ep-primary:disabled,
.btn-ep-primary.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary */
.btn-ep-secondary {
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border);
  color: var(--ep-text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--ep-radius-sm);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: background var(--ep-transition), transform var(--ep-transition), color var(--ep-transition);
}
.btn-ep-secondary:hover {
  background: var(--ep-border);
  color: var(--ep-text);
  transform: translateY(-1px);
}

/* Outline */
.btn-ep-outline {
  background: transparent;
  border: 1.5px solid var(--ep-primary);
  color: var(--ep-primary);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--ep-radius-sm);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: background var(--ep-transition), color var(--ep-transition), transform var(--ep-transition), box-shadow var(--ep-transition);
}
.btn-ep-outline:hover {
  background: var(--ep-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* Danger */
.btn-ep-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--ep-radius-sm);
  padding: 0.5rem 1.25rem;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
  cursor: pointer;
  transition: transform var(--ep-transition), box-shadow var(--ep-transition);
}
.btn-ep-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(239,68,68,0.42);
  color: #fff;
}

/* Bootstrap btn overrides */
.btn.btn-light {
  background: var(--ep-surface-2);
  border-color: var(--ep-border);
  color: var(--ep-text-muted);
  font-weight: 500;
  border-radius: var(--ep-radius-sm);
  transition: background var(--ep-transition), color var(--ep-transition);
}
.btn.btn-light:hover {
  background: var(--ep-border);
  color: var(--ep-text);
}

/* ── Icon Action Buttons (tables) ────────────────────────────── */
.ep-action-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--ep-radius-sm);
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ep-text-muted);
  transition: background var(--ep-transition), border-color var(--ep-transition),
              color var(--ep-transition), transform var(--ep-transition);
}
.ep-action-btn:hover {
  background: var(--ep-surface-2);
  border-color: var(--ep-border);
  color: var(--ep-text);
  transform: translateY(-1px);
}
.ep-action-btn.edit:hover {
  color: var(--ep-primary);
  background: var(--ep-primary-light);
  border-color: rgba(99,102,241,0.25);
}
.ep-action-btn.toggle-active:hover {
  color: #d97706;
  background: #fef3c7;
  border-color: #fde68a;
}
.ep-action-btn.toggle-inactive:hover {
  color: #059669;
  background: #d1fae5;
  border-color: #a7f3d0;
}
.ep-action-btn.add-admin:hover {
  color: var(--ep-primary);
  background: var(--ep-primary-light);
  border-color: rgba(99,102,241,0.3);
}
/* Semantic action-button variants used by the shared test list (ep-test-list.js).
   The legacy .toggle-active / .toggle-inactive names were backwards (active
   hovered amber, inactive hovered green) — these read the way they act. */
.ep-action-btn.publish:hover {
  color: #059669;
  background: #d1fae5;
  border-color: #a7f3d0;
}
.ep-action-btn.warn:hover {
  color: #d97706;
  background: #fef3c7;
  border-color: #fde68a;
}
.ep-action-btn.danger { color: var(--ep-danger); }
.ep-action-btn.danger:hover {
  color: var(--ep-danger);
  background: #fee2e2;
  border-color: #fecaca;
}

/* ── Stats Row ────────────────────────────────────────────────── */
.ep-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ep-stat-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow-sm);
  padding: 1.125rem 1.375rem;
  display: flex;
  align-items: center;
  gap: 1.125rem;
  animation: ep-stat-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: box-shadow var(--ep-transition), transform var(--ep-transition);
}
.ep-stat-card:hover {
  box-shadow: var(--ep-shadow-md);
  transform: translateY(-2px);
}
.ep-stat-card:nth-child(2) { animation-delay: 0.08s; }
.ep-stat-card:nth-child(3) { animation-delay: 0.16s; }

@keyframes ep-stat-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.ep-stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--ep-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}
.ep-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ep-text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ep-stat-label {
  font-size: 0.73rem;
  color: var(--ep-text-muted);
  font-weight: 500;
  margin-top: 0.2rem;
}

/* ── Tables ───────────────────────────────────────────────────── */
.ep-table-wrap {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow-sm);
  overflow: hidden;
}
.ep-table-wrap .table { margin: 0; }

.ep-table-wrap .table thead th {
  background: var(--ep-surface-2);
  border-bottom: 1px solid var(--ep-border);
  color: var(--ep-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.875rem 1.25rem;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.ep-table-wrap .table tbody td {
  padding: 0.875rem 1.25rem;
  border-color: var(--ep-border-light);
  font-size: 0.875rem;
  vertical-align: middle;
}
.ep-table-wrap .table tbody tr {
  transition: background var(--ep-transition);
}
.ep-table-wrap .table tbody tr:hover {
  background: var(--ep-surface-2);
}

/* ── Status Badges ────────────────────────────────────────────── */
.ep-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.72rem;
  border-radius: var(--ep-radius-full);
}
.ep-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}
.ep-status-active  { background: #d1fae5; color: #065f46; }
.ep-status-active::before { background: var(--ep-success); animation: ep-dot-pulse 2.2s ease-in-out infinite; }
.ep-status-inactive { background: var(--ep-surface-2); color: var(--ep-text-muted); }
.ep-status-inactive::before { background: var(--ep-text-light); }
.ep-status-draft { background: #eff6ff; color: #1d4ed8; }
.ep-status-draft::before { background: #3b82f6; }

/* Role badges */
.role-badge {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--ep-radius-full);
}
.role-super_admin     { background: #fef3c7; color: #92400e; }
.role-institute_admin { background: var(--ep-primary-light); color: var(--ep-primary-darker); }
.role-student         { background: #d1fae5; color: #065f46; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--ep-border);
  border-radius: var(--ep-radius-sm);
  font-size: 0.875rem;
  padding: 0.55rem 0.875rem;
  background: var(--ep-surface-2);
  color: var(--ep-text);
  transition: border-color var(--ep-transition), box-shadow var(--ep-transition), background var(--ep-transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--ep-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  outline: none;
  background: var(--ep-surface);
}
.form-control::placeholder { color: var(--ep-text-light); }

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}
.form-text {
  font-size: 0.75rem;
  color: var(--ep-text-light);
  margin-top: 0.35rem;
}

/* Password toggle input group */
.input-group .form-control {
  border-radius: var(--ep-radius-sm) 0 0 var(--ep-radius-sm) !important;
}
.input-group .btn-outline-secondary {
  border-color: var(--ep-border);
  border-radius: 0 var(--ep-radius-sm) var(--ep-radius-sm) 0 !important;
  color: var(--ep-text-muted);
  background: var(--ep-surface-2);
  transition: background var(--ep-transition), color var(--ep-transition);
  font-size: 0.875rem;
}
.input-group .btn-outline-secondary:hover {
  background: var(--ep-border);
  color: var(--ep-primary);
}

/* Icon input wrapper */
.ep-input-icon-wrap { position: relative; }
.ep-input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ep-text-light);
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 2;
}
.ep-input-with-icon { padding-left: 2.5rem !important; }
.ep-input-eye {
  position: absolute;
  right: 0; top: 0;
  height: 100%;
  border: none;
  background: transparent;
  border-left: 1px solid var(--ep-border);
  padding: 0 0.875rem;
  color: var(--ep-text-light);
  cursor: pointer;
  border-radius: 0 var(--ep-radius-sm) var(--ep-radius-sm) 0;
  transition: color var(--ep-transition), background var(--ep-transition);
  z-index: 2;
}
.ep-input-eye:hover {
  color: var(--ep-primary);
  background: var(--ep-primary-light);
}

/* ── Modals ───────────────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: var(--ep-radius-lg);
  box-shadow: var(--ep-shadow-xl);
  animation: ep-modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes ep-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-header {
  border-bottom: 1px solid var(--ep-border);
  padding: 1.25rem 1.5rem;
  background: var(--ep-surface-2);
  border-radius: var(--ep-radius-lg) var(--ep-radius-lg) 0 0;
}
.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ep-text);
}
.modal-body { padding: 1.5rem; }
.modal-footer {
  border-top: 1px solid var(--ep-border);
  padding: 1rem 1.5rem;
  background: var(--ep-surface-2);
  border-radius: 0 0 var(--ep-radius-lg) var(--ep-radius-lg);
  gap: 0.5rem;
}

/* ── Alert ────────────────────────────────────────────────────── */
.ep-alert {
  border: none;
  border-radius: var(--ep-radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.7rem 1rem;
}
.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border-left: 3px solid var(--ep-danger);
}

/* ── Spinner ─────────────────────────────────────────────────── */
.ep-spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ep-spin 0.65s linear infinite;
  vertical-align: middle;
  margin-right: 0.3rem;
}
@keyframes ep-spin { to { transform: rotate(360deg); } }

/* ── Toolbar (institutes) ─────────────────────────────────────── */
.ep-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
  flex-wrap: wrap;
}
.ep-search-wrap { position: relative; flex: 1; min-width: 180px; }
.ep-search-icon {
  position: absolute;
  left: 0.75rem; top: 50%;
  transform: translateY(-50%);
  color: var(--ep-text-light);
  font-size: 0.8rem;
  pointer-events: none;
}
.ep-search-input {
  width: 100%;
  padding: 0.5rem 0.875rem 0.5rem 2.25rem;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-sm);
  font-size: 0.875rem;
  background: var(--ep-surface);
  color: var(--ep-text);
  transition: border-color var(--ep-transition), box-shadow var(--ep-transition);
}
.ep-search-input:focus {
  outline: none;
  border-color: var(--ep-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.ep-search-input::placeholder { color: var(--ep-text-light); }

.ep-filter-pills {
  display: flex;
  gap: 0.3rem;
  background: var(--ep-surface-2);
  border-radius: var(--ep-radius-sm);
  padding: 3px;
  border: 1px solid var(--ep-border);
}
.ep-filter-pill {
  background: none;
  border: none;
  border-radius: calc(var(--ep-radius-sm) - 2px);
  padding: 0.3rem 0.875rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ep-text-muted);
  cursor: pointer;
  transition: background var(--ep-transition), color var(--ep-transition), box-shadow var(--ep-transition);
  white-space: nowrap;
}
.ep-filter-pill.active {
  background: var(--ep-surface);
  color: var(--ep-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 600;
}

/* ── Page Header ──────────────────────────────────────────────── */
.ep-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.ep-page-head h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--ep-text);
}
.ep-page-head p {
  font-size: 0.82rem;
  color: var(--ep-text-muted);
  margin: 0.15rem 0 0;
}

/* ── Skeleton ─────────────────────────────────────────────────── */
.ep-skel {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: ep-shimmer 1.6s infinite ease-in-out;
  border-radius: 4px;
  height: 13px;
}
.ep-skel-text { width: 80%; }
@keyframes ep-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Row animation ────────────────────────────────────────────── */
@keyframes ep-row-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ep-row-anim { animation: ep-row-in 0.3s ease both; }

/* ── Dot pulse ────────────────────────────────────────────────── */
@keyframes ep-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.72); }
}

/* ── Toast ────────────────────────────────────────────────────── */
.ep-toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.ep-toast {
  background: #1e293b;
  color: #f1f5f9;
  padding: 0.7rem 1.125rem;
  border-radius: var(--ep-radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.28);
  font-size: 0.84rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: all;
  animation: ep-toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  max-width: 320px;
  min-width: 220px;
}
.ep-toast.success { border-left: 3px solid var(--ep-success); }
.ep-toast.danger  { border-left: 3px solid var(--ep-danger); }
.ep-toast.warning { border-left: 3px solid #f59e0b; }
.ep-toast.ep-toast-out { animation: ep-toast-out 0.25s ease forwards; }
@keyframes ep-toast-in {
  from { opacity: 0; transform: translateX(50px) scale(0.93); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}
@keyframes ep-toast-out {
  to { opacity: 0; transform: translateX(50px) scale(0.93); }
}

/* ── Empty State ──────────────────────────────────────────────── */
.ep-empty-state { text-align: center; padding: 3.5rem 1rem; }
.ep-empty-icon {
  font-size: 2.8rem;
  margin-bottom: 0.875rem;
  opacity: 0.15;
  display: block;
  line-height: 1;
}
.ep-empty-state h6 { font-size: 0.9rem; font-weight: 700; color: var(--ep-text); margin-bottom: 0.25rem; }
.ep-empty-state p  { font-size: 0.8rem; color: var(--ep-text-muted); margin: 0; }

/* ── Auth / Login Layout ──────────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

.auth-left {
  width: 46%;
  background: linear-gradient(155deg, #0a0f1e 0%, #1a1040 45%, #0f2045 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Animated floating orbs */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-orb-1 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: ep-float 9s ease-in-out infinite;
}
.auth-orb-2 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(6,182,212,0.16) 0%, transparent 70%);
  bottom: -60px; left: -40px;
  animation: ep-float 7s ease-in-out infinite reverse;
}
.auth-orb-3 {
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(165,180,252,0.12) 0%, transparent 70%);
  top: 45%; left: 18%;
  animation: ep-float 11s ease-in-out infinite;
}

@keyframes ep-float {
  0%, 100% { transform: translateY(0)    scale(1); }
  50%       { transform: translateY(-22px) scale(1.03); }
}

.auth-brand {
  position: relative; z-index: 1;
  margin-bottom: 2.5rem;
  text-align: center;
}
.auth-brand-logo {
  height: 72px; width: auto;
  max-width: 220px;
  display: block;
  margin: 0 auto 0.9rem;
  object-fit: contain;
}
.auth-brand-mark {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  background: linear-gradient(135deg, var(--ep-primary), var(--ep-accent));
  box-shadow: 0 10px 26px rgba(99,102,241,0.4);
}
.auth-brand-word {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f5f5ff;
}
.auth-brand-word span { color: var(--ep-primary-light); }
.auth-brand-word em   { color: var(--ep-accent); font-style: normal; margin-left: 0.2em; }
.auth-brand-sub {
  font-size: 0.7rem;
  color: #8b949e;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.ep-forgot-link {
  font-size: 0.8rem;
  color: var(--ep-text-muted, #6b7280);
  text-decoration: none;
}
.ep-forgot-link:hover { color: var(--ep-primary); text-decoration: underline; }

.auth-headline {
  position: relative; z-index: 1;
  font-size: 1.7rem;
  font-weight: 800;
  color: #f0f6fc;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.auth-headline em {
  font-style: normal;
  background: linear-gradient(90deg, #a5b4fc, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-headline-sub {
  position: relative; z-index: 1;
  font-size: 0.875rem;
  color: #8b949e;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.auth-features {
  list-style: none;
  padding: 0; margin: 0;
  position: relative; z-index: 1;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 0.875rem;
  font-weight: 500;
}
.auth-feat-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(129,140,248,0.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #a5b4fc;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #ffffff;
}
.auth-form-box {
  width: 100%;
  max-width: 400px;
}
.auth-form-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ep-text);
  margin-bottom: 0.3rem;
}
.auth-form-sub {
  font-size: 0.875rem;
  color: var(--ep-text-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}
.auth-footer-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--ep-text-light);
  margin-top: 2rem;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ep-topnav { padding: 0 1.25rem; }
  .ep-topnav-user-info { display: none; }
  .ep-topbar { padding: 0 1.25rem; top: 64px; }
  .ep-content { padding: 1.25rem; }
  .ep-hero { padding: 1.75rem 1.5rem; }
  .ep-hero h1 { font-size: 1.35rem; }
  .ep-stats-row { grid-template-columns: 1fr; }
  .ep-toolbar { flex-direction: column; align-items: stretch; }
  .ep-filter-pills { justify-content: center; }
  .ep-nav-dropdown-inner { flex-direction: column; gap: 0; padding: 1rem 1.5rem; }
  .ep-nav-dropdown { border-radius: 0 0 16px 16px; max-height: 70vh !important; overflow-y: auto; }
  .ep-nav-group { padding: 0 0.5rem; flex: none; }
  .ep-nav-group:nth-child(2) { grid-template-columns: 1fr; flex: none; display: flex; flex-direction: column; }
  .ep-nav-group + .ep-nav-group::before { top: 0; bottom: auto; left: 0.5rem; right: 0.5rem; width: auto; height: 1px; }
  .auth-left { display: none; }
  .auth-right { width: 100%; }
  .row.g-3 { --bs-gutter-y: 0.75rem; }
}

@media (max-width: 480px) {
  .ep-topnav { padding: 0 1rem; }
  .ep-topnav-brand .ep-logo-sub { display: none; }
  .ep-content { padding: 1rem; }
  .ep-hero { padding: 1.5rem 1.25rem; border-radius: var(--ep-radius); }
  .ep-hero h1 { font-size: 1.2rem; }
  .ep-stats-row { gap: 0.75rem; }
  .ep-stat-value { font-size: 1.4rem; }
}

/* ── Writing Test Task Blocks ────────────────────────────────── */
.ep-task-block {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  padding: 1.5rem;
}
.ep-task-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ep-text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.ep-task-prompt {
  font-size: 0.9rem;
  color: var(--ep-text);
  line-height: 1.7;
  white-space: pre-wrap;
}
.ep-task-data {
  margin-top: 1rem;
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border-light);
  border-radius: var(--ep-radius-sm);
  padding: 0.75rem 1rem;
}
.ep-task-data-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ep-text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ep-task-data-pre {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ep-text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  border: none;
  padding: 0;
}
.ep-task-missing {
  color: var(--ep-text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ep-surface-2);
}

/* ── AI Generator Cards ───────────────────────────────────────── */
.ep-ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}
.ep-ai-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow var(--ep-transition);
}
.ep-ai-card:hover { box-shadow: var(--ep-shadow-md); }
.ep-ai-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.ep-ai-card-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ep-text);
  line-height: 1.4;
}
.ep-ai-task-row {}
.ep-ai-task-label {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--ep-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.ep-ai-task-preview {
  font-size: 0.8rem;
  color: var(--ep-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-ai-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
  border-top: 1px solid var(--ep-border-light);
  margin-top: 0.25rem;
}

/* ── AI full-mock generation checklist ───────────────────────────── */
.ep-ai-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--ep-border-light);
  font-size: 0.85rem;
}
.ep-ai-step:last-child { border-bottom: none; }
.ep-ai-step-icon { width: 1.1rem; text-align: center; color: var(--ep-text-muted); }
.ep-ai-step.pending .ep-ai-step-icon { color: var(--ep-text-muted); }
.ep-ai-step.active .ep-ai-step-icon { color: var(--ep-primary); }
.ep-ai-step.active .ep-ai-step-icon i { animation: ep-spin 0.8s linear infinite; }
.ep-ai-step.done .ep-ai-step-icon { color: var(--ep-success); }
.ep-ai-step.failed .ep-ai-step-icon { color: #dc2626; }
.ep-ai-step-label { font-weight: 600; color: var(--ep-text); min-width: 130px; }
.ep-ai-step-msg { margin-left: auto; text-align: right; }
@keyframes ep-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Attempt page ─────────────────────────────────────────────── */
.ep-attempt-header {
  position: sticky;
  top: var(--ep-topnav-height, 64px);
  z-index: 100;
  background: var(--ep-surface);
  border-bottom: 1px solid var(--ep-border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.ep-attempt-header-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ep-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep-timer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ep-text);
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-full);
  padding: 0.25rem 0.85rem;
}
.ep-timer.ep-timer-warn  { color: #d97706; border-color: #fcd34d; background: #fffbeb; }
.ep-timer.ep-timer-urgent { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }
.ep-save-status {
  font-size: 0.78rem;
  color: var(--ep-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.ep-attempt-task {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.ep-attempt-task-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ep-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
}
.ep-attempt-task-prompt {
  font-size: 0.9rem;
  color: var(--ep-text);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  white-space: pre-wrap;
}
.ep-attempt-task-data {
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border-light);
  border-radius: var(--ep-radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.ep-attempt-task-data-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ep-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.ep-attempt-task-data pre {
  font-size: 0.82rem;
  color: var(--ep-text);
  white-space: pre-wrap;
  margin: 0;
}
.ep-chart-desc {
  font-size: 0.78rem;
  color: var(--ep-text-muted);
  margin: 0.5rem 0 0;
  font-style: italic;
}
.ep-process-diagram {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0.5rem 0;
}
.ep-process-step {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--ep-surface);
  border: 1px solid var(--ep-border-light);
  border-radius: var(--ep-radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.84rem;
}
.ep-process-num {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--ep-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-process-arrow {
  text-align: center;
  color: var(--ep-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0.1rem 0;
}
.ep-attempt-textarea {
  width: 100%;
  min-height: 220px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-sm);
  background: var(--ep-surface);
  color: var(--ep-text);
  resize: vertical;
  transition: border-color 0.15s;
  font-family: inherit;
}
.ep-attempt-textarea:focus {
  outline: none;
  border-color: var(--ep-primary);
  box-shadow: 0 0 0 3px var(--ep-primary-light);
}
.ep-attempt-textarea:read-only {
  background: var(--ep-surface-2);
  color: var(--ep-text-muted);
  cursor: default;
}
.ep-wc-bar {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.ep-wc-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ep-text-muted);
}
.ep-wc-count.ep-wc-met { color: var(--ep-success); }
.ep-wc-progress {
  flex: 1;
  height: 4px;
  background: var(--ep-border);
  border-radius: 2px;
  overflow: hidden;
}
.ep-wc-progress-fill {
  height: 100%;
  background: var(--ep-primary);
  border-radius: 2px;
  transition: width 0.2s;
}
.ep-wc-progress-fill.ep-wc-met { background: var(--ep-success); }
.ep-submitted-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: var(--ep-radius-sm);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: #065f46;
  font-weight: 500;
}

/* ── AI Evaluation Results ────────────────────────────────────────── */
.ep-eval-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ep-border);
}
.ep-eval-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ep-text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ep-combined-band {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: var(--ep-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.ep-combined-band-score {
  font-size: 2.75rem;
  font-weight: 800;
  color: #0369a1;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ep-combined-band-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.2rem;
}
.ep-combined-band-note {
  font-size: 0.78rem;
  color: #0369a1;
}
.ep-eval-task-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.ep-eval-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ep-border-light);
}
.ep-eval-task-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ep-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.2rem;
}
.ep-eval-task-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ep-text);
}
.ep-band-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--ep-primary-light);
  color: var(--ep-primary-dark);
  border-radius: var(--ep-radius-full);
  padding: 0.3rem 0.9rem;
  font-weight: 800;
  font-size: 1.1rem;
}
.ep-criteria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 600px) {
  .ep-criteria-grid { grid-template-columns: 1fr; }
}
.ep-criterion-item {
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border-light);
  border-radius: var(--ep-radius-sm);
  padding: 0.85rem 1rem;
}
.ep-criterion-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ep-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.ep-criterion-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ep-text);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.ep-criterion-feedback {
  font-size: 0.78rem;
  color: var(--ep-text-muted);
  line-height: 1.5;
}
.ep-eval-feedback-block {
  margin-bottom: 1rem;
}
.ep-eval-feedback-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ep-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.ep-eval-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ep-eval-list li {
  font-size: 0.84rem;
  color: var(--ep-text);
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  background: var(--ep-surface-2);
  border-radius: var(--ep-radius-sm);
  border-left: 3px solid var(--ep-border);
}
.ep-eval-list.mistakes li { border-left-color: #fca5a5; }
.ep-eval-list.improvements li { border-left-color: #86efac; }
.ep-eval-guidance {
  font-size: 0.84rem;
  color: var(--ep-text);
  line-height: 1.65;
  padding: 0.85rem 1rem;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: var(--ep-radius-sm);
}
.ep-eval-pending {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  font-size: 0.88rem;
  color: var(--ep-text-muted);
  margin-bottom: 1rem;
}
.ep-eval-failed {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--ep-radius);
  font-size: 0.85rem;
  color: #dc2626;
  margin-bottom: 1rem;
}

/* ── Results Dashboard ───────────────────────────────────────────── */
.ep-result-band {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--ep-radius-sm);
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border);
}
.ep-result-band-value {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ep-result-band-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--ep-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
/* Result detail layout */
.ep-result-hero {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.ep-result-hero-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg,#f0f9ff,#e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: var(--ep-radius);
  padding: 1rem 1.5rem;
  min-width: 8rem;
  text-align: center;
  flex-shrink: 0;
}
.ep-result-hero-band-num {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ep-result-hero-band-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.35rem;
}
.ep-result-hero-meta {
  flex: 1;
}
.ep-result-hero-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ep-text);
  margin-bottom: 0.5rem;
}
.ep-result-hero-sub {
  font-size: 0.83rem;
  color: var(--ep-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.ep-result-hero-sub span { display:flex; align-items:center; gap:0.3rem; }
.ep-result-task-section {
  margin-bottom: 2rem;
}
.ep-result-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.ep-result-answer-box {
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border-light);
  border-radius: var(--ep-radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--ep-text);
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}
.ep-result-answer-wc {
  font-size: 0.75rem;
  color: var(--ep-text-muted);
  margin-top: 0.4rem;
  text-align: right;
}
/* Progress placeholder */
.ep-progress-placeholder {
  background: var(--ep-surface);
  border: 1px dashed var(--ep-border);
  border-radius: var(--ep-radius);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.ep-progress-placeholder-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ep-text);
  margin-bottom: 0.5rem;
}
.ep-progress-placeholder-sub {
  font-size: 0.85rem;
  color: var(--ep-text-muted);
  margin-bottom: 1.5rem;
}
.ep-progress-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  height: 80px;
}
.ep-progress-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.ep-progress-bar-fill {
  width: 32px;
  border-radius: 4px 4px 0 0;
  opacity: 0.3;
}
.ep-progress-bar-lbl {
  font-size: 0.65rem;
  color: var(--ep-text-muted);
}
/* Filters bar */
.ep-filters-bar {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.ep-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}
.ep-filter-group label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ep-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Speaking: live transcript & saved transcript ──────────────── */
.ep-transcript-live {
  font-size: 0.875rem;
  color: var(--ep-text-muted);
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--ep-radius-sm);
  padding: 0.6rem 0.85rem;
  margin-top: 0.5rem;
  min-height: 2.5rem;
  line-height: 1.55;
  transition: border-color 0.2s;
}
.ep-transcript-live:not(.d-none) {
  border-color: var(--ep-primary);
}
.ep-transcript-empty {
  color: #94a3b8;
  font-style: italic;
}
.ep-transcript-box {
  font-size: 0.875rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--ep-radius-sm);
  padding: 0.6rem 0.85rem;
  line-height: 1.6;
  color: var(--ep-text);
}
/* ── Feedback pill — key issues/strengths/tips lists on result pages ────── */
.tag-pill { display: inline-block; background: #f1f5f9; border-radius: 20px; padding: .2rem .75rem; font-size: .8rem; color: #475569; margin: .15rem; }

/* ── "New" badge — auto-expiring test-card freshness indicator ──────────── */
.ep-new-badge {
  position: absolute;
  top: -0.55rem;
  right: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
  animation: ep-new-badge-pulse 1.8s ease-in-out infinite;
}
@keyframes ep-new-badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4); }
  50%      { transform: scale(1.08); box-shadow: 0 2px 16px rgba(239, 68, 68, 0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .ep-new-badge { animation: none; }
}
/* Same badge, inline (not corner-absolute) — for table rows */
.ep-new-badge-inline {
  position: static;
  display: inline-flex;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* ── Band-score display on module test cards, matching Mock's "X.X overall" ── */
.ep-card-band {
  text-align: center;
  padding: 0.65rem 0;
}
.ep-card-band .val {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ep-primary);
}
.ep-card-band .lbl {
  font-size: 0.85rem;
  color: var(--ep-text-muted);
  margin-left: 0.3rem;
}
.ep-card-published {
  font-size: 0.75rem;
  color: var(--ep-text-muted);
}

.ep-transcript-box strong {
  color: #15803d;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Waveform Audio Player (waveform_player.js) ───────────────────────────── */
.wf-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--ep-surface-2);
  border: 1px solid var(--ep-border);
  border-radius: 10px;
}
.wf-player.wf-compact {
  padding: 0.35rem 0.5rem;
  gap: 0.5rem;
  border-radius: 8px;
}
.wf-playbtn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--ep-primary);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.wf-playbtn:hover:not(:disabled) { background: var(--ep-primary-dark); }
.wf-playbtn:active:not(:disabled) { transform: scale(0.94); }
.wf-playbtn:disabled { opacity: 0.5; cursor: not-allowed; }
.wf-compact .wf-playbtn {
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
}
.wf-canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}
.wf-canvas {
  display: block;
  width: 100%;
  cursor: grab;
}
.wf-canvas:active {
  cursor: grabbing;
}
.wf-loading {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ep-text-muted);
}
.wf-hover-time {
  position: absolute;
  top: -1.6rem;
  transform: translateX(-50%);
  background: var(--ep-primary-darker);
  color: #fff;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  white-space: nowrap;
}
.wf-time {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--ep-text-muted);
  white-space: nowrap;
}
.wf-speed-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.wf-speed-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ep-text-muted);
}
.wf-speed {
  flex-shrink: 0;
  width: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ep-text-muted);
  text-align: center;
  text-align-last: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--ep-border);
  background-color: var(--ep-surface);
  background-image: none; /* drop the native <select> chevron for a clean pill look */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}
.wf-speed:hover {
  border-color: var(--ep-primary);
  color: var(--ep-primary);
}
.wf-speed:focus {
  outline: none;
  border-color: var(--ep-primary);
  box-shadow: 0 0 0 3px var(--ep-primary-glow);
}
.wf-error-msg {
  flex-shrink: 0;
  white-space: nowrap;
}
