/* ==========================================================================
   ADMIN: panel layout and components (loaded only on /admin)
   ========================================================================== */

body.admin, body.login { background: #f3f6fa; padding-bottom: 0; --side-w: 260px; }
.btn--danger { background: #b42318; color: #fff; }
.btn--danger:hover { background: #912018; color: #fff; }
.check--plain { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; }
.check--plain input { width: 20px; height: 20px; accent-color: var(--green-btn); }

/* ---- Shell ---- */
.shell { min-height: 100vh; }
.side { position: fixed; z-index: 120; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; background: var(--blue-900); color: #c9d8ec; transform: translateX(-100%); transition: transform .2s; overflow-y: auto; }
.side.is-open { transform: none; box-shadow: var(--shadow); }
.scrim { position: fixed; z-index: 110; inset: 0; background: rgba(1, 20, 45, .55); }
@media (min-width: 1024px) {
    .side { transform: none; }
    .scrim { display: none !important; }
    .main { margin-left: var(--side-w); }
}
.side__brand { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.side__brand img { background: #fff; border-radius: 10px; padding: 2px; }
.side__brand span { display: flex; flex-direction: column; font-weight: 800; line-height: 1.2; }
.side__brand small { font-weight: 500; color: #9fb7d8; font-size: .78rem; }
.side__nav { flex: 1; padding: .5rem .75rem 1rem; }
.side__group { margin: 1.1rem .5rem .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7f9cc4; }
.side__nav a { display: flex; align-items: center; gap: .7rem; min-height: 42px; padding: .45rem .75rem; border-radius: 10px; color: #c9d8ec; font-weight: 600; font-size: .95rem; text-decoration: none; }
.side__nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side__nav a.is-active { background: var(--green-btn); color: #fff; }
.side__nav a span { flex: 1; }
.count { min-width: 22px; padding: 0 .4rem; border-radius: 99px; background: #e5484d; color: #fff; font-size: .72rem; line-height: 22px; text-align: center; }
.side__foot { padding: .75rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.side__foot a { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; color: #c9d8ec; border-radius: 10px; text-decoration: none; font-size: .92rem; }
.side__foot a:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.top { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: .75rem; min-height: 60px; padding: .5rem 1rem; background: #fff; border-bottom: 1px solid var(--line); }
.top__menu { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--blue-50); color: var(--blue); }
@media (min-width: 1024px) { .top__menu { display: none; } .top { padding-inline: 2rem; } }
.top__title { flex: 1; margin: 0; font-size: 1.2rem; }
.top__user { display: flex; align-items: center; gap: .5rem; }
.top__who { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.top__name { display: none; flex-direction: column; line-height: 1.2; font-weight: 700; font-size: .92rem; }
.top__name small { color: var(--muted); font-weight: 500; }
@media (min-width: 640px) { .top__name { display: flex; } }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--blue); text-decoration: none; }
.iconbtn:hover { background: var(--blue-50); color: var(--blue); }
.iconbtn--danger { color: #b42318; }
.iconbtn--danger:hover { background: #fef3f2; color: #912018; }

.content { padding: 1.25rem 1rem 3rem; max-width: 1280px; }
@media (min-width: 1024px) { .content { padding: 1.75rem 2rem 4rem; } }
.back { margin: 0 0 1rem; }
.alert { margin-bottom: 1rem; }

/* ---- Toolbar / search ---- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.toolbar p { margin: 0; max-width: 60ch; }
.toolbar__right { display: flex; gap: .5rem; flex-wrap: wrap; }
.search { display: flex; gap: .4rem; flex: 1; min-width: 220px; max-width: 420px; }
.search .input { min-height: 44px; }

/* ---- Tables (turn into stacked cards on phones) ---- */
.tablewrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { padding: .75rem 1rem; text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); }
.table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfe; }
.table tr.is-unread td { background: #f4faf0; font-weight: 600; }
.is-actions { width: 1%; white-space: nowrap; text-align: right; }
.is-thumb { width: 64px; }
.rowact { display: inline-flex; gap: .15rem; justify-content: flex-end; }
.rowact form { margin: 0; }
.cell-link { font-weight: 700; color: var(--blue); text-decoration: none; }
.cell-link:hover { text-decoration: underline; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--blue-100); }
.thumb--empty { display: block; border: 2px dashed var(--line); background: none; }
.thumb--wide { width: 144px; }
.pill { display: inline-block; padding: .1rem .6rem; border-radius: 99px; background: var(--blue-50); color: var(--blue); font-size: .78rem; font-weight: 700; }
.pill--on { background: var(--green-100); color: var(--green-text); }
.pill--off { background: #eef0f3; color: var(--muted); }
.pill--new { background: #e5484d; color: #fff; margin-left: .4rem; }

@media (max-width: 767px) {
    .tablewrap { background: none; border: 0; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table thead { position: absolute; left: -9999px; }
    .table tr { margin-bottom: .75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 0; }
    .table td { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 1rem; border: 0; text-align: right; }
    .table td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; }
    .table td[data-label=""]::before { display: none; }
    .table td.is-actions { width: 100%; justify-content: flex-end; white-space: normal; border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .5rem; }
    .table td.is-actions::before { display: none; }
}

/* ---- Dashboard ---- */
.statcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 1rem 0 1.5rem; }
@media (min-width: 900px) { .statcards { grid-template-columns: repeat(5, 1fr); } }
.statcard { display: grid; gap: .1rem; padding: 1rem; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: box-shadow .15s, border-color .15s; }
.statcard:hover { border-color: var(--green); box-shadow: var(--shadow-sm); color: var(--ink); }
.statcard__icon { color: var(--green-btn); }
.statcard__num { font-size: 1.9rem; font-weight: 800; color: var(--blue); line-height: 1.1; }
.statcard__label { color: var(--muted); font-size: .88rem; }
.grid2 { display: grid; gap: 1rem; }
@media (min-width: 1000px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.panel { padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.panel--form { margin-bottom: 1rem; }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .i { margin-top: .2rem; color: #b45309; }
.checklist .is-done .i { color: var(--green-btn); }
.checklist .is-done span { color: var(--muted); text-decoration: line-through; }
.row { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.row:last-child { border-bottom: 0; }
.row:hover { color: var(--blue); }
.row__main { display: flex; flex-direction: column; min-width: 0; }
.row__main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__time { flex: none; color: var(--muted); font-size: .82rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---- Editor (forms) ---- */
.editor { padding: clamp(1rem, 3vw, 1.75rem); max-width: 980px; }
.editor__grid { display: grid; grid-template-columns: 1fr; column-gap: 1.25rem; }
@media (min-width: 720px) {
    .editor__grid { grid-template-columns: repeat(6, 1fr); }
    .editor__cell { grid-column: span 6; }
    .editor__cell--half { grid-column: span 3; }
    .editor__cell--third { grid-column: span 2; }
}
.editor__sub { font-size: 1.1rem; margin: .5rem 0 .25rem; }
.editor__foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.editor__foot form { margin: 0; }
.editor__foot--sticky { position: sticky; bottom: 0; z-index: 5; margin-top: 0; padding: .9rem 0; background: linear-gradient(to top, #f3f6fa 70%, transparent); border: 0; }
.input--tall { min-height: 260px; }
.input--file { padding: .55rem; font-size: .95rem; }
.slug { display: flex; }
.slug__pre { display: grid; place-items: center; padding: 0 .85rem; background: var(--blue-50); border: 2px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; color: var(--muted); font-weight: 700; }
.slug .input { border-radius: 0 12px 12px 0; }
.upload { display: grid; gap: .6rem; }
.upload__current { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.upload__current img, .upload__preview { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); }
.charcount { margin: .25rem 0 0; font-size: .8rem; color: var(--muted); text-align: right; }
.charcount.is-near { color: #b45309; font-weight: 700; }
select.input { appearance: auto; }

/* Rich text editor */
.rte { border: 2px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.rte:focus-within { border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(10, 76, 151, .15); }
.rte__bar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; background: var(--soft); border-bottom: 1px solid var(--line); }
.rte__btn { min-width: 40px; min-height: 40px; padding: 0 .65rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 700; font-size: .9rem; }
.rte__btn:hover { background: #fff; border-color: var(--line); }
.rte__btn.is-on { background: var(--blue); color: #fff; }
.rte__sep { width: 1px; background: var(--line); margin: .3rem .15rem; }
.rte__area { min-height: 260px; max-height: 60vh; overflow-y: auto; padding: .9rem 1rem; outline: none; font-size: 1rem; }
.rte__area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rte textarea { border: 0; border-radius: 0; box-shadow: none; }
.rte.is-visual textarea { display: none; }
.rte:not(.is-visual) .rte__area { display: none; }

/* ---- Detail view (inbox) ---- */
.detail { padding: clamp(1rem, 3vw, 1.75rem); max-width: 820px; }
.detail__head h2 { margin-bottom: .1rem; }
.kv { margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.kv > div { display: grid; gap: .1rem; padding: .7rem 1rem; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv > div:nth-child(odd) { background: var(--soft); }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (min-width: 600px) { .kv > div { grid-template-columns: 160px 1fr; gap: 1rem; } }
.msg { padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--soft); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }

/* ---- Settings ---- */
.statrows { display: grid; gap: .5rem; }
.statrow { display: grid; grid-template-columns: 1fr; gap: 0 1rem; padding: .75rem 0; border-bottom: 1px dashed var(--line); }
@media (min-width: 720px) { .statrow { grid-template-columns: 1fr 100px 2fr; } }
.statrow .field { margin-bottom: .5rem; }

/* ---- Login ---- */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem 1rem; }
.login__box { width: 100%; max-width: 400px; text-align: center; }
.login__logo { margin: 0 auto 1.25rem; }
.login__card { padding: 1.75rem; text-align: left; box-shadow: var(--shadow); }
.login__card h1 { font-size: 1.4rem; margin-bottom: 1rem; }
.login__back { margin-top: 1rem; font-size: .92rem; }
.login__card .btn { margin-top: .75rem; }

/* ---- Donations ---- */
.pill--warn { background: #fffaeb; color: #93370d; }
.filterbar { display: grid; gap: 0 .75rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.filterbar .field { margin-bottom: .6rem; }
.filterbar .field:first-child { grid-column: 1 / -1; }
.filterbar .input { min-height: 44px; }
.filterbar__go { grid-column: 1 / -1; display: flex; gap: .5rem; }
@media (min-width: 1100px) { .filterbar { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; align-items: end; } .filterbar .field:first-child { grid-column: auto; } .filterbar__go { grid-column: auto; margin-bottom: .6rem; } }
.grid2--top { align-items: start; }
.stackbox { display: grid; gap: 1rem; }
.actions--col { flex-direction: column; align-items: stretch; }
.actions--col form { margin: 0; }
.statcards--money { grid-template-columns: repeat(2, 1fr); margin-bottom: .75rem; }
@media (min-width: 900px) { .statcards--money { grid-template-columns: repeat(4, 1fr); } }
.statcards--money .statcard__num { font-size: 1.6rem; }
.statcards--money .statcard__label { order: -1; }

/* ---- Campaign child lists ---- */
.childcards { display: grid; gap: .75rem; grid-template-columns: 1fr; max-width: 980px; }
@media (min-width: 800px) { .childcards { grid-template-columns: repeat(3, 1fr); } }
.childcard { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.childcard:hover { border-color: var(--green); box-shadow: var(--shadow-sm); color: var(--ink); }
.childcard__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--green-100); color: var(--green-btn); }
.childcard__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.childcard__body small { color: var(--muted); }
.count--soft { background: var(--blue-50); color: var(--blue); margin-left: .35rem; }

/* ==========================================================================
   ADMIN: visual enhancement layer
   ========================================================================== */
body.admin { background: radial-gradient(900px 420px at 100% 0%, rgba(80, 155, 34, .07), transparent 60%), #f1f5fa; }

/* Sidebar */
.side { background: linear-gradient(180deg, #012a58 0%, #011d3f 100%); }
.side__brand { padding: 1.15rem 1.2rem; background: rgba(255, 255, 255, .04); }
.side__brand img { box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6); }
.side__group { margin-top: 1.4rem; padding-left: .25rem; color: #6f8fbb; }
.side__nav a { position: relative; transition: background .2s, color .2s, transform .2s; }
.side__nav a .i { flex: none; opacity: .8; }
.side__nav a:hover { transform: translateX(3px); }
.side__nav a.is-active { background: linear-gradient(135deg, #4a9a1f, #3f8419); box-shadow: 0 10px 20px -10px rgba(80, 155, 34, .9); }
.side__nav a.is-active .i { opacity: 1; }
.side__foot a { background: rgba(255, 255, 255, .06); }
.side__nav::-webkit-scrollbar, .side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 6px; }

/* Top bar */
.top { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(1, 26, 58, .07); box-shadow: 0 8px 24px -22px rgba(1, 26, 58, .6); }
.top__title { font-size: 1.25rem; letter-spacing: -.01em; }
.avatar { background: linear-gradient(135deg, #0a4c97, #013b7c); box-shadow: 0 8px 16px -8px rgba(1, 59, 124, .8); }
.iconbtn { transition: background .2s, transform .2s; }
.iconbtn:hover { transform: translateY(-1px); }

/* Dashboard welcome */
.dhero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding: 1.5rem 1.6rem; border-radius: 22px; color: #fff; background: radial-gradient(500px 260px at 100% 0%, rgba(80, 155, 34, .4), transparent 62%), radial-gradient(420px 260px at 0% 100%, rgba(70, 130, 220, .35), transparent 60%), linear-gradient(135deg, #012a58, #011d3f); box-shadow: 0 24px 40px -28px rgba(1, 26, 58, .8); }
.dhero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .1) 1.2px, transparent 1.2px); background-size: 24px 24px; -webkit-mask-image: linear-gradient(120deg, transparent 40%, #000); mask-image: linear-gradient(120deg, transparent 40%, #000); pointer-events: none; }
.dhero > * { position: relative; }
.dhero__date { margin: 0 0 .25rem; color: #9be06a; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dhero h2 { margin: 0; color: #fff; font-size: clamp(1.4rem, 3.4vw, 2rem); letter-spacing: -.02em; }
.dhero p:last-child { margin: .3rem 0 0; color: #c9d8ec; }
.dhero__btns { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Stat cards */
.statcard { --sc: #3f8419; --st: #eaf5df; position: relative; overflow: hidden; gap: .15rem; padding: 1.15rem 1.2rem; border-color: rgba(1, 26, 58, .07); border-radius: 18px; box-shadow: 0 14px 28px -24px rgba(1, 26, 58, .6); transition: transform .25s, box-shadow .25s, border-color .25s; }
.statcard::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sc); opacity: .85; transform: scaleX(.3); transform-origin: left; transition: transform .35s; }
.statcard:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 0 0 2px var(--st), 0 24px 36px -26px rgba(1, 26, 58, .6); }
.statcard:hover::after { transform: scaleX(1); }
.statcards > li:nth-child(5n+2) .statcard { --sc: #013b7c; --st: #e4eefb; }
.statcards > li:nth-child(5n+3) .statcard { --sc: #be185d; --st: #ffeaf2; }
.statcards > li:nth-child(5n+4) .statcard { --sc: #0f766e; --st: #ddf7f3; }
.statcards > li:nth-child(5n+5) .statcard { --sc: #b45309; --st: #fff1dc; }
.statcard__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: .5rem; border-radius: 14px; background: var(--st); color: var(--sc); transition: background .25s, color .25s, transform .25s; }
.statcard:hover .statcard__icon { background: var(--sc); color: #fff; transform: rotate(-6deg) scale(1.06); }
.statcard__num { color: var(--ink); letter-spacing: -.02em; }
.statcards--money .statcard__label { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }

/* Panels */
.panel { border-color: rgba(1, 26, 58, .07); border-radius: 20px; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); }
.panel h2 { letter-spacing: -.01em; }
.panel__head { align-items: center; margin-bottom: .4rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.panel__head h2 { margin: 0; }
.panel__head a { padding: .25rem .7rem; border-radius: 99px; background: var(--blue-50); font-size: .82rem; font-weight: 700; text-decoration: none; }
.panel__head a:hover { background: var(--blue); color: #fff; }
.row { margin: 0 -.5rem; padding: .7rem .5rem; border-radius: 12px; transition: background .2s; }
.row:hover { background: #f4f8fd; }
.checklist li { border-bottom-style: dashed; }
.panel--form { border-radius: 20px; }

/* Tables, filters, forms, detail */
.tablewrap { border-color: rgba(1, 26, 58, .07); border-radius: 20px; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); }
.table th { padding: .85rem 1rem; background: #f6f9fc; letter-spacing: .06em; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f4f8fd; }
.thumb { border-radius: 12px; box-shadow: 0 6px 14px -8px rgba(1, 26, 58, .5); }
.pill { padding: .2rem .7rem; }
.pill--on::before, .pill--off::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .4rem; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.editor, .detail { border-radius: 22px; border-color: rgba(1, 26, 58, .07); box-shadow: 0 18px 34px -28px rgba(1, 26, 58, .55); }
.filterbar { border-radius: 20px; border-color: rgba(1, 26, 58, .07); box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); }
.kv { border-radius: 14px; }
.msg { border-radius: 14px; }
.childcard { border-radius: 18px; border-color: rgba(1, 26, 58, .07); box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); transition: transform .25s, box-shadow .25s, border-color .25s; }
.childcard:hover { transform: translateY(-3px); }
.childcard__icon { border-radius: 14px; }
.editor__foot--sticky { background: linear-gradient(to top, #f1f5fa 70%, transparent); }

/* Login */
body.login { background: radial-gradient(700px 420px at 100% 0%, rgba(80, 155, 34, .35), transparent 60%), radial-gradient(600px 420px at 0% 100%, rgba(70, 130, 220, .35), transparent 60%), linear-gradient(135deg, #012a58, #011d3f); }
.login__card { border: 0; border-radius: 24px; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .65); }
.login__back a { color: #c9d8ec; }
.btn--glass { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn--glass:hover { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---- Donations list ---- */
.dpage-head { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.dsum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; flex: 1; min-width: min(100%, 420px); max-width: 640px; margin: 0; padding: 0; list-style: none; }
.dsum__card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 20px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); }
.dsum__ico { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 16px; background: #eaf5df; color: #3f8419; }
.dsum__card--blue .dsum__ico { background: #e4eefb; color: #013b7c; }
.dsum__card > div { display: flex; flex-direction: column; min-width: 0; }
.dsum__label { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.dsum__num { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.dpage-head__act { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; }
.dnote { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; }
.filterbar { margin-top: .75rem; }
.donor { display: flex; align-items: center; gap: .75rem; text-align: left; }
.donor__av { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; font-weight: 800; box-shadow: 0 8px 14px -8px rgba(63, 132, 25, .8); }
.table tbody tr:nth-child(4n+2) .donor__av { background: linear-gradient(135deg, #0a4c97, #013b7c); }
.table tbody tr:nth-child(4n+3) .donor__av { background: linear-gradient(135deg, #e0457f, #be185d); }
.table tbody tr:nth-child(4n) .donor__av { background: linear-gradient(135deg, #19a699, #0f766e); }
.amt { color: #2f6b12; font-size: 1.02rem; letter-spacing: -.01em; }
.pill--bad { background: #fef3f2; color: #b42318; }
.pill--warn::before, .pill--bad::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .4rem; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.empty .i { display: block; margin: 0 auto .6rem; color: #9fb3cc; }
.pagination, nav[role="navigation"] { margin-top: 1rem; }
@media (max-width: 520px) { .dsum { grid-template-columns: 1fr; } }

/* ==========================================================================
   ADMIN: shell (sidebar, header, footer)
   ========================================================================== */
.main { display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1; width: 100%; }

/* Sidebar profile + links */
.side__foot { display: grid; gap: .6rem; padding: .9rem .75rem; background: rgba(0, 0, 0, .18); }
.side__me { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: rgba(255, 255, 255, .06); }
.side__me .avatar { flex: none; background: linear-gradient(135deg, #4a9a1f, #3f8419); }
.side__me-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side__me-txt strong { color: #fff; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__me-txt small { color: #9fb7d8; font-size: .76rem; }
.side__links { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.side__foot .side__links a { justify-content: center; gap: .4rem; padding: .55rem .4rem; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .05); font-size: .8rem; font-weight: 600; text-align: center; }
.side__foot .side__links a:hover { background: rgba(255, 255, 255, .14); }
.side__nav ul { display: grid; gap: .15rem; }
.side__nav a.is-active::before { content: ""; position: absolute; left: -.75rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: #9be06a; }
.side__nav .count { box-shadow: 0 6px 12px -6px rgba(229, 72, 77, .9); }

/* Header */
.top { min-height: 68px; }
.top__heading { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.2; }
.top__heading .top__title { flex: none; font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top__date { display: none; margin: .1rem 0 0; color: var(--muted); font-size: .8rem; }
@media (min-width: 640px) { .top__date { display: block; } }
.top__user { gap: .35rem; }
.top__bell, .top__site { position: relative; background: var(--blue-50); }
.top__site { display: none; }
@media (min-width: 640px) { .top__site { display: inline-grid; } }
.top__badge { position: absolute; top: -4px; right: -4px; min-width: 19px; padding: 0 .3rem; border: 2px solid #fff; border-radius: 99px; background: #e5484d; color: #fff; font-size: .68rem; line-height: 15px; text-align: center; }
.top__sep { display: none; width: 1px; height: 28px; margin: 0 .35rem; background: var(--line); }
@media (min-width: 640px) { .top__sep { display: block; } }
.top__who { padding: .25rem .6rem .25rem .25rem; border-radius: 99px; transition: background .2s; }
.top__who:hover { background: var(--blue-50); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; margin-top: auto; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid rgba(1, 26, 58, .07); background: rgba(255, 255, 255, .7); color: var(--muted); font-size: .85rem; }
@media (min-width: 1024px) { .foot { padding-inline: 2rem; } }
.foot p { margin: 0; }
.foot__links { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.foot__links a { color: var(--muted); font-weight: 600; text-decoration: none; }
.foot__links a:hover { color: var(--blue); text-decoration: underline; }

/* ---- Resource lists (campaigns, stories, ...) ---- */
.rhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; padding: 1.1rem 1.3rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 22px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); }
.rhead__id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.rhead__ico { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 17px; background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; box-shadow: 0 14px 24px -12px rgba(63, 132, 25, .8); }
.rhead h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
.rhead p { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }
.rhead p strong { color: var(--ink); }
.rhead__act { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; flex: 1; justify-content: flex-end; }
.rsearch { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; max-width: 360px; }
.rsearch > .i { position: absolute; left: .95rem; color: var(--muted); pointer-events: none; }
.rsearch input { width: 100%; min-height: 44px; padding: 0 2.6rem 0 2.6rem; border: 2px solid transparent; border-radius: 99px; background: #eef3f9; font: inherit; transition: border-color .2s, background .2s, box-shadow .2s; }
.rsearch input:focus { outline: 0; border-color: var(--blue-700); background: #fff; box-shadow: 0 0 0 4px rgba(10, 76, 151, .12); }
.rsearch__clear { position: absolute; right: .55rem; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--muted); }
.rsearch__clear:hover { background: #dfe7f1; color: var(--ink); }
.pill--tag { background: #e4eefb; color: #013b7c; }
.pill--tag::before { content: none; }
.table td .amt { font-size: 1rem; }
.table .cell-link { color: var(--ink); font-size: 1rem; }
.table .cell-link:hover { color: var(--blue); }
.table .rowact .iconbtn { width: 38px; height: 38px; border-radius: 12px; }
.table .rowact .iconbtn:hover { transform: translateY(-1px); }
.table tbody tr { position: relative; }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #4a9a1f; }
.empty { padding: 2.5rem 1rem; border-radius: 20px; background: #fff; }
.empty .i { display: block; margin: 0 auto .6rem; color: #9fb3cc; }
@media (max-width: 640px) { .rhead__act { justify-content: stretch; } .rsearch { max-width: none; } }

/* ---- Add / edit form ---- */
.backlink { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .8rem .3rem .5rem; border-radius: 99px; background: #fff; border: 1px solid rgba(1, 26, 58, .07); font-weight: 700; font-size: .88rem; text-decoration: none; box-shadow: var(--shadow-sm); }
.backlink .i { transform: rotate(90deg); }
.backlink:hover { background: var(--blue-50); }
.rhead--form { max-width: 980px; }
.rhead--form .rhead__act { flex: none; }
.editor__sub { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .4rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.editor__sub::before { content: ""; width: 5px; height: 1.1em; border-radius: 4px; background: linear-gradient(#4a9a1f, #3f8419); }
.editor__foot--bar { position: sticky; bottom: 0; z-index: 5; margin: 1.5rem calc(-1 * clamp(1rem, 3vw, 1.75rem)) calc(-1 * clamp(1rem, 3vw, 1.75rem)); padding: 1rem clamp(1rem, 3vw, 1.75rem); border-top: 1px solid var(--line); border-radius: 0 0 22px 22px; background: rgba(246, 249, 252, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.editor .input:focus { border-color: var(--blue-700); }
.editor .upload__current img, .editor .upload__preview { border-radius: 14px; box-shadow: var(--shadow-sm); }
.thumb--wide { height: 54px; width: 96px; }

/* ==========================================================================
   ADMIN: modern shell v2
   ========================================================================== */
:root { --ad-ease: cubic-bezier(.2, .7, .2, 1); }
html { scroll-behavior: smooth; }
body.admin { background: radial-gradient(1000px 480px at 100% -10%, rgba(80, 155, 34, .09), transparent 60%), radial-gradient(800px 420px at 0% 110%, rgba(10, 76, 151, .06), transparent 60%), #f0f4f9; }
@keyframes ad-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.content > * { animation: ad-rise .45s var(--ad-ease) both; }
.content > *:nth-child(2) { animation-delay: .05s; } .content > *:nth-child(3) { animation-delay: .1s; } .content > *:nth-child(n+4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .content > * { animation: none; } html { scroll-behavior: auto; } }
:focus-visible { outline: 3px solid rgba(10, 76, 151, .45); outline-offset: 2px; }

/* Sidebar sections */
.side { width: var(--side-w); border-right: 1px solid rgba(255, 255, 255, .05); }
.side__sec { margin: 0; }
.side__sec > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; margin: 1.2rem .35rem .3rem; padding: .25rem .4rem; border-radius: 8px; cursor: pointer; user-select: none; }
.side__sec > summary::-webkit-details-marker { display: none; }
.side__sec > summary:hover { color: #b9d0f0; }
.side__sec > summary .i { width: 14px; height: 14px; opacity: .7; transition: transform .25s var(--ad-ease); }
.side__sec:not([open]) > summary .i { transform: rotate(-90deg); }
.side__nav a { min-height: 40px; border-radius: 12px; }
.side__nav a.is-active { font-weight: 700; }

/* Header */
.top { gap: 1rem; min-height: 70px; background: rgba(255, 255, 255, .8); }
.top__crumbs { display: none; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); font-weight: 600; }
.top__crumbs a { color: var(--muted); text-decoration: none; }
.top__crumbs a:hover { color: var(--blue); }
@media (min-width: 640px) { .top__crumbs { display: flex; } }
.top__heading .top__title { font-size: 1.3rem; letter-spacing: -.02em; }
.top__add { list-style: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 1rem 0 .8rem; border-radius: 99px; background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; box-shadow: 0 12px 20px -12px rgba(63, 132, 25, .9); transition: transform .2s, box-shadow .2s; }
.top__add::-webkit-details-marker { display: none; }
.top__add:hover { transform: translateY(-1px); box-shadow: 0 16px 24px -12px rgba(63, 132, 25, .9); }
.top__add span { display: none; }
@media (min-width: 640px) { .top__add span { display: inline; } }
.top__bell { list-style: none; cursor: pointer; }
.top__bell::-webkit-details-marker, .top__who::-webkit-details-marker { display: none; }
.top__who { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.top__caret { width: 14px; height: 14px; color: var(--muted); }
.top__bell, .top__site { border-radius: 12px; }

/* Dropdowns (details.dd) */
.dd { position: relative; }
.dd__menu { position: absolute; right: 0; top: calc(100% + .6rem); z-index: 130; display: grid; gap: .15rem; min-width: 220px; padding: .5rem; border: 1px solid rgba(1, 26, 58, .08); border-radius: 18px; background: #fff; box-shadow: 0 30px 60px -20px rgba(1, 26, 58, .45), 0 4px 12px rgba(1, 26, 58, .06); animation: ad-rise .2s var(--ad-ease) both; }
.dd__menu--wide { min-width: 260px; }
.dd__title { margin: 0; padding: .45rem .7rem .35rem; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; }
.dd__menu a, .dd__menu button { display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 40px; padding: .4rem .7rem; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; transition: background .15s; }
.dd__menu a:hover, .dd__menu button:hover { background: #f1f6fc; color: var(--blue); }
.dd__menu .i { color: var(--blue); flex: none; }
.dd__menu .count { margin-left: auto; }
.dd__menu form { margin: 0; border-top: 1px solid var(--line); margin-top: .25rem; padding-top: .25rem; }
.dd__danger, .dd__danger .i { color: #b42318 !important; }
.dd__danger:hover { background: #fef3f2 !important; }
@media (max-width: 520px) { .dd--quick .dd__menu, .dd .dd__menu { right: -3rem; } .dd--me .dd__menu { right: 0; } }

/* Buttons / inputs polish */
.admin .btn { transition: transform .2s var(--ad-ease), box-shadow .2s, background .2s; }
.admin .btn:hover { transform: translateY(-1px); }
.admin .btn--green { background: linear-gradient(135deg, #4a9a1f, #3f8419); box-shadow: 0 12px 20px -14px rgba(63, 132, 25, .95); }
.admin .btn--blue { background: linear-gradient(135deg, #0a4c97, #013b7c); box-shadow: 0 12px 20px -14px rgba(1, 59, 124, .95); }
.admin .input { border-radius: 12px; border-color: #dde5ef; background: #fbfdff; transition: border-color .2s, box-shadow .2s, background .2s; }
.admin .input:hover { border-color: #c4d2e4; }
.admin .input:focus { background: #fff; }
.admin ::-webkit-scrollbar { width: 10px; height: 10px; }
.admin ::-webkit-scrollbar-thumb { background: #c9d6e6; border: 2px solid transparent; background-clip: padding-box; border-radius: 10px; }
.admin ::-webkit-scrollbar-thumb:hover { background: #a9bbd2; background-clip: padding-box; }
.alert { border-radius: 14px; box-shadow: var(--shadow-sm); }

/* Footer */
.foot { background: #fff; box-shadow: 0 -10px 30px -28px rgba(1, 26, 58, .6); }

/* ---- Photo grid (gallery) ---- */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin: 0 0 1rem; padding: 0; list-style: none; }
@media (min-width: 720px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; } }
@media (min-width: 1100px) { .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pcard { overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(1, 26, 58, .07); border-radius: 20px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); transition: transform .3s var(--ad-ease), box-shadow .3s; }
.pcard:hover { transform: translateY(-5px); box-shadow: 0 0 0 2px #d6ebc6, 0 28px 40px -28px rgba(1, 26, 58, .6); }
.pcard__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e7eef7; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ad-ease); }
.pcard:hover .pcard__img img { transform: scale(1.07); }
.pcard__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1, 26, 58, .28), transparent 38%); pointer-events: none; }
.pcard__none { display: grid; place-items: center; width: 100%; height: 100%; color: #9fb3cc; }
.pcard__pill { position: absolute; z-index: 1; top: .6rem; left: .6rem; box-shadow: 0 6px 14px -6px rgba(1, 26, 58, .5); }
.pcard.is-off .pcard__img img { filter: grayscale(.85); opacity: .7; }
.pcard__body { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; padding: .8rem .8rem .7rem 1rem; }
.pcard__txt { display: flex; flex-direction: column; min-width: 0; }
.pcard__title { color: var(--ink); font-weight: 700; font-size: .95rem; line-height: 1.3; text-decoration: none; }
.pcard__title:hover { color: var(--blue); }
.pcard__txt small { margin-top: .15rem; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.pcard .rowact { flex: none; }
.pcard .iconbtn { width: 34px; height: 34px; background: #f1f5fa; }

/* ---- Testimonial cards ---- */
.qgrid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0 0 1rem; padding: 0; list-style: none; }
@media (min-width: 760px) { .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .qgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qcard { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .85rem; padding: 1.3rem 1.3rem 1rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 22px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); transition: transform .3s var(--ad-ease), box-shadow .3s; }
.qcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #4a9a1f, #9be06a); }
.qcard:nth-child(3n+2)::before { background: linear-gradient(90deg, #013b7c, #4a8be0); }
.qcard:nth-child(3n)::before { background: linear-gradient(90deg, #e8913a, #f2b45a); }
.qcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px #d6ebc6, 0 28px 40px -28px rgba(1, 26, 58, .6); }
.qcard.is-off { opacity: .72; }
.qcard__mark { position: absolute; right: -14px; bottom: -18px; width: 120px; height: 120px; fill: none; stroke: rgba(1, 59, 124, .06); stroke-width: .6; pointer-events: none; }
.qcard__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.qcard__stars { display: inline-flex; gap: 1px; font-size: 1.05rem; letter-spacing: 0; }
.qcard__stars span { color: #dbe3ee; }
.qcard__stars .is-on { color: #f5a623; }
.qcard__quote { flex: 1; margin: 0; color: var(--ink); font-size: .98rem; line-height: 1.6; font-style: italic; }
.qcard__foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.qcard__who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.qcard__who > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.qcard__who small { color: var(--muted); font-size: .8rem; }
.qcard__av { flex: none; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 8px 14px -8px rgba(1, 26, 58, .5); }
.qcard__av--txt { display: grid; place-items: center; background: linear-gradient(135deg, #0a4c97, #013b7c); color: #fff; font-weight: 800; }
.qcard .iconbtn { width: 34px; height: 34px; background: #f1f5fa; }

/* ---- Video testimonial cards ---- */
@media (min-width: 720px) { .pgrid--video { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pgrid--video { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pgrid--video .pcard__img { aspect-ratio: 16 / 9; }
.pcard__img--video { background: radial-gradient(260px 160px at 85% 0%, rgba(80, 155, 34, .45), transparent 60%), linear-gradient(135deg, #012a58, #011d3f); }
.pcard__img--video::after { background: linear-gradient(180deg, rgba(1, 26, 58, .35), rgba(1, 26, 58, .15) 60%, rgba(1, 26, 58, .4)); }
.pcard__play { position: absolute; z-index: 1; inset: 0; margin: auto; display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .6); transition: transform .3s var(--ad-ease), background .3s; }
.pcard__play svg { width: 26px; height: 26px; margin-left: 3px; fill: currentColor; }
.pcard:hover .pcard__play { transform: scale(1.12); background: #4a9a1f; border-color: transparent; }
.pcard__pill--r { left: auto; right: .6rem; }
.pcard__role { color: var(--muted); font-weight: 500; font-size: .85rem; }

/* ---- Team cards ---- */
.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin: 0 0 1rem; padding: 0; list-style: none; }
@media (min-width: 760px) { .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; } }
@media (min-width: 1100px) { .tgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tcard { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 1.8rem 1rem 1.1rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); transition: transform .3s var(--ad-ease), box-shadow .3s; }
.tcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 74px; background: radial-gradient(200px 100px at 90% 0%, rgba(80, 155, 34, .4), transparent 65%), linear-gradient(135deg, #012a58, #0a4c97); }
.tcard:hover { transform: translateY(-5px); box-shadow: 0 0 0 2px #d6ebc6, 0 28px 40px -28px rgba(1, 26, 58, .6); }
.tcard.is-off { opacity: .72; }
.tcard__pill { position: absolute; z-index: 1; top: .6rem; right: .6rem; }
.tcard__photo { position: relative; display: block; width: 92px; height: 92px; margin-top: .6rem; border: 4px solid #fff; border-radius: 50%; overflow: hidden; background: #e7eef7; box-shadow: 0 14px 24px -12px rgba(1, 26, 58, .6); }
.tcard__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ad-ease); }
.tcard:hover .tcard__photo img { transform: scale(1.08); }
.tcard__init { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; font-size: 2rem; font-weight: 800; }
.tcard:nth-child(3n+2) .tcard__init { background: linear-gradient(135deg, #0a4c97, #013b7c); }
.tcard:nth-child(3n) .tcard__init { background: linear-gradient(135deg, #e0457f, #be185d); }
.tcard__name { position: relative; margin-top: .8rem; color: var(--ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; text-decoration: none; }
.tcard__name:hover { color: var(--blue); }
.tcard__role { margin: .15rem 0 0; color: #3f8419; font-size: .85rem; font-weight: 700; }
.tcard__bio { margin: .55rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.tcard__act { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: auto; padding-top: .9rem; width: 100%; }
.tcard__act .btn { flex: 1; justify-content: center; }
.tcard__act form { margin: 0; }
.tcard .iconbtn { width: 38px; height: 38px; background: #fef3f2; }

/* ---- FAQ accordion list ---- */
.flist { display: grid; gap: .7rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.fitem { overflow: hidden; border: 1px solid rgba(1, 26, 58, .07); border-radius: 18px; background: #fff; box-shadow: 0 12px 24px -24px rgba(1, 26, 58, .6); transition: box-shadow .25s, border-color .25s; }
.fitem:hover, .fitem:has(details[open]) { box-shadow: 0 0 0 2px #d6ebc6, 0 20px 32px -26px rgba(1, 26, 58, .55); border-color: transparent; }
.fitem.is-off { opacity: .75; }
.fitem summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .9rem; padding: .95rem 1.1rem; cursor: pointer; }
.fitem summary::-webkit-details-marker { display: none; }
.fitem__num { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: #eaf5df; color: #3f8419; font-size: .82rem; font-weight: 800; }
.fitem:nth-child(even) .fitem__num { background: #e4eefb; color: #013b7c; }
.fitem__q { flex: 1; min-width: 200px; font-weight: 700; line-height: 1.4; }
.fitem__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.fitem__chev { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform .25s var(--ad-ease); }
.fitem details[open] .fitem__chev { transform: rotate(180deg); color: var(--blue); }
.fitem__a { padding: 0 1.1rem 1.1rem calc(1.1rem + 38px + .9rem); animation: ad-rise .25s var(--ad-ease) both; }
.fitem__a p { margin: 0 0 .9rem; padding-left: .9rem; border-left: 3px solid #d6ebc6; color: var(--muted); line-height: 1.65; white-space: pre-line; }
.fitem__a .rowact { justify-content: flex-start; gap: .5rem; }
@media (max-width: 640px) { .fitem__a { padding-left: 1.1rem; } }

/* ---- Legal page cards ---- */
.lgrid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0 0 1rem; padding: 0; list-style: none; }
@media (min-width: 720px) { .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .lgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lcard { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 1.5rem 1.4rem 1.2rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 22px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); transition: transform .3s var(--ad-ease), box-shadow .3s; }
.lcard::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 34%; border-radius: 0 6px 0 0; background: linear-gradient(90deg, #4a9a1f, #9be06a); transition: width .5s var(--ad-ease); }
.lcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px #d6ebc6, 0 28px 40px -28px rgba(1, 26, 58, .6); }
.lcard:hover::after { width: 100%; border-radius: 0; }
.lcard__ico { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 1rem; border-radius: 17px; background: #eaf5df; color: #3f8419; }
.lcard:nth-child(3n+2) .lcard__ico { background: #e4eefb; color: #013b7c; }
.lcard:nth-child(3n) .lcard__ico { background: #fff1dc; color: #b45309; }
.lcard h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.01em; }
.lcard h3 a { color: var(--ink); text-decoration: none; }
.lcard h3 a:hover { color: var(--blue); }
.lcard__slug { margin: .2rem 0 .9rem; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.lcard__meta { display: grid; gap: .35rem; margin: 0 0 1.1rem; padding: 0; list-style: none; color: var(--muted); font-size: .88rem; }
.lcard__meta li { display: flex; align-items: center; gap: .5rem; }
.lcard__meta .i { width: 16px; height: 16px; color: #9fb3cc; }
.lcard__act { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }

/* ---- Document rows ---- */
.dlist { display: grid; gap: .7rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.ditem { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 18px; background: #fff; box-shadow: 0 12px 24px -24px rgba(1, 26, 58, .6); transition: transform .25s var(--ad-ease), box-shadow .25s; }
.ditem:hover { transform: translateX(4px); box-shadow: 0 0 0 2px #d6ebc6, 0 20px 32px -26px rgba(1, 26, 58, .55); }
.ditem.is-off { opacity: .75; }
.ditem__file { position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 60px; border-radius: 12px 18px 12px 12px; background: linear-gradient(160deg, #fff1f0, #ffe0dd); color: #c4301c; }
.ditem__file::before { content: ""; position: absolute; top: 0; right: 0; width: 16px; height: 16px; border-radius: 0 12px 0 8px; background: rgba(196, 48, 28, .18); }
.ditem__file .i { margin-top: -8px; }
.ditem__file b { position: absolute; bottom: 5px; font-size: .62rem; letter-spacing: .08em; }
.ditem__main { flex: 1; min-width: 0; }
.ditem__title { display: block; color: var(--ink); font-weight: 700; line-height: 1.35; text-decoration: none; }
.ditem__title:hover { color: var(--blue); }
.ditem__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .35rem; }
.ditem__year { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .82rem; font-weight: 600; }
.ditem__year .i { width: 14px; height: 14px; }
.ditem .iconbtn { width: 38px; height: 38px; background: #f1f5fa; }
.ditem .iconbtn--danger { background: #fef3f2; }
@media (max-width: 560px) { .ditem { flex-wrap: wrap; } .ditem .rowact { margin-left: auto; } }

/* ---- Redirect rows ---- */
.rdlist { display: grid; gap: .7rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.rditem { display: grid; grid-template-columns: 1fr; align-items: center; gap: .6rem 1rem; padding: 1rem 1.1rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 18px; background: #fff; box-shadow: 0 12px 24px -24px rgba(1, 26, 58, .6); transition: box-shadow .25s, transform .25s var(--ad-ease); }
.rditem:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #d6ebc6, 0 20px 32px -26px rgba(1, 26, 58, .55); }
@media (min-width: 1000px) { .rditem { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto; } }
.rditem__path { display: flex; flex-direction: column; min-width: 0; }
.rditem__label { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rditem__from, .rditem__to { display: block; margin-top: .15rem; padding: .4rem .7rem; border-radius: 10px; font-family: ui-monospace, Consolas, monospace; font-size: .86rem; overflow-wrap: anywhere; text-decoration: none; }
.rditem__from { background: #fff1f0; color: #b42318; font-weight: 700; }
.rditem__to { background: #eaf5df; color: #2f6b12; font-weight: 700; }
.rditem__from:hover { background: #ffe0dd; }
.rditem__arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-50); color: var(--blue); }
@media (max-width: 999px) { .rditem__arrow { transform: rotate(90deg); } }
.rditem__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.rditem__hits { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.rditem__hits .i { width: 14px; height: 14px; }
.rditem .iconbtn { width: 38px; height: 38px; background: #f1f5fa; }
.rditem .iconbtn--danger { background: #fef3f2; }

/* ---- User cards ---- */
.ugrid { margin-top: .25rem; }
@media (min-width: 1100px) { .ugrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ujust { margin: 0 0 .8rem; }
.ucard__you { background: #fff1dc; color: #b45309; font-size: .68rem; vertical-align: 2px; }
.ucard__info { display: grid; gap: .4rem; width: 100%; margin: .7rem 0 0; padding: .7rem 0 0; border-top: 1px dashed var(--line); list-style: none; color: var(--muted); font-size: .84rem; text-align: left; }
.ucard__info li { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ucard__info .i { flex: none; width: 15px; height: 15px; color: #9fb3cc; }
.ucard__info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Offline donation form ---- */
.rhead--wide { max-width: none; }
.dform { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .dform { grid-template-columns: minmax(0, 1fr) 320px; } .dform__side { position: sticky; top: 90px; } }
.dform .editor { max-width: none; }
.dform .editor__sub:first-child { margin-top: 0; }
.dtips { position: relative; overflow: hidden; padding: 1.4rem 1.3rem; border-radius: 24px; color: #fff; background: radial-gradient(300px 180px at 100% 0%, rgba(80, 155, 34, .4), transparent 62%), linear-gradient(135deg, #012a58, #011d3f); box-shadow: 0 24px 40px -28px rgba(1, 26, 58, .8); }
.dtips h2 { margin: 0 0 1rem; color: #fff; font-size: 1.15rem; }
.dtips__list { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.dtips__list li { display: flex; gap: .8rem; align-items: flex-start; }
.dtips__list strong { display: block; color: #fff; font-size: .95rem; }
.dtips__list p { margin: .15rem 0 0; color: #c9d8ec; font-size: .86rem; line-height: 1.5; }
.dtips__ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #5aa82a, #3f8419); color: #fff; }
.slug .input[type="number"] { min-width: 0; }

/* ---- Settings ---- */
.sgrid { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .sgrid { grid-template-columns: 230px minmax(0, 1fr); } }
.snav { display: flex; gap: .4rem; overflow-x: auto; padding: .5rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 18px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); }
.snav__title { display: none; margin: 0; padding: .3rem .7rem; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.snav a { display: flex; align-items: center; flex: none; gap: .6rem; padding: .55rem .8rem; border-radius: 12px; color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.snav a .i { color: var(--blue); }
.snav a:hover { background: #f1f6fc; color: var(--blue); }
@media (min-width: 1100px) { .snav { flex-direction: column; position: sticky; top: 90px; overflow: visible; padding: .7rem; } .snav__title { display: block; } .snav a { white-space: normal; } }
.settings { min-width: 0; }
.spanel { scroll-margin-top: 90px; }
.spanel__h { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); font-size: 1.15rem; letter-spacing: -.01em; }
.spanel__ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: #eaf5df; color: #3f8419; }
.settings > .spanel:nth-of-type(3n+2) .spanel__ico { background: #e4eefb; color: #013b7c; }
.settings > .spanel:nth-of-type(3n) .spanel__ico { background: #fff1dc; color: #b45309; }
.statrow { padding: .9rem 1rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfdff; }
.statrow:last-child { margin-bottom: 0; }
.sfoot { font-size: .85rem; }
.settings .editor__foot--sticky { padding-inline: 0; }

/* ---- My account ---- */
.agrid { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1000px) { .agrid { grid-template-columns: 300px minmax(0, 1fr); } .acard { position: sticky; top: 90px; } }
.agrid .editor { max-width: none; }
.agrid .editor__sub:first-child { margin-top: 0; }
.acard { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 0 1.3rem 1.4rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); }
.acard__banner { align-self: stretch; height: 92px; margin: 0 -1.3rem; background: radial-gradient(220px 120px at 90% 0%, rgba(80, 155, 34, .45), transparent 65%), linear-gradient(135deg, #012a58, #0a4c97); }
.acard__av { display: grid; place-items: center; width: 92px; height: 92px; margin-top: -46px; border: 5px solid #fff; border-radius: 50%; background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; font-size: 2.2rem; font-weight: 800; box-shadow: 0 16px 28px -14px rgba(1, 26, 58, .6); }
.acard h2 { margin: .8rem 0 0; font-size: 1.25rem; letter-spacing: -.01em; }
.acard__role { margin: .2rem 0 0; padding: .15rem .75rem; border-radius: 99px; background: #eaf5df; color: #2f6b12; font-size: .8rem; font-weight: 700; }
.acard__info { margin-top: 1rem; }

/* ---- Inbox ---- */
.ibox__unread { color: #c4301c; }
.itabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; padding: .35rem; width: fit-content; max-width: 100%; border: 1px solid rgba(1, 26, 58, .07); border-radius: 99px; background: #fff; box-shadow: var(--shadow-sm); }
.itabs a { padding: .4rem 1rem; border-radius: 99px; color: var(--muted); font-size: .88rem; font-weight: 700; text-decoration: none; transition: background .2s, color .2s; }
.itabs a:hover { background: #f1f6fc; color: var(--blue); }
.itabs a.is-on { background: linear-gradient(135deg, #0a4c97, #013b7c); color: #fff; box-shadow: 0 10px 18px -10px rgba(1, 59, 124, .9); }
.ibox { display: grid; gap: .6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.irow { position: relative; display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 18px; background: #fff; box-shadow: 0 12px 24px -24px rgba(1, 26, 58, .6); transition: transform .25s var(--ad-ease), box-shadow .25s; }
.irow:hover { transform: translateX(4px); box-shadow: 0 0 0 2px #d6ebc6, 0 20px 32px -26px rgba(1, 26, 58, .55); }
.irow.is-unread { background: linear-gradient(90deg, #f1faea, #fff 40%); border-left: 4px solid #4a9a1f; }
.irow__av { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #0a4c97, #013b7c); color: #fff; font-weight: 800; box-shadow: 0 8px 14px -8px rgba(1, 59, 124, .8); }
.ibox > li:nth-child(3n+2) .irow__av { background: linear-gradient(135deg, #4a9a1f, #3f8419); }
.ibox > li:nth-child(3n) .irow__av { background: linear-gradient(135deg, #e0457f, #be185d); }
.irow__main { flex: 1; min-width: 0; }
.irow__top { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.irow__title { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.irow__title::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
a.irow__title:hover { color: var(--blue); }
.irow.is-unread .irow__title { font-weight: 800; }
.irow__top .pill--new { margin-left: 0; }
.irow__meta { margin: .15rem 0 0; color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow__time { flex: none; color: var(--muted); font-size: .8rem; font-weight: 600; }
.irow .rowact { position: relative; z-index: 1; flex: none; }
.irow .iconbtn { width: 36px; height: 36px; background: #f1f5fa; }
.irow .iconbtn--danger { background: #fef3f2; }
@media (max-width: 560px) { .irow { flex-wrap: wrap; } .irow__main { flex-basis: calc(100% - 60px); } .irow__time { order: 3; } .irow .rowact { margin-left: auto; order: 4; } }

/* ---- Inbox chips + message detail ---- */
.irow__chips { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: .25rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .84rem; }
.irow__chips li { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.irow__chips .i { flex: none; width: 14px; height: 14px; color: #9fb3cc; }
.irow__chips span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.mgrid { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1000px) { .mgrid { grid-template-columns: minmax(0, 1fr) 320px; } .mside { position: sticky; top: 90px; } }
.mdetail { max-width: none; }
.mhead { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.mhead__av { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #0a4c97, #013b7c); color: #fff; font-size: 1.6rem; font-weight: 800; box-shadow: 0 14px 24px -12px rgba(1, 59, 124, .8); }
.mhead h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.02em; }
.mhead p { margin: .15rem 0 0; font-size: .88rem; }
.mhead__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.mblock { margin: 1.3rem 0 .5rem; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.msubject { margin: 0; font-size: 1.1rem; font-weight: 700; }
.mchips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.mchips li { padding: .3rem .8rem; border-radius: 99px; background: #eaf5df; color: #2f6b12; font-size: .85rem; font-weight: 700; }
.msg--bubble { padding: 1.1rem 1.3rem; border: 0; border-left: 4px solid #4a9a1f; border-radius: 6px 18px 18px 18px; background: #f4f8fd; line-height: 1.7; }
.mcard { padding: 1.3rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 22px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); }
.mcard h3 { margin: 0 0 1rem; font-size: 1.05rem; }
.mcard__list { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.mcard__list li { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.mcard__list div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.mcard__list small { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mcard__list a, .mcard__list span { font-weight: 600; overflow-wrap: anywhere; }
.mcard__ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: #e4eefb; color: #013b7c; }
.mcard__list li:nth-child(even) .mcard__ico { background: #eaf5df; color: #3f8419; }

/* ---- Subscribers ---- */
.dsum--three { max-width: none; margin-bottom: 1rem; }
@media (min-width: 760px) { .dsum--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dsum__card--amber .dsum__ico { background: #fff1dc; color: #b45309; }
.irow__title--mail { font-weight: 600; }

/* ---- Donation detail ---- */
.dhero--gift { margin-bottom: 1.25rem; padding: 1.6rem 1.8rem; }
.dhero--gift .gift__amt { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; color: #fff; }
.dhero--gift .dhero__copy p:last-child { margin-top: .5rem; color: #c9d8ec; }
.dhero--gift strong { color: #fff; }
.gift__side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; text-align: right; }
.gift__status { padding: .35rem 1rem; font-size: .9rem; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .6); }
.gift__when { color: #c9d8ec; font-size: .85rem; }
.mblock--first { margin-top: 0; }
.gift__grid .detail { max-width: none; }
.gift__grid .kv { margin-top: 0; }
.gift__grid .kv > div { border-radius: 0; }
.gift__grid .actions--col .btn { justify-content: center; }
@media (max-width: 560px) { .gift__side { align-items: flex-start; text-align: left; } }

/* ---- Donation detail v2 ---- */
@media (min-width: 1000px) { .gift__grid { grid-template-columns: minmax(0, 1fr) 320px; } .gift__aside { position: sticky; top: 90px; } }
.gpanel { padding: 1.4rem; }
.gpanel__h { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.gpanel__ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: #eaf5df; color: #3f8419; }
.gdonor { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.gdonor__av { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; font-size: 1.4rem; font-weight: 800; box-shadow: 0 14px 24px -12px rgba(63, 132, 25, .8); }
.gdonor strong { font-size: 1.15rem; }
.gdonor__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.ginfo { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .ginfo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ginfo li { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 14px; background: #f6f9fc; min-width: 0; }
.ginfo div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ginfo small { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ginfo a, .ginfo span:not(.ginfo__ico) { font-weight: 600; overflow-wrap: anywhere; }
.ginfo__ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: #e4eefb; color: #013b7c; }
.ginfo li:nth-child(even) .ginfo__ico { background: #eaf5df; color: #3f8419; }
.gline { position: relative; display: grid; gap: 1rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
@media (min-width: 720px) { .gline { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .5rem; } .gline::before { content: ""; position: absolute; top: 19px; left: 8%; right: 8%; border-top: 2px dashed #d3dfec; } }
.gline li { position: relative; display: flex; align-items: center; gap: .75rem; text-align: left; }
@media (min-width: 720px) { .gline li { flex-direction: column; text-align: center; gap: .35rem; } }
.gline li > :not(.gline__dot) { line-height: 1.3; }
.gline strong { font-size: .9rem; }
.gline small { color: var(--muted); font-size: .78rem; }
.gline__dot { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 4px solid #fff; border-radius: 50%; background: #e3eaf3; color: #8ba0ba; }
.gline .is-done .gline__dot { background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; box-shadow: 0 10px 18px -10px rgba(63, 132, 25, .9); }
.gline .is-bad .gline__dot { background: linear-gradient(135deg, #e5484d, #b42318); color: #fff; }
.gpanel .kv { margin-bottom: 0; }
.gpanel .alert { margin: 0 0 1rem; }

/* ---- Donation detail: compact layout + light banner ---- */
.dhero--gift { margin-bottom: .9rem; padding: .9rem 1.2rem; border: 1px solid rgba(1, 26, 58, .07); border-radius: 18px; color: var(--ink); background: radial-gradient(360px 160px at 100% 0%, rgba(80, 155, 34, .16), transparent 65%), radial-gradient(300px 160px at 0% 100%, rgba(10, 76, 151, .1), transparent 65%), #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .55); }
.dhero--gift::before { display: none; }
.dhero--gift .dhero__date { margin-bottom: .1rem; color: #3f8419; font-size: .72rem; }
.dhero--gift .gift__amt { color: var(--blue); font-size: clamp(1.7rem, 4.5vw, 2.3rem); }
.dhero--gift .dhero__copy p:last-child { margin-top: .2rem; color: var(--muted); font-size: .92rem; }
.dhero--gift strong { color: var(--ink); }
.gift__side { flex-direction: row; align-items: center; gap: .8rem; }
.gift__status { padding: .25rem .85rem; font-size: .82rem; box-shadow: none; }
.gift__when { color: var(--muted); font-size: .8rem; }
.gift__grid { gap: .8rem; }
.gift__grid .stackbox { gap: .8rem; }
.gpanel { padding: 1rem 1.1rem; }
.gpanel__h { gap: .55rem; margin-bottom: .75rem; padding-bottom: .6rem; font-size: 1rem; }
.gpanel__ico { width: 32px; height: 32px; border-radius: 10px; }
.gpanel__ico .i { width: 16px; height: 16px; }
.gdonor { gap: .7rem; margin-bottom: .7rem; }
.gdonor__av { width: 44px; height: 44px; font-size: 1.1rem; }
.gdonor strong { font-size: 1.02rem; }
.ginfo { gap: .5rem; }
@media (min-width: 640px) { .ginfo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .ginfo { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ginfo li { gap: .6rem; padding: .5rem .65rem; border-radius: 12px; }
.ginfo__ico { width: 30px; height: 30px; border-radius: 9px; }
.ginfo__ico .i { width: 15px; height: 15px; }
.ginfo a, .ginfo span:not(.ginfo__ico) { font-size: .9rem; }
.gpanel .mblock { margin: .9rem 0 .4rem; }
.gpanel .msg--bubble { padding: .75rem 1rem; font-size: .92rem; }
.gline { gap: .6rem; margin-bottom: .8rem; }
@media (min-width: 720px) { .gline::before { top: 15px; } }
.gline__dot { width: 32px; height: 32px; border-width: 3px; }
.gline__dot .i { width: 15px; height: 15px; }
.gline strong { font-size: .84rem; }
.gline small { font-size: .74rem; }
.gpanel .kv { font-size: .9rem; }
.gpanel .kv > div { padding: .5rem .85rem; }
.gpanel .table th, .gpanel .table td { padding: .5rem .85rem; }
.gift__aside .panel { padding: 1rem 1.1rem; }
.gift__aside .panel h2 { margin-bottom: .6rem; font-size: 1rem; }
@media (max-width: 560px) { .gift__side { flex-wrap: wrap; } }

/* ---- Donations list v2 ---- */
.dsum:has(.dsum__card--amber) { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 860px; }
@media (max-width: 760px) { .dsum:has(.dsum__card--amber) { grid-template-columns: 1fr; } }
.dsum__card--amber .dsum__ico { background: #fff1dc; color: #b45309; }
.dtabs { margin: .25rem 0 .9rem; }
.dtabs a { display: inline-flex; align-items: center; gap: .45rem; }
.dtabs b { min-width: 22px; padding: 0 .4rem; border-radius: 99px; background: #eef3f9; color: var(--muted); font-size: .72rem; line-height: 20px; text-align: center; }
.dtabs a.is-on b { background: rgba(255, 255, 255, .22); color: #fff; }
.filterbar { margin-top: 0; }
.table .donor__av { width: 34px; height: 34px; font-size: .85rem; }
.table td .pill--tag { margin-left: .25rem; }

/* ---- Edit page: jump nav + side summary ---- */
.fjump { display: flex; gap: .4rem; max-width: 980px; margin-bottom: 1rem; padding: .35rem; overflow-x: auto; border: 1px solid rgba(1, 26, 58, .07); border-radius: 99px; background: #fff; box-shadow: var(--shadow-sm); }
.fjump a { flex: none; padding: .4rem 1rem; border-radius: 99px; color: var(--muted); font-size: .86rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.fjump a:hover { background: #eaf5df; color: #2f6b12; }
.editor__sub { scroll-margin-top: 90px; }
.eform { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1150px) { .eform { grid-template-columns: minmax(0, 1fr) 330px; } .eform__side { position: sticky; top: 90px; } .fjump { max-width: none; } }
.eform__main { min-width: 0; }
.eform .editor { max-width: none; }
.eform__side { display: grid; gap: 1rem; }
.esum { overflow: hidden; border: 1px solid rgba(1, 26, 58, .07); border-radius: 22px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); }
.esum__cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #012a58, #0a4c97); }
.esum__cover img { width: 100%; height: 100%; object-fit: cover; }
.esum__cover span { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .6); }
.esum__body { padding: 1rem 1.1rem 1.1rem; }
.esum__body h3 { margin: 0 0 .5rem; font-size: 1.05rem; line-height: 1.35; }
.esum__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.esum__money { display: flex; gap: 1.4rem; margin-top: .9rem; }
.esum__money small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.esum__money strong { font-size: 1.15rem; letter-spacing: -.01em; }
.esum__bar { height: 8px; margin-top: .7rem; border-radius: 99px; background: #e7eef7; overflow: hidden; }
.esum__bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4a9a1f, #9be06a); }
.esum__pct { margin: .35rem 0 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.eform__side .editor__sub { margin: 0 0 .2rem; }
.eform__side .childcards { grid-template-columns: 1fr; max-width: none; }
.eform__side .stack { margin-top: 0; }

/* ---- Home banner cards ---- */
.slist { display: grid; gap: 1rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.sitem { overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(1, 26, 58, .07); border-radius: 22px; background: #fff; box-shadow: 0 14px 28px -26px rgba(1, 26, 58, .6); transition: transform .3s var(--ad-ease), box-shadow .3s; }
.sitem:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px #d6ebc6, 0 28px 40px -28px rgba(1, 26, 58, .6); }
.sitem.is-off .sitem__img img { filter: grayscale(.85); opacity: .65; }
@media (min-width: 800px) { .sitem { flex-direction: row; } .sitem__img { flex: 0 0 min(52%, 520px); } }
.sitem__img { position: relative; display: block; aspect-ratio: 16 / 6; min-height: 140px; background: linear-gradient(135deg, #012a58, #0a4c97); overflow: hidden; }
.sitem__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ad-ease); }
.sitem:hover .sitem__img img { transform: scale(1.04); }
.sitem__img > span { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .6); }
.sitem__order { position: absolute; top: .7rem; left: .7rem; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 .5rem; border-radius: 99px; background: rgba(1, 26, 58, .75); color: #fff; font-size: .85rem; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sitem__body { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: .6rem; padding: 1.1rem 1.3rem; min-width: 0; }
.sitem__top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; }
.sitem__title { color: var(--ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; text-decoration: none; }
.sitem__title:hover { color: var(--blue); }
.sitem__link { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--muted); font-size: .88rem; min-width: 0; }
.sitem__link .i { flex: none; width: 15px; height: 15px; color: #9fb3cc; }
.sitem__link code { padding: .15rem .55rem; border-radius: 8px; background: #eaf5df; color: #2f6b12; font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.sitem .rowact { justify-content: flex-start; gap: .5rem; margin-top: .2rem; }
.sitem .iconbtn--danger { background: #fef3f2; }

/* ---- Image upload drop zone ---- */
.upload { gap: .8rem; }
.upload .input--file { position: relative; display: block; width: 100%; padding: 1.6rem 1rem; border: 2px dashed #bcd0e6; border-radius: 18px; background: linear-gradient(180deg, #f8fbff, #eef4fb); color: var(--muted); font-size: .92rem; text-align: center; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.upload .input--file:hover, .upload .input--file:focus-visible { border-color: #4a9a1f; background: linear-gradient(180deg, #f4fbee, #eaf5df); box-shadow: 0 0 0 4px rgba(80, 155, 34, .12); }
.upload .input--file::file-selector-button { margin-right: 1rem; padding: .6rem 1.2rem; border: 0; border-radius: 99px; background: linear-gradient(135deg, #4a9a1f, #3f8419); color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 10px 18px -10px rgba(63, 132, 25, .9); transition: transform .2s; }
.upload .input--file:hover::file-selector-button { transform: translateY(-1px); }
.upload__current { padding: .8rem; border: 1px solid var(--line); border-radius: 16px; background: #fbfdff; }
.upload__current img { width: auto; max-width: 100%; height: auto; max-height: 160px; border-radius: 12px; }
.upload__preview:not([hidden]) { display: block; width: auto; max-width: 100%; height: auto; max-height: 260px; border: 3px solid #fff; border-radius: 16px; box-shadow: 0 18px 32px -18px rgba(1, 26, 58, .55), 0 0 0 1px rgba(1, 26, 58, .08); }

/* ==========================================================================
   ADMIN: modern design v3
   One token set for every surface, a refined sidebar that folds into an
   icon rail on desktop, a Ctrl+K command palette and a richer dashboard.
   ========================================================================== */
body.admin {
    --side-w: 264px;
    --ad-bg: #f4f7fb;
    --ad-border: rgba(15, 35, 70, .08);
    --ad-shadow: 0 1px 2px rgba(15, 35, 70, .04), 0 10px 26px -16px rgba(15, 35, 70, .22);
    --ad-shadow-hover: 0 2px 4px rgba(15, 35, 70, .05), 0 24px 44px -22px rgba(15, 35, 70, .34);
    --ad-lime: #9be06a;
    background: radial-gradient(1200px 520px at 110% -10%, rgba(80, 155, 34, .08), transparent 60%), radial-gradient(900px 480px at -10% 110%, rgba(10, 76, 151, .07), transparent 60%), var(--ad-bg);
    background-attachment: fixed;
}
.admin kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .4rem; border: 1px solid #d5deea; border-bottom-width: 2px; border-radius: 6px; background: #fff; color: var(--muted); font: 700 .68rem/1 var(--font); letter-spacing: .02em; white-space: nowrap; }

/* ---- Shared surfaces ---- */
.panel, .tablewrap, .rhead, .editor, .detail, .filterbar, .dsum__card, .pcard, .qcard, .tcard, .fitem, .lcard, .ditem, .rditem, .irow, .mcard, .esum, .sitem, .snav, .acard, .childcard, .statcard, .itabs, .fjump { border-color: var(--ad-border); box-shadow: var(--ad-shadow); }
.rhead { background: radial-gradient(460px 180px at 100% 0%, rgba(80, 155, 34, .08), transparent 70%), #fff; }
.rhead__ico { border-radius: 16px; background: linear-gradient(135deg, #5aa82a, #3f8419); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 14px 24px -12px rgba(63, 132, 25, .8); }

/* ---- Sidebar ---- */
.side { background: radial-gradient(420px 260px at 0% 0%, rgba(80, 155, 34, .2), transparent 70%), linear-gradient(180deg, #012b5a 0%, #011c3c 55%, #01152d 100%); border-right: 0; transition: width .25s var(--ad-ease), transform .25s var(--ad-ease); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.side__brand { gap: .8rem; padding: 1.1rem 1.15rem; background: none; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.side__brand:hover { color: #fff; }
.side__brand img { width: 40px; height: 40px; padding: 3px; border-radius: 12px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .08), 0 10px 20px -10px rgba(0, 0, 0, .7); }
.side__brand span { font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; }
.side__brand small { color: #8fb0d8; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.side__nav { padding: .25rem .8rem 1rem; }
.side__sec > summary { margin: 1.15rem .2rem .35rem; padding: .2rem .45rem; color: #6d8db8; font-size: .68rem; letter-spacing: .12em; }
.side__nav ul { gap: .1rem; }
.side__nav a { gap: .75rem; min-height: 40px; padding: .4rem .65rem; border-radius: 12px; color: #b9c9de; font-size: .92rem; font-weight: 600; white-space: nowrap; }
.side__nav a .i { width: 19px; height: 19px; opacity: .8; transition: color .2s, opacity .2s; }
.side__nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: none; }
.side__nav a:hover .i { opacity: 1; }
.side__nav a.is-active { background: linear-gradient(90deg, rgba(155, 224, 106, .2), rgba(155, 224, 106, .04)); color: #fff; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(155, 224, 106, .16); }
.side__nav a.is-active .i { color: var(--ad-lime); opacity: 1; }
.side__nav a.is-active::before { left: -.8rem; top: 22%; bottom: 22%; width: 4px; background: var(--ad-lime); box-shadow: 0 0 12px rgba(155, 224, 106, .8); }
.side__foot { background: rgba(0, 0, 0, .16); border-top: 1px solid rgba(255, 255, 255, .06); }
.side__me { border-color: rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .05); }
.side__foot .side__links a { border-radius: 11px; }
.main { transition: margin-left .25s var(--ad-ease); }

/* Compact icon rail (desktop only, remembered per browser) */
@media (min-width: 1024px) {
    .side-mini body.admin { --side-w: 84px; }
    .side-mini .side__brand { justify-content: center; padding-inline: 0; }
    .side-mini .side__brand > span { display: none; }
    .side-mini .side__nav { padding-inline: .75rem; }
    .side-mini .side__sec > summary { height: 1px; margin: .85rem .55rem; padding: 0; overflow: hidden; background: rgba(255, 255, 255, .1); color: transparent; pointer-events: none; }
    .side-mini .side__sec > summary > * { display: none; }
    .side-mini .side__nav a { justify-content: center; padding: .4rem; }
    .side-mini .side__nav a span, .side-mini .side__foot .side__links a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .side-mini .side__nav a .count { position: absolute; top: 3px; right: 5px; min-width: 17px; padding: 0 .25rem; font-size: .6rem; line-height: 17px; }
    .side-mini .side__nav a.is-active::before { left: -.75rem; }
    .side-mini .side__me { justify-content: center; padding: .3rem; border: 0; background: none; }
    .side-mini .side__me-txt { display: none; }
    .side-mini .side__links { grid-template-columns: 1fr; }
}

/* ---- Header ---- */
.top { gap: .9rem; min-height: 68px; padding-block: .6rem; background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(15, 35, 70, .06); box-shadow: none; }
.top__menu { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #eef3f9; color: var(--blue); cursor: pointer; transition: background .2s, color .2s; }
.top__menu:hover { background: var(--blue); color: #fff; }
.top__menu .i { width: 22px; height: 22px; }
@media (min-width: 1024px) { .top__menu { display: grid; } }
.top__heading .top__title { font-size: 1.28rem; }
.top__search { display: inline-flex; align-items: center; gap: .6rem; flex: 0 1 320px; min-width: 0; height: 42px; padding: 0 .5rem 0 .85rem; border: 1px solid #e1e8f1; border-radius: 12px; background: #f3f6fa; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s, color .2s; }
.top__search span { flex: 1; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.top__search:hover { border-color: #c9d6e6; background: #fff; color: var(--ink); box-shadow: 0 6px 16px -10px rgba(15, 35, 70, .35); }
@media (max-width: 899px) { .top__search { flex: none; width: 42px; padding: 0; justify-content: center; } .top__search span, .top__search kbd { display: none; } }
@media (max-width: 479px) { .top__search { display: none; } }
.top__bell, .top__site { background: #eef3f9; }
.top__who { border: 1px solid transparent; }
.top__who:hover { border-color: #e1e8f1; background: #fff; }
.dd__menu { border-color: var(--ad-border); }

/* ---- Content + footer ---- */
.content { max-width: 1400px; }
@media (min-width: 1024px) { .content { padding: 1.75rem 2.25rem 4rem; } }
.foot { background: transparent; box-shadow: none; border-top: 1px solid rgba(15, 35, 70, .06); }
@media (min-width: 1024px) { .foot { padding-inline: 2.25rem; } }

/* ---- Command palette (Ctrl+K) ---- */
@keyframes ad-pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.cmdk { width: min(640px, calc(100vw - 2rem)); max-height: min(560px, calc(100vh - 6rem)); margin: 12vh auto auto; padding: 0; border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 40px 100px -20px rgba(1, 26, 58, .55), 0 0 0 1px rgba(15, 35, 70, .08); overflow: hidden; }
.cmdk[open] { display: flex; flex-direction: column; animation: ad-pop .18s var(--ad-ease) both; }
.cmdk::backdrop { background: rgba(1, 20, 45, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cmdk__bar { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.1rem; border-bottom: 1px solid #edf1f6; }
.cmdk__bar > .i { flex: none; color: var(--muted); }
.cmdk__input { flex: 1; min-width: 0; height: 38px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1.05rem; outline: none; }
.cmdk__input::placeholder { color: #8a99ae; }
.cmdk__list { flex: 1; margin: 0; padding: .5rem; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.cmdk__item { display: flex; align-items: center; gap: .75rem; padding: .5rem .65rem; border-radius: 12px; color: var(--ink); font-size: .94rem; font-weight: 600; text-decoration: none; }
.cmdk__item small { margin-left: auto; color: var(--muted); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.cmdk__ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: #f1f5fa; color: var(--blue); transition: background .15s, color .15s; }
.cmdk__ico .i { width: 16px; height: 16px; }
.cmdk__item[aria-selected="true"] { background: #eef5ff; color: var(--blue); }
.cmdk__item[aria-selected="true"] .cmdk__ico { background: linear-gradient(135deg, #0d58ab, #013b7c); color: #fff; }
.cmdk__empty { margin: 0; padding: 2rem 1rem; color: var(--muted); text-align: center; }
.cmdk__foot { display: flex; gap: 1.2rem; margin: 0; padding: .6rem 1.1rem; border-top: 1px solid #edf1f6; background: #fafbfd; color: var(--muted); font-size: .78rem; }
.cmdk__foot span { display: inline-flex; align-items: center; gap: .25rem; }
@media (prefers-reduced-motion: reduce) { .cmdk[open] { animation: none; } }

/* ---- Dashboard ---- */
.dhero { padding: 1.75rem 1.9rem; border-radius: 24px; background: radial-gradient(520px 280px at 100% 0%, rgba(80, 155, 34, .45), transparent 62%), radial-gradient(460px 280px at 0% 100%, rgba(70, 130, 220, .32), transparent 60%), linear-gradient(135deg, #013470, #011d3f 70%); }
.dhero > .dhero__art { position: absolute; top: -120px; right: 4%; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .035); box-shadow: 0 0 0 30px rgba(255, 255, 255, .025), 0 0 0 62px rgba(255, 255, 255, .016); pointer-events: none; }
.dhero__date { display: inline-block; padding: .2rem .7rem; border-radius: 99px; background: rgba(155, 224, 106, .14); font-size: .72rem; }
.dhero h2 { margin-top: .5rem; }
@media (max-width: 760px) { .dhero > .dhero__art { right: -60px; } }

.statcard { background: radial-gradient(200px 130px at 100% 0%, var(--st), transparent 72%), #fff; border-radius: 20px; }
.statcard:hover { box-shadow: 0 0 0 2px var(--st), var(--ad-shadow-hover); }
.statcard__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.statcard__icon--sm { width: 36px; height: 36px; margin: 0; border-radius: 11px; }
.statcard__icon--sm .i { width: 18px; height: 18px; }
.statcards--money .statcard { padding: 1rem 1.15rem 1.1rem; }

.panel { padding: 1.35rem 1.4rem; }
.panel > h2:first-child { margin-bottom: 1rem; }
.panel__meta { padding: .25rem .75rem; border-radius: 99px; background: #eaf5df; color: #2f6b12; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.progress { height: 8px; margin: .1rem 0 .5rem; overflow: hidden; border-radius: 99px; background: #e8eef6; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3f8419, var(--ad-lime)); transition: width .6s var(--ad-ease); }

.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { display: block; padding: 0; }
.checklist li.is-done { display: flex; align-items: center; gap: .75rem; padding: .65rem .5rem; color: var(--muted); }
.checklist li > a { display: flex; align-items: center; gap: .75rem; padding: .65rem .5rem; border-radius: 12px; color: var(--ink); font-weight: 600; text-decoration: none; transition: background .2s, color .2s; }
.checklist li > a > span:nth-child(2) { flex: 1; }
.checklist li > a:hover { background: #f4f8fd; color: var(--blue); }
.checklist__dot { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 2px solid #c9d6e6; border-radius: 50%; }
.checklist .is-done .checklist__dot { border: 0; background: linear-gradient(135deg, #5aa82a, #3f8419); box-shadow: 0 6px 12px -6px rgba(63, 132, 25, .9); }
.checklist .checklist__dot .i { width: 13px; height: 13px; margin: 0; color: #fff; stroke-width: 3; }
.checklist .checklist__go { width: 16px; height: 16px; margin: 0; color: #9fb3cc; transition: transform .2s, color .2s; }
.checklist li > a:hover .checklist__go { color: var(--blue); transform: translateX(3px); }
.checklist li > a:hover .checklist__dot { border-color: #3f8419; }

.pempty { display: flex; align-items: center; gap: .9rem; padding: 1rem; border: 1px dashed #d5e0ec; border-radius: 16px; background: linear-gradient(180deg, #fafcff, #f4f8fc); }
.pempty__ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: #fff; color: #7f9cc4; box-shadow: 0 6px 14px -8px rgba(15, 35, 70, .35); }
.pempty p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.pempty strong { display: block; color: var(--ink); font-size: .95rem; }

.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 0; padding: 0; list-style: none; }
@media (max-width: 520px) { .qa { grid-template-columns: 1fr; } }
.qa__tile { --qc: #3f8419; --qt: #eaf5df; display: flex; align-items: center; gap: .75rem; height: 100%; padding: .85rem .9rem; border: 1px solid var(--ad-border); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; transition: transform .25s var(--ad-ease), box-shadow .25s, border-color .25s; }
.qa li:nth-child(2) .qa__tile { --qc: #013b7c; --qt: #e4eefb; }
.qa li:nth-child(3) .qa__tile { --qc: #be185d; --qt: #ffeaf2; }
.qa li:nth-child(4) .qa__tile { --qc: #b45309; --qt: #fff1dc; }
.qa__ico { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; background: var(--qt); color: var(--qc); transition: background .25s, color .25s; }
.qa__txt { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.qa__txt strong { font-size: .95rem; }
.qa__txt small { color: var(--muted); font-size: .8rem; }
.qa__plus { flex: none; width: 18px; height: 18px; color: #b4c3d6; transition: transform .25s var(--ad-ease), color .25s; }
.qa__tile:hover { border-color: transparent; color: var(--ink); box-shadow: 0 0 0 2px var(--qt), var(--ad-shadow-hover); transform: translateY(-2px); }
.qa__tile:hover .qa__ico { background: var(--qc); color: #fff; }
.qa__tile:hover .qa__plus { color: var(--qc); transform: rotate(90deg); }

/* ---- Tables ---- */
.table th { padding: .8rem 1rem; background: #f8fafd; color: #6b7a92; font-size: .72rem; letter-spacing: .07em; border-bottom-color: #e8eef5; }
.table td { border-bottom-color: #eef2f7; }
.table tbody tr:hover { background: #f7faff; }
.pill--on, .pill--off, .pill--warn, .pill--bad, .pill--new { white-space: nowrap; }
.pill--tag { border-radius: 8px; line-height: 1.35; }
.thumb--empty { border: 0; background: #eef3f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb3cc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 9'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: inset 0 0 0 1px rgba(15, 35, 70, .06); }
.table .rowact .iconbtn { background: #f3f6fa; }
.table .rowact .iconbtn:hover { background: var(--blue); color: #fff; }
.table .rowact .iconbtn--danger { background: #fef3f2; }
.table .rowact .iconbtn--danger:hover { background: #b42318; color: #fff; }
@media (min-width: 768px) { .table td.nowrap { white-space: nowrap; } .table--compact th, .table--compact td { padding-inline: .7rem; } }
.table .rowact .btn--sm { min-height: 38px; padding-inline: .85rem; font-size: .84rem; white-space: nowrap; }

/* ---- Empty states ---- */
.empty { padding: 3rem 1rem; border: 1.5px dashed #cfdbe8; background: linear-gradient(180deg, #fff, #f8fbfe); }
.empty > .i { width: 48px; height: 48px; color: #7f9cc4; }
.empty p:first-of-type { color: var(--ink); font-weight: 600; }

/* ---- Forms + buttons ---- */
.admin .field__label { color: #263a57; font-size: .87rem; font-weight: 700; }
.admin .input { border-width: 1.5px; border-color: #dbe3ee; }
.admin .input:focus { border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(10, 76, 151, .12); }
.admin .btn--green, .login .btn--green { background: linear-gradient(135deg, #5aa82a, #3f8419); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 20px -12px rgba(63, 132, 25, .95); }
.admin .btn--green:hover, .login .btn--green:hover { background: linear-gradient(135deg, #4f9a22, #336f13); }
.admin .btn--blue, .login .btn--blue { background: linear-gradient(135deg, #0d58ab, #013b7c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 20px -12px rgba(1, 59, 124, .95); }
.admin .btn--blue:hover, .login .btn--blue:hover { background: linear-gradient(135deg, #0a4c97, #012a58); }
.admin .btn--ghost { border-width: 1.5px; border-color: #c9d6e6; background: #fff; }
.admin .btn--ghost:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.editor__sub::before { background: linear-gradient(#5aa82a, #3f8419); }
@media (min-width: 1000px) { .agrid .acard { position: sticky; } }

/* ---- Donations list ---- */
.dsum--wide, .dsum--wide:has(.dsum__card--amber) { max-width: none; margin-bottom: 1rem; }
@media (min-width: 760px) { .dsum--wide, .dsum--wide:has(.dsum__card--amber) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dsum__card { background: radial-gradient(200px 120px at 100% 0%, #f1f8ec, transparent 70%), #fff; }
.dsum__card--blue { background: radial-gradient(200px 120px at 100% 0%, #edf3fc, transparent 70%), #fff; }
.dsum__card--amber { background: radial-gradient(200px 120px at 100% 0%, #fff6e8, transparent 70%), #fff; }
.filterbar .input { min-width: 0; }
@media (min-width: 760px) {
    .filterbar { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
    .filterbar .field:first-child { grid-column: span 2; }
    .filterbar__go { grid-column: span 2; justify-content: flex-end; margin-bottom: .6rem; }
}
@media (min-width: 1360px) {
    .filterbar { grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(0, 1fr)) repeat(2, minmax(150px, 1.2fr)) auto; }
    .filterbar .field:first-child, .filterbar__go { grid-column: auto; }
}

/* ---- Sign-in page ---- */
body.login { background: radial-gradient(700px 460px at 100% 0%, rgba(80, 155, 34, .38), transparent 60%), radial-gradient(640px 460px at 0% 100%, rgba(70, 130, 220, .38), transparent 60%), linear-gradient(135deg, #012f63, #011a38); }
body.login::before { content: ""; position: fixed; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1.2px, transparent 1.2px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse at center, #000 15%, transparent 70%); mask-image: radial-gradient(ellipse at center, #000 15%, transparent 70%); pointer-events: none; }
.login__box { position: relative; z-index: 1; max-width: 420px; animation: ad-rise .5s var(--ad-ease) both; }
.login__logo { border-radius: 14px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); }
.login__card { padding: 2rem 1.9rem 1.8rem; border-radius: 26px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
.login__card h1 { margin-bottom: .2rem; font-size: 1.5rem; letter-spacing: -.02em; }
.login__sub { margin: 0 0 1.25rem; color: var(--muted); font-size: .92rem; }
.login__card .input { border-width: 1.5px; border-color: #dbe3ee; background: #fbfcfe; }
.login__card .input:focus { background: #fff; }
@media (prefers-reduced-motion: reduce) { .login__box { animation: none; } }

/* ==========================================================================
   ADMIN: phones and small tablets
   ========================================================================== */

/* Swipeable tab strips instead of wrapping pills */
.itabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.itabs a { flex: none; white-space: nowrap; }
.itabs a.is-on { box-shadow: 0 6px 12px -8px rgba(1, 59, 124, .9); }
@media (max-width: 359px) { .dd:has(> .top__bell) { display: none; } }
.fjump, .snav { scrollbar-width: none; }
.admin .itabs::-webkit-scrollbar, .admin .fjump::-webkit-scrollbar, .admin .snav::-webkit-scrollbar { display: none; }

/* Drawer close button (the menu button sits under the open drawer) */
.side__close { position: absolute; top: 1.2rem; right: .9rem; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; transition: background .2s; }
.side__close:hover { background: rgba(255, 255, 255, .16); }
@media (min-width: 1024px) { .side__close { display: none; } }
@media (max-width: 1023px) { body.admin { --side-w: min(300px, 86vw); } }

/* Filters never push the page sideways */
@media (max-width: 759px) { .filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.filterbar .input { width: 100%; }

@media (max-width: 899px) {
    .statcards > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 759px) {
    .dsum--wide, .dsum--wide:has(.dsum__card--amber) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .dsum--wide .dsum__card { flex-direction: column; align-items: flex-start; gap: .55rem; padding: .8rem .75rem; border-radius: 16px; }
    .dsum--wide .dsum__ico { width: 36px; height: 36px; border-radius: 11px; }
    .dsum--wide .dsum__ico .i { width: 20px; height: 20px; }
    .dsum--wide .dsum__label { font-size: .62rem; letter-spacing: .04em; }
    .dsum--wide .dsum__card > div { flex: 1; }
    .dsum--wide .dsum__num { margin-top: auto; font-size: 1.1rem; }
    .filterbar__go .btn { flex: 1; justify-content: center; }
}

/* Table rows become cards: photo and title share the first line */
@media (max-width: 767px) {
    .table tr { border-color: var(--ad-border); border-radius: 18px; box-shadow: var(--ad-shadow); }
    .table td:has(> .cell-link) { justify-content: flex-start; text-align: left; }
    .table td:has(> .cell-link)::before { display: none; }
    .table tr:has(> td > .thumb) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
    .table tr:has(> td > .thumb) > td { grid-column: 1 / -1; }
    .table tr:has(> td > .thumb) > td:has(> .thumb) { grid-column: 1; width: auto; padding-right: 0; }
    .table tr:has(> td > .thumb) > td:has(> .cell-link) { grid-column: 2; padding-left: .8rem; }
    .table tbody tr:hover td:first-child { box-shadow: none; }
}

@media (max-width: 639px) {
    .top { gap: .5rem; padding-inline: .75rem; }
    .top__heading .top__title { font-size: 1.08rem; }
    .top__user { gap: .3rem; }
    .top__menu, .top__bell { width: 40px; height: 40px; }
    .top__add { width: 40px; padding: 0; justify-content: center; }
    .top__who { padding: 0; border: 0; }
    .top__who:hover { background: none; }
    .top__caret { display: none; }
    .content { padding: 1rem .85rem 2.5rem; }

    .dhero { padding: 1.3rem 1.2rem; border-radius: 20px; }
    .dhero__btns { width: 100%; }
    .dhero__btns .btn { flex: 1 1 auto; justify-content: center; }
    .statcards--money .statcard { padding: .85rem .9rem .95rem; }
    .statcards--money .statcard__label { font-size: .64rem; }
    .statcards--money .statcard__num { font-size: 1.35rem; }
    .statcard__icon--sm { width: 30px; height: 30px; border-radius: 9px; }
    .statcard__icon--sm .i { width: 15px; height: 15px; }
    .panel { padding: 1.1rem 1rem; border-radius: 18px; }

    .rhead { gap: .85rem; padding: 1rem; border-radius: 20px; }
    .rhead__ico { width: 46px; height: 46px; border-radius: 14px; }
    .rhead h2 { font-size: 1.15rem; }
    .rhead__act { width: 100%; }
    .rhead__act > .btn { flex: 1 1 auto; justify-content: center; }
    .rsearch { flex-basis: 100%; }
}
