/* BridgeIt v1 — shared styles. Warm cream + teal (#0b6e6a / #0e918c / #2dd4bf), mobile-first. */
:root {
  --teal-dark: #0b6e6a;
  --teal: #0e918c;
  --teal-light: #2dd4bf;
  --mint: #a7f3d0;
  --cream: #fffdf7;
  --cream-2: #faf5ea;
  --ink: #3a2c1e;
  --ink-soft: #5a4a35;
  --muted: #9a8668;
  --line: #f0e4cf;
  --green: #1e7b34;
  --green-bg: #e3f3e6;
  --radius: 20px;
  --shadow: 0 8px 22px rgba(10, 90, 88, .09);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  background: linear-gradient(180deg, #f6efe0, #f1e7d2);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--teal-dark); }
.app { max-width: 480px; margin: 0 auto; background: var(--cream); min-height: 100vh;
       box-shadow: 0 0 40px rgba(10, 90, 88, .10); position: relative; padding-bottom: 92px; }

/* header */
.appbar { position: sticky; top: 0; z-index: 10; padding: 14px 16px 10px;
          background: rgba(255, 253, 247, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 40deg, var(--teal-light), var(--teal-dark), var(--mint), var(--teal-light));
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: 0 3px 10px rgba(13, 122, 118, .4); }
.appbar .tag { font-size: 11px; color: var(--muted); margin-top: 3px; }
.page { padding: 14px 14px 8px; }

/* hero */
.hero { position: relative; border-radius: 22px; padding: 22px 16px 18px; color: #fff; margin-bottom: 12px; overflow: hidden;
        background: linear-gradient(130deg, #074e4b, var(--teal) 45%, var(--teal-light));
        background-size: 220% 220%; animation: heroFlow 10s ease infinite;
        box-shadow: 0 14px 30px rgba(13, 122, 118, .4); }
@keyframes heroFlow { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }
.orb { position: absolute; border-radius: 50%; filter: blur(30px); opacity: .55; animation: drift 12s ease-in-out infinite; pointer-events: none; }
.o1 { width: 140px; height: 140px; background: #b8f0d8; top: -45px; right: -35px; }
.o2 { width: 110px; height: 110px; background: #5eead4; bottom: -40px; left: -30px; animation-delay: -6s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-18px, 14px) scale(1.15); } }
.hero h1, .hero h2 { position: relative; z-index: 2; font-size: 21px; line-height: 1.32; margin-bottom: 6px; letter-spacing: -.3px; }
.hero h1 em, .hero h2 em { font-style: normal; border-bottom: 3px solid rgba(255, 255, 255, .55); }
.hero p { position: relative; z-index: 2; font-size: 12.5px; opacity: .94; margin-bottom: 14px; }
.hero .cta-row { position: relative; z-index: 2; display: flex; gap: 8px; }
.btn-white { flex: 1.4; background: #fff; color: var(--teal-dark); border: none; font-weight: 800; font-size: 13px;
             padding: 12px; border-radius: 26px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); cursor: pointer; text-decoration: none; text-align: center; }
.btn-ghost { flex: 1; background: rgba(255, 255, 255, .18); color: #fff; border: 1.5px solid rgba(255, 255, 255, .6);
             font-weight: 700; font-size: 12.5px; padding: 12px; border-radius: 26px; cursor: pointer; text-decoration: none; text-align: center; }

/* stats */
.stats { display: flex; gap: 8px; margin-bottom: 12px; }
.stat { flex: 1; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 16px;
        padding: 10px 6px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 15px; color: var(--teal-dark); font-variant-numeric: tabular-nums; }
.stat span { font-size: 9.5px; color: var(--muted); font-weight: 600; }

/* kindness ticker */
.ticker { overflow: hidden; white-space: nowrap; background: linear-gradient(90deg, #f2fbf7, #e6f7ef);
          border: 1px solid #cdeadb; border-radius: 14px; padding: 9px 0; margin-bottom: 12px; }
.ticker .track { display: inline-block; animation: tick 26s linear infinite; font-size: 12px; color: #3d6b5a; padding-left: 100%; }
.ticker b { color: var(--teal-dark); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 2px 10px; }
.section-head h3 { font-size: 14px; font-weight: 800; }

/* case cards */
.case-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-bottom: 14px;
             box-shadow: var(--shadow); display: block; text-decoration: none; color: inherit; }
.case-photo { height: 120px; display: flex; align-items: center; justify-content: center; font-size: 46px;
              position: relative; overflow: hidden;
              background: linear-gradient(135deg, var(--teal), #075e5a); }
.case-photo::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 18%, rgba(255, 255, 255, .35), transparent 55%); }
.case-photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.case-photo .emoji { position: relative; z-index: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3)); }
.live-dot { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(10, 40, 38, .6); color: #fff;
            font-size: 9.5px; font-weight: 800; padding: 4px 9px; border-radius: 12px;
            display: flex; align-items: center; gap: 5px; }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.sample-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: rgba(10, 40, 38, .6); color: #ffe9a8;
                font-size: 9.5px; font-weight: 800; padding: 4px 9px; border-radius: 12px; }
.case-info { padding: 12px 14px 14px; }
.case-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 2px; }
.case-top h3 { font-size: 14.5px; }
.need { font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.verified { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(90deg, var(--green-bg), #d4edd9);
            color: var(--green); font-size: 10.5px; font-weight: 800; padding: 4px 10px; border-radius: 14px;
            margin-bottom: 10px; box-shadow: inset 0 0 0 1px #bfe3c6; }

/* progress ring */
.ring { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
             font-size: 10px; font-weight: 800; color: var(--teal-dark); }

/* glowing donate button */
.donate-btn { background: linear-gradient(135deg, var(--teal-dark), var(--teal-light)); color: #fff; border: none;
              font-weight: 800; font-size: 14px; padding: 13px; border-radius: 15px; width: 100%;
              box-shadow: 0 8px 20px rgba(13, 122, 118, .38); animation: glow 3.2s ease-in-out infinite;
              position: relative; overflow: hidden; cursor: pointer; text-decoration: none; display: block; text-align: center; }
.donate-btn::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  animation: btnSheen 3.2s ease-in-out infinite; }
@keyframes btnSheen { 0%, 60% { left: -80%; } 100% { left: 130%; } }
@keyframes glow { 0%, 100% { box-shadow: 0 8px 20px rgba(13, 122, 118, .38); }
                  50% { box-shadow: 0 8px 28px rgba(45, 212, 191, .6); } }

/* tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
          display: flex; border-top: 1px solid var(--line); background: rgba(255, 253, 247, .97);
          padding: 10px 6px calc(10px + env(safe-area-inset-bottom)); z-index: 20; }
.tabbar a { flex: 1; text-align: center; font-size: 10px; color: var(--muted); text-decoration: none; }
.tabbar a.active { color: var(--teal-dark); font-weight: 800; }
.tabbar .ico { font-size: 20px; display: block; margin-bottom: 2px; }

/* forms */
.form-card h2 { font-size: 19px; margin-bottom: 4px; letter-spacing: -.3px; }
.form-card .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.55; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: var(--ink-soft); }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid #e8d9bd; border-radius: 14px;
  padding: 11px 12px; font-size: 14px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .18); }
.field textarea { resize: vertical; min-height: 70px; }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.upload { border: 2px dashed #bcd9d4; border-radius: 14px; padding: 16px; text-align: center; font-size: 12.5px;
          color: var(--muted); background: linear-gradient(180deg, #fffdf7, #f2faf7); cursor: pointer; }
.upload input[type=file] { display: none; }
.upload .file-name { color: var(--teal-dark); font-weight: 700; margin-top: 6px; display: block; }
.reassure { background: linear-gradient(90deg, #e9f5ec, #ddf0e2); border-radius: 14px; padding: 11px 13px;
            font-size: 11.5px; color: #2e6b3e; line-height: 1.55; margin: 12px 0; box-shadow: inset 0 0 0 1px #c4e5cc; }
.form-error { background: #fdecec; color: #a33; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 12px; display: none; }
.form-ok { background: var(--green-bg); color: var(--green); border-radius: 12px; padding: 12px; font-size: 13px; margin-bottom: 12px; display: none; line-height: 1.5; }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps div { flex: 1; text-align: center; font-size: 9.5px; color: var(--muted); background: #fff;
             border: 1px solid var(--line); border-radius: 12px; padding: 8px 3px; line-height: 1.4; }
.steps b { display: block; font-size: 14px; margin-bottom: 2px; }

/* case detail */
.detail-photo { height: 180px; border-radius: 22px; background: linear-gradient(135deg, var(--teal), #075e5a);
                display: flex; align-items: center; justify-content: center; font-size: 64px; margin-bottom: 12px;
                position: relative; overflow: hidden; box-shadow: 0 10px 24px rgba(10, 90, 88, .2); }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-photo .verified { position: absolute; bottom: 10px; left: 10px; margin: 0; background: rgba(255, 255, 255, .96); z-index: 2; }
.detail h2 { font-size: 19px; margin-bottom: 3px; letter-spacing: -.3px; }
.detail .meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ring-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ring-lg { position: relative; width: 66px; height: 66px; flex-shrink: 0; }
.ring-lg svg { transform: rotate(-90deg); display: block; }
.ring-lg .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
                font-size: 13px; font-weight: 800; color: var(--teal-dark); }
.ring-figs { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.ring-figs b { color: var(--teal-dark); font-size: 16px; }
.story-card { background: linear-gradient(180deg, #fffdf7, #f2faf7); border: 1px solid var(--line);
              border-radius: 18px; padding: 13px 14px; margin-bottom: 12px; }
.story-card .story { font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.qr-box { border: 2px dashed #bcd9d4; border-radius: 18px; padding: 16px; text-align: center; margin-bottom: 12px; background: #fff; }
.qr-box img { width: 150px; height: 150px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); }
.qr-box .upi { font-size: 12px; color: var(--muted); margin-top: 8px; }
.qr-box .upi b { color: var(--ink); font-size: 14px; }
.copy-btn { margin-top: 8px; background: #eef7f5; border: 1px solid #bcd9d4; color: var(--teal-dark);
            font-weight: 700; font-size: 12px; padding: 8px 14px; border-radius: 20px; cursor: pointer; }
.share-row { display: flex; gap: 8px; margin-bottom: 12px; }
.share-row button, .share-row a { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 11px 6px; font-size: 12px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
  cursor: pointer; text-decoration: none; text-align: center; }
.amt-row { display: flex; gap: 8px; margin-bottom: 12px; }
.amt-row input { flex: 1; border: 1.5px solid #e8d9bd; border-radius: 14px; padding: 12px; font-size: 15px; }
.amt-row input:focus { outline: none; border-color: var(--teal-light); }
.donor-wall h4 { font-size: 13px; margin-bottom: 8px; }
.donor { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f3e9d4; font-size: 12px; }
.donor:first-of-type { border-top: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
          color: #fff; font-size: 14px; font-weight: 800; flex-shrink: 0;
          background: linear-gradient(135deg, var(--teal), var(--teal-dark)); }
.donor .amt { margin-left: auto; font-weight: 800; color: var(--teal-dark); white-space: nowrap; }
.donor small { display: block; color: var(--muted); font-size: 10.5px; }
.log-note { font-size: 10.5px; color: var(--muted); margin-top: 10px; line-height: 1.55;
            background: #faf6ee; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sticky-donate { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
                padding: 10px 14px calc(76px + env(safe-area-inset-bottom));
                background: linear-gradient(180deg, transparent, var(--cream) 45%); z-index: 15; }
.log-form { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin: 12px 0; display: none; }
.log-form.open { display: block; }

/* post-UPI confirmation nudge — slides up above the sticky donate bar */
.nudge { position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%) translateY(20px); width: calc(100% - 28px); max-width: 452px;
  background: #0b3b39; color: #fff; border-radius: 16px; padding: 14px 14px 12px; z-index: 40;
  box-shadow: 0 12px 30px rgba(6, 40, 38, .35); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.nudge.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nudge b.t { font-size: 14px; display: block; margin-bottom: 4px; }
.nudge p { font-size: 12px; color: #cdeee9; line-height: 1.45; margin-bottom: 10px; }
.nudge .row { display: flex; gap: 8px; }
.nudge .yes { flex: 1; background: var(--mint); color: #0b3b39; border: none; border-radius: 10px; padding: 9px; font-weight: 800; font-size: 13px; cursor: pointer; }
.nudge .no { background: transparent; color: #9fd8d1; border: 1px solid #2a5b58; border-radius: 10px; padding: 9px 12px; font-size: 13px; cursor: pointer; }

/* monthly giving tally on the impact page */
.month-rows { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 6px 14px; margin-top: 10px; }
.month-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.month-row:last-child { border-bottom: none; }
.month-row .m { font-weight: 700; }
.month-row .m small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.month-row .amt { font-weight: 800; color: var(--teal-dark); }
.month-row.cur .m::after { content: ' \u2022 now'; color: var(--teal); font-weight: 400; font-size: 11px; }

/* impact */
.impact-band { border-radius: 22px; padding: 20px 16px; color: #fff; margin-bottom: 12px; position: relative; overflow: hidden;
               background: linear-gradient(140deg, #063f3d, var(--teal-dark) 55%, var(--teal));
               box-shadow: 0 14px 30px rgba(10, 90, 88, .4); }
.impact-band h2 { position: relative; z-index: 2; font-size: 18px; margin-bottom: 12px; }
.impact-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.impact-cell { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); border-radius: 14px;
               padding: 10px; text-align: center; }
.impact-cell b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.impact-cell span { font-size: 10px; opacity: .85; }
.testi-wrap { position: relative; min-height: 190px; margin-bottom: 10px; }
.testi { position: absolute; inset: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px;
         box-shadow: var(--shadow); opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.testi.show { opacity: 1; pointer-events: auto; }
.testi .quote { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); font-style: italic; margin-bottom: 12px; }
.testi .who { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; }
.testi .who small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #cfe3df; cursor: pointer; }
.dots i.on { background: var(--teal-dark); transform: scale(1.25); }
.transparency { background: linear-gradient(180deg, #fffdf7, #f2faf7); border: 1px solid var(--line);
                border-radius: 18px; padding: 14px; }
.transparency h4 { font-size: 13px; margin-bottom: 8px; }
.t-row { display: flex; justify-content: space-between; font-size: 12px; padding: 7px 0;
         border-top: 1px solid #eef3ee; color: var(--ink-soft); }
.t-row:first-of-type { border-top: none; }
.t-row b { color: var(--teal-dark); }

/* admin */
.admin-wrap { padding: 16px 14px; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.admin-card h3 { font-size: 14px; margin-bottom: 10px; }
.admin-row { border-top: 1px solid #f3e9d4; padding: 10px 0; font-size: 12.5px; }
.admin-row:first-of-type { border-top: none; }
.admin-row .meta { color: var(--muted); font-size: 11px; margin: 3px 0 8px; line-height: 1.5; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: none; border-radius: 10px; padding: 9px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.btn-ok { background: var(--green-bg); color: var(--green); }
.btn-no { background: #fdecec; color: #a33; }
.btn-teal { background: var(--teal-dark); color: #fff; }
.btn-line { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 10px; }
.badge.pending { background: #fff4d6; color: #8a6d1a; }
.badge.live { background: var(--green-bg); color: var(--green); }
.badge.sample { background: #eef7f5; color: var(--teal-dark); }
.admin-form { display: none; margin-top: 10px; background: var(--cream-2); border-radius: 12px; padding: 12px; }
.admin-form.open { display: block; }
.empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 8px; }
.demo-banner { margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.55;
  color: #5c4a1f; background: linear-gradient(135deg, #fff7dd, #ffefc2); border: 1px dashed #d9b64a; }
.demo-banner a { color: #0b6e6a; font-weight: 700; }
.footer-note { text-align: center; font-size: 10.5px; color: var(--muted); padding: 18px 20px 8px; line-height: 1.6; }
