/* ═══════════════════════════════════════════════════════════
   MASJID-E-ILYAS SANGLI — DESIGN SYSTEM
   Islamic Modern UI · Green + White + Gold
═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --green-900: #1B3A1F;
  --green-800: #1B5E20;
  --green-700: #2E7D32;
  --green-600: #388E3C;
  --green-500: #43A047;
  --green-400: #66BB6A;
  --green-100: #E8F5E9;
  --green-50:  #F1F8E9;

  --gold-700:  #B8860B;
  --gold-600:  #C9A227;
  --gold-500:  #D4AF37;
  --gold-400:  #E0C060;
  --gold-100:  #FFF8DC;

  --white:     #FFFFFF;
  --off-white: #F8FAF8;
  --gray-50:   #F5F7F5;
  --gray-100:  #EAEEEA;
  --gray-200:  #D4DAD4;
  --gray-300:  #B0BAB0;
  --gray-400:  #8A968A;
  --gray-500:  #6B786B;
  --gray-600:  #4A554A;
  --gray-700:  #333D33;
  --gray-800:  #1E261E;
  --gray-900:  #111811;

  --red-500:   #E53935;
  --red-100:   #FFEBEE;
  --blue-500:  #1E88E5;
  --blue-100:  #E3F2FD;
  --purple-500:#8E24AA;
  --purple-100:#F3E5F5;
  --orange-500:#F57C00;
  --orange-100:#FFF3E0;
  --teal-500:  #00897B;
  --teal-100:  #E0F2F1;

  --bg:        var(--off-white);
  --surface:   var(--white);
  --surface-2: var(--gray-50);
  --border:    var(--gray-100);
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-muted:     var(--gray-400);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --header-h: 60px;
  --bottom-nav-h: 72px;
  --sidebar-w: 280px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg:        #0F1A0F;
  --surface:   #1A2A1A;
  --surface-2: #1F321F;
  --border:    #2A3D2A;
  --text-primary:   #E8F0E8;
  --text-secondary: #8FAA8F;
  --text-muted:     #5A7A5A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Islamic Geometric Pattern SVG ── */
.islamic-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z' fill='none' stroke='rgba(212,175,55,0.15)' stroke-width='1'/%3E%3Cpath d='M30 10 L50 30 L30 50 L10 30 Z' fill='none' stroke='rgba(212,175,55,0.1)' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='8' fill='none' stroke='rgba(212,175,55,0.12)' stroke-width='1'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════════════════════════════ */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(145deg, var(--green-900) 0%, var(--green-800) 50%, #0D2B10 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.splash-screen.hide {
  opacity: 0; transform: scale(1.05); pointer-events: none;
}
.splash-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z' fill='none' stroke='rgba(212,175,55,0.08)' stroke-width='1.5'/%3E%3Cpath d='M40 15 L65 40 L40 65 L15 40 Z' fill='none' stroke='rgba(212,175,55,0.06)' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='12' fill='none' stroke='rgba(212,175,55,0.07)' stroke-width='1'/%3E%3C/svg%3E");
}
.splash-content {
  position: relative; text-align: center; padding: 2rem;
  animation: splashIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes splashIn {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.splash-mosque-icon {
  width: 120px; height: 100px; margin: 0 auto 1.5rem;
  filter: drop-shadow(0 8px 24px rgba(212,175,55,0.4));
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.splash-title {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 2rem; color: var(--gold-500);
  text-shadow: 0 2px 12px rgba(212,175,55,0.4);
  margin-bottom: 0.5rem; line-height: 1.8;
}
.splash-subtitle {
  font-size: 1.25rem; font-weight: 700; color: var(--white);
  letter-spacing: 0.02em; margin-bottom: 0.25rem;
}
.splash-tagline {
  font-size: 0.875rem; color: rgba(255,255,255,0.6);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 2.5rem;
}
.splash-loader {
  width: 200px; height: 3px; background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full); margin: 0 auto; overflow: hidden;
}
.splash-loader-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  border-radius: var(--radius-full);
  animation: loadBar 2s ease-in-out forwards;
}
@keyframes loadBar {
  0%   { width: 0; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

#page-login {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.login-bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(145deg, var(--green-900) 0%, var(--green-800) 60%, #0A2010 100%);
}
.login-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z' fill='none' stroke='rgba(212,175,55,0.07)' stroke-width='1.5'/%3E%3Cpath d='M40 15 L65 40 L40 65 L15 40 Z' fill='none' stroke='rgba(212,175,55,0.05)' stroke-width='1'/%3E%3C/svg%3E");
}
.login-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.08) 0%, transparent 70%);
}
.login-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  animation: fadeUp 0.6s ease forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-logo {
  width: 80px; height: 70px; margin: 0 auto 1rem;
  filter: drop-shadow(0 4px 16px rgba(212,175,55,0.35));
}
.login-title {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 1.6rem; color: var(--gold-500);
  text-shadow: 0 2px 8px rgba(212,175,55,0.3);
  line-height: 1.8; margin-bottom: 0.25rem;
}
.login-subtitle {
  font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.9);
}
.login-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(212,175,55,0.15);
}
[data-theme="dark"] .login-card {
  background: rgba(26,42,26,0.97);
}

/* Role Selector */
.role-selector { margin-bottom: 1.25rem; }
.role-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
  margin-top: 0.5rem;
}
.role-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.6rem 0.4rem; border: 2px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface-2);
  cursor: pointer; transition: var(--transition); font-size: 0.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text-secondary);
}
.role-btn:hover { border-color: var(--green-500); color: var(--green-700); }
.role-btn.active {
  border-color: var(--green-600); background: var(--green-100);
  color: var(--green-800); font-weight: 600;
}
.role-icon { font-size: 1.25rem; }

/* Login Tabs */
.login-tabs {
  display: flex; gap: 0; margin-bottom: 1.25rem;
  background: var(--gray-100); border-radius: var(--radius-md); padding: 3px;
}
.login-tab {
  flex: 1; padding: 0.5rem; border: none; background: transparent;
  border-radius: calc(var(--radius-md) - 2px); cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.8rem;
  font-weight: 500; color: var(--text-secondary); transition: var(--transition);
}
.login-tab.active {
  background: var(--white); color: var(--green-800); font-weight: 700;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .login-tab.active { background: var(--surface-2); }

/* Login Forms */
.login-form { display: none; }
.login-form.active { display: block; }

.form-label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 0.4rem; letter-spacing: 0.02em;
}
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon {
  position: absolute; left: 0.75rem; font-size: 1rem; pointer-events: none;
}
.form-input {
  width: 100%; padding: 0.65rem 0.875rem 0.65rem 2.5rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.875rem;
  transition: var(--transition); outline: none;
}
.form-input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(67,160,71,0.12);
  background: var(--surface);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { padding-left: 0.875rem; resize: vertical; }
select.form-input { padding-left: 0.875rem; cursor: pointer; }
.input-toggle {
  position: absolute; right: 0.75rem; background: none; border: none;
  cursor: pointer; font-size: 1rem; padding: 0;
}
.login-options {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; font-size: 0.8rem;
}
.checkbox-label {
  display: flex; align-items: center; gap: 0.4rem;
  cursor: pointer; font-size: 0.8rem; color: var(--text-secondary);
}
.forgot-link { color: var(--green-600); text-decoration: none; font-weight: 600; }
.forgot-link:hover { color: var(--green-800); }

.btn-login {
  width: 100%; padding: 0.875rem;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: var(--white); border: none; border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.95rem;
  font-weight: 700; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(46,125,50,0.35);
}
.btn-login:hover {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  transform: translateY(-1px); box-shadow: 0 6px 20px rgba(46,125,50,0.45);
}
.btn-login:active { transform: translateY(0); }
.btn-arrow { font-size: 1.1rem; }

.biometric-row {
  display: flex; gap: 0.75rem; margin-top: 1rem;
}
.biometric-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.78rem;
  font-weight: 500; cursor: pointer; transition: var(--transition);
}
.biometric-btn:hover { border-color: var(--green-500); color: var(--green-700); }

/* OTP */
.otp-hint { font-size: 0.8rem; color: var(--text-secondary); text-align: center; margin-bottom: 1rem; }
.otp-grid { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.otp-box {
  width: 44px; height: 52px; text-align: center; font-size: 1.25rem; font-weight: 700;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif; outline: none; transition: var(--transition);
}
.otp-box:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(67,160,71,0.12); }

.login-footer {
  text-align: center; margin-top: 1.25rem;
  font-size: 0.75rem; color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════════════════════ */
.app-shell {
  display: flex; flex-direction: column; min-height: 100vh;
  background: var(--bg);
}

/* ── Header ── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  display: flex; align-items: center; padding: 0 1rem; gap: 0.75rem;
  box-shadow: 0 2px 12px rgba(27,94,32,0.3);
}
.header-menu-btn {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.header-menu-btn span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,0.9); border-radius: 2px; transition: var(--transition);
}
.header-brand {
  display: flex; align-items: center; gap: 0.5rem; flex: 1;
}
.header-mosque-icon { font-size: 1.4rem; }
.header-title {
  display: block; font-size: 0.95rem; font-weight: 800;
  color: var(--white); line-height: 1.2;
}
.header-subtitle {
  display: block; font-size: 0.7rem; color: rgba(255,255,255,0.65);
}
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-btn {
  position: relative; background: rgba(255,255,255,0.12); border: none;
  border-radius: var(--radius-md); padding: 0.4rem 0.5rem;
  cursor: pointer; font-size: 1rem; transition: var(--transition);
  color: var(--white);
}
.header-btn:hover { background: rgba(255,255,255,0.2); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red-500); color: var(--white);
  font-size: 0.6rem; font-weight: 700; width: 16px; height: 16px;
  border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
}
.header-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: var(--green-900);
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ── Sidebar ── */
.sidebar {
  position: fixed; top: 0; left: -100%; z-index: 200;
  width: var(--sidebar-w); height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  transition: left var(--transition-slow);
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar.open { left: 0; }
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.sidebar-overlay.show { opacity: 1; pointer-events: all; }
.sidebar-header {
  display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 1rem;
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  flex-shrink: 0;
}
.sidebar-name { display: block; font-size: 0.9rem; font-weight: 700; color: var(--white); }
.sidebar-role { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.65); }
.sidebar-close {
  margin-left: auto; background: rgba(255,255,255,0.15); border: none;
  color: var(--white); width: 28px; height: 28px; border-radius: var(--radius-full);
  cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
}
.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 0.75rem 0;
}
.sidebar-section-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0.75rem 1rem 0.25rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1rem; font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  border-left: 3px solid transparent; text-decoration: none;
}
.sidebar-link:hover { background: var(--green-50); color: var(--green-700); }
.sidebar-link.active {
  background: var(--green-100); color: var(--green-800); font-weight: 700;
  border-left-color: var(--green-600);
}
[data-theme="dark"] .sidebar-link:hover { background: rgba(67,160,71,0.1); }
[data-theme="dark"] .sidebar-link.active { background: rgba(67,160,71,0.15); }
.logout-link { color: var(--red-500) !important; margin-top: 0.5rem; }
.logout-link:hover { background: var(--red-100) !important; }

/* ── Main Content ── */
.main-content {
  margin-top: var(--header-h);
  margin-bottom: var(--bottom-nav-h);
  min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h));
  overflow-x: hidden;
}
.content-page { display: none; padding: 1rem; animation: pageIn 0.3s ease; }
.content-page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 0.5rem 0.25rem;
  background: none; border: none; cursor: pointer; transition: var(--transition);
  position: relative;
}
.bnav-btn::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 3px; background: var(--green-600);
  border-radius: 0 0 3px 3px; transition: width var(--transition);
}
.bnav-btn.active::before { width: 32px; }
.bnav-icon { font-size: 1.2rem; transition: transform var(--transition); }
.bnav-label { font-size: 0.62rem; font-weight: 600; color: var(--text-muted); transition: color var(--transition); }
.bnav-btn.active .bnav-icon { transform: scale(1.15); }
.bnav-btn.active .bnav-label { color: var(--green-700); font-weight: 700; }
.bnav-btn:hover .bnav-label { color: var(--green-600); }

/* ═══════════════════════════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════════════════════════ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.25rem; gap: 0.75rem;
}
.page-title {
  font-size: 1.4rem; font-weight: 800; color: var(--text-primary); line-height: 1.2;
}
.page-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }
.page-header-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.date-badge {
  background: var(--green-100); color: var(--green-800);
  padding: 0.35rem 0.75rem; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
}
[data-theme="dark"] .date-badge { background: rgba(67,160,71,0.15); color: var(--green-400); }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════════════════ */

/* Prayer Banner */
.prayer-banner {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  margin-bottom: 1.25rem; padding: 1.25rem;
  box-shadow: var(--shadow-md);
}
.prayer-banner-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-700) 50%, #1A6B1E 100%);
}
.prayer-banner-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z' fill='none' stroke='rgba(212,175,55,0.12)' stroke-width='1'/%3E%3C/svg%3E");
}
.prayer-banner-content {
  position: relative; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.prayer-next { display: flex; flex-direction: column; }
.prayer-next-label { font-size: 0.7rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.08em; }
.prayer-next-name { font-size: 1.4rem; font-weight: 800; color: var(--white); line-height: 1.2; }
.prayer-next-time { font-size: 1rem; color: var(--gold-400); font-weight: 600; }
.prayer-countdown { display: flex; flex-direction: column; align-items: center; }
.countdown-label { font-size: 0.65rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.08em; }
.countdown-timer {
  font-size: 1.6rem; font-weight: 800; color: var(--gold-400);
  font-variant-numeric: tabular-nums; letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(212,175,55,0.3);
}
.jummah-info { display: flex; flex-direction: column; align-items: flex-end; }
.jummah-label { font-size: 0.7rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.08em; }
.jummah-time { font-size: 1rem; font-weight: 700; color: var(--white); }
.jummah-day { font-size: 0.72rem; color: rgba(255,255,255,0.6); }

/* Stats Grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1rem; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: var(--transition); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.green::before  { background: linear-gradient(90deg, var(--green-600), var(--green-400)); }
.stat-card.gold::before   { background: linear-gradient(90deg, var(--gold-600), var(--gold-400)); }
.stat-card.red::before    { background: linear-gradient(90deg, var(--red-500), #EF9A9A); }
.stat-card.teal::before   { background: linear-gradient(90deg, var(--teal-500), #4DB6AC); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple-500), #CE93D8); }
.stat-card.blue::before   { background: linear-gradient(90deg, var(--blue-500), #90CAF9); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--orange-500), #FFCC80); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }
.stat-value { display: block; font-size: 1.15rem; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.stat-label { display: block; font-size: 0.72rem; color: var(--text-secondary); margin-top: 0.15rem; }
.stat-trend { font-size: 0.68rem; margin-top: 0.4rem; font-weight: 600; }
.stat-trend.up   { color: var(--green-600); }
.stat-trend.down { color: var(--red-500); }
.stat-trend.neutral { color: var(--text-muted); }

/* Prayer Times Row */
.section-title {
  font-size: 0.9rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 0.75rem; margin-top: 0.25rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.prayer-times-row {
  display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem;
  margin-bottom: 1.25rem; scrollbar-width: none;
}
.prayer-times-row::-webkit-scrollbar { display: none; }
.prayer-time-card {
  flex-shrink: 0; background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.75rem 0.875rem; text-align: center; min-width: 80px;
  border: 1.5px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.prayer-time-card.active {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  border-color: var(--green-600);
}
.pt-name {
  display: block; font-size: 0.72rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 0.3rem;
}
.prayer-time-card.active .pt-name { color: rgba(255,255,255,0.8); }
.pt-time {
  display: block; font-size: 0.85rem; font-weight: 800; color: var(--text-primary);
}
.prayer-time-card.active .pt-time { color: var(--white); }
.pt-status {
  display: inline-block; font-size: 0.62rem; font-weight: 700;
  padding: 0.15rem 0.4rem; border-radius: var(--radius-full); margin-top: 0.3rem;
}
.pt-status.done     { background: var(--gray-100); color: var(--gray-500); }
.pt-status.next     { background: var(--gold-100); color: var(--gold-700); }
.pt-status.upcoming { background: var(--green-100); color: var(--green-700); }
.prayer-time-card.active .pt-status { background: rgba(255,255,255,0.2); color: var(--white); }

/* Quick Actions */
.quick-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 0.75rem 0.4rem; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  cursor: pointer; transition: var(--transition); font-family: 'Plus Jakarta Sans', sans-serif;
}
.qa-btn:hover { border-color: var(--green-500); background: var(--green-50); transform: translateY(-2px); }
.qa-icon { font-size: 1.3rem; }
.qa-btn span:last-child { font-size: 0.65rem; font-weight: 600; color: var(--text-secondary); text-align: center; }
[data-theme="dark"] .qa-btn:hover { background: rgba(67,160,71,0.1); }

/* Activity List */
.activity-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.activity-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.activity-item:hover { box-shadow: var(--shadow-md); }
.activity-icon {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.activity-icon.green  { background: var(--green-100); }
.activity-icon.blue   { background: var(--blue-100); }
.activity-icon.orange { background: var(--orange-100); }
.activity-icon.red    { background: var(--red-100); }
.activity-icon.purple { background: var(--purple-100); }
.activity-info { flex: 1; min-width: 0; }
.activity-title { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.activity-meta  { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.activity-badge {
  font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full); flex-shrink: 0;
}
.activity-badge.green  { background: var(--green-100); color: var(--green-700); }
.activity-badge.blue   { background: var(--blue-100); color: var(--blue-500); }
.activity-badge.orange { background: var(--orange-100); color: var(--orange-500); }
.activity-badge.red    { background: var(--red-100); color: var(--red-500); }
.activity-badge.purple { background: var(--purple-100); color: var(--purple-500); }

/* ═══════════════════════════════════════════════════════════
   MEMBERS PAGE
═══════════════════════════════════════════════════════════ */
.search-filter-bar {
  display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.search-box {
  flex: 1; min-width: 200px; position: relative; display: flex; align-items: center;
}
.search-icon { position: absolute; left: 0.75rem; font-size: 0.9rem; }
.search-input {
  width: 100%; padding: 0.6rem 0.875rem 0.6rem 2.25rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.875rem; outline: none;
  transition: var(--transition);
}
.search-input:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(67,160,71,0.1); }
.filter-btn {
  padding: 0.6rem 0.875rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface);
  color: var(--text-secondary); font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--green-500); color: var(--green-700); }

.members-stats-row {
  display: flex; gap: 0.5rem; margin-bottom: 1rem; overflow-x: auto;
}
.mini-stat {
  flex-shrink: 0; background: var(--surface); border-radius: var(--radius-md);
  padding: 0.6rem 1rem; border: 1px solid var(--border); text-align: center;
}
.mini-stat-val { display: block; font-size: 1rem; font-weight: 800; color: var(--green-700); }
.mini-stat-label { display: block; font-size: 0.68rem; color: var(--text-muted); }

.members-list { display: flex; flex-direction: column; gap: 0.6rem; }
.member-card {
  display: flex; align-items: center; gap: 0.875rem;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition); cursor: pointer;
}
.member-card:hover { box-shadow: var(--shadow-md); transform: translateX(2px); }
.member-avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 800; color: var(--white); flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.member-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.member-actions { display: flex; gap: 0.4rem; }
.member-action-btn {
  width: 30px; height: 30px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.member-action-btn:hover { background: var(--green-100); border-color: var(--green-400); }
.blood-badge {
  font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.4rem;
  background: var(--red-100); color: var(--red-500); border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════
   CHANDA PAGE
═══════════════════════════════════════════════════════════ */
.chanda-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1rem;
}
.chanda-stat-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 0.75rem;
}
.chanda-stat-card.total  { border-top: 3px solid var(--green-500); }
.chanda-stat-card.pending{ border-top: 3px solid var(--red-500); }
.chanda-stat-card.today  { border-top: 3px solid var(--gold-500); }
.chanda-stat-card.monthly{ border-top: 3px solid var(--blue-500); }
.cs-icon { font-size: 1.5rem; }
.cs-val { display: block; font-size: 1rem; font-weight: 800; color: var(--text-primary); }
.cs-label { display: block; font-size: 0.7rem; color: var(--text-muted); }

.chanda-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 0.875rem; overflow-x: auto;
  scrollbar-width: none; padding-bottom: 2px;
}
.chanda-tabs::-webkit-scrollbar { display: none; }
.ctab {
  flex-shrink: 0; padding: 0.45rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); color: var(--text-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
}
.ctab.active { background: var(--green-700); color: var(--white); border-color: var(--green-700); }
.ctab:hover:not(.active) { border-color: var(--green-500); color: var(--green-700); }

.chanda-actions-row {
  display: flex; gap: 0.5rem; margin-bottom: 1rem; overflow-x: auto;
  scrollbar-width: none;
}
.chanda-actions-row::-webkit-scrollbar { display: none; }
.action-chip {
  flex-shrink: 0; padding: 0.4rem 0.75rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.action-chip:hover { background: var(--green-100); color: var(--green-700); border-color: var(--green-400); }

.chanda-list { display: flex; flex-direction: column; gap: 0.6rem; }
.chanda-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 0.75rem; transition: var(--transition);
}
.chanda-card:hover { box-shadow: var(--shadow-md); }
.chanda-house {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--green-100); display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.chanda-info { flex: 1; }
.chanda-name { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.chanda-meta { font-size: 0.72rem; color: var(--text-muted); }
.chanda-amount { font-size: 1rem; font-weight: 800; color: var(--green-700); }
.chanda-status {
  font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}
.chanda-status.paid    { background: var(--green-100); color: var(--green-700); }
.chanda-status.pending { background: var(--red-100); color: var(--red-500); }

/* ═══════════════════════════════════════════════════════════
   NAMAZ PAGE
═══════════════════════════════════════════════════════════ */
.namaz-hero {
  position: relative; border-radius: var(--radius-xl); overflow: hidden;
  margin-bottom: 1.25rem; padding: 1.5rem;
}
.namaz-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, var(--green-900), var(--green-800), #0D2B10);
}
.namaz-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z' fill='none' stroke='rgba(212,175,55,0.1)' stroke-width='1'/%3E%3C/svg%3E");
}
.namaz-hero-content { position: relative; text-align: center; }
.namaz-date { font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-bottom: 0.2rem; }
.namaz-hijri { font-family: 'Amiri', serif; font-size: 0.9rem; color: var(--gold-400); margin-bottom: 1rem; }
.namaz-next-label { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.1em; }
.namaz-next-name { display: block; font-size: 2rem; font-weight: 800; color: var(--white); line-height: 1.2; }
.namaz-next-time { display: block; font-size: 1.1rem; color: var(--gold-400); font-weight: 600; margin-bottom: 0.75rem; }
.namaz-countdown-big {
  font-size: 2.5rem; font-weight: 800; color: var(--gold-400);
  font-variant-numeric: tabular-nums; letter-spacing: 0.05em;
  text-shadow: 0 4px 16px rgba(212,175,55,0.4);
}

.prayer-full-list {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.prayer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem; border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.prayer-row:last-child { border-bottom: none; }
.prayer-row.active { background: var(--green-50); }
[data-theme="dark"] .prayer-row.active { background: rgba(67,160,71,0.08); }
.pr-left { display: flex; align-items: center; gap: 0.75rem; }
.pr-icon { font-size: 1.3rem; }
.pr-name { display: block; font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.pr-arabic { display: block; font-family: 'Amiri', serif; font-size: 0.85rem; color: var(--text-muted); }
.pr-right { text-align: right; }
.pr-time { display: block; font-size: 0.95rem; font-weight: 800; color: var(--green-700); }
.pr-iqama { display: block; font-size: 0.7rem; color: var(--text-muted); }
.prayer-row.active .pr-time { color: var(--green-800); }

.jummah-card {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.jummah-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: var(--white); font-weight: 700; font-size: 0.9rem;
}
.jummah-badge {
  background: rgba(255,255,255,0.2); padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full); font-size: 0.72rem;
}
.jummah-details { padding: 0.75rem 1rem; }
.jd-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem;
}
.jd-item:last-child { border-bottom: none; }
.jd-item span:first-child { color: var(--text-secondary); }
.jd-item span:last-child { font-weight: 700; color: var(--text-primary); }

.ramadan-toggle-card {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); padding: 1rem;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.rtc-left { display: flex; align-items: center; gap: 0.75rem; }
.rtc-icon { font-size: 1.5rem; }
.rtc-title { display: block; font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.rtc-sub { display: block; font-size: 0.72rem; color: var(--text-muted); }

.ramadan-times { display: flex; gap: 0.75rem; }
.rt-card {
  flex: 1; border-radius: var(--radius-lg); padding: 1rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.rt-card.sehri { background: linear-gradient(135deg, #1A237E, #283593); }
.rt-card.iftar { background: linear-gradient(135deg, var(--orange-500), #FF8F00); }
.rt-icon { font-size: 1.5rem; }
.rt-name { font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.8); }
.rt-time { font-size: 1.2rem; font-weight: 800; color: var(--white); }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--gray-200); border-radius: var(--radius-full);
  transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: var(--white);
  border-radius: var(--radius-full); transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider { background: var(--green-600); }
input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ═══════════════════════════════════════════════════════════
   MADRASA PAGE
═══════════════════════════════════════════════════════════ */
.madrasa-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 1rem;
}
.ms-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.75rem 0.5rem; text-align: center; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ms-icon { display: block; font-size: 1.3rem; margin-bottom: 0.3rem; }
.ms-val { display: block; font-size: 0.95rem; font-weight: 800; color: var(--green-700); }
.ms-label { display: block; font-size: 0.62rem; color: var(--text-muted); }

.madrasa-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 1rem; overflow-x: auto;
  scrollbar-width: none;
}
.madrasa-tabs::-webkit-scrollbar { display: none; }
.mtab {
  flex-shrink: 0; padding: 0.45rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); color: var(--text-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
}
.mtab.active { background: var(--green-700); color: var(--white); border-color: var(--green-700); }

.student-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  margin-bottom: 0.6rem; transition: var(--transition);
}
.student-card:hover { box-shadow: var(--shadow-md); }
.student-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--blue-500), #1565C0);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: var(--white); flex-shrink: 0;
}
.student-info { flex: 1; }
.student-name { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.student-meta { font-size: 0.72rem; color: var(--text-muted); }
.student-grade {
  font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.5rem;
  background: var(--blue-100); color: var(--blue-500); border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════
   EVENTS PAGE
═══════════════════════════════════════════════════════════ */
.events-list { display: flex; flex-direction: column; gap: 0.75rem; }
.event-card {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.event-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.event-header {
  padding: 1rem; display: flex; align-items: center; gap: 0.875rem;
}
.event-date-box {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.event-day { font-size: 1.2rem; font-weight: 800; color: var(--white); line-height: 1; }
.event-month { font-size: 0.6rem; font-weight: 600; color: rgba(255,255,255,0.75); text-transform: uppercase; }
.event-info { flex: 1; }
.event-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.event-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.event-badge {
  font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}
.event-badge.upcoming { background: var(--green-100); color: var(--green-700); }
.event-badge.today    { background: var(--gold-100); color: var(--gold-700); }
.event-footer {
  padding: 0.6rem 1rem; background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   EXPENSE PAGE
═══════════════════════════════════════════════════════════ */
.expense-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1rem;
}
.exp-stat {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 0.6rem;
}
.exp-icon { font-size: 1.3rem; }
.exp-val { display: block; font-size: 0.95rem; font-weight: 800; color: var(--text-primary); }
.exp-label { display: block; font-size: 0.68rem; color: var(--text-muted); }

.expense-categories {
  display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 1rem;
  scrollbar-width: none; padding-bottom: 2px;
}
.expense-categories::-webkit-scrollbar { display: none; }
.exp-cat {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.6rem 0.875rem; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  cursor: pointer; transition: var(--transition); font-size: 0.72rem;
  font-weight: 600; color: var(--text-secondary);
}
.exp-cat:hover { border-color: var(--green-500); color: var(--green-700); background: var(--green-50); }
.exp-cat span:first-child { font-size: 1.2rem; }

.expense-list { display: flex; flex-direction: column; gap: 0.6rem; }
.expense-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.exp-item-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--orange-100); display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.exp-item-info { flex: 1; }
.exp-item-title { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.exp-item-meta { font-size: 0.72rem; color: var(--text-muted); }
.exp-item-amount { font-size: 0.95rem; font-weight: 800; color: var(--red-500); }

/* ═══════════════════════════════════════════════════════════
   REPORTS PAGE
═══════════════════════════════════════════════════════════ */
.report-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 1rem; overflow-x: auto;
  scrollbar-width: none;
}
.report-tabs::-webkit-scrollbar { display: none; }
.rtab {
  flex-shrink: 0; padding: 0.45rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); color: var(--text-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
}
.rtab.active { background: var(--green-700); color: var(--white); border-color: var(--green-700); }

.chart-container {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 1.25rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.report-summary {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem;
}
.report-summary-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.rsc-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.rsc-value { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.rsc-change { font-size: 0.7rem; font-weight: 600; margin-top: 0.2rem; }
.rsc-change.up   { color: var(--green-600); }
.rsc-change.down { color: var(--red-500); }

/* ═══════════════════════════════════════════════════════════
   JANAZA PAGE
═══════════════════════════════════════════════════════════ */
.janaza-list { display: flex; flex-direction: column; gap: 0.75rem; }
.janaza-card {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm);
}
.janaza-header {
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #1A1A2E, #16213E);
  display: flex; align-items: center; gap: 0.75rem;
}
.janaza-icon { font-size: 1.5rem; }
.janaza-name { font-size: 0.95rem; font-weight: 700; color: var(--white); }
.janaza-inna { font-family: 'Amiri', serif; font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.janaza-body { padding: 0.875rem 1rem; }
.janaza-detail {
  display: flex; justify-content: space-between; padding: 0.35rem 0;
  border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.janaza-detail:last-child { border-bottom: none; }
.janaza-detail span:first-child { color: var(--text-muted); }
.janaza-detail span:last-child { font-weight: 600; color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════
   NIKAH PAGE
═══════════════════════════════════════════════════════════ */
.nikah-list { display: flex; flex-direction: column; gap: 0.75rem; }
.nikah-card {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm);
}
.nikah-header {
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #880E4F, #AD1457);
  display: flex; align-items: center; gap: 0.75rem;
}
.nikah-icon { font-size: 1.5rem; }
.nikah-names { font-size: 0.95rem; font-weight: 700; color: var(--white); }
.nikah-date { font-size: 0.75rem; color: rgba(255,255,255,0.7); }
.nikah-body { padding: 0.875rem 1rem; }
.nikah-detail {
  display: flex; justify-content: space-between; padding: 0.35rem 0;
  border-bottom: 1px solid var(--border); font-size: 0.82rem;
}
.nikah-detail:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════
   VOLUNTEER PAGE
═══════════════════════════════════════════════════════════ */
.volunteer-list { display: flex; flex-direction: column; gap: 0.6rem; }
.volunteer-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 0.875rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.volunteer-card:hover { box-shadow: var(--shadow-md); }
.volunteer-avatar {
  width: 42px; height: 42px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--purple-500), #6A1B9A);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: var(--white); flex-shrink: 0;
}
.volunteer-info { flex: 1; }
.volunteer-name { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.volunteer-duty { font-size: 0.72rem; color: var(--text-muted); }
.volunteer-status {
  font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full); background: var(--green-100); color: var(--green-700);
}

/* ═══════════════════════════════════════════════════════════
   INVENTORY PAGE
═══════════════════════════════════════════════════════════ */
.inventory-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
}
.inventory-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  text-align: center; transition: var(--transition); cursor: pointer;
}
.inventory-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.inv-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.inv-name { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.inv-count { font-size: 1.2rem; font-weight: 800; color: var(--green-700); margin: 0.25rem 0; }
.inv-status {
  font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full); background: var(--green-100); color: var(--green-700);
}
.inv-status.low { background: var(--red-100); color: var(--red-500); }

/* ═══════════════════════════════════════════════════════════
   COMMUNITY PAGE
═══════════════════════════════════════════════════════════ */
.community-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.comm-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 1rem 0.75rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  text-align: center; cursor: pointer; transition: var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
}
.comm-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--green-400); }
.comm-icon { font-size: 1.75rem; }
.comm-title { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); }
.comm-sub { font-size: 0.65rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   ANNOUNCEMENTS PAGE
═══════════════════════════════════════════════════════════ */
.announcement-types {
  display: flex; gap: 0.4rem; margin-bottom: 1rem; overflow-x: auto;
  scrollbar-width: none;
}
.announcement-types::-webkit-scrollbar { display: none; }
.ann-type-btn {
  flex-shrink: 0; padding: 0.4rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); color: var(--text-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
}
.ann-type-btn.active { background: var(--green-700); color: var(--white); border-color: var(--green-700); }

.announcements-list { display: flex; flex-direction: column; gap: 0.75rem; }
.announcement-card {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.announcement-card:hover { box-shadow: var(--shadow-md); }
.ann-header {
  padding: 0.875rem 1rem; display: flex; align-items: center; gap: 0.75rem;
}
.ann-icon-box {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.ann-icon-box.general   { background: var(--green-100); }
.ann-icon-box.eid       { background: var(--gold-100); }
.ann-icon-box.emergency { background: var(--red-100); }
.ann-icon-box.jummah    { background: var(--blue-100); }
.ann-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.ann-time  { font-size: 0.72rem; color: var(--text-muted); }
.ann-body { padding: 0 1rem 0.875rem; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.ann-footer {
  padding: 0.5rem 1rem; background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex; gap: 0.5rem; font-size: 0.72rem; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════════════════════════ */
.settings-sections { display: flex; flex-direction: column; gap: 1rem; }
.settings-group {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm);
}
.settings-group-title {
  padding: 0.75rem 1rem; font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem; border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--surface-2); }
.si-left { display: flex; align-items: center; gap: 0.75rem; }
.si-icon { font-size: 1.2rem; }
.si-title { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.si-sub { display: block; font-size: 0.72rem; color: var(--text-muted); }
.settings-select {
  padding: 0.35rem 0.6rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface-2);
  color: var(--text-primary); font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem; cursor: pointer; outline: none;
}
.settings-btn {
  padding: 0.35rem 0.75rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); background: var(--surface-2);
  color: var(--text-secondary); font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.settings-btn:hover { border-color: var(--green-500); color: var(--green-700); }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn-primary {
  padding: 0.6rem 1.1rem;
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: var(--white); border: none; border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.82rem;
  font-weight: 700; cursor: pointer; transition: var(--transition);
  box-shadow: 0 2px 8px rgba(46,125,50,0.3); white-space: nowrap;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(46,125,50,0.4);
}
.btn-secondary {
  padding: 0.6rem 1rem; background: var(--surface);
  color: var(--text-secondary); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--green-500); color: var(--green-700); }

/* ═══════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-overlay.open { display: flex; animation: overlayIn 0.2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
}
.modal-sm { max-height: 70vh; }
@keyframes modalUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.25rem 0.875rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); }
.modal-close {
  width: 30px; height: 30px; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--red-100); color: var(--red-500); }
.modal-body { flex: 1; overflow-y: auto; padding: 1.25rem; }
.modal-footer {
  display: flex; gap: 0.75rem; padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}
.modal-footer .btn-primary,
.modal-footer .btn-secondary { flex: 1; text-align: center; }

/* Payment Methods */
.payment-methods { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pm-option {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.75rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; font-size: 0.8rem;
  font-weight: 600; color: var(--text-secondary); transition: var(--transition);
}
.pm-option:has(input:checked) { border-color: var(--green-500); background: var(--green-50); color: var(--green-700); }
.pm-option input { display: none; }

/* File Upload */
.file-upload-area {
  position: relative; border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 1.5rem; text-align: center; cursor: pointer; transition: var(--transition);
  color: var(--text-muted); font-size: 0.85rem;
}
.file-upload-area:hover { border-color: var(--green-500); color: var(--green-600); background: var(--green-50); }

/* Announcement Type Grid */
.ann-type-grid { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ann-type-sel {
  padding: 0.4rem 0.75rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-full); background: var(--surface-2);
  color: var(--text-secondary); font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.ann-type-sel.active { background: var(--green-700); color: var(--white); border-color: var(--green-700); }

/* Send Via */
.send-via-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* QR Modal */
.qr-subtitle { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 1rem; }
.qr-placeholder {
  width: 180px; height: 180px; margin: 0 auto 1rem;
  border: 3px solid var(--green-600); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  background: var(--white); position: relative; overflow: hidden;
}
.qr-inner { text-align: center; }
.qr-pattern {
  width: 140px; height: 140px; margin: 0 auto;
  background-image: repeating-linear-gradient(0deg, var(--gray-800) 0, var(--gray-800) 4px, transparent 4px, transparent 8px),
                    repeating-linear-gradient(90deg, var(--gray-800) 0, var(--gray-800) 4px, transparent 4px, transparent 8px);
  background-size: 8px 8px; opacity: 0.15; border-radius: 4px;
}
.qr-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.5rem; display: block; }
.qr-upi-id { font-size: 0.85rem; font-weight: 700; color: var(--green-700); margin-bottom: 1rem; }
.qr-apps { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.qr-app {
  padding: 0.35rem 0.75rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION PANEL
═══════════════════════════════════════════════════════════ */
.notif-panel {
  position: fixed; top: var(--header-h); right: -100%; z-index: 300;
  width: 320px; max-height: calc(100vh - var(--header-h));
  background: var(--surface); box-shadow: var(--shadow-xl);
  border-left: 1px solid var(--border); overflow-y: auto;
  transition: right var(--transition-slow);
}
.notif-panel.open { right: 0; }
.notif-overlay {
  position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,0.3); opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.notif-overlay.show { opacity: 1; pointer-events: all; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.notif-panel-header h3 { font-size: 0.95rem; font-weight: 800; }
.notif-panel-header button {
  background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--text-muted);
}
.notif-list { padding: 0.5rem; }
.notif-item {
  display: flex; gap: 0.75rem; padding: 0.875rem;
  border-radius: var(--radius-lg); margin-bottom: 0.4rem;
  transition: var(--transition); cursor: pointer;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--green-50); }
[data-theme="dark"] .notif-item.unread { background: rgba(67,160,71,0.08); }
.notif-dot {
  width: 8px; height: 8px; border-radius: var(--radius-full);
  background: var(--green-600); flex-shrink: 0; margin-top: 5px;
}
.notif-content { flex: 1; }
.notif-title { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.notif-body { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.15rem; line-height: 1.4; }
.notif-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.25rem; display: block; }

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 1rem); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-800); color: var(--white);
  padding: 0.75rem 1.25rem; border-radius: var(--radius-full);
  font-size: 0.82rem; font-weight: 600; z-index: 1000;
  opacity: 0; pointer-events: none; transition: all 0.3s ease;
  white-space: nowrap; box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--green-700); }
.toast.error   { background: var(--red-500); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET & DESKTOP
═══════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-actions { grid-template-columns: repeat(8, 1fr); }
  .community-grid { grid-template-columns: repeat(4, 1fr); }
  .inventory-grid { grid-template-columns: repeat(3, 1fr); }
  .madrasa-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .main-content { margin-left: 0; }
  .content-page { padding: 1.5rem; }
  .modal { border-radius: var(--radius-xl); max-width: 520px; }
  .modal-overlay { align-items: center; padding: 1rem; }
  .notif-panel { top: var(--header-h); }
}

@media (min-width: 1024px) {
  .sidebar { left: 0; }
  .sidebar-close { display: none; }
  .sidebar-overlay { display: none !important; }
  .main-content { margin-left: var(--sidebar-w); }
  .header-menu-btn { display: none; }
  .bottom-nav { left: var(--sidebar-w); }
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR STYLING
═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* ═══════════════════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }

/* ═══════════════════════════════════════════════════════════
   PROFESSIONAL TRANSITIONS & ANIMATIONS
═══════════════════════════════════════════════════════════ */

/* Page fade-in on load */
.page { animation: pageFadeIn 0.35s ease both; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Content page transitions */
.content-page {
  display: none;
  animation: none;
}
.content-page.active {
  display: block;
  animation: contentSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes contentSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Login button shake on error */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-8px); }
  30%       { transform: translateX(8px); }
  45%       { transform: translateX(-6px); }
  60%       { transform: translateX(6px); }
  75%       { transform: translateX(-3px); }
  90%       { transform: translateX(3px); }
}
.btn-login.shake { animation: shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

/* Login button loading state */
.btn-login:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
}

/* Smooth modal open */
.modal.active .modal-box {
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Sidebar slide-in */
.sidebar.open {
  animation: sidebarSlide 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes sidebarSlide {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* Toast slide-up */
.toast.show {
  animation: toastSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes toastSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Stat card hover lift */
.stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Bottom nav active pulse */
.bnav-btn.active .bnav-icon {
  animation: navPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes navPop {
  from { transform: scale(0.8); }
  to   { transform: scale(1); }
}

/* Sidebar link hover */
.sidebar-link {
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}
.sidebar-link:hover { padding-left: 1.4rem; }

/* Form input focus glow */
.form-input:focus {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Button press feedback */
.btn-primary, .btn-secondary, .btn-login {
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.btn-primary:active, .btn-secondary:active, .btn-login:active {
  transform: scale(0.97);
}

/* Role button selection */
.role-btn {
  transition: all 0.18s ease;
}
.role-btn.active {
  animation: roleSelect 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes roleSelect {
  from { transform: scale(0.95); }
  to   { transform: scale(1); }
}

/* Card entrance stagger on dashboard */
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.10s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.20s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 0.25s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: 0.30s; }
.stats-grid .stat-card:nth-child(7) { animation-delay: 0.35s; }
.stats-grid .stat-card:nth-child(8) { animation-delay: 0.40s; }
.stats-grid .stat-card {
  animation: contentSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}