/* ================================================================
   Eid Digital Wallet – Complete Mobile-First UI
   App-style design with bottom nav on mobile
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:       #1a6641;
  --primary-dark:  #0f4028;
  --primary-light: #2d8a57;
  --primary-soft:  #e8f5ee;
  --gold:          #c9a84c;
  --gold-light:    #f0d080;
  --gold-dark:     #a07830;
  --bg:            #f0f4f1;
  --bg-card:       #ffffff;
  --text:          #1a2e22;
  --text-sub:      #5a7060;
  --text-muted:    #8a9e8f;
  --border:        #ddeae0;
  --shadow-sm:     0 1px 8px rgba(26,102,65,.08);
  --shadow:        0 4px 20px rgba(26,102,65,.10);
  --shadow-lg:     0 10px 40px rgba(26,102,65,.15);
  --radius:        18px;
  --radius-md:     14px;
  --radius-sm:     10px;
  --radius-xs:     8px;
  --font:          'Inter', sans-serif;
  --font-display:  'Playfair Display', serif;
  --transition:    all .25s cubic-bezier(.4,0,.2,1);
  --bottom-nav-h:  70px;
  --safe-bottom:   env(safe-area-inset-bottom, 0px);
}

body.eid-mode {
  --bg:       #0a1a0f;
  --bg-card:  #122018;
  --text:     #e0f0e5;
  --text-sub: #7db890;
  --text-muted:#5a8a65;
  --border:   #1e3a28;
  --primary-soft: #0f2a1a;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::selection { background: rgba(201,168,76,.25); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ================================================================
   DESKTOP NAVBAR (shown only on desktop)
   ================================================================ */
.navbar-eid {
  background: var(--primary-dark);
  height: 62px;
  position: sticky; top: 0; z-index: 1030;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  display: flex; align-items: center;
}
.navbar-eid .navbar-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold-light) !important;
  font-weight: 700;
}
.navbar-eid .nav-link {
  color: rgba(255,255,255,.8) !important;
  font-size: .87rem; font-weight: 500;
  padding: .4rem .75rem !important;
  border-radius: 8px;
  transition: var(--transition);
}
.navbar-eid .nav-link:hover,
.navbar-eid .nav-link.active {
  color: var(--gold-light) !important;
  background: rgba(255,255,255,.1);
}
.navbar-eid .navbar-toggler {
  border: 1.5px solid rgba(255,255,255,.3);
  padding: .3rem .5rem; border-radius: 8px;
}
.navbar-eid .navbar-toggler-icon { filter: invert(1); width: 18px; height: 18px; }
.navbar-eid .navbar-collapse {
  background: #0a2e1a;
  border-radius: 0 0 16px 16px;
  padding: .5rem .75rem .85rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border-top: 1px solid rgba(255,255,255,.06);
}
.navbar-eid .navbar-collapse .nav-link {
  padding: .65rem 1rem !important;
  border-radius: 10px; margin-bottom: 3px;
}
.eid-toggle-btn {
  border: 1.5px solid var(--gold);
  color: var(--gold-light);
  background: transparent;
  border-radius: 50px;
  padding: .3rem .85rem;
  font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  display: inline-flex; align-items: center; gap: .35rem;
  white-space: nowrap;
}
.eid-toggle-btn:hover { background: rgba(201,168,76,.15); }

/* Bell */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 2px;
  background: #e74c3c; color: #fff;
  font-size: .55rem; width: 14px; height: 14px;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
}

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
  min-width: 180px; padding: .35rem;
}
.dropdown-item {
  color: var(--text); font-size: .87rem;
  padding: .5rem .85rem; border-radius: 8px;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown-item.text-danger:hover { background: #fff5f5; }

/* ================================================================
   MOBILE TOP BAR (App-style, mobile only)
   ================================================================ */
.mobile-topbar {
  display: none;
  background: var(--primary-dark);
  padding: 0 1rem;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.mobile-topbar-brand {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.05rem; font-weight: 700;
}
.mobile-topbar-actions {
  display: flex; align-items: center; gap: .5rem;
}
.mobile-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  transition: var(--transition); position: relative;
}
.mobile-icon-btn:hover { background: rgba(255,255,255,.18); }
.mobile-icon-btn .bell-badge { top: 0; right: 0; }

/* ================================================================
   BOTTOM NAVIGATION (Mobile App-style)
   ================================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,.08);
  z-index: 999;
  padding-bottom: var(--safe-bottom);
  align-items: stretch;
}
.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: .65rem; font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  padding: .5rem .25rem;
  border: none; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item i { font-size: 1.35rem; line-height: 1; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item:active { opacity: .7; transform: scale(.92); }

/* Center FAB button */
.bottom-nav-fab {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: .65rem; font-weight: 600;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: .25rem;
}
.bottom-nav-fab .fab-circle {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(26,102,65,.4);
  font-size: 1.4rem;
  margin-top: -18px;
  transition: var(--transition);
  color: #fff;
}
.bottom-nav-fab:active .fab-circle { transform: scale(.9); }
.bottom-nav-fab span { color: var(--primary); }

/* ================================================================
   PAGE CONTENT WRAPPER (adds bottom padding for bottom nav on mobile)
   ================================================================ */
.page-wrap {
  padding-bottom: 1rem;
}

/* ================================================================
   MOBILE PAGE HEADER
   ================================================================ */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 1.4rem 1rem 1.1rem;
  margin-bottom: 1.25rem;
  position: relative; overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px;
  border: 25px solid rgba(255,255,255,.06);
  border-radius: 50%;
}
.page-header h1 { color: #fff; font-size: 1.4rem; margin: 0 0 .15rem; }
.page-header .breadcrumb { margin: 0; font-size: .75rem; }
.page-header .breadcrumb-item,
.page-header .breadcrumb-item a { color: rgba(255,255,255,.6); }
.page-header .breadcrumb-item.active { color: var(--gold-light); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.3); }

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero-section {
  background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 56px 0 48px;
  position: relative; overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(201,168,76,.2);
  border: 1px solid rgba(201,168,76,.5);
  color: var(--gold-light);
  padding: .28rem .85rem;
  border-radius: 50px;
  font-size: .76rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: .85rem;
}
.hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: #fff; font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
  margin-bottom: .8rem; line-height: 1.15;
}
.hero-subtitle { color: rgba(255,255,255,.82); font-size: .92rem; max-width: 480px; }
.hero-moon {
  position: absolute; right: 5%; top: 50%;
  transform: translateY(-50%);
  width: 150px; opacity: .13;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(-50%)} 50%{transform:translateY(-53%)} }

/* ================================================================
   STATS
   ================================================================ */
.stats-section {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.stat-card { text-align: center; padding: 1.2rem .5rem; }
.stat-number {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 700;
  color: var(--primary); display: block; line-height: 1;
}
.stat-label {
  color: var(--text-muted); font-size: .68rem;
  font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; margin-top: .3rem;
}

/* ================================================================
   CARDS
   ================================================================ */
.card-eid {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-eid .card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: .85rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: .95rem;
  border: none;
  display: flex; align-items: center; gap: .5rem;
}
.card-eid .card-body { padding: 1.1rem; }

/* ================================================================
   WALLET HERO CARD
   ================================================================ */
.wallet-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 70%, #2d8a57 130%);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: #fff;
  position: relative; overflow: hidden;
  box-shadow: 0 6px 24px rgba(26,102,65,.28);
}
.wallet-hero::after {
  content: '◉';
  position: absolute; right: -10px; top: -10px;
  font-size: 6rem; opacity: .06;
  color: var(--gold-light); font-family: serif;
}
.wallet-balance-label {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: .1em; opacity: .72; margin-bottom: .15rem;
}
.wallet-balance-amount {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; line-height: 1.1;
}
.wallet-username { font-size: .82rem; opacity: .72; margin-top: .2rem; }

/* ================================================================
   WIDGET CARDS (Dashboard stats)
   ================================================================ */
.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.05rem;
  display: flex; align-items: center; gap: .85rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.widget-card:active { transform: scale(.97); }
.widget-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.widget-icon.green  { background: rgba(26,102,65,.12); color: var(--primary); }
.widget-icon.gold   { background: rgba(201,168,76,.15); color: var(--gold-dark); }
.widget-icon.teal   { background: rgba(0,160,160,.1);  color: #008080; }
.widget-icon.purple { background: rgba(120,0,160,.1);  color: #7800a0; }
.widget-value {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700; line-height: 1;
}
.widget-label {
  font-size: .68rem; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; margin-top: .15rem;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-eid {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff !important; border: none;
  padding: .62rem 1.35rem; border-radius: 50px;
  font-weight: 600; font-size: .87rem;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(26,102,65,.22);
  display: inline-flex; align-items: center;
  justify-content: center; gap: .4rem;
  -webkit-tap-highlight-color: transparent;
}
.btn-eid:hover { filter: brightness(1.07); box-shadow: 0 5px 18px rgba(26,102,65,.32); }
.btn-eid:active { transform: scale(.96); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff !important; border: none;
  padding: .62rem 1.35rem; border-radius: 50px;
  font-weight: 600; font-size: .87rem;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(160,120,48,.22);
  display: inline-flex; align-items: center;
  justify-content: center; gap: .4rem;
}
.btn-gold:active { transform: scale(.96); }

/* ================================================================
   FORMS
   ================================================================ */
.form-label {
  font-weight: 600; font-size: .84rem;
  color: var(--text); margin-bottom: .32rem;
  display: block;
}
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .68rem .95rem;
  font-size: .9rem;
  background: var(--bg-card);
  color: var(--text);
  transition: var(--transition);
  width: 100%;
  -webkit-appearance: none;
  font-family: var(--font);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,102,65,.1);
  outline: none;
}
.form-text { font-size: .76rem; color: var(--text-muted); margin-top: .25rem; }
.input-group { display: flex; }
.input-group > .form-control { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; flex: 1; }
.input-group-text {
  background: var(--bg);
  border: 1.5px solid var(--border); border-right: none;
  color: var(--text-muted);
  padding: .68rem .9rem;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .9rem;
  display: flex; align-items: center;
}
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition); font-size: .86rem;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
  border-radius: var(--radius-sm);
  border-left: 4px solid transparent;
  font-size: .86rem; padding: .75rem 1rem;
  display: flex; gap: .5rem; align-items: flex-start;
}
.alert-success { background: #f0faf4; border-left-color: var(--primary); color: #1a4a30; }
.alert-danger  { background: #fff5f5; border-left-color: #dc3545; color: #7a1020; }
.alert-warning { background: #fffbee; border-left-color: var(--gold); color: #7a5500; }
.alert-info    { background: #eef6ff; border-left-color: #0d9adb; color: #0a4a7a; }
.alert-dismissible .btn-close { padding: .6rem; }

/* ================================================================
   BADGES & STATUS
   ================================================================ */
.badge-status {
  padding: .25rem .72rem; border-radius: 50px;
  font-size: .71rem; font-weight: 700;
  display: inline-block; letter-spacing: .02em;
}
.badge-issued   { background: rgba(26,102,65,.12);  color: var(--primary); }
.badge-cashed   { background: rgba(201,168,76,.2);  color: var(--gold-dark); }
.badge-expired  { background: rgba(200,60,60,.1);   color: #c0392b; }
.badge-pending  { background: rgba(255,165,0,.15);  color: #b87000; }
.badge-approved { background: rgba(26,102,65,.12);  color: var(--primary); }
.badge-rejected { background: rgba(200,60,60,.1);   color: #c0392b; }

code {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 6px;
  padding: .1rem .38rem;
  font-size: .82em;
}

/* ================================================================
   TABLES
   ================================================================ */
.table-eid { border-collapse: separate; border-spacing: 0; width: 100%; }
.table-eid thead th {
  background: var(--primary);
  color: #fff; font-weight: 600;
  padding: .7rem .85rem;
  font-size: .75rem;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.table-eid tbody tr:hover { background: var(--primary-soft); }
.table-eid tbody td {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle; font-size: .84rem;
}
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ================================================================
   CHEQUE TEMPLATES
   ================================================================ */
.template-option input { display: none; }
.tpl-box {
  border: 2.5px solid transparent;
  border-radius: 12px; overflow: hidden;
  transition: all .2s ease; box-shadow: var(--shadow-sm);
}
.template-option input:checked ~ .tbl-box,
.template-option input:checked + .tpl-box {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.22);
}
.cheque-preview {
  border-radius: 10px; padding: .85rem;
  position: relative; overflow: hidden; min-height: 105px;
}
.cheque-classic { background: linear-gradient(135deg,#1a4a2e,#2d7a4f); color:#fff; border:2px solid #a07830; }
.cheque-gold    { background: linear-gradient(135deg,#7a5a10,#c9a84c); color:#fff; }
.cheque-minimal { background: #fff; color:#1a2e22; border:1.5px solid #c8d8c0; }
.cheque-moon    { background: linear-gradient(135deg,#0d1f14,#1a4433); color:#e8f5ee; }
.cheque-number  { font-size:.62rem; opacity:.65; letter-spacing:.07em; font-family:monospace; }
.cheque-amount  { font-size:.95rem; font-weight:700; margin:.2rem 0; }
.cheque-payee   { font-size:.75rem; opacity:.82; }

/* ================================================================
   LEADERBOARD
   ================================================================ */
.leader-rank {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; flex-shrink: 0;
}
.rank-1 { background: var(--gold); color:#fff; }
.rank-2 { background: #b0b8c1; color:#fff; }
.rank-3 { background: #cd7f32; color:#fff; }
.rank-other { background: var(--border); color: var(--text-muted); }

/* ================================================================
   NOTIFICATIONS
   ================================================================ */
.notif-dropdown { min-width: 290px; max-height: 340px; overflow-y: auto; }
.notif-item {
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--border);
  font-size: .81rem;
}
.notif-item.unread { background: var(--primary-soft); }

/* ================================================================
   AUTH PAGES
   ================================================================ */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(155deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 1rem; position: relative;
}
.auth-wrapper::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  padding: 2rem 1.75rem;
  width: 100%; max-width: 440px;
  position: relative; z-index: 1;
}
.auth-logo {
  font-family: var(--font-display);
  font-size: 1.25rem; color: var(--primary);
  font-weight: 700; text-align: center;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; justify-content: center; gap: .45rem;
}

/* ================================================================
   VERIFY PAGE
   ================================================================ */
.verify-card {
  max-width: 400px; margin: 2.5rem auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer-eid {
  background: var(--primary-dark);
  color: rgba(255,255,255,.55);
  padding: 1.4rem 0;
  font-size: .8rem; margin-top: 2rem;
}
.footer-eid .disclaimer {
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.22);
  border-radius: var(--radius-xs);
  padding: .6rem .9rem;
  color: var(--gold-light);
  font-size: .76rem; text-align: center;
  margin-bottom: .65rem;
}

/* ================================================================
   EID MODE STARS
   ================================================================ */
.star-container { position:fixed; inset:0; pointer-events:none; z-index:0; display:none; }
body.eid-mode .star-container { display:block; }
.star {
  position:absolute; background:var(--gold-light); border-radius:50%;
  animation:twinkle var(--dur,3s) ease-in-out infinite var(--delay,0s); opacity:0;
}
@keyframes twinkle { 0%,100%{opacity:0;transform:scale(.8)} 50%{opacity:.9;transform:scale(1.3)} }

/* ================================================================
   ADMIN SIDEBAR
   ================================================================ */
.admin-sidebar {
  background: var(--primary-dark);
  width: 230px; position:fixed; left:0; top:0; bottom:0;
  z-index:200; overflow-y:auto; transition: transform .3s ease;
}
.admin-sidebar .sidebar-logo {
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-family: var(--font-display);
  color: var(--gold-light); font-size:.98rem; font-weight:700;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,.7);
  padding: .63rem 1.2rem;
  display:flex; align-items:center; gap:.6rem;
  font-size:.87rem; font-weight:500;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.admin-sidebar .nav-link:hover { background:rgba(255,255,255,.07); color:#fff; }
.admin-sidebar .nav-link.active {
  background:rgba(255,255,255,.1);
  color:var(--gold-light);
  border-left-color:var(--gold); font-weight:600;
}
.admin-sidebar .nav-link i { width:16px; text-align:center; }
.admin-main { margin-left:230px; min-height:100vh; background:var(--bg); }
.admin-topbar {
  background:var(--bg-card); border-bottom:1px solid var(--border);
  padding:.72rem 1.2rem;
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; z-index:100; box-shadow:var(--shadow-sm);
}
.sidebar-overlay {
  display:none; position:fixed; inset:0;
  background:rgba(0,0,0,.5); z-index:199;
}
.sidebar-overlay.active { display:block; }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}
.animate-in          { animation: fadeInUp .4s ease both; }
.animate-delay-1     { animation-delay:.07s; }
.animate-delay-2     { animation-delay:.14s; }
.animate-delay-3     { animation-delay:.21s; }
.animate-delay-4     { animation-delay:.28s; }

/* ================================================================
   GREETING
   ================================================================ */
.greeting-preview {
  background: linear-gradient(135deg, #1a4a2e, #0d1f14);
  border-radius: 16px; padding: 2.5rem 1.5rem;
  color:#fff; text-align:center; position:relative; overflow:hidden;
}
.greeting-preview::before {
  content:'✦ ✦ ✦';
  position:absolute; top:.75rem; left:50%; transform:translateX(-50%);
  color:var(--gold-light); opacity:.5; font-size:.7rem; letter-spacing:.5em;
}

/* Modal */
.modal-content { border:none; border-radius:var(--radius); box-shadow:0 20px 60px rgba(0,0,0,.22); }

/* Misc */
.btn-xs    { padding:.18rem .48rem; font-size:.74rem; }
.page-link { color:var(--primary); border-color:var(--border); font-size:.84rem; }
.page-item.active .page-link { background:var(--primary); border-color:var(--primary); }
.nav-pills .nav-link { color:var(--text-muted); font-weight:500; font-size:.84rem; padding:.38rem .88rem; }
.nav-pills .nav-link.active { background:var(--primary); color:#fff; }

/* ================================================================
   ████  MOBILE RESPONSIVE  ████
   ================================================================ */

/* Tablet */
@media (max-width: 991px) {
  .admin-main  { margin-left:0; }
  .admin-sidebar { transform:translateX(-100%); }
  .admin-sidebar.open { transform:translateX(0); box-shadow:4px 0 30px rgba(0,0,0,.28); }
  .hero-moon   { display:none; }
}

/* ── MOBILE (≤767px) — App UI ── */
@media (max-width: 767px) {

  /* Hide desktop navbar, show mobile UI */
  .navbar-eid         { display: none !important; }
  .mobile-topbar      { display: flex !important; }
  .bottom-nav         { display: flex !important; }

  /* Body padding for bottom nav */
  .page-wrap          { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + .5rem); }

  /* Container padding */
  .container, .container-fluid { padding-left: 1rem; padding-right: 1rem; }

  /* Hero */
  .hero-section { padding: 44px 0 40px; text-align: center; }
  .hero-title   { font-size: 1.7rem; }
  .hero-subtitle { font-size: .88rem; margin: 0 auto; }
  .hero-section .d-flex.gap-3 { flex-direction: column; gap: .6rem !important; align-items: center; }
  .hero-section .d-flex.gap-3 .btn,
  .hero-section .d-flex.gap-3 a { width: 100%; max-width: 280px; justify-content: center; }

  /* Stat cards */
  .stats-section .row > div { border-bottom: 1px solid var(--border); }
  .stat-number { font-size: 1.5rem; }

  /* Page header */
  .page-header { padding: 1rem 1rem .85rem; margin-bottom: 1rem; }
  .page-header h1 { font-size: 1.2rem; }

  /* Wallet hero */
  .wallet-hero { padding: 1.3rem; border-radius: var(--radius); }
  .wallet-balance-amount { font-size: 1.9rem; }

  /* Cards */
  .card-eid { border-radius: var(--radius-md); }
  .card-eid .card-header { padding: .8rem 1rem; font-size: .92rem; }
  .card-eid .card-body { padding: 1rem; }

  /* Widget cards */
  .widget-card { padding: .9rem .95rem; gap: .75rem; border-radius: var(--radius-md); }
  .widget-icon  { width: 42px; height: 42px; border-radius: 11px; font-size: 1.15rem; }
  .widget-value { font-size: 1.25rem; }
  .widget-label { font-size: .66rem; }

  /* Tables */
  .table-eid thead th { font-size: .71rem; padding: .6rem .7rem; }
  .table-eid tbody td { font-size: .8rem; padding: .58rem .7rem; }
  .table-responsive   { border-radius: 0 0 var(--radius-md) var(--radius-md); }

  /* Alerts */
  .alert { font-size: .84rem; padding: .7rem .9rem; }

  /* Buttons */
  .btn-eid, .btn-gold { padding: .58rem 1.1rem; font-size: .85rem; }

  /* Footer — hide on mobile (bottom nav replaces it) */
  .footer-eid { padding: 1rem 0; }

  /* Auth pages */
  .auth-card     { padding: 1.5rem 1.15rem; border-radius: var(--radius-md); }
  .auth-logo     { font-size: 1.1rem; margin-bottom: 1rem; }

  /* Leaderboard */
  .leader-rank { width: 27px; height: 27px; font-size: .75rem; }

  /* Verify card */
  .verify-card { margin: 1.5rem auto; border-radius: var(--radius-md); }

  /* Dashboard sections gap */
  .row.g-4 { --bs-gutter-y: .85rem; }

  /* Cheque history action buttons */
  .cheque-action-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .cheque-action-btns .btn { font-size: .78rem; padding: .45rem .6rem; justify-content: center; }
}

/* ── SMALL MOBILE (≤480px) ── */
@media (max-width: 480px) {
  body { font-size: 14.5px; }

  /* Wallet card */
  .wallet-balance-amount { font-size: 1.7rem; }
  .wallet-hero .d-flex { flex-wrap: wrap; gap: .4rem !important; }
  .wallet-hero .d-flex .btn { font-size: .8rem; padding: .38rem .85rem; }

  /* Widget row — 2 per row forced */
  .col-6 .widget-card { padding: .8rem .75rem; }
  .widget-icon { width: 38px; height: 38px; font-size: 1rem; border-radius: 10px; }
  .widget-value { font-size: 1.15rem; }

  /* Template grid */
  .template-option .tpl-box { border-radius: 10px; }
  .cheque-preview { min-height: 90px; padding: .7rem; }

  /* Referral box */
  .rounded-3 { border-radius: 10px !important; }

  /* Bottom nav label */
  .bottom-nav-item { font-size: .6rem; }
  .bottom-nav-item i { font-size: 1.25rem; }
  .bottom-nav-fab .fab-circle { width: 46px; height: 46px; font-size: 1.25rem; margin-top: -16px; }

  /* Page header */
  .page-header h1 { font-size: 1.1rem; }

  /* Auth */
  .auth-card { padding: 1.3rem 1rem; }

  /* Tables — compact */
  .table-eid thead th { font-size: .68rem; padding: .52rem .6rem; }
  .table-eid tbody td { font-size: .77rem; padding: .52rem .6rem; }

  /* Hide less important table cols */
  .hide-mobile { display: none !important; }

  /* Cheque mubarak on history page */
  .cheque-left-panel { width: 56px !important; }
  .cheque-header-title { font-size: .78rem !important; letter-spacing: .03em !important; }
  .cheque-main { padding: .75rem !important; }
  .amount-value { font-size: .88rem !important; }
  .in-words-value { font-size: 1rem !important; }
  .cheque-sig-name { font-size: .9rem !important; }
  .cheque-seal { width: 48px !important; height: 48px !important; }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
  .btn, button, a { -webkit-tap-highlight-color: rgba(26,102,65,.12); }
  .form-control, .form-select { font-size: 16px; } /* Prevent zoom on iOS */
}
