/* Ayahu PWA — identidade visual */
:root {
    --brand: #1f3b2d;
    --brand-2: #2f5d45;
    --brand-soft: #e3ece5;
    --accent: #c9793b;
    --accent-soft: #f7e6d7;
    --bg: #f6f1e8;
    --surface: #ffffff;
    --ink: #1d2320;
    --muted: #646b66;
    --line: #e6dfd3;
    --danger: #b3261e;
    --ok: #2e7d4f;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(31, 59, 45, .06), 0 4px 16px rgba(31, 59, 45, .06);
    --nav-h: 64px;
    --top-h: 56px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}
body.has-nav { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
a { color: var(--brand-2); }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: .9rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; color: var(--brand); text-decoration: none; letter-spacing: .02em; }
.brand-mark {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
    overflow: hidden; flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark.sm { width: 30px; height: 30px; border-radius: 10px; }
.brand-mark.lg { width: 72px; height: 72px; border-radius: 0; }

/* ---------- Barra superior ---------- */
.top-bar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: 10px;
    height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 12px 0;
    background: rgba(246, 241, 232, .92); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.top-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: transparent; color: var(--ink); font-size: 1.3rem; text-decoration: none;
    flex-shrink: 0; position: relative; z-index: 1;
}
.top-back { z-index: 2; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.dot-count, .badge-count {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff;
    font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}
.dot-count { position: absolute; top: 4px; right: 2px; }
[hidden] { display: none !important; }

/* ---------- Navegação inferior (mobile) ---------- */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: grid; grid-template-columns: repeat(4, 1fr);
    height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--surface); border-top: 1px solid var(--line);
}
.bottom-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 500; min-height: 48px;
}
.bottom-link i { font-size: 1.35rem; }
.bottom-link.active { color: var(--brand); font-weight: 700; }

/* ---------- Navegação lateral (desktop) ---------- */
.side-nav { display: none; }
@media (min-width: 992px) {
    body.has-nav { padding-bottom: 0; padding-left: 248px; }
    .bottom-nav { display: none; }
    .side-nav {
        display: flex; flex-direction: column; gap: 24px; position: fixed; inset: 0 auto 0 0; width: 248px;
        padding: 24px 16px; background: var(--surface); border-right: 1px solid var(--line); z-index: 1030;
    }
    .side-nav nav { display: flex; flex-direction: column; gap: 4px; }
    .side-link {
        display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
        color: var(--ink); text-decoration: none; font-weight: 500;
    }
    .side-link i { font-size: 1.2rem; }
    .side-link:hover { background: var(--bg); color: var(--brand); }
    .side-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
    .side-link .badge-count { margin-left: auto; }
    .side-section { margin: 16px 14px 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
    body.has-nav .top-bar .brand-mark { display: none; }
}

/* ---------- Conteúdo ---------- */
.app-main { max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; outline: none; }
@media (min-width: 992px) { .app-main { padding: 28px 32px 48px; max-width: 880px; } }
.page-head { margin: 4px 0 18px; }
.page-title { font-size: 1.55rem; font-weight: 700; margin: 0 0 4px; color: var(--brand); }
.page-sub { color: var(--muted); margin: 0; }
.section-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-link { font-size: .9rem; font-weight: 600; text-decoration: none; }

/* ---------- Botões ---------- */
.btn { border-radius: 999px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-sm { min-height: 36px; padding: 4px 14px; }
.btn-lg { min-height: 52px; font-size: 1.02rem; }
.btn-brand { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-outline-brand { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline-brand:hover { background: var(--brand-soft); color: var(--brand); }
.btn-following { background: var(--brand-soft); color: var(--brand); border: 1.5px solid transparent; }
.btn-following:hover { background: #d4e2d8; color: var(--brand); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }

/* ---------- Busca ---------- */
.search-box {
    position: relative; display: flex; align-items: center; margin-top: 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.search-box > .bi-search { position: absolute; left: 16px; color: var(--muted); }
.search-box input { flex: 1; border: 0; background: transparent; padding: 13px 44px; font-size: 1rem; border-radius: 999px; min-width: 0; }
.search-box input:focus { outline: none; }
.search-box:focus-within { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.search-clear { position: absolute; right: 6px; display: grid; place-items: center; width: 40px; height: 40px; color: var(--muted); }
.search-filter-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
    color: var(--muted); margin-right: 4px; border-radius: 50%; border: 0; background: transparent;
}
.search-filter-btn:hover { color: var(--brand); }
.loc-dropdown { position: relative; margin-top: 10px; }
.loc-toggle {
    width: 100%; display: flex; align-items: center; gap: 8px; min-height: 48px;
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-weight: 600;
}
.loc-toggle span { flex: 1; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-toggle.is-on { color: var(--brand); }
.loc-toggle .bi-chevron-down { color: var(--muted); transition: transform .15s ease; }
.loc-toggle.is-open .bi-chevron-down { transform: rotate(180deg); }
.loc-panel {
    position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow); padding: 14px;
}
.loc-filter { display: grid; gap: 10px; }
.loc-note { margin: 12px 0 0; font-size: .9rem; }
.loc-note a { font-weight: 600; margin-right: 12px; }

/* ---------- Cards de instituto ---------- */
.inst-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .inst-grid { grid-template-columns: 1fr 1fr; } }
.inst-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.inst-card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.inst-card-media { aspect-ratio: 16 / 8; background: var(--brand-soft); display: grid; place-items: center; overflow: hidden; }
.inst-card-media img { width: 100%; height: 100%; object-fit: cover; }
.inst-card-media.is-fallback { background: var(--brand); }
.inst-card-media.is-fallback img { width: auto; height: 58%; max-width: 55%; object-fit: contain; }
.media-fallback {
    display: grid; place-items: center; width: 100%; height: 100%; font-size: 2rem; font-weight: 700; color: var(--brand-2);
    background: radial-gradient(circle at 30% 20%, #f3e3cf, var(--brand-soft));
}
.media-fallback.lg { font-size: 3rem; }
.inst-card-body { padding: 14px 16px 4px; }
.inst-card-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.inst-card-meta { color: var(--muted); font-size: .88rem; margin: 0 0 6px; }
.inst-card-desc { color: var(--ink); font-size: .92rem; margin: 0; opacity: .85; }
.inst-card-actions { padding: 10px 16px 16px; }

/* ---------- Seguir ---------- */
.follow-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.follow-card .btn-follow { min-height: 40px; padding: 6px 16px; }
.follow-detalhe {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border-radius: var(--radius);
    padding: 14px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.follow-detalhe .btn-follow { min-height: 44px; flex: 1; }
.follow-detalhe .btn-whatsapp {
    width: 44px; min-height: 44px; padding: 0; flex-shrink: 0;
}
.follow-detalhe .btn-whatsapp i { font-size: 1.35rem; }
.follow-detalhe .bell-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 1.5px solid var(--line); background: var(--surface); color: var(--brand-2); font-size: 1.2rem;
    text-decoration: none; flex-shrink: 0; transition: background .15s, color .15s;
}
.follow-detalhe .bell-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-soft); }
.follow-detalhe .bell-btn.notif-on { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.notify-toggle { border-top: 1px solid var(--line); padding-top: 12px; }
.notify-toggle .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.notify-toggle .form-check-label { font-weight: 600; margin-left: 6px; cursor: pointer; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.muted-tag { color: var(--muted); font-size: 1.1rem; }
.form-check-input:checked { background-color: var(--brand-2); border-color: var(--brand-2); }

/* ---------- Detalhe ---------- */
.detail-cover { margin: -16px -16px 16px; aspect-ratio: 16 / 9; max-height: 320px; background: var(--brand-soft); overflow: hidden; display: grid; place-items: center; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover.is-fallback { background: var(--brand); }
.detail-cover.is-fallback img { width: auto; height: 58%; max-width: 55%; object-fit: contain; }
@media (min-width: 992px) { .detail-cover { margin: 0 0 20px; border-radius: var(--radius); } }
.detail-head { margin-bottom: 16px; }
.detail-title { font-size: 1.6rem; font-weight: 700; color: var(--brand); margin: 8px 0 6px; }
.detail-meta { color: var(--muted); margin: 0 0 2px; }
a.detail-mapa { display: block; color: var(--muted); text-decoration: none; }
a.detail-mapa.is-endereco { font-weight: 700; color: var(--ink); }
a.detail-mapa:hover, a.detail-mapa:focus { color: var(--brand); text-decoration: underline; }
.detail-inst { font-weight: 600; text-decoration: none; }
.detail-section { margin: 22px 0; }
.detail-accordion { margin: 14px 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.detail-accordion-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; min-height: 48px; }
.detail-accordion-summary::-webkit-details-marker { display: none; }
.detail-accordion-summary .section-title { margin: 0; }
.detail-accordion-icon { color: var(--muted); font-size: .95rem; transition: transform .2s ease; flex-shrink: 0; }
.detail-accordion[open] .detail-accordion-icon { transform: rotate(180deg); }
.detail-accordion-summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.detail-accordion-body { padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.prose { white-space: normal; margin: 0; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: #7a4318; font-size: .78rem; font-weight: 600; margin: 0 4px 4px 0; }
.chip-presencial { background: var(--brand-soft); color: var(--brand); }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.info-list dt { color: var(--muted); font-weight: 500; }
.info-list dd { margin: 0; }
.facts { display: grid; gap: 10px; margin: 0 0 16px; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
.fact { background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow); }
.fact dt { font-size: .8rem; color: var(--muted); font-weight: 500; }
.fact dd { margin: 2px 0 0; font-weight: 600; }
.cta-row { margin: 16px 0; display: flex; align-items: flex-start; gap: 10px; }
.cta-main { flex: 1; min-width: 0; }
.btn-whatsapp { background: #25d366; color: #fff; border: 1px solid #1dae54; width: 52px; padding: 0; flex-shrink: 0; }
.btn-whatsapp i { font-size: 1.35rem; }
.btn-whatsapp:hover, .btn-whatsapp:focus { background: #1ebe57; border-color: #1dae54; color: #fff; }
.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; min-height: 48px; word-break: break-word; }

/* ---------- Mais informações (vivência) ---------- */
.more-info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.more-info-item { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: .95rem; }
.more-info-item i { color: var(--brand-2); font-size: 1rem; flex-shrink: 0; }

/* ---------- Status ---------- */
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.status-ok { background: #dcefe2; color: var(--ok); }
.status-info { background: #dde9f7; color: #1f4f8a; }
.status-neutral { background: #ecebe7; color: #55595a; }
.status-danger { background: #f8dcda; color: var(--danger); }

/* ---------- Vivências ---------- */
.viv-list { display: flex; flex-direction: column; gap: 10px; }
.viv-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; min-height: 72px; }
.viv-card:hover { color: inherit; box-shadow: 0 2px 4px rgba(31,59,45,.08), 0 8px 22px rgba(31,59,45,.1); }
.viv-explore-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 72px; }
.date-block { flex: 0 0 52px; height: 56px; border-radius: 12px; background: var(--brand); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.date-day { font-size: 1.3rem; font-weight: 700; }
.date-month { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; color: #f3dcc2; }
.viv-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viv-card-title { font-weight: 700; }
.viv-card-body .status { align-self: flex-start; margin: 3px 0 1px; }
.viv-card-meta { color: var(--muted); font-size: .85rem; }
.viv-card-go { color: var(--muted); }

/* ---------- Home ---------- */
.hello { margin: 6px 0 4px; }
.hello-kicker { margin: 0; color: var(--muted); }
.hello-name { font-size: 1.8rem; font-weight: 700; color: var(--brand); margin: 0; }
.hello-sub { color: var(--muted); font-size: .95rem; margin: 4px 0 18px; }

/* Banner "Nova vivência disponível!" */
.home-hero {
    background: var(--brand); color: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; margin-bottom: 22px;
    display: flex; flex-direction: column;
}
.home-hero-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px 0; font-size: .78rem; font-weight: 700;
    color: #f3dcc2; text-transform: uppercase; letter-spacing: .06em;
}
.home-hero-badge i { font-size: .9rem; }
.home-hero-body { padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.home-hero-img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; order: -1; }
.home-hero-title { font-size: 1.1rem; font-weight: 700; margin: 0; color: #fff; line-height: 1.3; }
.home-hero-meta { font-size: .85rem; color: #f3dcc2; margin: 0; }
.home-hero-inst { font-size: .9rem; font-weight: 600; color: #f3dcc2; margin: 0; }
.home-hero-cta { margin-top: 10px; }
.btn-hero { background: rgba(255,255,255,.15); color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.btn-hero:hover { background: rgba(255,255,255,.25); color: #fff; }

/* Layout desktop 2 colunas (home) */
@media (min-width: 992px) {
    .home-layout { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
    .home-aside { display: block; }
}
.home-aside { display: none; }
.home-aside-title { font-size: .95rem; font-weight: 700; margin: 0 0 12px; color: var(--brand); }

.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.shortcut { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; min-height: 104px; }
.shortcut i { font-size: 1.5rem; color: var(--brand-2); margin-bottom: 6px; }
.shortcut-label { font-weight: 700; }
.shortcut-value { color: var(--muted); font-size: .88rem; }
.shortcut.has-news { background: var(--brand); color: #fff; }
.shortcut.has-news i, .shortcut.has-news .shortcut-value { color: #f3dcc2; }

.home-section { margin-bottom: 26px; }
.invite { text-align: center; background: var(--surface); border-radius: var(--radius); padding: 28px 20px; box-shadow: var(--shadow); }
.invite-art { font-size: 2.6rem; color: var(--accent); margin-bottom: 8px; }
.invite p { max-width: 420px; margin: 0 auto 18px; }
.followed-row { list-style: none; margin: 0 -16px; padding: 4px 16px 8px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; }
.followed-row li { scroll-snap-align: start; }
.followed { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; text-decoration: none; color: var(--ink); }
.followed-avatar { width: 68px; height: 68px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 1.2rem; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.followed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.followed-name { font-size: .78rem; text-align: center; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Notificações ---------- */
.tab-filter {
    display: flex; gap: 6px; margin-bottom: 18px;
    background: var(--surface); border-radius: 999px;
    padding: 4px; box-shadow: var(--shadow);
    width: fit-content;
}
.tab-btn {
    min-height: 36px; padding: 6px 18px; border-radius: 999px; border: 0;
    background: transparent; color: var(--muted); font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: background .15s, color .15s;
}
.tab-btn.active { background: var(--brand); color: #fff; }
.tab-btn:not(.active):hover { background: var(--brand-soft); color: var(--brand); }

.notif-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.notif { position: relative; display: flex; align-items: flex-start; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.notif.is-unread { background: #fffaf3; box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.notif[data-filtered-hidden] { display: none; }
.notif-main { flex: 1; display: flex; gap: 12px; padding: 14px; color: inherit; text-decoration: none; min-width: 0; }
.notif-icon { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; }
.notif.is-unread .notif-icon { background: var(--accent-soft); color: #9a531d; }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-title { font-weight: 700; }
.notif.is-read .notif-title, .notif.is-read .notif-text { color: var(--muted); }
.notif-text { word-break: break-word; }
.notif-meta, .notif-time, .notif-autor { font-size: .82rem; color: var(--muted); }
.notif-autor { font-weight: 600; }
.notif-mark { margin: 8px 6px 0 0; color: var(--brand-2); }

/* ---------- Configurar notificações ---------- */
.config-notif-header {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border-radius: var(--radius);
    padding: 14px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.config-notif-avatar { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 1rem; }
.config-notif-avatar img { width: 100%; height: 100%; object-fit: cover; }
.config-notif-name { font-weight: 700; margin: 0 0 2px; }
.config-notif-local { color: var(--muted); font-size: .88rem; margin: 0; }
.config-notif-toggle { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.config-notif-toggle .form-check-input { width: 2.8em; height: 1.5em; cursor: pointer; }
.config-notif-toggle .form-check-label { font-weight: 600; font-size: 1rem; }
.config-notif-tipo { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 18px; }
.config-notif-tipo legend { font-weight: 700; font-size: 1rem; margin-bottom: 12px; color: var(--brand); }
.config-notif-radio { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.config-notif-radio:first-of-type { border-top: 0; padding-top: 0; }
.config-notif-radio .form-check-input { margin-top: 3px; flex-shrink: 0; }
.config-notif-radio-label { font-weight: 600; margin: 0 0 2px; }
.config-notif-radio-desc { font-size: .85rem; color: var(--muted); margin: 0; }

/* ---------- Estados vazios / avisos ---------- */
.empty-state { text-align: center; padding: 40px 16px; }
.empty-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 24px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); font-size: 2rem; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; }
.flash-success { background: #dcefe2; color: #1d5234; }
.flash-danger { background: #f8dcda; color: #7d1a14; }
.flash-warning { background: var(--accent-soft); color: #6d3a12; }
.perfil-aviso { background: var(--accent-soft); color: #6d3a12; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; }
.perfil-aviso p { margin: 0 0 12px; }
.offline-banner { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 1010; background: #3b3b3b; color: #fff; text-align: center; font-size: .85rem; padding: 6px 12px; }
.toast-area { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 1100; width: min(92vw, 420px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 992px) { .toast-area { bottom: 24px; } }
.app-toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: .92rem; animation: toast-in .2s ease-out; }
.app-toast.is-error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Dirigente ---------- */
.admin-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-item { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) { .admin-item { flex-direction: row; align-items: center; } }
.admin-item-main { flex: 1; display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; align-items: flex-start; }
.admin-item-title { font-weight: 700; }
.admin-item-meta { color: var(--muted); font-size: .88rem; }
.admin-item-actions { display: flex; gap: 8px; }

/* ---------- Formulários ---------- */
.app-form .form-block { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.app-form legend { font-size: 1rem; font-weight: 700; color: var(--brand); margin-bottom: 12px; }
.form-label { font-weight: 600; font-size: .92rem; }
.form-control, .form-select { border-radius: 12px; min-height: 48px; font-size: 1rem; border-color: var(--line); }
textarea.form-control { min-height: 96px; }
.form-control:focus, .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 .2rem rgba(47, 93, 69, .18); }
.req { color: var(--danger); }
.form-context { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brand-2); }
.form-preview { margin-top: 10px; max-width: 100%; border-radius: var(--radius-sm); max-height: 180px; object-fit: cover; }
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select.is-invalid ~ .invalid-feedback { display: block; }
.chip-option { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; }
.btn-check:checked + .chip-option { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-check:focus-visible + .chip-option { outline: 3px solid var(--accent); }
.form-actions { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); display: flex; gap: 10px; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.form-actions .btn { flex: 1; }
@media (min-width: 992px) { .form-actions { bottom: 0; } }

/* ---------- Login ---------- */
body.auth-landing {
    background-color: #152019;
    background-image: var(--auth-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
body.auth-landing::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(12, 20, 15, 0.35) 0%, rgba(12, 20, 15, 0.68) 100%);
}
body.auth-landing .offline-banner,
body.auth-landing .toast-area,
body.auth-landing .app-main { position: relative; z-index: 1; }
body.auth-landing .app-main { background: transparent; padding-top: max(24px, var(--safe-t)); min-height: 100vh; }
body.auth-landing .auth-brand,
body.auth-landing .auth-form {
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.32);
}
body.auth-landing .auth-brand {
    background: rgba(18, 32, 24, 0.58);
    border-radius: calc(var(--radius) + 4px);
    padding: 22px 20px 20px;
    margin-bottom: 18px;
    text-align: center;
}
body.auth-landing .auth-brand .brand-mark.lg { width: 88px; height: 88px; margin: 0 auto; }
body.auth-landing .auth-brand .auth-title {
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
    margin: 14px 0 0;
}
body.auth-landing .auth-tagline {
    margin: 14px 0 0;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}
body.auth-landing .auth-tagline .text-warning { color: #ffc107 !important; }
@media (max-width: 768px) {
    body.auth-landing .auth-tagline { font-size: 1.65rem; }
}
body.auth-landing .auth-form {
    background: rgba(255, 255, 255, 0.9);
}
body.auth-landing .auth .flash {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
body.auth-landing .auth-links a { color: rgba(255, 255, 255, 0.95); }
body.auth-landing .auth-register-line { color: rgba(255, 255, 255, 0.78); }
body.auth-landing .auth-register-line a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.auth { max-width: 420px; margin: 0 auto; padding-top: 8px; }
.auth-brand { text-align: center; margin: 12px 0 24px; }
.auth-title { font-size: 1.9rem; font-weight: 700; color: var(--brand); margin: 12px 0 4px; }
.auth-sub { color: var(--muted); }
.auth-form { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.pw-wrapper .form-control { padding-right: 44px; }
.pw-wrapper { position: relative; }
.pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 40px; height: 40px;
    border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 50%;
}
.pw-toggle:hover { color: var(--brand); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.segmented label { text-align: center; padding: 10px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); min-height: 44px; }
.segmented .btn-check:checked + label { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.segmented .btn-check:focus-visible + label { outline: 3px solid var(--accent); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .9rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: #c0392b; color: #fff; border: 1px solid #a93226; font-weight: 700; }
.btn-google:hover, .btn-google:focus { background: #a93226; border-color: #922b21; color: #fff; }
.btn-google .bi { margin-right: 8px; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.auth-links a { font-weight: 600; text-decoration: none; padding: 6px; }
.auth-register-line { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .95rem; }
.auth-register-line a { font-weight: 700; color: var(--brand-2); }

/* ---------- Conta ---------- */
.profile-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 12px; }
.conta-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.conta-stat {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 16px 14px; color: inherit; text-decoration: none; min-height: 108px;
}
.conta-stat:hover { color: inherit; box-shadow: 0 2px 4px rgba(31,59,45,.08), 0 8px 22px rgba(31,59,45,.1); }
.conta-stat i { font-size: 1.25rem; color: var(--brand-2); margin-bottom: 8px; }
.conta-stat-num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--brand); }
.conta-stat-label { font-size: .88rem; font-weight: 600; color: var(--muted); }
.avatar-lg { flex: 0 0 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #f3dcc2; font-size: 1.4rem; font-weight: 700; overflow: hidden; }
.avatar-lg-foto { padding: 0; background: var(--brand-soft); }
.avatar-lg-foto img { width: 100%; height: 100%; object-fit: cover; }
.perfil-dl { margin: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.perfil-row { display: grid; gap: 2px; padding: 14px 16px; }
.perfil-row + .perfil-row { border-top: 1px solid var(--line); }
.perfil-row dt { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.perfil-row dd { margin: 0; color: var(--ink); word-break: break-word; }
.perfil-row dd.is-empty { color: var(--muted); font-style: italic; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.profile-actions .btn { min-height: 48px; }
.danger-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.danger-box p { margin: 0 0 10px; }
.danger-box p:last-child { margin-bottom: 0; }
.profile-name { font-size: 1.2rem; font-weight: 700; margin: 0; }
.profile-email { color: var(--muted); margin: 0 0 6px; word-break: break-all; }
.menu-list { list-style: none; padding: 0; margin: 0 0 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; color: var(--ink); text-decoration: none; background: none; border: 0; text-align: left; font-size: 1rem; min-height: 52px; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg); }
.menu-list .menu-value { margin-left: auto; color: var(--muted); font-size: .88rem; }
.menu-list .menu-chevron { margin-left: auto; color: var(--muted); font-size: .9rem; }
.menu-list .menu-danger { color: var(--danger); }
.menu-list .menu-danger:hover { background: #fff5f5; }

/* ---------- PWA Install Sheet ---------- */
.install-sheet {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; flex-direction: column; justify-content: flex-end;
    background: rgba(0,0,0,.45); opacity: 0; pointer-events: none;
    transition: opacity .2s;
}
.install-sheet.is-open { opacity: 1; pointer-events: auto; }
.install-sheet-inner {
    background: var(--surface); border-radius: 24px 24px 0 0;
    padding: 24px 20px calc(24px + var(--safe-b)); transform: translateY(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    max-width: 480px; width: 100%; margin: 0 auto;
}
.install-sheet.is-open .install-sheet-inner { transform: none; }
.install-sheet-icon { width: 72px; height: 72px; border-radius: 20px; overflow: hidden; }
.install-sheet-icon img { width: 100%; height: 100%; object-fit: cover; }
.install-sheet-title { font-size: 1.15rem; font-weight: 700; color: var(--brand); margin: 0; text-align: center; }
.install-sheet-sub { color: var(--muted); text-align: center; margin: 0; max-width: 320px; }
.install-sheet-actions { display: flex; gap: 10px; width: 100%; margin-top: 4px; }
.install-sheet-actions .btn { flex: 1; }

/* ---------- Instituto: pills de seguidores / seguindo ---------- */
.inst-stat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.inst-stat-pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; background: var(--brand-soft); color: var(--brand); border: 1.5px solid transparent; border-radius: 999px; font-weight: 600; font-size: .9rem; cursor: pointer; min-height: 44px; transition: background .15s, box-shadow .15s; line-height: 1; }
.inst-stat-pill:hover { background: #d4e2d8; }
.inst-stat-pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.inst-stat-pill i { font-size: 1rem; }
.inst-stat-num { font-size: 1rem; font-weight: 700; }
.inst-stat-label { font-size: .82rem; font-weight: 500; color: var(--brand-2); }

/* ---------- Modal drawer de seguidores / seguindo ---------- */
.seg-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040; opacity: 0; animation: seg-fade-in .2s forwards; }
@keyframes seg-fade-in { to { opacity: 1; } }

.seg-modal { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050; background: var(--surface); border-radius: 20px 20px 0 0; max-height: 82vh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); will-change: transform; box-shadow: 0 -4px 24px rgba(31,59,45,.14); }
.seg-modal.is-open { transform: translateY(0); }
@media (min-width: 640px) {
    .seg-modal { left: 50%; right: auto; transform: translateX(-50%) translateY(100%); width: 480px; bottom: 20px; border-radius: 20px; }
    .seg-modal.is-open { transform: translateX(-50%) translateY(0); }
}

.seg-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.seg-modal-title { font-size: 1rem; font-weight: 700; margin: 0; color: var(--brand); }
.seg-modal-close { margin-left: auto; }

.seg-list { list-style: none; padding: 0 16px; margin: 0; overflow-y: auto; flex: 1; }
.seg-list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.seg-list-item:last-child { border-bottom: none; }
.seg-inst-link { display: flex; align-items: center; gap: 12px; width: 100%; text-decoration: none; color: inherit; border-radius: var(--radius-sm); }
.seg-inst-link:hover { color: var(--brand); }

.seg-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.seg-avatar--square { border-radius: 10px; }
.seg-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seg-avatar-ini { font-size: .85rem; font-weight: 700; color: var(--brand); line-height: 1; }

.seg-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.seg-nome { font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-arrow { color: var(--muted); font-size: .85rem; flex-shrink: 0; margin-left: auto; }

.seg-sentinel { height: 1px; }
.seg-loading { display: flex; justify-content: center; padding: 16px; flex-shrink: 0; }
.seg-spinner { width: 22px; height: 22px; border: 2.5px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: seg-spin .7s linear infinite; }
@keyframes seg-spin { to { transform: rotate(360deg); } }
.seg-empty { text-align: center; color: var(--muted); font-size: .9rem; padding: 24px 16px; flex-shrink: 0; margin: 0; }

/* ---------- Acessibilidade / motion ---------- */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
