:root {
  --bg: #fbf6f0;
  --bg-deep: #f4ebe2;
  --bg-rose: #f6e4e7;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --border: #e8dad0;
  --border-strong: #d8c2b3;
  --navy: #192b47;
  --navy-deep: #111e33;
  --navy-hover: #132238;
  --rose: #9b2646;
  --rose-deep: #7a1b35;
  --rose-soft: #fbedf0;
  --gold: #b88430;
  --gold-bright: #d4a34c;
  --gold-soft: #fbf2e1;
  --text: #1e232b;
  --muted: #525a66;
  --success-bg: #e7f6ee;
  --success-text: #1a633e;
  --shadow-sm: 0 4px 14px rgba(25, 43, 71, 0.05);
  --shadow: 0 18px 44px rgba(25, 43, 71, 0.08), 0 2px 8px rgba(155, 38, 70, 0.04);
  --shadow-hover: 0 24px 54px rgba(25, 43, 71, 0.12), 0 4px 12px rgba(155, 38, 70, 0.06);
  --radius: 22px;
  --radius-sm: 14px;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(155, 38, 70, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 60% 45% at 90% 15%, rgba(184, 132, 48, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 10% 85%, rgba(155, 38, 70, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle sacred lattice & ambient glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(184, 132, 48, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0.55), transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0.55), transparent 80%);
}

.bg-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: grid;
  place-items: center;
  opacity: 0.055;
}

.watermark-logo {
  max-width: 520px;
  width: 78vw;
  object-fit: contain;
  filter: saturate(0.75) sepia(0.15);
}

h1, h2, h3, .hero-number {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 12px max(18px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(232, 218, 208, 0.9);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

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

.logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft), 0 4px 12px rgba(184, 132, 48, 0.2);
  background: #fff;
}

.cross-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--navy));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.brand h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
}

.subtitle {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--rose);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-select {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-select:hover,
.lang-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 132, 48, 0.14);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c89d4c;
  transition: background 0.3s ease;
}

.live-dot.connected {
  background: #2b9e61;
  box-shadow: 0 0 0 4px rgba(43, 158, 97, 0.18);
  animation: pulseLive 2.4s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { box-shadow: 0 0 0 3px rgba(43, 158, 97, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(43, 158, 97, 0.06); }
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--navy);
  padding: 8px 15px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--navy);
  background: #f8f4f0;
}

/* Success Banner */
.success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  border: 1px solid #b5e2ca;
  color: var(--success-text);
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(26, 99, 62, 0.12);
  animation: fadeUp 0.28s ease;
}

.success-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--success-text);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* Cards */
.card {
  position: relative;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 218, 208, 0.95);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

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

/* Login View */
.login-layout {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 26px;
  align-items: stretch;
  animation: fadeUp 0.4s ease;
}

.mary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(212, 163, 76, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(252, 241, 242, 0.94) 100%);
  overflow: hidden;
}

.mary-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius) - 8px);
  border: 1px solid rgba(184, 132, 48, 0.22);
  pointer-events: none;
}

.mary-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.85),
    0 0 0 6px rgba(184, 132, 48, 0.35),
    0 18px 38px rgba(155, 38, 70, 0.18);
  background: #f8eff0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mary-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.mary-card:hover .mary-frame img {
  transform: scale(1.02);
}

.mary-placeholder {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--navy);
}

.mary-halo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 12px;
}

.mary-placeholder-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.mary-placeholder-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.mary-caption {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 340px;
}

.rose-tag {
  background: linear-gradient(135deg, var(--rose-soft), #f7dde3);
  color: var(--rose-deep);
  border: 1px solid rgba(155, 38, 70, 0.18);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 4px solid var(--rose);
}

.login-card h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.15;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid rgba(184, 132, 48, 0.45);
}

.login-desc {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.96rem;
}

.login-form {
  display: grid;
  gap: 16px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin-bottom: 6px;
}

.field input,
.field select,
.custom-add-row input,
.admin-table-actions input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: #fdfaf7;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.custom-add-row input:focus,
.admin-table-actions input:focus {
  outline: none;
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(155, 38, 70, 0.1);
}

.error-text {
  margin: 0;
  color: #b03a2e;
  font-size: 0.85rem;
  min-height: 18px;
}

.full-width {
  width: 100%;
}

/* Counter View */
.main-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 14px;
  align-items: start;
  animation: fadeUp 0.35s ease;
}

.user-bar {
  grid-column: 1 / -1;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 999px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-badge {
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-badge::before {
  content: "🌹";
  font-size: 0.95rem;
}

.hero-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 14px 22px 12px;
  border-top: 4px solid var(--gold);
  background:
    radial-gradient(circle at 50% 45%, rgba(212, 163, 76, 0.14) 0%, rgba(155, 38, 70, 0.04) 40%, transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 245, 238, 0.96) 100%);
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius) - 8px);
  border: 1px solid rgba(184, 132, 48, 0.2);
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--rose-soft);
  border: 1px solid rgba(155, 38, 70, 0.22);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rose-deep);
}

.hero-number {
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.02;
  margin: 4px 0 4px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 18px rgba(25, 43, 71, 0.08);
}

.crore-sub {
  margin: 0;
  font-weight: 700;
  color: #8a5d14;
  font-size: 1.04rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.crore-sub::before,
.crore-sub::after {
  content: "✦";
  font-size: 0.75rem;
  opacity: 0.7;
}

.action-card {
  border: 2px solid rgba(155, 38, 70, 0.34);
  border-top: 5px solid var(--rose);
  background: linear-gradient(180deg, #ffffff 0%, #fff7f9 100%);
  box-shadow: 0 16px 36px rgba(155, 38, 70, 0.14), 0 4px 12px rgba(25, 43, 71, 0.06);
  padding: 20px 22px;
}

.feed-card {
  border-top: 3px solid var(--navy);
  padding: 18px 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.card h2.highlight-heading {
  font-size: 1.7rem;
  color: var(--navy);
  padding-bottom: 4px;
  border-bottom: 2px solid rgba(184, 132, 48, 0.48);
}

.goal-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fdf3de 0%, #f7e4bc 100%);
  border: 1px solid rgba(184, 132, 48, 0.45);
  color: #694810;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quick-offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-offer-grid .quick-offer-btn {
  min-height: 50px;
  padding: 12px 10px;
  font-size: 0.94rem;
  line-height: 1.25;
  text-align: center;
}

.btn-primary,
.btn-secondary,
.btn-chip {
  border: none;
  border-radius: 13px;
  padding: 16px 22px;
  min-height: 50px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease, filter 0.2s ease;
}

.btn-primary:active,
.btn-secondary:active,
.btn-chip:active {
  transform: translateY(1px) scale(0.995);
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose) 0%, var(--navy) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(155, 38, 70, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(155, 38, 70, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-secondary {
  background: var(--rose-soft);
  color: var(--rose-deep);
  border: 1px solid #ecc6cf;
}

.btn-secondary:hover {
  background: #f6dfe4;
}

.btn-chip {
  background: linear-gradient(180deg, #fdf5e7 0%, var(--gold-soft) 100%);
  color: #6e4e16;
  padding: 12px 18px;
  font-size: 0.9rem;
  white-space: nowrap;
  border: 1px solid #e6cf9f;
}

.btn-chip:hover {
  background: #f4e4c5;
  border-color: var(--gold);
}

.custom-add-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-strong);
  align-items: center;
}

.custom-deposit-box {
  margin-top: 18px;
  padding: 14px;
  border-top: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf2 0%, #fbf0de 100%);
  border: 1.5px solid rgba(184, 132, 48, 0.42);
  box-shadow: 0 6px 18px rgba(184, 132, 48, 0.08);
}

.custom-deposit-box input {
  background: #fff;
  border-color: rgba(184, 132, 48, 0.45);
  font-weight: 700;
  text-align: center;
  max-width: 110px;
}

.deposit-btn {
  flex: 1;
  min-height: 52px;
  padding: 14px 20px;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.custom-add-row input {
  flex: 1;
  min-width: 0;
}

/* Recent Offerings Feed */
.offerings-list {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  display: grid;
  gap: 8px;
  max-height: 185px;
  overflow-y: auto;
}

.offerings-list::-webkit-scrollbar {
  width: 6px;
}

.offerings-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.offering-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.offering-item:hover {
  border-color: #d8bfb2;
  box-shadow: 0 4px 12px rgba(25, 43, 71, 0.05);
}

.empty-feed {
  padding: 20px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
}

.offering-time {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.text-btn {
  border: none;
  background: transparent;
  color: var(--rose);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.text-btn:hover {
  background: var(--rose-soft);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(17, 30, 51, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 28px 70px rgba(17, 30, 51, 0.28);
  animation: modalPop 0.22s ease;
}

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

.modal-compact {
  max-width: 440px;
  text-align: center;
  padding: 34px 28px 28px;
  border-top: 4px solid var(--gold);
}

.modal-compact h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.6rem;
}

.popup-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-size: 1.75rem;
}

.confirm-icon {
  background: var(--rose-soft);
  border: 2px solid #ecc6cf;
  box-shadow: 0 0 0 5px rgba(251, 237, 240, 0.7);
}

.success-popup-icon {
  background: var(--success-bg);
  color: var(--success-text);
  border: 2px solid #b5e2ca;
  box-shadow: 0 0 0 5px rgba(231, 246, 238, 0.7);
  font-weight: 700;
}

.popup-message {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.5;
}

.popup-sub {
  margin: 0 0 22px;
  font-size: 0.88rem;
  color: var(--muted);
}

.popup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.popup-actions .btn-ghost {
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
}

/* Admin Panel */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.admin-stat {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-stat strong {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--navy);
  line-height: 1.1;
}

.admin-base-box {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: #fdf9f3;
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.admin-base-box h3,
.admin-table-header h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: var(--navy);
}

.admin-base-box .custom-add-row input {
  max-width: 240px;
}

.feedback-msg {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--success-text);
  font-weight: 600;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-table-actions input {
  max-width: 220px;
  padding: 9px 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.admin-page-btns {
  display: flex;
  gap: 8px;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg);
  color: var(--navy);
  font-weight: 700;
}

.admin-table tbody tr:hover {
  background: rgba(251, 246, 240, 0.65);
}

@media (max-width: 820px) {
  .page-shell {
    padding: 14px 12px 44px;
  }

  .top-bar {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 14px;
    gap: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo,
  .cross-mark {
    width: 38px;
    height: 38px;
  }

  .brand h1 {
    font-size: 1.3rem;
  }

  .subtitle {
    font-size: 0.75rem;
  }

  .user-bar {
    border-radius: var(--radius-sm);
  }

  .login-layout,
  .main-grid,
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile login: show login card immediately with Mother Mary as the background */
  .login-layout {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    padding: 16px 14px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(184, 132, 48, 0.35);
  }

  .mary-card {
    position: absolute;
    inset: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 0;
  }

  .mary-card::after,
  .mary-caption {
    display: none;
  }

  .mary-frame {
    max-width: none;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .mary-frame img {
    object-position: center 20%;
  }

  .login-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 252, 248, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-top: 4px solid var(--rose);
  }

  .card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Discreet Footer & Admin Auth Layout */
.site-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(216, 194, 179, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.78;
}

.footer-admin-link {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.65;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-admin-link:hover {
  opacity: 1;
  color: var(--navy);
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-auth-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

.admin-auth-fields input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  color: var(--text);
  background: #fdfaf7;
}

.admin-auth-fields input:focus {
  outline: none;
  border-color: var(--rose);
  background: #fff;
}

[data-text-size="large"] {
  font-size: 118.75%;
}

.text-size-btn {
  min-width: 40px;
  font-weight: 700;
}

.text-size-btn[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.btn-mini {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--navy);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-mini:hover {
  border-color: var(--navy);
}

.btn-mini.danger {
  color: #a62b21;
  border-color: #e4b5b0;
  background: #fdf2f1;
}

.btn-mini.save {
  color: #1a633e;
  border-color: #b5e2ca;
  background: #e7f6ee;
}

.admin-inline-input {
  width: 82px;
  padding: 5px 8px;
  border: 1px solid var(--rose);
  border-radius: 8px;
  font-size: 0.88rem;
}

/* Consent Checkbox & Privacy Modal */
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
  margin-top: 2px;
}

.consent-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--rose);
  cursor: pointer;
}

.text-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--rose);
  text-decoration: underline;
  cursor: pointer;
}

.text-link-btn:hover {
  color: var(--rose-deep);
}

.privacy-modal-card {
  max-width: 560px;
}

.privacy-body {
  display: grid;
  gap: 12px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text);
  margin: 8px 0 20px;
}

.privacy-body p {
  margin: 0;
}

.adm-sort-select {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.admin-offerings-header {
  margin-top: 24px;
}

.install-app-btn {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rose-deep);
  border-color: rgba(155, 38, 70, 0.3);
  background: var(--rose-soft);
}

.adm-confirm-bar {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8ea;
  border: 1px solid #e6cf9f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

/* Home Page Ministry & 5 Intentions */
.ministry-home-card {
  grid-column: 1 / -1;
  border-top: 4px solid var(--gold);
  padding: 24px 26px;
}

.ministry-header h2 {
  margin: 10px 0 8px;
  font-size: 1.7rem;
  color: var(--navy);
}

.ministry-lead {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.6;
}

.intentions-heading {
  margin: 20px 0 12px;
  font-size: 1.25rem;
  color: var(--rose-deep);
}

.intentions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.intention-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #fdfaf6;
  border: 1px solid var(--border);
}

.intention-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.intention-item strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.intention-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.ministry-footer-note {
  margin: 16px 0 0;
  font-size: 0.86rem;
  text-align: center;
}

.community-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #694810;
  border: 1px solid rgba(184, 132, 48, 0.35);
}

.adm-community-form {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.adm-community-form input {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  min-width: 0;
}

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

@media (max-width: 640px) {
  .top-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .lang-select {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    padding: 9px 12px;
  }

  .text-size-btn,
  .live-pill {
    min-height: 40px;
  }

  .user-bar {
    padding: 12px 14px;
  }

  .text-btn {
    white-space: nowrap;
    min-height: 38px;
  }

  .hero-card {
    padding: 12px 14px 10px;
  }

  .action-card,
  .feed-card {
    padding: 14px;
  }

  .offerings-list {
    max-height: 120px;
  }

  .card h2.highlight-heading {
    font-size: 1.45rem;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    padding: 22px 16px;
    max-height: 92vh;
    max-height: 92dvh;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-auth-fields {
    grid-template-columns: 1fr;
  }

  .admin-auth-fields input,
  .admin-base-box .custom-add-row input,
  .admin-table-actions input {
    font-size: 16px;
  }

  .admin-base-box .custom-add-row,
  .admin-table-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .admin-base-box .custom-add-row input,
  .admin-table-actions input {
    max-width: none;
    flex: 1 1 160px;
  }
}

@media (max-width: 480px) {
  .quick-offer-grid {
    gap: 8px;
  }

  .quick-offer-grid .quick-offer-btn {
    min-height: 48px;
    padding: 10px 6px;
    font-size: 0.86rem;
  }

  .custom-deposit-box {
    padding: 12px;
    gap: 8px;
  }

  .custom-deposit-box input {
    max-width: 92px;
    font-size: 16px;
    padding: 12px 8px;
  }

  .deposit-btn {
    padding: 13px 14px;
    font-size: 0.96rem;
  }

  .offering-item {
    padding: 11px 12px;
    align-items: flex-start;
  }

  .popup-actions {
    flex-direction: column-reverse;
  }

  .popup-actions button {
    width: 100%;
  }
}
