/* ==========================================================================
   MINIMALIST GREEN & WHITE THEME - ISKCON CENTRE REVENUE
   ========================================================================== */

:root {
  --bg-main: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-card: #FFFFFF;

  --emerald-900: #064E3B;
  --emerald-800: #065F46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10B981;
  --emerald-100: #D1FAE5;
  --emerald-50: #ECFDF5;

  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;

  --border: #E2E8F0;
  --border-focus: #059669;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 4px 20px -2px rgba(6, 78, 59, 0.05);
  --shadow-float: 0 12px 30px -4px rgba(6, 78, 59, 0.08);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background-color: var(--bg-subtle);
  color: var(--slate-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Minimalist Top Nav */
.top-nav {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--emerald-900);
  letter-spacing: -0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-status {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald-800);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald-600);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--slate-200);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: var(--transition);
}

.sync-btn:hover {
  border-color: var(--emerald-600);
  color: var(--emerald-800);
}

.sync-btn.spinning .sync-svg {
  animation: spin 1s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* App Container - Wide Google Sheets Viewport */
.app-container {
  max-width: 1440px;
  width: 96%;
  margin: 32px auto;
  padding: 0 16px;
  flex: 1;
}

#stepCentre {
  max-width: 680px;
  margin: 0 auto;
}

#stepCentre .main-heading {
  margin-bottom: 24px;
}

#stepResults {
  max-width: 100%;
}

/* Step Flow Cards */
.flow-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

@media (max-width: 768px) {
  .flow-card {
    padding: 28px 24px;
  }
}

.step-visible {
  display: block;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-hidden {
  display: none;
}

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

.step-indicator {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-700);
  background: var(--emerald-50);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.main-heading {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.sub-heading {
  font-size: 0.95rem;
  color: var(--slate-500);
  margin-bottom: 32px;
  font-weight: 400;
}

/* Custom Dropdown Styling */
.selector-wrapper {
  position: relative;
  width: 100%;
}

.centre-select {
  width: 100%;
  appearance: none;
  background: #FFFFFF;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--slate-900);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-subtle);
}

.centre-select:focus,
.centre-select:hover {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.select-chevron {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--emerald-700);
}

/* Date Range Grid */
.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.back-link {
  background: transparent;
  border: none;
  color: var(--emerald-700);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--emerald-50);
  transition: var(--transition);
}

.back-link:hover {
  background: var(--emerald-100);
}

.date-range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

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

.date-input-card {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.date-input-card:focus-within {
  border-color: var(--emerald-600);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.date-input-card label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}

.date-picker {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
  outline: none;
  cursor: pointer;
  width: 100%;
}

/* Preset Pills */
.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.pill-btn {
  background: #FFFFFF;
  border: 1px solid var(--slate-200);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: var(--transition);
}

.pill-btn:hover {
  border-color: var(--emerald-600);
  color: var(--emerald-800);
}

.pill-btn.active {
  background: var(--emerald-50);
  border-color: var(--emerald-500);
  color: var(--emerald-900);
  font-weight: 700;
}

/* Primary Action Button */
.primary-action-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 28px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  transition: var(--transition);
}

.primary-action-btn:hover {
  background: linear-gradient(135deg, #04382a, #047857);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

/* STEP 3 RESULTS VIEW */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tag-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-600);
}

.display-centre-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
  margin: 4px 0 2px;
}

.display-date-subtitle {
  font-size: 0.85rem;
  color: var(--slate-500);
  font-weight: 500;
}

.change-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: var(--transition);
}

.change-filter-btn:hover {
  background: var(--emerald-50);
  border-color: var(--emerald-600);
  color: var(--emerald-900);
}

/* Inline Top Date Range Filter with Calendar View */
.centre-top-date-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: #F8FAFC;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
}

.top-date-picker-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-date-field label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.top-input-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  transition: all 0.2s ease;
}

.top-input-box:focus-within {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.top-input-box svg {
  color: var(--slate-500);
  flex-shrink: 0;
}

.top-date-picker {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--slate-800);
  background: transparent;
  cursor: pointer;
}

.top-date-apply-btn {
  background: var(--emerald-700);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.top-date-apply-btn:hover {
  background: var(--emerald-800);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.2);
}

.top-date-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.top-pill-btn {
  background: #FFFFFF;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.18s ease;
}

.top-pill-btn:hover {
  border-color: var(--emerald-400);
  color: var(--emerald-800);
  background: #F0FDF4;
}

.top-pill-btn.active {
  background: var(--emerald-700);
  color: #FFFFFF;
  border-color: var(--emerald-700);
  font-weight: 700;
}

/* Two Hero Selection Tiles */
.hero-tiles-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .hero-tiles-container {
    grid-template-columns: 1fr;
  }
}

.hero-selection-tile {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  cursor: pointer;
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  user-select: none;
}

.hero-selection-tile:hover {
  transform: translateY(-2px);
  border-color: var(--emerald-400);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.1);
}

.hero-selection-tile:focus-visible {
  outline: 2px solid var(--emerald-600);
  outline-offset: 2px;
}

.tile-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.tile-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.tile-donation-icon {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-200);
}

.tile-sales-icon {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.tile-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-400);
  background: var(--slate-100);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
}

.tile-category-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-bottom: 6px;
  transition: var(--transition);
}

.tile-amount-value {
  font-size: 2.15rem;
  font-weight: 900;
  color: var(--slate-800);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
  transition: var(--transition);
}

.tile-meta-count {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 500;
}

/* Active Tile States */
.hero-selection-tile.active {
  border-color: var(--emerald-600);
  background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.14);
}

.hero-selection-tile.active .tile-status-badge {
  background: var(--emerald-600);
  color: #FFFFFF;
  font-weight: 800;
}

.hero-selection-tile.active .tile-category-name {
  color: var(--emerald-700);
}

.hero-selection-tile.active .tile-amount-value {
  color: var(--emerald-950);
}

/* Sales Active Variant */
.hero-selection-tile.sales-active.active {
  border-color: #2563EB;
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 100%);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.14);
}

.hero-selection-tile.sales-active.active .tile-status-badge {
  background: #2563EB;
  color: #FFFFFF;
}

.hero-selection-tile.sales-active.active .tile-category-name {
  color: #1D4ED8;
}

.hero-selection-tile.sales-active.active .tile-amount-value {
  color: #172554;
}

.toggle-donors-btn.sales-theme {
  border-color: #2563EB;
  color: #1D4ED8;
}

.toggle-donors-btn.sales-theme:hover {
  background: #EFF6FF;
  border-color: #1D4ED8;
  color: #172554;
}

/* Google Sheets Style Sales QR Codes Grid */
.sales-grid-container {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  width: 100%;
}

.sales-grid-header {
  display: grid;
  grid-template-columns: 3.5fr 1.6fr 1.8fr 2fr 1.2fr;
  align-items: stretch;
  background: #EFF6FF;
  border-bottom: 2px solid #BFDBFE;
}

.sales-grid-header .grid-col {
  padding: 14px 20px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1E3A8A;
  border-right: 1px solid #BFDBFE;
  display: flex;
  align-items: center;
}

.sales-grid-header .grid-col:last-child {
  border-right: none;
}

.sales-grid-body {
  display: flex;
  flex-direction: column;
}

.sales-grid-row {
  display: grid;
  grid-template-columns: 3.5fr 1.6fr 1.8fr 2fr 1.2fr;
  align-items: stretch;
  border-bottom: 1px solid #E2E8F0;
  background: #FFFFFF;
  transition: background-color 0.15s ease;
}

.sales-grid-row:nth-child(even) {
  background: #FAFCFE;
}

.sales-grid-row:hover {
  background: #F0F7FF;
}

.sales-grid-row:last-child {
  border-bottom: none;
}

.sales-grid-row .grid-col {
  padding: 16px 20px;
  border-right: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  min-width: 0;
}

.sales-grid-row .grid-col:last-child {
  border-right: none;
}

.col-sales-qr {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sales-qr-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #BFDBFE;
  flex-shrink: 0;
}

.sales-qr-name-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
}

.col-sales-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1E3A8A;
  letter-spacing: -0.01em;
}

.col-sales-txns {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-700);
}

.sales-share-pill {
  font-size: 0.8rem;
  font-weight: 800;
  color: #1D4ED8;
  background: #DBEAFE;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.sales-summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #F8FAFC;
  border-top: 2px solid #CBD5E1;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-700);
}

.sales-summary-total-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: #1E3A8A;
}

.breakdown-chips {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  background: #FFFFFF;
  border: 1px solid var(--emerald-100);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.chip-label {
  color: var(--slate-500);
  font-weight: 500;
}

.chip-val {
  color: var(--emerald-800);
  font-weight: 700;
}

/* Donor Action Bar */
.donor-action-bar {
  text-align: center;
  margin-bottom: 24px;
}

.toggle-donors-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-main);
  border: 2px solid var(--emerald-600);
  color: var(--emerald-800);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}

.toggle-donors-btn:hover {
  background: var(--emerald-50);
  transform: translateY(-1px);
}

/* Donor Details Section */
.donor-section {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 20px;
}

.donor-section.hidden {
  display: none;
}

.donor-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

/* Toolbar Row: Big Google-Style Search Bar + On-The-Go Date Change */
.donor-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .donor-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.google-search-bar {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.google-search-icon {
  position: absolute;
  left: 20px;
  color: var(--emerald-600);
  pointer-events: none;
}

.google-search-input {
  width: 100%;
  height: 52px;
  padding: 12px 24px 12px 54px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--slate-900);
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: var(--transition);
}

.google-search-input:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
}

.google-search-input::placeholder {
  color: var(--slate-400);
  font-weight: 400;
}

/* Date Change Container & Popover */
.date-change-container {
  position: relative;
  flex-shrink: 0;
}

.date-change-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-700);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.date-change-action-btn:hover {
  border-color: var(--emerald-600);
  color: var(--emerald-900);
  background: var(--emerald-50);
}

.date-chevron {
  transition: transform 0.2s ease;
  color: var(--slate-400);
}

.date-change-container.active .date-chevron {
  transform: rotate(180deg);
}

.quick-date-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 330px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16);
  z-index: 100;
  animation: popoverFade 0.2s ease;
}

.quick-date-popover.hidden {
  display: none;
}

@keyframes popoverFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.popover-header {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--slate-800);
  margin-bottom: 14px;
}

.popover-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.popover-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popover-field label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
}

.popover-date-input {
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--slate-800);
  outline: none;
}

.popover-date-input:focus {
  border-color: var(--emerald-600);
}

.popover-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.quick-pill {
  flex: 1;
  background: var(--slate-50);
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-pill);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: var(--transition);
}

.quick-pill:hover,
.quick-pill.active {
  background: var(--emerald-50);
  border-color: var(--emerald-500);
  color: var(--emerald-900);
}

.popover-apply-btn {
  width: 100%;
  background: var(--emerald-600);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.popover-apply-btn:hover {
  background: var(--emerald-700);
}

/* Google Sheets Style Minimalist Data Grid */
.donor-grid-container {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  width: 100%;
}

.donor-grid-header {
  display: grid;
  grid-template-columns: 2.3fr 1.3fr 2.1fr 1.6fr 1.3fr 1.4fr;
  align-items: stretch;
  background: #F1F5F9;
  border-bottom: 2px solid #CBD5E1;
}

.donor-grid-header .grid-col {
  padding: 12px 18px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  border-right: 1px solid #CBD5E1;
  display: flex;
  align-items: center;
}

.donor-grid-header .grid-col:last-child {
  border-right: none;
}

.donor-grid-body {
  display: flex;
  flex-direction: column;
}

.donor-grid-row {
  display: grid;
  grid-template-columns: 2.3fr 1.3fr 2.1fr 1.6fr 1.3fr 1.4fr;
  align-items: stretch;
  border-bottom: 1px solid #E2E8F0;
  background: #FFFFFF;
  transition: background-color 0.15s ease;
}

.donor-grid-row:nth-child(even) {
  background: #FAFCFE;
}

.donor-grid-row:hover {
  background: #ECFDF5;
}

.donor-grid-row:last-child {
  border-bottom: none;
}

.donor-grid-row .grid-col {
  padding: 14px 18px;
  border-right: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  min-width: 0;
}

.donor-grid-row .grid-col:last-child {
  border-right: none;
}

/* Donor Name Cell */
.col-donor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.donor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #065F46, #059669);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.2);
}

.donor-info-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.donor-name-text {
  font-weight: 700;
  color: #0F172A;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.cong-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  color: #047857;
  background: #D1FAE5;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
  align-self: flex-start;
}

/* Phone Cell */
.col-phone {
  font-family: inherit;
  font-size: 0.88rem;
  color: #334155;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Email / UPI ID Cell */
.col-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  color: #334155;
  word-break: break-all;
  line-height: 1.4;
}

.upi-chip {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  padding: 4px 8px;
  border-radius: 6px;
  color: #1E293B;
  font-weight: 500;
}

/* Total Donation Cell */
.col-donation {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
}

.donation-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #065F46;
  letter-spacing: -0.02em;
}

.donation-sub {
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 600;
  margin-top: 2px;
}

/* Contributions Action Button */
.col-contributions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-contrib-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid #059669;
  color: #065F46;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.view-contrib-btn:hover {
  background: #059669;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.view-contrib-btn svg {
  transition: transform 0.2s ease;
}

.view-contrib-btn:hover svg {
  transform: translateX(2px);
}

/* Modal Styling */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

.modal-backdrop.hidden {
  display: none;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-main);
}

.modal-donor-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.modal-donor-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.modal-donor-sub {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-top: 2px;
}

.modal-close-btn {
  background: var(--slate-100);
  border: none;
  color: var(--slate-500);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--slate-200);
  color: var(--slate-800);
}

.modal-summary-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px 28px;
  background: var(--emerald-50);
  border-bottom: 1px solid var(--emerald-100);
}

.summary-stat {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-800);
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--emerald-900);
  margin-top: 2px;
}

.modal-list-title {
  padding: 16px 28px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
}

.modal-table-container {
  overflow-y: auto;
  padding: 0 28px 24px;
  max-height: 360px;
}

.modal-contrib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.modal-contrib-table th {
  position: sticky;
  top: 0;
  background: #FFFFFF;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  border-bottom: 1px solid var(--border);
  z-index: 1;
}

.modal-contrib-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--slate-800);
}

.modal-contrib-table tr:hover td {
  background: var(--slate-50);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.badge-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--emerald-50);
  color: var(--emerald-800);
  border: 1px solid var(--emerald-100);
}

.badge-auto {
  background: #EFF6FF;
  color: #1E40AF;
  border-color: #DBEAFE;
}

.badge-shopify {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FDE68A;
}

/* Pagination */
.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px 0;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 500;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
}

.page-btn {
  background: #FFFFFF;
  border: 1px solid var(--slate-200);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--emerald-600);
  color: var(--emerald-800);
  background: var(--emerald-50);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.donor-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--slate-400);
  font-style: italic;
  font-size: 0.9rem;
}

/* ==========================================================================
   SCHEMES & CAMPAIGNS STYLES
   ========================================================================== */

/* Top Nav View Switcher */
.nav-view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--slate-100);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--slate-200);
}

.nav-view-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-view-btn:hover {
  color: var(--emerald-800);
}

.nav-view-btn.active {
  background: #FFFFFF;
  color: var(--emerald-800);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Centre Scheme Breakdown */
.centre-scheme-wrapper {
  margin-top: 18px;
  margin-bottom: 22px;
  padding: 16px 20px;
  background: #F8FAFC;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.scheme-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.scheme-section-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--slate-800);
  display: block;
}

.scheme-section-hint {
  font-size: 0.74rem;
  color: var(--slate-500);
  font-weight: 500;
}

.centre-scheme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.centre-scheme-card {
  background: #FFFFFF;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: all 0.18s ease;
  cursor: pointer;
  position: relative;
}

.centre-scheme-card:hover {
  border-color: var(--emerald-500);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.centre-scheme-card.active {
  border-color: var(--emerald-600);
  background: #F0FDF4;
}

.card-sc-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate-600);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sc-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--emerald-900);
  letter-spacing: -0.01em;
}

.card-sc-meta {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--slate-500);
  margin-top: 3px;
}

.scheme-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #F8FAFC;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.filter-by-scheme-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scheme-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scheme-filter-pill {
  background: #FFFFFF;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.scheme-filter-pill:hover {
  border-color: var(--emerald-600);
  color: var(--emerald-800);
  background: #F0FDF4;
}

.scheme-filter-pill.active {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #FFFFFF;
}

/* Color-coded Scheme Tag Badges */
.scheme-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag-sankalpa { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.tag-autodebit { background: #E0F2FE; color: #075985; border: 1px solid #BAE6FD; }
.tag-pledge { background: #F3E8FF; color: #6B21A8; border: 1px solid #E9D5FF; }
.tag-brick { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.tag-sqft { background: #CCFBF1; color: #115E59; border: 1px solid #99F6E4; }
.tag-walkin { background: #F1F5F9; color: #334155; border: 1px solid #E2E8F0; }
.tag-festival { background: #FFE4E6; color: #9F1239; border: 1px solid #FECDD3; }
.tag-food { background: #FFEDD5; color: #9A3412; border: 1px solid #FED7AA; }
.tag-sales { background: #E0E7FF; color: #3730A3; border: 1px solid #C7D2FE; }
.tag-other { background: #F3F4F6; color: #4B5563; border: 1px solid #E5E7EB; }

/* Macro Schemes Intelligence Screen */
.macro-schemes-card {
  padding: 32px 36px;
}

.schemes-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.schemes-grand-badge {
  background: linear-gradient(135deg, #064E3B 0%, #047857 100%);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.2);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.schemes-grand-badge .badge-sub {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.schemes-grand-badge .badge-val {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.macro-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.macro-kpi-card {
  background: #FFFFFF;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.macro-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.macro-kpi-card.card-sankalpa { border-left: 5px solid #10B981; }
.macro-kpi-card.card-autodebit { border-left: 5px solid #0EA5E9; }
.macro-kpi-card.card-pledge { border-left: 5px solid #8B5CF6; }
.macro-kpi-card.card-patrons { border-left: 5px solid #EC4899; }
.macro-kpi-card.card-regular { border-left: 5px solid #64748B; }
.macro-kpi-card.card-brick { border-left: 5px solid #F59E0B; }

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kpi-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--slate-500);
  letter-spacing: 0.04em;
}

.kpi-share-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--slate-100);
  color: var(--slate-700);
}

.macro-kpi-card.card-sankalpa .kpi-share-pill { background: #DCFCE7; color: #166534; }
.macro-kpi-card.card-autodebit .kpi-share-pill { background: #E0F2FE; color: #0369A1; }
.macro-kpi-card.card-pledge .kpi-share-pill { background: #F3E8FF; color: #6B21A8; }
.macro-kpi-card.card-patrons .kpi-share-pill { background: #FCE7F3; color: #9D174D; }
.macro-kpi-card.card-regular .kpi-share-pill { background: #F1F5F9; color: #334155; }
.macro-kpi-card.card-brick .kpi-share-pill { background: #FEF3C7; color: #92400E; }

.kpi-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 0;
}

.kpi-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.kpi-meta {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--slate-500);
  margin-top: 4px;
}

.schemes-table-section {
  background: #FFFFFF;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
}

.table-section-title {
  padding: 16px 22px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-800);
}

.table-hint {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--slate-500);
}

.schemes-table-container {
  overflow-x: auto;
}

.schemes-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.schemes-data-table th {
  background: #F1F5F9;
  padding: 12px 16px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  border-bottom: 2px solid #CBD5E1;
  text-align: left;
}

.schemes-data-table th.th-num,
.schemes-data-table th.th-total {
  text-align: right;
}

.schemes-data-table th.th-share {
  text-align: center;
}

.schemes-data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #E2E8F0;
  color: var(--slate-800);
}

.schemes-data-table tr:hover td {
  background: #F0FDF4;
}

.schemes-data-table td.td-scheme-name {
  font-weight: 700;
  color: var(--slate-900);
}

.schemes-data-table td.td-num {
  text-align: right;
  font-weight: 600;
  color: var(--slate-700);
  font-variant-numeric: tabular-nums;
}

.schemes-data-table td.td-total {
  text-align: right;
  font-weight: 800;
  color: var(--emerald-900);
  font-variant-numeric: tabular-nums;
}

.schemes-data-table td.td-share {
  text-align: center;
}

.scheme-row-share-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 800;
  background: #E2E8F0;
  color: #334155;
}

.schemes-data-table tfoot td {
  background: #F8FAFC;
  font-weight: 800;
  border-top: 2px solid #CBD5E1;
  border-bottom: none;
  color: var(--slate-900);
  padding: 14px 16px;
}

.schemes-data-table tfoot td.td-total {
  color: #047857;
  font-size: 0.95rem;
  font-weight: 900;
}

.td-month-name {
  font-weight: 700;
  color: var(--slate-900);
}

.th-month {
  width: 160px;
}


