@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Scheherazade+New:wght@400;700&display=swap');
@font-face {
  font-family: 'KFGQPC Uthman Taha Naskh';
  src: url('KFGQPC Uthman Taha Naskh.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  font-size: 90%;
  /* Increased by 10% */
  
  /* --- BLUE COLOR SCHEME --- */
  --primary: #2563eb;        /* Blue 600 */
  --primary-light: #60a5fa;  /* Blue 400 */
  --primary-dark: #1e3a8a;   /* Blue 900 */
  
  --accent: #f59e0b;         /* Amber 500 */
  --bg-light: #f3f4f6;       /* Gray 100 */
  --surface: #ffffff;
  --text-main: #1f2937;      /* Gray 800 */
  --text-muted: #6b7280;     /* Gray 500 */
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --font-main: 'Poppins', sans-serif;
  --font-arabic: 'KFGQPC Uthman Taha Naskh', 'LPMQ IsepMisbah', 'Amiri', serif;
}

/* Dark Mode Variables */
[data-theme='dark'] {
  --bg-light: #111827;
  --surface: #1f2937;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --primary: #3b82f6;        /* Lighter for dark mode */
  --primary-light: #93c5fd;
  --primary-dark: #1e40af;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-main);
  transition: background-color 0.3s;
}

/* --- PAGE TRANSITIONS --- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-section {
  animation: fadeSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- LAYOUT & UTILS --- */
.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-light);
  position: relative;
  padding-bottom: 100px;
  /* Space for bottom nav */
}

/* Mobile Content Area Padding */
.content-area {
  padding: 1.25rem;
  width: 100%;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.text-center {
  text-align: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 480px) {
  .hide-on-mobile {
    display: none !important;
  }
}

/* --- LOGIN PAGE --- */
#login-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-input {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
}

/* --- NAVIGATION --- */
/* Mobile Floating Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  flex: 1;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item i {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

/* Central Action Button (+) */
.nav-action-center {
  position: relative;
  flex: 1.2;
}

.nav-action-center .center-btn {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-action-center:hover .center-btn {
  transform: translateX(-50%) translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.nav-action-center .center-btn i {
  font-size: 1.8rem;
  margin: 0;
}

.nav-action-center.active .center-btn {
  background: var(--primary-dark);
}

/* Slide Up Menu Overlay */
.slide-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  /* Below bottom-nav */
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.slide-menu-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.slide-menu-content {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + 80px);
  /* Push content above the bottom nav */
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
}

.slide-menu-overlay.is-visible .slide-menu-content {
  transform: translateY(0);
}

.slide-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed var(--border, #e5e7eb);
}

.slide-menu-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.slide-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  padding-bottom: 1rem;
}

.slide-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.slide-menu-item:active {
  transform: scale(0.95);
}

.slide-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.slide-menu-item span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-main);
  text-align: center;
}

/* Desktop Sidebar */
.desktop-sidebar {
  display: none;
}

@media (min-width: 768px) {
  .container {
    max-width: 100%;
    display: flex;
    padding-bottom: 0;
    min-height: 100vh;
  }
  .bottom-nav {
    display: none;
  }
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 280px;
    background: var(--surface);
    height: 100vh;
    padding: 2rem;
    position: sticky;
    top: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    /* Separator */
    flex-shrink: 0;
    /* Prevent shrinking */
  }
  /* --- SIDEBAR REFINEMENT --- */
  .sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
  }
  .sidebar-item:hover {
    background: #eff6ff;
    color: var(--primary);
  }
  .sidebar-item.active {
    background: #eff6ff;
    /* Light Blue */
    color: var(--primary);
    font-weight: 600;
  }
  .sidebar-item i {
    margin-right: 1rem;
    width: 24px;
    text-align: center;
  }
  /* --- IMSAKIYAH TABLE --- */
  .table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
  }
  .custom-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
  }
  .custom-table th {
    background: #f9fafb;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
  }
  .custom-table td {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-main);
  }
  .custom-table tr:hover td {
    background: #f9fafb;
  }
  /* --- JURNAL LIST (CHECKBOXES) --- */
  .checklist-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }
  .check-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all 0.2s;
  }
  .check-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }
  .check-input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    margin-right: 1rem;
  }
  .check-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-main);
  }
  .check-badge {
    background: #eff6ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
  }
  /* --- QURAN LIST ITEMS --- */
  .quran-list-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  .quran-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
  }
  .q-number-box {
    width: 45px;
    height: 45px;
    background: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    margin-right: 1.25rem;
  }
  .q-text-group {
    flex: 1;
  }
  .q-arabic-name {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    color: var(--primary);
  }
  /* --- INFO TABS --- */
  .tabs-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  .tab-btn {
    padding: 0.75rem 2rem;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    background: white;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
  }
  .tab-btn.active {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  }
  /* --- PROFILE HEADER & LIST --- */
  /* Moved to global scope for mobile compatibility */
  .cert-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    margin-bottom: 1rem;
  }
  .cert-icon {
    width: 50px;
    height: 50px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-right: 1rem;
  }
  .cert-item.unlocked .cert-icon {
    background: #FFFBEB;
    color: var(--accent);
  }
  .cert-item.unlocked {
    border-color: var(--accent);
    background: #FFFCF5;
  }
  .journal-row.disabled-row {
    opacity: 0.5;
    pointer-events: none;
    background-color: #f1f5f9;
  }
  /* --- DESKTOP GRID OVERRIDES --- */
  /* Only apply grid to specific content lists if needed,
  but for the new layouts (Clean List), a single column
  might actually look better or a 2-column grid. */
  .checklist-group {
    display: grid;
    grid-template-columns: 1fr;
    /* Keep single column for clean look or 1fr 1fr */
  }
  .content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
    background: #f9fafb;
    /* Slightly different bg for contrast */
  }
  /* Better Grid for Desktop */
  .widget-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .hero-card,
  .prayer-card,
  .card {
    max-width: 100%;
    /* Allow full width cards in grid contexts */
    margin-left: auto;
    margin-right: auto;
  }
  /* Grid Layouts for Content Pages */
  #wajib-activities,
  #sunnah-activities,
  #surah-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
  }
  /* Adjust Checkbox Items for Grid */
  .checkbox-item {
    border: 1px solid var(--bg-light);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0;
    /* Remove bottom margin in grid */
  }
  /* Adjust Surah Items for Grid */
  .surah-item {
    border: 1px solid var(--bg-light);
    border-radius: 12px;
    padding: 1rem;
    background: white;
    height: 100%;
    /* Equal height */
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .surah-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
  }
}

/* --- DASHBOARD GRID LAYOUT --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 350px 1fr;
    /* Fixed Left, Fluid Right */
    align-items: start;
  }
}

/* --- SPECIFIC CARD STYLES --- */
.card-green {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  border-radius: 24px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
  margin-bottom: 1.5rem;
  border: none;
}

.card-white {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  /* Softer shadow */
  border: 1px solid #f3f4f6;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Date/Day Card Specifics */
.ramadhan-day-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 1rem;
}

/* --- DASHBOARD STATS --- */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card-clean {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.stat-icon-wrapper {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-label-clean {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  /* Slate 500 */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value-clean {
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f172a;
  /* Slate 900 */
  margin-top: 5px;
  line-height: 1;
}

/* --- PROGRESS CARD --- */
.progress-card-clean {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  margin-bottom: 1.5rem;
  position: relative;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  /* Align percentage bottom */
  margin-bottom: 0.5rem;
}

.progress-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  display: block;
}

.progress-surah {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  /* Blue */
  margin: 0;
}

.progress-percent-large {
  font-size: 2rem;
  font-weight: 800;
  color: #e2e8f0;
  /* Very light gray */
  line-height: 1;
}

.progress-bar-slim {
  height: 8px;
  /* Slim bar */
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  background: var(--primary);
  height: 100%;
  border-radius: 4px;
}

.progress-target {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.75rem;
  display: block;
}

/* --- QURAN FEATURE --- */
.quran-list-item {
  background: white;
  padding: 1rem;
  /* Compact padding */
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.quran-list-item:hover {
  border-color: var(--primary-light);
  background: #fcfcfc;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.q-number {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  /* Blue Light */
  color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  margin-right: 1rem;
}

.q-info {
  flex: 1;
}

.q-name-latin {
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  font-size: 0.95rem;
}

.q-name-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  color: var(--primary);
}

/* Detail Ayat Card */
.ayat-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #f3f4f6;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.ayat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.ayat-number-badge {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  /* Circle */
  background: transparent;
  border: 2px solid #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
}

.ayat-number-badge.active {
  background: #eff6ff;
}

.ayat-actions {
  display: flex;
  gap: 0.8rem;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  color: var(--primary);
  border-color: var(--primary-light);
}

.ayat-arabic {
  text-align: right;
  font-family: var(--font-arabic);
  font-size: 2.2rem;
  /* Matches the reference "big" text */
  line-height: 2.4;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  direction: rtl;
  font-weight: 500;
}

.ayat-translation {
  text-align: left;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-top: 1px dashed #e5e7eb;
  padding-top: 1rem;
  line-height: 1.6;
}

.arabic-font {
  font-family: 'Amiri', serif;
}

.flex-center {
  display: flex;
  align-items: center;
}

/* Quick Menu Grid (Small Cards) */
.quick-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.menu-card-small {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  border: 1px solid #f3f4f6;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100px;
}

.menu-card-small:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-light);
}

.menu-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

/* Sidebar Profile (Bottom) */
.sidebar-profile {
  margin-top: auto;
  /* Push to bottom */
  background: #f9fafb;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
}

.sidebar-profile-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 1rem;
}

/* Responsive fixes */
@media (max-width: 768px) {
  .quick-menu-grid {
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 cols */
    gap: 0.5rem;
    /* Reduce gap for mobile */
  }
  .menu-card-small {
    padding: 0.5rem;
    /* Reduce padding */
    height: 85px;
    /* Comapct height */
  }
  .menu-card-small div {
    font-size: 0.75rem !important;
    /* Smaller text */
  }
  .menu-icon-box {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  .stats-row {
    grid-template-columns: 1fr 1fr;
    /* Force 2 cols */
    gap: 0.75rem;
  }
  .stat-card-clean {
    padding: 1rem;
    /* Compact padding */
    min-height: 110px;
  }
  .stat-value-clean {
    font-size: 2rem;
    /* Slightly smaller number */
  }
}

/* Ensure other styles remain */
.hidden {
  display: none !important;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* ... keep other utility classes ... */
/* --- PRAYER TIMES WIDGET --- */
.prayer-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.prayer-time-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.8rem 0.2rem;
  text-align: center;
  color: white;
  transition: all 0.2s;
}

.prayer-time-item strong {
  font-size: 1.1rem;
  display: block;
  margin-top: 0.2rem;
}

.prayer-time-item small {
  font-size: 0.75rem;
  opacity: 0.9;
  text-transform: uppercase;
}

/* Active State for Prayer Time */
.prayer-time-item.active {
  background: #f59e0b;
  /* Orange Accent */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
  font-weight: bold;
}

/* --- MOBILE SPECIFIC --- */
@media (max-width: 480px) {
  .prayer-times-grid {
    gap: 0.25rem;
  }
  .prayer-time-item strong {
    font-size: 0.9rem;
  }
}

/* --- TAFSIR MODAL --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-content-card {
  background: white;
  width: 90%;
  max-width: 500px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.table-title-cell {
  text-align: left !important;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-overlay.is-visible .modal-content-card {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed #e5e7eb;
  flex-shrink: 0;
}

.modal-body {
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 4px;
}

.modal-body::-webkit-scrollbar {
  width: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.btn-icon {
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #fee2e2;
  color: var(--danger);
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #4b5563;
  font-size: 0.8rem;
}

.action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.bookmark-btn.active {
  background: var(--primary);
  color: white;
}

.bookmark-btn.active:hover {
  background: var(--primary-dark);
  color: white;
}

/* --- TOAST NOTIFICATION --- */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 41, 59, 0.95);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --- IMSAKIYAH TABLE STYLES --- */
.table-container {
  overflow-x: auto;
  overflow-y: auto;
  /* Allow vertical scroll */
  max-height: 70vh;
  /* Limit height */
  position: relative;
  scrollbar-width: thin;
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  background: white;
}

.table-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-container::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  /* Required for sticky */
  border-spacing: 0;
  min-width: 600px;
}

.custom-table th,
.custom-table td {
  padding: 0.8rem 1rem;
  text-align: center;
  border-bottom: 1px solid #f3f4f6;
  white-space: nowrap;
  font-size: 0.9rem;
}

.custom-table th {
  background: #f9fafb;
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px solid #e5e7eb;
}

/* Sticky First Column (Tanggal Masehi) */
.custom-table .sticky-col {
  position: sticky;
  left: 0;
  background: white;
  z-index: 10;
  border-right: 1px solid #e5e7eb;
  font-weight: 500;
  /* Ensure it covers scroll */
}

/* Ensure header of sticky col stays on top */
.custom-table th.sticky-col {
  z-index: 30;
  background: #f9fafb;
}

/* Row Hover */
.custom-table tr:hover td {
  background-color: #f9fafb;
}

/* Active Row Style Override */
.custom-table tr.active-row td {
  background-color: #eff6ff !important;
  font-weight: bold;
  color: var(--primary-dark);
}

.custom-table tr.active-row .sticky-col {
  background-color: #eff6ff !important;
}

/* --- UTILITIES FOR IMSAKIYAH HEADER --- */
.p-4 {
  padding: 1.25rem !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

/* --- LEADERBOARD --- */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.leaderboard-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
  font-size: 0.9rem;
  color: var(--text-main);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-badge {
  width: 24px;
  height: 24px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 auto;
}

.rank-1 {
  background: #eff6ff;
  color: var(--primary);
}

.rank-2 {
  background: #fff7ed;
  color: #f59e0b;
}

.rank-3 {
  background: #eff6ff;
  color: #3b82f6;
}

.points-badge {
  font-weight: 700;
  color: var(--primary);
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* --- UTILITIES --- */
.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobile Spacing Adjustments */
@media (max-width: 768px) {
  .card-white {
    padding: 1.25rem;
    /* Balanced padding */
    height: auto !important;
    /* Fix excessive height */
    min-height: 0 !important;
    display: block !important;
    /* Reset flex */
  }
  .mt-4 {
    margin-top: 1rem !important;
    /* Reduce margin on mobile */
  }
  .dashboard-grid {
    gap: 1rem;
  }
  /* Ensure chart container has height */
  .card-white>div[style*="height:150px"] {
    height: 150px !important;
  }
}

/* --- JOURNAL REDESIGN --- */
#wajib-activities,
#sunnah-activities {
  display: flex !important;
  flex-direction: column;
  gap: 0.75rem;
  grid-template-columns: none !important;
}

.journal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.journal-row:hover {
  border-color: var(--primary-light);
  background: #fdfdfd;
}

.journal-row.active {
  border-color: var(--primary);
  background: #eff6ff;
  /* Light blue */
}

.journal-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.journal-check {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.journal-label {
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
}

.journal-points {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Warning Banner */
.warning-banner {
  background: #fff7ed;
  /* Orange 50 */
  border: 1px solid #fed7aa;
  /* Orange 200 */
  color: #c2410c;
  /* Orange 700 */
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.warning-title {
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
  color: #ea580c;
  /* Orange 600 */
  font-size: 0.95rem;
}

/* Verification Box */
.verification-box {
  background: #eff6ff;
  /* Blue 50 */
  border: 1px solid #dbeafe;
  /* Blue 100 */
  border-radius: 20px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.verification-check-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.verification-checkbox {
  width: 24px;
  height: 24px;
  accent-color: var(--primary);
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.verification-title {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.verification-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Journal Card Styling */
.journal-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.journal-divider {
  border: 0;
  border-top: 1px solid #f3f4f6;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .journal-card {
    padding: 1rem;
    /* Compact on mobile */
  }
}

/* --- ANNOUNCEMENT REDESIGN --- */
.announcement-card {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid #f3f4f6;
  border-left: 4px solid #3b82f6;
  /* Blue Strip */
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.announcement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.ann-date-box {
  background: #eff6ff;
  color: #3b82f6;
  min-width: 50px;
  padding: 6px 4px;
  border-radius: 10px;
  text-align: center;
  margin-right: 1rem;
  line-height: 1.2;
}

.ann-date-day {
  font-size: 1.1rem;
  font-weight: 800;
  display: block;
}

.ann-date-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
}

.ann-content {
  flex: 1;
}

.ann-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
}

.ann-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Modal Redesign */
.ann-modal-header-modern {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ann-icon-box {
  width: 48px;
  height: 48px;
  background: #eff6ff;
  color: #3b82f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ann-modal-title-group {
  flex: 1;
}

.ann-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.ann-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.ann-tag {
  color: #2563eb;
  /* Blue */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ann-date {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ann-separator {
  border: 0;
  border-top: 1px dashed #e5e7eb;
  margin: 0 0 1.5rem 0;
}

.ann-body-content {
  color: var(--text-main);
  line-height: 1.7;
  font-size: 0.95rem;
}

.ann-body-content p {
  margin-bottom: 1rem;
}

.close-btn-round {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: white;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.close-btn-round:hover {
  background: #f3f4f6;
  color: var(--danger);
  border-color: #fee2e2;
}

/* --- PROFILE REDESIGN --- */
.profile-section {
  padding-bottom: 2rem;
}

.section-title-clean {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Achievement Cards */
.achievement-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

/* Active State (Unlocked) */
.achievement-card.active {
  border: 1px solid #fcd34d;
  /* Amber 300 */
  background: #fffbeb;
  /* Amber 50 */
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.1);
}

.achievement-card:hover {
  transform: translateY(-2px);
}

.ach-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.achievement-card.active .ach-icon-box {
  background: #f59e0b;
  color: white;
}

.achievement-card.locked .ach-icon-box {
  background: #f3f4f6;
  color: #9ca3af;
}

.ach-content {
  flex: 1;
}

.ach-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
}

.ach-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.ach-action {
  flex-shrink: 0;
}

.btn-lihat {
  background: white;
  border: 1px solid #fcd34d;
  color: #d97706;
  /* Amber 700 */
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-lihat:hover {
  background: #fff7ed;
}

/* Progress Bar for Locked Items */
.ach-progress-wrapper {
  text-align: right;
  min-width: 80px;
}

.ach-points {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 4px;
  display: block;
}

.ach-progress-bar {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.ach-progress-fill {
  background: #9ca3af;
  height: 100%;
  border-radius: 2px;
}

/* Menu List */
.menu-list-container {
  background: white;
  border-radius: 20px;
  border: 1px solid #f3f4f6;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f9fafb;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-main);
  text-decoration: none;
  /* For links */
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background: #f9fafb;
}

.menu-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-right: 1rem;
  border-radius: 50%;
  /* Circle icons as per image */
}

/* Specific Icon Colors - Matching Image */
.menu-icon.green {
  background: #eff6ff;
  color: #2563eb;
}

.menu-icon.red {
  background: #fee2e2;
  color: #ef4444;
}

.menu-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.menu-action {
  color: #d1d5db;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
  background-color: var(--primary);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* --- FIXED PROFILE HEADER (MOBILE & DESKTOP) --- */
.profile-header-card {
  background: var(--primary);
  /* Fallback */
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-radius: 24px;
  padding: 2rem;
  color: white;
  display: flex !important;
  /* Force flex on mobile */
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

.profile-avatar-large {
  width: 64px;
  /* Slightly smaller for mobile safety, but still large */
  height: 64px;
  background: white;
  color: var(--primary);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .profile-avatar-large {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }
}

/* --- MOBILE TABS FIX --- */
@media (max-width: 768px) {
  .tabs-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    width: 100%;
    /* Ensure full width */
  }
  .tab-btn {
    flex: 1;
    /* Distribute space equally */
    padding: 0.75rem 0.5rem;
    /* Reduce side padding to fit text */
    font-size: 0.85rem;
    /* Slightly smaller text to prevent overflow */
    white-space: nowrap;
    border-radius: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .tab-btn.active {
    border-color: #e5e7eb;
    background: white;
    color: var(--text-main);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }
}

/* --- GREETING TEXT SVG --- */
.greeting-text-svg {
  font-family: 'KFGQPC Uthman Taha Naskh', 'Amiri', serif;
  font-weight: bold;
  font-size: 22px;
  fill: var(--primary);
}

@media (max-width: 768px) {
  .greeting-text-svg {
    font-size: 29px;
    /* Increased by ~30% for mobile */
  }
}

/* --- LEADERBOARD REDESIGN --- */
.leaderboard-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  padding: 1rem 1.5rem;
  color: white;
}

.lb-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* Leaderboard Table Styles */
.leaderboard-table td {
  padding: 1rem 0.5rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

/* Rank Badge Styles */
.rank-badge {
  display: inline-flex;
  width: 30px;
  height: 30px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-badge.rank-1 {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.rank-badge.rank-2 {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.rank-badge.rank-3 {
  background: rgba(37, 99, 235, 0.1);
  color: #3b82f6;
}

.points-badge {
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* --- LOADING OVERLAY --- */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  /* More opaque for elegance */
  backdrop-filter: blur(10px);
  /* Stronger blur */
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

#loading-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(37, 99, 235, 0.1);
  border-left-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- MOBILE LOGIN FIX --- */
@media (max-width: 768px) {
  #login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    /* Prevent scroll */
  }
}

/* Button Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* --- MOBILE HEADER & UTILS --- */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.hidden-desktop {
  display: flex;
}

.mh-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
}

.mh-app-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.mh-right {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.mh-username {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: none;
}

@media (min-width: 380px) {
  .mh-username {
    display: block;
  }
}

.mh-avatar-box {
  width: 32px;
  height: 32px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Hide on Desktop */
@media (min-width: 768px) {
  .hidden-desktop {
    display: none !important;
  }
  .container {
    padding-top: 0 !important;
  }
  body .container {
    padding-top: 0 !important;
  }
}

/* --- UI FIXES (MOBILE) --- */
/* 1. Quran Sticky Header Mobile Fix */
div.quran-sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex !important;
  flex-direction: row !important;
  gap: 1rem;
  align-items: center;
  flex-wrap: nowrap !important;
}

.quran-search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: #f9fafb;
  border-radius: 10px;
  padding-right: 0.5rem;
  /* space for button */
  min-width: 0;
  /* prevent overflow */
}

.quran-search-box i.fa-search {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.quran-search-box input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  padding: 0.8rem 2.8rem 0.8rem 2.5rem !important;
  /* Right padding for button */
  font-size: 0.95rem;
  outline: none;
}

.quran-search-box button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* 2. Profile Card Mobile Fix */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 24px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}

.profile-avatar-large {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.profile-info-box {
  flex: 1;
  min-width: 120px;
}

.profile-points-box {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  text-align: center;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 380px) {
  .profile-header-card {
    padding: 1.25rem;
    gap: 0.8rem;
  }
  .profile-avatar-large {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  .profile-info-box h2 {
    font-size: 1.4rem !important;
  }
  .profile-points-box {
    margin-left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
  }
}

/* --- DARK MODE REFINEMENTS --- */
body.dark-mode,
body.dark-mode .content-area,
body.dark-mode .container {
  background-color: #111827 !important;
  color: #f9fafb;
}

/* Cards & Containers */
body.dark-mode .card,
body.dark-mode .card-white,
body.dark-mode .stat-card-clean,
body.dark-mode .progress-card-clean,
body.dark-mode .quran-list-item,
body.dark-mode .menu-item,
body.dark-mode .bottom-nav,
body.dark-mode .mobile-header,
body.dark-mode .desktop-sidebar,
body.dark-mode .ayat-card,
body.dark-mode .check-item,
body.dark-mode .announcement-card,
body.dark-mode .modal-content,
body.dark-mode .login-input {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

/* Inputs */
body.dark-mode input.login-input {
  background: #374151 !important;
  color: white !important;
  border: 1px solid #4b5563 !important;
}

body.dark-mode input.login-input::placeholder {
  color: #9ca3af;
}

body.dark-mode .quran-search-box {
  background: #374151;
}

/* Text */
body.dark-mode .text-muted,
body.dark-mode .stat-label-clean,
body.dark-mode .progress-title,
body.dark-mode .progress-target {
  color: #9ca3af !important;
}

body.dark-mode .stat-value-clean,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .q-name-latin,
body.dark-mode .check-label,
body.dark-mode .mh-username {
  color: #f9fafb !important;
}

/* Icons */
body.dark-mode button i.fas.fa-arrow-left,
body.dark-mode .mh-username {
  color: #f9fafb !important;
}

body.dark-mode .mh-avatar-box,
body.dark-mode .action-btn {
  background: #374151;
  border-color: #4b5563;
  color: #d1d5db;
}

body.dark-mode .action-btn:hover {
  background: #4b5563;
  color: var(--primary-light);
}

/* Sidebar Specifics */
body.dark-mode .sidebar-item {
  color: #d1d5db;
}

body.dark-mode .sidebar-item:hover {
  background: #374151;
  color: #f9fafb;
}

body.dark-mode .sidebar-item.active {
  background: #1e3a8a;
  color: #93c5fd;
  /* Blue text on blue bg */
  font-weight: 700;
}

/* Quran & Badges */
body.dark-mode .ayat-number-badge {
  border-color: #1e40af;
  color: var(--primary-light);
}

body.dark-mode .ayat-number-badge.active {
  background: #1e3a8a;
  color: var(--primary-light);
}

body.dark-mode .q-number {
  background: #1e3a8a;
  color: #60a5fa;
}

/* --- CUSTOM TABLES --- */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.custom-table th {
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 2px solid #e5e7eb;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.custom-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: #fdfdfd;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

/* Tables Dark Mode */
body.dark-mode .table-container {
  border-color: #374151;
}

body.dark-mode .custom-table th {
  background: #1f2937;
  color: #d1d5db;
  border-color: #374151;
}

body.dark-mode .custom-table td {
  border-color: #374151;
  color: #f9fafb;
}

body.dark-mode .custom-table tr:hover td {
  background: #1f2937;
}

/* --- DARK MODE FIXES V2 --- */
/* --- REDESIGNED CHART --- */
.chart-card {
  padding: 0 !important;
  overflow: hidden;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.25rem 0;
}

.chart-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.chart-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-live-dot {
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 50%;
  display: inline-block;
  animation: chartPulse 2s ease-in-out infinite;
}

@keyframes chartPulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0);
  }
}

.chart-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-badge-up {
  background: #eff6ff;
  color: #2563eb;
}

.chart-badge-down {
  background: #fef2f2;
  color: #ef4444;
}

.chart-badge-stable {
  background: #f3f4f6;
  color: #6b7280;
}

.chart-visual-container {
  position: relative;
  height: 180px;
  padding: 1rem 1.25rem 0;
  margin-top: 0.75rem;
}

.chart-grid-lines {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.chart-grid-line {
  width: 100%;
  height: 1px;
  background: #f1f5f9;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 100%;
  position: relative;
  z-index: 1;
  padding-bottom: 0;
}

.chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  padding: 0 4px;
}

.chart-bar-col:hover .chart-bar-fill:not(.chart-bar-empty) {
  filter: brightness(1.15);
  transform: scaleY(1.03);
}

.chart-bar-col:hover .chart-bar-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
  visibility: visible;
}

.chart-bar-value {
  font-size: 0.65rem;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 4px;
  min-height: 14px;
}

.chart-bar-fill {
  width: 100%;
  max-width: 28px;
  min-width: 12px;
  border-radius: 8px 8px 2px 2px;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom;
}

.chart-bar-fill.chart-bar-empty {
  background: #f1f5f9 !important;
  box-shadow: none !important;
  opacity: 0.6;
}

.chart-bar-label {
  font-size: 0.65rem;
  color: #9ca3af;
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
  font-weight: 500;
}

.chart-bar-tooltip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1f2937;
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.chart-bar-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #1f2937;
}

.chart-bar-today {
  position: relative;
}

.chart-today-tag {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* Dark Mode Chart */
body.dark-mode .chart-card {
  background: #1f2937;
}

body.dark-mode .chart-grid-line {
  background: #374151;
}

body.dark-mode .chart-bar-value {
  color: #d1d5db;
}

body.dark-mode .chart-bar-label {
  color: #6b7280;
}

body.dark-mode .chart-bar-fill.chart-bar-empty {
  background: #374151 !important;
}

body.dark-mode .chart-badge-up {
  background: #1e3a8a;
  color: #60a5fa;
}

body.dark-mode .chart-badge-down {
  background: #4c1d1d;
  color: #fca5a5;
}

body.dark-mode .chart-badge-stable {
  background: #374151;
  color: #9ca3af;
}

body.dark-mode .chart-bar-tooltip {
  background: #f9fafb;
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .chart-bar-tooltip::after {
  border-top-color: #f9fafb;
}

/* 2. Menu Cards (Small) */
body.dark-mode .menu-card-small {
  background: #1f2937;
  border: 1px solid #374151;
  color: #f9fafb;
}

/* 3. Certificates / Achievement Cards */
body.dark-mode .achievement-card {
  background: #1f2937;
  border: 1px solid #374151;
}

body.dark-mode .achievement-card.active {
  background: #1f2937;
  border-color: var(--accent);
}

body.dark-mode .ach-title {
  color: #f9fafb !important;
}

body.dark-mode .ach-desc {
  color: #9ca3af !important;
}

body.dark-mode .ach-points {
  color: #9ca3af !important;
}

/* 4. Quran Detail Text Visibility */
body.dark-mode .ayat-arabic {
  color: #f9fafb !important;
}

body.dark-mode .ayat-translation {
  color: #d1d5db !important;
}

body.dark-mode .text-muted {
  color: #9ca3af !important;
}

/* 5. Menu Icon Box Backgrounds */
/* Need to override inline styles or default bg colors */
body.dark-mode .menu-icon-box {
  background-color: #374151 !important;
  /* Keep icon color or adjust? Let's keep icon color for now as they are distinct */
}

/* 6. Leaderboard & Table Rows */
body.dark-mode .leaderboard-header h4 {
  color: white !important;
  /* It's in a green card usually, but ensure contrast */
}

body.dark-mode .leaderboard-table td {
  color: #f9fafb;
  border-bottom: 1px solid #374151;
}

body.dark-mode .leaderboard-table tr:hover {
  background: #374151;
}

/* --- DARK MODE FIXES V3 --- */
/* Sidebar Profile Bottom */
body.dark-mode .sidebar-profile {
  background-color: #1f2937;
  /* Dark surface */
  border-top: 1px solid #374151;
  color: #f9fafb;
}

body.dark-mode .sidebar-profile:hover {
  background-color: #374151;
  /* Lighter on hover */
}

body.dark-mode #sidebar-role,
body.dark-mode .sidebar-profile i {
  color: #9ca3af !important;
  /* Muted text/icon */
}

/* Pencapaian Saya Title */
body.dark-mode .section-title-clean {
  color: #f9fafb !important;
}

/* --- DARK MODE MODALS FIX --- */
/* Modal Content Container */
body.dark-mode .modal-content-card {
  background: #1f2937;
  border: 1px solid #374151;
  color: #f9fafb;
}

/* Announcement Modal */
body.dark-mode .ann-modal-title {
  color: #f9fafb !important;
}

body.dark-mode .ann-date {
  color: #9ca3af !important;
}

body.dark-mode .ann-body-content {
  color: #d1d5db !important;
}

body.dark-mode .ann-icon-box {
  background: #374151;
  /* Darker bg for icon */
  color: #60a5fa;
  /* Lighter blue for visibility */
}

body.dark-mode .close-btn-round {
  background: #374151;
  border-color: #4b5563;
  color: #d1d5db;
}

body.dark-mode .close-btn-round:hover {
  background: #4b5563;
  color: #fca5a5;
  /* Light red */
}

body.dark-mode .ann-separator {
  border-top-color: #374151;
}

/* Tafsir Modal */
body.dark-mode #tafsir-header {
  border-bottom-color: #374151;
}

body.dark-mode #tafsir-title {
  color: #f9fafb !important;
}

body.dark-mode #tafsir-body {
  color: #d1d5db !important;
}

body.dark-mode .modal-header i {
  color: #f9fafb !important;
}

/* --- ELEGANT ACTION BUTTONS --- */
.action-btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  padding: 0;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.action-btn-edit:hover {
  background: #eff6ff;
  color: #3b82f6;
  border-color: #bfdbfe;
}

.action-btn-delete:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

.action-btn:active {
  transform: scale(0.92);
}

/* Dark Mode Action Buttons */
body.dark-mode .action-btn {
  background: #374151;
  border-color: #4b5563;
  color: #d1d5db;
}

body.dark-mode .action-btn-edit:hover {
  background: #1e3a5f;
  color: #60a5fa;
  border-color: #3b82f6;
}

body.dark-mode .action-btn-delete:hover {
  background: #4c1d1d;
  color: #fca5a5;
  border-color: #ef4444;
}

/* --- MOBILE RESPONSIVE TABLES --- */
@media (max-width: 768px) {
  /* For simple tables like Kelas (2 columns), remove scroll */
  #page-data-kelas .table-container {
    overflow-x: visible;
  }
  #page-data-kelas .custom-table {
    min-width: unset;
    width: 100%;
    table-layout: fixed;
  }
  #page-data-kelas .custom-table th:last-child,
  #page-data-kelas .custom-table td:last-child {
    width: 90px;
    text-align: center;
  }
  /* Guru table - adjust for mobile */
  #page-data-guru .custom-table {
    min-width: unset;
    font-size: 0.82rem;
  }
  #page-data-guru .custom-table th,
  #page-data-guru .custom-table td {
    padding: 10px 8px;
  }
  #page-data-guru .custom-table th:last-child,
  #page-data-guru .custom-table td:last-child {
    width: 90px;
    text-align: center;
  }
  /* Compact action buttons on mobile */
  .action-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 0.75rem;
  }
  .action-btn-group {
    gap: 6px;
  }
}

/* --- SUBMIT BUTTON DISABLED STATE --- */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* --- AVATAR FALLBACK --- */
.avatar-fallback {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

body.dark-mode .avatar-fallback {
  filter: brightness(0.85) saturate(1.2);
}

/* --- SIDEBAR DROPDOWN ACCORDION --- */
.sidebar-dropdown {
  margin: 0.25rem 0;
}

.sidebar-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.sidebar-dropdown-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.sidebar-dropdown.open .sidebar-dropdown-arrow {
  transform: rotate(180deg);
}

.sidebar-dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-sub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.65rem 1.5rem 0.65rem 2.5rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 12px;
  margin: 2px 0.75rem;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-sub-item::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
  transition: all 0.2s ease;
}

.sidebar-sub-item:hover {
  background: #f3f4f6;
  color: var(--text-main);
}

.sidebar-sub-item:hover::before {
  background: var(--primary);
  opacity: 1;
  width: 6px;
  height: 6px;
}

.sidebar-sub-item.active {
  background: #eff6ff;
  color: var(--primary);
  font-weight: 600;
}

.sidebar-sub-item.active::before {
  background: var(--primary);
  opacity: 1;
  width: 6px;
  height: 6px;
}

.sidebar-sub-item i {
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}

/* Dark mode */
body.dark-mode .sidebar-sub-item {
  color: #9ca3af;
}

body.dark-mode .sidebar-sub-item:hover {
  background: #374151;
  color: #f9fafb;
}

body.dark-mode .sidebar-sub-item.active {
  background: #1e3a8a;
  color: #60a5fa;
}

body.dark-mode .sidebar-sub-item.active::before {
  background: #60a5fa;
}

body.dark-mode .sidebar-dropdown-arrow {
  color: #6b7280;
}

/* --- INFO TAB CONTENT --- */
.info-tab-content {
  margin-top: 1rem;
}

/* --- GURU TAB CARDS --- */
.guru-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.guru-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1rem;
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.guru-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.guru-card-avatar {
  flex-shrink: 0;
}

.guru-card-avatar img {
  border: 2px solid #e5e7eb;
}

.guru-card-info {
  flex: 1;
  min-width: 0;
}

.guru-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.3;
}

.guru-card-kelas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.guru-kelas-badge {
  background: #eff6ff;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.guru-card-stats {
  text-align: center;
  flex-shrink: 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px 14px;
  min-width: 55px;
}

.guru-stat-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.guru-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Responsive: 2 columns on desktop */
@media (min-width: 600px) {
  .guru-card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Dark mode */
body.dark-mode .guru-card {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .guru-card-name {
  color: #f9fafb;
}

body.dark-mode .guru-kelas-badge {
  background: #1e3a8a;
  color: #60a5fa;
}

body.dark-mode .guru-card-stats {
  background: #374151;
}

body.dark-mode .guru-stat-number {
  color: #60a5fa;
}

/* --- ANNOUNCEMENT AUTHOR --- */
.ann-author {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.ann-author i {
  font-size: 0.65rem;
}

/* --- DOA HARIAN STYLES --- */
.doa-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  transition: border-color 0.2s;
}

.doa-search-bar:focus-within {
  border-color: var(--primary);
}

.doa-search-bar i {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.doa-search-bar input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.85rem;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}

.doa-pills-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.doa-pills-container::-webkit-scrollbar {
  height: 4px;
}

.doa-pills-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.doa-pill {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}

.doa-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.doa-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.doa-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.doa-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.doa-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  gap: 12px;
}

.doa-kategori-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #2563eb;
  margin-bottom: 4px;
}

.doa-judul {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.doa-chevron {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.doa-chevron.rotated {
  transform: rotate(180deg);
}

.doa-card-body {
  padding: 0 18px 16px;
}

.doa-arab {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 1.55rem;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  color: var(--text);
  margin-bottom: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 10px;
  border: 1px solid #dbeafe;
}

.doa-latin {
  font-size: 0.82rem;
  font-style: italic;
  color: #1e40af;
  line-height: 1.7;
  margin-bottom: 10px;
  padding: 0 4px;
}

.doa-terjemahan {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 0 4px;
}

.doa-detail {
  border-top: 1px solid var(--border);
  padding: 14px 18px;
}

.doa-tentang {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.doa-tentang strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.doa-tentang p {
  margin: 0;
}

/* Dark Mode Doa */
body.dark-mode .doa-search-bar {
  background: var(--bg-card);
  border-color: var(--border);
}

body.dark-mode .doa-search-bar input {
  color: var(--text);
}

body.dark-mode .doa-pill {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
}

body.dark-mode .doa-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

body.dark-mode .doa-card {
  background: var(--bg-card);
  border-color: var(--border);
}

body.dark-mode .doa-arab {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.2);
  color: #e2e8f0;
}

body.dark-mode .doa-latin {
  color: #60a5fa;
}

body.dark-mode .doa-kategori-badge {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

body.dark-mode .doa-detail {
  border-color: var(--border);
}

/* --- DOA GREEN CARDS (Info Tab) --- */
.doa-green-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #2563eb, #3b82f6, #60a5fa);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.doa-green-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.doa-green-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.doa-green-card:active {
  transform: scale(0.98);
}

.doa-green-title {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
  margin-right: 12px;
}

.doa-green-icon {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Dark mode - cards already dark-friendly due to blue bg */
body.dark-mode .doa-green-card {
  background: linear-gradient(135deg, #1e3a8a, #2563eb, #3b82f6);
}