/* ==========================================================================
   AL-QUR'AN RISALAH - MODERN ISLAMIC DESIGN SYSTEM & 5 THEMES
   - Ultra-Clean Interface: Header Bersih, Pop-up Action Sheet
   - Mini Floating Player Pop-up Bawah dengan Kontrol Prev/Pause/Next
   - 99 Asmaul Husna Grid 6-7 Kolom
   - Font LPMQ Isep Misbah & Roboto
   ========================================================================== */

/* 1. Tema Default: Crem & Coksu (Cokelat Susu Mewah & Hangat) */
[data-theme="crem-coksu"], :root {
  --bg-main: #fbf8f2;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f4ede1;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #fdfaf5;
  --bg-glass: rgba(251, 248, 242, 0.95);
  
  --primary-emerald: #8c5e3c;       /* Warna Coksu / Caramel Milk Chocolate */
  --primary-emerald-dark: #6e4425;
  --primary-emerald-glow: rgba(140, 94, 60, 0.2);
  
  --primary-gold: #b37438;          /* Warm Honey Amber Gold */
  --primary-gold-light: #c88746;
  --primary-gold-glow: rgba(179, 116, 56, 0.22);
  
  --primary-accent: #8c5e3c;
  --primary-accent-gradient: linear-gradient(135deg, #a06e49 0%, #764828 100%);
  --gold-gradient: linear-gradient(135deg, #c88746 0%, #9e5d26 100%);
  --hero-gradient: linear-gradient(135deg, #7a4c2c 0%, #58331a 100%);

  --text-primary: #2d1e14;          /* Deep Cocoa Espresso */
  --text-secondary: #634b3d;        /* Warm Taupe Mocha */
  --text-muted: #8c7667;            /* Soft Milk Chocolate */
  --text-arabic: #1f1209;           /* Pure Deep Arabic Calligraphy Ink */
  --text-latin: #8c5025;            /* Warm Caramel Latin */
  
  --border-subtle: rgba(140, 94, 60, 0.12);
  --border-card: rgba(140, 94, 60, 0.18);
  --border-gold: rgba(179, 116, 56, 0.38);
  --border-emerald: rgba(140, 94, 60, 0.35);
  --border-badge: rgba(140, 94, 60, 0.28);
  --bg-badge: rgba(140, 94, 60, 0.1);
  --bg-pattern-image: none;

  /* Blok Warna Selang-Seling Pemisah Otomatis Ayat */
  --bg-ayah-odd: #fbf8f2;           /* Krem Susu Cerah */
  --bg-ayah-even: #f1e6d7;          /* Coksu Hangat Lembut */
}

/* 2. Tema Biru Tua Kombinasi Hitam */
[data-theme="biru-hitam"] {
  --bg-main: #070d17;
  --bg-surface: #0f1926;
  --bg-surface-elevated: #152234;
  --bg-card: rgba(15, 25, 38, 0.95);
  --bg-card-hover: #192a3f;
  --bg-glass: rgba(10, 18, 28, 0.95);
  
  --primary-emerald: #0ea5e9;
  --primary-emerald-dark: #0284c7;
  --primary-emerald-glow: rgba(140, 165, 233, 0.25);
  
  --primary-gold: #f59e0b;
  --primary-gold-light: #fbbf24;
  --primary-gold-glow: rgba(245, 158, 11, 0.25);
  
  --primary-accent: #0284c7;
  --primary-accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --hero-gradient: linear-gradient(135deg, #082032 0%, #0e2f44 50%, #061520 100%);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-arabic: #ffffff;
  --text-latin: #38bdf8;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(245, 158, 11, 0.35);
  --border-emerald: rgba(14, 165, 233, 0.35);
  --border-badge: rgba(14, 165, 233, 0.3);
  --bg-badge: rgba(14, 165, 233, 0.12);
  --bg-pattern-image: none;

  --bg-ayah-odd: #070d17;
  --bg-ayah-even: #0e1a2b;
}

/* 2. Tema Hitam Kombinasi Abu */
[data-theme="hitam-abu"] {
  --bg-main: #121214;
  --bg-surface: #18181b;
  --bg-surface-elevated: #27272a;
  --bg-card: rgba(24, 24, 27, 0.94);
  --bg-card-hover: #27272a;
  --bg-glass: rgba(18, 18, 20, 0.95);
  
  --primary-emerald: #a1a1aa;
  --primary-emerald-dark: #71717a;
  --primary-emerald-glow: rgba(161, 161, 170, 0.2);
  
  --primary-gold: #fbbf24;
  --primary-gold-light: #fef08a;
  --primary-gold-glow: rgba(251, 191, 36, 0.25);
  
  --primary-accent: #71717a;
  --primary-accent-gradient: linear-gradient(135deg, #52525b 0%, #3f3f46 100%);
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --hero-gradient: linear-gradient(135deg, #27272a 0%, #18181b 100%);

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-arabic: #ffffff;
  --text-latin: #cbd5e1;
  
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(251, 191, 36, 0.4);
  --border-emerald: rgba(161, 161, 170, 0.35);
  --border-badge: rgba(255, 255, 255, 0.2);
  --bg-badge: rgba(255, 255, 255, 0.08);
  --bg-pattern-image: none;

  --bg-ayah-odd: #121214;
  --bg-ayah-even: #1b1b22;
}

/* 3. Tema Pink Muda Bintik Samar & Aesthetic */
[data-theme="pink-bintik"] {
  --bg-main: #fdf4f8;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(253, 244, 248, 0.96);
  
  --primary-emerald: #db2777;
  --primary-emerald-dark: #be185d;
  --primary-emerald-glow: rgba(219, 39, 119, 0.15);
  
  --primary-gold: #f43f5e;
  --primary-gold-light: #fb7185;
  --primary-gold-glow: rgba(244, 63, 94, 0.15);
  
  --primary-accent: #db2777;
  --primary-accent-gradient: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
  --gold-gradient: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
  --hero-gradient: linear-gradient(135deg, #be185d 0%, #831843 100%);

  --text-primary: #4a044e;
  --text-secondary: #701a75;
  --text-muted: #9d174d;
  --text-arabic: #2e0231;
  --text-latin: #be185d;
  
  --border-subtle: rgba(219, 39, 119, 0.12);
  --border-card: rgba(244, 114, 182, 0.2);
  --border-gold: rgba(244, 63, 94, 0.3);
  --border-emerald: rgba(219, 39, 119, 0.3);
  --border-badge: rgba(219, 39, 119, 0.2);
  --bg-badge: rgba(219, 39, 119, 0.08);

  /* Bintik Samar, Sedikit & Estetik */
  --bg-pattern-image: radial-gradient(circle, rgba(236, 72, 153, 0.16) 1.2px, transparent 1.2px);
  --bg-pattern-size: 34px 34px;

  --bg-ayah-odd: #fdf4f8;
  --bg-ayah-even: #fae3ee;
}

/* 4. Tema Krem Kombinasi Abu */
[data-theme="krem-abu"] {
  --bg-main: #f8f6f0;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(248, 246, 240, 0.95);
  
  --primary-emerald: #475569;
  --primary-emerald-dark: #334155;
  --primary-emerald-glow: rgba(71, 85, 105, 0.2);
  
  --primary-gold: #b45309;
  --primary-gold-light: #d97706;
  --primary-gold-glow: rgba(180, 83, 9, 0.2);
  
  --primary-accent: #475569;
  --primary-accent-gradient: linear-gradient(135deg, #64748b 0%, #334155 100%);
  --gold-gradient: linear-gradient(135deg, #d97706 0%, #92400e 100%);
  --hero-gradient: linear-gradient(135deg, #334155 0%, #1e293b 100%);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-arabic: #0f172a;
  --text-latin: #0284c7;
  
  --border-subtle: rgba(100, 116, 139, 0.15);
  --border-card: rgba(100, 116, 139, 0.2);
  --border-gold: rgba(217, 119, 6, 0.35);
  --border-emerald: rgba(71, 85, 105, 0.35);
  --border-badge: rgba(71, 85, 105, 0.2);
  --bg-badge: rgba(71, 85, 105, 0.08);
  --bg-pattern-image: none;
}

/* 5. Tema Krem Kombinasi Pink */
[data-theme="krem-pink"] {
  --bg-main: #faf5ee;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(250, 245, 238, 0.95);
  
  --primary-emerald: #db2777;
  --primary-emerald-dark: #be185d;
  --primary-emerald-glow: rgba(219, 39, 119, 0.2);
  
  --primary-gold: #c2410c;
  --primary-gold-light: #ea580c;
  --primary-gold-glow: rgba(194, 65, 12, 0.2);
  
  --primary-accent: #db2777;
  --primary-accent-gradient: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
  --gold-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --hero-gradient: linear-gradient(135deg, #9d174d 0%, #701a75 100%);

  --text-primary: #3c0919;
  --text-secondary: #651a2d;
  --text-muted: #882b42;
  --text-arabic: #2a0410;
  --text-latin: #db2777;
  
  --border-subtle: rgba(219, 39, 119, 0.15);
  --border-card: rgba(219, 39, 119, 0.2);
  --border-gold: rgba(234, 88, 12, 0.35);
  --border-emerald: rgba(219, 39, 119, 0.35);
  --border-badge: rgba(219, 39, 119, 0.2);
  --bg-badge: rgba(219, 39, 119, 0.08);
  --bg-pattern-image: none;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-main);
  background-image: var(--bg-pattern-image);
  background-size: var(--bg-pattern-size, 16px 16px);
  background-attachment: fixed;
  padding-bottom: 75px; /* Beri ruang ekstra untuk floating player */
}

.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem 0.75rem 2rem 0.75rem;
  flex: 1;
  width: 100%;
}

.view-section {
  display: none !important;
}

.view-section.active {
  display: block !important;
  animation: fadeInView 0.2s ease forwards;
}

/* Tampilan Dashboard: Centered Sempurna Vertikal & Horizontal */
#view-dashboard {
  position: relative;
  min-height: calc(100vh - 100px);
  width: 100%;
  display: none;
}

#view-dashboard.active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 1.5rem 0.5rem;
}

/* Background Masjid Nabawi Realistis Transparan */
.dashboard-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/masjid_nabawi.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.22;
  filter: saturate(1.15) brightness(0.9);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

[data-theme="pink-bintik"] .dashboard-bg-overlay {
  opacity: 0.15;
}
[data-theme="krem-abu"] .dashboard-bg-overlay,
[data-theme="krem-pink"] .dashboard-bg-overlay {
  opacity: 0.16;
}
[data-theme="hitam-abu"] .dashboard-bg-overlay,
[data-theme="biru-hitam"] .dashboard-bg-overlay {
  opacity: 0.25;
}

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

/* Navigasi Atas Sederhana (Hanya Tombol Panah Kembali) */
.btn-icon-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 0.45rem;
}

.btn-icon-back:hover {
  border-color: var(--primary-emerald);
  color: var(--primary-emerald);
}

/* Dashboard Menu List (7 Menu - Centered, Rata Tengah, Proporsional, Frosted Glass) */
.dashboard-container {
  width: 100%;
  max-width: 440px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.dashboard-menu-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
}

.dashboard-menu-row {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.78rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

.dashboard-menu-row:hover,
.dashboard-menu-row:active {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary-emerald);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), 0 0 14px var(--primary-emerald-glow);
}

.menu-row-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  gap: 0.15rem;
}

.menu-row-info strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.015em;
}

.menu-row-info span {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Al-Qur'an Controls (Pencarian, Font Size, Palet Warna) */
.quran-list-controls-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.search-box-wrapper {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
}

.btn-ctrl-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
}

/* Ultra Compact Surah Grid (12+ Surah per Layar) */
.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.3rem;
}

.surah-card-compact {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  height: 42px;
}

.surah-card-compact:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-emerald);
}

.surah-compact-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.surah-compact-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  background: var(--bg-badge);
  border: 1px solid var(--border-badge);
  color: var(--primary-emerald);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.surah-compact-details {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
}

.surah-compact-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-overflow: ellipsis;
  overflow: hidden;
}

.surah-compact-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-overflow: ellipsis;
  overflow: hidden;
}

.surah-compact-arabic {
  font-family: var(--font-arabic-lpmq);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-gold-light);
  margin-left: 0.4rem;
  white-space: nowrap;
}

/* ==========================================================================
   Surah Reader - Modern Sticky Header & Navigasi Cepat
   ========================================================================== */
.reader-sticky-header {
  position: sticky;
  top: 0;
  z-index: 250;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 14px 14px;
  padding: 0.45rem 0.65rem 0.4rem 0.65rem;
  margin-bottom: 0.25rem; /* Lebih rapat ke Bismillah/ayat */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.reader-slim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.reader-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-modern-back {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-modern-back:hover,
.btn-modern-back:active {
  background: var(--bg-hover);
  transform: scale(0.95);
  border-color: var(--primary-gold);
}

.reader-juz-info {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.32rem;
  white-space: nowrap;
}

.reader-juz-info .dot-sep {
  color: var(--primary-gold);
  font-size: 0.75rem;
}

.reader-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-topbar-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  width: 33px;
  height: 33px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.btn-topbar-icon svg {
  display: block;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.btn-topbar-icon:hover {
  color: var(--primary-gold);
  border-color: var(--primary-gold);
  transform: translateY(-1px);
}

.btn-topbar-icon:hover svg {
  transform: scale(1.08);
}

.btn-topbar-icon:active {
  transform: scale(0.92);
}

.btn-topbar-icon.active {
  background: var(--primary-gold);
  color: #ffffff !important;
  border-color: var(--primary-gold);
  box-shadow: 0 2px 10px rgba(179, 116, 56, 0.35);
}

/* Bilah Navigasi Pindah Surah Ringkas (Sebelum, Saat ini, Sesudah) */
.surah-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.2rem 0.35rem;
}

.btn-nav-surah {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-nav-surah:hover,
.btn-nav-surah:active {
  background: var(--bg-surface);
  color: var(--primary-gold);
}

.nav-surah-current {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-gold);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Barisan Ayat Bersih (Blok Warna Selang-Seling Tanpa Kotak Pemisah Kanan Kiri) */
#view-reader {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  width: calc(100% + 1.5rem);
}

.ayah-list {
  display: flex;
  flex-direction: column;
  gap: 0;                             /* Tanpa jarak/gap antar ayat */
  border-radius: 0;                   /* Satukan penuh ke sisi kanan dan kiri */
  overflow: hidden;
  border: none;                       /* Tanpa kotak pemisah luar */
  box-shadow: none;
  width: 100%;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@keyframes slideInFromRight {
  from { opacity: 0.3; transform: translateX(32px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromLeft {
  from { opacity: 0.3; transform: translateX(-32px); }
  to { opacity: 1; transform: translateX(0); }
}

.ayah-list.slide-in-right {
  animation: slideInFromRight 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ayah-list.slide-in-left {
  animation: slideInFromLeft 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ayah-card-clean {
  border: none;                       /* HILANGKAN SEMUA GARIS KOTAK PEMISAH */
  border-radius: 0;                   /* HILANGKAN SUDUT KOTAK */
  box-shadow: none;
  padding: 0.75rem 1rem 0.85rem 1rem; /* Jarak pas: dari agak kanan sampai agak ujung kiri, tidak mepet banget */
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease;
  width: 100%;
}

/* Tata Letak Atas: Nomor Latin di Kiri, Teks Arab di Kanan */
.ayah-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.35rem;
  width: 100%;
}

.ayah-left-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.ayah-num-latin {
  min-width: 28px;
  height: 28px;
  padding: 0 0.35rem;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--primary-gold);
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  user-select: none;
}

.ayah-top-arabic {
  flex: 1;
  text-align: right;
  direction: rtl;
}

.arabic-text {
  font-family: var(--font-arabic-lpmq) !important;
  color: var(--text-arabic) !important;
  line-height: var(--arabic-line-height, 1.8);
  direction: rtl;
  text-align: right;
  word-spacing: 2px;
}

/* Mode 2 Kolom (Split: Arab di Kanan, Terjemahan di Kiri) */
.ayah-split-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
}

.ayah-split-trans {
  flex: 1;
  text-align: left;
  direction: ltr;
  padding-right: 0.75rem;
  border-right: 1px dashed var(--border-subtle);
}

.ayah-split-arabic {
  flex: 1.25;
  text-align: right;
  direction: rtl;
}

/* Lencana Nomor Halaman Mushaf Fisik (Penyesuai Halaman di Al-Qur'an Cetak) */
.ayah-page-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-gold);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  padding: 0.12rem 0.38rem;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ayah-page-badge:hover,
.ayah-page-badge:active {
  background: var(--primary-gold);
  color: #ffffff;
  border-color: var(--primary-gold);
}

/* ==========================================================================
   Mode Lembaran Mushaf Fisik Asli (Persis Al-Qur'an Cetak 1 Halaman Utuh)
   ========================================================================== */
.mushaf-physical-page {
  background: var(--bg-ayah-odd);
  border: 2px solid var(--border-gold);
  outline: 1px solid var(--border-gold);
  outline-offset: -5px;
  border-radius: 6px;
  padding: 1rem 0.85rem 1.4rem 0.85rem;
  margin: 0.1rem 0.35rem 1.5rem 0.35rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  user-select: text;
}

.mushaf-bismillah-box {
  font-family: var(--font-arabic-bismillah) !important;
  font-size: 19px !important;
  font-weight: 300 !important;
  color: var(--primary-gold);
  text-align: center;
  margin: 0.15rem 0 0.35rem 0;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(179, 116, 56, 0.12);
}

.mushaf-text-body {
  text-align: justify;
  text-justify: inter-word;
  direction: rtl;
  line-height: 2.1 !important;
  font-family: var(--font-arabic-lpmq) !important;
  word-spacing: 2px;
  color: var(--text-arabic) !important;
}

.mushaf-ayah-inline {
  font-family: var(--font-arabic-lpmq) !important;
  font-size: var(--arabic-size, 22px) !important;
  color: var(--text-arabic) !important;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.15s ease;
  display: inline;
  padding: 0 1px;
}

.mushaf-ayah-inline:hover,
.mushaf-ayah-inline:active {
  background: rgba(179, 116, 56, 0.18);
}

.mushaf-num-marker {
  font-family: var(--font-arabic-lpmq) !important;
  color: var(--primary-gold);
  font-size: 1em;
  margin: 0 0.15rem;
  display: inline-block;
  user-select: none;
}

/* Jarak Ayat Pertama Mepet ke Bismillah Tanpa Celah Berlebih */
.ayah-card-clean:first-child {
  padding-top: 0.45rem;
}

/* Blok Warna Selang-Seling Otomatis */
.ayah-card-clean:nth-child(odd) {
  background: var(--bg-ayah-odd);
}

.ayah-card-clean:nth-child(even) {
  background: var(--bg-ayah-even);
}

.ayah-card-clean:hover {
  filter: brightness(0.96);
}

[data-theme="biru-hitam"] .ayah-card-clean:hover,
[data-theme="hitam-abu"] .ayah-card-clean:hover {
  filter: brightness(1.2);
}

.ayah-card-clean.playing {
  background: rgba(179, 116, 56, 0.25) !important;
}

.ayah-card-clean.playing::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4.5px;
  background: var(--primary-gold);
}

.ayah-meta-indicators {
  display: flex;
  gap: 0.35rem;
  position: absolute;
  top: 0.5rem;
  left: 0.65rem;
}

.badge-indicator {
  font-size: 0.7rem;
}

.badge-indicator.bookmark {
  color: var(--primary-gold);
}

.badge-indicator.note {
  color: var(--primary-emerald);
}

.ayah-saved-note {
  margin-top: 0.4rem;
  background: rgba(245, 158, 11, 0.06);
  border: 1px dashed var(--border-gold);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.ayah-saved-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 0.2rem;
}

/* Mini Floating Player Pop-up Bawah (Kecil, Ramping & Lengkap) */
.mini-floating-player {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(140px);
  width: calc(100% - 20px);
  max-width: 440px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--primary-gold);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
  z-index: 2200;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.mini-floating-player.show {
  transform: translateX(-50%) translateY(0);
}

.mini-player-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary-gold);
  width: 0%;
  transition: width 0.1s linear;
}

.mini-player-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}

.mini-player-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-emerald);
  box-shadow: 0 0 8px var(--primary-emerald);
  animation: miniPulse 1s infinite alternate;
}

@keyframes miniPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

.mini-player-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
}

.mini-player-text strong {
  font-size: 0.78rem;
  color: var(--text-primary);
  text-overflow: ellipsis;
  overflow: hidden;
}

.mini-player-text span {
  font-size: 0.65rem;
  color: var(--primary-gold);
  text-overflow: ellipsis;
  overflow: hidden;
}

.mini-player-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.btn-mini-ctrl {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
}

.btn-mini-ctrl.play {
  background: var(--primary-gold);
  color: #000000;
  border-color: var(--primary-gold);
}

.btn-mini-ctrl.close {
  color: var(--text-muted);
}

/* Action Sheet Modal (Menu Pop-up Fitur Ayat) */
.action-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.btn-sheet-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.btn-sheet-action i {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  color: var(--primary-emerald);
}

.btn-sheet-action:hover {
  border-color: var(--primary-emerald);
  background: var(--bg-badge);
}

.btn-sheet-action.active {
  border-color: var(--primary-gold);
  background: rgba(245, 158, 11, 0.15);
  color: var(--primary-gold);
}

.btn-sheet-action.active i {
  color: var(--primary-gold);
}

/* Terjemah Perkata (4 Kata per Baris - Rapi & Proporsional) */
.word-by-word-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  direction: rtl;
}

@media (max-width: 480px) {
  .word-by-word-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
  }
}

.word-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
}

.word-arabic {
  font-family: var(--font-arabic-lpmq) !important;
  font-size: 1.15rem;
  color: var(--primary-gold-light);
  margin-bottom: 0.2rem;
  direction: rtl;
  line-height: 1.2;
}

.word-trans {
  font-family: var(--font-trans) !important;
  font-size: 0.68rem;
  color: var(--text-primary);
  line-height: 1.15;
  direction: ltr;
}

/* 99 Asmaul Husna (Urutan Dimulai dari KANAN / RTL) */
.asmaul-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5%, 1fr));
  gap: 0.35rem;
  direction: rtl; /* Urutan dimulai dari kanan */
}

@media (max-width: 900px) {
  .asmaul-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 600px) {
  .asmaul-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.asmaul-card-compact {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.45rem 0.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  direction: ltr; /* Konten di dalam kartu tetap rapi */
}

.asmaul-num {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 700;
}

.asmaul-arabic {
  font-family: var(--font-arabic-lpmq);
  font-size: 1.05rem;
  color: var(--primary-gold-light);
  margin: 0.1rem 0;
  line-height: 1.2;
}

.asmaul-latin {
  font-family: var(--font-latin);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.asmaul-arti {
  font-family: var(--font-trans);
  font-size: 0.58rem;
  color: var(--text-muted);
  line-height: 1.1;
  margin-top: 0.1rem;
}

/* Doa & Sholat */
.doa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
}

.doa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.85rem;
}

.prayer-hero {
  background: var(--hero-gradient);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  color: #ffffff;
  text-align: center;
  margin-bottom: 1rem;
}

.city-select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  outline: none;
}

.city-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.countdown-timer {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
}

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 0.45rem;
}

.prayer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.85rem 0.55rem;
  text-align: center;
}

.tasbih-container {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
}

.dzikir-dropdown {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
}

.tasbih-click-button {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--primary-emerald) 0%, var(--primary-emerald-dark) 100%);
  border: 5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 1rem auto;
}

.tasbih-count-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
}

/* Modals & Welcome */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.modal-header {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.15rem;
  overflow-y: auto;
  line-height: 1.5;
}

.welcome-popup-card {
  text-align: center;
  padding: 2rem 1.25rem;
  max-width: 420px;
}

.welcome-logo-img {
  width: 130px;
  height: 130px;
  margin: 0 auto 1.25rem auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
}

.btn-welcome-start {
  width: 100%;
  background: var(--primary-accent-gradient);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1rem;
}

.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.theme-card-option {
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface);
}

.theme-card-option.active {
  border-color: var(--primary-gold);
  background: var(--bg-badge);
}

.theme-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  flex-shrink: 0;
}

.notes-textarea {
  width: 100%;
  height: 120px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.char-counter-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.25rem;
}

.btn-mini-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
}

.btn-mini-action.delete {
  color: #ef4444;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-emerald);
  color: var(--text-primary);
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

/* ==========================================================================
   FITUR CATATAN & TADABBUR HARIAN
   ========================================================================== */
.catatan-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.catatan-header-title {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-left: 0.25rem;
}

.catatan-header-title strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-gold-light);
}

.catatan-header-title span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.catatan-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-catatan-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-catatan-action:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary-emerald);
  color: var(--primary-emerald);
}

/* Tab Switcher: Mulai Mencatat vs Riwayat */
.catatan-tabs-nav {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.3rem;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.catatan-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 0.85rem;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.22s ease;
}

.catatan-tab-btn:hover {
  color: var(--text-primary);
}

.catatan-tab-btn.active {
  background: var(--primary-accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-emerald-glow);
}

.catatan-tab-content {
  display: none;
}

.catatan-tab-content.active {
  display: block;
  animation: fadeInView 0.2s ease forwards;
}

/* Editor Form Catatan */
.catatan-editor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.catatan-editor-header {
  margin-bottom: 0.85rem;
}

.catatan-live-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-gold);
}

.catatan-ayah-linker {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.95rem;
}

.linker-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.linker-inputs {
  display: flex;
  gap: 0.5rem;
}

.catatan-ayah-preview-box {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-surface-elevated);
  border-radius: 8px;
  border-left: 3px solid var(--primary-gold);
}

.catatan-main-textarea {
  width: 100%;
  min-height: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.catatan-main-textarea:focus {
  border-color: var(--primary-emerald);
}

.catatan-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.btn-catatan-primary {
  background: var(--primary-accent-gradient);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 14px var(--primary-emerald-glow);
  transition: transform 0.2s ease;
}

.btn-catatan-primary:hover {
  transform: translateY(-2px);
}

.btn-catatan-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Timeline Riwayat Catatan */
.catatan-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.catatan-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: 16px;
}

.catatan-date-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.catatan-date-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.4rem;
}

.date-count-badge {
  font-size: 0.68rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  margin-left: auto;
}

.catatan-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.catatan-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.catatan-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-emerald);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.catatan-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.catatan-time-pill {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.catatan-ayah-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-gold-light);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.catatan-general-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-emerald);
  background: var(--bg-badge);
  border: 1px solid var(--border-badge);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.catatan-snippet-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.65rem;
  word-break: break-word;
}

.catatan-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--primary-emerald);
  font-weight: 600;
}

.catatan-card-bottom .arrow-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.catatan-item-card:hover .catatan-card-bottom .arrow-icon {
  transform: translateX(3px);
  color: var(--primary-emerald);
}

/* ==========================================================================
   VIEW 10: CATATAN DETAIL FULLSCREEN (PRINTABLE SHEET & PDF)
   ========================================================================== */
.catatan-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-wrap: wrap;
}

.catatan-detail-title-badge {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-gold-light);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.catatan-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-detail-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-detail-action.download-pdf {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: #000000;
}

.btn-detail-action.download-pdf:hover {
  background: #d97706;
}

.btn-detail-action.copy-text {
  background: var(--primary-emerald);
  border-color: var(--primary-emerald);
  color: #ffffff;
}

.btn-detail-action.copy-text:hover {
  background: #0284c7;
}

.btn-detail-action.delete-note {
  color: #ef4444;
}

.btn-detail-action.delete-note:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Printable Full Content Sheet */
.catatan-full-sheet {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  max-width: 760px;
  margin: 0 auto 2rem auto;
}

.catatan-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sheet-date-pill {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sheet-surah-badge {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.catatan-sheet-ayah-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.15rem;
  margin-bottom: 1.25rem;
  border-right: 4px solid var(--primary-gold);
}

.sheet-arabic-text {
  font-family: var(--font-arabic-lpmq) !important;
  font-size: 1.5rem;
  line-height: 2.1;
  color: var(--text-arabic);
  direction: rtl;
  text-align: right;
  margin-bottom: 0.75rem;
}

.sheet-latin-text {
  font-family: var(--font-latin);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-latin);
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.sheet-trans-text {
  font-family: var(--font-trans);
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
}

.catatan-sheet-body {
  margin-bottom: 1.5rem;
}

.sheet-body-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sheet-notes-content {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.75;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.15rem;
  white-space: pre-line;
  word-break: break-word;
}

.sheet-notes-content p {
  margin-bottom: 0.75rem;
}

.sheet-notes-content p:last-child {
  margin-bottom: 0;
}

.catatan-sheet-footer {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.85rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Modal Pilihan Salin Catatan */
.btn-copy-option {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  color: var(--text-primary);
}

.btn-copy-option:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary-emerald);
  transform: translateY(-2px);
}

.btn-copy-option i {
  font-size: 1.35rem;
}

.btn-copy-option strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.btn-copy-option span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ==========================================================================
   BADGE HALAMAN MUSHAF FISIK (PADA SETIAP AYAT MODE DEFAULT & SPLIT)
   ========================================================================== */
.ayah-page-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: var(--bg-surface-elevated, rgba(141, 107, 79, 0.08));
  color: var(--primary-emerald, #8d6b4f);
  border: 1px solid var(--border-card, rgba(141, 107, 79, 0.22));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ayah-page-badge:hover {
  background: var(--primary-emerald, #8d6b4f);
  color: #ffffff !important;
  border-color: var(--primary-emerald, #8d6b4f);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.ayah-page-badge:active {
  transform: scale(0.95);
}

/* ==========================================================================
   PENGATURAN FOOTER & NAVIGASI HALAMAN MUSHAF
   ========================================================================== */

.mushaf-page-footer {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mushaf-swipe-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  opacity: 0.85;
}

.swipe-hint-icon {
  font-size: 0.95rem;
  font-weight: bold;
  animation: nudgeLeft 1.5s ease-in-out infinite;
}

@keyframes nudgeLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}

.mushaf-page-badge-bottom {
  font-weight: 600;
  font-size: 0.75rem;
  background: var(--bg-surface-elevated);
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ==========================================================================
   ANIMASI SLIDE HALAMAN HALUS (BERPINDAH HALAMAN FISIK KANAN/KIRI)
   ========================================================================== */
@keyframes slideInRight {
  from {
    opacity: 0.25;
    transform: translateX(35px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0.25;
    transform: translateX(-35px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.slide-in-left {
  animation: slideInLeft 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}


