/* ==========================================================================
   PRAGATI MITRA MANDAL - YEARLY SUMMARY & FINANCIAL MANAGEMENT STYLESHEET
   Aesthetics: Premium Indian Festival Mandal Theme (Saffron, Gold, Deep Maroon, Emerald)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Martel:wght@400;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Primary Palette */
  --primary-saffron: #e65100;
  --primary-saffron-hover: #cc4400;
  --saffron-light: #fff3e0;
  --saffron-gradient: linear-gradient(135deg, #ff6f00 0%, #e65100 50%, #b71c1c 100%);
  
  /* Gold Accents */
  --accent-gold: #d4af37;
  --gold-light: #fef9e7;
  --gold-border: #e6ca65;
  --gold-gradient: linear-gradient(135deg, #f39c12 0%, #d4af37 100%);

  /* Financial Status Colors */
  --color-jama: #166534; /* Jama / Income - Forest Green */
  --color-jama-bg: #f0fdf4;
  --color-jama-border: #bbf7d0;
  
  --color-kharch: #991b1b; /* Kharch / Expense - Deep Red */
  --color-kharch-bg: #fef2f2;
  --color-kharch-border: #fecaca;
  
  --color-shillak: #1e3a8a; /* Shillak / Net Balance - Deep Navy Blue */
  --color-shillak-bg: #eff6ff;
  --color-shillak-border: #bfdbfe;

  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1da851;

  /* Neutral Surface Colors */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --border-color: #e2e8f0;
  
  /* Shadows & Radius */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.08), 0 2px 6px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 24px -4px rgba(0,0,0,0.12), 0 4px 8px -2px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 20px rgba(230, 81, 0, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-heading: 'Martel', serif;
  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Banner */
.header-banner {
  background: var(--saffron-gradient);
  color: white;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.mandal-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mandal-emblem {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.6), var(--shadow-md);
  font-size: 1.6rem;
  color: var(--primary-saffron);
  flex-shrink: 0;
}

.mandal-titles h1 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mandal-titles p {
  font-size: 0.82rem;
  opacity: 0.92;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.year-selector-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.year-selector-box label {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.custom-select {
  background: white;
  color: var(--text-dark);
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.btn-lang {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-lang:hover {
  background: white;
  color: var(--primary-saffron);
}

/* Primary Navigation Bar */
.main-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 72px;
  z-index: 90;
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 0.85rem 1.25rem;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-tab:hover {
  color: var(--primary-saffron);
  background: rgba(230, 81, 0, 0.03);
}

.nav-tab.active {
  color: var(--primary-saffron);
  border-bottom-color: var(--primary-saffron);
  background: rgba(230, 81, 0, 0.05);
}

/* App Main Body Layout */
.app-content {
  max-width: 1300px;
  width: 100%;
  margin: 1.25rem auto;
  padding: 0 1rem;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-pane.active {
  display: block;
}

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

/* Mobile Friendly Quick Floating Bar */
.mobile-quick-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  z-index: 99;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  justify-content: space-around;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .mobile-quick-bar {
    display: flex;
  }
  body {
    padding-bottom: 70px;
  }
  .header-banner {
    padding: 0.85rem 1rem;
  }
  .mandal-titles h1 {
    font-size: 1.15rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Summary Dashboard Cards Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
}

.stat-card.jama {
  border-color: var(--color-jama-border);
  background: linear-gradient(135deg, #ffffff 0%, var(--color-jama-bg) 100%);
}
.stat-card.jama::before { background: var(--color-jama); }

.stat-card.kharch {
  border-color: var(--color-kharch-border);
  background: linear-gradient(135deg, #ffffff 0%, var(--color-kharch-bg) 100%);
}
.stat-card.kharch::before { background: var(--color-kharch); }

.stat-card.shillak {
  border-color: var(--color-shillak-border);
  background: linear-gradient(135deg, #ffffff 0%, var(--color-shillak-bg) 100%);
}
.stat-card.shillak::before { background: var(--color-shillak); }

.stat-card.donors {
  border-color: var(--gold-border);
  background: linear-gradient(135deg, #ffffff 0%, var(--gold-light) 100%);
}
.stat-card.donors::before { background: var(--accent-gold); }

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.stat-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.jama .stat-icon { background: rgba(22, 101, 52, 0.1); color: var(--color-jama); }
.kharch .stat-icon { background: rgba(153, 27, 27, 0.1); color: var(--color-kharch); }
.shillak .stat-icon { background: rgba(30, 58, 138, 0.1); color: var(--color-shillak); }
.donors .stat-icon { background: rgba(212, 175, 55, 0.2); color: #b45309; }

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.stat-footer {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Split Layout Grids */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-title-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
}

.badge-jama { background: var(--color-jama-bg); color: var(--color-jama); border: 1px solid var(--color-jama-border); }
.badge-kharch { background: var(--color-kharch-bg); color: var(--color-kharch); border: 1px solid var(--color-kharch-border); }

/* Progress / Category Bar Breakdown */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cat-item-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.cat-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cat-val {
  font-family: var(--font-heading);
  font-weight: 700;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-jama { background: linear-gradient(90deg, #22c55e, #15803d); }
.fill-kharch { background: linear-gradient(90deg, #ef4444, #b91c1c); }

/* SVG Monthly Chart Container */
.chart-container {
  width: 100%;
  min-height: 240px;
  position: relative;
  overflow-x: auto;
}

.chart-svg {
  width: 100%;
  min-width: 600px;
  height: 220px;
}

/* Action Controls Header inside Tabs */
.toolbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 400px;
}

.search-box input {
  width: 100%;
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--primary-saffron);
  box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--saffron-gradient);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-success {
  background: var(--color-jama);
  color: white;
}

.btn-danger {
  background: var(--color-kharch);
  color: white;
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: white;
}
.btn-whatsapp:hover {
  background: var(--color-whatsapp-hover);
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.btn-icon {
  padding: 0.3rem;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.action-buttons-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Data Table Styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: white;
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.data-table th {
  background: #f8fafc;
  padding: 0.75rem 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: #fdfbf7;
}

.amount-text {
  font-family: var(--font-heading);
  font-weight: 700;
}

.amount-jama { color: var(--color-jama); }
.amount-kharch { color: var(--color-kharch); }

.tag-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.tag-cash { background: #e0f2fe; color: #0369a1; }
.tag-upi { background: #f3e8ff; color: #6b21a8; }
.tag-cheque { background: #fef3c7; color: #92400e; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 580px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  background: var(--saffron-gradient);
  color: white;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.btn-close:hover { opacity: 1; }

.modal-body {
  padding: 1.25rem;
  max-height: 80vh;
  overflow-y: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary-saffron);
  box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.15);
}

.modal-footer {
  padding: 0.9rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Official Receipt Document Modal Styling */
.receipt-printable {
  background: #fffdf9;
  border: 4px double #d4af37;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  position: relative;
  box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.1);
  color: #262626;
}

.receipt-header-row {
  text-align: center;
  border-bottom: 2px solid #d4af37;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

.receipt-mandal-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-saffron);
  line-height: 1.2;
}

.receipt-sub {
  font-size: 0.78rem;
  color: #525252;
}

.receipt-badge-no {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #404040;
}

.receipt-body-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.7;
}

.receipt-field {
  border-bottom: 1px dotted #a3a3a3;
  padding-bottom: 0.15rem;
  font-weight: 700;
  color: #000;
}

.receipt-footer-signatures {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 0.85rem;
}

.receipt-stamp-img-box {
  width: 105px;
  height: 105px;
}

.stamp-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transform: rotate(-4deg);
}

.sign-box {
  text-align: center;
}

.signature-img {
  height: 50px;
  object-fit: contain;
  display: block;
  margin: 0 auto -8px auto;
  mix-blend-mode: multiply;
}

.sign-line {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-top: 1px solid #737373;
  padding-top: 0.25rem;
  min-width: 130px;
}

/* Official Winner Certificate Formatting (Royal Gold & Saffron Festival Design) */
.certificate-printable {
  background: linear-gradient(135deg, #fffdf5 0%, #fff7ed 50%, #fef3c7 100%);
  border: 12px double #d4af37;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: inset 0 0 50px rgba(212, 175, 55, 0.25), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  color: #1e293b;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

.cert-outer-border {
  border: 3px solid #991b1b;
  padding: 1.5rem 1.25rem;
  position: relative;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 4px;
}

/* Ornate Corner Accents */
.cert-corner {
  position: absolute;
  font-size: 1.6rem;
  color: #d4af37;
  line-height: 1;
}
.cert-corner-tl { top: 6px; left: 8px; }
.cert-corner-tr { top: 6px; right: 8px; }
.cert-corner-bl { bottom: 6px; left: 8px; }
.cert-corner-br { bottom: 6px; right: 8px; }

.cert-ganesha-frame {
  width: 95px;
  height: 95px;
  margin: 0 auto 0.6rem auto;
  border-radius: 50%;
  border: 3.5px solid #d4af37;
  padding: 3px;
  background: #fff8e1;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.cert-ganesha-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.cert-header {
  border-bottom: 2px dashed #d4af37;
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
}

.cert-mandal-name {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #e65100;
  text-shadow: 1px 1px 2px rgba(230, 81, 0, 0.15);
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.cert-sub-title {
  font-size: 0.98rem;
  color: #7c2d12;
  font-weight: 700;
}

.cert-vighnaharta-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: #991b1b;
  background: linear-gradient(90deg, #991b1b, #c2410c, #991b1b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 0.4rem;
  letter-spacing: 1px;
}

.cert-main-badge {
  display: inline-block;
  background: linear-gradient(135deg, #7f1d1d, #991b1b, #b91c1c);
  color: #fffde7;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.5rem 2.2rem;
  border-radius: 30px;
  border: 2px solid #fde047;
  margin: 1.1rem 0;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.25);
}

.cert-body-text {
  font-size: 1.12rem;
  line-height: 2.2;
  color: #334155;
  margin: 1.4rem 0;
}

.cert-winner-highlight {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #991b1b;
  background: #fef2f2;
  border: 1px dashed #ef4444;
  padding: 0.15rem 1.2rem;
  border-radius: 6px;
  display: inline-block;
  margin: 0.3rem 0;
  box-shadow: 0 2px 4px rgba(153, 27, 27, 0.08);
}

.cert-game-highlight {
  font-size: 1.3rem;
  font-weight: 800;
  color: #15803d;
  border-bottom: 2px solid #16a34a;
  padding-bottom: 2px;
}

/* Rank Badge Styles with Custom Metallic Shimmers */
.cert-rank-badge {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.4rem 1.6rem;
  border-radius: 30px;
  margin: 0.5rem 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.rank-gold {
  background: linear-gradient(135deg, #fef08a, #facc15, #eab308);
  color: #713f12;
  border: 2px solid #ca8a04;
}

.rank-silver {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0, #cbd5e1);
  color: #0f172a;
  border: 2px solid #64748b;
}

.rank-bronze {
  background: linear-gradient(135deg, #ffedd5, #fed7aa, #fb923c);
  color: #7c2d12;
  border: 2px solid #ea580c;
}

.rank-other {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #14532d;
  border: 2px solid #16a34a;
}

.cert-footer-signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2.2rem;
  padding-top: 0.85rem;
}

/* Official Varshik Ahwal / Balance Sheet Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  .header-banner, .main-nav, .toolbar-header, .btn, .modal-footer, .btn-close, .mobile-quick-bar, .action-buttons-cell {
    display: none !important;
  }
  .app-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .tab-pane {
    display: block !important;
  }
  .card {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
  .receipt-printable {
    border: 2px solid #000;
    box-shadow: none;
  }
}

/* Event Cards */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.event-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.event-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-saffron);
  margin-bottom: 0.4rem;
}

.event-stats {
  display: flex;
  justify-content: space-between;
  background: var(--bg-main);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  margin: 0.65rem 0;
  font-size: 0.82rem;
}

/* Committee Cards */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}

.member-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--saffron-light);
  color: var(--primary-saffron);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin: 0 auto 0.65rem auto;
  border: 2px solid var(--gold-border);
}

.member-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.member-role {
  font-size: 0.8rem;
  color: var(--primary-saffron);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.member-phone {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Photo Gallery Styling */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.photo-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.photo-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f172a;
  cursor: pointer;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-card:hover .photo-img {
  transform: scale(1.05);
}

.photo-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: var(--accent-gold);
  border: 1px solid var(--gold-border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.photo-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.photo-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.photo-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

/* Mobile IP Info Bar */
.mobile-ip-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}
.mobile-ip-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mobile-ip-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-gold);
}
