/* ============================================================
   MY QURAAN TRACKER — style.css
   Mobile-first · Soft & Elegant · Card-based
   Brand: Deep Teal #0D4A3E + Gold #C9A84C + Warm Cream #FAF7F2
   ============================================================ */

/* ── OFFLINE-SAFE SYSTEM FONTS ──
   No Google Fonts — works without internet connection. */

:root {
  --font-serif:  Georgia, 'Times New Roman', serif;
  --font-sans:   'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Traditional Arabic', 'Arial Unicode MS', serif;
  --teal:         #0D4A3E;
  --teal-mid:     #1A6B58;
  --teal-soft:    #E6F0ED;
  --gold:         #C9A84C;
  --gold-warm:    #D4B86A;
  --gold-soft:    #F7F0DC;
  --gold-dark:    #9A7A2E;
  --cream:        #FAF7F2;
  --cream-dark:   #F0EBE1;
  --white:        #FFFFFF;
  --text:         #1A1A1A;
  --text-mid:     #555550;
  --text-soft:    #999990;
  --border:       #E8E2D9;
  --shadow-sm:    0 2px 12px rgba(13,74,62,0.08);
  --shadow-md:    0 6px 24px rgba(13,74,62,0.12);
  --radius-sm:    12px;
  --radius-md:    20px;
  --radius-lg:    28px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; touch-action: manipulation; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* decorative glow blobs */
body::before {
  content: '';
  position: fixed; top: -100px; right: -100px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; bottom: -80px; left: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,74,62,0.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── HEADER ── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--teal);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; height: 60px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
.header-logo img { height: 36px; object-fit: contain; display: block; }
.header-btn {
  background: rgba(255,255,255,0.12); border: none; color: white;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.header-btn:active { background: rgba(255,255,255,0.22); }

/* ── DRAWER ── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed; top: 0; left: -100%;
  width: 80%; max-width: 290px; height: 100%;
  background: var(--white); z-index: 300;
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  box-shadow: 4px 0 32px rgba(0,0,0,0.18);
}
.drawer.open { left: 0; }
.drawer-head {
  background: var(--teal); padding: 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-head img { height: 40px; }
.drawer-close {
  background: rgba(255,255,255,0.15); border: none; color: white;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 0.95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.drawer-nav { padding: 0.75rem 0; flex: 1; }
.drawer-nav a {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.9rem 1.25rem; text-decoration: none;
  color: var(--text); font-size: 0.95rem; font-weight: 600;
  border-left: 3px solid transparent; transition: all 0.2s;
}
.drawer-nav a:active, .drawer-nav a.active {
  background: var(--teal-soft); border-left-color: var(--teal); color: var(--teal);
}
.drawer-nav .nav-icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--cream); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--teal);
}
.drawer-footer {
  padding: 1rem 1.25rem; font-size: 0.88rem;
  color: var(--text-soft); border-top: 1px solid var(--border);
}

/* ── HERO ── */
.hero-banner {
  background: linear-gradient(160deg, var(--teal) 0%, #1B7060 100%);
  padding: 2rem 1.5rem 2.75rem; text-align: center; position: relative; overflow: hidden;
}
.hero-banner::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 30px; background: var(--cream); border-radius: 30px 30px 0 0;
}
.hero-arabic {
  font-family: 'Traditional Arabic', 'Arial Unicode MS', serif; font-size: 1.45rem;
  color: var(--gold-warm); margin-bottom: 0.7rem; line-height: 1.8;
}
.hero-title {
  font-family: Georgia, 'Times New Roman', serif; font-size: 1.8rem; font-weight: 700;
  color: white; line-height: 1.2; margin-bottom: 0.5rem;
}
.hero-title em { font-style: italic; color: var(--gold-warm); }
.hero-sub { font-size: 0.85rem; color: rgba(255,255,255,0.7); line-height: 1.6; }

/* ── PAGE BODY ── */
.page-body { padding: 1.5rem 1.25rem 6rem; position: relative; z-index: 1; }

/* ── SECTION LABEL ── */
.section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-soft);
  margin-bottom: 0.7rem; margin-top: 1.75rem; padding-left: 0.2rem;
}

/* ── CARDS ── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 1rem;
  transition: box-shadow 0.25s, transform 0.15s;
  -webkit-tap-highlight-color: transparent; position: relative;
}
.card:active { transform: scale(0.985); }
.card-stripe { height: 5px; background: linear-gradient(90deg, var(--teal), var(--teal-mid)); }
.card-stripe.gold { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }
.card-body { padding: 1.4rem; }

.card-icon-row { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.card-icon {
  width: 50px; height: 50px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.card-icon.teal { background: var(--teal-soft); color: var(--teal); }
.card-icon.gold  { background: var(--gold-soft); color: var(--gold-dark); }

.card-title {
  font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; font-weight: 700;
  color: var(--teal); line-height: 1.2;
}
.card-title.gold-text { color: var(--gold-dark); }
.card-desc { font-size: 0.85rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 1.1rem; }

/* ── INPUTS ── */
.field {
  width: 100%; padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 1rem; color: var(--text);
  background: var(--cream); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.75rem; -webkit-appearance: none;
}
.field:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,74,62,0.1); background: white; }
.field::placeholder { color: var(--text-soft); }

/* ── BUTTONS ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 1rem; border: none; border-radius: var(--radius-sm);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: transform 0.12s, filter 0.2s;
  -webkit-tap-highlight-color: transparent; text-decoration: none; text-align: center;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, var(--teal), var(--teal-mid)); color: white; box-shadow: 0 4px 16px rgba(13,74,62,0.28); }
.btn-gold    { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: white; box-shadow: 0 4px 16px rgba(201,168,76,0.32); }
.btn-outline { background: transparent; color: var(--teal); border: 2px solid var(--teal); }
.btn-outline:active { background: var(--teal-soft); }
.btn-ghost   { background: var(--cream-dark); color: var(--text-mid); font-weight: 600; }
.btn-sm      { padding: 0.65rem 1rem; font-size: 0.85rem; border-radius: 10px; width: auto; }

/* ── OR DIVIDER ── */
.or-line {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.9rem 0; color: var(--text-soft); font-size: 0.78rem; font-weight: 600;
}
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── JOIN ROW ── */
.join-row { display: flex; gap: 0.6rem; align-items: center; }
.join-row .field { margin-bottom: 0; flex: 1; }
.join-row .btn   { width: auto; padding: 0.9rem 1.2rem; flex-shrink: 0; }

/* ── PROGRESS ── */
.progress-wrap {
  background: var(--cream-dark); border-radius: 99px; height: 10px; overflow: hidden; margin: 0.5rem 0;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--teal-mid));
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.gold { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 0.76rem; color: var(--text-soft); margin-top: 0.3rem;
}

/* ── SHARE BOX ── */
.share-box {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--teal-soft); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; margin-bottom: 1rem;
}
.share-code {
  font-family: Georgia, 'Times New Roman', serif; font-size: 1.55rem; font-weight: 700;
  color: var(--teal); letter-spacing: 0.15em; flex: 1;
}
.copy-btn {
  background: var(--teal); color: white; border: none;
  border-radius: 10px; padding: 0.45rem 0.9rem;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.copy-btn:active { filter: brightness(0.85); }

/* ── PARAS GRID ── */
.paras-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; margin-top: 0.5rem; }
.para-tile {
  background: var(--white); border-radius: var(--radius-sm); padding: 0.75rem 0.4rem;
  text-align: center; border: 2px solid var(--border);
  transition: all 0.18s; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.para-tile.available:active { transform: scale(0.93); }
.para-tile.assigned  { border-color: var(--gold);  background: var(--gold-soft); }
.para-tile.completed { border-color: var(--teal);  background: var(--teal-soft); }
.para-tile.unavailable { cursor: default; }
.para-num  { font-family: Georgia, 'Times New Roman', serif; font-size: 1.35rem; font-weight: 700; color: var(--teal); display: block; line-height: 1; }
.para-name { font-size: 0.56rem; color: var(--text-soft); display: block; margin-top: 0.15rem; line-height: 1.3; }
.para-who  { font-size: 0.63rem; font-weight: 700; color: var(--gold-dark); display: block; margin-top: 0.2rem; }
.para-tick { font-size: 0.85rem; color: var(--teal); display: block; margin-top: 0.15rem; }

/* ── TAP BUTTON ── */
.tap-zone { display: flex; flex-direction: column; align-items: center; padding: 1.25rem 0 1rem; }
.tap-circle {
  width: 136px; height: 136px; border-radius: 50%;
  background: linear-gradient(145deg, var(--teal-mid), var(--teal)); color: white; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.2rem; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 8px 28px rgba(13,74,62,0.35);
  transition: transform 0.1s, box-shadow 0.1s; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.tap-circle i { font-size: 2rem; }
.tap-circle:active { transform: scale(0.9); box-shadow: 0 4px 14px rgba(13,74,62,0.22); }
.tap-circle.gold-tap { background: linear-gradient(145deg, var(--gold), var(--gold-dark)); box-shadow: 0 8px 28px rgba(201,168,76,0.38); }
.tap-circle.gold-tap:active { box-shadow: 0 4px 14px rgba(201,168,76,0.22); }

.big-number {
  font-family: Georgia, 'Times New Roman', serif; font-size: 4.5rem; font-weight: 700;
  color: var(--teal); line-height: 1; text-align: center; margin-bottom: 0.2rem;
}
.big-number.gold-num { color: var(--gold-dark); }

/* ── STAT PILLS ── */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0.9rem 0; }
.stat-pill { background: var(--cream-dark); border-radius: var(--radius-sm); padding: 0.85rem; text-align: center; }
.stat-pill.teal-pill { background: var(--teal-soft); }
.stat-pill.gold-pill  { background: var(--gold-soft); }
.stat-val { font-family: Georgia, 'Times New Roman', serif; font-size: 1.55rem; font-weight: 700; color: var(--teal); display: block; }
.stat-val.gold-val { color: var(--gold-dark); }
.stat-lbl { font-size: 0.68rem; color: var(--text-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── CONTRIBUTIONS ── */
.contrib-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.contrib-item:last-child { border-bottom: none; }
.contrib-name { font-weight: 700; color: var(--teal); }
.contrib-count {
  font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; font-weight: 700;
  color: var(--gold-dark); background: var(--gold-soft); padding: 0.18rem 0.7rem; border-radius: 99px;
}

/* ── SUCCESS BANNER ── */
.success-banner {
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  border-radius: var(--radius-md); padding: 1.25rem 1.5rem; text-align: center; color: white; margin-bottom: 1rem;
}
.success-banner .arabic { font-family: 'Traditional Arabic', 'Arial Unicode MS', serif; font-size: 1.25rem; color: var(--gold-warm); }
.success-banner h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; margin: 0.25rem 0 0.15rem; }
.success-banner p  { font-size: 0.8rem; opacity: 0.8; }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--teal); padding: 1.6rem 1.5rem 2.5rem;
  text-align: center; position: relative;
}
.page-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 26px; background: var(--cream); border-radius: 26px 26px 0 0;
}
.page-hero-arabic { font-family: 'Traditional Arabic', 'Arial Unicode MS', serif; font-size: 1.25rem; color: var(--gold-warm); margin-bottom: 0.35rem; }
.page-hero h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.45rem; font-weight: 700; color: white; margin-bottom: 0.2rem; }
.page-hero p { font-size: 0.8rem; color: rgba(255,255,255,0.67); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: white; border-top: 1px solid var(--border);
  display: flex; z-index: 90; box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 0.55rem 0.5rem 0.65rem; text-decoration: none;
  color: var(--text-soft); font-size: 0.62rem; font-weight: 700;
  gap: 0.18rem; -webkit-tap-highlight-color: transparent; letter-spacing: 0.03em;
}
.bottom-nav a i { font-size: 1.15rem; }
.bottom-nav a.active { color: var(--teal); }
.bottom-nav a.active i {
  background: var(--teal-soft); width: 34px; height: 34px;
  border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}

/* ── KHATM LIST ROWS ── */
.khatm-row {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem; background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); margin-bottom: 0.75rem;
  text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.khatm-row:active { transform: scale(0.97); }
.khatm-row-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--teal-soft); display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; color: var(--teal); flex-shrink: 0;
}
.khatm-row-info { flex: 1; min-width: 0; }
.khatm-row-name { font-weight: 700; color: var(--text); font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.khatm-row-meta { font-size: 0.72rem; color: var(--text-soft); margin-top: 0.12rem; }
.khatm-row-pct  { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; font-weight: 700; color: var(--teal); flex-shrink: 0; }

/* ── ALERT ── */
.alert {
  border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  font-size: 0.83rem; margin-bottom: 1rem;
  display: flex; gap: 0.6rem; align-items: flex-start; line-height: 1.5;
}
.alert i { margin-top: 0.1rem; flex-shrink: 0; }
.alert.info { background: var(--teal-soft); color: var(--teal); }
.alert.warn { background: var(--gold-soft); color: var(--gold-dark); }
.alert.done { background: #E6F4EA; color: #2D6A4F; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--text-soft); }
.empty-state i { font-size: 2.2rem; margin-bottom: 0.6rem; color: var(--border); display: block; }
.empty-state p { font-size: 0.85rem; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeUp 0.38s ease both; }
.fade-up-2 { animation: fadeUp 0.38s 0.08s ease both; }
.fade-up-3 { animation: fadeUp 0.38s 0.16s ease both; }

@keyframes pop {
  0%  { transform: scale(1); }
  40% { transform: scale(1.08); }
  100%{ transform: scale(1); }
}
.pop { animation: pop 0.22s ease; }

/* ── UTILITY ── */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-1 { margin-bottom: 1rem; }
.text-center { text-align: center; } .text-soft { color: var(--text-soft); font-size: 0.83rem; }
.fw-bold { font-weight: 700; } .gold-text { color: var(--gold-dark); } .teal-text { color: var(--teal); }