/* ================================================================
   ISTIQOMAH DIGITAL — style.css
   Islamic Modern Design System
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS VARIABLES ---- */
:root {
  --primary: #1a5c3a;
  --primary-light: #2d7a54;
  --primary-dark: #0f3d25;
  --primary-ultra: #e8f5ee;
  --gold: #c9a227;
  --gold-light: #e8c44a;
  --accent: #c9a227;

  --bg: #f5f7f4;
  --bg2: #ffffff;
  --bg3: #eef2ed;
  --sidebar-bg: linear-gradient(170deg, #0f3d25 0%, #1a5c3a 50%, #1e6b42 100%);
  --topbar-bg: rgba(255,255,255,0.92);

  --text: #1a2e1a;
  --text-muted: #6b8570;
  --text-light: #9ab89a;
  --border: #dde8dd;

  --shadow-sm: 0 2px 8px rgba(26,92,58,0.08);
  --shadow-md: 0 4px 20px rgba(26,92,58,0.12);
  --shadow-lg: 0 8px 40px rgba(26,92,58,0.16);

  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 270px;
  --topbar-h: 60px;
}

[data-theme="dark"] {
  --bg: #0d1f12;
  --bg2: #132019;
  --bg3: #1a2e1a;
  --sidebar-bg: linear-gradient(170deg, #050f08 0%, #0d1f12 50%, #0f2415 100%);
  --topbar-bg: rgba(13,31,18,0.96);
  --text: #d6e8d6;
  --text-muted: #7a9e7a;
  --text-light: #4a6a4a;
  --border: #1e3a22;
  --primary-ultra: rgba(26,92,58,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

/* ---- RESET & BASE ---- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; transition: background 0.3s, color 0.3s; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---- AUTHENTICATION OVERLAY ---- */
.auth-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-box {
  background: var(--bg2);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg3); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }

/* ================================================================
   LAYOUT
   ================================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 900;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 4px 0 30px rgba(0,0,0,0.3);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 899;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

.sidebar-brand {
  padding: 20px 20px 16px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.sidebar-brand::before {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 120px; height: 120px;
  border: 2px solid rgba(201,162,39,0.15);
  border-radius: 50%;
}
.brand-logo {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  line-height: 1;
}
.brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 4px;
}
.brand-masjid {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  line-height: 1.4;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.nav-section-title {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255,255,255,0.3);
  letter-spacing: 2px;
  padding: 12px 10px 4px;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  padding: 9px 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  margin-bottom: 1px;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateX(2px);
}
.nav-item.active {
  background: rgba(201,162,39,0.18);
  color: #fff;
  font-weight: 700;
  border-left: 3px solid var(--gold);
}
.nav-item i { width: 16px; text-align: center; font-size: 13px; }
.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #1a2e00;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ---- ISLAMIC PATTERN ---- */
.islamic-pattern::after {
  content: '🌙';
  position: absolute;
  top: 10px; right: 16px;
  font-size: 28px;
  opacity: 0.12;
}

/* ---- TOPBAR ---- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s;
}
.topbar-btn {
  background: none;
  border: none;
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}
.topbar-btn:hover { background: var(--bg3); }

.prayer-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border-radius: 10px;
  padding: 5px 10px;
  flex-shrink: 0;
}
.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
  min-width: 54px;
}
.prayer-item.next-prayer {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}
.prayer-item .pn { font-size: 9px; font-weight: 700; opacity: 0.7; letter-spacing: 0.5px; }
.prayer-item.next-prayer .pn { opacity: 1; }
.prayer-item .pt { font-size: 13px; font-weight: 800; font-family: monospace; }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  padding: 0;
}

.page-content {
  display: none;
  padding: 24px;
  max-width: 1600px;
  animation: fadeSlide 0.3s ease;
}
.page-content.active { display: block; }

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

/* ================================================================
   COMPONENTS
   ================================================================ */

/* ---- CARD ---- */
.card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.card-title .icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--primary-ultra);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* ---- STAT CARDS ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.06;
}
.stat-card.green::before { background: var(--primary); }
.stat-card.gold::before { background: var(--gold); }
.stat-card.blue::before { background: #00b4d8; }
.stat-card.purple::before { background: #7c3aed; }
.stat-card.orange::before { background: #f77f00; }

.stat-icon {
  font-size: 26px;
  margin-bottom: 10px;
  display: block;
}
.stat-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.stat-change {
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
}
.stat-change.up { color: #16a34a; }
.stat-change.down { color: #dc2626; }

/* ---- GRID LAYOUTS ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; box-shadow: 0 3px 12px rgba(26,92,58,0.3); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: #1a2e00; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: linear-gradient(135deg, #dc2626, #ef4444); color: white; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon-red { background: rgba(239,68,68,0.1); border: none; color: #dc2626; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 12px; }
.btn-icon-red:hover { background: #dc2626; color: white; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-muted); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,92,58,0.12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--bg3); }
thead th { padding: 12px 14px; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr { transition: background 0.15s; border-bottom: 1px solid var(--border); }
tbody tr:hover { background: var(--bg3); }
tbody td { padding: 11px 14px; vertical-align: middle; }
.empty-td { text-align: center; color: var(--text-muted); padding: 40px !important; }

/* ---- BADGES ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-green { background: rgba(22,163,74,0.12); color: #16a34a; }
.badge-red { background: rgba(220,38,38,0.1); color: #dc2626; }
.badge-blue { background: rgba(0,180,216,0.1); color: #00b4d8; }
.badge-gold { background: rgba(201,162,39,0.15); color: var(--gold); }
.badge-purple { background: rgba(124,58,237,0.1); color: #7c3aed; }

/* ---- PROGRESS BAR ---- */
.progress-bar { width: 100%; height: 5px; background: var(--bg3); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 10px; transition: width 0.6s ease; }

/* ---- AVATAR ---- */
.avatar-sm {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

/* ---- MODALS ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open .modal-box {
  transform: translateY(0);
  opacity: 1;
}
.modal-box {
  background: var(--bg2);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-box.modal-lg { max-width: 760px; }
.modal-header {
  padding: 20px 20px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-title { font-size: 17px; font-weight: 800; }
.modal-close {
  background: var(--bg3);
  border: none;
  width: 32px; height: 32px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }
.modal-body { padding: 20px; }

/* ---- TOAST ---- */
#toastContainer {
  position: fixed;
  top: 76px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--bg2);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  transition: opacity 0.4s, transform 0.4s;
}
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast-success { border-left: 4px solid #16a34a; }
.toast-error { border-left: 4px solid #dc2626; }
.toast-warning { border-left: 4px solid var(--gold); }
.toast-info { border-left: 4px solid #00b4d8; }

/* ---- TABS ---- */
.tabs { display: flex; gap: 6px; background: var(--bg3); padding: 5px; border-radius: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn { padding: 8px 16px; border-radius: 8px; border: none; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-muted); transition: all 0.2s; white-space: nowrap; }
.tab-btn.active { background: var(--bg2); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ================================================================
   DASHBOARD SPECIFIC
   ================================================================ */
.dashboard-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e6b42 100%);
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.dashboard-banner::before {
  content: '🌙';
  position: absolute;
  right: 24px; top: 50%;
  transform: translateY(-50%);
  font-size: 80px;
  opacity: 0.08;
}
.dashboard-banner::after {
  content: '☪️';
  position: absolute;
  right: 140px; top: 10px;
  font-size: 40px;
  opacity: 0.06;
}
.banner-title { font-size: 13px; font-weight: 700; opacity: 0.8; letter-spacing: 2px; margin-bottom: 2px; }
.banner-masjid { font-size: 20px; font-weight: 900; margin-bottom: 2px; }
.banner-date { font-size: 12px; opacity: 0.7; margin-bottom: 16px; }
.prayer-times-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.prayer-time-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
}
.prayer-time-pill .name { font-weight: 700; opacity: 0.85; }
.prayer-time-pill .time { font-family: monospace; font-weight: 800; }
.prayer-time-pill.active-prayer { background: rgba(201,162,39,0.35); }

.next-prayer-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,162,39,0.15);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 12px;
}
.next-prayer-indicator .label { color: rgba(255,255,255,0.7); }
.next-prayer-indicator .value { font-weight: 800; color: var(--gold); }

/* ---- CHART CONTAINER ---- */
.chart-wrap { position: relative; height: 220px; }
.chart-wrap-lg { position: relative; height: 300px; }
.chart-wrap-sm { position: relative; height: 160px; }

/* ---- RANKING ---- */
.ranking-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ranking-item:last-child { border-bottom: none; }

/* ---- JADWAL SHOLAT ---- */
.jadwal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.jadwal-row.past { opacity: 0.5; }
.jadwal-row:not(.past):hover { background: var(--primary-ultra); border-color: var(--primary); transform: translateX(4px); }

/* ---- SCAN PAGE ---- */
.scan-status-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.qr-reader-box {
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--primary);
  background: var(--bg3);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#qr-reader { width: 100%; }
#qr-reader video { width: 100% !important; border-radius: 0 !important; }
#qr-reader__scan_region { position: relative; }

/* ---- MEMBER CARD ---- */
.member-card-visual {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #1e6b42 100%);
  border-radius: 20px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.member-card-visual::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(201,162,39,0.2);
}
.member-card-visual::after {
  content: '🕌';
  position: absolute;
  bottom: 12px; right: 20px;
  font-size: 48px;
  opacity: 0.08;
}
.member-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border);
}
.member-search-item:hover { background: var(--bg3); }

/* ---- FINANCE PAGES ---- */
.zakat-type-card, .donasi-program-card {
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: var(--bg);
}
.zakat-type-card:hover, .donasi-program-card:hover { border-color: var(--primary); background: var(--primary-ultra); }
.zakat-type-card.active, .donasi-program-card.active { border-color: var(--primary); background: var(--primary-ultra); box-shadow: 0 0 0 3px rgba(26,92,58,0.15); }
.kas-tab-btn { padding: 8px 16px; border-radius: 8px; border: none; background: var(--bg3); cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-muted); transition: all 0.2s; }
.kas-tab-btn.active.masuk { background: rgba(22,163,74,0.15); color: #16a34a; }
.kas-tab-btn.active.keluar { background: rgba(220,38,38,0.1); color: #dc2626; }

/* ---- KEGIATAN ---- */
.kegiatan-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  transition: all 0.2s;
}
.kegiatan-card:hover { border-color: var(--primary); transform: translateX(4px); box-shadow: var(--shadow-sm); }
.kegiatan-date {
  min-width: 52px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- PENGUMUMAN ---- */
.pengumuman-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  transition: all 0.2s;
}
.pengumuman-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }

/* ---- MODE ANAK ---- */
.kids-banner {
  background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 50%, #ffd700 100%);
  border-radius: 20px;
  padding: 24px;
  color: white;
  text-align: center;
  margin-bottom: 20px;
}
.kids-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.kids-menu-card {
  background: var(--bg2);
  border-radius: 18px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.kids-menu-card:hover { transform: scale(1.05) translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.kids-menu-emoji { font-size: 44px; margin-bottom: 10px; display: block; }

/* ---- IQRO ---- */
.iqro-char {
  font-family: 'Amiri', serif;
  font-size: 36px;
  width: 70px; height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-ultra);
  border-radius: 14px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--primary);
  font-weight: 700;
}
.iqro-char:hover { background: var(--primary); color: white; transform: scale(1.05); box-shadow: var(--shadow-sm); }

/* ---- SURAT CARDS ---- */
.surat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}
.surat-card:hover { background: var(--primary-ultra); border-color: var(--primary); transform: translateX(4px); }
.surat-nomor {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
}

/* ---- DOA CARDS ---- */
.doa-card {
  background: var(--bg2);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.doa-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }

/* ---- HADITS CARDS ---- */
.hadits-card {
  background: var(--bg2);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.hadits-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---- SAHABAT CARDS ---- */
.sahabat-card {
  background: var(--bg2);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.sahabat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--gold); }

/* ---- NABI CARDS ---- */
.nabi-card {
  background: var(--bg2);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.nabi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.nabi-emoji { font-size: 44px; margin-bottom: 10px; display: block; }

/* ---- QUIZ ---- */
.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-ultra); }
.quiz-option.correct { border-color: #16a34a; background: rgba(22,163,74,0.1); color: #16a34a; }
.quiz-option.wrong { border-color: #dc2626; background: rgba(220,38,38,0.1); color: #dc2626; }

/* ---- WEEK GRID ---- */
.week-grid { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.week-day-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; }
.week-day-label { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.prayer-dot {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0px;
}
.prayer-dot.hadir { background: rgba(26,92,58,0.15); color: var(--primary); }
.prayer-dot.absent { background: var(--bg3); color: var(--text-muted); }

/* ---- INFO ITEMS ---- */
.info-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-item:last-child { border-bottom: none; }
.info-date-badge { min-width: 44px; text-align: center; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-radius: 10px; padding: 6px; }
.info-day { font-size: 18px; font-weight: 900; line-height: 1; }
.info-mon { font-size: 9px; font-weight: 700; letter-spacing: 1px; opacity: 0.85; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ---- ADMIN ---- */
.admin-stat-card {
  background: var(--bg2);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  text-align: center;
}
.admin-conten-tab {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: var(--bg3);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s;
}
.admin-conten-tab.active { background: var(--primary); color: white; }

/* ---- RUNNING TEXT ---- */
.running-text-wrap {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: rgba(255,255,255,0.9);
  padding: 6px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  position: sticky;
  top: var(--topbar-h);
  z-index: 790;
}
.running-text-inner {
  display: inline-block;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- CLOCK ---- */
.clock-badge {
  background: var(--bg3);
  border-radius: 10px;
  padding: 6px 14px;
  font-family: monospace;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .topbar { left: 0; }
  .main-content { margin-left: 0; }
  .prayer-bar { display: none; }
}

@media (max-width: 640px) {
  .page-content { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dashboard-banner { padding: 18px 16px; }
  .prayer-times-strip { gap: 6px; }
  .prayer-time-pill { font-size: 10px; padding: 5px 8px; }
  .modal-box { border-radius: 16px; }
  .chart-wrap { height: 180px; }
  .chart-wrap-lg { height: 240px; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 18px; }
  .kids-menu-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   ANIMATIONS & EFFECTS
   ================================================================ */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.shimmer {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- HIJRI DATE WIDGET ---- */
.hijri-widget {
  background: linear-gradient(135deg, rgba(201,162,39,0.12), rgba(201,162,39,0.05));
  border: 1px solid rgba(201,162,39,0.25);
  border-radius: 10px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Amiri', serif;
  white-space: nowrap;
}

/* Divider */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Section label */
.section-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- QURAN BISMILLAH ---- */
.bismillah {
  font-family: 'Amiri', serif;
  font-size: 28px;
  text-align: center;
  color: var(--primary);
  padding: 16px;
  background: var(--primary-ultra);
  border-radius: 16px;
  margin-bottom: 20px;
  line-height: 1.8;
  letter-spacing: 2px;
}
