/* ============================================================
   REVIEW PAGE — Ôn tập theo chương sách giáo khoa
   Clean, minimal, textbook-aligned design
   ============================================================ */

/* --- Filter Chips --- */
.filters {
  background: transparent; border: 0; margin-top: -20px; position: relative; z-index: 10;
  -webkit-mask: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
  mask: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
}

.filter-row {
  display: flex; flex-wrap: nowrap; gap: 10px; margin-bottom: 20px; align-items: center;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-label {
  font-weight: 800; color: #64748b; margin-right: 4px; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.08em; flex-shrink: 0;
}
.filter-chip {
  padding: 8px 18px; border-radius: 999px; background: #fff;
  border: 1px solid #e2e8f0; color: #334155; font-weight: 700; font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  flex-shrink: 0;
}
.filter-chip:hover {
  border-color: #18a558; color: #18a558; box-shadow: 0 2px 8px rgba(24,165,88,0.1);
}
.filter-chip.active {
  background: #18a558; color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(24,165,88,0.3);
}

/* --- Search --- */
.search-bar { margin-bottom: 24px; }
.search-bar input {
  width: 100%; padding: 14px 20px; border-radius: 14px; font-size: 1rem;
  background: #fff; border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: all 0.2s ease;
  font-family: inherit; font-weight: 500; color: #334155;
}
.search-bar input:focus {
  outline: none; border-color: #18a558;
  box-shadow: 0 0 0 3px rgba(24,165,88,0.12);
}
.search-bar input::placeholder { color: #94a3b8; }

/* --- Subject / Book Grid --- */
.subject-grid, .book-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
  margin-bottom: 32px;
}
.subject-card, .book-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 20px 24px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.subject-card:hover, .book-card:hover {
  border-color: #18a558; box-shadow: 0 4px 16px rgba(24,165,88,0.1);
  transform: translateY(-2px);
}
.subject-card-name, .book-card-name {
  font-size: 1.05rem; font-weight: 800; color: #1e293b;
}
.subject-card-count, .book-card-count {
  font-size: 0.82rem; color: #64748b; font-weight: 600; margin-top: 2px;
}

/* --- Section Title --- */
.section-title {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 900;
  margin: 24px 0 20px; color: #0f172a; letter-spacing: -0.02em;
}

/* --- Back Button --- */
.back-btn {
  display: inline-flex; align-items: center; padding: 8px 18px;
  background: #f1f5f9; border-radius: 999px; font-weight: 700;
  font-size: 0.88rem; color: #64748b; text-decoration: none;
  cursor: pointer; margin-bottom: 20px; transition: all 0.15s ease;
  border: 1px solid #e2e8f0;
}
.back-btn:hover { color: #18a558; border-color: #18a558; background: #f0fdf4; }

/* --- Chapter Title --- */
.chapter-title {
  padding: 10px 0 8px; font-size: 0.82rem; font-weight: 800;
  color: #18a558; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 2px solid #e2e8f0; margin: 24px 0 10px;
}
.chapter-title:first-of-type { margin-top: 4px; }

/* --- Lesson List --- */
.lesson-list {
  display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px;
}
.lesson-item {
  background: #fff; border: 1px solid #f1f5f9; border-radius: 12px;
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: all 0.15s ease;
}
.lesson-item:hover {
  border-color: #18a558; background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(24,165,88,0.08);
}
.lesson-item-content { flex: 1; min-width: 0; }
.lesson-item-name {
  font-size: 0.95rem; font-weight: 600; color: #1e293b;
  line-height: 1.4; text-transform: none; letter-spacing: -0.01em;
}
.lesson-item-arrow {
  color: #18a558; font-weight: 800; font-size: 1rem;
  opacity: 0; transition: all 0.2s ease;
}
.lesson-item:hover .lesson-item-arrow { opacity: 1; }

/* --- State (empty/loading) --- */
.state {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 36px; text-align: center;
}
.state .big { font-size: 2rem; margin-bottom: 10px; }
