/* ============================================
   EduFocus - Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --bg-card: rgba(30, 41, 59, 0.8);
  --bg-glass: rgba(30, 41, 59, 0.6);

  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-400: #60A5FA;
  --green-500: #10B981;
  --green-400: #34D399;
  --red-500: #EF4444;
  --red-400: #F87171;
  --yellow-500: #F59E0B;
  --purple-500: #8B5CF6;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --border-color: #334155;
  --border-light: rgba(148, 163, 184, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
  --shadow-glow-red: 0 0 20px rgba(239, 68, 68, 0.3);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--blue-400);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--blue-500);
}

/* ============================================
   Animated Background
   ============================================ */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-pattern::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* ============================================
   Landing Page
   ============================================ */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.landing-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--blue-400);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--blue-400) 50%, var(--green-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 80px;
  padding: 0 20px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-glow-blue);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-600), #1D4ED8);
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-1px);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--green-500), #059669);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: var(--shadow-glow-green);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red-500), #DC2626);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  box-shadow: var(--shadow-glow-red);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, var(--yellow-500), #D97706);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--blue-500);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

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

/* ============================================
   Auth Pages (Login / Register)
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo {
  justify-content: center;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   Form Elements
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .form-input {
  padding-left: 44px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red-400);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.form-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green-400);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

/* ============================================
   Dashboard Layout
   ============================================ */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.sidebar-logo .logo-text {
  font-size: 22px;
  font-weight: 800;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-400);
}

.nav-item .nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 22px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.user-info:hover {
  background: var(--bg-secondary);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.page-content {
  padding: 18px 24px;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
}

/* ============================================
   Dashboard Specific
   ============================================ */
.welcome-section {
  margin-bottom: 32px;
}

.welcome-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.15); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================
   Session Management & Real-time Live Layout
   ============================================ */
.session-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1080px) {
  .session-grid {
    grid-template-columns: 1fr;
  }
}

.session-col-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.session-col-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.qr-section {
  text-align: center;
}

.qr-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: inline-block;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

.qr-container img {
  width: 210px;
  height: 210px;
  border-radius: var(--radius-md);
  display: block;
}

.session-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.session-subject {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 10px;
}

.session-timer {
  font-size: 42px;
  font-weight: 800;
  color: var(--blue-400);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.session-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-400);
}

.status-locked {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-400);
}

.status-ended {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.status-active .status-dot { background: var(--green-500); }
.status-locked .status-dot { background: var(--red-500); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.session-pin-box {
  background: rgba(212, 246, 55, 0.08);
  border: 1.5px solid rgba(212, 246, 55, 0.35);
  border-radius: 12px;
  padding: 6px 14px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 280px;
}

.session-pin-box:hover {
  border-color: #D4F637;
  background: rgba(212, 246, 55, 0.14);
  transform: translateY(-1px);
}

.session-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.session-actions-row {
  display: flex;
  gap: 8px;
}

.session-actions-row .btn {
  flex: 1;
}

/* ============================================
   Real-Time Live KPI Cards
   ============================================ */
.live-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.live-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.live-kpi-card:hover {
  border-color: rgba(212, 246, 55, 0.35);
  transform: translateY(-2px);
}

.live-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.live-kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #10B981; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.live-kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.live-kpi-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.live-kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.live-kpi-progress-bar {
  margin-top: 10px;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.live-kpi-progress-fill {
  height: 100%;
  background: #D4F637;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* Red pulse animation for student violations */
.live-pulse-badge {
  animation: redBadgePulse 1.5s infinite;
}

@keyframes redBadgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.05); }
}

/* ============================================
   Students Section
   ============================================ */
.students-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.student-count {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-400);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
}

.students-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.students-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.students-table td {
  padding: 12px 16px;
  font-size: 14px;
}

.students-table tbody tr {
  background: rgba(15, 23, 42, 0.4);
  transition: var(--transition);
}

.students-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

.students-table tbody tr td:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.students-table tbody tr td:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.student-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--blue-500), var(--green-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-400);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-400);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--yellow-500);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-400);
}

/* ============================================
   Progress Ring
   ============================================ */
.progress-ring-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.progress-ring {
  position: relative;
  width: 140px;
  height: 140px;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--blue-500);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.progress-value {
  font-size: 32px;
  font-weight: 800;
  display: block;
}

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Notifications / Toasts
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  animation: slideInRight 0.3s ease-out;
  min-width: 300px;
  max-width: 450px;
}

.toast-warning {
  border-left: 3px solid var(--yellow-500);
}

.toast-success {
  border-left: 3px solid var(--green-500);
}

.toast-error {
  border-left: 3px solid var(--red-500);
}

.toast-info {
  border-left: 3px solid var(--blue-500);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
}

.toast-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* ============================================
   Create Session Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  display: none;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 90%;
  max-width: 480px;
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--red-500);
  color: white;
}

/* ============================================
   Activity Log
   ============================================ */
.activity-log {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-log::-webkit-scrollbar {
  width: 6px;
}

.activity-log::-webkit-scrollbar-track {
  background: transparent;
}

.activity-log::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.4);
  font-size: 13px;
  animation: slideUp 0.3s ease;
}

.activity-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============================================
   Student Page (Mobile)
   ============================================ */
.student-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.student-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  animation: slideUp 0.5s ease-out;
}

.student-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
}

.student-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.student-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.device-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  justify-content: center;
}

/* Lock Screen */
.lock-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, #0F172A 0%, #1a1a3e 50%, #0F172A 100%);
  position: relative;
  overflow: hidden;
}

.lock-screen::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: lockGlow 3s ease-in-out infinite;
}

@keyframes lockGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.lock-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: lockBounce 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes lockBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.lock-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.lock-session-name {
  color: var(--blue-400);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.lock-timer {
  font-size: 64px;
  font-weight: 800;
  color: var(--blue-400);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  position: relative;
  z-index: 1;
}

.lock-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.lock-warning {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--yellow-500);
  background: rgba(245, 158, 11, 0.1);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Unlock / End Screen */
.end-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.end-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.end-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.end-message {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 300px;
}

.end-stats {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 300px;
  margin-bottom: 20px;
}

.end-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.end-stat-row:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.end-stat-label {
  color: var(--text-secondary);
}

.end-stat-value {
  font-weight: 600;
}

.end-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-400);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 16px;
}

/* ============================================
   Session History
   ============================================ */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.history-item:hover {
  background: rgba(59, 130, 246, 0.05);
}

.history-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.history-name {
  font-weight: 600;
  font-size: 14px;
}

.history-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.history-stats {
  text-align: right;
}

.history-student-count {
  font-weight: 600;
  font-size: 14px;
}

.history-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

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

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
  }

  .topbar {
    padding: 12px 16px;
  }

  .page-content {
    padding: 16px;
  }

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

  .hero-features {
    grid-template-columns: 1fr 1fr;
  }

  .landing-nav {
    padding: 16px 20px;
  }

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

  .qr-container img {
    width: 200px;
    height: 200px;
  }

  .session-timer {
    font-size: 36px;
  }
}

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

  .hero-features {
    grid-template-columns: 1fr;
  }

  .lock-timer {
    font-size: 48px;
  }
}

/* ============================================
   Hamburger Menu
   ============================================ */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

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

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   Session Summary & Statistics Modal
   ============================================ */
.modal-stats {
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

.stats-summary-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-session-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.stats-session-meta {
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-session-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .stats-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stats-kpi-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stats-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
}

.stats-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stats-kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stats-kpi-icon {
  font-size: 20px;
}

.stats-kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stats-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.stats-top-students {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.stats-top-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-400);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.top-students-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.student-chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.focus-score-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.focus-score-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.focus-score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.bar-green { background: linear-gradient(90deg, #10B981, #34D399); }
.bar-yellow { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.bar-red { background: linear-gradient(90deg, #EF4444, #F87171); }

.focus-score-num {
  font-size: 13px;
  font-weight: 700;
  width: 38px;
  text-align: right;
}

.stats-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 12px;
}

/* Print Stylesheet */
@media print {
  body {
    background: #fff !important;
    color: #111 !important;
  }
  .sidebar, .navbar, .modal-close, .stats-actions-bar, .toast-container {
    display: none !important;
  }
  .modal-overlay {
    position: static !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    display: block !important;
  }
  .modal-stats {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    color: #111 !important;
  }
  .stats-kpi-card {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #111 !important;
  }
  .stats-kpi-value, .stats-session-title {
    color: #111 !important;
  }
  .students-table th {
    background: #f1f5f9 !important;
    color: #333 !important;
  }
  .students-table td {
    color: #111 !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }
}

/* ============================================
   Quiz & Material Styles
   ============================================ */
.quiz-question-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}

.quiz-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.quiz-question-num {
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-400);
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.quiz-option-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-correct-radio {
  accent-color: var(--green-500);
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.student-quiz-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

.student-quiz-overlay.active {
  display: flex !important;
}

.student-quiz-container {
  max-width: 520px;
  margin: auto;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-xl);
}

.student-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
}

.student-quiz-timer {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-400);
  padding: 4px 10px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.student-quiz-q {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.student-quiz-q-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.student-quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.student-quiz-option:hover {
  border-color: var(--blue-400);
  background: rgba(59, 130, 246, 0.05);
}

.student-quiz-option input[type="radio"] {
  accent-color: var(--blue-500);
  width: 18px;
  height: 18px;
}

.student-quiz-option.selected {
  border-color: var(--blue-500);
  background: rgba(59, 130, 246, 0.15);
}

/* Material Notification Box */
.material-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 20px;
  text-align: left;
  animation: slideInUp 0.3s ease;
}

.material-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-400);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.material-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ============================================
   GROUPS & TEST PACKS UI (Teacher Panel)
   ============================================ */
.groups-grid, .testpacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.group-card, .testpack-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.group-card:hover, .testpack-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 246, 55, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.group-header-row, .testpack-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.group-icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.testpack-icon-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 246, 55, 0.15), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(212, 246, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.group-card-title, .testpack-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 4px;
  line-height: 1.3;
}

.group-card-subject, .testpack-card-subject {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.group-meta-chips, .testpack-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.group-meta-chip, .testpack-meta-chip {
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
  color: #E2E8F0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.group-card-actions, .testpack-card-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.template-chips-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 14px 0;
}

.template-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.template-chip-btn:hover {
  background: rgba(212, 246, 55, 0.15);
  border-color: #D4F637;
  color: #D4F637;
}

/* Builder Question Card in Modal */
.builder-q-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.builder-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.builder-q-badge {
  font-size: 12px;
  font-weight: 800;
  background: var(--blue-600);
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
}

.builder-opt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.builder-opt-radio {
  accent-color: #10B981;
  width: 18px;
  height: 18px;
  cursor: pointer;
}



