/* =====================================================================
   LibDonate — app.css (чистий старт, Fragment-стиль)
   Один файл. Обидві теми. Без градієнтів/сяйва. Синій Telegram-акцент.
   ===================================================================== */

:root, [data-theme='dark'] {
    --bg: #17212b;
    --surface: #1a2530;
    --surface-2: #202b38;
    --soft: rgba(255,255,255,.035);
    --line: rgba(255,255,255,.08);
    --text: #ffffff;
    --muted: #7d8b99;
    --muted-2: #5d6b7a;
    --accent: #248bda;
    --accent-hover: #3a9be4;
    --on-accent: #ffffff;
    --input-bg: #131a22;
    --success: #4dab6d; --success-bg: rgba(77,171,109,.16);
    --warning: #d6a02a; --warning-bg: rgba(214,160,42,.16);
    --danger: #e0574e;  --danger-bg: rgba(224,87,78,.16);
    --info: #248bda;    --info-bg: rgba(36,139,218,.16);
    --secondary: #7d8b99; --secondary-bg: rgba(125,139,153,.16);
    --radius: 10px;
    --shadow: 0 6px 20px rgba(0,0,0,.30);
}
[data-theme='light'] {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #eef1f4;
    --soft: rgba(17,24,39,.03);
    --line: rgba(16,24,40,.10);
    --text: #17212b;
    --muted: #707885;
    --muted-2: #98a2b3;
    --accent: #248bda;
    --accent-hover: #1b7ac2;
    --on-accent: #ffffff;
    --input-bg: #ffffff;
    --success: #2f9e56; --success-bg: rgba(47,158,86,.12);
    --warning: #b9820f; --warning-bg: rgba(185,130,15,.12);
    --danger: #d33f36;  --danger-bg: rgba(211,63,54,.12);
    --info: #248bda;    --info-bg: rgba(36,139,218,.12);
    --secondary: #707885; --secondary-bg: rgba(112,120,133,.12);
    --shadow: 0 6px 20px rgba(15,23,42,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    transition: background-color .2s ease, color .2s ease;
    /* Футер завжди внизу: сторінка не менша за висоту екрана */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.container { width: min(920px, calc(100% - 32px)); margin: 0 auto; }

/* ---- Header ---- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__row {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); font-size: 16px; }
.brand__dot { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); display: inline-block; }
/* Логотип — картинка assets/img/logo-96.png (скруглений квадрат уже в самому файлі) */
.brand__logo {
    display: block; width: 30px; height: 30px; flex: 0 0 auto;
    object-fit: contain; user-select: none;
}
.nav { display: flex; gap: 4px; }
.nav a {
    color: var(--muted); font-size: 14px; font-weight: 500;
    padding: 7px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: inherit; font-weight: 600; font-size: 14px;
    padding: 9px 16px; border-radius: 8px;
    border: 1px solid transparent; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap; text-decoration: none;
}
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--soft); color: var(--text); }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* ---- Tags / badges ---- */
.tag {
    display: inline-flex; align-items: center;
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 5px;
}
.tag--success   { background: var(--success-bg); color: var(--success); }
.tag--warning   { background: var(--warning-bg); color: var(--warning); }
.tag--danger    { background: var(--danger-bg); color: var(--danger); }
.tag--info      { background: var(--info-bg); color: var(--info); }
.tag--secondary { background: var(--secondary-bg); color: var(--secondary); }

/* ---- Sections ---- */
main { padding: 28px 0 48px; }
.section { margin-bottom: 34px; }
.section__kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--muted); font-weight: 600; }
.section__title { font-size: 20px; font-weight: 700; margin: 4px 0 16px; }

/* ---- Hero ---- */
.hero {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px;
    margin-bottom: 16px;
}
.hero__box {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 28px;
}
.hero__tag {
    display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--accent); background: var(--info-bg);
    padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; font-weight: 600;
}
.hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; }
.hero p { color: var(--muted); margin: 0 0 20px; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.summary { display: flex; flex-direction: column; justify-content: center; gap: 0; }
.summary__title { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.summary__row { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary__row:last-child { border-bottom: 0; }
.summary__row span { color: var(--muted); font-size: 13px; }
.summary__row strong { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Trust strip ---- */
.trust { display: flex; flex-wrap: wrap; gap: 8px; }
.trust span {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--muted);
    border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}

/* ---- Urgent wide cards ---- */
.urgent { display: flex; flex-direction: column; gap: 10px; }
.urgent__card {
    display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px 20px;
}
.urgent__card h3 { margin: 8px 0 6px; font-size: 17px; }
.urgent__card p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.progress { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.urgent__side { display: flex; flex-direction: column; gap: 8px; min-width: 140px; }

/* ---- Catalog ---- */
.catalog { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.catalog--stacked { display: block; }

/* Горизонтальна панель фільтрів над списком */
.filterbar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 12px; margin-bottom: 14px;
}
.filterbar__field { flex: 0 0 auto; }
.filterbar__field--grow { flex: 1 1 240px; min-width: 200px; }
.filterbar__field .input, .filterbar__field .select { margin: 0; }
.filterbar__actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 640px) {
    .filterbar { flex-direction: column; align-items: stretch; }
    .filterbar__actions { margin-left: 0; }
    .filterbar__actions .btn { flex: 1; }
}
.filters { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.filters__title { font-weight: 700; margin-bottom: 14px; font-size: 15px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.input, .select {
    width: 100%; font: inherit; font-size: 14px;
    background: var(--input-bg); color: var(--text);
    border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
}
.input:focus, .select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.filters__actions { display: grid; gap: 8px; margin-top: 16px; }
.catalog__summary { color: var(--muted); font-size: 13px; margin-bottom: 10px; }

/* ---- List (Fragment rows) ---- */
.rows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); transition: background-color .13s ease; }
.row-item:last-child { border-bottom: 0; }
.row-item:hover { background: var(--soft); }
.row-item__main { min-width: 0; flex: 1; }
/* Ланцюг під назвою: номер → автор → місто → тип → статус */
.row-item__chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }

/* Номер збору — помітний бейдж */
.row-num {
    display: inline-flex; align-items: center;
    padding: 3px 9px; border-radius: 7px;
    background: var(--info-bg); color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Тип збору — кольоровий тег */
.type-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 7px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}
.type-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.type-tag--army  { background: rgba(132, 153, 60, .16); color: #9fb04a; }   /* оливковий */
.type-tag--civil { background: rgba(38, 166, 154, .16); color: #2fb3a5; }   /* бірюзовий */
.type-tag--other { background: var(--soft); color: var(--muted); }
[data-theme="light"] .type-tag--army  { background: rgba(107, 124, 38, .13); color: #5d6b1f; }
[data-theme="light"] .type-tag--civil { background: rgba(0, 128, 118, .11); color: #007a6f; }

/* Назва: повна на широких екранах, скорочена до 60 символів — на мобільних */
.row-item__title { font-weight: 600; font-size: 15px; line-height: 1.4; }
.row-item__title .t-short { display: none; }
/* Назва збору — посилання на його сторінку, але виглядає як заголовок */
a.row-item__title { display: block; color: var(--text); }
a.row-item__title:hover { color: var(--accent); }
/* «Хлібні крихти» на сторінці збору */
nav.ud__back a { color: var(--muted); }
nav.ud__back a:hover { color: var(--accent); }

.row-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.row-meta {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 7px;
    background: var(--soft); color: var(--muted);
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.row-meta .ti { font-size: 13px; }

/* Сума: «зібрано / ціль» */
.row-item__sum { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.row-item__got { color: var(--text); font-weight: 800; }
.row-item__sep { color: var(--muted-2); font-weight: 400; }
.row-item__goal { color: var(--text); }
.row-item__coll { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.row-item__side { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.row-item__sum { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; min-width: 104px; white-space: nowrap; }
.row-item__actions { display: flex; gap: 8px; }

.load-more { text-align: center; margin-top: 16px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.step__n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--info-bg); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 2px 0 6px; font-size: 15px; }
.step p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 36px 0 20px; color: var(--muted); font-size: 13.5px; background: var(--surface); }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 28px; }
.footer__brand { display: flex; gap: 12px; align-items: flex-start; }
.footer__name { font-weight: 700; font-size: 16px; color: var(--text); margin-bottom: 6px; }
.footer__desc { margin: 0; line-height: 1.6; max-width: 320px; }
.footer__col { display: flex; flex-direction: column; gap: 9px; }
.footer__col h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text); font-weight: 700; }
.footer__col a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    border-top: 1px solid var(--line); padding-top: 18px; font-size: 12.5px;
}
.footer__note { display: inline-flex; align-items: center; gap: 6px; }
.footer__note .ti { color: var(--success); }
@media (max-width: 860px) {

}
@media (max-width: 520px) {

}

/* ---- Theme toggle ---- */
.theme-toggle { background: transparent; border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle:hover { background: var(--soft); }
.theme-toggle[aria-pressed="true"] { color: var(--accent); }

/* ---- Спливаюче повідомлення (напр., тему не вдалося зберегти) ---- */
.toast {
    position: fixed; left: 50%; bottom: 20px; z-index: 200;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    max-width: min(460px, calc(100% - 32px));
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
    padding: 11px 16px; font-size: 14px; line-height: 1.45;
    transition: opacity .2s ease, transform .2s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ---- Auth / forms card ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.card--narrow { max-width: 420px; margin: 40px auto; }
.card h1 { font-size: 22px; margin: 0 0 6px; }
.card__sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.alert { border-radius: 8px; padding: 11px 14px; margin-bottom: 16px; font-size: 14px; border: 1px solid var(--line); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.alert-info { background: var(--info-bg); color: var(--text); border-color: transparent; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; }
    .catalog { grid-template-columns: 1fr; }
    .filters { position: static; }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .row-item__side { justify-content: space-between; }
    .row-item__sum { text-align: left; min-width: 0; }
    .urgent__card { grid-template-columns: 1fr; }
    .nav { display: none; }
}

/* =====================================================================
   Кабінет — дашборд-каркас
   ===================================================================== */
.dash { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.dash__side { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.dash__nav { display: flex; flex-direction: column; gap: 3px; }
.dash__nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px; }
.dash__nav a:hover { background: var(--soft); color: var(--text); }
.dash__nav a.active { background: var(--info-bg); color: var(--accent); }
.dash__nav .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dash__nav a.danger { color: var(--danger); }
.dash__nav a.danger:hover { background: var(--danger-bg); }
.dash__main { min-width: 0; }

.dash-hero { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 16px; }
.dash-hero h1 { margin: 6px 0 2px; font-size: 22px; }
.dash-hero .chip { display: inline-block; font-size: 12px; color: var(--muted); background: var(--soft); padding: 3px 10px; border-radius: 999px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stat span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.stat strong { font-size: 22px; font-variant-numeric: tabular-nums; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel__head h2 { font-size: 16px; margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .sub { color: var(--muted); font-size: 12.5px; }
.table .num { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }

@media (max-width: 860px) {
    .dash { grid-template-columns: 1fr; }
    .dash__side { position: static; }
    .dash__nav { flex-direction: row; flex-wrap: wrap; }
    .dash__nav a { flex: 1 1 auto; justify-content: center; }
    .dash__nav .sep { display: none; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px; }
    .table td { border: 0; padding: 6px 10px; }
}

/* ---- Адмінка ---- */
.container--wide { width: min(1120px, calc(100% - 32px)); }
.status-form { display: inline-flex; gap: 6px; align-items: center; }
.status-form select { font: inherit; font-size: 13px; background: var(--input-bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-tabs a { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.filter-tabs a:hover { color: var(--text); background: var(--soft); }
.filter-tabs a.active { background: var(--info-bg); color: var(--accent); border-color: transparent; }

/* ---- Urgent detail (ud) ---- */
.ud__back { display: inline-block; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.ud__back:hover { color: var(--text); }

/* Hero */
.ud__hero {
    position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: 16px;
    margin-bottom: 22px; min-height: 220px;
    display: flex; align-items: flex-end;
    background: var(--surface);
}
.ud__hero-media {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: saturate(1.05);
}
.ud__hero-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(23,33,43,.15) 0%, rgba(23,33,43,.55) 55%, rgba(23,33,43,.92) 100%);
}

/* Карусель фото — у блоці контенту */
.ud__carousel {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--soft);
}
.ud__slides { position: absolute; inset: 0; }
.ud__slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity .35s ease;
    pointer-events: none;
}
.ud__slide.is-active { opacity: 1; }
.ud__nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(23,33,43,.55); color: #fff; border: 1px solid rgba(255,255,255,.25);
    font-size: 22px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color .15s ease;
}
.ud__nav:hover { background: rgba(23,33,43,.85); }
.ud__nav--prev { left: 12px; }
.ud__nav--next { right: 12px; }
.ud__dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 3;
    display: flex; gap: 7px;
}
.ud__dot {
    width: 8px; height: 8px; border-radius: 50%; cursor: pointer;
    background: rgba(255,255,255,.5); border: 0; padding: 0;
    transition: background-color .15s ease, transform .15s ease;
}
.ud__dot.is-active { background: #fff; transform: scale(1.25); }
.ud__hero--nocover { min-height: 0; }
.ud__hero-body { position: relative; z-index: 1; padding: 24px 26px; width: 100%; }
.ud__hero--nocover .ud__hero-body { padding: 26px; }
.ud__badge { margin-bottom: 12px; }
.ud__hero h1 { font-size: 28px; line-height: 1.15; margin: 0; color: #fff; }
.ud__hero--nocover h1 { color: var(--text); }
.ud__lead { font-size: 15px; margin: 10px 0 0; color: rgba(255,255,255,.85); max-width: 640px; }
.ud__hero--nocover .ud__lead { color: var(--muted); }

/* Grid */
.ud__grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.ud__content { min-width: 0; }

/* Blocks */
.ud__block { margin-bottom: 22px; }
.ud__block h2 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.ud__ico { font-size: 18px; }
.ud__block p { color: var(--muted); line-height: 1.75; margin: 0; }
.ud__muted { color: var(--muted); margin-bottom: 12px !important; }
/* Опис збору від автора — основним кольором тексту (у світлій темі чорний), не приглушеним */
.ud__desc { color: var(--text); font-size: 15.5px; line-height: 1.75; overflow-wrap: anywhere; }

/* Requisites */
.ud__block--req .ud__req {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    background: var(--info-bg); border: 1px solid var(--line);
    border-radius: 10px; padding: 16px;
}
.ud__req code { color: var(--text); font-size: 14px; line-height: 1.6; word-break: break-word; font-family: ui-monospace, monospace; }
.ud__copy { flex-shrink: 0; }

/* Card */
.ud__aside { position: sticky; top: 76px; }
.ud__card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.ud__amount { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ud__amount-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ud__progress { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.ud__progress-bar { flex: 1; height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.ud__progress-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.ud__progress-pct { font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.ud__rows { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 18px; }
.ud__row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.ud__row span { color: var(--muted); }
.ud__row strong { font-variant-numeric: tabular-nums; }
.ud__cta { font-size: 15px; padding: 12px; }
.ud__closed { text-align: center; color: var(--muted); font-size: 14px; padding: 10px; background: var(--soft); border-radius: 8px; }

@media (max-width: 860px) {
    .ud__grid { grid-template-columns: 1fr; }
    .ud__aside { position: static; }
    .ud__hero h1 { font-size: 24px; }
}

/* ---- Перемикач типу акаунта (реєстрація) ---- */
.acct-switch { display: flex; gap: 8px; margin-bottom: 18px; }
.acct-opt {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 12px; border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted);
    text-align: center; transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.acct-opt input { position: absolute; opacity: 0; pointer-events: none; }
.acct-opt.is-active { border-color: var(--accent); color: var(--text); background: var(--info-bg); }

/* ---- Бейдж фонду ---- */
.fund-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 5px;
    background: var(--info-bg); color: var(--accent);
}
.fund-badge--verified::before { content: "✓ "; }
a.fund-badge { text-decoration: none; transition: background-color .15s ease; }
/* Бейдж із назвою фонду: довга назва — в один рядок із трикрапкою */
.fund-badge--name { display: inline-block; max-width: min(240px, 62vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
a.fund-badge:hover { background: var(--accent); color: #fff; }
.fundlink { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--info-bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.fundlink code { color: var(--text); font-family: ui-monospace, monospace; font-size: 13px; flex: 1; min-width: 180px; word-break: break-all; }

/* ---- Публічна сторінка фонду ---- */
.fundp__head {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; padding: 24px; margin-bottom: 14px;
}
.fundp__id { display: flex; gap: 18px; align-items: center; }
.fundp__avatar {
    flex: 0 0 auto; width: 64px; height: 64px; border-radius: 14px;
    background: var(--info-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; text-transform: uppercase;
}
.fundp__badges { margin-bottom: 6px; }
.fundp__head h1 { font-size: 24px; margin: 0 0 6px; }
.fundp__meta { color: var(--muted); font-size: 14px; }
.fundp__meta a { color: var(--accent); }
.fundp__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) {
    .fundp__stats { grid-template-columns: 1fr; }
    .fundp__id { flex-direction: column; align-items: flex-start; }
}

/* ---- Каталог фондів ---- */
.funds-dir { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fundcard {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 16px; text-decoration: none; color: var(--text);
    transition: border-color .15s ease, background-color .15s ease;
}
.fundcard:hover { border-color: var(--accent); background: var(--soft); }
.fundcard__avatar {
    flex: 0 0 auto; width: 48px; height: 48px; border-radius: 11px;
    background: var(--info-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; text-transform: uppercase;
}
.fundcard__body { flex: 1; min-width: 0; }
.fundcard__name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.fundcard__name .fund-badge { font-size: 0; padding: 3px; }
.fundcard__name .fund-badge--verified::before { font-size: 11px; }
.fundcard__meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.fundcard__arrow { color: var(--muted); font-size: 18px; flex: 0 0 auto; }
@media (max-width: 640px) { .funds-dir { grid-template-columns: 1fr; } }

/* ---- Прогрес суми в кабінеті ---- */
.mini-progress { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-bottom: 4px; }
.mini-progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.collected-form { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.input--xs { width: 120px; padding: 6px 9px; font-size: 13px; }

/* ---- Прогрес у рядку каталогу ---- */
.row-item__sumwrap { text-align: right; }
.row-item__coll { display: block; font-size: 11.5px; color: var(--success); margin-top: 2px; white-space: nowrap; }

/* ---- Перемикач-тумблер (налаштування адмінки) ---- */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.toggle-row > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.toggle-hint { color: var(--muted); font-size: 13px; font-weight: 400; max-width: 400px; }
.toggle { flex: 0 0 auto; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track {
    display: block; width: 46px; height: 26px; border-radius: 99px;
    background: var(--soft); border: 1px solid var(--line);
    transition: background-color .18s ease;
}
.toggle__thumb {
    position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--muted); transition: transform .18s ease, background-color .18s ease;
}
.toggle input:checked + .toggle__track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle__track .toggle__thumb { transform: translateX(20px); background: #fff; }

/* ---- Кнопки дій в адмінці ---- */
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.08); color: #fff; }
.mod-detail__desc { color: var(--text); font-size: 14px; line-height: 1.6; margin-bottom: 12px; padding: 10px 12px; background: var(--soft); border-radius: 8px; overflow-wrap: anywhere; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.admin-actions form { margin: 0; }

/* ---- Випадаюче меню дій (адмінка) ---- */
.dropdown { position: relative; display: inline-block; text-align: left; }
.dropdown__menu {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
    min-width: 190px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow);
    display: none; flex-direction: column; gap: 2px;
}
.dropdown.is-open .dropdown__menu { display: flex; }
.dropdown__menu form { margin: 0; }
.dropdown__item {
    display: block; width: 100%; text-align: left;
    padding: 8px 10px; border-radius: 7px; border: 0; background: transparent;
    color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none;
    box-sizing: border-box; transition: background-color .12s ease;
}
.dropdown__item:hover { background: var(--soft); }
.dropdown__item--danger { color: var(--danger); }
.dropdown__item--danger:hover { background: var(--danger-bg); }
.dropdown__sep { height: 1px; background: var(--line); margin: 4px 2px; }

/* ---- Заявки на модерації: розгортувані рядки ---- */
.table--mod td { vertical-align: middle; }
.mod-toggle { white-space: nowrap; }
.mod-toggle.is-open { color: var(--accent); }
.mod-detail > td { padding: 0 10px 14px; }
.mod-detail__grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 20px;
    background: var(--soft); border: 1px solid var(--line); border-radius: 10px;
    padding: 16px; margin-top: 2px;
}
.mod-detail__item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mod-detail__item span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mod-detail__item b { font-size: 14px; font-weight: 600; word-break: break-word; }
.mod-detail__item a { color: var(--accent); word-break: break-all; }
.mod-detail__item--wide { grid-column: 1 / -1; }
.mod-detail__actions { margin-top: 12px; }

@media (max-width: 760px) {
    .table--mod .hide-sm { display: none; }
    .mod-detail__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .mod-detail__grid { grid-template-columns: 1fr; }
}

/* ---- Іконки Tabler: вирівнювання ---- */
.ti { vertical-align: -0.125em; }
.btn .ti { font-size: 1.05em; }
.nav a .ti, .dash__nav a .ti { font-size: 1.1em; opacity: .9; }
.section__kicker .ti, .hero__tag .ti, .trust .ti { font-size: 1.05em; }
.trust .ti { color: var(--accent); }

/* ---- Верифікація фонду ---- */
.verify-done { display: flex; align-items: center; gap: 14px; }
.verify-done .ti { font-size: 40px; color: var(--success); flex: 0 0 auto; }
.verify-token { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.verify-token code { display: block; word-break: break-all; color: var(--accent); font-family: ui-monospace, monospace; font-size: 13px; margin: 4px 0; }

/* ---- Компактний фільтр в один рядок ---- */
.filterbar--compact {
    display: flex; flex-wrap: nowrap; gap: 8px; padding: 10px; align-items: center;
}
.filterbar__row { display: flex; gap: 8px; align-items: center; flex: 1 1 auto; min-width: 0; }
.filterbar__more { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
/* Кнопка «Фільтри» потрібна лише на вузьких екранах */
.filterbar__toggle { display: none; }
.filterbar__count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
}
/* Лічильник «0» не показуємо (display вище перебивав атрибут hidden). */
.filterbar__count[hidden] { display: none; }
.filterbar--compact .filterbar__field--grow { position: relative; flex: 1 1 auto; min-width: 160px; }
.filterbar--compact .filterbar__ico {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 16px; pointer-events: none;
}
.filterbar--compact .filterbar__field--grow .input { padding-left: 32px; }
.filterbar--compact .input,
.filterbar--compact .select { height: 38px; padding-top: 0; padding-bottom: 0; font-size: 13.5px; }
.filterbar--compact .select { flex: 0 0 auto; width: auto; min-width: 118px; max-width: 170px; }
.btn-icon { width: 38px; height: 38px; padding: 0; flex: 0 0 auto; }
.btn-icon .ti { font-size: 17px; }
@media (max-width: 760px) {
    .filterbar--compact { flex-wrap: wrap; }
    .filterbar--compact .select { flex: 1 1 calc(50% - 4px); max-width: none; }
    .filterbar--compact .filterbar__field--grow { flex: 1 1 100%; }
}

/* ---- Сторінка «Як це працює» ---- */
.howpage__title { font-size: 30px; margin: 4px 0 10px; }
.section__lead { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 4px; max-width: 700px; }
.howsteps { display: flex; flex-direction: column; gap: 12px; }
.howstep {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px;
}
.howstep__n {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
    background: var(--info-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}
.howstep h3 { margin: 4px 0 6px; font-size: 16px; }
.howstep p { margin: 0; color: var(--muted); line-height: 1.7; }
.howgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.howcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.howcard__ico {
    width: 42px; height: 42px; border-radius: 11px; margin-bottom: 10px;
    background: var(--info-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.howcard h3 { margin: 0 0 6px; font-size: 16px; }
.howcard p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.howlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.howlist li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); line-height: 1.7; }
.howlist li .ti { color: var(--accent); font-size: 20px; flex: 0 0 auto; margin-top: 2px; }
.howlist li strong { color: var(--text); }
.howcta {
    display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px;
}
.howcta h3 { margin: 0 0 4px; font-size: 18px; }
.howcta p { margin: 0; color: var(--muted); }
.howcta__actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .howgrid { grid-template-columns: 1fr; } }

/* ---- Перемикач з трьох ролей ---- */
.acct-switch--3 { gap: 6px; }
.acct-switch--3 .acct-opt {
    padding: 11px 6px; font-size: 13px;
    white-space: nowrap;           /* підпис не переноситься на другий рядок */
}
.acct-switch--3 .acct-opt span {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    white-space: nowrap;
}
.acct-switch--3 .acct-opt .ti { font-size: 17px; flex: 0 0 auto; }
@media (max-width: 460px) {
    .acct-switch--3 { flex-direction: column; }
    .acct-switch--3 .acct-opt { padding: 11px 14px; }
    .acct-switch--3 .acct-opt span { justify-content: flex-start; }
}

/* ---- Опис волонтера ---- */
.fundcard__about { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.fundp__about {
    color: var(--muted); line-height: 1.7; margin: 0 0 14px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 16px;
}

/* ---- Інструкція отримання витягу ---- */
.howsteps-inline { margin: 8px 0 0; padding-left: 20px; color: var(--text); font-size: 13.5px; line-height: 1.8; }
.howsteps-inline li { margin-bottom: 2px; }

/* ---- Банер «потрібна верифікація» ---- */
.verify-required {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: var(--warning-bg); border: 1px solid var(--line);
    border-radius: 12px; padding: 16px 18px; margin-bottom: 16px;
}
.verify-required > .ti { font-size: 26px; color: var(--warning); flex: 0 0 auto; }
.verify-required__body { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.verify-required__body strong { color: var(--text); }
.verify-required__body span { color: var(--muted); font-size: 13.5px; }

/* ---- Статуси профілю (текстові) ---- */
.status-ok, .status-warn, .status-bad { display: inline-flex; align-items: center; gap: 4px; }
.status-ok   { color: var(--success); }
.status-warn { color: var(--warning); }
.status-bad  { color: var(--danger); }

/* =====================================================================
   МОБІЛЬНА АДАПТАЦІЯ
   ===================================================================== */

/* --- Глобальний захист від горизонтального виходу за межі --- */
html, body { max-width: 100%; overflow-x: hidden; }
/* overflow-x: hidden робить body окремим контейнером прокрутки, і «липка» шапка
   (position: sticky) перестає триматися вгорі. clip обрізає так само, але без цього. */
@supports (overflow-x: clip) {
    html, body { overflow-x: clip; }
}
img, svg, video, iframe { max-width: 100%; height: auto; }
/* Довгі посилання та слова переносяться, а не розпирають блок */
a, p, td, li, code, .sub, .row-item__title, .fundcard__name,
.mod-detail__item b, .ud__req code, .verify-token code {
    overflow-wrap: anywhere;
    word-break: break-word;
}
pre, code { white-space: pre-wrap; }

/* --- Бургер-кнопка --- */
.burger {
    display: none; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 38px; padding: 0 9px;
    background: transparent; border: 1px solid var(--line); border-radius: 8px;
    cursor: pointer; flex: 0 0 auto;
}
.burger span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- Бічна панель меню (drawer) --- */
.drawer-overlay {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    opacity: 0; transition: opacity .25s ease;
}
.drawer-overlay.is-open { opacity: 1; }

.drawer {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    width: min(320px, 85vw);
    background: var(--surface);
    border-right: 1px solid var(--line);
    box-shadow: 8px 0 30px rgba(0, 0, 0, .35);
    display: flex; flex-direction: column;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    /* Відступ під «чубчик» і системні панелі на телефонах */
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.drawer.is-open { transform: translateX(0); }
/* Закрита панель: display:flex вище перебиває атрибут hidden, тож без цього
   правила тінь схованої панелі було видно смужкою біля лівого краю кожної
   сторінки, а посилання меню лишалися доступними з клавіатури (Tab). */
.drawer[hidden] { visibility: hidden; box-shadow: none; }

/* Вміст панелі має бути видимим завжди, незалежно від інших правил */
.drawer__nav { display: flex !important; }
.drawer__nav a,
.drawer__logout,
.drawer__logout button { display: flex !important; }
.drawer__sep { display: block !important; }

.drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.drawer__title { font-weight: 700; font-size: 15px; }
.drawer__close {
    width: 34px; height: 34px; border-radius: 8px;
    background: transparent; border: 1px solid var(--line); color: var(--text);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.drawer__close:hover { background: var(--soft); }

.drawer__nav { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.drawer__nav a,
.drawer__logout button {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 12px; border-radius: 9px;
    color: var(--text); font-size: 15px; font-weight: 500;
    background: transparent; border: 0; width: 100%; text-align: left;
    font-family: inherit; cursor: pointer;
}
.drawer__nav a:hover, .drawer__nav a:active,
.drawer__logout button:hover { background: var(--soft); }
.drawer__nav a .ti, .drawer__logout button .ti { font-size: 19px; color: var(--muted); }
.drawer__sep { height: 1px; background: var(--line); margin: 8px 4px; }
.drawer__logout { margin: 0; }
.drawer__logout button { color: var(--danger); }
.drawer__logout button .ti { color: var(--danger); }
.drawer__cta {
    background: var(--accent); color: #fff !important;
    justify-content: center; margin-top: 8px;
}
.drawer__cta .ti { color: #fff !important; }

/* Блокування прокрутки сторінки, поки відкрита панель */
body.drawer-open { overflow: hidden; }

/* --- Планшети --- */
@media (max-width: 900px) {
    .container, .container--wide { width: calc(100% - 24px); }
}

/* --- Телефони --- */
@media (max-width: 720px) {
    .container, .container--wide { width: calc(100% - 20px); }

    /* Меню: ховаємо горизонтальне, показуємо бургер */
    .nav { display: none; }
    .burger { display: flex; }
    .header-actions { gap: 6px; }
    /* У кнопках лишаємо лише іконки — підписи з'їдають ширину */
    .header-user span, .header-login span, .header-submit span { display: none; }
    .header-user, .header-login, .header-submit { padding: 8px 10px; }

    /* Заголовки трохи менші */
    .hero h1 { font-size: 24px; }
    .howpage__title { font-size: 24px; }
    .section__title { font-size: 18px; }
    .ud__hero h1 { font-size: 21px; }
    .fundp__head h1 { font-size: 20px; }

    /* Панелі й картки — менші відступи */
    .panel, .card, .hero__box, .dash-hero, .fundp__head, .howstep, .howcard, .howcta { padding: 16px; }
    .card--narrow { margin: 20px auto; }

    /* Таблиці стають картками (заголовки ховаємо) */
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr {
        border: 1px solid var(--line); border-radius: 10px;
        margin-bottom: 10px; padding: 10px; background: var(--surface);
    }
    .table td { border: 0; padding: 5px 2px; }
    .table td.text-right { text-align: left; }
    .table .admin-actions, .table .status-form { justify-content: flex-start; flex-wrap: wrap; }
    .table .dropdown { width: 100%; }
    .table .dropdown__menu { right: auto; left: 0; width: 100%; }

    /* Розгорнуті деталі заявки */
    .mod-detail > td { padding: 0 0 10px; }
    .mod-detail__grid { grid-template-columns: 1fr; padding: 12px; }

    /* Фільтр — у два ряди, без горизонтальної прокрутки */
    /* Фільтр: видно лише пошук і кнопку «Фільтри»; решта — розкривається */
    .filterbar--compact { flex-direction: column; align-items: stretch; gap: 8px; }
    .filterbar__row { flex: 1 1 auto; }
    .filterbar__field--grow { flex: 1 1 auto; min-width: 0; }
    .filterbar--compact .input { min-height: 42px; box-sizing: border-box; width: 100%; }
    .filterbar__toggle {
        display: inline-flex; align-items: center; gap: 6px;
        flex: 0 0 auto; min-height: 42px; white-space: nowrap; padding: 0 12px;
    }
    .filterbar__toggle span:not(.filterbar__count) { display: none; }  /* лишаємо іконку + лічильник */
    .filterbar__more { display: none; flex-direction: column; gap: 8px; }
    .filterbar__more.is-open { display: flex; }
    .filterbar--compact .select {
        width: 100%; max-width: none; min-width: 0;
        min-height: 42px; box-sizing: border-box;
    }
    .filterbar__reset { width: 100%; min-height: 42px; }

    /* --- Список зборів: кожен рядок стає карткою --- */
    .rows { background: transparent; border: 0; border-radius: 0; gap: 10px; }
    .row-item {
        flex-direction: column; align-items: stretch; gap: 10px;
        background: var(--surface); border: 1px solid var(--line);
        border-radius: 12px; padding: 14px;
    }
    .row-item:last-child { border-bottom: 1px solid var(--line); }
    .row-item:hover { background: var(--surface); }

    /* Назва: на мобільному — скорочена версія до 60 символів */
    .row-item__title { font-size: 15.5px; line-height: 1.35; }
    .row-item__title .t-full  { display: none; }
    .row-item__title .t-short { display: inline; }
    .row-item__chain { margin-top: 8px; gap: 5px; }
    .row-item__meta { font-size: 12px; }

    /* Низ картки: сума зліва, кнопки справа на всю ширину */
    .row-item__side {
        flex-direction: column; align-items: stretch; gap: 10px;
        border-top: 1px solid var(--line); padding-top: 10px;
    }
    .row-item__sumwrap { text-align: left; }
    .row-item__sum { font-size: 18px; text-align: left; min-width: 0; }
    .row-item__coll { white-space: normal; }
    .row-item__actions { gap: 8px; }
    .row-item__actions .btn { flex: 1; min-height: 40px; justify-content: center; }

    /* Порожній стан */
    .empty { padding: 28px 16px; }

    /* Кабінет / адмінка: сайдбар зверху горизонтальною стрічкою */
    .dash { grid-template-columns: 1fr; gap: 12px; }
    .dash__side { position: static; }
    .dash__nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .dash__nav a { flex: 1 1 auto; justify-content: center; font-size: 13px; padding: 9px 10px; }
    .dash__nav .sep { display: none; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat { padding: 12px; }
    .stat strong { font-size: 19px; }

    /* Термінові збори */
    .urgent__card { grid-template-columns: 1fr; padding: 16px; }
    .urgent__side { min-width: 0; }
    .ud__grid { grid-template-columns: 1fr; }
    .ud__aside { position: static; }
    .ud__nav { width: 32px; height: 32px; font-size: 18px; }

    /* Форми — зручні для пальця, без зуму на iOS */
    .input, .select, textarea { font-size: 16px; }
    .btn { padding: 10px 14px; }

    /* Футер */

}

/* --- Малі телефони --- */
@media (max-width: 400px) {
    .container, .container--wide { width: calc(100% - 16px); }
    .stat-grid { grid-template-columns: 1fr; }
    .brand { font-size: 15px; }
    .brand__logo { width: 26px; height: 26px; }
    .acct-switch--3 { flex-direction: column; }
}

/* =====================================================================
   Юридичні документи
   ===================================================================== */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.75; }
.legal__head { margin-bottom: 22px; }
.legal__head h1 { font-size: 30px; margin: 6px 0 6px; }
.legal__lead { color: var(--muted); margin: 0 0 10px; font-size: 15px; }
.legal__meta { font-size: 13px; color: var(--muted); }
.legal__toc {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px 22px; margin-bottom: 28px;
}
.legal__toc strong { display: block; margin-bottom: 6px; }
.legal__toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; font-size: 14px; }
.legal__toc li { margin-bottom: 3px; break-inside: avoid; }
.legal section { margin-bottom: 26px; scroll-margin-top: 80px; }
.legal h2 { font-size: 19px; margin: 0 0 10px; }
.legal h3 { font-size: 15px; margin: 16px 0 6px; }
.legal p { margin: 0 0 10px; color: var(--text); }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 5px; }
.legal code { font-size: 13px; background: var(--soft); padding: 1px 6px; border-radius: 5px; }
.legal__terms { display: grid; grid-template-columns: 200px 1fr; gap: 8px 18px; margin: 0; }
.legal__terms dt { font-weight: 600; color: var(--text); }
.legal__terms dd { margin: 0; color: var(--muted); }
.legal__foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 30px; font-size: 14px; color: var(--muted); }
/* Незаповнений реквізит — видно власнику сайту */
.legal-todo {
    background: var(--warning-bg); color: var(--warning);
    padding: 1px 6px; border-radius: 5px; font-weight: 600;
}

/* Посилання на документи у футері */
.footer__legal { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.footer__legal a { color: var(--muted); }
.footer__legal a:hover { color: var(--accent); }

/* Згода при реєстрації */
.consent {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 6px 0 16px; font-size: 13px; line-height: 1.6; color: var(--muted); cursor: pointer;
}
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.consent a { color: var(--accent); }

@media (max-width: 720px) {
    .legal__head h1 { font-size: 23px; }
    .legal__toc ol { columns: 1; }
    .legal__terms { grid-template-columns: 1fr; gap: 2px; }
    .legal__terms dt { margin-top: 8px; }
}

/* ---- «Як це працює»: три типи акаунтів і посилання на документи ---- */
.howgrid--3 { grid-template-columns: repeat(3, 1fr); }
.howpage__docs { color: var(--muted); font-size: 14px; margin-top: 16px; }
@media (max-width: 900px) { .howgrid--3 { grid-template-columns: 1fr; } }
/* ---- Рядок форми верифікації ---- */
.verify-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 720px) {
    .verify-row .input { flex: 1 1 100% !important; max-width: none !important; min-width: 0 !important; }
    .verify-row .btn { flex: 1 1 100%; }
}

/* ---- Cloudflare Turnstile ---- */
.captcha { margin: 4px 0 14px; min-height: 65px; }
.captcha .cf-turnstile { width: 100%; }

/* ---- Заблоковані поля профілю ---- */
.field-locked {
    padding: 10px 12px; border-radius: 9px; border: 1px dashed var(--line);
    background: var(--soft); color: var(--text); font-weight: 600;
}
.field-hint {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: 12.5px; line-height: 1.55; color: var(--muted); margin: -4px 0 16px;
}
.field-hint .ti { flex: 0 0 auto; margin-top: 2px; }

/* ---- Стан «документ на перевірці» ---- */
.verify-pending {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--info-bg); border: 1px solid var(--line);
    border-radius: 12px; padding: 16px;
}
.verify-pending > .ti { font-size: 28px; color: var(--accent); flex: 0 0 auto; }
.verify-pending strong { display: block; margin-bottom: 4px; }
.verify-pending span { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ---- Форма подачі ---- */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-note { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ---- Адмінка: тип акаунта ---- */
.acc-type { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }


/* =====================================================================
   Футер і термінові збори на мобільних — єдине узгоджене правило
   ===================================================================== */
@media (max-width: 860px) {
    .footer__top { grid-template-columns: 1fr 1fr; gap: 22px 20px; }
    .footer__brand { grid-column: 1 / -1; }
    .footer__desc { max-width: none; }
}
@media (max-width: 720px) {
    .site-footer {
        margin-top: 32px;
        padding: 24px 0 calc(16px + env(safe-area-inset-bottom, 0px));
        font-size: 13px;
    }
    .footer__top { grid-template-columns: 1fr 1fr; gap: 18px 16px; padding-bottom: 18px; }
    .footer__brand .brand__logo { width: 28px; height: 28px; }
    .footer__desc { font-size: 12.5px; line-height: 1.55; }
    .footer__col { gap: 8px; }
    .footer__col h4 { font-size: 11px; }
    /* «Підтримка» — на всю ширину, посилання в рядок */
    .footer__col:last-child { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
    .footer__col:last-child h4 { flex-basis: 100%; margin-bottom: 0; }
    .footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; font-size: 12px; }
    .footer__legal { gap: 6px 14px; }

    /* Термінові збори: компактний опис — не більше двох рядків */
    .urgent__card h3 { font-size: 16px; line-height: 1.35; margin: 8px 0 4px; }
    .urgent__card p {
        font-size: 13px; line-height: 1.5; margin-bottom: 10px;
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
        overflow: hidden;
    }
    .urgent__side { flex-direction: row; }
    .urgent__side .btn { flex: 1; justify-content: center; }
    .progress-meta { font-size: 12px; flex-wrap: wrap; gap: 2px 10px; }
}
@media (max-width: 380px) {
    .footer__top { grid-template-columns: 1fr; }
}

/* ---- Терміновий збір: реквізити та примітка ---- */
.ud__ico { font-size: 19px; color: var(--accent); }
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--soft); border: 1px solid var(--line);
    border-radius: 10px; padding: 12px 14px;
}
.req-item__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.req-item__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.req-item__value { font-size: 15px; font-weight: 600; word-break: break-word; }
.req-item__value--num { font-family: ui-monospace, monospace; letter-spacing: .04em; }
.req-item__value--link { color: var(--accent); font-weight: 500; font-size: 13.5px; }
.req-item .btn { flex: 0 0 auto; }
.ud__note {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--info-bg); border: 1px solid var(--line);
    border-radius: 10px; padding: 14px; color: var(--muted);
    font-size: 13px; line-height: 1.6; margin-top: 6px;
}
.ud__note .ti { color: var(--accent); font-size: 18px; flex: 0 0 auto; }
.ud__others { margin-top: 34px; }
.ud__others .fundcard { align-items: stretch; }
@media (max-width: 560px) {
    .req-item { flex-direction: column; align-items: stretch; gap: 10px; }
    .req-item .btn { width: 100%; }
}

/* =====================================================================
   Адмінка → «Збори»: картки замість тісної таблиці.
   Розкладка залежить від реальної ширини списку (container queries),
   тож однаково добре працює з бічним меню і без нього, на ПК і телефоні.
   ===================================================================== */
.apost-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.apost-head__title { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 10px; }
.apost-head__count {
    font-size: 12.5px; font-weight: 700; color: var(--muted);
    background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
/* Вкладки статусів гортаються в один рядок, а не розсипаються на кілька */
.filter-tabs--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.filter-tabs--scroll::-webkit-scrollbar { display: none; }
.filter-tabs--scroll a { white-space: nowrap; flex: 0 0 auto; }

.apost-list { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; }

.apost {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 240px;
    grid-template-areas: "main sum actions";
    gap: 12px 20px; align-items: center;
    background: var(--surface); border: 1px solid var(--line);
    border-left: 3px solid var(--line); border-radius: 12px;
    padding: 14px 16px;
}
/* Колір лівої смуги = статус: видно одразу, що чекає рішення */
.apost--moder, .apost--new { border-left-color: var(--warning); }
.apost--active  { border-left-color: var(--success); }
.apost--closed  { border-left-color: var(--secondary); }
.apost--blocked { border-left-color: var(--danger); }

.apost__main { grid-area: main; min-width: 0; }
.apost__top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.apost__num { font-weight: 700; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.apost__top .tag, .apost__top .type-tag { white-space: nowrap; }
.apost__title { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0 0 6px; overflow-wrap: anywhere; }
.apost__desc {
    margin: -2px 0 8px; color: var(--text); opacity: .85; font-size: 13.5px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.apost__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12.5px; }
.apost__meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.apost__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12.5px; }
.apost__links a { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.apost__sum { grid-area: sum; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.apost__sum strong { font-size: 15px; white-space: nowrap; }
.apost__coll { font-size: 12px; color: var(--muted); white-space: nowrap; }
.apost__progress { display: block; height: 4px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.apost__progress span { display: block; height: 100%; background: var(--success); border-radius: inherit; }

.apost__actions { grid-area: actions; display: flex; flex-direction: column; gap: 6px; }
.apost__status { display: flex; gap: 6px; margin: 0; }
.apost__status select {
    flex: 1 1 auto; min-width: 0; font: inherit; font-size: 13px;
    background: var(--input-bg); color: var(--text);
    border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px;
}
.apost__status .btn { flex: 0 0 auto; }
.apost__edit { width: 100%; }

/* Середня ширина (вузьке вікно з меню, планшет): дії — окремим рядком унизу */
@container (max-width: 760px) {
    .apost {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "main sum" "actions actions";
        align-items: start;
    }
    .apost__actions {
        flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: wrap;
        border-top: 1px solid var(--line); padding-top: 10px;
    }
    .apost__status { flex: 0 1 300px; }
    .apost__edit { width: auto; }
}

/* Телефон: усе в одну колонку, кнопки на всю ширину — зручно натискати пальцем */
@container (max-width: 480px) {
    .apost { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "sum" "actions"; padding: 12px; gap: 10px; }
    .apost__sum {
        text-align: left; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px;
        border-top: 1px solid var(--line); padding-top: 10px;
    }
    .apost__sum .apost__progress { grid-column: 1 / -1; order: 3; }
    .apost__sum .apost__coll { text-align: right; }
    .apost__actions { flex-direction: column; align-items: stretch; }
    .apost__status { flex: 1 1 auto; }
    .apost__status select { padding: 9px 10px; font-size: 14px; }
    .apost__status .btn, .apost__edit { padding-top: 9px; padding-bottom: 9px; }
    .apost__edit { width: 100%; }
}

/* ---- Поле з лічильником символів ---- */
.counted {
    position: relative;
    background: var(--input-bg);
    border: 1px solid var(--line); border-radius: 8px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.counted:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.counted > textarea.input {
    display: block; min-height: 120px; resize: vertical;
    border: 0; border-radius: 8px 8px 0 0; background: transparent; box-shadow: none;
}
.counted > textarea.input:focus { box-shadow: none; }
.counted__bar {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 2px 11px 7px; font-size: 12px; line-height: 1.35; color: var(--muted);
    cursor: text;
}
.counted__note { min-width: 0; }
.counted__num { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.counted[data-state="short"] .counted__note,
.counted[data-state="near"] .counted__note,
.counted[data-state="near"] .counted__num { color: var(--warning); }
.counted[data-state="ok"] .counted__num { color: var(--success); }
.counted[data-state="over"] { border-color: var(--danger); }
.counted[data-state="over"]:focus-within { box-shadow: 0 0 0 3px var(--danger-bg); }
.counted[data-state="over"] .counted__note,
.counted[data-state="over"] .counted__num { color: var(--danger); font-weight: 600; }
.counted__live {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---- Сторінка збору: бейджі під назвою й опис у рамці ---- */
.ud__chain { margin-top: 12px; gap: 7px; }
.ud__chain .row-meta { white-space: normal; }

.ud__about {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden;
}
.ud__about > .ud__desc { padding: 18px 20px; }
.ud__about-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 8px 18px; padding: 12px 20px;
    background: var(--soft); font-size: 13.5px; color: var(--muted);
}
.ud__about > .ud__desc + .ud__about-foot { border-top: 1px solid var(--line); }
.ud__about-foot .ti { font-size: 16px; }
.ud__author { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.ud__author--verified > .ti { color: var(--accent); }
.ud__author-name { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
a.ud__author-name { color: var(--accent); }
a.ud__author-name:hover { text-decoration: underline; }
.ud__date { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; white-space: nowrap; }
.ud__date time { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ud__date:only-child { margin-left: 0; }
.ud__about > .ud__desc--empty { color: var(--muted); font-size: 14.5px; }
@media (max-width: 720px) {
    .ud__about > .ud__desc { padding: 14px 16px; font-size: 15px; }
    .ud__about > .ud__desc--empty { font-size: 14px; }
    .ud__about-foot { padding: 11px 16px; font-size: 13px; }
}
@media (max-width: 560px) {
    .ud__about-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ud__date { margin-left: 0; }
}

/* ---- Плашка згоди на cookie (Meta Pixel) ---- */
.cookie-consent {
    position: fixed; z-index: 80; left: 50%; bottom: 16px; transform: translateX(-50%);
    width: min(680px, calc(100% - 32px));
    display: flex; align-items: center; gap: 14px 18px;
    padding: 14px 16px; border-radius: 12px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
.cookie-consent[hidden] { display: none; }
.cookie-consent__text { display: flex; gap: 10px; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.cookie-consent__text .ti { font-size: 20px; color: var(--accent); flex: 0 0 auto; margin-top: 1px; }
.cookie-consent__text a { color: var(--accent); }
.cookie-consent__actions { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 640px) {
    .cookie-consent { flex-direction: column; align-items: stretch; bottom: 12px; }
    .cookie-consent__actions .btn { flex: 1; justify-content: center; min-height: 40px; }
}

/* ---- Правила подачі зборів (/rules) ---- */
.rules-key {
    background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: 12px; padding: 16px 20px; margin: 0 0 22px;
}
.legal .rules-key h2 { font-size: 16px; margin: 0 0 10px; }
.rules-key ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.rules-key li { display: flex; gap: 11px; align-items: flex-start; margin: 0; line-height: 1.6; }
.rules-key li .ti { color: var(--accent); font-size: 19px; flex: 0 0 auto; margin-top: 2px; }
.legal__tablewrap {
    overflow-x: auto; margin: 4px 0 14px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.legal__tablewrap table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.legal__tablewrap th {
    text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted);
    padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--soft);
}
.legal__tablewrap td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal__tablewrap tr:last-child td { border-bottom: 0; }
.legal__tablewrap td:first-child { font-weight: 600; width: 34%; min-width: 130px; }
.rules__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
@media (max-width: 560px) {
    .rules-key { padding: 14px 16px; }
    .legal__tablewrap th, .legal__tablewrap td { padding: 9px 11px; font-size: 13.5px; }
    .legal__tablewrap td:first-child { width: 38%; min-width: 0; }
    .rules__foot .btn { width: 100%; justify-content: center; }
}

/* ---- Форма подачі: посилання на правила й згода з ними ---- */
.rules-note {
    display: flex; gap: 11px; align-items: flex-start;
    margin: -6px 0 20px; padding: 12px 14px; border-radius: 10px;
    background: var(--info-bg); color: var(--text); text-decoration: none;
    font-size: 13.5px; line-height: 1.55; border: 1px solid transparent;
    transition: border-color .15s ease;
}
.rules-note:hover { border-color: var(--accent); text-decoration: none; }
.rules-note > .ti:first-child { color: var(--accent); font-size: 20px; flex: 0 0 auto; margin-top: 1px; }
.rules-note strong { color: var(--accent); font-weight: 600; }
.rules-note__go { margin-left: auto; color: var(--muted); font-size: 16px; flex: 0 0 auto; margin-top: 2px; }
.consent--rules {
    margin: 4px 0 18px; padding: 12px 14px; border-radius: 10px;
    background: var(--soft); border: 1px solid var(--line);
    font-size: 13.5px; color: var(--text);
}
.consent--rules:has(input:checked) { border-color: var(--accent); }

/* ---- Населений пункт: поле з підказками (форма подачі, адмінка) ---- */
.place-field .field-hint { margin: 6px 0 0; }
.combo { position: relative; }
.combo__icon {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 16px; pointer-events: none;
}
.combo__input { padding-left: 34px; }
.combo__input:disabled { opacity: .55; cursor: not-allowed; }
.combo__list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
    max-height: min(320px, 46vh); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 4px; list-style: none;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
[data-theme="light"] .combo__list { box-shadow: 0 10px 28px rgba(15,23,42,.12); }
.combo__list[hidden] { display: none; }
.combo__opt {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px;
    padding: 8px 10px; border-radius: 7px; cursor: pointer;
}
.combo__opt:hover { background: var(--soft); }
.combo__opt[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.combo__name { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.combo__name mark { background: none; color: var(--accent); font-weight: 650; }
.combo__type { font-size: 11.5px; color: var(--muted); align-self: center; white-space: nowrap; }
.combo__meta { grid-column: 1 / -1; font-size: 12px; line-height: 1.4; color: var(--muted); }
.combo__note { padding: 8px 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.combo__note + .combo__opt, .combo__opt + .combo__note { margin-top: 2px; }
.combo__opt + .combo__note { border-top: 1px solid var(--line); }
.place-field__note {
    margin: 8px 0 0; padding: 8px 10px; border-radius: 8px;
    background: var(--warning-bg); color: var(--text); font-size: 12.5px; line-height: 1.45;
}
.sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---- Кабінет: перегляди й переходи до донату ---- */
.poststat { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 6px; font-size: 12.5px; color: var(--text); }
.poststat .ti { color: var(--muted); }
.poststat__week { color: var(--muted); }
.poststat__hint { margin: 12px 0 0; }
/* Номер збору й статус у таблицях кабінету не переносяться по літерах */
.dash .table td.num, .dash .table td .tag { white-space: nowrap; }

/* ---- Футер: соцмережі проєкту ---- */
.footer__social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.footer__col .footer__social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border-radius: 10px;
    border: 1px solid var(--line); background: var(--soft); color: var(--muted);
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.footer__col .footer__social a:hover { color: var(--accent); border-color: var(--accent); }
.footer__col .footer__social .ti { font-size: 17px; margin: 0; }

/* ---- Меню кабінету в шапці (клік по імені) ---- */
.user-menu { display: inline-block; }
.user-menu .header-user span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Довга назва фонду в шапці не переносить логотип і пункти меню */
.brand, .nav a { white-space: nowrap; }
.brand { flex-shrink: 0; }
.user-menu__chev { font-size: 14px; opacity: .7; transition: transform .15s ease; }
.user-menu.is-open .user-menu__chev { transform: rotate(180deg); }
.user-menu .user-menu__menu { min-width: 250px; z-index: 60; }
.user-menu__head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu__head strong { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.user-menu__head span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.user-menu .dropdown__item { display: flex; align-items: center; gap: 10px; }
.user-menu .dropdown__item .ti { font-size: 17px; color: var(--muted); }
.user-menu .dropdown__item.is-active { background: var(--info-bg); color: var(--accent); }
.user-menu .dropdown__item.is-active .ti { color: var(--accent); }
.user-menu .dropdown__item--danger .ti { color: var(--danger); }
@media (max-width: 560px) {
    .user-menu .user-menu__chev { display: none; }
    .user-menu .user-menu__menu { position: fixed; top: 64px; left: 12px; right: 12px; min-width: 0; }
}

/* ---- Кабінет без бічного меню: вміст на всю ширину ---- */
.dash--full { grid-template-columns: 1fr; }

/* ---- Звіти про збори ---- */
.report-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.report-photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.report-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
a.report-photo:hover img { transform: scale(1.03); }
.report-photo--keep { cursor: pointer; }
.report-photo__keep {
    position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 8px; border-radius: 6px; font-size: 12px; background: rgba(0,0,0,.62); color: #fff;
}
.report-photo--keep:has(input:not(:checked)) img { opacity: .35; filter: grayscale(1); }
.report-photos--new:empty { display: none; }
.report-photos--edit { margin-top: 0; margin-bottom: 10px; }
.report-form__post { margin: -6px 0 14px; display: flex; flex-direction: column; gap: 2px; }
.report-form__post .sub { color: var(--muted); font-size: 13px; }
.report-form input[type=file] { padding: 8px; }
.report-state { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.report-state__why { margin-top: 4px; max-width: 260px; margin-left: auto; }
.ud__report-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.nav-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--warning); color: #1b1300; font-size: 11.5px; font-weight: 700; text-align: center; }
.report-mod { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.report-mod--pending { border-color: var(--warning); }
.report-mod__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.report-mod__head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.report-mod__body { font-size: 14px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.report-mod__link { font-size: 13px; overflow-wrap: anywhere; margin: 8px 0 0; }
.report-mod__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.report-mod__actions form { margin: 0; }
.report-mod__reject { display: flex; gap: 6px; flex: 1 1 320px; }
.report-mod__reject .input { flex: 1; min-width: 0; }
@media (max-width: 760px) {
    .report-state { justify-content: flex-start; }
    .report-state__why { margin-left: 0; }
    .report-mod__head { flex-direction: column; }
}


/* ---- Адмінка → «Логотип» ---- */
.logo-now { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.logo-bar {
    display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-radius: var(--radius);
    font-weight: 700; font-size: 16px; border: 1px solid var(--line);
}
.logo-bar img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.logo-bar--light { background: #f4f5f7; color: #17212b; }
.logo-bar--dark  { background: #17212b; color: #ffffff; }
.logo-now__text { margin: 12px 0 0; }
.logo-form .toggle-row { margin-top: 10px; }
.logo-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.logo-card {
    display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--soft); min-width: 0;
}
.logo-card.is-live { border-color: var(--success); box-shadow: 0 0 0 1px var(--success) inset; }
.logo-card__thumbs { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.logo-thumb { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 10px; border: 1px solid var(--line); }
.logo-thumb img { width: 56px; height: 56px; object-fit: contain; }
.logo-thumb--light { background: #f4f5f7; }
.logo-thumb--dark  { background: #17212b; }
.logo-card__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.logo-card__name { overflow-wrap: anywhere; }
.logo-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.logo-card__tags:empty { display: none; }
.logo-card__tags .tag { white-space: normal; }
.logo-card__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.logo-card__actions form { margin: 0; }
.logo-card__del:hover { color: var(--danger); }
.logo-card__edit summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.logo-card__edit summary::-webkit-details-marker { display: none; }
.logo-card__edit summary:hover { color: var(--text); }
.logo-card__edit[open] summary { margin-bottom: 10px; color: var(--text); }
.logo-card__edit .field-row { grid-template-columns: 1fr 1fr; gap: 8px; }
.logo-check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
@media (max-width: 560px) {
    .logo-now { grid-template-columns: 1fr; }
    .logo-lib { grid-template-columns: 1fr; }
    .logo-thumb { width: 60px; height: 60px; }
    .logo-thumb img { width: 46px; height: 46px; }
}

/* Шапка адмінки на телефоні: кнопки лише з іконками, щоб «Вийти» не виходила за край */
@media (max-width: 560px) {
    .site-header--admin .admin-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .site-header--admin .brand { min-width: 0; }
}
.logo-card__tags .tag i { margin-right: 3px; }

.logo-sched { margin-top: 2px; }
.logo-sched__group[hidden] { display: none; }
.logo-sched__group { margin-bottom: 6px; }

/* Кнопка небезпечної дії без заливки (напр. «Видалити» в таблицях адмінки) */
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-bg); }

/* ---- Підтримка: розмови в адмінці й у кабінеті ---- */
.sup-intro { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: -4px 0 16px; }
.sup-list { display: flex; flex-direction: column; gap: 8px; }
.sup-row { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; }
.sup-row:hover { background: var(--soft); color: var(--text); }
.sup-where { margin: 8px 0 0; }
.sup-where--bad { color: var(--warning); }
.sup-row--waiting { border-color: var(--warning); }
.sup-row__top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sup-row__top .sub, .sup-row__meta .sub, .sup-row__last .sub, .sup-head .sub { color: var(--muted); font-size: 12.5px; }
.sup-row__last { margin: 6px 0 8px; font-size: 14px; overflow-wrap: anywhere; }
.sup-row__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-head { align-items: flex-start; gap: 12px; }
.sup-head .sub { margin-top: 4px; }
.sup-chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 2px 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.sup-msg { max-width: min(560px, 86%); padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.sup-msg--in { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.sup-msg--out { align-self: flex-end; background: var(--info-bg); border-bottom-right-radius: 4px; }
.sup-msg__body { overflow-wrap: anywhere; }
.sup-msg__meta { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.sup-reply .field { margin-bottom: 12px; }
.sup-reply .field-hint { margin: 8px 0 0; }
@media (max-width: 760px) {
    .sup-msg { max-width: 92%; }
    .sup-head { flex-direction: column; }
}

/* ---- Налаштування → Telegram-бот ---- */
.bot-status { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.bot-status .ok { color: var(--success); font-weight: 600; }
.bot-status .bad { color: var(--danger); }
.bot-texts { margin: 10px 0 14px; font-size: 13.5px; }
.bot-texts summary { cursor: pointer; color: var(--accent); }
.bot-texts p { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.bot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bot-actions form { margin: 0; }
