/* ==========================================================================
   Al-Mustafa (PBUH) Foundation — Official Website Design System v2
   Palette derived directly from the Official Foundation Logo:
   Deep Teal (#1E6F6D / #0E4240) + Warm Sand Gold (#D6B45A / #B89236)
   ========================================================================== */

:root {
  --font-scale: 1;

  --bg: #f5f7f6;
  --bg-alt: #eaf0ee;
  --surface: #ffffff;
  --surface-elevated: #fbfcfc;
  --border: rgba(30, 111, 109, 0.13);
  --border-gold: rgba(214, 180, 90, 0.42);

  /* Brand Teal (from Official Logo) */
  --teal-950: #082b2a;
  --teal-900: #0e4240;
  --teal-800: #165957;
  --teal-700: #1e6f6d;
  --teal-600: #2b8784;
  --teal-100: #d8efee;
  --teal-50: #eef7f7;

  /* Brand Gold (from Official Logo) */
  --gold-700: #997622;
  --gold-600: #b89236;
  --gold-500: #d6b45a;
  --gold-400: #e5ca7d;
  --gold-200: #f4e4b5;
  --gold-50: #fcf8ec;

  --text: #0f2424;
  --text-muted: #4b6564;
  --text-light: #718b8a;

  --danger: #dc2626;
  --warning: #d97706;
  --info: #0284c7;
  --success: #0d9488;

  --shadow-xs: 0 1px 3px rgba(8, 43, 42, 0.05);
  --shadow-sm: 0 4px 14px rgba(8, 43, 42, 0.06);
  --shadow-md: 0 12px 30px rgba(8, 43, 42, 0.09);
  --shadow-lg: 0 22px 54px rgba(8, 43, 42, 0.15);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --font-sans: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-quran: 'Amiri', Georgia, serif;
}

[data-theme="dark"] {
  --bg: #071414;
  --bg-alt: #0b1e1e;
  --surface: #0f2626;
  --surface-elevated: #143232;
  --border: rgba(214, 180, 90, 0.16);
  --border-gold: rgba(214, 180, 90, 0.38);
  --teal-50: rgba(43, 135, 132, 0.16);
  --teal-100: rgba(43, 135, 132, 0.28);
  --gold-50: rgba(214, 180, 90, 0.12);
  --text: #edf5f4;
  --text-muted: #9eb7b6;
  --text-light: #759392;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.44);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.58);
}

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

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 0.94rem; }
img { max-width: 100%; display: block; }

.container {
  width: min(1220px, 100% - 2rem);
  margin-inline: auto;
}

/* ==========================================================================
   Top Utility Bar & Clean Single-Row Navbar
   ========================================================================== */
.top-bar {
  background: var(--teal-950);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(214, 180, 90, 0.22);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.42rem 0;
  flex-wrap: wrap;
}

.top-bar-domain {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gold-200);
  font-weight: 600;
}

.top-bar-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ctrl-btn, .lang-select {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(214, 180, 90, 0.28);
  border-radius: 8px;
  padding: 0.26rem 0.62rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.18s ease;
}

.ctrl-btn:hover, .lang-select:hover {
  background: rgba(214, 180, 90, 0.22);
  border-color: var(--gold-400);
}

.lang-select option {
  background: var(--teal-900);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

[data-theme="dark"] .site-header {
  background: rgba(11, 30, 30, 0.92);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border-gold);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .brand-logo-wrap {
  background: rgba(255, 255, 255, 0.94);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  font-weight: 800;
  font-size: 1.04rem;
  line-height: 1.2;
  color: var(--teal-800);
}

[data-theme="dark"] .brand-title { color: var(--gold-400); }

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-link i { font-size: 0.88rem; opacity: 0.85; }

.nav-link:hover {
  background: var(--teal-50);
  color: var(--teal-700);
}

[data-theme="dark"] .nav-link:hover {
  color: var(--gold-400);
}

.nav-link.active {
  background: var(--teal-700);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 111, 109, 0.28);
}

.nav-link.active i { opacity: 1; }

.nav-link.donate-cta {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #fff;
  padding-inline: 1.1rem;
  box-shadow: 0 6px 16px rgba(184, 146, 54, 0.32);
}

.nav-link.donate-cta:hover {
  filter: brightness(1.06);
  color: #fff;
  transform: translateY(-1px);
}

/* Desktop "More" Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 235px;
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 0.45rem;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 0.18rem;
  z-index: 150;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
  animation: fadeUp 0.16s ease;
}

.nav-dropdown-menu .nav-link {
  width: 100%;
  justify-content: flex-start;
  padding: 0.58rem 0.85rem;
  font-size: 0.86rem;
}

.mobile-menu-btn {
  display: none;
  background: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--border);
  border-radius: 11px;
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .mobile-menu-btn { color: var(--gold-400); }

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(5, 22, 22, 0.68);
  backdrop-filter: blur(5px);
}

.mobile-drawer.open { display: flex; }

.mobile-drawer-panel {
  width: min(315px, 85vw);
  background: var(--surface);
  height: 100%;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: var(--shadow-lg);
}

.mobile-drawer-panel .nav-link {
  width: 100%;
  justify-content: flex-start;
  padding: 0.7rem 0.9rem;
  font-size: 0.93rem;
}

/* ==========================================================================
   Elevated Ornamental Hero Section (Matched to Official Logo)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #072928 0%, #0e4745 50%, #1b6967 100%);
  color: #ffffff;
  padding: 4rem 0 4.6rem;
  border-bottom: 3px solid var(--gold-500);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.085;
  background-image: url("data:image/svg+xml,%3Csvg width='84' height='84' viewBox='0 0 84 84' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23E5CA7D' stroke-width='1'%3E%3Cpolygon points='42,4 52,32 80,42 52,52 42,80 32,52 4,42 32,32'/%3E%3Ccircle cx='42' cy='42' r='13'/%3E%3C/g%3E%3C/svg%3E");
  animation: driftPattern 55s linear infinite;
  pointer-events: none;
}

@keyframes driftPattern {
  from { background-position: 0 0; }
  to { background-position: 168px 168px; }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(75px);
  opacity: 0.24;
  pointer-events: none;
  animation: floatOrb 11s ease-in-out infinite alternate;
}

.hero-orb.orb-1 {
  width: 380px; height: 380px;
  background: var(--gold-500);
  top: -110px; inset-inline-end: -70px;
}

.hero-orb.orb-2 {
  width: 300px; height: 300px;
  background: #38b2ac;
  bottom: -100px; inset-inline-start: -50px;
  animation-delay: 2.5s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(22px, -18px) scale(1.07); }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 2.75rem;
  align-items: center;
}

.hero-bismillah {
  font-family: var(--font-quran);
  font-size: 1.5rem;
  color: var(--gold-200);
  margin-bottom: 0.65rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.36rem 0.95rem;
  border-radius: var(--radius-pill);
  background: rgba(214, 180, 90, 0.16);
  border: 1px solid rgba(244, 228, 181, 0.42);
  color: var(--gold-200);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero h1 {
  margin: 0 0 1.05rem;
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  line-height: 1.28;
  font-weight: 900;
}

.hero h1 span { color: var(--gold-200); }

.hero-lead {
  font-size: 1.03rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 58ch;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-medallion {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 228, 181, 0.36);
  border-radius: 26px;
  padding: 2rem 1.75rem;
  backdrop-filter: blur(14px);
  text-align: center;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.28);
}

.hero-logo-frame {
  width: 138px;
  height: 138px;
  margin: 0 auto 1.15rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 3px solid var(--gold-400);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26), 0 0 0 8px rgba(214, 180, 90, 0.16);
  animation: gentleFloat 5s ease-in-out infinite alternate;
}

@keyframes gentleFloat {
  from { transform: translateY(0px); }
  to { transform: translateY(-7px); }
}

.hero-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-verse {
  font-family: var(--font-quran);
  font-size: 1.32rem;
  color: var(--gold-200);
  line-height: 1.9;
  margin: 0 0 0.35rem;
}

.hero-verse-ref {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
}

.hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-mini-stat strong {
  display: block;
  font-size: 1.25rem;
  color: var(--gold-200);
  font-weight: 900;
}

.hero-mini-stat span {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Buttons, Cards, Sections, Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.35rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
  color: #fff;
  box-shadow: 0 6px 18px rgba(30, 111, 109, 0.28);
}

.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #fff;
  box-shadow: 0 6px 18px rgba(184, 146, 54, 0.34);
}

.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-outline {
  background: var(--surface);
  border-color: var(--border-gold);
  color: var(--text);
}

.btn-outline:hover { background: var(--gold-50); border-color: var(--gold-500); }

.btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.btn-outline-light:hover { background: rgba(255, 255, 255, 0.2); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.44rem 0.9rem; font-size: 0.84rem; border-radius: 9px; }

.section { padding: 3rem 0; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: var(--teal-800);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-title i {
  color: var(--gold-600);
  font-size: 0.95em;
}

[data-theme="dark"] .section-title { color: var(--gold-400); }
[data-theme="dark"] .section-title i { color: var(--teal-600); }

.section-subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.15rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.45rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-gold);
}

.quick-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
}

.quick-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--teal-50), var(--gold-50));
  color: var(--teal-700);
  border: 1px solid var(--border-gold);
  transition: all 0.2s ease;
}

.quick-card:hover .quick-card-icon {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: #fff;
  border-color: transparent;
}

[data-theme="dark"] .quick-card-icon { color: var(--gold-400); }

.quick-card h3 { margin: 0.25rem 0 0; font-size: 1.02rem; font-weight: 800; }
.quick-card p { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.72rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--border);
}

.badge-gold {
  background: var(--gold-50);
  color: var(--gold-700);
  border-color: var(--border-gold);
}

[data-theme="dark"] .badge-gold { color: var(--gold-400); }
.badge-pending { background: rgba(217, 119, 6, 0.14); color: #d97706; }
.badge-approved, .badge-confirmed, .badge-completed { background: rgba(13, 148, 136, 0.16); color: #0d9488; }
.badge-rejected, .badge-cancelled { background: rgba(220, 38, 38, 0.14); color: #dc2626; }
.badge-review { background: rgba(2, 132, 199, 0.14); color: #0284c7; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem; }
.form-group { display: flex; flex-direction: column; gap: 0.38rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 0.86rem; font-weight: 700; color: var(--text); }

.form-control {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(43, 135, 132, 0.16);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.amount-chip {
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.84rem;
  transition: all 0.18s;
}

.amount-chip:hover, .amount-chip.active {
  background: var(--teal-700);
  color: #fff;
  border-color: var(--teal-700);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
}

.tab-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(30, 111, 109, 0.24);
}

/* Sponsorship Calculator Box */
.calc-summary {
  background: linear-gradient(135deg, var(--teal-950), var(--teal-800));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1.65rem;
  border: 1px solid var(--gold-500);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: var(--shadow-md);
}

.calc-total { font-size: 1.95rem; font-weight: 900; color: var(--gold-200); }

/* Quran Reader */
.quran-layout { display: grid; grid-template-columns: 330px 1fr; gap: 1.35rem; align-items: start; }
.surah-list { max-height: 72vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.42rem; padding-inline-end: 0.35rem; }

.surah-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.68rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.18s;
  text-align: start;
}

.surah-item:hover, .surah-item.active {
  border-color: var(--gold-500);
  background: var(--teal-50);
}

.surah-num {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--teal-800);
  color: var(--gold-200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.quran-paper {
  background: var(--surface-elevated);
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.quran-bismillah {
  font-family: var(--font-quran);
  font-size: 1.95rem;
  text-align: center;
  color: var(--teal-800);
  margin: 0.6rem 0 1.45rem;
}

[data-theme="dark"] .quran-bismillah { color: var(--gold-400); }

.quran-text {
  font-family: var(--font-quran);
  font-size: var(--quran-size, 1.75rem);
  line-height: 2.38;
  text-align: justify;
  direction: rtl;
}

.ayah-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75em; height: 1.75em;
  margin: 0 0.22em;
  padding: 0 0.25em;
  font-family: var(--font-sans);
  font-size: 0.52em;
  font-weight: 800;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  color: var(--teal-800);
  background: var(--gold-50);
  vertical-align: middle;
}

[data-theme="dark"] .ayah-badge { color: var(--gold-400); }

/* Prayer Times */
.prayer-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.9rem; }

.prayer-card {
  text-align: center;
  padding: 1.25rem 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.prayer-card i { font-size: 1.35rem; color: var(--teal-600); }
.prayer-card.next {
  background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
  color: #fff;
  border-color: var(--gold-400);
  box-shadow: var(--shadow-md);
}
.prayer-card.next i { color: var(--gold-200); }
.prayer-card .p-time { font-size: 1.35rem; font-weight: 900; margin-top: 0.35rem; }

/* Media Cards */
.media-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-alt);
  margin-bottom: 0.9rem;
}

.book-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-900), var(--teal-600));
  margin-bottom: 0.9rem;
}

/* Tables & Coordinator Statement */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.78rem 0.95rem; border-bottom: 1px solid var(--border); text-align: start; }
th { background: var(--teal-50); color: var(--teal-800); font-weight: 800; }
[data-theme="dark"] th { color: var(--gold-400); }

.statement-sheet {
  background: #ffffff;
  color: #111827;
  border: 2px solid #1e6f6d;
  border-radius: 16px;
  padding: 1.85rem;
}
.statement-sheet th { background: #eef7f7; color: #165957; }
.statement-sheet td, .statement-sheet th { border-color: #d1d5db; color: #111827; }

/* Stepper */
.stepper { display: flex; justify-content: space-between; gap: 0.55rem; margin: 1.4rem 0; }
.step-item {
  flex: 1; text-align: center; padding: 0.78rem 0.5rem;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-alt); font-size: 0.82rem; font-weight: 700; opacity: 0.58;
}
.step-item.done { opacity: 1; background: var(--teal-50); border-color: var(--teal-600); color: var(--teal-800); }
[data-theme="dark"] .step-item.done { color: var(--gold-400); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(5, 22, 22, 0.74);
  backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  width: min(860px, 100%);
  max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-box.modal-xl { width: min(1080px, 100%); height: 88vh; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.modal-body { padding: 1.4rem; overflow-y: auto; flex: 1; }

.close-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 1rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Toast */
.toast-stack {
  position: fixed; bottom: 1.25rem; inset-inline-end: 1.25rem; z-index: 400;
  display: flex; flex-direction: column; gap: 0.6rem; max-width: 360px;
}
.toast {
  background: var(--teal-900); color: #fff;
  padding: 0.85rem 1.15rem; border-radius: 12px;
  border: 1px solid var(--gold-500); box-shadow: var(--shadow-lg);
  font-size: 0.9rem; display: flex; align-items: center; gap: 0.55rem;
  animation: fadeUp 0.22s ease;
}
.toast.error { background: #991b1b; border-color: #fca5a5; }

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

/* Footer */
.site-footer {
  background: var(--teal-950);
  color: rgba(255, 255, 255, 0.88);
  padding: 3.2rem 0 1.6rem;
  margin-top: 3.5rem;
  border-top: 3px solid var(--gold-500);
}
.footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: 2rem; }
.footer-title { color: var(--gold-200); font-size: 1rem; font-weight: 800; margin: 0 0 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.88rem; }
.footer-links a, .footer-links button {
  color: rgba(255, 255, 255, 0.78);
  background: none; border: none; padding: 0; cursor: pointer;
  text-align: start; font-size: 0.88rem;
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.footer-links a:hover, .footer-links button:hover { color: var(--gold-200); }
.footer-bottom {
  margin-top: 2.2rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.82rem; color: rgba(255, 255, 255, 0.68);
}

.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--teal-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 1.5rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .quran-layout { grid-template-columns: 1fr; }
  .surah-list { max-height: 280px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prayer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .prayer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .stepper { flex-direction: column; }
}

@media print {
  body * { visibility: hidden; }
  #statementPrintArea, #statementPrintArea * { visibility: visible; }
  #statementPrintArea { position: absolute; inset: 0; width: 100%; border: none; box-shadow: none; }
}
