/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #5cb85c;
  --primary-dark: #4cae4c;
  --primary-light: #e8f5e9;
  --secondary: #ffb84d;
  --accent-green: #66bb6a;
  --accent-purple: #ab47bc;
  --accent-red: #ef5350;
  --accent-orange: #ffa726;
  --accent-pink: #f06292;
  --accent-blue: #42a5f5;
  --bg-main: #fff9eb;
  --bg-sidebar: #fff9eb;
  --bg-card: #ffffff;
  --text-primary: #5c4b51;
  --text-secondary: #8c7b81;
  --text-light: #c2b5ba;
  --border: #f1ebd8;
  --shadow: 0 6px 16px rgba(220, 210, 190, 0.5);
  --shadow-hover: 0 12px 28px rgba(220, 210, 190, 0.8);
  --radius: 24px;
  --radius-sm: 12px;
  --sidebar-width: 260px;
  --header-height: 160px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
img { max-width: 100%; height: auto; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b998b 0%, #0984e3 50%, #6c5ce7 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  top: -200px; right: -200px;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  bottom: -100px; left: -100px;
}
.login-container {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--accent-blue));
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(27,153,139,0.3);
}
.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary);
}
.login-logo p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: var(--transition);
  background: #fafafa;
}
.form-group input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(27,153,139,0.1);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  width: 100%;
  box-shadow: 0 4px 15px rgba(27,153,139,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27,153,139,0.4);
}
.btn-success { background: var(--accent-green); color: white; }
.btn-danger { background: var(--accent-red); color: white; }
.btn-warning { background: var(--accent-orange); color: white; }
.btn-info { background: var(--accent-blue); color: white; }
.btn-purple { background: var(--accent-purple); color: white; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}
.login-footer a {
  color: var(--primary);
  font-weight: 600;
}
.login-footer a:hover { text-decoration: underline; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  display: none;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.alert-error { background: #fde8e8; color: var(--accent-red); border: 1px solid #fca5a5; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* ===== DASHBOARD LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-primary);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  border-right: 3px dashed var(--border);
}
.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 2px dashed var(--border);
}
.sidebar-brand h2 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
}
.sidebar-brand h2 .brand-icon {
  width: 42px; height: 42px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.sidebar-brand small {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-left: 52px;
  font-weight: 600;
}
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-item {
  margin-bottom: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
  margin-bottom: 6px;
}
.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  transform: translateX(5px);
}
.nav-link.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(92, 184, 92, 0.4);
}
.nav-link .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}
.sidebar-footer {
  padding: 16px;
  border-top: 2px dashed var(--border);
}
.sidebar-footer .btn {
  width: 100%;
  background: var(--primary-light);
  color: var(--accent-red);
  font-size: 15px;
  font-weight: 800;
  padding: 12px;
  border-radius: 20px;
  box-shadow: none;
}
.sidebar-footer .btn:hover {
  background: #fde8e8;
  transform: translateY(-2px);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* Header Banner */
.page-header {
  background: linear-gradient(135deg, var(--primary-light) 0%, #d4edda 100%);
  color: var(--text-primary);
  padding: 40px 40px 60px 40px;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  box-shadow: 0 10px 20px rgba(92,184,92,0.1);
  margin-bottom: 20px;
}
.page-header-content {
  position: relative;
  z-index: 10;
  margin-left: 140px; /* Leave space for header animal */
}

/* Trang trí con hươu sao bên phải header */
.page-header::before {
  content: '';
  position: absolute;
  right: 20px;
  bottom: -15px;
  width: 160px;
  height: 160px;
  background-image: url('/images/animals_sprite.png');
  background-size: 560% 420%; /* 1.4x zoom */
  background-position: 95.65% 93.75%; /* Tọa độ con Hươu Sao */
  mix-blend-mode: multiply;
  opacity: 0.95;
  z-index: 5;
  background-repeat: no-repeat;
}

.page-header::after {
  content: '☁️ ☁️';
  position: absolute;
  font-size: 60px;
  top: 10px;
  right: 50px;
  opacity: 0.8;
  letter-spacing: 150px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}
@keyframes peek {
  0% { transform: translateY(0) rotate(-5deg); }
  100% { transform: translateY(-10px) rotate(5deg); }
}

/* CSS Sprite System */
.animal-sprite {
  background-image: url('/images/animals_sprite.png');
  background-size: 560% 420%; /* Phóng to 1.4x (từ 400% 300%) để cắt viền trắng, phóng to nhân vật */
  mix-blend-mode: multiply;
  background-repeat: no-repeat;
  display: inline-block;
}

/* Tọa độ lưới zoom 1.4x (560% 420%) */
.sprite-panda    { background-position: 4.35% 6.25%; }
.sprite-fox      { background-position: 34.78% 6.25%; }
.sprite-bunny    { background-position: 65.22% 6.25%; }
.sprite-cat      { background-position: 95.65% 6.25%; }

.sprite-bear     { background-position: 4.35% 50%; }
.sprite-penguin  { background-position: 34.78% 50%; }
.sprite-hedgehog { background-position: 65.22% 50%; }
.sprite-giraffe  { background-position: 95.65% 50%; }

.sprite-frog     { background-position: 4.35% 93.75%; }
.sprite-tiger    { background-position: 34.78% 93.75%; }
.sprite-turtle   { background-position: 65.22% 93.75%; }
.sprite-koala    { background-position: 95.65% 93.75%; }

/* Icon sizes for Sidebar */
.icon-sprite {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 12px;
  margin-top: -6px;
  transition: transform 0.2s;
}
.nav-item:hover .icon-sprite {
  transform: scale(1.2) rotate(-5deg);
}

/* Header animal */
.header-sprite {
  position: absolute;
  width: 140px;
  height: 140px;
  bottom: -15px;
  left: 20px;
  z-index: 10;
  animation: peekImage 4s ease-in-out infinite alternate;
}



/* Gấu ngồi sidebar */
.sidebar-bear-decor {
  width: 100px;
  height: 100px;
  margin: 10px auto;
  display: block;
}
  position: relative;
  z-index: 10;
  margin-left: 140px; /* Leave space for panda */
}
.page-header h1 {
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary-dark);
  letter-spacing: 1px;
}
.page-header p {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Content Area */
.content-area {
  padding: 28px 32px;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ===== STAT CARDS (Dashboard) ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: 30px;
  padding: 30px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.stat-card::after {
  content: '🌸';
  position: absolute;
  font-size: 80px;
  bottom: -30px;
  right: -20px;
  opacity: 0.1;
  transform: rotate(-15deg);
}
.stat-info h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.stat-info .stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-info .stat-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  margin-top: 6px;
  letter-spacing: 0.5px;
}
.stat-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
  z-index: 10;
}
.stat-icon.green { background-color: #e6ffed; color: #388e3c; }
.stat-icon.purple { background-color: #f3e5f5; color: #8e24aa; }
.stat-icon.red { background-color: #ffebee; color: #d32f2f; }
.stat-icon.orange { background-color: #fff3e0; color: #f57c00; }
.stat-icon.blue { background-color: #e3f2fd; color: #1976d2; }
.stat-icon.pink { background-color: #fce4ec; color: #c2185b; }

/* ===== TABLE ===== */
.table-container {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px dashed var(--border);
}
.table-header {
  padding: 24px;
  border-bottom: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.table-header h3 {
  font-size: 16px;
  font-weight: 700;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: #f8f9fa;
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
tr:hover { background: #fafffe; }
tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* ===== FORM ===== */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: var(--transition);
  background: #fafafa;
  appearance: none;
}
.form-group select:focus {
  border-color: var(--primary);
  background: white;
}
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  resize: vertical;
  min-height: 80px;
  transition: var(--transition);
}
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(27,153,139,0.1);
}

/* ===== QUESTION CARD ===== */
.question-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}
.question-card:hover { box-shadow: var(--shadow-hover); }
.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.question-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: 20px;
}
.question-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.question-image {
  max-width: 500px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
}
.option-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.option-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}
.option-item.correct { border-color: var(--accent-green); background: #d1fae5; }
.option-item.wrong { border-color: var(--accent-red); background: #fee2e2; }
.option-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.option-item.selected .option-letter {
  background: var(--primary);
  color: white;
}

/* ===== EXAM TIMER ===== */
.exam-toolbar {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: sticky;
  top: 16px;
  z-index: 50;
}
.timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}
.timer.warning { color: var(--accent-orange); }
.timer.danger { color: var(--accent-red); animation: pulse 1s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.question-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.q-nav-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.q-nav-btn.answered { background: var(--primary); color: white; border-color: var(--primary); }
.q-nav-btn.current { border-color: var(--accent-blue); color: var(--accent-blue); }

/* ===== EXAM LIST (Student) ===== */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.exam-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: var(--transition);
  border-top: 4px solid var(--primary);
}
.exam-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.exam-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.exam-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.exam-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}
.exam-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal-overlay.show { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
}
.modal h2 {
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ===== TOAST NOTIFICATION ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: slideInRight 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast-success { background: var(--accent-green); }
.toast-error { background: var(--accent-red); }
.toast-info { background: var(--accent-blue); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content-area { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { padding: 20px 16px; }
  .mobile-toggle {
    display: flex !important;
    position: fixed;
    top: 16px; left: 16px;
    z-index: 200;
    width: 44px; height: 44px;
    background: var(--primary);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: var(--shadow);
  }
}
.mobile-toggle { display: none; }

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 12px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.hidden { display: none !important; }

/* ===== TRUE/FALSE QUESTION STYLES ===== */
/* Admin: tạo mệnh đề */
.tf-statement-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}
.tf-statement-row:hover {
  border-color: var(--primary);
  background: #f0faf8;
}
.tf-stmt-num {
  font-weight: 700;
  color: var(--primary);
  font-size: 14px;
  min-width: 22px;
}
.tf-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Student: làm bài Đúng/Sai */
.tf-statements-student {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tf-stmt-student {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f8f9fa;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.tf-stmt-student:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.tf-stmt-label {
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
  min-width: 24px;
}
.question-text, .option-text, .tf-stmt-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.tf-btn-group {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ===== UTILITY CLASSES ===== */
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 12px; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-info { background: var(--accent-blue); color: white; }
.btn-info:hover { background: #0770c2; }
.badge-warning { background: rgba(243,156,18,0.15); color: #e67e22; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
