/* ── Font Import: Amiri Quran (Rasm Utsmani) ────── */
@import url("https://fonts.googleapis.com/css2?family=Amiri+Quran&display=swap");

/* ── Page Container ─────────────────────────────── */
#quranPage {
  background: #f8f9fa;
  min-height: 100vh;
  padding-bottom: 100px;
}

.fab,
.quran-fab,
.ai-fab {
  transition:
    opacity 0.2s,
    transform 0.2s !important;
}

/* ── FAB Quran Button ───────────────────────────── */
.quran-fab {
  position: fixed;
  bottom: 220px;
  right: 20px;
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  color: #ffd700;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(15, 52, 96, 0.5);
  z-index: 90;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.quran-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 52, 96, 0.6);
}
.quran-fab:active {
  transform: scale(0.92);
}

/* ═══════════════════════════════════════════════════
   READER HEADER — REDESIGN
   Row 1: Back + Nama Surah (full, tidak terpotong)
   Row 2: Nav Surah + Toolbar semua icon
   ═══════════════════════════════════════════════════ */
.reader-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f3460 100%);
  padding: 12px 14px 8px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 20px rgba(15, 52, 96, 0.4);
}

/* ROW 1: Back + Info — nama tidak wrap lagi */
.reader-header-row1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  min-width: 0;
}

.reader-back-btn {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  flex-shrink: 0;
  transition: background 0.2s;
}
.reader-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.reader-surah-info {
  flex: 1;
  min-width: 0;
}

.reader-surah-name {
  color: #ffd700;
  font-size: 1.08em;
  font-weight: 800;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.reader-surah-meta {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72em;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Icons pindah ke row2, tidak ada di row1 lagi */
.reader-header-actions {
  display: none;
}

/* ROW 2: Nav surah ←→ + divider + semua icon tools */
.reader-header-row2 {
  display: flex;
  align-items: center;
  gap: 5px;
}

.surah-nav-btn {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78em;
  flex-shrink: 0;
  transition: background 0.2s;
}
.surah-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.surah-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.surah-selector-btn {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  color: white;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 0.78em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.surah-selector-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.surah-selector-btn span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.surah-selector-btn i:last-child {
  font-size: 0.7em;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Divider antara nav dan tools */
.reader-toolbar-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  margin: 0 2px;
}

/* Tool icons di row2 — sama ukuran dengan nav btn */
.reader-action-btn {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  flex-shrink: 0;
  transition:
    background 0.2s,
    color 0.2s;
}
.reader-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}
.reader-action-btn.active {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.45);
}
#qrHafalBtn.active {
  background: rgba(255, 215, 0, 0.25);
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.5);
}

/* ── Progress Bar ───────────────────────────────── */
.reader-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
}
.reader-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffaa00);
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* ── Mode Sheet ─────────────────────────────────── */
.qr-mode-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 52, 96, 0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.qr-mode-sheet {
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 40px;
  width: 100%;
  max-width: 480px;
  animation: slideUpSheet 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.qr-sheet-handle {
  width: 40px;
  height: 4px;
  background: #e9ecef;
  border-radius: 99px;
  margin: 0 auto 24px;
}
.qr-sheet-hero {
  text-align: center;
  margin-bottom: 20px;
}
.qr-sheet-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.6em;
  color: #ffd700;
}
.qr-sheet-hero h3 {
  font-size: 1.2em;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}
.qr-sheet-hero p {
  font-size: 0.85em;
  color: #64748b;
}
.qr-last-pos-card {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 1.5px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.qr-last-pos-icon {
  width: 40px;
  height: 40px;
  background: #2563eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1em;
  flex-shrink: 0;
}
.qr-last-pos-label {
  font-size: 0.72em;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.qr-last-pos-value {
  font-size: 0.95em;
  font-weight: 700;
  color: #1e3a5f;
  margin-top: 2px;
}
.qr-mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qr-mode-btn {
  padding: 15px 18px;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9em;
  font-weight: 700;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}
.qr-mode-btn-primary {
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  color: white;
}
.qr-mode-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 52, 96, 0.35);
}
.qr-mode-btn-secondary {
  background: white;
  border-color: #e2e8f0;
  color: #1e293b;
}
.qr-mode-btn-secondary:hover {
  border-color: #1e3a5f;
  background: #f8fafc;
}
.qr-mode-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  flex-shrink: 0;
}
.qr-mode-btn-primary .qr-mode-btn-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #ffd700;
}
.qr-mode-btn-secondary .qr-mode-btn-icon {
  background: #f1f5f9;
  color: #64748b;
}
.qr-mode-btn-text strong {
  display: block;
}
.qr-mode-btn-text small {
  font-weight: 400;
  opacity: 0.75;
  font-size: 0.82em;
}

/* ── Bismillah ──────────────────────────────────── */
.bismillah-section {
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  padding: 24px;
  text-align: center;
  border-bottom: 1px solid #fef08a;
}
.bismillah-arabic {
  font-family: "Amiri Quran", "Traditional Arabic", "Arabic Typesetting", serif;
  font-size: 2.2em;
  color: #1e3a5f;
  line-height: 2.2;
  direction: rtl;
}

/* ── Surah Header ───────────────────────────────── */
.surah-content-header {
  background: white;
  padding: 16px 20px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.surah-arabic-title {
  font-family: "Amiri Quran", "Traditional Arabic", serif;
  font-size: 1.5em;
  color: #1e3a5f;
  direction: rtl;
}
.surah-badge {
  background: #1e3a5f;
  color: #ffd700;
  font-size: 0.72em;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── Ayat Items ─────────────────────────────────── */
.ayat-list {
  padding-bottom: 120px;
}
.ayat-item {
  background: white;
  padding: 20px 18px 16px;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
  transition: background 0.15s;
}
.ayat-item:active {
  background: #fafafa;
}
.ayat-item.is-last-read {
  background: linear-gradient(to right, #eff6ff, #f8fbff);
  border-left: 4px solid #2563eb;
}
.ayat-item.is-bookmarked {
  border-left: 4px solid #ffd700;
}
.ayat-item.is-last-read.is-bookmarked {
  border-left: 4px solid;
  border-image: linear-gradient(180deg, #2563eb 50%, #ffd700 50%) 1;
}
.ayat-pos-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #2563eb;
  color: white;
  font-size: 0.68em;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.ayat-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ayat-num-circle {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  color: #ffd700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72em;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.25);
}
.ayat-btn-group {
  display: flex;
  gap: 6px;
}
.ayat-btn {
  width: 30px;
  height: 30px;
  background: #f8f9fa;
  border: 1.5px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 0.72em;
  transition: all 0.15s;
}
.ayat-btn:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.ayat-btn.pos-set {
  background: #eff6ff;
  color: #2563eb;
  border-color: #2563eb;
}
.ayat-btn.bookmarked {
  background: #fefce8;
  color: #d97706;
  border-color: #fcd34d;
}

/* ── Teks Arab ──────────────────────────────────── */
.ayat-arabic-text {
  font-family:
    "Amiri Quran", "Traditional Arabic", "Arabic Typesetting", "Amiri", serif;
  font-size: var(--arabic-size, 1.85em);
  line-height: 2.6;
  text-align: right;
  direction: rtl;
  color: #1a1a2e;
  margin-bottom: 14px;
  font-weight: 400;
  transition: font-size 0.2s;
  word-spacing: 4px;
}

/* ── Terjemahan ─────────────────────────────────── */
.ayat-translation {
  font-size: 0.87em;
  line-height: 1.75;
  color: #555e70;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  border-left: 3px solid #e2e8f0;
}
.ayat-translation .n {
  color: #2563eb;
  font-weight: 700;
  margin-right: 4px;
}

/* ── Surah List Sheet ───────────────────────────── */
.surah-list-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}
.surah-list-sheet {
  background: white;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUpSheet 0.3s ease;
}
.surah-list-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.surah-list-handle {
  width: 40px;
  height: 4px;
  background: #e9ecef;
  border-radius: 99px;
  margin: 0 auto 14px;
}
.surah-list-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  border: 1.5px solid #e9ecef;
  border-radius: 10px;
  padding: 9px 12px;
}
.surah-list-search i {
  color: #adb5bd;
  font-size: 0.85em;
}
.surah-list-search input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.9em;
  outline: none;
  color: #1e293b;
}
.surah-list-body {
  overflow-y: auto;
  flex: 1;
}
.surah-list-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  transition: background 0.15s;
}
.surah-list-item:hover {
  background: #f8f9fa;
}
.surah-list-item.active {
  background: #eff6ff;
}
.surah-list-item.unavailable {
  opacity: 0.45;
}
.surah-num-box {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  color: #ffd700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  font-weight: 800;
  flex-shrink: 0;
}
.surah-list-info {
  flex: 1;
}
.surah-list-latin {
  font-weight: 700;
  font-size: 0.9em;
  color: #1e293b;
}
.surah-list-meta {
  font-size: 0.75em;
  color: #94a3b8;
  margin-top: 1px;
}
.surah-list-arabic {
  font-family: "Amiri Quran", "Traditional Arabic", serif;
  font-size: 1.2em;
  color: #1e3a5f;
}
.surah-unavail-badge {
  font-size: 0.68em;
  background: #f1f5f9;
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* ── Konfirmasi Catat ───────────────────────────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.confirm-sheet {
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 36px;
  width: 100%;
  max-width: 480px;
  animation: slideUpSheet 0.3s ease;
}
.confirm-handle {
  width: 40px;
  height: 4px;
  background: #e9ecef;
  border-radius: 99px;
  margin: 0 auto 22px;
}
.confirm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.confirm-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2em;
  flex-shrink: 0;
}
.confirm-header h3 {
  font-size: 1.05em;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 3px;
}
.confirm-header p {
  font-size: 0.8em;
  color: #64748b;
}
.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #16a34a;
  border: 1.5px solid #bbf7d0;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.75em;
  font-weight: 700;
  margin-bottom: 14px;
}
.confirm-data-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.confirm-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.87em;
}
.confirm-data-row:last-child {
  border-bottom: none;
}
.confirm-data-row span:first-child {
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 7px;
}
.confirm-data-row strong {
  color: #1e293b;
}
.confirm-edit-section {
  margin-bottom: 16px;
}
.confirm-edit-section label {
  display: block;
  font-size: 0.8em;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.confirm-edit-section input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9em;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.confirm-edit-section input:focus {
  border-color: #2563eb;
  outline: none;
}
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.confirm-btn-send {
  padding: 14px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s;
}
.confirm-btn-send:hover {
  transform: translateY(-1px);
}
.confirm-btn-row {
  display: flex;
  gap: 8px;
}
.confirm-btn-edit {
  flex: 1;
  padding: 12px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.87em;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}
.confirm-btn-edit:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.confirm-btn-cancel {
  flex: 1;
  padding: 12px;
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  border-radius: 12px;
  font-size: 0.87em;
  font-weight: 700;
  color: #e11d48;
  cursor: pointer;
  transition: all 0.2s;
}
.confirm-btn-cancel:hover {
  background: #ffe4e6;
}

/* ── FAB Catat ──────────────────────────────────── */
.reader-catat-fab {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(22, 163, 74, 0.4);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  white-space: nowrap;
  z-index: 80;
  letter-spacing: 0.2px;
}
.reader-catat-fab:hover {
  box-shadow: 0 8px 30px rgba(22, 163, 74, 0.5);
  transform: translateX(-50%) translateY(-2px);
}
.reader-catat-fab:active {
  transform: translateX(-50%) scale(0.95);
}

/* ── Not Available ──────────────────────────────── */
.surah-unavail-state {
  padding: 48px 30px;
  text-align: center;
  background: white;
}
.unavail-icon {
  width: 72px;
  height: 72px;
  background: #f8f9fa;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8em;
  color: #adb5bd;
}
.unavail-title {
  font-size: 1em;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}
.unavail-desc {
  font-size: 0.85em;
  color: #64748b;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   FITUR BARU
   ═══════════════════════════════════════════════════ */

/* ── Mode Hafalan ───────────────────────────────── */
.hafalan-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  color: white;
  padding: 12px 18px;
  font-size: 0.82em;
  font-weight: 600;
}
.hafalan-banner i {
  color: #ffd700;
  font-size: 1em;
}
.hafalan-banner span {
  flex: 1;
}
.hafalan-banner button {
  background: rgba(255, 215, 0, 0.2);
  border: 1.5px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.hafalan-banner button:hover {
  background: rgba(255, 215, 0, 0.35);
}
.ayat-arabic-text.hafalan-hidden {
  cursor: pointer;
  user-select: none;
  filter: blur(7px);
  transition: filter 0.35s ease;
}
.ayat-arabic-text.hafalan-hidden:hover {
  filter: blur(4px);
}
.hafalan-placeholder {
  display: none;
}
@keyframes hafalanReveal {
  0% {
    filter: blur(7px);
    opacity: 0.5;
    transform: scale(0.98);
  }
  100% {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Pencarian Ayat ─────────────────────────────── */
.qr-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 52, 96, 0.65);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
}
.qr-search-sheet {
  background: white;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUpSheet 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.qr-search-header {
  padding: 20px 20px 0;
  flex-shrink: 0;
}
.qr-search-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.qr-search-icon-sm {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  font-size: 1em;
  flex-shrink: 0;
}
.qr-search-header h3 {
  font-size: 1.05em;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 2px;
}
.qr-search-header p {
  font-size: 0.8em;
  color: #64748b;
}
.qr-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 20px 10px;
  transition: border-color 0.2s;
}
.qr-search-box:focus-within {
  border-color: #1e3a5f;
  background: white;
}
.qr-search-box > i {
  color: #94a3b8;
  font-size: 0.9em;
  flex-shrink: 0;
}
.qr-search-box input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.95em;
  outline: none;
  color: #1e293b;
}
.qr-search-clear {
  width: 24px;
  height: 24px;
  background: #e9ecef;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 0.72em;
  flex-shrink: 0;
}
.qr-search-clear:hover {
  background: #d1d5db;
}
.qr-search-stats {
  font-size: 0.78em;
  font-weight: 700;
  color: #16a34a;
  padding: 0 20px 8px;
  flex-shrink: 0;
}
.qr-search-results {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 16px;
}
.qr-search-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}
.qr-search-empty i {
  font-size: 2em;
  margin-bottom: 12px;
  display: block;
}
.qr-search-empty p {
  font-size: 0.9em;
  font-weight: 600;
  color: #64748b;
}
.qr-search-empty small {
  font-size: 0.8em;
  color: #94a3b8;
}
.qr-search-result-item {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
}
.qr-search-result-item:hover {
  background: #f8fafc;
}
.qr-search-result-surah {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.8em;
  font-weight: 700;
  color: #64748b;
}
.qr-search-result-ar {
  font-family: "Amiri Quran", "Traditional Arabic", serif;
  font-size: 1.3em;
  line-height: 2;
  text-align: right;
  direction: rtl;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.qr-search-result-id {
  font-size: 0.85em;
  line-height: 1.65;
  color: #555e70;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px 10px;
  border-left: 3px solid #e2e8f0;
}
mark.search-highlight {
  background: #fef08a;
  color: #854d0e;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}
.qr-search-more {
  text-align: center;
  padding: 16px;
  font-size: 0.8em;
  color: #94a3b8;
  font-weight: 600;
}

/* ── Font Size Sheet ────────────────────────────── */
.qr-font-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 52, 96, 0.65);
  backdrop-filter: blur(6px);
  z-index: 250;
  display: flex;
  align-items: flex-end;
}
.qr-font-sheet {
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 24px 24px 36px;
  width: 100%;
  animation: slideUpSheet 0.3s ease;
}
.qr-font-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95em;
  color: #1e293b;
  margin-bottom: 16px;
}
.qr-font-preview {
  font-family: "Amiri Quran", "Traditional Arabic", serif;
  direction: rtl;
  text-align: center;
  line-height: 2;
  padding: 16px 20px;
  color: #1a1a2e;
  background: #fefce8;
  border-radius: 12px;
  margin-bottom: 16px;
  transition: font-size 0.2s;
}
.qr-font-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}
.qr-font-btn {
  width: 44px;
  height: 44px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  color: #1e293b;
  transition: all 0.2s;
}
.qr-font-btn:hover {
  background: #1e3a5f;
  color: white;
  border-color: #1e3a5f;
}
.qr-font-val {
  font-size: 1.3em;
  font-weight: 800;
  color: #1e3a5f;
  min-width: 60px;
  text-align: center;
}
.qr-font-sizes {
  display: flex;
  gap: 8px;
}
.qr-font-preset {
  flex: 1;
  padding: 9px 4px;
  background: #f8f9fa;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.75em;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}
.qr-font-preset:hover {
  background: #1e3a5f;
  color: white;
  border-color: #1e3a5f;
}

/* ── Dark Mode ──────────────────────────────────── */
body.dark-mode #quranPage {
  background: #0f172a;
}
body.dark-mode .ayat-item {
  background: #1e293b;
  border-bottom-color: #334155;
}
body.dark-mode .ayat-item.is-last-read {
  background: linear-gradient(to right, #1e3a5f, #1e2d45);
}
body.dark-mode .ayat-arabic-text {
  color: #f1f5f9;
}
body.dark-mode .ayat-translation {
  color: #94a3b8;
  background: #0f172a;
  border-left-color: #334155;
}
body.dark-mode .ayat-btn {
  background: #334155;
  border-color: #475569;
  color: #64748b;
}
body.dark-mode .surah-content-header {
  background: #1e293b;
  border-bottom-color: #334155;
}
body.dark-mode .bismillah-section {
  background: linear-gradient(135deg, #1c1a00, #2a2500);
  border-bottom-color: #3d3600;
}
body.dark-mode .bismillah-arabic {
  color: #ffd700;
}
body.dark-mode .confirm-sheet,
body.dark-mode .surah-list-sheet,
body.dark-mode .qr-mode-sheet,
body.dark-mode .qr-search-sheet,
body.dark-mode .qr-font-sheet {
  background: #1e293b;
}
body.dark-mode .confirm-data-card {
  background: #0f172a;
  border-color: #334155;
}
body.dark-mode .confirm-data-row {
  border-bottom-color: #334155;
}
body.dark-mode .confirm-data-row strong {
  color: #f1f5f9;
}
body.dark-mode .surah-list-item {
  border-bottom-color: #334155;
}
body.dark-mode .surah-list-item:hover {
  background: #334155;
}
body.dark-mode .surah-list-latin {
  color: #f1f5f9;
}
body.dark-mode .confirm-edit-section input {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
body.dark-mode .qr-last-pos-card {
  background: linear-gradient(135deg, #1e3a5f, #1e2d45);
  border-color: #2563eb;
}
body.dark-mode .qr-sheet-hero h3,
body.dark-mode .confirm-header h3 {
  color: #f1f5f9;
}
body.dark-mode .confirm-btn-edit {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}
body.dark-mode .surah-list-search {
  background: #334155;
  border-color: #475569;
}
body.dark-mode .surah-list-search input {
  color: #f1f5f9;
}
body.dark-mode .surah-unavail-state {
  background: #1e293b;
}
body.dark-mode .unavail-icon {
  background: #334155;
}
body.dark-mode .qr-search-box {
  background: #334155;
  border-color: #475569;
}
body.dark-mode .qr-search-box input {
  color: #f1f5f9;
}
body.dark-mode .qr-search-result-item:hover {
  background: #334155;
}
body.dark-mode .qr-search-result-ar {
  color: #f1f5f9;
}
body.dark-mode .qr-search-result-id {
  background: #0f172a;
  border-left-color: #334155;
  color: #94a3b8;
}
body.dark-mode .qr-search-header h3 {
  color: #f1f5f9;
}
body.dark-mode .hafalan-banner {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}
body.dark-mode .sync-badge {
  background: #14532d;
  border-color: #166534;
  color: #4ade80;
}
body.dark-mode .qr-font-header {
  color: #f1f5f9;
}
body.dark-mode .qr-font-val {
  color: #ffd700;
}
body.dark-mode .qr-font-btn {
  background: #334155;
  border-color: #475569;
  color: #f1f5f9;
}
body.dark-mode .qr-font-preset {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}
body.dark-mode .qr-font-preview {
  background: #1c1a00;
  color: #ffd700;
}

/* ── Night Reading ──────────────────────────────── */
body.night-reading .ayat-arabic-text {
  color: #f5c842;
}
body.night-reading #quranPage {
  background: #0a0a0f;
}
body.night-reading .ayat-item {
  background: #0d0d14;
  border-bottom-color: #1a1a2e;
}
body.night-reading .ayat-translation {
  color: #8b9cb6;
  background: #0a0a0f;
  border-left-color: #1a1a2e;
}
body.night-reading .bismillah-section {
  background: linear-gradient(135deg, #0a0800, #0f0c00);
}

/* ── Page transition ────────────────────────────── */
.page.active {
  animation: pageFadeIn 0.22s ease-out;
}
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 380px) {
  .ayat-arabic-text {
    font-size: var(--arabic-size-sm, 1.45em);
  }
  .confirm-btn-row {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════
   NOTE MODAL (Catatan Bookmark Ayat)
═══════════════════════════════════════════════════════════ */
.qr-note-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.qr-note-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.qr-note-modal {
  background: var(--card-bg, #fff);
  width: 100%;
  border-radius: 24px 24px 0 0;
  padding: 6px 20px 32px;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.qr-note-modal-overlay.active .qr-note-modal {
  transform: translateY(0);
}
.qr-note-modal::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin: 8px auto 14px;
}
.qr-note-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.qr-note-modal-header strong {
  display: block;
  font-size: 15px;
  color: var(--text-primary, #111827);
}
.qr-note-modal-header small {
  font-size: 12px;
  color: #6b7280;
}
.qr-note-modal-header button {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  font-size: 13px;
}
.qr-note-ayat-preview {
  font-family: "Amiri Quran", serif;
  font-size: 20px;
  line-height: 2;
  text-align: right;
  direction: rtl;
  background: #fefce8;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #1c1917;
  max-height: 120px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
body.dark-mode .qr-note-ayat-preview {
  background: #1c1917;
  color: #fef3c7;
}
.qr-note-body label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.qr-note-body textarea {
  width: 100%;
  height: 110px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  background: var(--card-bg, #fff);
  color: var(--text-primary, #111827);
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.qr-note-body textarea:focus {
  border-color: #f59e0b;
}
.qr-note-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.qr-note-btn-delete {
  flex: 1;
  padding: 12px;
  border: 1.5px solid #fca5a5;
  border-radius: 12px;
  background: transparent;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.qr-note-btn-delete:hover {
  background: #fef2f2;
}
.qr-note-btn-save {
  flex: 2;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.qr-note-btn-save:hover {
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════════════
   BOOKMARK PAGE
═══════════════════════════════════════════════════════════ */
.bk-count-badge {
  background: #f59e0b;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}
.bk-list {
  padding: 12px 16px 80px;
}
.bk-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.bk-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: #d1d5db;
}
.bk-empty p {
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}
.bk-empty small {
  font-size: 12px;
  display: block;
  margin-bottom: 20px;
}
.bk-goto-quran {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bk-item {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.25s ease;
}
.bk-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
}
.bk-surah-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #111827);
}
.bk-ayat-num {
  display: block;
  font-size: 11px;
  color: #f59e0b;
  font-weight: 600;
  margin-top: 2px;
}
.bk-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 11px;
}
.bk-item-meta i {
  transition: transform 0.25s;
}
.bk-item.expanded .bk-item-meta i {
  transform: rotate(90deg);
}
.bk-note-preview {
  padding: 0 16px 10px;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bk-note-preview i {
  color: #f59e0b;
  margin-right: 4px;
}
.bk-item-actions {
  display: none;
  padding: 0 12px 14px;
  gap: 8px;
}
.bk-item.expanded .bk-item-actions {
  display: flex;
}
.bk-item-actions button {
  flex: 1;
  padding: 9px 6px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: var(--bg, #f9fafb);
  color: var(--text-primary, #374151);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}
.bk-item-actions button:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}
.bk-delete-btn {
  flex: 0 0 40px !important;
  color: #dc2626 !important;
}
.bk-delete-btn:hover {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
}

body.dark-mode .bk-item {
  background: #1e293b;
}
body.dark-mode .bk-item-actions button {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════════
   JADWAL KHATAM PAGE
═══════════════════════════════════════════════════════════ */
.khatam-form-wrap {
  padding: 12px 16px 80px;
}
.khatam-hero {
  text-align: center;
  padding: 24px 16px 20px;
}
.khatam-hero i {
  font-size: 48px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  display: block;
}
.khatam-hero h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin-bottom: 6px;
}
.khatam-hero p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

.khatam-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.khatam-form-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #374151);
  margin-bottom: 8px;
}
.khatam-form-group label i {
  color: #16a34a;
}
.khatam-form-group input[type="date"],
.khatam-form-group input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  background: var(--card-bg, #fff);
  color: var(--text-primary, #111827);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.khatam-form-group input:focus {
  border-color: #16a34a;
}
.khatam-halaman-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.khatam-halaman-row input {
  flex: 1;
}
.khatam-halaman-row small {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}
.khatam-hint {
  font-size: 11px;
  color: #16a34a;
  margin-top: 5px;
  display: block;
}
.khatam-hint i {
  margin-right: 4px;
}

.khatam-preview-card {
  min-height: 40px;
}
.khatam-preview {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #f0fdf4;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 8px;
}
body.dark-mode .khatam-preview {
  background: #052e16;
}
.khatam-preview-stat {
  text-align: center;
}
.khatam-preview-stat span {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #16a34a;
  line-height: 1;
}
.khatam-preview-stat.highlight span {
  color: #2563eb;
  font-size: 30px;
}
.khatam-preview-stat small {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  display: block;
}
.khatam-preview-divider {
  width: 1px;
  height: 40px;
  background: #d1fae5;
}
.khatam-level {
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
}
.khatam-level.easy {
  background: #f0fdf4;
  color: #16a34a;
}
.khatam-level.medium {
  background: #fffbeb;
  color: #d97706;
}
.khatam-level.hard {
  background: #fef2f2;
  color: #dc2626;
}
.khatam-preview-error {
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  padding: 10px 14px;
  border-radius: 10px;
}

.khatam-btn-start {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}
.khatam-btn-start:hover {
  opacity: 0.9;
}

/* Dashboard */
.khatam-dashboard {
  padding: 12px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.khatam-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-radius: 16px;
  padding: 16px 18px;
  color: white;
}
.khatam-status-card.khatam-done {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.khatam-status-card i {
  font-size: 28px;
  opacity: 0.9;
  flex-shrink: 0;
}
.khatam-status-card strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.khatam-status-card small {
  font-size: 11px;
  opacity: 0.85;
}

.khatam-progress-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.khatam-ring {
  display: block;
}
.khatam-ring-center {
  position: absolute;
  text-align: center;
}
.khatam-pct {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #16a34a;
}
.khatam-ring-center small {
  font-size: 11px;
  color: #9ca3af;
}

.khatam-stats-row {
  display: flex;
  justify-content: space-around;
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.khatam-stat {
  text-align: center;
}
.khatam-stat i {
  font-size: 20px;
  display: block;
  margin-bottom: 6px;
}
.khatam-stat span {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary, #111827);
}
.khatam-stat small {
  font-size: 11px;
  color: #9ca3af;
}

.khatam-checkin-card {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.khatam-checkin-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.khatam-checkin-label i {
  font-size: 20px;
  color: #16a34a;
  flex-shrink: 0;
}
.khatam-checkin-label strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary, #111827);
}
.khatam-checkin-label small {
  font-size: 11px;
  color: #6b7280;
}
.khatam-done-badge {
  margin-left: auto;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.khatam-checkin-input {
  display: flex;
  gap: 10px;
}
.khatam-checkin-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: var(--card-bg, #fff);
  color: var(--text-primary, #111827);
  outline: none;
}
.khatam-checkin-input input:focus {
  border-color: #16a34a;
}
.khatam-checkin-input button {
  padding: 10px 18px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.khatam-daily-bar {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.khatam-daily-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #374151);
  margin-bottom: 10px;
}
.khatam-bar-track {
  height: 10px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
}
.khatam-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #4ade80);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.khatam-history {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.khatam-history h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.khatam-history h4 i {
  color: #16a34a;
}
.khatam-history-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 90px;
  gap: 4px;
}
.khatam-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  height: 100%;
}
.khatam-bar-outer {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.khatam-bar-inner {
  width: 100%;
  min-height: 4px;
  background: #d1fae5;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
}
.khatam-bar-inner.done {
  background: linear-gradient(to top, #16a34a, #4ade80);
}
.khatam-bar-col small {
  font-size: 9px;
  color: #9ca3af;
  line-height: 1.2;
}
.khatam-bar-val {
  font-weight: 600;
  color: #6b7280 !important;
}

.khatam-reset-btn {
  width: 100%;
  padding: 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: transparent;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.khatam-reset-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
}

body.dark-mode .khatam-stats-row,
body.dark-mode .khatam-checkin-card,
body.dark-mode .khatam-daily-bar,
body.dark-mode .khatam-history {
  background: #1e293b;
}
body.dark-mode .khatam-bar-track {
  background: #334155;
}
body.dark-mode .khatam-checkin-input input {
  background: #0f172a;
  border-color: #334155;
}

/* ── Bookmark Page Header Info ──────────────────────────── */
.bk-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 14px;
  color: #78350f;
}
.dark-mode .bk-header-info {
  background: #292524;
  border-color: #44403c;
  color: #fbbf24;
}
