/* =====================================================================
   hepa — "Future Light" layer (v27.2). Loaded after polish.css.
   Styling + one optional helper (Listen). No layout, form or flow depends on it:
   delete this file and future.js to get the previous look back exactly.
   Goals: futuristic (glass, light, glow, motion) yet calm and very easy to read —
   bigger text and touch targets, strong contrast, clear "what to tap" cues.
   ===================================================================== */
:root {
  --f-ink: #160E2B;
  --f-glass: rgba(255,255,255,.72);
  --f-glass-2: rgba(255,255,255,.86);
  --f-edge: rgba(124,84,201,.22);
  --f-neon: #7C54FF;
  --f-neon-2: #2FD3FF;
  --f-gold: #F2C14E;
  --f-grad: linear-gradient(120deg, #7C54FF 0%, #5B2FC9 40%, #3A1680 100%);
  --f-grad-edge: linear-gradient(135deg, rgba(124,84,255,.55), rgba(47,211,255,.35) 45%, rgba(242,193,78,.45));
  --f-glow: 0 0 0 1px rgba(124,84,255,.10), 0 18px 50px -22px rgba(91,47,201,.55);
  --f-glow-strong: 0 0 0 1px rgba(124,84,255,.18), 0 24px 60px -20px rgba(91,47,201,.7), 0 0 30px -8px rgba(47,211,255,.35);
  --f-radius: 22px;
}

/* ---------- canvas: slow-moving aurora + faint tech grid */
body, .app-body { position: relative; color: var(--f-ink); font-size: 16.5px; }
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 15% 10%, rgba(124,84,255,.20), transparent 60%),
    radial-gradient(36vmax 28vmax at 85% 8%, rgba(47,211,255,.14), transparent 60%),
    radial-gradient(40vmax 30vmax at 70% 95%, rgba(242,193,78,.16), transparent 60%),
    radial-gradient(30vmax 24vmax at 10% 90%, rgba(91,47,201,.12), transparent 60%);
  animation: f-aurora 28s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(91,47,201,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(91,47,201,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
@keyframes f-aurora { 0% { transform: translate3d(0,0,0) rotate(0deg); } 50% { transform: translate3d(3vmax,-2vmax,0) rotate(8deg); } 100% { transform: translate3d(-3vmax,2vmax,0) rotate(-6deg); } }

/* ---------- type: larger, clearer */
h1 { letter-spacing: -.02em; }
h1, .hello h1 { background: linear-gradient(110deg, #160E2B 10%, #4B2785 55%, #7C54FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel-royal h1, .hero h1, .mh-hero h1, .church-hero h1, .site-footer h1 { background: none; color: inherit; }
p, li, td, .help, .small { line-height: 1.6; }
.small { font-size: .9rem; }
.muted { color: #5E5674; }

/* ---------- glass cards with a light gradient edge */
.card, .kpi-tile, .tile, .org-tile, .church-card, .mk-card, .media-card, .plan, .plan-mini, .gs-item, .approve-card, .stat, .bento > * {
  position: relative; background: var(--f-glass-2);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--f-radius); box-shadow: var(--f-glow);
  transition: transform .35s var(--spring, cubic-bezier(.34,1.56,.64,1)), box-shadow .35s ease, border-color .35s ease;
}
.card::before, .kpi-tile::before, .org-tile::before, .church-card::before, .mk-card::before, .plan-mini::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--f-grad-edge); opacity: .55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .35s ease;
}
a.card:hover, .card-link:hover, .kpi-tile:hover, .org-tile:hover, .church-card:hover, .mk-card:hover, .tile:hover, .plan-mini:hover, .media-card:hover {
  transform: translateY(-4px); box-shadow: var(--f-glow-strong);
}
a.card:hover::before, .kpi-tile:hover::before, .org-tile:hover::before, .church-card:hover::before, .mk-card:hover::before, .plan-mini:hover::before { opacity: 1; }

/* royal panels: deep space with a moving light streak */
.panel-royal, .hero.royal, .mh-hero {
  background: radial-gradient(120% 140% at 0% 0%, #6A40D9 0%, #3A1680 45%, #1A0B3D 100%) !important;
  position: relative; overflow: hidden; box-shadow: var(--f-glow-strong);
}
.panel-royal::after, .mh-hero::after {
  content: ""; position: absolute; top: -40%; left: -30%; width: 40%; height: 180%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); transform: skewX(-18deg);
  animation: f-sweep 7s ease-in-out infinite;
}
@keyframes f-sweep { 0%, 60% { left: -40%; } 100% { left: 130%; } }

/* ---------- buttons: big, bright, unmistakable */
.btn { min-height: 48px; padding-inline: 22px; font-size: 1rem; border-radius: 999px; position: relative; overflow: hidden; letter-spacing: .01em; }
.btn-sm { min-height: 40px; padding-inline: 16px; font-size: .93rem; }
.btn-lg { min-height: 58px; font-size: 1.08rem; }
.btn-primary { background: var(--f-grad) !important; color: #fff !important; border: 0 !important; box-shadow: 0 12px 28px -12px rgba(91,47,201,.75), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-gold { background: linear-gradient(120deg, #FFE39A 0%, #F2C14E 45%, #D99A1F 100%) !important; color: #2A1650 !important; border: 0 !important;
  box-shadow: 0 12px 28px -12px rgba(217,154,31,.8), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-primary::after, .btn-gold::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s ease;
}
.btn-primary:hover::after, .btn-gold:hover::after { left: 130%; }
.btn-primary:hover, .btn-gold:hover { transform: translateY(-2px); filter: saturate(1.1); }
.btn-ghost { background: rgba(255,255,255,.75) !important; border: 1.5px solid rgba(124,84,255,.28) !important; color: #4B2785 !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(124,84,255,.6) !important; box-shadow: 0 0 0 4px rgba(124,84,255,.10); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--f-neon-2); outline-offset: 3px; }

/* ---------- form fields: large, glassy, neon focus */
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search],
input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  min-height: 52px; font-size: 1.02rem; border-radius: 16px !important; background: rgba(255,255,255,.9) !important;
  border: 1.5px solid #DCD1EE !important; transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
}
textarea { min-height: 110px; }
.input:hover, input:hover, select:hover, textarea:hover { border-color: #BCA8E8 !important; }
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--f-neon) !important; background: #fff !important;
  box-shadow: 0 0 0 4px rgba(124,84,255,.16), 0 8px 24px -14px rgba(91,47,201,.6) !important;
}
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: #5B2FC9; }
input[type=file] { min-height: 52px; padding: 10px; border-style: dashed !important; cursor: pointer; }
label { font-weight: 700; }
.form-field label, .form-field > span:first-child { font-size: .98rem; }

/* ---------- navigation */
.site-header { background: rgba(255,255,255,.7) !important; -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(124,84,255,.12); }
.sidebar { background: linear-gradient(180deg, #1C0C42 0%, #2A1263 55%, #1A0B3D 100%) !important; border-right: 1px solid rgba(124,84,255,.25); }
.sb-link { min-height: 46px; border-radius: 14px; font-size: .98rem; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.sb-link .ico { width: 22px; height: 22px; }
.sb-link:hover { transform: translateX(3px); }
.sb-link.on { background: linear-gradient(90deg, rgba(124,84,255,.45), rgba(47,211,255,.12)) !important; box-shadow: inset 3px 0 0 var(--f-neon-2), 0 8px 20px -12px rgba(124,84,255,.9); color: #fff !important; }
.sb-link em { box-shadow: 0 0 12px rgba(242,193,78,.7); }
.topbar { background: rgba(255,255,255,.7) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(124,84,255,.12); }
.btabs { background: rgba(255,255,255,.85) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid rgba(124,84,255,.15); }
.btabs a { min-height: 56px; }
.btabs a.on, .btabs a[aria-current] { color: #5B2FC9 !important; }
.btabs a.on .ico, .btabs a[aria-current] .ico { filter: drop-shadow(0 0 8px rgba(124,84,255,.7)); }

/* ---------- chips, badges, tables, alerts */
.chip, .choice, .method, .date-chip { min-height: 46px; border-radius: 16px; transition: all .2s ease; }
.chip.on, .chip[aria-pressed=true], .choice.on, .choice:has(input:checked), .method:has(input:checked) {
  border-color: var(--f-neon) !important; box-shadow: 0 0 0 4px rgba(124,84,255,.14), 0 10px 24px -16px rgba(91,47,201,.9); background: #F6F1FF !important;
}
.badge { border-radius: 999px; padding: 4px 11px; font-weight: 800; letter-spacing: .01em; }
.badge.success { box-shadow: 0 0 14px -4px rgba(35,122,82,.6); }
.badge.warn, .badge.gold { box-shadow: 0 0 14px -4px rgba(217,154,31,.7); }
.alert { border-radius: 18px; border: 1px solid rgba(124,84,255,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 1rem; padding: 14px 18px; }
table { border-collapse: separate; border-spacing: 0; }
.table-wrap { border-radius: 18px; overflow: auto; background: rgba(255,255,255,.85); box-shadow: var(--f-glow); }
th { background: linear-gradient(180deg, #F7F3FF, #EFE8FD); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: #4B2785; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(124,84,255,.05); }
.kpi-num, .money { font-variant-numeric: tabular-nums; }
.kpi-num { background: linear-gradient(110deg, #2A1650, #7C54FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi-ico, .feature-ico { box-shadow: 0 10px 24px -12px rgba(124,84,255,.8); }
.progress, .meter { background: rgba(124,84,255,.12); }
.progress > *, .meter i { background: linear-gradient(90deg, #7C54FF, #2FD3FF, #F2C14E) !important; box-shadow: 0 0 12px rgba(47,211,255,.6); }
.empty { border-radius: 22px; border: 2px dashed rgba(124,84,255,.25); background: rgba(255,255,255,.6); }

/* ---------- money / giving pages: very clear */
.acct-card, .acct { border-radius: 22px; }
.acct-num, .acct-number { font-size: 1.6rem !important; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

/* ---------- motion for things appearing */
@keyframes f-rise { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.f-in { animation: f-rise .6s cubic-bezier(.22,.8,.24,1) both; }

/* ---------- Listen helper (reads the page out loud for people who find reading hard) */
.f-listen {
  position: fixed; z-index: 60; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; cursor: pointer; color: #fff; font: 800 1rem/1 inherit;
  background: var(--f-grad); box-shadow: 0 14px 34px -12px rgba(91,47,201,.9), 0 0 0 1px rgba(255,255,255,.2) inset;
  animation: f-rise .6s .6s both;
}
.f-listen svg { width: 22px; height: 22px; }
.f-listen.on { background: linear-gradient(120deg, #2FD3FF, #7C54FF); }
.f-listen.on::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 2px solid rgba(47,211,255,.6); animation: f-ping 1.4s ease-out infinite; }
@keyframes f-ping { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.18); opacity: 0; } }
.app-body .f-listen { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .app-body .f-listen { bottom: 20px; } }
.f-speaking { outline: 3px solid var(--f-neon-2) !important; outline-offset: 4px; border-radius: 10px; transition: outline-color .2s; }
.f-tip { position: fixed; z-index: 61; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: 260px; padding: 12px 14px; border-radius: 16px;
  background: #1C0C42; color: #fff; font-size: .92rem; box-shadow: var(--f-glow-strong); animation: f-rise .4s both; }
.app-body .f-tip { bottom: calc(148px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .app-body .f-tip { bottom: 84px; } }

/* ---------- small screens: thumb-friendly */
@media (max-width: 640px) {
  body, .app-body { font-size: 17px; }
  .btn { min-height: 52px; }
  .btn-sm { min-height: 44px; }
  .card { border-radius: 20px; }
  .f-listen span { display: none; } .f-listen { padding: 0; width: 52px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  body::before, .panel-royal::after, .mh-hero::after, .f-listen.on::before { animation: none !important; }
  .f-in, .f-listen, .f-tip { animation: none !important; }
}
@media print { body::before, body::after, .f-listen, .f-tip { display: none !important; } }
input.ok { border-color: #237A52 !important; background: #F1FBF5 !important; box-shadow: 0 0 0 4px rgba(35,122,82,.12) !important; }
/* church page inside the dashboard */
.church-page .church-hero { height: 220px; border-radius: 26px; box-shadow: var(--f-glow-strong); }
.church-page .church-head { margin-top: -56px; padding-inline: 18px; }
.church-page .church-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.12; text-shadow: 0 2px 18px rgba(255,255,255,.65); }
.church-page .section, .church-page > .section { padding-top: 18px; }
.church-page .container { max-width: none; padding-inline: 0; }
.give-cta { white-space: normal; text-align: center; line-height: 1.25; height: auto; padding-block: 12px; gap: 10px; display: inline-flex; align-items: center; justify-content: center; }
.give-cta span { overflow-wrap: anywhere; }
@media (max-width: 640px) { .church-page .church-hero { height: 150px; border-radius: 20px; } .church-page .church-head { margin-top: -40px; padding-inline: 8px; } }
.church-page .church-head h1 { background: none; color: var(--f-ink); text-shadow: none; }
.church-page .church-head .row > div:not(:first-child) { padding-top: 60px; }
@media (max-width: 640px) { .church-page .church-head .row > div:not(:first-child) { padding-top: 6px; flex-basis: 100%; } }
@media (max-width: 640px) {
  .church-page .church-head .row { flex-wrap: wrap !important; }
  .church-page .church-head .row > div:not(:first-child) { flex: 1 1 100% !important; min-width: 0 !important; padding-top: 4px; }
  .church-page .church-head h1 { font-size: 1.6rem; }
}
