/**
 * =========================================================================
 * MANSAPA Iqra' Labs — dark-mode.css
 * Comprehensive Dark Mode & High-Contrast Adaptive System
 * Supports both `html[data-theme="dark"]` and `html.dark`
 * =========================================================================
 */

/* ── 1. ROOT & GLOBAL TOKENS ─────────────────────────────────────────── */
html[data-theme="dark"],
html.dark {
  color-scheme: dark;
  --navy: #0B1526;
  --navy-dark: #050B14;
  --navy-mid: #0E1A30;
  --navy-light: #182848;
  --gold: #F59E0B;
  --gold-hover: #FBBF24;
  --gold-deep: #D97706;
  --gold-glow: rgba(245, 158, 11, 0.28);
  --gold-subtle: rgba(245, 158, 11, 0.12);
  --white: #0B1326;
  --card-bg: #131E36;
  --card-hover-bg: #1B2947;
  --bg-light: #080E1A;
  --border-faint: rgba(255, 255, 255, 0.08);
  --text-dark: #F8FAFC;
  --text-muted: #94A3B8;
  --text-nav: #F8FAFC;
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 2px 8px -2px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 16px 36px -6px rgba(0, 0, 0, 0.6), 0 0 24px var(--gold-glow);

  background-color: #080E1A !important;
  color: #E2E8F0 !important;
  scrollbar-color: #334155 #080E1A;
}

html[data-theme="dark"] body,
html.dark body {
  background-color: #080E1A !important;
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .section-h,
html.dark .section-h,
html[data-theme="dark"] .section-title,
html.dark .section-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .section-sub,
html.dark .section-sub,
html[data-theme="dark"] .section-desc,
html.dark .section-desc {
  color: #94A3B8 !important;
}

/* ── 2. HERO SECTION REDESIGN ────────────────────────────────────────── */
html[data-theme="dark"] .iqra-hero,
html.dark .iqra-hero {
  background: #080E1A !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .iqra-bg-grid,
html.dark .iqra-bg-grid {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px) !important;
  opacity: 0.5 !important;
}

html[data-theme="dark"] .hero-title,
html.dark .hero-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .hero-title-highlight,
html.dark .hero-title-highlight {
  background: linear-gradient(135deg, #F8FAFC 20%, #F59E0B 60%, #FBBF24 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

html[data-theme="dark"] .hero-subtitle,
html.dark .hero-subtitle {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .hero-subtitle strong,
html.dark .hero-subtitle strong {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .hero-badge,
html.dark .hero-badge {
  background: rgba(19, 30, 54, 0.85) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #FBBF24 !important;
}

html[data-theme="dark"] .hero-secondary-cta,
html.dark .hero-secondary-cta {
  background: #131E36 !important;
  color: #F8FAFC !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .hero-secondary-cta:hover,
html.dark .hero-secondary-cta:hover {
  background: #1B2947 !important;
  border-color: #F59E0B !important;
  color: #FBBF24 !important;
}

html[data-theme="dark"] .hero-building-card,
html.dark .hero-building-card {
  background: rgba(19, 30, 54, 0.95) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .hero-building-title,
html.dark .hero-building-title,
html[data-theme="dark"] .hero-building-card .floating-card-text strong,
html.dark .hero-building-card .floating-card-text strong {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .hero-building-sub,
html.dark .hero-building-sub,
html[data-theme="dark"] .hero-building-card .floating-card-text span,
html.dark .hero-building-card .floating-card-text span {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .hero-building-card .floating-card-icon,
html.dark .hero-building-card .floating-card-icon {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #FBBF24 !important;
}

html[data-theme="dark"] .hero-features,
html.dark .hero-features {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── 3. HERO METRICS IN DARK MODE ────────────────────────────────────── */
html[data-theme="dark"] .hero-metric-card,
html.dark .hero-metric-card {
  background: rgba(19, 30, 54, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
}

html[data-theme="dark"] .hero-metric-card .metric-value,
html.dark .hero-metric-card .metric-value,
html[data-theme="dark"] .hero-metric-card .metric-value-lg,
html.dark .hero-metric-card .metric-value-lg {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .hero-metric-card .metric-label,
html.dark .hero-metric-card .metric-label,
html[data-theme="dark"] .hero-metric-card .metric-label-slate,
html.dark .hero-metric-card .metric-label-slate {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .hero-metric-card .metric-icon-wrap,
html.dark .hero-metric-card .metric-icon-wrap {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #FBBF24 !important;
}

/* ── 4. KOLEKSI BUKU TERBARU (SECTION-BOOKS) ─────────────────────────── */
html[data-theme="dark"] .section-books,
html.dark .section-books {
  background: #0B1326 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .new-arrivals-bg-grid,
html.dark .new-arrivals-bg-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1.2px, transparent 1.2px) !important;
}

html[data-theme="dark"] .new-arrivals-title,
html.dark .new-arrivals-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .new-arrivals-title-highlight,
html.dark .new-arrivals-title-highlight {
  background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 50%, #FDE047 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html[data-theme="dark"] .new-arrivals-sub,
html.dark .new-arrivals-sub {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .new-arrivals-btn-all,
html.dark .new-arrivals-btn-all {
  background: #131E36 !important;
  color: #FBBF24 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="dark"] .new-arrivals-btn-all:hover,
html.dark .new-arrivals-btn-all:hover {
  background: #F59E0B !important;
  color: #0B1526 !important;
}

html[data-theme="dark"] .new-arrivals-btn-all .btn-arrow-circle,
html.dark .new-arrivals-btn-all .btn-arrow-circle {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #FBBF24 !important;
}

html[data-theme="dark"] .section-books .collection .card,
html.dark .section-books .collection .card,
html[data-theme="dark"] .new-arrivals-grid-container .card,
html.dark .new-arrivals-grid-container .card,
html[data-theme="dark"] .section-books .new-arrival-card,
html.dark .section-books .new-arrival-card,
html[data-theme="dark"] .book-card-vertical,
html.dark .book-card-vertical {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .section-books .collection .card:hover,
html.dark .section-books .collection .card:hover,
html[data-theme="dark"] .new-arrivals-grid-container .card:hover,
html.dark .new-arrivals-grid-container .card:hover,
html[data-theme="dark"] .section-books .new-arrival-card:hover,
html.dark .section-books .new-arrival-card:hover {
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.6), 0 0 18px rgba(245, 158, 11, 0.2) !important;
}

html[data-theme="dark"] .section-books .collection .card-text,
html.dark .section-books .collection .card-text,
html[data-theme="dark"] .section-books .new-arrival-title,
html.dark .section-books .new-arrival-title,
html[data-theme="dark"] .book-card-vertical .book-card-title,
html.dark .book-card-vertical .book-card-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .section-books .collection .card:hover .card-text,
html.dark .section-books .collection .card:hover .card-text,
html[data-theme="dark"] .section-books .new-arrival-card:hover .new-arrival-title,
html.dark .section-books .new-arrival-card:hover .new-arrival-title {
  color: #FBBF24 !important;
}

html[data-theme="dark"] .new-arrival-detail-link,
html.dark .new-arrival-detail-link {
  color: #FBBF24 !important;
}

html[data-theme="dark"] .new-arrival-skeleton-card,
html.dark .new-arrival-skeleton-card {
  background: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* ── 5. BUKU POPULER (POPULAR BOOKS SLIDER) ─────────────────────────── */
html[data-theme="dark"] .section-popular-books,
html.dark .section-popular-books,
html[data-theme="dark"] .section-curated-books,
html.dark .section-curated-books {
  background-color: #080E1A !important;
}

html[data-theme="dark"] .pop-section-title,
html.dark .pop-section-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .pop-section-sub,
html.dark .pop-section-sub {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .pop-btn-all,
html.dark .pop-btn-all {
  background: #131E36 !important;
  color: #FBBF24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="dark"] .pop-btn-all:hover,
html.dark .pop-btn-all:hover {
  background: #F59E0B !important;
  color: #0B1526 !important;
}

html[data-theme="dark"] .pop-display-card,
html.dark .pop-display-card {
  background: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .pop-book-title,
html.dark .pop-book-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .pop-meta-label,
html.dark .pop-meta-label {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .pop-meta-val,
html.dark .pop-meta-val {
  color: #F1F5F9 !important;
}

html[data-theme="dark"] .pop-synopsis,
html.dark .pop-synopsis {
  color: #CBD5E1 !important;
}

/* ── 6. KABAR & AGENDA (NEWS SECTION) ────────────────────────────────── */
html[data-theme="dark"] .section-news,
html.dark .section-news {
  background-color: #0B1326 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .news-section-title,
html.dark .news-section-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .news-section-sub,
html.dark .news-section-sub {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .news-card,
html.dark .news-card {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .news-card:hover,
html.dark .news-card:hover {
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .news-card-title,
html.dark .news-card-title,
html[data-theme="dark"] .news-title,
html.dark .news-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .news-card-desc,
html.dark .news-card-desc,
html[data-theme="dark"] .news-summary,
html.dark .news-summary {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .news-card-date,
html.dark .news-card-date,
html[data-theme="dark"] .news-date,
html.dark .news-date {
  color: #94A3B8 !important;
}

/* ── 7. LEADERBOARD & HALL OF FAME ───────────────────────────────────── */
html[data-theme="dark"] .section-leaderboard,
html.dark .section-leaderboard {
  background: #080E1A !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .leaderboard-title,
html.dark .leaderboard-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .leaderboard-sub,
html.dark .leaderboard-sub {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .leaderboard-card,
html.dark .leaderboard-card,
html[data-theme="dark"] .top-reader-card,
html.dark .top-reader-card {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .leaderboard-name,
html.dark .leaderboard-name,
html[data-theme="dark"] .top-reader-name,
html.dark .top-reader-name {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .leaderboard-meta,
html.dark .leaderboard-meta,
html[data-theme="dark"] .top-reader-meta,
html.dark .top-reader-meta {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .leaderboard-count,
html.dark .leaderboard-count,
html[data-theme="dark"] .top-reader-count,
html.dark .top-reader-count {
  color: #FBBF24 !important;
}

html[data-theme="dark"] .section-leaderboard .showcase-floating-card,
html.dark .section-leaderboard .showcase-floating-card {
  background: rgba(19, 30, 54, 0.94) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.5) !important;
}

/* ── 8. TAUTAN EKSTERNAL ─────────────────────────────────────────────── */
html[data-theme="dark"] .section-external-links,
html.dark .section-external-links {
  background-color: #0B1326 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .external-links-title,
html.dark .external-links-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .external-links-sub,
html.dark .external-links-sub {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .portal-ext-card,
html.dark .portal-ext-card,
html[data-theme="dark"] .ext-link-card,
html.dark .ext-link-card {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .portal-ext-card:hover,
html.dark .portal-ext-card:hover,
html[data-theme="dark"] .ext-link-card:hover,
html.dark .ext-link-card:hover {
  background: #1B2947 !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

html[data-theme="dark"] .portal-ext-title,
html.dark .portal-ext-title,
html[data-theme="dark"] .ext-link-title,
html.dark .ext-link-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .portal-ext-desc,
html.dark .portal-ext-desc,
html[data-theme="dark"] .ext-link-desc,
html.dark .ext-link-desc {
  color: #94A3B8 !important;
}

/* ── 9. LOKASI & JAM OPERASIONAL ─────────────────────────────────────── */
html[data-theme="dark"] .section-location,
html.dark .section-location {
  background-color: #080E1A !important;
}

html[data-theme="dark"] .location-title,
html.dark .location-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .location-sub,
html.dark .location-sub {
  color: #94A3B8 !important;
}

/* ── 8. LOKASI & JAM OPERASIONAL ─────────────────────────────────────── */
html[data-theme="dark"] .location-info-card,
html.dark .location-info-card {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 4px solid #F59E0B !important;
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .identity-name,
html.dark .identity-name {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .identity-badge,
html.dark .identity-badge {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #FBBF24 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="dark"] .identity-address-box,
html.dark .identity-address-box {
  background: #0B1326 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .address-text,
html.dark .address-text {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .contact-link-chip,
html.dark .contact-link-chip {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #34D399 !important;
}

html[data-theme="dark"] .contact-link-chip:hover,
html.dark .contact-link-chip:hover {
  background: rgba(16, 185, 129, 0.28) !important;
  color: #6EE7B7 !important;
}

html[data-theme="dark"] .operational-hours-block,
html.dark .operational-hours-block {
  background: #0B1326 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .hours-heading,
html.dark .hours-heading,
html[data-theme="dark"] .hours-day-title,
html.dark .hours-day-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .hours-detail-item .detail-label,
html.dark .hours-detail-item .detail-label {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .hours-detail-item .detail-val,
html.dark .hours-detail-item .detail-val {
  color: #F1F5F9 !important;
}

html[data-theme="dark"] .hours-detail-item.is-break .detail-label,
html.dark .hours-detail-item.is-break .detail-label {
  color: #FBBF24 !important;
}

html[data-theme="dark"] .hours-detail-item.is-break .detail-val,
html.dark .hours-detail-item.is-break .detail-val {
  color: #F59E0B !important;
}

html[data-theme="dark"] .hours-divider,
html.dark .hours-divider {
  background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .weekend-label,
html.dark .weekend-label {
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .closed-badge,
html.dark .closed-badge {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #F87171 !important;
}

html[data-theme="dark"] .social-label,
html.dark .social-label {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .social-btn-square,
html.dark .social-btn-square {
  background: #0B1326 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .social-btn-square:hover,
html.dark .social-btn-square:hover {
  background: #F59E0B !important;
  color: #0B1526 !important;
  border-color: #F59E0B !important;
}

/* ── 9. PANDUAN PAGE (PAGES/PANDUAN.PHP) ──────────────────────────────── */
html[data-theme="dark"] .panduan-page-wrapper,
html.dark .panduan-page-wrapper {
  background-color: #080E1A !important;
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .panduan-main-heading,
html.dark .panduan-main-heading {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .panduan-sub-heading,
html.dark .panduan-sub-heading {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .panduan-tab-nav,
html.dark .panduan-tab-nav {
  background-color: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .panduan-tab-btn,
html.dark .panduan-tab-btn {
  background-color: transparent !important;
  color: #94A3B8 !important;
  border: 1px solid transparent !important;
}

html[data-theme="dark"] .panduan-tab-btn:hover,
html.dark .panduan-tab-btn:hover {
  background-color: #1B2947 !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] .panduan-tab-btn.active,
html.dark .panduan-tab-btn.active {
  background-color: #0F172A !important;
  color: #FBBF24 !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .panduan-card,
html.dark .panduan-card,
html[data-theme="dark"] .panduan-step-card,
html.dark .panduan-step-card,
html[data-theme="dark"] .panduan-box,
html.dark .panduan-box {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .panduan-step-num,
html.dark .panduan-step-num {
  background-color: #0B1326 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #FBBF24 !important;
}

html[data-theme="dark"] .panduan-step-desc,
html.dark .panduan-step-desc {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .panduan-card h2,
html.dark .panduan-card h2,
html[data-theme="dark"] .panduan-card h3,
html.dark .panduan-card h3,
html[data-theme="dark"] .panduan-card h4,
html.dark .panduan-card h4 {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .panduan-card h3,
html.dark .panduan-card h3,
html[data-theme="dark"] .panduan-card h4,
html.dark .panduan-card h4 {
  color: #F8FAFC !important;
}

/* ── 10. LAYANAN MANDIRI PAGES (AKTIVASI, CEK KEMBALI, BEBAS PUSTAKA, USUL BUKU) ── */
html[data-theme="dark"] .ak-card,
html.dark .ak-card,
html[data-theme="dark"] .ck-card,
html.dark .ck-card,
html[data-theme="dark"] .bp-card,
html.dark .bp-card,
html[data-theme="dark"] .ub-card,
html.dark .ub-card {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .form-label,
html.dark .form-label,
html[data-theme="dark"] label,
html.dark label {
  color: #E2E8F0 !important;
}

html[data-theme="dark"] input.form-control,
html.dark input.form-control,
html[data-theme="dark"] select.form-control,
html.dark select.form-control,
html[data-theme="dark"] textarea.form-control,
html.dark textarea.form-control,
html[data-theme="dark"] .form-control,
html.dark .form-control {
  background-color: #0B1326 !important;
  border: 1px solid #334155 !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] input.form-control:focus,
html.dark input.form-control:focus,
html[data-theme="dark"] select.form-control:focus,
html.dark select.form-control:focus,
html[data-theme="dark"] textarea.form-control:focus,
html.dark textarea.form-control:focus {
  border-color: #F59E0B !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="dark"] .input-group-text,
html.dark .input-group-text {
  background-color: #0E1A30 !important;
  border-color: #334155 !important;
  color: #94A3B8 !important;
}

/* ── 11. FAQ & PUSTAKAWAN ────────────────────────────────────────────── */
html[data-theme="dark"] .faq-search-card,
html.dark .faq-search-card,
html[data-theme="dark"] .faq-card,
html.dark .faq-card,
html[data-theme="dark"] .faq-accordion-item,
html.dark .faq-accordion-item,
html[data-theme="dark"] .faq-item,
html.dark .faq-item {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .faq-question-btn,
html.dark .faq-question-btn,
html[data-theme="dark"] .faq-question,
html.dark .faq-question {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .faq-answer,
html.dark .faq-answer {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .librarian-card,
html.dark .librarian-card {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .librarian-name,
html.dark .librarian-name {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .librarian-role,
html.dark .librarian-role {
  color: #94A3B8 !important;
}

/* ── 12. OPAC SEARCH & BIBLIO RESULTS ────────────────────────────────── */
html[data-theme="dark"] .biblio-card,
html.dark .biblio-card,
html[data-theme="dark"] .biblioResult,
html.dark .biblioResult,
html[data-theme="dark"] .item,
html.dark .item {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .biblio-title a,
html.dark .biblio-title a,
html[data-theme="dark"] .title a,
html.dark .title a {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .biblio-author,
html.dark .biblio-author,
html[data-theme="dark"] .author,
html.dark .author {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .biblio-card-list,
html.dark .biblio-card-list {
  background: transparent !important;
}

html[data-theme="dark"] .table,
html.dark .table {
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .table th,
html.dark .table th {
  background-color: #0B1326 !important;
  color: #F8FAFC !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .table td,
html.dark .table td {
  background-color: #131E36 !important;
  color: #CBD5E1 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .page-link,
html.dark .page-link {
  background-color: #131E36 !important;
  border-color: #334155 !important;
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .page-item.active .page-link,
html.dark .page-item.active .page-link {
  background-color: #F59E0B !important;
  border-color: #F59E0B !important;
  color: #0B1526 !important;
}

/* ── 13. MODALS & POPUPS ─────────────────────────────────────────────── */
html[data-theme="dark"] .modal-content,
html.dark .modal-content {
  background: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .modal-header,
html.dark .modal-header,
html[data-theme="dark"] .modal-footer,
html.dark .modal-footer {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .modal-header .close,
html.dark .modal-header .close {
  color: #F8FAFC !important;
  text-shadow: none !important;
}

/* ── 14. NAVBAR THEME TOGGLE BUTTON ──────────────────────────────────── */
.portal-theme-toggle-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #E2E8F0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  position: relative !important;
  outline: none !important;
}

.portal-theme-toggle-btn:hover {
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.portal-theme-toggle-btn:active {
  transform: translateY(0) scale(0.96);
}

.portal-theme-toggle-btn svg {
  width: 14px !important;
  height: 14px !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

/* Light mode state: Moon visible, Sun hidden */
html:not([data-theme="dark"]):not(.dark) .portal-theme-toggle-btn .theme-icon-moon {
  display: block;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

html:not([data-theme="dark"]):not(.dark) .portal-theme-toggle-btn .theme-icon-sun {
  display: none;
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* Dark mode state: Sun visible, Moon hidden */
html[data-theme="dark"] .portal-theme-toggle-btn .theme-icon-moon,
html.dark .portal-theme-toggle-btn .theme-icon-moon {
  display: none;
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

html[data-theme="dark"] .portal-theme-toggle-btn .theme-icon-sun,
html.dark .portal-theme-toggle-btn .theme-icon-sun {
  display: block;
  opacity: 1;
  color: #FBBF24;
  transform: rotate(0deg) scale(1);
}

/* Mobile specific toggle sizing */
.portal-theme-toggle-mobile {
  width: 34px !important;
  height: 34px !important;
}

/* ── 15. BOOK DETAIL FAST FINDER (DETAIL_TEMPLATE.PHP) ───────────────── */
html[data-theme="dark"] .iqra-fast-finder-wrapper,
html.dark .iqra-fast-finder-wrapper {
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .btn-detail-back,
html.dark .btn-detail-back {
  background-color: #131E36 !important;
  color: #CBD5E1 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .btn-detail-back:hover,
html.dark .btn-detail-back:hover {
  background-color: #1B2947 !important;
  color: #F8FAFC !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

html[data-theme="dark"] .detail-breadcrumb a,
html.dark .detail-breadcrumb a {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .detail-breadcrumb a:hover,
html.dark .detail-breadcrumb a:hover {
  color: #FBBF24 !important;
}

html[data-theme="dark"] .detail-cover-box,
html.dark .detail-cover-box {
  background: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .btn-secondary-cover,
html.dark .btn-secondary-cover {
  background-color: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .btn-secondary-cover:hover,
html.dark .btn-secondary-cover:hover {
  background-color: #1B2947 !important;
  border-color: #F59E0B !important;
  color: #FBBF24 !important;
}

html[data-theme="dark"] .detail-title,
html.dark .detail-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .fast-finder-rack-card,
html.dark .fast-finder-rack-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, #131E36 100%) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .callno-label,
html.dark .callno-label {
  color: #FBBF24 !important;
}

html[data-theme="dark"] .callno-number,
html.dark .callno-number {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .btn-fast-finder-copy,
html.dark .btn-fast-finder-copy {
  background-color: rgba(245, 158, 11, 0.2) !important;
  color: #FDE68A !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

html[data-theme="dark"] .btn-fast-finder-copy:hover,
html.dark .btn-fast-finder-copy:hover {
  background-color: #F59E0B !important;
  color: #0B1526 !important;
}

html[data-theme="dark"] .rack-card-divider,
html.dark .rack-card-divider {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .rack-location-label,
html.dark .rack-location-label {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .rack-location-val,
html.dark .rack-location-val {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .rack-rule-row,
html.dark .rack-rule-row {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .section-heading,
html.dark .section-heading {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .detail-card-panel,
html.dark .detail-card-panel {
  background: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .synopsis-prose,
html.dark .synopsis-prose {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .biblio-spec-card,
html.dark .biblio-spec-card {
  background-color: #0B1326 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .biblio-spec-label,
html.dark .biblio-spec-label {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .biblio-spec-value,
html.dark .biblio-spec-value {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .copies-table-wrapper,
html.dark .copies-table-wrapper {
  background: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .copies-table th,
html.dark .copies-table th {
  background-color: #0B1326 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  color: #94A3B8 !important;
}

html[data-theme="dark"] .copies-table td,
html.dark .copies-table td {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .copies-table tr:hover,
html.dark .copies-table tr:hover {
  background-color: #1B2947 !important;
}

html[data-theme="dark"] .btn-toggle-copies,
html.dark .btn-toggle-copies {
  background-color: #0B1326 !important;
  color: #CBD5E1 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .btn-toggle-copies:hover,
html.dark .btn-toggle-copies:hover {
  background-color: #1B2947 !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] .review-card,
html.dark .review-card {
  background: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .review-author-name,
html.dark .review-author-name {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .iqra-fast-finder-wrapper .bg-slate-100,
html.dark .iqra-fast-finder-wrapper .bg-slate-100,
html[data-theme="dark"] .iqra-fast-finder-wrapper .bg-slate-100\/80,
html.dark .iqra-fast-finder-wrapper .bg-slate-100\/80 {
  background-color: #0B1326 !important;
}

html[data-theme="dark"] .iqra-fast-finder-wrapper .border-slate-200,
html.dark .iqra-fast-finder-wrapper .border-slate-200 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .iqra-fast-finder-wrapper .text-slate-700,
html.dark .iqra-fast-finder-wrapper .text-slate-700 {
  color: #E2E8F0 !important;
}

/* ── 16. MEMBER AREA & LOGIN (_MEMBER.PHP) ───────────────────────────── */
html[data-theme="dark"] .iqra-member-page,
html.dark .iqra-member-page {
  --ml-bg: #080E1A;
  --ml-surface: #131E36;
  --ml-ink: #F8FAFC;
  --ml-ink-secondary: #CBD5E1;
  --ml-ink-muted: #94A3B8;
  --ml-gold: #F59E0B;
  --ml-amber-ink: #FBBF24;
  --ml-amber-surface: rgba(245, 158, 11, 0.12);
  --ml-border: rgba(255, 255, 255, 0.1);
  --ml-border-strong: rgba(255, 255, 255, 0.18);
  --ml-error-ink: #F87171;
  --ml-error-border: #EF4444;
  --ml-error-bg: rgba(239, 68, 68, 0.15);
  --ml-valid-border: #4ADE80;
  background-color: #080E1A !important;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(245, 158, 11, 0.08) 0%, transparent 44%),
    radial-gradient(circle at 86% 82%, rgba(0, 0, 0, 0.5) 0%, transparent 48%) !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] .member-area,
html.dark .member-area {
  background-color: #080E1A !important;
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .ml-card,
html.dark .ml-card {
  background-color: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .ml-input,
html.dark .ml-input {
  background-color: #0B1326 !important;
  border-color: #334155 !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] .ml-input:focus,
html.dark .ml-input:focus {
  border-color: #F59E0B !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="dark"] .ml-quote-card,
html.dark .ml-quote-card {
  background-color: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .ml-quote-text,
html.dark .ml-quote-text {
  color: #E2E8F0 !important;
}

html[data-theme="dark"] .ml-quote-cite strong,
html.dark .ml-quote-cite strong {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .ml-quote-role,
html.dark .ml-quote-role {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .ml-mini-book-card,
html.dark .ml-mini-book-card {
  background-color: #131E36 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .ml-mini-book-title,
html.dark .ml-mini-book-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .ml-mini-book-author,
html.dark .ml-mini-book-author {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .ml-book-thumb,
html.dark .ml-book-thumb {
  background-color: #131E36 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}