/* ========================================
   ZakatCalc — Elegant & Modern Design
   ======================================== */

:root {
  /* Color Palette */
  --bg-primary: #0a0f0d;
  --bg-secondary: #0d1512;
  --bg-tertiary: #111a17;
  --bg-card: #141e1a;
  --bg-card-hover: #1a2622;
  
  /* Surface Colors */
  --surface-1: rgba(255, 255, 255, 0.02);
  --surface-2: rgba(255, 255, 255, 0.04);
  --surface-3: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.06);
  
  /* Accent Colors */
  --accent-gold: #c9a227;
  --accent-gold-light: #e3be4f;
  --accent-gold-muted: rgba(201, 162, 39, 0.15);
  --accent-emerald: #2dd4a7;
  --accent-emerald-muted: rgba(45, 212, 167, 0.12);
  
  /* Text Colors */
  --text-primary: #f0f5f3;
  --text-secondary: #9aa8a2;
  --text-muted: #5e6d67;
  
  /* Semantic Colors */
  --success: #34d399;
  --success-muted: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --danger: #f87171;
  
  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #c9a227 0%, #a88621 100%);
  --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  
  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing & Sizing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(201, 162, 39, 0.1);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ========================================
   Reset & Base
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 212, 167, 0.05), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201, 162, 39, 0.03), transparent);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========================================
   Header
   ======================================== */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--surface-border);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  color: var(--accent-gold);
  font-size: 1.5rem;
  line-height: 1;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}

.nav-link.primary {
  background: var(--gradient-gold);
  color: #0a0f0d;
  font-weight: 600;
  box-shadow: var(--shadow-sm), 0 0 20px rgba(201, 162, 39, 0.15);
}

.nav-link.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(201, 162, 39, 0.25);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 64px;
}

.hero-content {
  max-width: 480px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-emerald-muted);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 100px;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--gradient-gold);
  color: #0a0f0d;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm), 0 0 20px rgba(201, 162, 39, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(201, 162, 39, 0.25);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* Nisab Hero Card */
.nisab-hero-card {
  background: var(--gradient-card);
  background-color: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.nisab-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.3), transparent);
}

.nisab-hero-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.nisab-hero-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold-muted);
  color: var(--accent-gold);
  border-radius: var(--radius-md);
}

.nisab-hero-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nisab-hero-basis {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.live-indicator {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--success-muted);
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 100px;
}

.live-indicator.offline {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
}

.live-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.nisab-hero-value {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  min-height: 52px;
}

.nisab-hero-value:not(.loaded) {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.nisab-hero-value.loaded {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nisab-hero-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--surface-border);
}

.nisab-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meta-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ========================================
   Market Section
   ======================================== */

.market-section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-icon {
  color: var(--accent-gold);
}

.section-badge {
  padding: 6px 12px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.section-badge.success {
  background: var(--success-muted);
  color: var(--success);
}

.market-group {
  margin-bottom: 32px;
}

.market-group-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.market-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

/* Price Grid */
.price-grid {
  display: grid;
  gap: 12px;
}

.price-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.price-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.price-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Price Card */
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-normal);
}

.price-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.price-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.price-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
}

.price-icon.gold {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), rgba(201, 162, 39, 0.1));
  color: var(--accent-gold);
}

.price-icon.silver {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.1));
  color: #c0c0c0;
}

.price-icon.crypto {
  background: var(--surface-2);
  color: var(--text-secondary);
}

.price-icon.stock {
  background: var(--accent-emerald-muted);
  color: var(--accent-emerald);
  font-size: 0.7rem;
}

.price-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.price-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.price-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.price-value.loading {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.price-value.error {
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Skeleton */
.price-card.skeleton .price-value,
.price-card.skeleton .price-name {
  background: var(--surface-2);
  border-radius: 4px;
  color: transparent;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
  padding: 48px 0;
}

.cta-card {
  background: var(--gradient-card);
  background-color: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-content {
  max-width: 480px;
  margin: 0 auto 28px;
}

.cta-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--surface-border);
  margin-top: 32px;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 20px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-divider {
  opacity: 0.3;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-content {
    text-align: center;
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }

  .btn-primary {
    justify-content: center;
  }
  
  .price-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .price-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .header {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--surface-border);
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    justify-content: center;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero {
    padding: 32px 0 48px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .nisab-hero-value {
    font-size: 2rem;
  }
  
  .price-grid-2,
  .price-grid-4,
  .price-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cta-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.7rem;
    padding: 6px 12px;
  }

  .price-grid-2,
  .price-grid-4,
  .price-grid-5 {
    grid-template-columns: 1fr;
  }
  
  .nisab-hero-footer {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
  
  .footer-meta {
    flex-direction: column;
    gap: 4px;
  }
  
  .footer-divider {
    display: none;
  }
}
/* ========================================
   Additional: Loading & Error States
   ======================================== */

.price-value.loading {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.price-value.error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 500;
}

.price-card.error {
  opacity: 0.7;
}

.error-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.error-card p {
  color: var(--text-muted);
  margin: 0;
}

.retry-btn {
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.retry-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

/* Market Status Badges */
.section-badge.success {
  background: var(--success-muted);
  color: var(--success);
}

.section-badge.warning {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
}

.section-badge.error {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
}

/* Live Indicator States */
.live-indicator.offline {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
}

.live-indicator.offline .live-dot {
  animation: none;
}

/* Loading Text in Nisab Card */
.nisab-hero-value .loading-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
}

/* Market Note */
.market-note {
  display: none; /* Sembunyikan karena sudah pakai edge function */
}
/* ========================================
   Kalkulator Page Styles
   ======================================== */

/* Nisab Bar */
.nisab-bar {
  margin-bottom: 32px;
}

.nisab-bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  flex-wrap: wrap;
}

.nisab-bar-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nisab-bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nisab-bar-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nisab-bar-divider {
  width: 1px;
  height: 32px;
  background: var(--surface-border);
}

/* Calculator Section */
.calculator-section {
  padding-bottom: 48px;
}

.calc-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--text-secondary);
}

/* Zakat Grid */
.zakat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.zakat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.zakat-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.zakat-card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.zakat-card-icon.gold { background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), rgba(201, 162, 39, 0.1)); color: var(--accent-gold); }
.zakat-card-icon.emerald { background: var(--accent-emerald-muted); color: var(--accent-emerald); }
.zakat-card-icon.blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.zakat-card-icon.orange { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.zakat-card-icon.purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.zakat-card-icon.cyan { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.zakat-card-icon.green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.zakat-card-icon.brown { background: rgba(180, 83, 9, 0.15); color: #b45309; }

.zakat-card-content {
  flex: 1;
  min-width: 0;
}

.zakat-card-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.zakat-card-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.zakat-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  padding: 4px 8px;
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius: 4px;
}

.zakat-card-badge.live {
  background: var(--success-muted);
  color: var(--success);
}

.zakat-card-badge .badge-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.zakat-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Modal Large */
.modal-large {
  max-width: 520px;
}

.modal-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5vh;
  overflow-y: auto;
}

/* Calculator Form */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-box {
  background: var(--accent-gold-muted);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 0.9rem;
}

.info-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.info-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
}

.info-box li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.info-box li:last-child {
  margin-bottom: 0;
}

/* Form Group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-muted);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235e6d67' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-static {
  padding: 12px 16px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.form-static-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.badge-live {
  padding: 3px 8px;
  background: var(--success-muted);
  color: var(--success);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-border);
}

/* Radio Group */
.radio-group {
  display: flex;
  gap: 12px;
}

.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.radio-option:hover {
  background: var(--surface-2);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option:has(input:checked) {
  background: var(--accent-gold-muted);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 500;
}

/* Calculation Summary */
.calc-summary {
  background: var(--surface-1);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.summary-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.summary-row.highlight {
  padding-top: 12px;
  border-top: 1px solid var(--surface-border);
  font-weight: 600;
}

.summary-row.highlight span:last-child {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

/* Calculate Button */
.btn-calculate {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-gold);
  color: #0a0f0d;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(201, 162, 39, 0.25);
}

.btn-calculate:active {
  transform: translateY(0);
}

/* Result Card */
#hasil-zakat {
  display: none;
  margin-top: 8px;
}

.result-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  animation: slideUp 0.3s ease;
}

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

.result-card.success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.result-card.warning {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.result-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
}

.result-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.result-amount {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.result-alt {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 16px;
}

.result-message {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 8px;
}

.result-kekurangan {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 16px;
}

.result-details {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row span:first-child {
  opacity: 0.85;
}

.result-row span:last-child {
  font-weight: 600;
}

/* Footer Compact */
.footer-compact {
  margin-top: 0;
  padding: 24px 0;
}

.footer-compact .footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-compact .footer-text {
  display: none;
}

/* ========================================
   Modal Overlay & Container - FIX
   ======================================== */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal {
  background: var(--bg-tertiary);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--surface-border);
  background: var(--bg-card);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.close-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* ========================================
   Calculator Form Styles - FIX COLORS
   ======================================== */

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Info Box */
.info-box {
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.info-box strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-gold-light);
  font-size: 0.9rem;
}

.info-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.info-box li {
  margin-bottom: 4px;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-border);
}

/* Form Inputs */
.form-input,
.form-select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
  background: var(--bg-card-hover);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa8a2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

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

.form-static {
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

.form-static-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

.badge-live {
  padding: 4px 10px;
  background: var(--success-muted);
  color: var(--success);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -4px;
}

/* Radio Group */
.radio-group {
  display: flex;
  gap: 12px;
}

.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.radio-option:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option:has(input:checked) {
  background: rgba(201, 162, 39, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold-light);
}

/* Calculation Summary */
.calc-summary {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.summary-row span:first-child {
  color: var(--text-secondary);
}

.summary-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.summary-row.highlight {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--surface-border);
}

.summary-row.highlight span:last-child {
  color: var(--accent-gold-light);
  font-size: 1.1rem;
}

/* Calculate Button */
.btn-calculate {
  width: 100%;
  padding: 16px 24px;
  background: var(--gradient-gold);
  color: #0a0f0d;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-top: 8px;
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.3);
}

.btn-calculate:active {
  transform: translateY(0);
}

/* Result Box */
#hasil-zakat {
  display: none;
  margin-top: 16px;
}

.result-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  animation: slideUp 0.3s ease;
}

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

.result-card.success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
}

.result-card.warning {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.result-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 700;
}

.result-header h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.result-amount {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.result-alt {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 16px;
}

.result-message {
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.result-kekurangan {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 16px;
}

.result-details {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row span:first-child {
  opacity: 0.85;
}

.result-row span:last-child {
  font-weight: 600;
}

/* ========================================
   Zakat Card Colors Fix
   ======================================== */

.zakat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}

.zakat-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.zakat-card-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.zakat-card-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.zakat-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 5px 10px;
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius: 6px;
  font-weight: 500;
}

.zakat-card-badge.live {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.zakat-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.zakat-card:hover .zakat-card-arrow {
  transform: translateX(4px);
  color: var(--accent-gold);
}

/* ========================================
   Responsive Modal
   ======================================== */

@media (max-width: 600px) {
  .modal-overlay {
    padding: 20px 12px;
  }

  .modal {
    max-height: calc(100vh - 40px);
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 20px;
  }

  .radio-group {
    flex-direction: column;
    gap: 8px;
  }

  .result-amount {
    font-size: 1.75rem;
    padding: 20px;
  }

  .form-input,
  .form-select,
  .form-static,
  .form-static-with-badge,
  .radio-option {
    padding: 12px 14px;
  }
}
/* ========================================
   Hide Scrollbar - Modal Only
   ======================================== */

/* Modal Overlay */
.modal-overlay {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-overlay::-webkit-scrollbar {
  display: none;
}

/* Modal Body */
.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-body::-webkit-scrollbar {
  display: none;
}
/* ========================================
   Custom Scrollbar - Elegant & Subtle
   ======================================== */

/* Scrollbar untuk Chrome, Safari, Edge, Opera */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Scrollbar untuk Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
/* ========================================
   Dalil & Fatwa Page Styles
   ======================================== */

/* Hero */
.dalil-hero {
  padding: 48px 0 32px;
  text-align: center;
}

.dalil-hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.dalil-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-gold-muted);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 20px;
}

.dalil-hero .page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dalil-hero .page-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Filter Section */
.dalil-filter-section {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--accent-gold-muted);
  border-color: var(--accent-gold);
  color: var(--accent-gold-light);
}

.filter-tab .tab-icon {
  font-size: 1rem;
}

/* Content Section */
.dalil-content-section {
  padding: 24px 0 48px;
  min-height: 400px;
}

/* Loading State */
.dalil-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 64px 24px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface-border);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.dalil-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
}

.dalil-empty .empty-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.dalil-empty h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0;
}

.dalil-empty p {
  color: var(--text-muted);
  margin: 0;
}

/* Error State */
.dalil-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
}

.dalil-error .error-icon {
  font-size: 3rem;
}

.dalil-error h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0;
}

.dalil-error p {
  color: var(--text-muted);
  margin: 0;
}

.btn-retry {
  margin-top: 8px;
  padding: 10px 20px;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-retry:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

/* Dalil Grid */
.dalil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

/* Dalil Card */
.dalil-card {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-normal);
}

.dalil-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dalil-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dalil-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dalil-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dalil-badge .badge-icon {
  font-size: 0.85rem;
}

.dalil-badge.dalil {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.dalil-badge.hukum {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.dalil-badge.fatwa {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.dalil-badge.kategori {
  background: var(--surface-2);
  color: var(--text-muted);
}

.dalil-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

/* Arabic Text */
.dalil-arab {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: right;
}

.arab-text {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  line-height: 2;
  color: var(--accent-gold-light);
  margin: 0;
  direction: rtl;
}

/* Latin Transliteration */
.dalil-latin {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Terjemahan */
.dalil-terjemahan {
  flex: 1;
}

.dalil-terjemahan p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Footer / Sumber */
.dalil-card-footer {
  padding-top: 16px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dalil-sumber {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
}

.sumber-label {
  color: var(--text-muted);
}

.dalil-sumber-text {
  color: var(--text-primary);
  font-weight: 500;
}

.dalil-sumber-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-emerald);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.dalil-sumber-link:hover {
  color: var(--accent-gold-light);
  text-decoration: underline;
}

.dalil-sumber-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .dalil-hero .page-title {
    font-size: 2rem;
  }

  .dalil-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .arab-text {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .dalil-hero {
    padding: 32px 0 24px;
  }

  .dalil-hero .page-title {
    font-size: 1.75rem;
  }

  .dalil-card {
    padding: 20px;
  }

  .dalil-badges {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* ========================================
   Fiqih Harian Page Styles
   ======================================== */

/* Hero */
.fiqih-hero {
  padding: 48px 0 32px;
  text-align: center;
}

.fiqih-hero-content {
  max-width: 650px;
  margin: 0 auto;
}

.fiqih-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-emerald-muted);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 20px;
}

.fiqih-hero .page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fiqih-hero .page-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Search Bar */
.fiqih-search {
  max-width: 500px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 16px 48px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(45, 212, 167, 0.15);
}

.search-clear {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-clear:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

/* Section Headers */
.fiqih-kitab-section,
.fiqih-bab-section,
.fiqih-content-section,
.fiqih-search-results {
  padding: 24px 0 48px;
}

.section-header {
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Back Button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 20px;
}

.btn-back:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

/* Current Kitab/Bab Header */
.current-kitab,
.current-bab {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kitab-icon,
.bab-icon {
  font-size: 2.5rem;
}

/* Kitab Grid */
.kitab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.kitab-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 64px 24px;
  color: var(--text-muted);
}

/* Kitab Card */
.kitab-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}

.kitab-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.kitab-card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 2rem;
  flex-shrink: 0;
}

/* Kitab Color Variants */
.kitab-blue .kitab-card-icon { background: rgba(59, 130, 246, 0.15); }
.kitab-emerald .kitab-card-icon { background: var(--accent-emerald-muted); }
.kitab-gold .kitab-card-icon { background: var(--accent-gold-muted); }
.kitab-purple .kitab-card-icon { background: rgba(139, 92, 246, 0.15); }
.kitab-brown .kitab-card-icon { background: rgba(180, 83, 9, 0.15); }
.kitab-cyan .kitab-card-icon { background: rgba(6, 182, 212, 0.15); }

.kitab-card-content {
  flex: 1;
  min-width: 0;
}

.kitab-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.kitab-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kitab-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.kitab-card:hover .kitab-card-arrow {
  transform: translateX(4px);
  color: var(--accent-emerald);
}

/* Bab Grid */
.bab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* Bab Card */
.bab-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}

.bab-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.bab-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.bab-card-content {
  flex: 1;
  min-width: 0;
}

.bab-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.bab-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bab-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.bab-card:hover .bab-card-arrow {
  transform: translateX(3px);
  color: var(--accent-emerald);
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

/* Content Card */
.content-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.content-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-badge {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.content-badge.kitab {
  background: var(--accent-emerald-muted);
  color: var(--accent-emerald);
}

.content-badge.bab {
  background: var(--surface-2);
  color: var(--text-muted);
}

.has-arabic-badge {
  padding: 4px 10px;
  background: var(--accent-gold-muted);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  font-family: 'Amiri', serif;
}

.content-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.content-card-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-arabic {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: right;
}

.arabic-preview {
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--accent-gold-light);
  margin: 0;
  direction: rtl;
}

.content-card-poin {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-1);
  border-radius: var(--radius-sm);
}

.poin-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.poin-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.content-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-border);
  margin-top: auto;
}

.content-source {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-emerald);
  transition: gap var(--transition-fast);
}

.content-card:hover .read-more {
  gap: 8px;
}

/* Loading & Empty States */
.fiqih-loading,
.fiqih-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
}

.fiqih-empty.full-width {
  grid-column: 1 / -1;
}

.fiqih-empty .empty-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.fiqih-empty h4 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0;
}

.fiqih-empty p {
  color: var(--text-muted);
  margin: 0;
}

/* Detail Modal Content */
.detail-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-badge {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-badge.kitab {
  background: var(--accent-emerald-muted);
  color: var(--accent-emerald);
}

.detail-badge.bab {
  background: var(--surface-2);
  color: var(--text-muted);
}

.detail-arabic {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: right;
}

.detail-arabic .arabic-text {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  line-height: 2.2;
  color: var(--accent-gold-light);
  margin: 0;
  direction: rtl;
}

.detail-latin {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
  padding: 12px 16px;
  background: var(--surface-1);
  border-left: 3px solid var(--surface-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-explanation {
  padding-top: 8px;
}

.detail-explanation h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin: 0 0 12px 0;
}

.detail-explanation p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.detail-poin-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-poin-group h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-border);
}

.detail-poin-list {
  margin: 0;
  padding-left: 24px;
  color: var(--text-secondary);
}

.detail-poin-list li {
  padding: 6px 0;
  line-height: 1.6;
}

.detail-poin-list li::marker {
  color: var(--accent-emerald);
  font-weight: 600;
}

.detail-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--surface-1);
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.source-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.source-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-emerald);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.source-link:hover {
  color: var(--accent-gold-light);
  text-decoration: underline;
}

.source-detail {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

/* Responsive Fiqih */
@media (max-width: 768px) {
  .fiqih-hero .page-title {
    font-size: 2rem;
  }

  .fiqih-hero .page-desc {
    font-size: 1rem;
  }

  .kitab-grid {
    grid-template-columns: 1fr;
  }

  .bab-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .kitab-card {
    padding: 18px;
  }

  .kitab-card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .kitab-card-title {
    font-size: 1.05rem;
  }

  .current-kitab,
  .current-bab {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .kitab-icon,
  .bab-icon {
    font-size: 2rem;
  }

  .detail-arabic .arabic-text {
    font-size: 1.35rem;
  }
}

@media (max-width: 480px) {
  .fiqih-hero {
    padding: 32px 0 24px;
  }

  .fiqih-hero .page-title {
    font-size: 1.75rem;
  }

  .search-input {
    padding: 14px 44px;
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .kitab-card-desc {
    display: none;
  }

  .bab-card-desc {
    display: none;
  }

  .content-card {
    padding: 18px;
  }

  .content-card-summary {
    -webkit-line-clamp: 1;
  }
}