/* Donately styles r4 */
/* Donately — styles
   Warm neutral + deep green/teal accent, WCAG AA, responsive. */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --ink: #18201d;
  --ink-soft: #43504a;
  --muted: #6b7a72;
  --line: #e4dfd3;
  --brand: #136b4c;
  --brand-600: #0f5940;
  --brand-50: #e9f3ee;
  --gold: #b5894b;
  --gold-50: #f7f0e3;
  --danger: #a23b3b;
  --danger-50: #faeaea;
  --warn: #9a6a14;
  --success: #1f7a4d;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(24, 32, 29, .06), 0 1px 1px rgba(24, 32, 29, .04);
  --shadow-md: 0 8px 24px -12px rgba(24, 32, 29, .18), 0 2px 6px rgba(24, 32, 29, .06);
  --shadow-lg: 0 30px 60px -25px rgba(24, 32, 29, .25);
  --maxw: 1180px;
  --font: "Inter", "e-Ukraine", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.container-narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

h1,h2,h3,h4 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .75rem 1.2rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; cursor: pointer; transition: .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-gold { background: var(--gold); color: #23180a; }
.btn-gold:hover { background: #a07a42; color: #23180a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: .95rem 1.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-sm { padding: .5rem .85rem; font-size: .88rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--brand-50); color: var(--brand-600);
}
.chip-gold { background: var(--gold-50); color: #6f5223; }
.chip-gray { background: #ece9e0; color: var(--ink-soft); }
.chip-danger { background: var(--danger-50); color: var(--danger); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, .85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: .55rem .8rem; border-radius: 10px; color: var(--ink-soft); font-weight: 500;
}
.nav-links a:hover { background: #efebdf; color: var(--ink); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px 16px; gap: 4px;
  }
  .nav-links.open a { padding: .85rem 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 72px 0 56px; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(181,137,75,.16), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(19,107,76,.12), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 .accent { color: var(--brand); }
.hero p.lead { margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px 24px; color: var(--muted); font-size: .92rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .4rem; }

.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; position: relative;
}
.hero-card h3 { margin: 0 0 14px; font-size: 1rem; color: var(--ink-soft); display: flex; justify-content: space-between; align-items: center; }
.mini-org { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.mini-org .logo { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-50); display: grid; place-items: center; color: var(--brand); font-weight: 800; }
.mini-org .name { font-weight: 700; }
.mini-org .sub { font-size: .85rem; color: var(--muted); }
.amount-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 14px; }
.amount {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px;
  padding: 12px 6px; text-align: center; font-weight: 700; cursor: pointer; transition: .15s;
}
.amount:hover { border-color: var(--brand); }
.amount.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.hc-methods { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.hc-methods .m {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .82rem;
  display: inline-flex; align-items: center; gap: 6px; background: #fff; font-weight: 600;
}

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

/* ---------- Logo strip ---------- */
.logos {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; align-items: center;
  padding: 28px 0; border-block: 1px solid var(--line); opacity: .8;
}
.logos div { display: grid; place-items: center; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
@media (max-width: 800px) { .logos { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: .15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: .96rem; }

.section-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
.eyebrow { color: var(--gold); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; margin-bottom: 10px; display: inline-block; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step);
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; margin-bottom: 12px;
}
.step h3 { font-size: 1.02rem; }
.step p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Stats band ---------- */
.band {
  background: linear-gradient(135deg, #0d4a36 0%, #136b4c 60%, #1a7a57 100%);
  color: #eaf5ef; border-radius: var(--radius-lg); padding: 40px;
}
.band .grid { gap: 32px; }
.band .stat .n { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.band .stat .l { color: #b8d4c6; font-size: .95rem; margin-top: 6px; }

/* ---------- Org cards (catalog) ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px;
}
.filter-bar button {
  padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 600; color: var(--ink-soft);
}
.filter-bar button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.org-card {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: .15s; box-shadow: var(--shadow-sm);
}
.org-card:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #d6d0c1; }
.org-top { display: flex; gap: 12px; align-items: center; }
.org-logo {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem;
}
.org-name { font-weight: 700; font-size: 1.05rem; }
.org-meta { font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.org-desc { font-size: .92rem; color: var(--ink-soft); margin: 0; flex: 1; }
.progress { height: 8px; background: #ece9e0; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #2e9e72); border-radius: 99px; }
.org-foot { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.raised { font-weight: 700; }
.raised small { color: var(--muted); font-weight: 500; }

/* palettes for org logos */
.bg-tile-1 { background: #e9f3ee; color: #0f5940; }
.bg-tile-2 { background: #f7f0e3; color: #8a6a2e; }
.bg-tile-3 { background: #eaeff6; color: #314d75; }
.bg-tile-4 { background: #f3e9f1; color: #7b3b6e; }
.bg-tile-5 { background: #e8f1f0; color: #2f6e68; }
.bg-tile-6 { background: #f7eae6; color: #8a4436; }

/* ---------- Search ---------- */
.search {
  display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 18px; box-shadow: var(--shadow-sm); max-width: 620px; margin: 0 auto 24px;
}
.search input {
  flex: 1; border: 0; outline: 0; font-size: 1rem; background: transparent; padding: 10px 0;
}
.search .btn { border-radius: 999px; }

.filter-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  max-width: 980px; margin: 0 auto 18px;
}
.filter-row .count { color: var(--muted); font-size: .92rem; }
.select {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font: inherit; color: var(--ink); min-width: 240px;
}
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.pager .pager-ell { color: var(--muted); padding: 0 4px; }
.catalog-meta { text-align:center; color: var(--muted); margin-top: 8px; font-size: .92rem; }

/* ---- Interactive map ---- */
.map-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.map-toolbar .left { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.map-toolbar input[type=search] {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; min-width: 260px; font: inherit;
}
#map {
  height: calc(100vh - 240px);
  min-height: 520px;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: #e6e9e3;
}
.ch-popup { font: 14px/1.45 var(--font); min-width: 240px; }
.ch-popup-head { font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.ch-popup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.ch-popup-list li { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.ch-popup-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ch-popup-list a { color: var(--brand-600); text-decoration: none; }
.ch-popup-list a:hover { text-decoration: underline; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.map-legend {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .9rem; color: var(--ink-soft);
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }
@media (max-width: 700px) {
  #map { height: 70vh; min-height: 420px; }
  .map-toolbar input[type=search] { min-width: 100%; }
}

/* ---------- Pricing ---------- */
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 14px; position: relative;
}
.plan.featured { border-color: var(--brand); box-shadow: var(--shadow-md); }
.plan .badge { position: absolute; top: -12px; left: 24px; }
.plan h3 { margin: 0; }
.price { font-size: 2.2rem; font-weight: 800; }
.price small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.fee { color: var(--ink-soft); font-size: .95rem; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.plan li svg { color: var(--success); flex: none; margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; color: var(--ink-soft); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: #121815; color: #c8d3cd; padding: 56px 0 28px; margin-top: 72px;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer a { color: #c8d3cd; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.foot-bottom {
  border-top: 1px solid #25302b; margin-top: 32px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: #8ea299; font-size: .88rem;
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Org page ---------- */
.org-header {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center;
  box-shadow: var(--shadow-sm);
}
.org-header .org-logo { width: 96px; height: 96px; font-size: 1.8rem; border-radius: 22px; }
.org-header h1 { margin: 0 0 4px; font-size: 1.8rem; }
.org-header .org-meta { font-size: .95rem; }
.org-verified { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 600; font-size: .9rem; }
@media (max-width: 720px) { .org-header { grid-template-columns: 72px 1fr; } .org-header .org-logo { width: 72px; height: 72px; } .org-header .cta-col { grid-column: 1 / -1; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 28px 0 18px; flex-wrap: wrap; }
.tabs a {
  padding: 10px 14px; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

.klb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi .v { font-size: 1.5rem; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) { .klb-row { grid-template-columns: 1fr; } }

.donate-aside {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-md); position: sticky; top: 90px;
}
.org-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .org-layout { grid-template-columns: 1fr; } .donate-aside { position: static; } }

.txn-list { display: grid; gap: 8px; }
.txn {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  font-size: .93rem;
}
.txn .who { font-weight: 600; }
.txn .when { color: var(--muted); font-size: .82rem; }
.txn .amt { font-weight: 700; }
@media (max-width: 540px) { .txn { grid-template-columns: 1fr auto; } .txn .when { grid-column: 1; } }

/* ---------- Checkout ---------- */
.checkout-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; padding: 28px 0; }
@media (max-width: 900px) { .checkout-wrap { grid-template-columns: 1fr; } }
.step-indicator { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.step-indicator .s { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.step-indicator .s .n { width: 26px; height: 26px; border-radius: 50%; background: #e7e3d7; display: grid; place-items: center; font-weight: 700; color: var(--ink-soft); }
.step-indicator .s.active { color: var(--ink); }
.step-indicator .s.active .n { background: var(--brand); color: #fff; }
.step-indicator .s.done .n { background: var(--success); color: #fff; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field .hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; background: #fff; color: var(--ink);
}
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-50); border-color: var(--brand); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.toggle input { width: 18px; height: 18px; accent-color: var(--brand); }

.pay-methods { display: grid; gap: 10px; }
.pay-method {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; background: #fff;
}
.pay-method:hover { border-color: var(--brand); }
.pay-method input { accent-color: var(--brand); }
.pay-method .badge-mini { margin-left: auto; font-size: .75rem; background: #efece3; padding: 3px 8px; border-radius: 99px; color: var(--ink-soft); font-weight: 600; }

.summary-line { display: flex; justify-content: space-between; padding: 6px 0; color: var(--ink-soft); }
.summary-line.total { font-weight: 800; color: var(--ink); border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; font-size: 1.1rem; }
.summary-org { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.security-note { display: flex; gap: 8px; align-items: start; font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* ---------- Portal / dashboard ---------- */
.portal { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 28px 0; }
.side {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; height: fit-content; position: sticky; top: 90px;
}
.side a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 500;
}
.side a.active { background: var(--brand-50); color: var(--brand-600); font-weight: 700; }
.side a:hover { background: #efebdf; text-decoration: none; }
.side .group-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 12px 12px 6px; font-weight: 700; }
@media (max-width: 820px) { .portal { grid-template-columns: 1fr; } .side { position: static; } }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .kpi-grid { grid-template-columns: 1fr; } }

.balance-card {
  background: linear-gradient(135deg, #0d4a36, #136b4c); color: #eaf5ef;
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-md);
}
.balance-card .label { color: #b8d4c6; font-size: .92rem; }
.balance-card .value { font-size: 2.2rem; font-weight: 800; margin: 4px 0 14px; }
.balance-card .mini { display: flex; justify-content: space-between; font-size: .9rem; color: #cce8db; border-top: 1px solid rgba(255,255,255,.15); padding-top: 10px; }

.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table tr:hover td { background: var(--surface-2); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; }
.s-paid { background: #e2f2ea; color: #17633e; }
.s-pending { background: #fdf2e0; color: #8a6012; }
.s-failed { background: #faeaea; color: #8a2b2b; }
.s-processing { background: #e6eefb; color: #2c4c83; }

.kyb-banner {
  border-radius: var(--radius); padding: 14px 18px; display: flex; gap: 14px; align-items: center;
  background: var(--gold-50); border: 1px solid #e8d4a8; color: #6f5223; margin-bottom: 18px;
}
.kyb-banner.danger { background: var(--danger-50); border-color: #e3bcbc; color: var(--danger); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(18,24,21,.55); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); max-width: 440px; width: 100%;
  padding: 26px; box-shadow: var(--shadow-lg);
}
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 10px; }
.toast {
  background: #121815; color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow-lg); max-width: 360px; font-size: .92rem;
  display: flex; gap: 10px; align-items: start;
}
.toast.success { background: #0f5940; }
.toast.error { background: #7c2a2a; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
.small { font-size: .88rem; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* Bank details in catalog cards */
.bank-box{margin-top:8px;padding:10px 12px;border-radius:10px;background:#f1f8f4;border:1px solid #d8ebde;font-size:12px;line-height:1.55;color:#1f3a2a}
.bank-box b{color:#0f7a49}
.bank-box a{color:#0f7a49;text-decoration:none;font-weight:600}
.chip-country{font-weight:600}
.chip-country.country-GB{background:#e7f0fd;color:#1e4fa3}
.chip-country.country-UA{background:#fff7e0;color:#8a6100}

/* ===== Mobile catalog fixes ===== */
@media (max-width: 640px) {
  body { -webkit-text-size-adjust: 100%; }
  .container { padding-left: 14px; padding-right: 14px; }
  h1 { font-size: 1.6rem !important; line-height: 1.2; }
  .section-head p { font-size: .92rem; }
  .filter-bar { justify-content: flex-start; gap: 8px; margin-bottom: 18px; }
  .filter-bar button { padding: .45rem .8rem; font-size: .9rem; }
  .filter-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-row .select { min-width: 0; width: 100%; }
  .filter-row .count { align-self: flex-start; }
  .search { max-width: 100%; margin: 0 0 18px; }
  .search input { font-size: 16px; }
  .org-card { padding: 14px; }
  .org-logo { width: 48px; height: 48px; border-radius: 12px; font-size: 1rem; }
  .org-name { font-size: 1rem; }
  .org-meta { gap: 6px; font-size: .78rem; }
  .bank-box { font-size: .82rem; padding: 8px 10px; }
  #uaTableBlock { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #uaTableBlock .data-table { font-size: .8rem; min-width: 560px; }
  #uaTableBlock th, #uaTableBlock td { padding: 8px 10px; white-space: nowrap; }
  #uaTableBlock th:nth-child(2), #uaTableBlock td:nth-child(2) {
    white-space: normal; min-width: 220px;
  }
  .pager { gap: 4px; margin-top: 20px; }
  .pager .btn-sm { padding: 6px 10px; font-size: .85rem; }
  .stat .n { font-size: 1.8rem; }
}
@media (max-width: 380px) {
  .filter-bar button { padding: .4rem .65rem; font-size: .84rem; }
  .org-meta .chip-gray, .org-meta .chip-country { display: none; }
}

/* ---- Multi-account bank block ---- */
.bank-box { background:#f1f8f4; border:1px solid #d8ebde; border-radius:12px; padding:10px 12px; }
.bnk-card { display:flex; flex-direction:column; gap:4px; }
.bnk-scope { align-self:flex-start; font-size:.72rem; font-weight:700; color:#0f7a49; background:#e3f3ea; border:1px solid #c9e6d5; border-radius:99px; padding:2px 9px; margin-bottom:2px; white-space:nowrap; }
.bnk-freq { align-self:flex-start; font-size:.72rem; font-weight:700; color:#5b4a9e; background:#efecfa; border:1px solid #dcd4f2; border-radius:99px; padding:2px 9px; margin-bottom:2px; white-space:nowrap; }
.bnk-card + .bnk-card { margin-top:10px; padding-top:10px; border-top:1px dashed #c9dfd1; }
.bnk-row { display:flex; justify-content:space-between; gap:12px; font-size:.88rem; line-height:1.35; }
.bnk-k { color:#5b7364; font-weight:600; flex:none; min-width:78px; }
.bnk-v { color:#0f3a26; text-align:right; word-break:break-all; }
.bnk-v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.82rem; }
.bnk-src { display:inline-block; margin-top:6px; color:#0f7a49; font-weight:600; font-size:.82rem; text-decoration:none; }
.bnk-src:hover { text-decoration:underline; }
.bnk-more { display:flex; flex-direction:column; gap:10px; margin-top:10px; padding-top:10px; border-top:1px dashed #c9dfd1; }
.bnk-more[hidden] { display:none; }
.bnk-toggle {
  margin-top:10px; width:100%; background:#e3f5ea; color:#0f7a49; border:1px solid #b9e2c4;
  border-radius:10px; padding:8px 10px; font-weight:600; font-size:.88rem; cursor:pointer;
  transition:.15s;
}
.bnk-toggle:hover { background:#d4efdf; }
.bnk-toggle[hidden] { display:none; }

/* Make the chip for number of accounts more noticeable */
.chip.chip-bank { background:#e3f5ea; color:#0f7a49; font-weight:600; }

@media (max-width: 640px) {
  .bnk-row { font-size:.82rem; gap:8px; }
  .bnk-k { min-width:64px; }
  .bnk-v.mono { font-size:.76rem; }
}
.count-pill{display:inline-flex;align-items:center;gap:.35em;padding:.05em .5em;margin-left:.35em;background:#e3f5ea;color:#0f7a49;border-radius:999px;font-size:.65em;font-weight:700;vertical-align:middle}
.count-pill[hidden]{display:none !important}

.count-static{
  color: var(--brand, #136b4c);
  font-weight: inherit;
  letter-spacing: normal;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
}
.chip-country.country-AU{background:#e6f7ee;color:#0c6b3d}
.chip-country.country-PL{background:#fdeaea;color:#a3271e}
.chip-country.country-ES{background:#fdeee3;color:#a3541e}
.flags-row{font-size:.95rem;letter-spacing:2px;white-space:nowrap;user-select:none}
.country-search{max-width:190px;padding:.45rem .7rem;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:.85rem}
.country-search:focus{outline:none;border-color:var(--brand,#136b4c);box-shadow:0 0 0 2px rgba(19,107,76,.15)}
.country-filter-box{display:flex;align-items:center;gap:10px;flex-wrap:wrap;width:100%}
.country-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.country-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border:1px solid var(--line,#d7e2dc);border-radius:99px;background:var(--surface,#fff);font-size:.9rem;font-weight:600;color:#33473d;cursor:pointer;transition:all .15s ease;line-height:1}
.country-chip:hover{border-color:var(--brand,#136b4c);background:#f2f8f4}
.country-chip.active{background:var(--brand,#136b4c);border-color:var(--brand,#136b4c);color:#fff}
.country-chip.active .chip-count{color:#d9efe3}
.country-chip .chip-count{font-weight:500;color:#7d8f85;font-size:.78rem}
.flag{width:24px;height:17px;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);flex:none;display:inline-block;vertical-align:middle}
@media (max-width:640px){
  .country-filter-box{flex-direction:column;align-items:stretch}
  .country-search{max-width:none;width:100%}
}
.country-chips{align-content:flex-start;overflow:hidden}
.country-chip{opacity:1;transition:opacity .12s ease}
.country-chip{touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none}
@media (max-width:640px){
  .country-chip{padding:9px 14px;font-size:.9rem;gap:8px}
  .flag{width:24px;height:17px}
  .country-chips{gap:8px}
}
#orgGrid{scroll-margin-top:70px}
.site-footer .foot-contact{color:#c8d3cd;display:block;padding:4px 0;font-size:.9rem}
.bank-note{margin-top:10px;padding:8px 12px;border-radius:10px;background:#f4f7f5;border:1px dashed #cfdcd4;font-size:.82rem;color:#5a6f64}
.bank-note a{color:var(--brand,#136b4c);font-weight:600;text-decoration:none}
.admin-table{width:100%;border-collapse:collapse;font-size:.85rem}
.admin-table th{text-align:left;padding:8px 10px;background:#f4f7f5;color:#41544a;font-size:.78rem;text-transform:uppercase;letter-spacing:.4px;border-bottom:1px solid #d7e2dc;position:sticky;top:0}
.admin-table td{padding:8px 10px;border-bottom:1px solid #e7efe9;vertical-align:top}
.admin-table .mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.8rem}
.admin-table-wrap{max-height:560px;overflow:auto;border:1px solid #d7e2dc;border-radius:12px}

/* Donate button on catalog cards */
.btn-donate{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin-top:auto;padding:12px 18px;width:100%;
  background:linear-gradient(135deg,#2b95e8 0%,#0596de 55%,#0670a8 100%);
  color:#fff;font-weight:700;font-size:.95rem;letter-spacing:.3px;text-decoration:none;
  border:none;border-radius:12px;cursor:pointer;position:relative;overflow:hidden;
  box-shadow:0 6px 16px -8px rgba(5,150,222,.55),inset 0 1px 0 rgba(255,255,255,.2);
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
.btn-donate svg{width:16px;height:16px;fill:currentColor;flex:none;transition:transform .2s ease}
.btn-donate::after{
  content:"";position:absolute;top:0;left:-80%;width:50%;height:100%;
  background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.3) 50%,transparent 80%);
  transform:skewX(-20deg);transition:left .5s ease;
}
.btn-donate:hover{transform:translateY(-2px);filter:brightness(1.07);
  box-shadow:0 12px 24px -10px rgba(5,150,222,.65),inset 0 1px 0 rgba(255,255,255,.2)}
.btn-donate:hover::after{left:130%}
.btn-donate:hover svg{transform:scale(1.2)}
.btn-donate:active{transform:translateY(0) scale(.985)}
.btn-donate:focus-visible{outline:3px solid var(--gold);outline-offset:2px}

/* maintenance banner (admin toggle) */
.maint-banner{background:#fff3cd;color:#664d03;border-bottom:1px solid #ffe69c;padding:10px 16px;text-align:center;font-weight:600;font-size:.92rem;position:sticky;top:0;z-index:99}

/* Header dropdown "Кабінет організації" */
.nav-dropdown{position:relative;display:inline-block}
.nav-dd-toggle{cursor:pointer;white-space:nowrap;font-family:inherit;padding:.42rem .75rem;font-size:.84rem;line-height:1.2}
.nav-dd-menu{position:absolute;top:calc(100% + 8px);right:0;min-width:248px;background:#fff;border:1px solid var(--line);
  border-radius:12px;box-shadow:var(--shadow-md);padding:6px;display:none;z-index:70}
.nav-dropdown.open .nav-dd-menu{display:block;animation:ddIn .14s ease}
@keyframes ddIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.nav-dd-menu a{display:block;padding:10px 12px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:.9rem;font-weight:500}
.nav-dd-menu a:hover{background:var(--brand-50);color:var(--brand)}
/* Auth panel (login / register) in portal */
.auth-tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.auth-tab{padding:9px 16px;border:1px solid var(--line);background:#fff;border-radius:10px;font-family:inherit;
  font-size:.9rem;font-weight:600;color:var(--muted);cursor:pointer;transition:.12s}
.auth-tab.active{background:var(--brand);border-color:var(--brand);color:#fff}
.auth-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.auth-form .full{grid-column:1/-1}
.auth-form input{width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:10px;font-size:.92rem;font-family:inherit;background:#fff}
.auth-form input:focus{outline:2px solid var(--brand);border-color:var(--brand)}
.auth-ok{grid-column:1/-1;background:#e5f4ec;color:#1f7a4d;border:1px solid #bfe3cf;border-radius:10px;padding:12px 14px;font-weight:600;font-size:.9rem}
@media(max-width:640px){.auth-form{grid-template-columns:1fr}}

/* compact cabinet button in header */
.nav-cab-btn{padding:.42rem .75rem;font-size:.84rem;line-height:1.2;white-space:nowrap}

/* temporarily disabled cabinet button */
.btn-disabled{opacity:.55;cursor:not-allowed;background:#eef0ec;color:#6b7a72;border:1px solid var(--line);text-decoration:none}
.btn-disabled:hover{background:#eef0ec;color:#6b7a72;box-shadow:none;transform:none}

/* ---------- Client login modal ---------- */
.login-overlay{position:fixed;inset:0;background:rgba(18,24,21,.55);display:flex;align-items:center;justify-content:center;z-index:100;padding:20px}
.login-overlay[hidden]{display:none}
.login-card{background:#fff;border-radius:18px;padding:30px 28px;width:100%;max-width:410px;position:relative;box-shadow:var(--shadow-lg)}
.login-card h3{margin:0 0 6px;font-size:1.15rem}
.login-close{position:absolute;top:12px;right:14px;background:none;border:none;font-size:1.15rem;cursor:pointer;color:var(--muted)}
.lg-btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px;border-radius:12px;font-weight:600;font-size:.95rem;cursor:pointer;margin-bottom:10px;border:1px solid var(--line);background:#fff;font-family:inherit;color:var(--ink)}
.lg-btn:hover{background:#f6f5f0}
.lg-btn svg{width:18px;height:18px;flex:none}
.login-step input{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:10px;font-size:1rem;margin:12px 0;font-family:inherit}
.login-step input:focus{outline:2px solid var(--brand);border-color:var(--brand)}
.lg-back{background:none;border:none;color:var(--muted);font-size:.85rem;cursor:pointer;margin-top:12px;font-family:inherit;padding:0}
.lg-err{color:var(--danger);font-size:.83rem;margin-top:4px}
.lg-demo{background:#f7f0e3;border:1px dashed #d9c49a;border-radius:10px;padding:8px 12px;font-size:.82rem;color:#7a5c22;margin-top:12px}
/* ---------- Favorite button on catalog cards ---------- */
.org-card{position:relative}
.fav-btn{position:absolute;top:12px;right:12px;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.15s;z-index:2;padding:0}
.fav-btn svg{width:17px;height:17px;fill:none;stroke:#c39292;stroke-width:2;transition:.15s}
.fav-btn:hover{border-color:#e3a0a0;transform:scale(1.1)}
.fav-btn.active{border-color:#e3a0a0;background:#fdf1f1}
.fav-btn.active svg{fill:#e25555;stroke:#e25555}
