/* ============================================================
   mandaver — sistema visual
   Inspirado no layout MedClub mas com paleta + marca próprias.
   Font: Nunito.
   ============================================================ */

/* -- Reset mínimo -- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }

/* -- Tokens -- */
:root {
    --brand:           #0a2540;     /* azul-marinho corporativo (logo + textos fortes) */
    --brand-soft:      #eef2f7;     /* azul muito claro (linhas, hovers) */
    --accent:          #ea7c1f;     /* laranja mandaver (tab ativa, CTA secundário) */
    --accent-dark:     #c4641a;
    --primary:         #1f7a85;     /* petróleo (botão entrar / search) */
    --primary-dark:    #155f68;
    --teal:            #14a3a3;     /* turquesa stats sidebar */
    --bg:              #eef0f3;     /* fundo geral cinza-claro */
    --surface:         #ffffff;     /* cards / header */
    --border:          #dde2e8;
    --text:            #1a2233;
    --text-soft:       #5e6c80;
    --text-mute:       #93a0b3;
    --success:         #1f8a3a;
    --warning:         #d97706;
    --resp-bg:         #e0f3ee;     /* balão verde-claro da resposta oficial */
    --pill-bg:         #f4f6fa;
    --shadow-sm:       0 1px 2px rgba(10, 37, 64, .04), 0 1px 1px rgba(10, 37, 64, .03);
    --shadow-md:       0 4px 14px rgba(10, 37, 64, .06);
    --radius:          10px;
    --radius-sm:       6px;
    --radius-pill:     999px;
    --container-w:     1180px;
}

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
/* Site público: body flex column → footer sempre no rodapé mesmo com pouco conteúdo */
html:not(.is-admin) body { display: flex; flex-direction: column; }
html:not(.is-admin) body > main { flex: 1 0 auto; }

/* ============================================================
   MOBILE — app-like (público + admin)
   Bloco no fim do arquivo (procurar "MOBILE BLOCK ENDS" para encontrar)
   ============================================================ */

/* -- Container -- */
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
    display: flex; align-items: center; gap: 28px;
    flex-wrap: wrap;
}
.site-brand {
    display: flex; align-items: baseline; gap: 4px;
    font-weight: 900; font-size: 28px;
    color: var(--brand);
    letter-spacing: -.5px;
}
.site-brand sup { color: var(--accent); font-size: 14px; font-weight: 700; }
.site-brand__eye { display: inline-flex; align-items: center; line-height: 1; }
.site-brand__eye .bi-eye-fill { font-size: 16px; vertical-align: middle; }
.site-tagline {
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.3;
    flex: 0 1 280px;
}
.site-tagline strong { color: var(--text); display: block; font-weight: 700; }

.site-search { flex: 1 1 320px; min-width: 240px; display: flex; }
.site-search input {
    flex: 1;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 10px 16px;
    font: inherit;
    background: var(--bg);
    color: var(--text);
    outline: none;
}
.site-search input:focus { background: var(--surface); border-color: var(--primary); }
.site-search button {
    border: none;
    background: var(--primary);
    color: white;
    padding: 0 18px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 16px;
    transition: background .15s;
}
.site-search button:hover { background: var(--primary-dark); }

.site-nav { display: flex; align-items: center; gap: 14px; }
.site-nav a { color: var(--brand); font-weight: 600; }
.site-nav .btn { padding: 8px 18px; }
.site-nav a.btn-primary, .site-nav a.btn-accent { color: #fff; }
.site-nav a.btn-primary:hover, .site-nav a.btn-accent:hover { color: #fff; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 14px;
    transition: background .15s, border-color .15s, transform .05s;
    line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--border); }
.btn-outline:hover { background: var(--brand-soft); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-soft); border: none; }
.btn-ghost:hover { color: var(--text); background: var(--brand-soft); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon {
    width: 44px; height: 44px;
    padding: 0; justify-content: center;
    border-radius: var(--radius-sm);
}

/* ============================================================
   LAYOUT GRID 2-COL
   ============================================================ */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 260px;
    gap: 24px;
    padding: 28px 0 60px;
    align-items: start;
    justify-content: center;
    max-width: 1020px;
    margin: 0 auto;
}
/* Força a coluna principal a respeitar o track do grid, mesmo com conteúdo largo */
.layout > * { min-width: 0; }
.layout--single { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
}

/* ============================================================
   HERO STRIP (faixa de stats no topo da home)
   ============================================================ */
.hero-strip {
    background: var(--surface);
    margin: 28px auto 0;
    padding: 24px 24px;
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 720px;
}
.hero-strip__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.hero-stat {
    display: flex; align-items: center; gap: 12px;
    color: var(--text);
}
.hero-stat i {
    font-size: 20px;
    color: var(--primary);
    background: var(--brand-soft);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.hero-stat strong {
    display: block; font-size: 17px; font-weight: 800; color: var(--brand); line-height: 1.1;
    font-variant-numeric: tabular-nums;
    transition: color .25s ease, transform .25s ease;
}
.hero-stat span { display: block; font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; font-weight: 700; }
.stat-num--bump { color: var(--accent) !important; transform: scale(1.12); }
.stat-num--down { color: var(--text-mute) !important; transform: scale(.92); }
@media (max-width: 720px) {
    .hero-strip__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   FEED CENTRALIZADO
   ============================================================ */
.feed {
    max-width: 720px;
    margin: 28px auto 60px;
}

.composer-hero {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
}
.composer-hero__title {
    display: flex; align-items: center; gap: 10px;
    color: var(--brand);
    font-weight: 800;
    margin-bottom: 14px;
    font-size: 17px;
}
.composer-hero__title i { color: var(--accent); font-size: 22px; }
.composer-hero__row { display: flex; gap: 10px; align-items: stretch; }
.composer-hero__row input {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 18px;
    font: inherit;
    background: var(--bg);
    color: var(--text);
    outline: none;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.composer-hero__row input:hover { background: #fff; border-color: var(--accent); }

.feed-section { margin-bottom: 20px; }
.feed-section__title {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-soft);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 8px 4px;
    margin-bottom: 8px;
}

.pagination {
    display: flex; justify-content: center; gap: 10px;
    margin-top: 28px;
}

/* tabs centralizadas */
.tabs--center { justify-content: center; }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 6px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.tabs a {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .3px;
    white-space: nowrap;
    transition: color .15s, background .15s;
    min-width: 0;
}
.tabs a:hover { color: var(--text); background: var(--brand-soft); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom: 3px solid var(--accent); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tabs a i { margin-right: 6px; opacity: .7; }

/* ============================================================
   CARD: composer / message box
   ============================================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 16px;
}
.card--hover { transition: box-shadow .2s, transform .1s; }
.card--hover:hover { box-shadow: var(--shadow-md); }

.composer { display: flex; gap: 14px; align-items: center; }
.composer .avatar {
    width: 44px; height: 44px;
    background: var(--bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-mute);
    flex-shrink: 0;
}
.composer input, .composer textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font: inherit;
    background: var(--bg);
    color: var(--text);
    outline: none;
    resize: vertical;
}
.composer input:focus, .composer textarea:focus { background: #fff; border-color: var(--primary); }

/* ============================================================
   PERGUNTA CARD
   ============================================================ */
.pergunta {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px 26px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}
.pergunta--clickable { cursor: pointer; }
.pergunta__head {
    display: flex; justify-content: space-between; gap: 24px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.autor-bloco { display: flex; gap: 12px; align-items: flex-start; }
.autor-bloco .avatar {
    width: 42px; height: 42px;
    background: var(--bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-mute); font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}
.autor-bloco .avatar img { width: 100%; height: 100%; object-fit: cover; }
.autor-bloco .avatar--medico { background: var(--brand-soft); color: var(--brand); border: 2px solid var(--accent); }
.autor-bloco__meta { font-size: 13px; }
.autor-bloco__rotulo { color: var(--text-soft); font-size: 12px; margin-bottom: 2px; }
.autor-bloco__nome { font-weight: 700; color: var(--text); }
.autor-bloco__sub { color: var(--text-mute); font-size: 12px; margin-top: 1px; }

.pergunta__body {
    color: var(--text);
    font-size: 15.5px;
    line-height: 1.65;
    margin-bottom: 16px;
    /* Quebra palavras gigantes / ALL-CAPS contínuo / URLs */
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}
.pergunta__body p { margin: 0 0 12px; }
.pergunta__img { border-radius: var(--radius-sm); margin-top: 10px; max-width: 100%; height: auto; display: block; }

.resposta-balao {
    background: var(--resp-bg);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-top: 14px;
    margin-left: auto;
    max-width: 92%;
    position: relative;
    /* Quebra palavras gigantes / ALL-CAPS contínuo / URLs */
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    box-sizing: border-box;
}
.resposta-balao__label { font-size: 12px; color: var(--success); font-weight: 700; text-transform: uppercase; margin-bottom: 6px; letter-spacing: .3px; }
.resposta-balao__data { display: block; text-align: right; color: var(--text-soft); font-size: 12px; margin-top: 10px; }

/* Rich content (render seguro de HTML do editor) */
.rich-content { line-height: 1.6; overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.rich-content p { margin: 0 0 12px; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content strong, .rich-content b { font-weight: 800; color: var(--brand); }
.rich-content em, .rich-content i { font-style: italic; }
.rich-content u { text-decoration: underline; }
.rich-content s { text-decoration: line-through; opacity: .7; }
.rich-content ul, .rich-content ol { margin: 0 0 12px; padding-left: 24px; }
.rich-content ul li, .rich-content ol li { margin: 4px 0; padding-left: 4px; }
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4 {
    margin: 14px 0 8px; color: var(--brand); font-weight: 800; line-height: 1.3;
}
.rich-content h1 { font-size: 22px; } .rich-content h2 { font-size: 19px; }
.rich-content h3 { font-size: 17px; } .rich-content h4 { font-size: 15px; }
.rich-content blockquote {
    margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--brand);
    background: rgba(10,37,64,.04); color: var(--text); font-style: italic;
}
.rich-content code {
    background: var(--bg); padding: 2px 6px; border-radius: 3px;
    font-family: 'Consolas', monospace; font-size: .9em; color: var(--accent-dark);
}
.rich-content pre {
    background: var(--bg); padding: 12px 14px; border-radius: var(--radius-sm);
    overflow-x: auto; font-family: 'Consolas', monospace; font-size: 13px;
    border-left: 3px solid var(--brand);
}
.rich-content hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.rich-content a { color: var(--primary); text-decoration: underline; }
.rich-content a:hover { color: var(--primary-dark); }
.rich-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 8px 0; }

/* ============================================================
   ADMIN LIST PAGE — viewport-fit, tabela rola, paginator fixo
   ============================================================ */
.admin-list-page {
    display: flex; flex-direction: column;
    height: 100%;
    min-height: 0;
    gap: 12px;
}
.admin-list-page__header {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
}
.admin-list-page__header h1 { margin: 0; font-size: 22px; }
.admin-list-page__filters {
    flex-shrink: 0;
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.admin-list-page__filters input,
.admin-list-page__filters select { padding: 6px 10px !important; font-size: 13px !important; }

/* Card que envolve a tabela; o conteúdo (tbody) rola dentro */
.admin-table-wrap {
    flex: 1 1 auto; min-height: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.admin-table-wrap__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: auto;
}
.admin-table-wrap__scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.admin-table-wrap__scroll::-webkit-scrollbar-thumb { background: rgba(10,37,64,.18); border-radius: 4px; }
.admin-table-wrap table { margin: 0 !important; width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table-wrap table thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--bg);
    box-shadow: 0 1px 0 var(--border);
}

/* Paginator fixo no rodapé do card */
.paginator {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    gap: 12px; flex-wrap: wrap;
}
.paginator--solo { border-top: 1px solid var(--border); }
.paginator__info { font-size: 12px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.paginator__nav { display: inline-flex; gap: 2px; }
.paginator__btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px;
    padding: 0 8px;
    font-size: 12px; font-weight: 700;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    transition: background .12s ease, color .12s ease;
}
.paginator__btn:hover:not(.is-active):not(.is-disabled):not(.is-gap) { background: var(--brand-soft); color: var(--brand); }
.paginator__btn.is-active { background: var(--brand); color: #fff; }
.paginator__btn.is-disabled { color: var(--text-mute); cursor: not-allowed; }
.paginator__btn.is-gap { cursor: default; color: var(--text-mute); }

/* Página de listagem nunca rola o body — só a tabela */
.admin-main:has(> .admin-list-page) {
    overflow: hidden;
    height: calc(100vh - var(--topbar-h) - var(--footer-h));
    padding: 16px 20px;
    box-sizing: border-box;
    display: flex; flex-direction: column;
}
.admin-list-page { height: 100%; min-height: 0; }

/* ============================================================
   CHAT — moderação de pergunta no admin (chat-style)
   ============================================================ */
.chat-page {
    display: flex; flex-direction: column;
    height: 100%;
    min-height: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.chat-header {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-wrap: wrap;
    flex-shrink: 0;
}
.chat-header__meta {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
    font-size: 12px; color: var(--text-soft);
    flex: 1; min-width: 0;
}
.chat-header__meta strong { color: var(--brand); font-size: 14px; }
.chat-header__meta i { color: var(--text-mute); margin-right: 3px; }
.chat-header__actions { display: flex; gap: 4px; }
.chat-header__search {
    display: inline-flex; align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    gap: 6px;
    min-width: 220px;
    max-width: 340px;
    transition: border-color .15s, box-shadow .15s;
}
.chat-header__search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31,122,133,.10);
}
.chat-header__search i { color: var(--text-mute); font-size: 13px; }
.chat-header__search input {
    flex: 1; min-width: 0;
    border: none; outline: none; background: transparent;
    font: inherit; font-size: 13px;
    color: var(--text);
    padding: 4px 0;
}
.chat-header__search input::placeholder { color: var(--text-mute); }
.chat-header__search-clear {
    color: var(--text-mute); text-decoration: none;
    font-size: 18px; line-height: 1; padding: 0 4px;
}
.chat-header__search-clear:hover { color: var(--accent); }

.chat-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 24px;
    background:
        linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)),
        repeating-linear-gradient(45deg, var(--bg) 0 12px, var(--surface) 12px 24px);
    background-attachment: local;
    display: flex; flex-direction: column; gap: 16px;
}
.chat-body::-webkit-scrollbar { width: 8px; }
.chat-body::-webkit-scrollbar-thumb { background: rgba(10,37,64,.18); border-radius: 4px; }

.chat-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.chat-msg--in  { align-self: flex-start; }
.chat-msg--out { align-self: flex-end; flex-direction: row; }

.chat-avatar {
    width: 36px; height: 36px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-mute);
    flex-shrink: 0;
    overflow: hidden;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-avatar--admin { background: var(--brand); color: #fff; border-color: var(--brand); }
.chat-avatar--small { width: 28px; height: 28px; font-size: 12px; }

.chat-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 1px 2px rgba(10,37,64,.04);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.chat-msg--in .chat-bubble { border-top-left-radius: 4px; }
.chat-msg--out .chat-bubble {
    background: rgba(31,122,133,.08);
    border-color: rgba(31,122,133,.25);
    border-top-right-radius: 4px;
}
.chat-bubble__author {
    font-size: 12px; font-weight: 700; color: var(--brand);
    margin-bottom: 4px;
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.chat-bubble__author small { color: var(--text-mute); font-weight: 500; font-size: 11px; }
.chat-bubble__body { font-size: 14px; line-height: 1.5; color: var(--text); }
.chat-bubble__body p { margin: 0 0 8px; }
.chat-bubble__body p:last-child { margin-bottom: 0; }
.chat-bubble__actions { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); flex-wrap: wrap; align-items: center; }
.chat-bubble__quote {
    background: rgba(10,37,64,.04);
    border-left: 3px solid var(--brand-soft);
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 12px;
    font-style: italic;
    color: var(--text-soft);
    border-radius: 4px;
}
.chat-bubble__quote i { color: var(--text-mute); margin-right: 4px; }
.chat-img { max-width: 100%; height: auto; border-radius: 8px; margin-top: 8px; display: block; }

.chat-pill {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 8px;
    text-transform: uppercase; letter-spacing: .3px;
    background: var(--brand-soft); color: var(--brand);
}
.chat-pill--ok   { background: rgba(5,150,105,.12); color: var(--success); }
.chat-pill--warn { background: rgba(217,119,6,.12); color: var(--warning); }
.chat-pill--err  { background: rgba(234,124,31,.12); color: var(--accent); }
.chat-pill--mute { background: rgba(100,116,139,.12); color: var(--text-soft); }
.chat-pill--accent { background: rgba(234,124,31,.14); color: var(--accent); font-weight: 800; }
.chat-composer__mode {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: rgba(13,79,142,.08);
    border-bottom: 1px solid var(--border);
    color: var(--brand); font-size: 13px; font-weight: 600;
}
.chat-composer__mode i { color: var(--accent); }
.chat-composer__mode-x {
    margin-left: auto;
    background: none; border: none; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--text-soft);
    padding: 0 4px;
}
.chat-composer__mode-x:hover { color: var(--accent); }
.chat-bubble__actions {
    margin-top: 8px;
    display: flex; gap: 6px; flex-wrap: wrap;
    border-top: 1px dashed var(--border);
    padding-top: 8px;
}
.chat-msg--out .chat-bubble__actions { justify-content: flex-end; }
.chat-bubble__actions .btn-sm { padding: 4px 10px; font-size: 12px; }

.chat-divider {
    text-align: center; margin: 8px 0;
    position: relative;
}
.chat-divider::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border);
}
.chat-divider span {
    position: relative; background: var(--surface); padding: 0 12px;
    color: var(--text-soft); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}

.chat-msg--comentario.is-pendente .chat-bubble { background: rgba(217,119,6,.06); border-color: rgba(217,119,6,.3); }
.chat-msg--comentario.is-rejeitado .chat-bubble { background: rgba(234,124,31,.06); border-color: rgba(234,124,31,.3); opacity: .7; }
.chat-msg--reply { padding-left: 36px; position: relative; }
.chat-msg--reply::before {
    content: ''; position: absolute;
    left: 16px; top: 12px; bottom: 12px;
    width: 2px; background: var(--border);
    border-radius: 2px;
}
.chat-reply-form { margin-top: 10px; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.chat-reply-form textarea {
    width: 100%; min-width: 0;
    padding: 8px 10px; font: inherit; font-size: 13px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    resize: vertical; outline: none;
    box-sizing: border-box;
}
.chat-reply-form textarea:focus { border-color: var(--primary); }

/* Composer fixo no fundo do chat */
.chat-composer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 0;
    display: flex; flex-direction: column;
}
.chat-composer__toolbar {
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 4px 10px !important;
    background: var(--bg) !important;
    border-radius: 0 !important;
}
.chat-composer__editor-wrap {
    display: flex; align-items: stretch; gap: 0;
    background: var(--surface);
}
.chat-composer__editor {
    flex: 1; min-width: 0;
    border: none !important;
    background: var(--surface) !important;
    min-height: 80px !important;
    max-height: 180px !important;
}
.chat-composer__editor .ql-editor { min-height: 80px !important; max-height: 180px !important; padding: 10px 14px !important; font-size: 14px !important; }
.chat-composer__send {
    background: var(--brand);
    color: #fff; border: none;
    width: 60px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 18px;
    transition: background .15s ease;
}
.chat-composer__send:hover { background: var(--accent); }
.chat-composer__anexo {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 6px 14px 10px;
    font-size: 12px; color: var(--text-soft);
    background: var(--bg); padding: 4px 10px; border-radius: 12px;
    align-self: flex-start;
}
.chat-composer__anexo i { color: var(--accent); }
.chat-composer__anexo-x {
    background: none; border: none; cursor: pointer; color: var(--text-mute);
    font-size: 14px; padding: 0; margin-left: 4px; line-height: 1;
}
.chat-composer__anexo-x:hover { color: var(--accent); }

/* Garante que a página do chat (admin-main) não rola — chat-body rola sozinho */
.admin-main:has(> .chat-page) {
    overflow: hidden;
    height: calc(100vh - var(--topbar-h) - var(--footer-h));
    /* padding compacto: chat-page já é o card visual */
    padding: 16px 20px;
    box-sizing: border-box;
    display: flex; flex-direction: column;
}

/* Editor Quill no admin */
.ql-toolbar { border-color: var(--border) !important; border-radius: var(--radius) var(--radius) 0 0 !important; background: var(--bg); }
.ql-container { border-color: var(--border) !important; border-radius: 0 0 var(--radius) var(--radius) !important; min-height: 200px; font-family: 'Nunito', sans-serif !important; font-size: 15px !important; background: #fff; }
.ql-editor { min-height: 200px; padding: 14px 16px; }
.ql-editor.ql-blank::before { font-style: normal !important; color: var(--text-mute) !important; }
.ql-anexo-btn {
    width: 28px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: #444;
}
.ql-anexo-btn:hover { color: var(--accent); }

.pergunta__footer {
    display: flex; gap: 18px; align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-soft);
    flex-wrap: wrap;
}
.pergunta__footer .like-btn,
.pergunta__footer .com-btn,
.pergunta__footer .stat {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none;
    color: inherit; padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.pergunta__footer button:hover { background: var(--brand-soft); color: var(--brand); }
.pergunta__footer .like-btn { cursor: pointer; transition: transform .15s ease, color .2s ease; }
.pergunta__footer .like-btn:disabled { opacity: .6; cursor: wait; }
.pergunta__footer .like-btn.liked { color: var(--accent); font-weight: 700; }
.pergunta__footer .like-btn.liked i { color: var(--accent); }
.like-btn--pulse { animation: likePulse .35s ease; }
@keyframes likePulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.pergunta__footer .com-btn.right { margin-left: auto; }
.pergunta__footer i { font-size: 16px; }

.badge-anonimo {
    display: inline-block;
    background: var(--pill-bg);
    color: var(--text-soft);
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    text-align: center;
    position: relative;
}
.sidebar-card__logo {
    width: 80px; height: 80px;
    background: var(--surface);
    border-radius: 50%;
    margin: -50px auto 8px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.sidebar-card__logo span { color: var(--accent); font-weight: 900; font-size: 18px; letter-spacing: -.5px; }
.sidebar-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 18px;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-item__icon {
    width: 38px; height: 38px;
    background: rgba(20, 163, 163, .12);
    color: var(--teal);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    margin-bottom: 4px;
}
.stat-item__icon.green  { background: rgba(31, 138, 58, .12); color: var(--success); }
.stat-item__icon.accent { background: rgba(234, 124, 31, .12); color: var(--accent); }
.stat-item__icon.brand  { background: rgba(31, 122, 133, .12); color: var(--primary); }
.stat-item__num { font-weight: 800; font-size: 15px; color: var(--text); }
.stat-item__lbl { font-size: 11px; color: var(--text-soft); }

.sidebar-card h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-soft);
    margin: 0 0 12px;
    text-align: left;
}
.sidebar-card ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.sidebar-card ul li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.sidebar-card ul li:last-child { border-bottom: 0; }
.sidebar-card ul li a { color: var(--text); }
.sidebar-card ul li a:hover { color: var(--primary); }

/* ============================================================
   FORM (login, cadastro, perfil)
   ============================================================ */
.form-page { max-width: 480px; margin: 40px auto; }
.form-page h1 {
    color: var(--brand);
    font-size: 26px;
    margin: 0 0 22px;
    font-weight: 800;
}
.form-page .subtle { color: var(--text-soft); font-size: 14px; margin-bottom: 22px; }
.form-page .card { padding: 32px; }

.form-row { margin-bottom: 12px; }
.form-row label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    color: var(--brand);
    margin-bottom: 4px;
    letter-spacing: .2px;
}
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=url],
.form-row input[type=number],
.form-row input[type=tel],
.form-row input[type=search],
.form-row input[type=date],
.form-row input[type=datetime-local],
.form-row select,
.form-row textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 11px;
    font: inherit;
    font-size: 13px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-row select { height: 34px; padding-top: 0; padding-bottom: 0; }
.form-row textarea { min-height: 70px; font-size: 13px; }
.form-row input:hover:not(:focus), .form-row select:hover:not(:focus), .form-row textarea:hover:not(:focus) {
    border-color: var(--text-mute);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    background: #fff; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31,122,133,.10);
}
.form-row input:disabled, .form-row select:disabled, .form-row textarea:disabled {
    background: var(--bg); cursor: not-allowed; opacity: .7;
}
.form-row input.is-autofilled, .form-row select.is-autofilled {
    background: rgba(31,138,58,.08);
    border-color: var(--success);
    transition: background 1.5s ease-out, border-color 1.5s ease-out;
}
.form-row .hint { font-size: 11px; color: var(--text-soft); margin-top: 3px; }
.form-row .hint--counter { float: right; font-variant-numeric: tabular-nums; }
.form-row .hint--counter.is-warn { color: var(--warning); font-weight: 700; }
.form-row .hint--counter.is-over { color: var(--accent); font-weight: 800; }
.form-row.check { display: flex; align-items: center; gap: 8px; }
.form-row.check label { margin: 0; font-weight: 600; }

/* Grid 2-col pra forms admin — cabe sem scroll vertical */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}
.form-grid .form-row { margin-bottom: 0; }
.form-grid .form-row--full { grid-column: 1 / -1; }
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
}

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 24px; }
.form-actions .btn { flex: 0; }
.divider { text-align: center; color: var(--text-mute); margin: 18px 0; font-size: 13px; position: relative; }
.divider::before, .divider::after {
    content: ''; display: inline-block; width: 30%;
    height: 1px; background: var(--border); vertical-align: middle; margin: 0 10px;
}

/* ============================================================
   ALERTAS
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-info    { background: #f3f7fb; color: var(--primary-dark); border: 1px solid #d8e3ee; }
.alert-success { background: #f0f8f2; color: var(--success); border: 1px solid #cfe9d5; }
.alert-error   { background: #fdf1ec; color: var(--accent-dark); border: 1px solid #f3d4bf; }
.alert-warning { background: #fdf6e6; color: var(--warning); border: 1px solid #ecdab2; }

/* ============================================================
   COMENTÁRIOS
   ============================================================ */
.comentarios { margin-top: 24px; min-width: 0; max-width: 100%; overflow: hidden; }
.comentarios h2 { font-size: 17px; color: var(--brand); margin: 0 0 14px; }
.comentario {
    min-width: 0; max-width: 100%;
    overflow-wrap: anywhere; word-break: break-word;
    box-sizing: border-box;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.comentario:last-child { border-bottom: 0; }
.comentario__autor { font-weight: 700; color: var(--text); }
.comentario__data { color: var(--text-soft); font-size: 12px; margin-left: 8px; }
.comentario__head { display: flex; gap: 10px; align-items: flex-start; }
.comentario__head-meta { flex: 1; min-width: 0; padding-top: 2px; }
.comentario__body { margin: 6px 0 0; padding-left: 42px; color: var(--text); overflow-wrap: anywhere; word-break: break-word; min-width: 0; max-width: 100%; white-space: pre-wrap; }
.comentario__actions { padding-left: 42px; }
.avatar--mini {
    width: 32px; height: 32px; flex-shrink: 0;
    background: var(--brand-soft); color: var(--brand);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    overflow: hidden; font-size: 14px;
}
.avatar--mini img { width: 100%; height: 100%; object-fit: cover; }
.comentario__actions { margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.like-btn--mini {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: none; cursor: pointer;
    padding: 4px 8px; border-radius: var(--radius-sm);
    font: inherit; font-size: 12px; color: var(--text-soft);
    font-variant-numeric: tabular-nums;
    transition: color .15s, background .15s;
}
.like-btn--mini:hover { background: var(--brand-soft); color: var(--brand); }
.like-btn--mini.liked { color: var(--accent); font-weight: 700; }
.like-btn--mini.liked i { color: var(--accent); }
.like-btn--mini:disabled { opacity: .6; cursor: wait; }
.comentario--reply { margin-left: 32px; border-left: 2px solid var(--brand-soft); padding-left: 14px; }
.comentario--pendente {
    background: rgba(217,119,6,.05);
    border-left: 3px solid var(--warning);
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    flex-shrink: 0;
    text-align: center;
    color: var(--text-mute);
    font-size: 13px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    margin-top: 60px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(10, 37, 64, .55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px 16px;
    overflow-y: auto;
}
.modal-overlay--auth { align-items: center; }
.modal-overlay.is-open { display: flex; }
.modal {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(10,37,64,.35);
    max-width: 720px; width: 100%;
    overflow: hidden;
    animation: modal-in .2s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }
.modal__head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
    background: var(--bg);
}
.modal__head i { color: var(--accent); font-size: 22px; }
.modal__head h2 { margin: 0; color: var(--brand); font-size: 17px; font-weight: 800; flex: 1; }
.modal__close { background: none; border: none; color: var(--text-soft); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal__close:hover { color: var(--accent); }
.modal__body { padding: 22px; }
.modal__foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--bg); }

/* Modal Auth — compacto, tabs login/cadastro */
.modal--auth { max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; }
.modal--auth .auth-pane { overflow-y: auto; max-height: calc(90vh - 140px); }
.auth-grid { gap: 8px 12px; }
.auth-grid .form-row { margin-bottom: 0; }
/* Photo upload — combina com os demais campos do form (label em cima, controle abaixo).
   Visual: avatar circular pequeno à esquerda + botão de ação à direita. */
.auth-photo {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    margin-bottom: 12px;
    transition: border-color .15s, background .15s;
}
.auth-photo:hover, .auth-photo:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31,122,133,.10);
}
.auth-photo.is-dragover {
    border-color: var(--accent);
    background: rgba(234,124,31,.06);
}
.auth-photo__upload {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    flex: 1; min-width: 0;
}
.auth-photo__preview {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-mute);
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color .15s;
}
.auth-photo:hover .auth-photo__preview { border-color: var(--primary); }
.auth-photo.is-filled .auth-photo__preview { border-color: var(--accent); }
.auth-photo__preview img { width: 100%; height: 100%; object-fit: cover; }
.auth-photo__label {
    font-size: 12px; color: var(--text); font-weight: 600;
    flex: 1; min-width: 0; line-height: 1.3;
}
.auth-photo__label strong { display: inline; color: var(--brand); font-size: 12px; }
.auth-photo__label small {
    display: block; color: var(--text-mute);
    font-size: 11px; font-weight: 500; margin-top: 1px;
}
.auth-photo.is-filled .auth-photo__label small::before { content: '✓ '; color: var(--success); font-weight: 800; }
.auth-photo__remove {
    background: none; border: 1px solid var(--border); cursor: pointer;
    color: var(--text-soft);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font: inherit; font-size: 11px; font-weight: 700;
    display: none;
    text-transform: uppercase; letter-spacing: .3px;
    flex-shrink: 0;
    transition: color .15s, border-color .15s;
}
.auth-photo__remove i { margin-right: 3px; }
.auth-photo__remove:hover { color: var(--accent); border-color: var(--accent); }
.auth-photo.is-filled .auth-photo__remove { display: inline-flex; align-items: center; }
.modal--auth .modal__head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.auth-brand { display: flex; align-items: center; gap: 10px; flex: 1; }
.auth-brand__mark {
    width: 38px; height: 38px;
    background: var(--brand); color: #fff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.auth-tab {
    flex: 1; background: none; border: none; cursor: pointer;
    padding: 12px 8px;
    font: inherit; font-size: 13px; font-weight: 700;
    color: var(--text-soft);
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.auth-tab:hover { color: var(--brand); }
.auth-tab.is-active {
    color: var(--brand);
    border-bottom-color: var(--accent);
    background: var(--surface);
}
.auth-pane { display: none; }
.auth-pane.is-active { display: block; }
.auth-alert {
    background: rgba(234,124,31,.1);
    color: var(--accent);
    border: 1px solid rgba(234,124,31,.3);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    display: flex; align-items: center; gap: 10px;
}
.auth-alert i { font-size: 18px; line-height: 1; flex-shrink: 0; }
.auth-alert span { flex: 1; min-width: 0; }
.auth-form { padding: 18px; }
.auth-form .form-row { margin-bottom: 10px; }
.auth-form .form-row label { font-size: 11px; }
.auth-form .form-row label i { margin-right: 4px; color: var(--text-mute); }
.auth-form .btn { margin-top: 4px; }
.auth-divider {
    text-align: center; margin: 14px 0 10px;
    position: relative;
}
.auth-divider::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0;
    height: 1px; background: var(--border);
}
.auth-divider span {
    position: relative; background: var(--surface); padding: 0 12px;
    color: var(--text-mute); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
}
.auth-foot {
    text-align: center; margin-top: 12px;
    font-size: 12px;
}
.auth-foot a { color: var(--primary); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { color: var(--primary-dark); }

.modal-textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font: inherit; font-size: 15px; line-height: 1.5;
    background: #fff; color: var(--text);
    outline: none; min-height: 200px; resize: vertical;
    transition: border-color .15s, box-shadow .15s;
}
.modal-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(234,124,31,.10);
}

.modal-tools { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tool-btn {
    background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; color: var(--text-soft);
    font-weight: 700; font-size: 13px;
    transition: border-color .15s, color .15s, background .15s;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.tool-btn.is-active { border-color: var(--accent); color: var(--accent); background: rgba(234,124,31,.08); }
.tool-btn i { font-size: 18px; }

.modal-file-preview {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    font-size: 13px; color: var(--text-soft);
    display: none;
}
.modal-file-preview.is-shown { display: flex; align-items: center; gap: 10px; }
.modal-file-preview i { color: var(--accent); font-size: 18px; }
.modal-file-preview strong { color: var(--text); }

/* ============================================================
   ALERT RETRO (old-school)
   ============================================================ */
/* Alert modernos — toast-like, sutil, auto-dismiss */
.alert-retro {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 44px 12px 14px;
    margin-bottom: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(10,37,64,.06);
    font-size: 14px; line-height: 1.4;
    color: var(--text);
    animation: alertSlide .25s ease;
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert-retro.is-dismissed { opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
.alert-retro__icon {
    width: 28px; height: 28px;
    background: var(--brand-soft); color: var(--brand);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.alert-retro__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.alert-retro__title {
    font-weight: 800; font-size: 12px;
    color: var(--brand);
    letter-spacing: .3px;
    margin-bottom: 1px;
}
.alert-retro__msg { line-height: 1.4; font-size: 13px; color: var(--text); }
.alert-retro__close {
    position: absolute; top: 50%; right: 8px;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-mute); font-size: 16px;
    transition: color .15s, background .15s;
}
.alert-retro__close:hover { color: var(--accent); background: var(--bg); }

.alert-retro--success { background: rgba(31,138,58,.04); }
.alert-retro--success .alert-retro__icon { background: rgba(31,138,58,.15); color: var(--success); }
.alert-retro--success .alert-retro__title { color: var(--success); }

.alert-retro--error { background: rgba(234,124,31,.04); }
.alert-retro--error .alert-retro__icon { background: rgba(234,124,31,.15); color: var(--accent); }
.alert-retro--error .alert-retro__title { color: var(--accent); }

.alert-retro--warn { background: rgba(217,119,6,.04); }
.alert-retro--warn .alert-retro__icon { background: rgba(217,119,6,.15); color: var(--warning); }
.alert-retro--warn .alert-retro__title { color: var(--warning); }

/* ============================================================
   ADMIN — fixo + colapsável + topbar
   ============================================================ */
:root { --sidebar-w: 240px; --sidebar-w-collapsed: 64px; --topbar-h: 60px; --footer-h: 28px; }

.admin-layout { display: block; min-height: 100vh; }

.admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--brand);
    color: #cdd6e3;
    padding: 14px 12px;
    z-index: 80;
    overflow: hidden;              /* sidebar não rola; só o body interno rola */
    display: flex; flex-direction: column;
    transition: width .2s ease;
}
.admin-sidebar.is-collapsed { width: var(--sidebar-w-collapsed); padding: 14px 6px; }

.admin-sidebar__header {
    display: flex; align-items: center; gap: 4px;
    padding: 0 4px 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 12px;
    flex-shrink: 0;                /* header nunca encolhe */
}

/* Body navegável: única parte que rola */
.admin-sidebar__body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -8px;
    padding: 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.12) transparent;
}
.admin-sidebar__body::-webkit-scrollbar { width: 6px; }
.admin-sidebar__body::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar__body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.10);
    border-radius: var(--radius-pill);
}
.admin-sidebar__body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }
.admin-sidebar__brand {
    display: flex; align-items: baseline; gap: 4px;
    color: #fff; font-weight: 900; font-size: 20px; flex: 1;
}
.admin-sidebar__brand small { color: var(--accent); font-size: 11px; font-weight: 700; }
.admin-sidebar__toggle {
    background: rgba(255,255,255,.06);
    color: #cdd6e3;
    border: none;
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-size: 15px;
}
.admin-sidebar__toggle:hover { background: rgba(255,255,255,.15); color: #fff; }

.admin-sidebar a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px;
    color: #cdd6e3;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    position: relative;
    white-space: nowrap;
}
.admin-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.admin-sidebar a.active { background: var(--accent); color: #fff; }
.admin-sidebar a i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.admin-sidebar .grupo {
    color: #7d8a9c; font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
    padding: 14px 14px 4px; font-weight: 800;
}
.admin-sidebar__footer {
    margin-top: 0;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 12px;
    flex-shrink: 0;                /* footer fixo no rodapé */
}

/* sidebar colapsada: esconde texto, mantém ícones */
.admin-sidebar.is-collapsed .admin-sidebar__brand,
.admin-sidebar.is-collapsed .grupo,
.admin-sidebar.is-collapsed .nav-label { display: none; }
.admin-sidebar.is-collapsed a {
    padding: 10px;
    justify-content: center;
}
.admin-sidebar.is-collapsed a .badge-count {
    position: absolute; top: 2px; right: 2px;
    margin: 0; transform: scale(.85);
}

/* topbar */
.admin-topbar {
    position: fixed; top: 0; right: 0; left: var(--sidebar-w);
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px;
    padding: 0 24px;
    z-index: 60;
    box-shadow: 0 1px 3px rgba(10,37,64,.04);
    transition: left .2s ease;
}

/* ========== Sino de notificações ========== */
.admin-bell { position: relative; }
.admin-bell__btn {
    background: none; border: none; cursor: pointer;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-soft);
    font-size: 18px;
    position: relative;
    transition: background .2s ease, color .2s ease;
}
.admin-bell__btn:hover { background: var(--brand-soft); color: var(--brand); }
.admin-bell__btn.has-unread { color: var(--accent); animation: bellRing 1.2s ease 1; }
@keyframes bellRing {
    0%,100% { transform: rotate(0); }
    20% { transform: rotate(-12deg); }
    40% { transform: rotate(10deg); }
    60% { transform: rotate(-6deg); }
    80% { transform: rotate(4deg); }
}
.admin-bell__badge {
    position: absolute;
    top: -2px;
    right: -4px;
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 0 0 2px var(--surface);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.admin-bell__panel {
    position: absolute; top: calc(100% + 8px); right: -6px;
    width: 380px; max-height: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(10,37,64,.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.admin-bell__panel.is-open { display: flex; }
.admin-bell__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    font-weight: 800; color: var(--brand); font-size: 14px;
}
.admin-bell__header i { margin-right: 6px; color: var(--accent); }
.admin-bell__mark {
    background: none; border: none; cursor: pointer;
    color: var(--primary); font-size: 12px; font-weight: 700;
    padding: 4px 8px; border-radius: 4px;
}
.admin-bell__mark:hover { background: var(--brand-soft); }
.admin-bell__list { overflow-y: auto; max-height: 360px; }
.admin-bell__list::-webkit-scrollbar { width: 6px; }
.admin-bell__list::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 3px; }
.admin-bell__empty { padding: 32px 16px; text-align: center; color: var(--text-mute); font-size: 13px; }
.admin-bell__item {
    display: flex; gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: background .15s ease;
}
.admin-bell__item:hover { background: var(--brand-soft); }
.admin-bell__item:last-child { border-bottom: none; }
.admin-bell__item.is-unread { background: rgba(234,124,31,.06); border-left: 3px solid var(--accent); }
.admin-bell__icon {
    width: 32px; height: 32px;
    background: var(--bg);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.admin-bell__item--comentario .admin-bell__icon { color: var(--success); }
.admin-bell__body { flex: 1; min-width: 0; }
.admin-bell__title {
    font-size: 13px; font-weight: 700; color: var(--brand);
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 2px;
}
.admin-bell__pill {
    font-size: 9px; font-weight: 800;
    background: var(--brand-soft); color: var(--brand);
    padding: 2px 6px; border-radius: 8px;
    text-transform: uppercase; letter-spacing: .3px;
}
.admin-bell__text {
    font-size: 13px; color: var(--text);
    line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.admin-bell__meta {
    font-size: 11px; color: var(--text-mute); margin-top: 4px;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.admin-bell__meta i { font-size: 10px; margin-right: 2px; }
.admin-bell__time em { font-style: normal; color: var(--text-soft); font-weight: 700; }
.admin-bell__footer {
    display: flex; gap: 12px; justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.admin-bell__footer a {
    font-size: 12px; font-weight: 700; color: var(--primary);
    text-decoration: none;
}
.admin-bell__footer a:hover { color: var(--primary-dark); text-decoration: underline; }
@media (max-width: 600px) {
    .admin-bell__panel { width: calc(100vw - 24px); right: -120px; }
}
.is-sidebar-collapsed .admin-topbar { left: var(--sidebar-w-collapsed); }

.admin-user { position: relative; }
.admin-user__btn {
    display: flex; align-items: center; gap: 10px;
    background: none; border: none; cursor: pointer;
    padding: 6px 12px; border-radius: var(--radius);
    color: var(--text);
    font-family: inherit; font-size: 14px;
}
.admin-user__btn:hover { background: var(--brand-soft); }
.admin-user__avatar {
    width: 36px; height: 36px;
    background: var(--brand); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
    overflow: hidden;
    flex-shrink: 0;
}
.admin-user__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Avatar reutilizável em tabelas (lista de usuários, etc) */
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 11px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
    letter-spacing: .5px;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-avatar--accent { background: var(--accent); }
.user-avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.user-avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.admin-user__meta { text-align: left; line-height: 1.25; max-width: 260px; min-width: 0; }
.admin-user__nome { font-weight: 700; font-size: 13px; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user__role { font-size: 11px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user__role i { margin-right: 2px; }
@media (max-width: 720px) {
    .admin-user__meta { display: none; }
}
.admin-user__menu {
    position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(10,37,64,.12);
    min-width: 220px;
    padding: 8px;
    display: none;
}
.admin-user__menu.is-open { display: block; }
.admin-user__menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
}
.admin-user__menu a:hover { background: var(--brand-soft); color: var(--primary); text-decoration: none; }
.admin-user__menu a i { color: var(--text-soft); }
.admin-user__menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.admin-user__menu .text-danger { color: var(--accent); }
.admin-user__menu .text-danger i { color: var(--accent); }

/* Admin: html/body nunca rolam — só elementos internos designados rolam */
html.is-admin, html.is-admin body {
    height: 100%;
    overflow: hidden;
    margin: 0;
}

/* main fixo respeitando sidebar + topbar */
.admin-main {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    padding: 28px 32px calc(var(--footer-h) + 28px);  /* respira do footer fixo */
    transition: margin-left .2s ease;
    min-height: calc(100vh - var(--topbar-h) - var(--footer-h));
    box-sizing: border-box;
}
/* Páginas longas (dashboard) — admin-main rola; o resto (chat/list/form) é flex column travado */
html.is-admin .admin-main {
    height: calc(100vh - var(--topbar-h) - var(--footer-h));
    overflow-y: auto;
}
/* Quando a página é uma das específicas, anula scroll (regras has() abaixo cuidam) */
html.is-admin .admin-main:has(> .chat-page),
html.is-admin .admin-main:has(> .admin-list-page),
html.is-admin .admin-main:has(> form) { overflow: hidden; }
.is-sidebar-collapsed .admin-main { margin-left: var(--sidebar-w-collapsed); }

.admin-main h1 {
    font-size: 24px; color: var(--brand); font-weight: 800;
    margin: 0 0 24px;
}
.admin-card {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 22px; margin-bottom: 18px;
    width: 100%; max-width: 100%; box-sizing: border-box;
}

/* ============================================================
   ADMIN FOOTER (status bar fixa)
   ============================================================ */
.admin-footer {
    position: fixed; bottom: 0; right: 0; left: var(--sidebar-w);
    height: var(--footer-h);
    background: var(--surface);
    color: var(--text-soft);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 600;
    z-index: 70;
    border-top: 1px solid var(--border);
    transition: left .2s ease;
}
.is-sidebar-collapsed .admin-footer { left: var(--sidebar-w-collapsed); }
.admin-footer i { color: var(--accent); font-size: 10px; }
.admin-footer__left { text-align: left; }
.admin-footer__env { color: var(--text-mute); font-weight: 500; }
.admin-footer__center { text-align: center; font-weight: 800; color: var(--brand); letter-spacing: .2px; }
.admin-footer__center small { color: var(--accent); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 9px; margin-left: 4px; }
.admin-footer__right {
    text-align: right; font-variant-numeric: tabular-nums; color: var(--text);
}
@media (max-width: 720px) {
    .admin-footer { grid-template-columns: 1fr 1fr; padding: 0 12px; font-size: 11px; }
    .admin-footer__center { display: none; }
}

/* ============================================================
   FORMS — 100% largura, ação fixa no rodapé do form, sem estourar viewport
   Estrutura suportada:
     <form> [.admin-card | .card] [.form-actions]
     <form> direto dentro do .form-page .card
   ============================================================ */

/* Form root vira flex-column ocupando o disponível */
.admin-main > form,
.form-page > form,
.admin-card > form,
.form-page .card > form {
    width: 100%; max-width: 100%; box-sizing: border-box;
    display: flex; flex-direction: column;
    min-height: 0;
}
/* Forms no admin-main: ocupam todo o espaço interno disponível.
   Conjunto inteiro rola dentro do form (cards mantêm altura natural empilhada). */
.admin-main > form {
    flex: 1 1 auto;
    min-height: 0;
}
.admin-main:has(> form) {
    overflow: hidden;
    height: calc(100vh - var(--topbar-h) - var(--footer-h));
    padding: 16px 20px;
    box-sizing: border-box;
    display: flex; flex-direction: column;
}
/* Caso o form esteja precedido por <h1>/breadcrumbs no admin-main */
.admin-main:has(> form) > h1 { flex-shrink: 0; margin: 0 0 12px; }

/* Forms admin com múltiplos cards: o conjunto rola dentro do form, cards mantêm altura natural */
.admin-main > form > .admin-card,
.admin-main > form > .card {
    flex: 0 0 auto; /* cada card no tamanho natural — não competem */
    width: 100% !important; max-width: 100% !important;
    margin-bottom: 14px;
}
.admin-main > form > .admin-card:last-of-type,
.admin-main > form > .card:last-of-type { margin-bottom: 0; }
/* Wrapper de scroll: tudo entre <h1> e <form-actions> rola junto */
.admin-main > form { overflow-y: auto; padding-right: 4px; }
.admin-main > form::-webkit-scrollbar { width: 8px; }
.admin-main > form::-webkit-scrollbar-thumb { background: rgba(10,37,64,.18); border-radius: 4px; }

/* Form-actions fixo no fundo (sticky em qualquer estrutura) */
.admin-main > form > .form-actions,
.form-page > form > .form-actions,
.admin-card > form > .form-actions,
.form-page .card > form > .form-actions,
form > .form-actions {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    margin-top: 16px;
    padding: 14px 22px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 -4px 12px rgba(10,37,64,.06);
    display: flex; justify-content: flex-end; gap: 10px;
    z-index: 5;
}
.form-actions .btn { min-width: 120px; }

/* Inputs/selects/textareas: 100% largura sempre */
form input[type=text],
form input[type=email],
form input[type=password],
form input[type=number],
form input[type=url],
form input[type=tel],
form input[type=search],
form input[type=date],
form input[type=datetime-local],
form select,
form textarea {
    width: 100%; max-width: 100%; box-sizing: border-box; display: block;
}
form .form-row { width: 100%; }

/* tabela admin */
.tbl {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.tbl th, .tbl td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.tbl th { background: var(--bg); color: var(--text-soft); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--brand-soft); }

/* badge counter em sidebar */
.badge-count {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    margin-left: 6px;
    vertical-align: middle;
}

/* (admin-sidebar definida acima — bloco antigo removido para evitar override) */

/* ============================================================
   DASHBOARD OLD-SCHOOL (estilo report executivo)
   ============================================================ */
.report-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 2px solid var(--brand);
    padding-bottom: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap; gap: 12px;
}
.report-title {
    font-size: 22px; font-weight: 800; color: var(--brand);
    margin: 0;
}
.report-sub { color: var(--text-soft); font-size: 13px; margin-top: 4px; text-transform: capitalize; }
.report-meta {
    font-size: 12px; color: var(--text-soft);
    text-align: right; line-height: 1.6;
    font-variant-numeric: tabular-nums;
}

.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}
.report-grid > * { min-width: 0; height: 100%; }
.report-grid + .report-grid,
.report-grid + .report-panel,
.report-panel + .report-grid { margin-top: 18px; }
@media (max-width: 900px) { .report-grid { grid-template-columns: 1fr; } }

.report-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px 26px;
    box-shadow: none;
    margin-bottom: 0;
}
/* caption do <table> precisa estar fora do fluxo padrão; tratamos como cabeçalho do card */
.report-panel caption,
.report-panel--main > caption {
    caption-side: top;
    text-align: left;
    font-weight: 800;
    color: var(--brand);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .8px;
    width: 100%;
    display: block;
    padding: 0 4px 14px;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--border);
}
/* report-panel--main usa <table>; o caption já ganha o padding acima.
   Outros painéis usam <h3> — garantir mesmo respiro */
.report-panel h3 {
    margin: 0 0 14px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    border-bottom: 1px solid var(--border);
    padding: 0 4px 10px;
}
/* Tabela genérica usada nos painéis de dashboard (indicadores) */
.report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}
.report-table thead th {
    text-align: left;
    font-size: 11px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    font-weight: 700;
}
.report-table thead th.text-right { text-align: right; }
.report-table tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
    vertical-align: middle;
}
.report-table tbody td i { margin-right: 8px; color: var(--text-soft); }
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-table tbody tr.warn td { background: rgba(217,119,6,.05); }
.report-table tbody tr.alert-row td { background: rgba(234,124,31,.05); }
.report-table tbody tr[data-href] { cursor: pointer; transition: background .12s ease; }
.report-table tbody tr[data-href]:hover td { background: var(--brand-soft); }
.report-table tbody tr[data-href]:hover td i { color: var(--brand); }
.report-table td.num {
    text-align: right;
    font-weight: 800;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
    font-size: 16px;
}
.report-table td.text-right { text-align: right; }

/* Painel especifico de indicadores — mesmo padding/spacing dos demais .report-panel */
.report-panel--indicadores { padding: 0; overflow: hidden; }
.report-panel--indicadores h3 {
    margin: 0;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.report-panel--indicadores .report-table { margin: 0; }
.report-panel--indicadores .report-table thead th:first-child,
.report-panel--indicadores .report-table tbody td:first-child { padding-left: 22px; }
.report-panel--indicadores .report-table thead th:last-child,
.report-panel--indicadores .report-table tbody td:last-child { padding-right: 22px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot--ok   { background: var(--success); }
.dot--warn { background: var(--warning); }
.dot--err  { background: var(--accent); }

.quick-list { list-style: none; padding: 0; margin: 0; }
.quick-list li { padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.quick-list li:last-child { border-bottom: 0; }
.quick-list li a { color: var(--brand); font-weight: 600; }
.quick-list li a:hover { color: var(--accent); }
.quick-list li i { color: var(--text-mute); margin-right: 4px; }

.report-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-list thead th { font-size: 11px; color: var(--text-soft); text-transform: uppercase; padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); letter-spacing: .3px; }
.report-list td { padding: 8px; border-bottom: 1px dashed var(--border); vertical-align: middle; }
.report-list tr:last-child td { border-bottom: 0; }
.report-list td.dt { color: var(--text-mute); width: 80px; font-variant-numeric: tabular-nums; font-size: 12px; }
.report-list td.st { width: 110px; text-align: right; }
.report-list a { color: var(--brand); }
.report-list a:hover { color: var(--accent); }

.tag {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .3px;
    line-height: 1.6;
    white-space: nowrap;
}
.tag i { font-size: 10px; }
.tag--ok     { background: rgba(31,138,58,.15); color: var(--success); }
.tag--warn   { background: rgba(217,119,6,.15); color: var(--warning); }
.tag--err    { background: rgba(234,124,31,.15); color: var(--accent); }
.tag--accent { background: rgba(234,124,31,.15); color: var(--accent); }
.tag--mute   { background: var(--bg);            color: var(--text-soft); border: 1px solid var(--border); }

/* ============================================================
   USER MENU + SINO no header público
   ============================================================ */
.site-nav { display: flex; align-items: center; gap: 10px; }

.user-bell { position: relative; }
.user-bell__btn {
    background: none; border: none; cursor: pointer;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-soft); font-size: 17px;
    position: relative;
    transition: background .2s ease, color .2s ease;
}
.user-bell__btn:hover { background: var(--brand-soft); color: var(--brand); }
.user-bell__btn.has-unread { color: var(--accent); }
.user-bell__badge {
    position: absolute; top: -2px; right: -4px;
    box-sizing: border-box;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--accent); color: #fff;
    border-radius: 9px;
    font-size: 10px; font-weight: 800;
    line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--surface);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.user-bell__panel {
    position: absolute; top: calc(100% + 8px); right: -10px;
    width: 360px; max-height: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(10,37,64,.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}
.user-bell__panel.is-open { display: flex; }
.user-bell__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    font-weight: 800; color: var(--brand); font-size: 13px;
}
.user-bell__header i { margin-right: 5px; color: var(--accent); }
.user-bell__mark {
    background: none; border: none; cursor: pointer;
    color: var(--primary); font-size: 11px; font-weight: 700;
    padding: 4px 8px; border-radius: 4px;
}
.user-bell__mark:hover { background: var(--brand-soft); }
.user-bell__list { overflow-y: auto; max-height: 380px; }
.user-bell__empty { padding: 28px 16px; text-align: center; color: var(--text-mute); font-size: 13px; }
.user-bell__item {
    display: flex; gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text); text-decoration: none;
    transition: background .15s ease;
}
.user-bell__item:hover { background: var(--brand-soft); text-decoration: none; }
.user-bell__item:last-child { border-bottom: none; }
.user-bell__item.is-unread { background: rgba(234,124,31,.06); border-left: 3px solid var(--accent); }
.user-bell__icon {
    width: 30px; height: 30px;
    background: var(--bg); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); flex-shrink: 0;
}
.user-bell__item .user-bell__icon i { color: var(--success); }
.user-bell__body { flex: 1; min-width: 0; }
.user-bell__title { font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 2px; }
.user-bell__text { font-size: 12px; color: var(--text); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.user-bell__meta { font-size: 10px; color: var(--text-mute); margin-top: 3px; font-variant-numeric: tabular-nums; }

.user-menu { position: relative; }
.user-menu__btn {
    display: flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer;
    padding: 5px 10px 5px 5px; border-radius: var(--radius);
    color: var(--text); font: inherit; font-size: 13px;
    transition: background .15s ease;
}
.user-menu__btn:hover { background: var(--brand-soft); }
.user-menu__avatar {
    width: 32px; height: 32px;
    background: var(--brand); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
    overflow: hidden; flex-shrink: 0;
}
.user-menu__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-menu__meta { text-align: left; line-height: 1.2; }
.user-menu__nome { font-weight: 700; font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__role { font-size: 10px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .4px; }
.user-sheet-backdrop { display: none; }
.site-search-btn { display: none; }
.search-overlay { display: none; }
.user-menu__panel {
    position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 12px 30px rgba(10,37,64,.16);
    min-width: 220px;
    padding: 8px;
    display: none;
    z-index: 100;
}
.user-menu__panel.is-open { display: block; }
.user-menu__panel a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    text-decoration: none;
}
.user-menu__panel a:hover { background: var(--brand-soft); color: var(--brand); }
.user-menu__panel a.text-danger { color: var(--accent); }
.user-menu__panel a.text-danger:hover { background: rgba(234,124,31,.08); }
.user-menu__panel hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* ============================================================
   PAINEL DO USUÁRIO público
   ============================================================ */
.painel-page { padding: 28px 0; }
.painel-header {
    display: flex; align-items: center; gap: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
}
.painel-avatar {
    width: 64px; height: 64px;
    background: var(--brand); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 900;
    flex-shrink: 0;
    overflow: hidden;
}
.painel-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.painel-header__meta { flex: 1; min-width: 0; }

.painel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.painel-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex; align-items: center; gap: 14px;
    color: inherit; text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.painel-stat:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(234,124,31,.10);
    transform: translateY(-1px);
    text-decoration: none;
}
a.painel-stat:hover * { text-decoration: none; }

/* Histórico: cada <li> vira card clicável (data-href + card-click.js global) */
.painel-list--cards { display: flex; flex-direction: column; gap: 8px; }
.painel-list--cards li {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s;
}
.painel-list--cards li:hover {
    border-color: var(--accent);
    background: rgba(234,124,31,.04);
    transform: translateY(-1px);
}
.painel-list__title {
    color: var(--brand); font-weight: 600;
    margin-bottom: 4px;
}
.painel-list--cards li:hover .painel-list__title { color: var(--accent); }
.painel-stat i { font-size: 24px; color: var(--accent); }
.painel-stat strong { display: block; font-size: 20px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.painel-stat span { display: block; font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .4px; }
@media (max-width: 720px) {
    .painel-stats { grid-template-columns: repeat(2, 1fr); }
    .painel-header { flex-wrap: wrap; }
}

.painel-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
@media (max-width: 900px) { .painel-grid { grid-template-columns: 1fr; } }
.painel-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
}
.painel-section h2 {
    margin: 0 0 14px;
    font-size: 14px; color: var(--brand);
    text-transform: uppercase; letter-spacing: .4px;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.painel-section h2 i { margin-right: 6px; color: var(--accent); }
.painel-list { list-style: none; padding: 0; margin: 0; }
.painel-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}
.painel-list li:last-child { border-bottom: 0; }
.painel-list li a { color: var(--brand); font-weight: 600; }
.painel-list__meta {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-top: 4px;
    font-size: 11px; color: var(--text-mute);
}
.painel-list__meta i { font-size: 10px; }
.painel-list__link { color: var(--text-soft); }

/* ============================================================
   MODAL CONFIRMAÇÃO (Modal.confirm / .alert / .prompt)
   ============================================================ */
.mconfirm-overlay {
    position: fixed; inset: 0;
    background: rgba(10,37,64,.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity .18s ease;
    backdrop-filter: blur(2px);
}
.mconfirm-overlay.is-open { opacity: 1; }
.mconfirm {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(10,37,64,.30), 0 4px 12px rgba(10,37,64,.08);
    width: 100%; max-width: 440px;
    overflow: hidden;
    transform: translateY(-12px) scale(.96);
    transition: transform .2s ease, opacity .18s ease;
    opacity: 0;
    outline: none;
}
.mconfirm-overlay.is-open .mconfirm { transform: translateY(0) scale(1); opacity: 1; }
.mconfirm__head {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 22px 22px 16px;
}
.mconfirm__icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.mconfirm__icon--brand  { background: var(--brand-soft);          color: var(--brand);   }
.mconfirm__icon--info   { background: rgba(31,122,133,.12);       color: var(--primary); }
.mconfirm__icon--danger { background: rgba(234,124,31,.15);       color: var(--accent);  }
.mconfirm__head-text { flex: 1; min-width: 0; }
.mconfirm__title {
    margin: 0 0 6px;
    font-size: 16px; font-weight: 800; color: var(--brand);
}
.mconfirm__msg {
    font-size: 14px; line-height: 1.5; color: var(--text);
    overflow-wrap: anywhere;
}
.mconfirm__body { padding: 0 22px 8px; }
.mconfirm__input {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font: inherit; font-size: 14px;
    background: var(--bg); color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.mconfirm__input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31,122,133,.12);
}
.mconfirm__foot {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 14px 22px 18px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.mconfirm__foot .btn { min-width: 100px; }

/* Pacote de status numa célula de tabela — empilhado vertical, alinhado, sem quebra estranha */
.status-cell { white-space: normal; min-width: 130px; }
.status-tags {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* ============================================================
   TOAST notifications (admin)
   ============================================================ */
.toast-stack {
    position: fixed; bottom: 24px; right: 24px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 1000;
    max-width: 340px;
}
.toast {
    display: flex; align-items: center; gap: 10px;
    background: var(--brand); color: #fff;
    padding: 14px 18px; border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(10,37,64,.25);
    font-size: 14px; font-weight: 700;
    text-decoration: none;
    border-left: 4px solid var(--accent);
    animation: toast-in .25s ease;
    transition: opacity .4s, transform .4s;
}
.toast i { font-size: 20px; color: var(--accent); }
.toast:hover { background: #0f3358; text-decoration: none; color: #fff; }
.toast--out { opacity: 0; transform: translateX(120%); }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(120%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* dashboard cards (legacy — outras telas) */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.dash-stat {
    background: var(--surface);
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}
.dash-stat__lbl { color: var(--text-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; font-weight: 700; }
.dash-stat__num { font-size: 32px; font-weight: 800; color: var(--brand); margin-top: 4px; line-height: 1; }
.dash-stat.warning { border-left-color: var(--warning); }
.dash-stat.accent { border-left-color: var(--accent); }
.dash-stat.teal { border-left-color: var(--teal); }
.dash-stat.success { border-left-color: var(--success); }

/* admin login */
/* ============================================================
   LOGIN (admin + público) — fundo branco, card centralizado
   ============================================================ */
.admin-login {
    min-height: 100vh;
    background: #fff;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(31,122,133,.06) 0, transparent 320px),
        radial-gradient(circle at 88% 86%, rgba(234,124,31,.06) 0, transparent 340px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    font-family: 'Nunito', sans-serif;
}
.admin-login .card {
    max-width: 420px; width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px 32px;
    box-shadow: 0 20px 50px rgba(10,37,64,.08), 0 4px 12px rgba(10,37,64,.04);
}
.admin-login__brand {
    text-align: center;
    margin-bottom: 22px;
}
.admin-login__brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    background: var(--brand); color: #fff;
    border-radius: 14px;
    font-size: 28px;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(10,37,64,.16);
}
.admin-login__brand-mark span { color: var(--accent); }
.admin-login__brand-title {
    font-weight: 900; font-size: 22px; color: var(--brand); letter-spacing: -.3px;
    margin: 0;
}
.admin-login__brand-title small {
    display: block; font-size: 11px; color: var(--accent);
    font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
    margin-top: 2px;
}
.admin-login h1 {
    color: var(--brand); margin: 0 0 18px;
    font-size: 18px; font-weight: 800; text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}
.admin-login .form-row { margin-bottom: 14px; }
.admin-login .form-row label {
    display: block; font-size: 12px; font-weight: 700;
    color: var(--text-soft); text-transform: uppercase;
    letter-spacing: .4px; margin-bottom: 6px;
}
.admin-login .form-row input {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px;
    background: var(--bg); color: var(--text);
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-sizing: border-box;
}
.admin-login .form-row input:focus {
    outline: none; border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(31,122,133,.12);
}
.admin-login .form-actions { margin-top: 6px; }
.admin-login__footer {
    text-align: center; font-size: 12px; color: var(--text-mute);
    margin-top: 18px;
}
.admin-login__footer a { color: var(--primary); font-weight: 700; }
.admin-login__footer a:hover { color: var(--primary-dark); }

/* ============================================================
   UTILIDADES
   ============================================================ */
.text-muted { color: var(--text-soft); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 18px; }
.small { font-size: 13px; }
.tiny  { font-size: 11px; }
.w-100 { width: 100%; }
.hidden { display: none; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.flex-end { display: flex; gap: 10px; justify-content: flex-end; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 18px; }

/* ============================================================
   PERFIL — card grande, multi-coluna, foto upload
   ============================================================ */
.form-page--wide { max-width: 880px; }
.perfil-card { max-width: none; padding: 0; overflow: hidden; }
.perfil-section { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.perfil-section:last-of-type { border-bottom: none; }
.perfil-section__title {
    margin: 0 0 14px; font-size: 13px; font-weight: 800;
    color: var(--brand); text-transform: uppercase; letter-spacing: .6px;
    display: flex; align-items: center; gap: 8px;
}
.perfil-section__title i { color: var(--accent); }

.perfil-foto-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.perfil-foto-preview {
    width: 110px; height: 110px; border-radius: 50%;
    background: var(--brand-soft);
    border: 3px solid var(--surface);
    box-shadow: 0 4px 14px rgba(10,37,64,.18);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.perfil-foto-preview img { width: 100%; height: 100%; object-fit: cover; }
.perfil-foto-preview span {
    font-size: 38px; font-weight: 900; color: var(--brand);
}
.perfil-foto-actions { flex: 1; min-width: 200px; }

.form-grid--2col { grid-template-columns: 1fr 1fr; gap: 14px; display: grid; }
.cadastro-card { padding: 32px 36px !important; }
.cadastro-card .auth-divider { margin: 4px 0; }
@media (max-width: 720px) {
    .cadastro-card { padding: 20px 16px !important; }
}
.form-grid--endereco {
    display: grid;
    grid-template-columns: 140px 1fr 100px 1fr;
    grid-template-areas:
        "cep    logr   logr   logr"
        "num    compl  compl  compl"
        "bairro cid    cid    uf";
    gap: 14px;
}
.perfil-card .form-actions {
    padding: 18px 24px;
    background: rgba(13,79,142,.03);
    border-top: 1px solid var(--border);
    display: flex; gap: 10px; justify-content: flex-end;
    margin: 0;
}

@media (max-width: 720px) {
    .form-grid--2col { grid-template-columns: 1fr; }
    .form-grid--endereco {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "cep    cep"
            "logr   logr"
            "num    compl"
            "bairro bairro"
            "cid    uf";
    }
    .perfil-section { padding: 16px; }
    .perfil-card .form-actions { padding: 14px 16px; flex-direction: column; }
    .perfil-card .form-actions .btn { width: 100%; }
}

/* ============================================================
   ROW ACTIONS — dropdown kebab nas tabelas admin
   ============================================================ */
.row-actions { position: relative; display: inline-block; }
.row-actions__toggle {
    background: transparent; border: 1px solid transparent;
    cursor: pointer;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-soft); font-size: 18px;
    transition: background .15s, color .15s, border-color .15s;
}
.row-actions__toggle:hover, .row-actions.is-open .row-actions__toggle {
    background: var(--brand-soft); color: var(--brand);
    border-color: var(--border);
}
.row-actions__menu {
    position: fixed;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 28px rgba(10,37,64,.22);
    padding: 4px;
    display: none;
    z-index: 1000;
    text-align: left;
}
.row-actions.is-open .row-actions__menu { display: block; }
.row-actions__menu a {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    color: var(--text);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s, color .12s;
}
.row-actions__menu a i { font-size: 14px; color: var(--text-mute); width: 16px; text-align: center; }
.row-actions__menu a:hover { background: var(--brand-soft); color: var(--brand); }
.row-actions__menu a:hover i { color: var(--brand); }
.row-actions__menu a.is-danger { color: var(--accent); }
.row-actions__menu a.is-danger i { color: var(--accent); }
.row-actions__menu a.is-danger:hover { background: rgba(234,124,31,.08); color: var(--accent); }
.row-actions__menu a.is-success { color: var(--success); }
.row-actions__menu a.is-success i { color: var(--success); }
.row-actions__menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ============================================================
   MOBILE — app-like responsive (público + admin)
   ============================================================ */

/* Hamburger e brand mobile no admin (escondido por default) */
.admin-topbar__burger { display: none; }
.admin-topbar__brand-mobile { display: none; }
.admin-sidebar-overlay { display: none; }

/* ------- SITE PÚBLICO ≤ 720px ------- */
@media (max-width: 720px) {
    /* Defesa global anti-overflow */
    html, body { max-width: 100vw; overflow-x: hidden; }
    body > main, body > header, body > footer { max-width: 100vw; }
    .container, .layout, .feed, .form-page, .painel-page { width: 100%; max-width: 100%; box-sizing: border-box; }

    /* TOPBAR — fixa ao scroll, altura maior */
    .site-header {
        padding: 0;
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
    }
    .site-header__inner {
        display: flex; flex-wrap: wrap;
        width: 100%; max-width: 100%;
        align-items: center;
        gap: 10px;
        padding: 16px 14px;
        box-sizing: border-box;
        min-height: 64px;
    }
    .site-brand { font-size: 20px; flex: 0 0 auto; margin-right: auto; min-width: 0; }
    .site-tagline { display: none; }

    /* SEARCH — esconde form inline. Botão lupa aparece no nav. */
    .site-search { display: none !important; }
    .site-search-btn {
        display: inline-flex !important;
        align-items: center; justify-content: center;
        width: 36px; height: 36px;
        background: var(--bg);
        color: var(--brand);
        border: 1px solid var(--border);
        border-radius: 50%;
        font-size: 16px;
        cursor: pointer;
        order: 1;
    }
    .site-search-btn:hover { background: var(--brand-soft); }

    /* SEARCH OVERLAY mobile (slide-down do topo) */
    .search-overlay {
        display: block;
        position: fixed; top: 0; left: 0; right: 0;
        background: var(--surface);
        padding: 12px;
        box-shadow: 0 4px 16px rgba(10,37,64,.18);
        z-index: 400;
        transform: translateY(-100%);
        transition: transform .25s ease;
    }
    .search-overlay.is-open { transform: translateY(0); }
    .search-overlay__form {
        display: flex; align-items: center;
        gap: 8px;
        max-width: 100%;
    }
    .search-overlay__back, .search-overlay__submit {
        background: transparent;
        border: none;
        color: var(--brand);
        font-size: 20px;
        padding: 8px 10px;
        cursor: pointer;
        flex-shrink: 0;
    }
    .search-overlay__back:hover, .search-overlay__submit:hover { color: var(--accent); }
    .search-overlay input {
        flex: 1 1 auto; min-width: 0;
        padding: 10px 14px;
        font: inherit; font-size: 15px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--bg);
        outline: none;
    }
    .search-overlay input:focus { border-color: var(--primary); background: var(--surface); }

    .site-nav {
        order: 2;
        flex: 0 0 auto;
        gap: 6px;
        justify-content: flex-end;
        align-items: center;
    }
    .site-nav a:not(.btn):not(.user-menu__btn) { display: none; }
    .site-nav .btn { padding: 7px 14px; font-size: 13px; }
    .user-menu__meta { display: none; }
    .user-menu__btn { padding: 4px 6px 4px 4px; }
    .user-menu__btn .bi-chevron-down { display: none; }
    .user-bell__btn { width: 36px; height: 36px; }

    /* DROPDOWN user/sino — comportamento igual ao admin: absolute abaixo do botão.
       Sem sheet bottom, sem backdrop. Painel cresce pra esquerda do avatar. */
    .user-menu__panel {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        right: 0 !important; left: auto !important; bottom: auto !important;
        width: 240px !important;
        max-width: calc(100vw - 24px) !important;
        z-index: 300 !important;
    }
    .user-bell__panel {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        right: -8px !important; left: auto !important; bottom: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: 360px !important;
        z-index: 300 !important;
    }
    /* Backdrop fica desativado (modo dropdown clássico) */
    .user-sheet-backdrop { display: none !important; }

    .container { padding: 0 12px; }
    main.container { padding-left: 12px; padding-right: 12px; }

    /* Layout detalhe pergunta: 1 coluna, sidebar pro fim */
    .layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 100%;
        gap: 16px;
        padding: 14px 0 40px;
    }
    .sidebar { order: 99; width: 100%; min-width: 0; max-width: 100%; }
    .sidebar-card { padding: 14px; width: 100%; max-width: 100%; box-sizing: border-box; }

    /* CARDS pergunta — defesa anti-overflow */
    .pergunta {
        padding: 16px 14px; margin-bottom: 12px;
        width: 100%; max-width: 100%; min-width: 0;
        box-sizing: border-box; overflow: hidden;
    }
    .pergunta * { min-width: 0; max-width: 100%; }
    .pergunta img, .pergunta video, .pergunta iframe, .pergunta embed, .pergunta object {
        max-width: 100%; height: auto; display: block;
    }
    .pergunta table {
        display: block; overflow-x: auto; max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    .pergunta pre, .pergunta code {
        white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere;
    }
    .pergunta__head { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 12px; }
    .pergunta__head .text-right { text-align: left; }
    .resposta-balao { max-width: 100%; padding: 12px 14px; margin-left: 0; }
    .pergunta__footer { flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
    .pergunta__footer .com-btn.right { margin-left: 0; }

    /* HERO */
    .hero-strip {
        padding: 16px 14px;
        width: 100%; max-width: 100%; box-sizing: border-box;
        margin-left: 0; margin-right: 0;
    }
    .hero-strip__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-stat strong { font-size: 15px; }
    .hero-stat i { font-size: 16px; }

    /* FEED */
    .feed { max-width: 100%; width: 100%; padding: 0; margin: 16px 0 40px; }
    .composer-hero {
        padding: 14px;
        width: 100%; max-width: 100%; box-sizing: border-box;
    }
    .composer-hero__title { font-size: 16px; }
    .composer-hero__row { flex-direction: column; gap: 10px; }
    .composer-hero__row input { width: 100%; min-width: 0; }
    .composer-hero__row .btn { width: 100%; }

    /* TABS */
    .tabs { padding: 4px; gap: 2px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    .tabs::-webkit-scrollbar { display: none; }
    .tabs a { flex: 0 0 auto; padding: 8px 12px; font-size: 11px; white-space: nowrap; }

    /* MODAIS fullscreen */
    .modal-overlay { padding: 0; align-items: stretch; }
    .modal {
        max-width: 100%; width: 100%; height: 100vh; max-height: 100vh;
        border-radius: 0;
        display: flex; flex-direction: column;
    }
    .modal__body { flex: 1; overflow-y: auto; }
    .modal__head, .modal__foot { flex-shrink: 0; }
    .modal__foot { padding: 12px 14px; }
    .modal-textarea { min-height: 140px; }
    .modal--auth { max-width: 100%; max-height: 100vh; border-radius: 0; height: 100vh; }
    .modal--auth .auth-pane { max-height: none; flex: 1; overflow-y: auto; }

    /* PAINEL user */
    .painel-page { padding: 16px 0; }
    .painel-header { padding: 16px; gap: 12px; flex-wrap: wrap; }
    .painel-avatar { width: 56px; height: 56px; font-size: 22px; }
    .painel-header__meta { min-width: 0; flex: 1 1 60%; }
    .painel-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .painel-stat { padding: 12px; gap: 10px; }
    .painel-stat i { font-size: 20px; }
    .painel-stat strong { font-size: 16px; }
    .painel-grid { grid-template-columns: 1fr; gap: 12px; }
    .painel-section { padding: 14px; width: 100%; max-width: 100%; box-sizing: border-box; }
    .painel-list li { word-break: break-word; overflow-wrap: anywhere; }

    /* Formulários */
    .form-page { padding: 12px 0 40px; }
    .form-page .card { width: 100%; max-width: 100%; box-sizing: border-box; }

    /* COMENTÁRIOS */
    .comentario__body, .comentario__actions { padding-left: 0; }
    .composer { flex-wrap: wrap; gap: 8px; }
    .composer textarea { flex: 1 1 100%; min-width: 0; }

    .site-footer { padding: 20px 12px; margin-top: 28px; font-size: 12px; }
}

/* ------- ADMIN ≤ 900px ------- */
@media (max-width: 900px) {
    /* Sidebar vira drawer off-canvas */
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,.3);
        z-index: 100;
    }
    .admin-sidebar.is-mobile-open { transform: translateX(0); }

    /* Overlay escuro */
    .admin-sidebar-overlay {
        display: block;
        position: fixed; inset: 0;
        background: rgba(10,37,64,.55);
        z-index: 99;
        opacity: 0; visibility: hidden;
        transition: opacity .2s, visibility .2s;
    }
    .admin-sidebar-overlay.is-active { opacity: 1; visibility: visible; }

    /* Topbar full width + hamburger + brand mobile */
    .admin-topbar {
        left: 0 !important;
        padding: 0 12px;
        gap: 4px;
    }
    .admin-topbar__burger {
        display: inline-flex; align-items: center; justify-content: center;
        background: none; border: none; cursor: pointer;
        width: 40px; height: 40px;
        color: var(--brand); font-size: 22px;
        border-radius: 50%;
        flex-shrink: 0;
    }
    .admin-topbar__burger:hover { background: var(--brand-soft); }
    .admin-topbar__brand-mobile {
        display: inline-block;
        font-weight: 900; font-size: 16px; color: var(--brand);
        flex: 1; min-width: 0;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .admin-topbar__brand-mobile small {
        color: var(--accent); font-size: 9px; font-weight: 800;
        letter-spacing: 1.5px; text-transform: uppercase; margin-left: 4px;
    }

    .admin-user__meta { display: none; }
    .admin-user__btn { padding: 4px 6px 4px 4px; }
    .admin-user__btn .bi-chevron-down { display: none; }

    .admin-main {
        margin-left: 0 !important;
        padding: 16px 12px calc(var(--footer-h) + 16px);
    }
    .is-sidebar-collapsed .admin-main { margin-left: 0 !important; }

    .admin-footer {
        left: 0 !important;
        grid-template-columns: 1fr auto;
        font-size: 10px;
        padding: 0 12px;
    }
    .admin-footer__center { display: none; }

    .admin-list-page__header { flex-direction: column; align-items: stretch; gap: 8px; }
    .admin-list-page__header h1 { font-size: 20px; }
    .admin-list-page__filters { padding: 8px 10px; }
    .tbl th, .tbl td { padding: 8px 10px; font-size: 12px; }

    .chat-header { padding: 8px 10px; gap: 6px; flex-wrap: wrap; }
    .chat-header__meta { font-size: 11px; gap: 6px; }
    .chat-header__search { min-width: 0; max-width: 100%; flex: 1 0 100%; order: 99; }
    .chat-body { padding: 14px 12px; }
    .chat-msg { max-width: 90%; }
    .chat-bubble { padding: 8px 12px; }
    .chat-composer__editor-wrap { flex-direction: column; }
    .chat-composer__send { width: 100%; height: 44px; }

    .form-grid { grid-template-columns: 1fr; }
    .report-grid { grid-template-columns: 1fr; gap: 12px; }
    .report-panel { padding: 14px; }

    .admin-bell__panel { right: -4px; width: calc(100vw - 24px); max-width: 380px; }

    .mconfirm-overlay { padding: 16px; }
    .mconfirm { max-width: 100%; }
}

/* ------- SMARTPHONES PEQUENOS ≤ 380px ------- */
@media (max-width: 380px) {
    .painel-stats { grid-template-columns: 1fr; }
    .tabs a { font-size: 10px; padding: 7px 10px; }
    .modal__head h2 { font-size: 15px; }
    .pergunta { padding: 14px 12px; }
    .hero-strip__grid { gap: 8px; }
    .hero-stat strong { font-size: 14px; }
    .hero-stat span { font-size: 10px; }

    /* Topbar bem compacto */
    .site-brand { font-size: 17px; }
    .site-brand sup { font-size: 10px; }
    .site-nav { gap: 4px; }
    .user-bell__btn { width: 32px; height: 32px; font-size: 16px; }
    .user-menu__avatar { width: 28px; height: 28px; font-size: 11px; }
    .user-menu__btn { padding: 2px 4px 2px 2px; }
}

/* Touch devices: remove hover stuck */
@media (hover: none) {
    .pergunta--clickable:hover { transform: none; box-shadow: var(--shadow-sm); border-color: transparent; }
    .painel-list--cards li:hover { background: var(--surface); border-color: var(--border); transform: none; }
    .com-btn:hover { background: transparent; color: var(--text-soft); }
}

/* Ver mais inline em cards de pergunta — abre detalhe */
.ver-mais {
    display: inline-block;
    margin-left: 4px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    z-index: 2;
}
.ver-mais:hover { text-decoration: underline; }

/* Footer da pergunta: agrupa share + ações do dono à direita */
.pergunta__footer .footer-right {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Botões de share (WhatsApp / Instagram) — cores oficiais ao hover */
.share-btn { transition: color .15s ease; }
.share-btn--wa:hover, .share-btn--wa:focus { color: #25D366; }
/* Instagram hover: gradiente oficial do app (laranja → rosa → roxo → azul)
   aplicado no ícone via background-clip. Hover no botão também limpa o
   background brand padrão pra deixar o gradiente respirar. */
.share-btn--ig:hover, .share-btn--ig:focus { background: transparent !important; }
.share-btn--ig:hover i,
.share-btn--ig:focus i {
    background: linear-gradient(45deg, #F58529 0%, #DD2A7B 35%, #8134AF 70%, #515BD4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Composer: agrupa textarea + checkbox anônimo em coluna pra checkbox ficar dentro do form */
.composer__field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.composer__anon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

/* Form de resposta inline dentro de comentário top-level */
.composer--reply {
    margin-top: 10px;
    margin-left: 32px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* Spacer no footer da pergunta — empurra .footer-right pra extrema direita
   mesmo quando flex-wrap faz items quebrarem linha */
.pergunta__footer .footer-spacer {
    flex: 1 1 auto;
    min-width: 0;
}

/* Textarea de comentário: tamanho fixo, sem resize, ocupa 100% da largura */
.composer__field textarea {
    width: 100%;
    box-sizing: border-box;
    resize: none;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    overflow-y: auto;
}

/* Reforço: ícones de share + ações do dono FORÇADAS à extrema direita */
.pergunta__footer .footer-right { margin-left: auto !important; }
.pergunta__footer .footer-spacer { flex: 1 1 0 !important; }

/* Lightbox: visualizador fullscreen com zoom + download */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    animation: lightboxFade .15s ease-out;
}
.lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    cursor: zoom-out;
}
.lightbox-stage.is-zoomed { cursor: grab; }
.lightbox-stage.is-zoomed:active { cursor: grabbing; }
.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
    user-select: none;
    border-radius: 4px;
    transform-origin: center center;
    transition: transform .12s ease-out;
    will-change: transform;
}
.lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lightbox-tool {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 17px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}
.lightbox-tool:hover,
.lightbox-tool:focus { background: rgba(255, 255, 255, 0.22); outline: none; }
.lightbox-tool:active { transform: scale(0.94); }
.lightbox-tool--close { margin-left: 8px; background: rgba(255, 80, 80, 0.25); }
.lightbox-tool--close:hover { background: rgba(255, 80, 80, 0.45); }
.lightbox-zoom-label {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    min-width: 52px;
    text-align: center;
    margin: 0 6px;
    user-select: none;
}

/* Indica que imagens de conteúdo abrem lightbox ao hover */
.pergunta .pergunta__img,
.comentario img,
.resposta-balao img { cursor: zoom-in; }

@keyframes lightboxFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Wrapper do form de busca dos comentários: input estilizado + botão "Localizar" fora */
.chat-header__search-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
