/* ══════════════════════════════════════════════════════════════════
   MAQRAA PWA — SHARED STYLESHEET
   مسجد أبي بكر الصديق — نظام المقرأة القرآنية
   v3.0 | CSS مشترك بين الأدمن والطالب
══════════════════════════════════════════════════════════════════ */

/* ── FONTS ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Amiri:ital,wght@0,400;0,700;1,400&family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Tajawal:wght@400;500;700;800&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────────────────── */
:root {
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --gold-dark:   #9a7a30;
  --green-deep:  #0d3b2e;
  --green-mid:   #1a5c44;
  --green-light: #2d8a65;
  --cream:       #fdf8f0;
  --red:         #ef4444;
  --amber:       #f59e0b;
}

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

/* ── BASE ───────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Noto Naskh Arabic', 'Amiri', serif;
  background: var(--green-deep);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ── TYPOGRAPHY RULES ───────────────────────────────────────────── */
h1, h2, h3,
.section-title h2, .modal-title, .header-mosque, .header-system,
.nav-btn span, .form-label, .sub-label, .dash-label, .stat-label,
.notif-title {
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  font-weight: 700 !important;
}
.dash-value, .stat-value, .profile-info h3, .notif-message {
  font-family: 'Cairo', 'Amiri', serif !important;
}
.nav-btn, .btn-primary, .btn-secondary, .btn-green, .btn-icon,
.btn-wa, .form-input, .form-label {
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
}

/* ── BACKGROUND PATTERN ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(201,168,76,.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(45,138,101,.07) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9a84c' fill-opacity='0.035'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z M40 10 L70 40 L40 70 L10 40 Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── LAYOUT ─────────────────────────────────────────────────────── */
#app { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 16px 12px 48px; }

/* ── LOGIN SCREEN ───────────────────────────────────────────────── */
#login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,168,76,.07) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(26,92,68,.15) 0%, transparent 55%);
}
.login-box {
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid rgba(201,168,76,.35);
  border-radius: 32px;
  padding: 44px 36px;
  width: 100%; max-width: 420px;
  text-align: center;
  box-shadow: 0 32px 100px rgba(0,0,0,.5), 0 0 0 1px rgba(201,168,76,.08), inset 0 1px 0 rgba(201,168,76,.18);
  position: relative; overflow: hidden;
}
.login-box::before {
  content: '';
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
  pointer-events: none;
}
.login-ornament { color: var(--gold); font-size: 1.5rem; letter-spacing: 12px; margin-bottom: 8px; opacity: .75; }
.login-mosque-name {
  font-family: 'Cairo', sans-serif; font-weight: 900;
  font-size: clamp(1.1rem, 5vw, 2rem);
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(201,168,76,.3);
  line-height: 1.2; margin-bottom: 16px;
}
.login-location { font-family: 'Cairo', sans-serif; font-size: .85rem; color: rgba(253,248,240,.42); letter-spacing: 3px; margin-bottom: 8px; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 12px 0 14px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,168,76,.35), transparent); }
.login-divider-icon { color: var(--gold); font-size: .75rem; opacity: .6; }
.login-system { font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 1rem; color: var(--gold); margin-bottom: 24px; }
.login-pw-wrap { position: relative; margin-bottom: 16px; }
.login-pw-wrap .form-input { padding-right: 44px; font-size: 1.1rem; letter-spacing: 3px; text-align: center; }
.login-pw-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: rgba(201,168,76,.5); }
.login-error {
  color: #fca5a5; font-size: .85rem; margin-top: 10px; display: none;
  background: rgba(220,38,38,.08); border: 1px solid rgba(252,165,165,.18);
  border-radius: 10px; padding: 8px 12px;
}
.login-hint { font-size: .68rem; color: rgba(253,248,240,.25); margin-top: 16px; }
.forgot-pw { color: rgba(201,168,76,.6); font-size: .75rem; margin-top: 12px; cursor: pointer; text-decoration: underline; }
.forgot-pw:hover { color: var(--gold); }

/* ── HEADER ─────────────────────────────────────────────────────── */
.header {
  text-align: center; padding: 20px 16px 16px; margin-bottom: 16px;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, transparent 100%);
  border-bottom: 1px solid rgba(201,168,76,.1);
}
.header::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.2), transparent);
}
.header-ornament { color: var(--gold); font-size: 1.2rem; letter-spacing: 10px; opacity: .6; margin-bottom: 4px; }
.header-mosque {
  font-family: 'Cairo', sans-serif; font-weight: 900;
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(201,168,76,.22);
  line-height: 1.2; margin-bottom: 12px;
}
.header-location {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(.8rem, 2vw, .95rem);
  color: rgba(253,248,240,.42); font-weight: 500; letter-spacing: 3px;
  margin-bottom: 4px;
}
.header-welcome {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: rgba(253,248,240,.7); margin-bottom: 5px;
}
.header-system {
  display: inline-block; font-family: 'Cairo', sans-serif; font-weight: 700;
  font-size: clamp(.8rem, 2vw, 1rem);
  color: var(--green-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  padding: 4px 20px; border-radius: 30px;
  box-shadow: 0 2px 12px rgba(201,168,76,.3);
}
.header-actions {
  position: absolute; top: 12px; left: 10px;
  display: flex; gap: 4px; flex-wrap: wrap;
  background: rgba(0,0,0,.2); padding: 4px 6px; border-radius: 12px;
  backdrop-filter: blur(8px); border: 1px solid rgba(201,168,76,.12);
}
.btn-action {
  padding: 5px 8px; border-radius: 8px;
  font-family: 'Cairo', sans-serif; font-size: .7rem; font-weight: 700;
  cursor: pointer; transition: all .2s; border: 1px solid;
  display: inline-flex; align-items: center; gap: 3px; background: transparent;
}
.btn-action:hover { transform: translateY(-1px); }
.btn-act-red   { color: #fca5a5; border-color: rgba(252,165,165,.2); }
.btn-act-red:hover   { background: rgba(220,38,38,.2); }
.btn-act-amber { color: #fcd34d; border-color: rgba(252,211,77,.2); }
.btn-act-amber:hover { background: rgba(245,158,11,.18); }

/* ── NAV ────────────────────────────────────────────────────────── */
.nav {
  display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap;
  background: rgba(0,0,0,.15); padding: 5px; border-radius: 16px;
  border: 1px solid rgba(201,168,76,.15); backdrop-filter: blur(12px);
}
.nav-btn {
  flex: 1; min-width: 70px; padding: 10px 6px; border: none; border-radius: 12px;
  font-family: 'Cairo', 'Tajawal', sans-serif; font-weight: 700; font-size: .8rem;
  cursor: pointer; transition: all .3s; background: transparent;
  color: rgba(253,248,240,.5); position: relative; overflow: hidden;
}
.nav-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  opacity: 0; transition: opacity .3s; border-radius: 12px;
}
.nav-btn.active::before { opacity: 1; }
.nav-btn.active {
  color: var(--green-deep);
  box-shadow: 0 4px 20px rgba(201,168,76,.4), 0 0 0 1px rgba(201,168,76,.2);
}
.nav-btn:hover:not(.active) { background: rgba(201,168,76,.08); color: var(--gold-light); }
.nav-btn span { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 4px; }

/* ── NOTIFICATION BADGE ─────────────────────────────────────────── */
.notif-badge {
  background: var(--red); color: white; border-radius: 50%;
  min-width: 18px; height: 18px; font-size: .65rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid rgba(201,168,76,.16); border-radius: 22px;
  padding: 20px 18px; margin-bottom: 16px; backdrop-filter: blur(14px);
  box-shadow: 0 6px 32px rgba(0,0,0,.18), inset 0 1px 0 rgba(201,168,76,.1);
}
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.section-title h2 { font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--gold-light); }
.section-title-bar {
  width: 4px; height: 20px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  border-radius: 4px; flex-shrink: 0;
  box-shadow: 0 0 8px rgba(201,168,76,.3);
}

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 11px 16px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  color: var(--green-deep); border: none; border-radius: 13px;
  font-weight: 700; font-size: .97rem; cursor: pointer; transition: all .3s;
  box-shadow: 0 4px 16px rgba(201,168,76,.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,.42); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 16px;
  background: transparent; color: rgba(253,248,240,.68);
  border: 1px solid rgba(201,168,76,.28); border-radius: 13px;
  font-weight: 600; font-size: .94rem; cursor: pointer; transition: all .3s;
}
.btn-secondary:hover { background: rgba(201,168,76,.09); color: var(--gold-light); border-color: var(--gold); }
.btn-green {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px 16px;
  background: rgba(45,138,101,.2); color: #6ee7b7;
  border: 1px solid rgba(110,231,183,.25); border-radius: 13px;
  font-weight: 600; font-size: .94rem; cursor: pointer; transition: all .3s;
}
.btn-green:hover { background: rgba(45,138,101,.35); }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 5px 10px; border: none; border-radius: 8px;
  font-family: 'Cairo', sans-serif; font-size: .75rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.btn-edit { background: rgba(201,168,76,.12); color: var(--gold-light); border: 1px solid rgba(201,168,76,.2); }
.btn-edit:hover { background: rgba(201,168,76,.22); }
.btn-del  { background: rgba(220,38,38,.1); color: #fca5a5; border: 1px solid rgba(252,165,165,.2); }
.btn-del:hover  { background: rgba(220,38,38,.22); }
.btn-wa   { background: rgba(37,211,102,.12); color: #4ade80; border: 1px solid rgba(74,222,128,.22); }
.btn-wa:hover   { background: rgba(37,211,102,.22); }

/* ── FORMS ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: .84rem; color: var(--gold); margin-bottom: 4px; font-weight: 600; }
.form-input {
  width: 100%; padding: 10px 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(201,168,76,.22);
  border-radius: 11px; color: var(--cream);
  font-family: 'Cairo', sans-serif; font-size: .93rem; outline: none;
  transition: border-color .2s, background .2s;
}
.form-input:focus { border-color: var(--gold); background: rgba(201,168,76,.06); }
.form-input:disabled { opacity: .5; cursor: not-allowed; }
.form-input option { background: #0d3b2e; color: var(--cream); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.section-sep { height: 1px; background: linear-gradient(90deg, transparent, rgba(201,168,76,.22), transparent); margin: 16px 0; }
.sub-label { font-size: .78rem; color: var(--gold-dark); font-weight: 700; margin-bottom: 7px; }
.hint-error { color: var(--red); font-size: .75rem; margin-top: 4px; display: none; }

/* ── PROGRESS BAR ───────────────────────────────────────────────── */
.prog-wrap { background: rgba(255,255,255,.06); border-radius: 20px; height: 10px; overflow: hidden; margin-top: 5px; }
.prog-bar  { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }

/* ── BADGES ─────────────────────────────────────────────────────── */
.badge         { display: inline-block; padding: 2px 9px; border-radius: 18px; font-size: .78rem; font-weight: 700; }
.badge-present { background: rgba(45,138,101,.22); color: #6ee7b7; border: 1px solid rgba(110,231,183,.28); }
.badge-absent  { background: rgba(220,38,38,.13); color: #fca5a5; border: 1px solid rgba(252,165,165,.28); }
.badge-excuse  { background: rgba(245,158,11,.13); color: #fcd34d; border: 1px solid rgba(252,211,77,.28); }
.badge-gold    { background: rgba(201,168,76,.13); color: var(--gold-light); border: 1px solid rgba(201,168,76,.24); }
.achievement-badge {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 14px;
  font-size: .7rem; font-weight: 700; background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.28); color: var(--gold-light);
}
.level-badge { padding: 2px 8px; border-radius: 12px; font-size: .7rem; font-weight: 700; }

/* ── PAGES (SPA navigation) ─────────────────────────────────────── */
.page { display: none; animation: fadeIn .35s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── MODAL ──────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(13,59,46,.9); backdrop-filter: blur(8px);
  justify-content: center; align-items: center;
  z-index: 1000; padding: 14px;
}
.modal-overlay.open { display: flex !important; }
.modal-box {
  background: linear-gradient(145deg, #12442f, #0d3b2e);
  border: 1px solid rgba(201,168,76,.28); border-radius: 24px;
  padding: 24px 20px; width: 100%; max-width: 540px;
  max-height: 92vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.modal-title {
  font-weight: 700; font-size: 1.3rem; color: var(--gold-light);
  text-align: center; margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(201,168,76,.18);
}

/* ── TOAST ──────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 28px; right: 50%; transform: translateX(50%);
  background: linear-gradient(135deg, rgba(26,92,68,.97), rgba(13,59,46,.99));
  border: 1px solid rgba(201,168,76,.4); color: var(--cream);
  padding: 11px 20px 11px 16px; border-radius: 32px; font-size: .85rem; font-weight: 600;
  z-index: 9999; opacity: 0; transition: opacity .35s, transform .35s;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 10px 36px rgba(0,0,0,.45);
  display: flex; align-items: center; gap: 8px;
}
#toast.show { opacity: 1; transform: translateX(50%) translateY(-6px); }
#toast.toast-success { background: linear-gradient(135deg, rgba(16,80,50,.97), rgba(13,59,46,.99)); border-color: rgba(110,231,183,.4); }
#toast.toast-error   { background: linear-gradient(135deg, rgba(100,20,20,.97), rgba(80,10,10,.99)); border-color: rgba(252,165,165,.4); }
#toast.toast-warning { background: linear-gradient(135deg, rgba(90,65,10,.97), rgba(70,50,5,.99)); border-color: rgba(251,191,36,.4); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-msg  { flex: 1; }

/* ── OFFLINE BANNER ─────────────────────────────────────────────── */
#offline-banner {
  display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
  background: linear-gradient(135deg, rgba(120,40,10,.97), rgba(90,20,5,.99));
  border-bottom: 1px solid rgba(252,165,165,.35);
  padding: 10px 16px; align-items: center; justify-content: center; gap: 10px;
  font-size: .82rem; font-weight: 700; color: #fecaca;
  animation: slideDown .4s ease;
}
#offline-banner.show { display: flex; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.offline-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fca5a5;
  animation: pulseDot 1.5s infinite; flex-shrink: 0;
}
@keyframes pulseDot { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.5; transform:scale(.7); } }

/* ── PWA BANNER ─────────────────────────────────────────────────── */
.pwa-install-banner {
  position: fixed; bottom: 12px; left: 12px; right: 12px;
  background: linear-gradient(135deg, rgba(18,68,47,.98), rgba(13,59,46,.99));
  border: 1px solid rgba(201,168,76,.35); border-radius: 18px;
  padding: 14px 18px; display: none; align-items: center; gap: 12px;
  z-index: 8000; box-shadow: 0 16px 48px rgba(0,0,0,.5);
}
.pwa-install-banner .pwa-icon { font-size: 2rem; flex-shrink: 0; }
.pwa-install-banner .pwa-text { flex: 1; }
.pwa-install-banner .pwa-text p { font-family: 'Cairo', sans-serif; font-size: .85rem; color: var(--cream); }

/* ── FIREBASE STATUS BAR ────────────────────────────────────────── */
.fb-status {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px; margin-bottom: 14px;
  font-family: 'Cairo', sans-serif; font-size: .78rem; font-weight: 600;
  border: 1px solid transparent;
}
.fb-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.fb-dot.g { background: #6ee7b7; box-shadow: 0 0 8px #6ee7b740; }
.fb-dot.r { background: #fca5a5; box-shadow: 0 0 8px #fca5a540; }
.fb-dot.y { background: #fcd34d; box-shadow: 0 0 8px #fcd34d40; }

/* ── PROFILE ────────────────────────────────────────────────────── */
.profile-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid rgba(201,168,76,.16);
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-mid), var(--green-deep));
  border: 2px solid rgba(201,168,76,.4);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0;
}
.profile-info h3 { font-weight: 700; font-size: 1.3rem; color: var(--gold-light); }
.profile-info p  { font-size: .82rem; color: rgba(253,248,240,.5); margin-top: 3px; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 16px; }
.profile-stat { background: rgba(255,255,255,.04); border: 1px solid rgba(201,168,76,.14); border-radius: 12px; padding: 12px; text-align: center; }
.profile-stat .pv { font-size: 1.5rem; color: var(--gold-light); font-weight: 700; }
.profile-stat .pl { font-size: .75rem; color: rgba(253,248,240,.45); margin-top: 2px; }
.history-list { max-height: 260px; overflow-y: auto; }
.history-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: rgba(255,255,255,.03); border-radius: 10px; margin-bottom: 6px;
}
.history-date { font-size: .8rem; color: rgba(253,248,240,.5); }

/* ── STATS GRID (shared across admin/student) ───────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 12px; }
.stat-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(201,168,76,.12);
  border-radius: 14px; padding: 14px 8px; text-align: center;
}
.stat-card.clickable { cursor: pointer; transition: background .2s; }
.stat-card.clickable:hover { background: rgba(201,168,76,.08); }
.stat-icon  { font-size: 1.4rem; margin-bottom: 4px; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--gold-light); }
.stat-label { font-size: .68rem; color: rgba(253,248,240,.45); margin-top: 3px; }

/* ── TABLE ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .83rem; }
thead tr { background: rgba(201,168,76,.1); }
th { padding: 10px 8px; color: var(--gold-light); font-weight: 700; text-align: right; white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 1px solid rgba(201,168,76,.08); color: var(--cream); }
tr:hover td { background: rgba(201,168,76,.04); }

/* ── EMPTY STATE ────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: rgba(253,248,240,.3); }
.empty-icon  { font-size: 2.6rem; margin-bottom: 10px; opacity: .35; }

/* ── NOTIFICATION ITEMS ─────────────────────────────────────────── */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 14px; margin-bottom: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(201,168,76,.1); position: relative;
}
.notif-item.unread::before {
  content: ''; position: absolute; top: 12px; right: -3px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.notif-icon    { font-size: 1.5rem; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-title   { font-weight: 700; font-size: .95rem; color: var(--gold-light); margin-bottom: 4px; }
.notif-message { font-size: .85rem; color: rgba(253,248,240,.75); }
.notif-time    { font-size: .7rem; color: rgba(253,248,240,.35); margin-top: 6px; }

/* ── CONFIRM MODAL ──────────────────────────────────────────────── */
.confirm-icon   { font-size: 2.2rem; margin-bottom: 8px; }
.confirm-title  { font-weight: 700; font-size: 1.1rem; color: var(--gold-light); margin-bottom: 8px; }
.confirm-msg    { color: rgba(253,248,240,.7); font-size: .9rem; margin-bottom: 16px; line-height: 1.5; }
.btn-confirm-yes { width: 100%; padding: 10px; background: rgba(220,38,38,.2); color: #fca5a5; border: 1px solid rgba(252,165,165,.28); border-radius: 12px; font-weight: 700; cursor: pointer; margin-bottom: 8px; }
.btn-confirm-yes:hover { background: rgba(220,38,38,.35); }
.btn-confirm-no  { width: 100%; padding: 10px; background: transparent; color: rgba(253,248,240,.6); border: 1px solid rgba(201,168,76,.2); border-radius: 12px; font-weight: 700; cursor: pointer; }
.btn-confirm-no:hover  { background: rgba(201,168,76,.08); }

/* ── DETAIL PANEL ───────────────────────────────────────────────── */
.detail-panel { display: none; margin-bottom: 10px; }
.detail-panel.open { display: block; }
.det-title { font-weight: 700; font-size: .9rem; color: var(--gold-light); margin-bottom: 6px; padding: 8px 12px; background: rgba(255,255,255,.04); border-radius: 10px; }
.det-list  { list-style: none; padding: 0 8px; }
.det-list li { padding: 4px 0; font-size: .85rem; color: rgba(253,248,240,.65); border-bottom: 1px solid rgba(255,255,255,.04); }

/* ── ATT LOG ────────────────────────────────────────────────────── */
.att-log-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 10px; margin-bottom: 6px; background: rgba(255,255,255,.03); flex-wrap: wrap; gap: 8px; }
.att-log-date { font-size: .75rem; color: rgba(253,248,240,.4); min-width: 90px; }
.att-log-name { font-size: .88rem; font-weight: 600; color: var(--cream); flex: 1; }
.att-log-excuse { font-size: .72rem; color: #fcd34d; cursor: pointer; }

/* ── SEARCH ─────────────────────────────────────────────────────── */
.search-wrap { position: relative; margin-bottom: 10px; }
.search-wrap .search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: rgba(201,168,76,.5); }
.search-input { padding-right: 36px !important; }
.search-count { font-size: .72rem; color: rgba(253,248,240,.35); margin-top: 3px; }

/* ── HIFZ LOG ITEMS ─────────────────────────────────────────────── */
.hifz-log-item {
  display: flex; gap: 12px; padding: 10px 14px; margin-bottom: 8px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(201,168,76,.1);
  border-radius: 12px; align-items: flex-start;
}
.hifz-log-date   { font-size: .75rem; color: rgba(253,248,240,.4); min-width: 85px; margin-top: 2px; }
.hifz-log-detail { flex: 1; }
.hifz-log-surah  { font-weight: 700; font-size: .9rem; color: var(--gold-light); margin-bottom: 3px; }
.hifz-log-athman { font-size: .78rem; color: rgba(253,248,240,.55); }

/* ── LOADING OVERLAY ────────────────────────────────────────────── */
#loading-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--green-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .75s ease;
}
#loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-ornament { font-size: 2.5rem; color: var(--gold); letter-spacing: 8px; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:.6; transform:scale(1); } 50% { opacity:1; transform:scale(1.06); } }
.loading-text { font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 1rem; color: rgba(253,248,240,.5); }

/* ── NOTIFICATION PULSE ─────────────────────────────────────────── */
.session-pending-pulse {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3);
  border-radius: 20px; padding: 3px 10px; font-size: .75rem; color: #fbbf24; font-weight: 700;
  animation: badgePulse 2s infinite;
}
@keyframes badgePulse { 0%,100% { box-shadow:0 0 0 0 rgba(251,191,36,.35); } 50% { box-shadow:0 0 0 6px rgba(251,191,36,0); } }
.nav-notif-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #fbbf24; margin-right: 4px;
  animation: badgePulse 1.5s infinite; vertical-align: middle;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .header-actions { position: static; justify-content: center; margin-bottom: 10px; }
  .nav-btn { font-size: .72rem; padding: 8px 4px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 500px) {
  .form-row, .btn-row { grid-template-columns: 1fr; }
  .container { padding: 12px 8px 32px; }
  .modal-box { padding: 18px 14px; }
}
