/* ═══════════════════════════════════════════════════════════════════
   ZAKAT HESAP — themes.css
   Dark mode & theme overrides
═══════════════════════════════════════════════════════════════════ */

[data-theme="dark"] {
  /* Brand (softer for dark) */
  --color-primary:        #2ecc71;
  --color-primary-light:  #52d98a;
  --color-primary-dark:   #1a8a4a;
  --color-primary-bg:     rgba(46,204,113,.12);
  --color-gold:           #f0c040;
  --color-gold-light:     #f5d470;
  --color-gold-bg:        rgba(240,192,64,.1);

  /* Neutrals */
  --color-bg:             #0f1117;
  --color-surface:        #1a1d27;
  --color-surface-2:      #252836;
  --color-border:         #2e3347;
  --color-border-light:   #252836;

  /* Text */
  --color-text:           #e8eaf0;
  --color-text-secondary: #9aa2b4;
  --color-text-muted:     #626b7e;
  --color-text-on-primary:#0f1117;

  /* Status */
  --color-success:        #2ecc71;
  --color-success-bg:     rgba(46,204,113,.15);
  --color-warning:        #f59e0b;
  --color-warning-bg:     rgba(245,158,11,.15);
  --color-danger:         #ef4444;
  --color-danger-bg:      rgba(239,68,68,.15);
  --color-info:           #60a5fa;
  --color-info-bg:        rgba(96,165,250,.15);

  /* Shadows (darker) */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.6), 0 4px 8px rgba(0,0,0,.4);
}

/* Dark mode hero gradient */
[data-theme="dark"] .hero {
  background: linear-gradient(160deg, #0d3d21 0%, #1a5c32 60%, #236b3f 100%);
}

/* Dark mode topbar/nav */
[data-theme="dark"] .topbar,
[data-theme="dark"] .bottom-nav {
  background: var(--color-surface);
  border-color: var(--color-border);
}

/* Dark mode splash */
[data-theme="dark"] .splash {
  background: linear-gradient(160deg, #081a10 0%, #0d3d21 60%, #155c30 100%);
}

/* Dark mode auth container */
[data-theme="dark"] .auth-tabs { background: var(--color-bg); }

/* Dark mode select background image (lighter chevron) */
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239aa2b4'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
}

/* Dark mode quran card */
[data-theme="dark"] .quran-card {
  background: rgba(240,192,64,.08);
  border-color: rgba(240,192,64,.3);
}

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* System dark mode (fallback if no JS theme toggle) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --color-primary:        #2ecc71;
    --color-primary-light:  #52d98a;
    --color-primary-dark:   #1a8a4a;
    --color-primary-bg:     rgba(46,204,113,.12);
    --color-gold:           #f0c040;
    --color-gold-light:     #f5d470;
    --color-gold-bg:        rgba(240,192,64,.1);
    --color-bg:             #0f1117;
    --color-surface:        #1a1d27;
    --color-surface-2:      #252836;
    --color-border:         #2e3347;
    --color-border-light:   #252836;
    --color-text:           #e8eaf0;
    --color-text-secondary: #9aa2b4;
    --color-text-muted:     #626b7e;
    --color-success:        #2ecc71;
    --color-success-bg:     rgba(46,204,113,.15);
    --color-warning:        #f59e0b;
    --color-warning-bg:     rgba(245,158,11,.15);
    --color-danger:         #ef4444;
    --color-danger-bg:      rgba(239,68,68,.15);
    --color-info:           #60a5fa;
    --color-info-bg:        rgba(96,165,250,.15);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,.5);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.6);
  }
}

/* Transition for theme switch */
body { transition: background-color 0.3s ease, color 0.3s ease; }
.topbar, .bottom-nav, .modal, .param-card, .edu-card, .info-card,
.result-card, .history-card, .account-card, .settings-item,
.asset-table, .breakdown-table {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
