/* ============================================================
   JTRO — Design System
   Fonte: Outfit (títulos) + Plus Jakarta Sans (corpo)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500&display=swap');

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --sidebar-width: 232px;

    --color-bg:           #f7f6f3;
    --color-surface:      #ffffff;
    --color-sidebar:      #f0ede8;
    --color-border:       #e2ddd6;
    --color-border-md:    #ccc8c0;

    --color-text-primary:   #1a1917;
    --color-text-secondary: #5c5850;
    --color-text-muted:     #9a948a;

    --color-blue:         #185FA5;
    --color-blue-light:   #E6F1FB;
    --color-blue-mid:     #378ADD;
    --color-green:        #2e7d32;
    --color-green-light:  #EAF3DE;
    --color-amber:        #854F0B;
    --color-amber-light:  #FAEEDA;
    --color-amber-mid:    #EF9F27;
    --color-red:          #A32D2D;
    --color-red-light:    #FCEBEB;
    --color-red-mid:      #E24B4A;
    --color-teal:         #0F6E56;
    --color-teal-light:   #E1F5EE;
    --color-purple:       #534AB7;
    --color-purple-light: #EEEDFE;

    --radius-sm:   6px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
}

/* ============================================================
   Base
   ============================================================ */

html, body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg);
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text-primary);
}

h1 { font-size: 22px; margin-bottom: 4px; letter-spacing: -0.4px; }
h2 { font-size: 17px; margin-bottom: 12px; letter-spacing: -0.2px; }
h3 { font-size: 15px; margin-bottom: 8px; }

p { margin-bottom: 8px; color: var(--color-text-secondary); font-size: 14px; }
p:last-child { margin-bottom: 0; }
p strong { color: var(--color-text-primary); font-weight: 500; }

a { color: var(--color-blue); text-decoration: none; }
a:hover { opacity: 0.8; }

hr { border: none; border-top: 1px solid var(--color-border); margin: 16px 0; }

small { font-size: 12px; color: var(--color-text-muted); display: block; margin-top: 4px; line-height: 1.4; }

/* ============================================================
   Layout
   ============================================================ */

.jtro-layout { display: flex; min-height: 100vh; }

.jtro-main {
    margin-left: var(--sidebar-width);
    padding: 32px 36px;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    max-width: none;
    min-width: 0;
}

.page-header { margin-bottom: 24px; }

.page-header-subtitulo {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.grid       { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-perfil{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================================
   Sidebar
   ============================================================ */

.jtro-sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    padding: 8px 10px 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}

.sidebar-logo-topo {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}

.sidebar-logo-img {
    width: 150px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-logo-titulo {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.3px;
    display: block;
}

.sidebar-logo-subtitulo {
    font-size: 11px;
    color: var(--color-text-muted);
    display: block;
    margin-top: 2px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.sidebar-logo-igreja {
    font-size: 11px;
    color: var(--color-text-secondary);
    display: block;
    margin-top: 3px;
    line-height: 1.3;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.nav-secao {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 12px 10px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text-secondary);
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 1px;
    transition: background 0.12s, color 0.12s;
    position: relative;
}

.nav-item:hover { background: var(--color-surface); color: var(--color-text-primary); opacity: 1; }

.nav-item.ativo {
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-weight: 500;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.nav-item.ativo svg { opacity: 1; }

.nav-badge {
    margin-left: auto;
    background: var(--color-red-mid);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Submenu */
.nav-item-grupo { position: relative; }

.nav-item-trigger {
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 1px;
    transition: background 0.12s, color 0.12s;
}

.nav-item-trigger:hover { background: var(--color-surface); color: var(--color-text-primary); }

.nav-item-trigger.ativo {
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-weight: 500;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.nav-item-trigger svg:first-child { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.nav-item-trigger span { flex: 1; }

.nav-chevron {
    width: 14px !important; height: 14px !important;
    flex-shrink: 0; opacity: 0.5;
    transition: transform 0.2s;
    margin-left: auto;
}

.nav-item-grupo.aberto .nav-chevron { transform: rotate(180deg); }
.nav-submenu { display: none; padding-left: 28px; margin-bottom: 2px; }
.nav-item-grupo.aberto .nav-submenu { display: block; }

.nav-subitem {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-bottom: 1px;
    transition: background 0.12s, color 0.12s;
}

.nav-subitem::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--color-border-md);
    flex-shrink: 0;
    margin-right: 8px;
}

.nav-subitem:hover { background: var(--color-surface); color: var(--color-text-primary); opacity: 1; }
.nav-subitem.ativo { color: var(--color-blue); font-weight: 500; }
.nav-subitem.ativo::before { background: var(--color-blue); }

/* Footer */
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--color-border); }

.sidebar-usuario {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
}

.sidebar-usuario:hover { background: var(--color-surface); opacity: 1; }

.usuario-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--color-blue-light);
    color: var(--color-blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 500; flex-shrink: 0;
}

.usuario-nome   { font-size: 13px; font-weight: 500; color: var(--color-text-primary); display: block; }
.usuario-perfil { font-size: 11px; color: var(--color-text-muted); display: block; }

.sidebar-sair {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-top: 2px;
    transition: background 0.12s, color 0.12s;
}

.sidebar-sair:hover { background: var(--color-red-light); color: var(--color-red); opacity: 1; }
.sidebar-sair svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ============================================================
   Mensagens de sistema
   ============================================================ */

.mensagem {
    background: var(--color-green-light);
    color: #1a4a1e;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid var(--color-green);
}

.erro {
    background: var(--color-red-light);
    color: #5a1a1a;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 3px solid var(--color-red-mid);
}

/* ============================================================
   Formulários
   ============================================================ */

form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.campo { margin-bottom: 16px; }

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--color-text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border-md);
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 14px;
    background: var(--color-surface);
    color: var(--color-text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-blue-mid);
    box-shadow: 0 0 0 3px rgba(55,138,221,0.12);
}

textarea { min-height: 100px; resize: vertical; }

.form-secao {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.form-secao-titulo {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.grid-endereco-pessoa {
    display: grid;
    grid-template-columns: 130px minmax(240px, 2.2fr) 110px minmax(200px, 1.5fr);
    gap: 16px;
}

.campo-endereco-logradouro {
    grid-column: span 2;
}

.campo-endereco-complemento {
    grid-column: span 2;
}

/* Botão global — exclui componentes especiais */
button[type="submit"],
button:not(.nav-item):not(.nav-item-trigger):not(.notif-btn):not(.notif-tab):not(.notif-acao-btn):not(.notif-marcar-todos):not([class^="ql-"]):not([class*=" ql-"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    background: var(--color-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    min-height: 38px;
    transition: opacity 0.15s;
}

button[type="submit"]:hover,
button:not(.nav-item):not(.nav-item-trigger):not(.notif-btn):not(.notif-tab):not(.notif-acao-btn):not(.notif-marcar-todos):not([class^="ql-"]):not([class*=" ql-"]):hover { opacity: 0.88; }

.form-acao { margin: 0; padding: 0; border: none; background: transparent; display: inline; }

/* Checkbox e radio */
.status-group { display: flex; flex-direction: column; gap: 8px; }

.status-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    margin: 0;
    font-size: 14px;
}

.status-group input[type="radio"],
.checkbox-item input { width: auto; margin: 0; padding: 0; }

.checkbox-lista {
    border: 1px solid var(--color-border-md);
    border-radius: var(--radius-md);
    padding: 12px;
    max-height: 220px;
    overflow-y: auto;
    background: var(--color-bg);
}

.checkbox-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.checkbox-item label { margin: 0; font-weight: 400; display: inline; font-size: 14px; }

/* ============================================================
   Botões de ação
   ============================================================ */

.acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acoes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.botao-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--color-blue);
    color: #fff;
    border: none;
    transition: opacity 0.15s;
    min-height: 38px;
}

.botao-link:hover { opacity: 0.88; color: #fff; }

.botao-secundario {
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-md);
}

.botao-secundario:hover { background: var(--color-bg); color: var(--color-text-primary); opacity: 1; }

.acao-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.12s, border-color 0.12s;
    background: var(--color-bg);
}

.acao-card:hover { background: var(--color-blue-light); border-color: var(--color-blue-mid); color: var(--color-blue); opacity: 1; }
.acao-card svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
.acao-card:hover svg { opacity: 1; }

/* Botões suaves GF/Pessoas */
a.btn-gf, button.btn-gf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
    min-height: 32px;
    box-shadow: none;
}

a.btn-gf:hover, button.btn-gf:hover { opacity: 0.82; }

a.btn-gf-editar, button.btn-gf-editar {
    background: var(--color-blue-light) !important;
    color: var(--color-blue) !important;
    border: 1px solid #b5d4f4 !important;
}

a.btn-gf-desativar, button.btn-gf-desativar {
    background: var(--color-red-light) !important;
    color: var(--color-red) !important;
    border: 1px solid #f7c1c1 !important;
}

a.btn-gf-reativar, button.btn-gf-reativar {
    background: var(--color-green-light) !important;
    color: var(--color-teal) !important;
    border: 1px solid #9fe1cb !important;
}

a.btn-gf-integracao, button.btn-gf-integracao {
    background: var(--color-amber-light) !important;
    color: #b5651d !important;
    border: 1px solid #f3c27d !important;
}

/* Botão discreto "Ver" */
.btn-visualizar {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: transparent;
    color: var(--color-blue);
    border: 1px solid var(--color-blue-mid);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s;
    white-space: nowrap;
}

.btn-visualizar:hover { background: var(--color-blue-light); color: var(--color-blue); opacity: 1; }

/* ============================================================
   Status e badges
   ============================================================ */

.status-ativo   { color: var(--color-green); font-weight: 500; }
.status-inativo { color: var(--color-red);   font-weight: 500; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.badge-green  { background: var(--color-green-light);  color: var(--color-teal); }
.badge-blue   { background: var(--color-blue-light);   color: var(--color-blue); }
.badge-amber  { background: var(--color-amber-light);  color: var(--color-amber); }
.badge-red    { background: var(--color-red-light);    color: var(--color-red); }

/* ============================================================
   Tabelas
   ============================================================ */

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead th {
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--color-bg); }
.tabela-vazia {
    text-align: center;
    color: var(--color-text-muted);
    padding: 22px 14px;
    font-size: 14px;
}

.tabela-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #fff;
}

.tabela-listagem-limitada {
    max-height: 68vh;
    overflow: auto;
}

.tabela-listagem-limitada table {
    min-width: 1600px;
}

.tabela-listagem-limitada thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.tabela-listagem-limitada thead tr.filtros-linha th {
    top: 40px;
    z-index: 3;
}

.tabela-wrapper table { min-width: 600px; }
.tabela-wrapper tbody td { line-height: 1.45; }
.tabela-wrapper thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.tabela-wrapper thead th:last-child  { border-radius: 0 var(--radius-md) 0 0; }
.tabela-wrapper thead tr.filtros-linha th {
    background: var(--color-surface);
    padding: 10px 12px 12px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    border-bottom: 1px solid var(--color-border);
}
.tabela-filtro-campo {
    width: 100%;
    min-width: 90px;
    padding: 7px 9px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text-primary);
    font-size: 13px;
}
.tabela-filtro-campo:focus {
    outline: none;
    border-color: var(--color-blue-mid);
    box-shadow: 0 0 0 3px rgba(112, 163, 212, 0.14);
}

.tabela-filtro-campo::placeholder {
    color: var(--color-text-muted);
}
.tabela-filtro-acoes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}
.tabela-filtro-acoes .botao-link,
.tabela-filtro-acoes button {
    width: 100%;
    justify-content: center;
}
.idade-range-wrap {
    position: relative;
    width: 100%;
    min-width: 220px;
    height: 30px;
    margin-top: 4px;
}
.idade-range-track,
.idade-range-progress {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 999px;
}
.idade-range-track {
    background: var(--color-border);
}
.idade-range-progress {
    background: var(--color-blue-mid);
    left: 0;
    width: 100%;
}
.idade-range-wrap input[type="range"] {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    margin: 0;
    pointer-events: none;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.idade-range-wrap input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: var(--color-blue);
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.idade-range-wrap input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: var(--color-blue);
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
    cursor: pointer;
}
.idade-range-wrap input[type="range"]::-webkit-slider-runnable-track,
.idade-range-wrap input[type="range"]::-moz-range-track {
    background: transparent;
}
.idade-range-valores {
    margin-top: 7px;
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.2;
}
.tabela-filtro-input-curto { min-width: 72px; }
.tabela-filtro-select-curto { min-width: 96px; }
.tabela-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.tabela-tooltip-acionador {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-blue);
    font-size: 12px;
    font-weight: 500;
    cursor: default;
}
.tabela-tooltip-conteudo {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 12;
    min-width: 220px;
    max-width: 320px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #fff;
    box-shadow: var(--shadow-md);
    display: none;
    white-space: normal;
    color: var(--color-text-primary);
}
.tabela-tooltip:hover .tabela-tooltip-conteudo,
.tabela-tooltip:focus-within .tabela-tooltip-conteudo {
    display: block;
}
.tabela-tooltip-lista {
    margin: 0;
    padding-left: 16px;
}
.tabela-tooltip-lista li + li {
    margin-top: 4px;
}
.tabela-contatos {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 170px;
}
.tabela-contatos-linha {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tabela-contatos-rotulo {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-text-muted);
}
.tabela-coluna-principal {
    color: var(--color-text-primary);
    font-weight: 500;
    line-height: 1.35;
}
.tabela-meta {
    margin-top: 4px;
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.35;
}
.tabela-pilha {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
.tabela-suave {
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.tabela-suave-grid thead th {
    background: #f7f4ef;
    font-size: 11px;
    letter-spacing: 0.6px;
}
.tabela-suave-grid tbody td {
    padding-top: 16px;
    padding-bottom: 16px;
}
.tabela-suave-grid .filtros-linha th {
    background: #fcfaf6;
    padding-top: 14px;
    padding-bottom: 14px;
}
.tabela-suave-grid .tabela-filtro-campo {
    min-width: 0;
    border-radius: 12px;
    padding: 9px 11px;
    background: #fffdfa;
}
.tabela-filtro-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tabela-suave-grid .tabela-filtro-acoes {
    gap: 10px;
}
.tabela-cadastro-completa .filtros-linha th {
    font-size: 11px;
    padding: 9px 8px 11px;
}
.tabela-cadastro-completa .filtros-linha .tabela-filtro-campo {
    font-size: 12px;
    min-width: 112px;
    padding: 7px 9px;
}
.tabela-cadastro-grid {
    table-layout: fixed;
}
.tabela-pessoas {
    min-width: 2260px;
}
.tabela-gfs {
    min-width: 1840px;
}
.tabela-pessoas th:nth-child(1), .tabela-pessoas td:nth-child(1) { width: 70px; }
.tabela-pessoas th:nth-child(2), .tabela-pessoas td:nth-child(2) { width: 220px; }
.tabela-pessoas th:nth-child(3), .tabela-pessoas td:nth-child(3) { width: 150px; }
.tabela-pessoas th:nth-child(4), .tabela-pessoas td:nth-child(4) { width: 220px; }
.tabela-pessoas th:nth-child(5), .tabela-pessoas td:nth-child(5) { width: 120px; }
.tabela-pessoas th:nth-child(6), .tabela-pessoas td:nth-child(6) { width: 150px; }
.tabela-pessoas th:nth-child(7), .tabela-pessoas td:nth-child(7) { width: 260px; min-width: 260px; }
.tabela-pessoas th:nth-child(8), .tabela-pessoas td:nth-child(8) { width: 340px; }
.tabela-pessoas th:nth-child(9), .tabela-pessoas td:nth-child(9) { width: 180px; }
.tabela-pessoas th:nth-child(10), .tabela-pessoas td:nth-child(10) { width: 150px; }
.tabela-pessoas th:nth-child(11), .tabela-pessoas td:nth-child(11) { width: 170px; }
.tabela-pessoas th:nth-child(12), .tabela-pessoas td:nth-child(12) { width: 140px; }
.tabela-pessoas th:nth-child(13), .tabela-pessoas td:nth-child(13) { width: 130px; }
.tabela-pessoas th:nth-child(14), .tabela-pessoas td:nth-child(14) { width: 170px; }
.tabela-pessoas th:nth-child(15), .tabela-pessoas td:nth-child(15) { width: 180px; }
.tabela-gfs th:nth-child(1), .tabela-gfs td:nth-child(1) { width: 70px; }
.tabela-gfs th:nth-child(2), .tabela-gfs td:nth-child(2) { width: 220px; }
.tabela-gfs th:nth-child(3), .tabela-gfs td:nth-child(3) { width: 150px; }
.tabela-gfs th:nth-child(4), .tabela-gfs td:nth-child(4) { width: 120px; }
.tabela-gfs th:nth-child(5), .tabela-gfs td:nth-child(5) { width: 220px; }
.tabela-gfs th:nth-child(6), .tabela-gfs td:nth-child(6) { width: 170px; }
.tabela-gfs th:nth-child(7), .tabela-gfs td:nth-child(7) { width: 140px; }
.tabela-gfs th:nth-child(8), .tabela-gfs td:nth-child(8) { width: 190px; }
.tabela-gfs th:nth-child(9), .tabela-gfs td:nth-child(9) { width: 130px; }
.tabela-gfs th:nth-child(10), .tabela-gfs td:nth-child(10) { width: 160px; }
.tabela-gfs th:nth-child(11), .tabela-gfs td:nth-child(11) { width: 150px; }
.tabela-gfs th:nth-child(12), .tabela-gfs td:nth-child(12) { width: 180px; }
.tabela-gfs th:nth-child(13), .tabela-gfs td:nth-child(13) { width: 180px; }
.tabela-pessoas td,
.tabela-gfs td {
    overflow-wrap: anywhere;
    vertical-align: top;
}
.tabela-pessoas td:last-child,
.tabela-gfs td:last-child {
    white-space: normal;
}

.tabela-acoes { width: 200px; min-width: 200px; }
.tabela-acoes .acoes { flex-direction: column; gap: 6px; align-items: stretch; }
.tabela-acoes .botao-link { width: 100%; min-height: 34px; font-size: 12px; padding: 0 12px; }

/* Zebra helpers */
.zebra tbody tr:nth-child(odd)  td { background: var(--color-surface); }
.zebra tbody tr:nth-child(even) td { background: #f4f2ee; }
.zebra tbody tr:hover td { background: var(--color-blue-light) !important; }

/* ============================================================
   Cards
   ============================================================ */

.presencas-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.presencas-coluna { min-width: 0; }

.presencas-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.presencas-card h2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.card-perfil {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
    background: var(--color-surface);
}

.card-perfil-destaque {
    border-color: var(--color-amber-mid);
    box-shadow: 0 0 0 4px rgba(239, 159, 39, 0.16), var(--shadow-sm);
    scroll-margin-top: 28px;
}

.perfil-alerta-senha {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    background: var(--color-amber-light);
    border-left: 3px solid var(--color-amber-mid);
    color: var(--color-amber);
    font-size: 14px;
    line-height: 1.6;
}

.perfil-alerta-senha strong {
    color: var(--color-text-primary);
}

.card-perfil h2 {
    font-size: 20px; margin-bottom: 16px;
    font-family: 'Outfit', sans-serif; font-weight: 500;
    color: var(--color-text-primary); text-transform: none; letter-spacing: 0;
}

.card-perfil h3 {
    font-size: 16px; margin-bottom: 12px;
    font-family: 'Outfit', sans-serif; color: var(--color-text-primary);
}

/* Cards de métricas */
.cards-resumo { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; margin-bottom: 28px; }

.card-resumo { background: #edeae4; border-radius: var(--radius-md); padding: 16px 18px; }

.card-resumo h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px; font-weight: 400;
    color: var(--color-text-muted); margin-bottom: 8px;
}

.card-resumo-label {
    font-size: 12px; color: var(--color-text-muted);
    margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.card-resumo-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.card-resumo .numero {
    font-family: 'Outfit', sans-serif;
    font-size: 28px; font-weight: 500;
    color: var(--color-text-primary); line-height: 1;
}

/* Cards coloridos */
.card-resumo-azul  { background: var(--color-blue-light); }
.card-resumo-verde { background: var(--color-green-light); }
.card-resumo-roxo  { background: var(--color-purple-light); }
.card-resumo-amber { background: var(--color-amber-light); }
.card-resumo-terracota { background: #f7e4d3; }

.card-resumo-azul  .card-resumo-label, .card-resumo-azul  .numero { color: var(--color-blue); }
.card-resumo-verde .card-resumo-label, .card-resumo-verde .numero { color: var(--color-teal); }
.card-resumo-roxo  .card-resumo-label, .card-resumo-roxo  .numero { color: var(--color-purple); }
.card-resumo-amber .card-resumo-label, .card-resumo-amber .numero { color: var(--color-amber); }
.card-resumo-terracota .card-resumo-label, .card-resumo-terracota .numero { color: #9b5628; }
.card-resumo-violeta-suave { background: #f1eafe; }
.card-resumo-violeta-suave .card-resumo-label, .card-resumo-violeta-suave .numero { color: #6a48b3; }

/* Tooltip nos cards */
.card-resumo-tooltip { position: relative; cursor: default; }

.card-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px); left: 0;
    min-width: 180px; max-width: 260px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    padding: 10px 14px;
    z-index: 300;
    pointer-events: none;
}

.card-resumo-tooltip:hover .card-tooltip,
.card-resumo-tooltip:focus .card-tooltip,
.card-resumo-tooltip:focus-within .card-tooltip { display: block; }

.card-tooltip-item {
    font-size: 12px; color: var(--color-text-secondary);
    padding: 4px 0; border-bottom: 1px solid var(--color-border);
    line-height: 1.4; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}

.card-tooltip-item:last-child { border-bottom: none; }

/* ============================================================
   Diagnóstico / barra de presença
   ============================================================ */

.diagnostico-faixa {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: var(--radius-full);
    font-size: 12px; font-weight: 500; margin-bottom: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: 0.3px;
}

.diagnostico-neutro    { background: #e8e5df; color: #5c5850; }
.diagnostico-otimo     { background: var(--color-green-light); color: var(--color-teal); }
.diagnostico-bom       { background: var(--color-blue-light);  color: var(--color-blue); }
.diagnostico-atencao   { background: var(--color-amber-light); color: var(--color-amber); }
.diagnostico-alarmante { background: var(--color-red-light);   color: var(--color-red); }

.barra-percentual {
    width: 100%; height: 8px;
    border-radius: var(--radius-full); overflow: hidden;
    background: #edeae4; display: flex; margin: 10px 0 8px;
}

.barra-presenca { height: 100%; background: var(--color-green); }
.barra-ausencia { height: 100%; background: var(--color-red-mid); }

.resumo-percentual { display: flex; gap: 16px; font-size: 13px; margin-bottom: 10px; }
.legenda-presenca  { color: var(--color-green); font-weight: 500; }
.legenda-ausencia  { color: var(--color-red); font-weight: 500; }

/* Diagnóstico de GFs — layout e tabela */
.diag-selector-form { margin-bottom: 20px; }

.diag-selector-bar {
    display: flex; align-items: center; gap: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px 16px; box-shadow: var(--shadow-sm);
}

.diag-barra-linha  { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.diag-barra-legendas { display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }

.diag-grid-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.diag-cards-resumo { grid-template-columns: repeat(6, minmax(0,1fr)); margin-bottom: 20px; }

.diag-membros-wrapper { width: 100%; overflow-x: hidden; }
.diag-membros-wrapper table { width: 100%; table-layout: fixed; }
.diag-membros-wrapper th:nth-child(1), .diag-membros-wrapper td:nth-child(1) { width: 27%; }
.diag-membros-wrapper th:nth-child(2), .diag-membros-wrapper td:nth-child(2) { width: 12%; text-align: center; }
.diag-membros-wrapper th:nth-child(3), .diag-membros-wrapper td:nth-child(3) { width: 18%; }
.diag-membros-wrapper th:nth-child(4), .diag-membros-wrapper td:nth-child(4) { width: 9%; text-align: center; }
.diag-membros-wrapper th:nth-child(5), .diag-membros-wrapper td:nth-child(5) { width: 9%; text-align: center; }
.diag-membros-wrapper th:nth-child(6), .diag-membros-wrapper td:nth-child(6) { width: 25%; }
.diag-membros-wrapper td { vertical-align: middle; }

/* ============================================================
   Últimas reuniões — tabela com scroll vertical e zebra
   ============================================================ */

.quadro-ultimas-reunioes .tabela-wrapper {
    overflow-x: visible; overflow-y: auto;
    max-height: calc(5 * 46px + 41px);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.quadro-ultimas-reunioes .tabela-wrapper table { min-width: unset; width: 100%; table-layout: fixed; }
.quadro-ultimas-reunioes thead { position: sticky; top: 0; z-index: 1; }
.quadro-ultimas-reunioes thead th { background: var(--color-bg); white-space: nowrap; }

.quadro-ultimas-reunioes th:nth-child(1), .quadro-ultimas-reunioes td:nth-child(1) { width: 22%; }
.quadro-ultimas-reunioes th:nth-child(2), .quadro-ultimas-reunioes td:nth-child(2) { width: 20%; }
.quadro-ultimas-reunioes th:nth-child(3), .quadro-ultimas-reunioes td:nth-child(3) { width: 16%; }
.quadro-ultimas-reunioes th:nth-child(4), .quadro-ultimas-reunioes td:nth-child(4) { width: 10%; text-align: center; }
.quadro-ultimas-reunioes th:nth-child(5), .quadro-ultimas-reunioes td:nth-child(5) { width: 10%; text-align: center; }
.quadro-ultimas-reunioes th:nth-child(6), .quadro-ultimas-reunioes td:nth-child(6) { width: 22%; }

.quadro-ultimas-reunioes tbody tr:nth-child(odd)  td { background: var(--color-surface); }
.quadro-ultimas-reunioes tbody tr:nth-child(even) td { background: #f4f2ee; }
.quadro-ultimas-reunioes tbody tr:hover td { background: var(--color-blue-light) !important; }
.quadro-ultimas-reunioes .tabela-acoes { width: auto; min-width: unset; }
.quadro-ultimas-reunioes .tabela-acoes .botao-link { width: 100%; min-height: 30px; font-size: 12px; padding: 0 10px; }

.quadro-ultimas-reunioes-dashboard .tabela-wrapper table,
.quadro-ultimas-reunioes-dashboard .tabela-reunioes-lider {
    font-size: 12px;
}

.quadro-ultimas-reunioes-dashboard thead th {
    font-size: 11px;
    padding: 8px 10px;
    letter-spacing: 0.25px;
}

.quadro-ultimas-reunioes-dashboard tbody td {
    padding: 8px 10px;
    line-height: 1.35;
}

.quadro-ultimas-reunioes-dashboard .tabela-acoes .botao-link,
.quadro-ultimas-reunioes-dashboard .acoes-reuniao-lider .botao-link {
    min-height: 28px;
    font-size: 11px;
    padding: 0 8px;
}

@media (max-width: 1100px) {
    .diag-cards-resumo { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .diag-grid-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   Auditoria
   ============================================================ */

.auditoria-tabela-wrapper {
    width: 100%; overflow-x: hidden; overflow-y: auto;
    max-height: 520px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.auditoria-tabela { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.auditoria-tabela thead { position: sticky; top: 0; z-index: 1; }
.auditoria-tabela thead th { background: var(--color-bg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.auditoria-tabela th:nth-child(1), .auditoria-tabela td:nth-child(1) { width: 13%; }
.auditoria-tabela th:nth-child(2), .auditoria-tabela td:nth-child(2) { width: 14%; }
.auditoria-tabela th:nth-child(3), .auditoria-tabela td:nth-child(3) { width: 8%;  }
.auditoria-tabela th:nth-child(4), .auditoria-tabela td:nth-child(4) { width: 10%; }
.auditoria-tabela th:nth-child(5), .auditoria-tabela td:nth-child(5) { width: 9%;  }
.auditoria-tabela th:nth-child(6), .auditoria-tabela td:nth-child(6) { width: 11%; }
.auditoria-tabela th:nth-child(7), .auditoria-tabela td:nth-child(7) { width: 35%; }

.auditoria-tabela tbody td {
    white-space: normal; word-break: break-word;
    vertical-align: top; padding: 10px 12px;
    border-bottom: 1px solid var(--color-border); font-size: 13px;
}

.auditoria-tabela tbody tr:last-child td { border-bottom: none; }
.auditoria-tabela tbody tr:nth-child(odd)  td { background: var(--color-surface); }
.auditoria-tabela tbody tr:nth-child(even) td { background: #f4f2ee; }
.auditoria-tabela tbody tr:hover td { background: var(--color-blue-light) !important; }

/* ============================================================
   Dashboard — topbar, sino e alertas
   ============================================================ */

.dash-topbar {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px; gap: 16px;
}

.dash-topbar-esq  { display: flex; flex-direction: column; gap: 2px; }
.dash-titulo      { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 500; color: var(--color-text-primary); letter-spacing: -0.3px; line-height: 1.2; }
.dash-data        { font-size: 13px; color: var(--color-text-muted); margin: 0; }
.dash-saudacao    { font-size: 13px; color: var(--color-text-secondary); margin: 0; font-weight: 500; }

.dash-alerta {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 12px; border-radius: var(--radius-md);
    font-size: 13px; margin-bottom: 8px; line-height: 1.4;
}

.dash-alerta:last-child { margin-bottom: 0; }
.dash-alerta svg { flex-shrink: 0; margin-top: 1px; }
.dash-alerta-danger { background: var(--color-red-light);   color: #5a1a1a; }
.dash-alerta-warn   { background: var(--color-amber-light); color: #4a2d05; }
.dash-alerta-info   { background: var(--color-blue-light);  color: #0c3e6b; }

.dash-proxima-reuniao {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--color-border); gap: 12px;
}

.dash-proxima-reuniao:last-child { border-bottom: none; }
.dash-proxima-gf   { font-size: 14px; font-weight: 500; color: var(--color-text-primary); margin-bottom: 2px; }
.dash-proxima-info { font-size: 12px; color: var(--color-text-muted); }
.dash-proxima-dia  { font-size: 12px; font-weight: 500; color: var(--color-blue); text-align: right; flex-shrink: 0; line-height: 1.5; }
.dash-proxima-dia span { font-size: 11px; font-weight: 400; color: var(--color-text-muted); display: block; }
.dashboard-admin-top,
.dashboard-admin-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
.dashboard-admin-top {
    margin-bottom: 20px;
}
.dashboard-admin-main {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}
.dashboard-admin-top .presencas-card,
.dashboard-admin-main .presencas-card {
    margin-bottom: 0;
}

/* Sino */
.notif-wrap { position: relative; flex-shrink: 0; }

.notif-btn {
    position: relative; width: 38px; height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.12s, border-color 0.12s;
}

.notif-btn:hover { background: var(--color-bg); border-color: var(--color-border-md); }
.notif-btn svg   { width: 16px; height: 16px; color: var(--color-text-secondary); flex-shrink: 0; }

.notif-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--color-red-mid); color: #fff;
    font-size: 10px; font-weight: 500;
    min-width: 18px; height: 18px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; border: 2px solid var(--color-bg); transition: opacity 0.15s;
}

.notif-badge-oculto { opacity: 0; pointer-events: none; }

.notif-dropdown {
    display: none; position: absolute;
    top: calc(100% + 8px); right: 0;
    width: 320px; background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    z-index: 200; overflow: hidden;
}

.notif-dropdown.aberto { display: block; }

.notif-header {
    padding: 14px 16px 10px; border-bottom: 1px solid var(--color-border);
    display: flex; align-items: center; justify-content: space-between;
}

.notif-header-titulo { font-size: 13px; font-weight: 500; color: var(--color-text-primary); }

.notif-marcar-todos {
    font-size: 11px; color: var(--color-blue);
    background: none; border: none; cursor: pointer; padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.notif-marcar-todos:hover { text-decoration: underline; }

.notif-tabs { display: flex; border-bottom: 1px solid var(--color-border); background: var(--color-bg); }

.notif-tab {
    flex: 1; padding: 9px 8px;
    font-size: 12px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 400;
    text-align: center; cursor: pointer;
    color: var(--color-text-muted); background: transparent;
    border: none; border-bottom: 2px solid transparent;
    min-height: unset; transition: color 0.12s;
}

.notif-tab.ativo { color: var(--color-blue); border-bottom-color: var(--color-blue); font-weight: 500; background: var(--color-surface); }

.notif-list { max-height: 300px; overflow-y: auto; }

.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-bottom: 1px solid var(--color-border);
    cursor: default; transition: background 0.1s;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--color-bg); }

.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-dot-danger { background: var(--color-red-mid); }
.notif-dot-warn   { background: var(--color-amber-mid); }
.notif-dot-info   { background: var(--color-blue-mid); }

.notif-item-corpo { flex: 1; min-width: 0; }

.notif-texto { font-size: 12px; color: var(--color-text-secondary); line-height: 1.5; margin-bottom: 5px; }

.notif-acao-btn {
    font-size: 11px; color: var(--color-text-muted);
    background: none; border: none; cursor: pointer; padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 400;
    display: inline; transition: color 0.12s;
}

.notif-acao-btn:hover { color: var(--color-blue); }

.notif-tempo { font-size: 11px; color: var(--color-text-muted); display: block; margin-top: 3px; margin-bottom: 4px; }

.notif-carregando, .notif-vazio {
    padding: 24px 16px; text-align: center;
    font-size: 13px; color: var(--color-text-muted);
}

/* ============================================================
   Notificações (página /avisos.php)
   ============================================================ */

.aviso-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--color-red-light); color: var(--color-red);
    font-size: 11px; font-weight: 500;
    min-width: 20px; height: 20px;
    border-radius: var(--radius-full);
    padding: 0 6px; margin-left: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.aviso-item { padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.aviso-item:last-child { border-bottom: none; }
.aviso-item-topo { margin-bottom: 8px; }

.aviso-item-titulo { font-size: 14px; font-weight: 500; color: var(--color-text-primary); margin-bottom: 6px; font-family: 'Outfit', sans-serif; }
.aviso-titulo-lido { color: var(--color-text-secondary); font-weight: 400; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; }

.aviso-item-detalhe { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.aviso-item-detalhe span { font-size: 12px; color: var(--color-text-muted); line-height: 1.5; }
.aviso-item-detalhe strong { color: var(--color-text-secondary); font-weight: 500; }

.aviso-btn-acao {
    font-size: 11px; color: var(--color-text-muted);
    background: none; border: none; padding: 0; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 400; transition: color 0.12s;
}

.aviso-btn-acao:hover { color: var(--color-blue); }
.aviso-btn-desfazer:hover { color: var(--color-text-secondary); }

.avisos-lidos-scroll { max-height: 480px; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.aviso-lido { opacity: 0.7; }
.aviso-lido:hover { opacity: 1; }

/* ============================================================
   Presenças — switch animado
   ============================================================ */

.presenca-radio { display: none; }

.presenca-switch-wrap {
    display: inline-flex;
    align-items: center;
    background: var(--color-bg);
    border: 1px solid var(--color-border-md);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 0;
    position: relative;
}

.presenca-switch-wrap::before {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 84px; height: 32px;
    border-radius: var(--radius-full);
    background: transparent;
    transition: transform 0.22s cubic-bezier(.4,0,.2,1), background 0.2s;
    z-index: 0;
}

.presenca-switch-wrap:has(.presenca-radio[value="presente"]:checked)::before {
    background: var(--color-green-light);
    border: 1px solid #9fe1cb;
    transform: translateX(0);
}

.presenca-switch-wrap:has(.presenca-radio[value="ausente"]:checked)::before {
    background: var(--color-red-light);
    border: 1px solid #f7c1c1;
    transform: translateX(84px);
}

.presenca-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 32px;
    border-radius: var(--radius-full);
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: color 0.2s;
    font-family: 'Plus Jakarta Sans', sans-serif;
    user-select: none;
    color: var(--color-text-muted);
    background: transparent;
    position: relative; z-index: 1;
    letter-spacing: 0.1px;
}

.presenca-switch-wrap:has(.presenca-radio[value="presente"]:checked) .presenca-toggle-pres { color: var(--color-teal); font-weight: 600; }
.presenca-switch-wrap:has(.presenca-radio[value="ausente"]:checked)  .presenca-toggle-aus  { color: var(--color-red);  font-weight: 600; }
.presenca-toggle-pres:hover { color: var(--color-teal); }
.presenca-toggle-aus:hover  { color: var(--color-red); }

/* Botões de ação de presença */
.presenca-acoes-btns { display: flex; flex-direction: column; gap: 10px; max-width: 280px; }

.btn-presenca-salvar, .btn-presenca-oracao {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 20px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer; text-decoration: none;
    transition: opacity 0.15s; width: 100%;
}

.btn-presenca-salvar { background: var(--color-blue-light); color: var(--color-blue); border: 1px solid #b5d4f4; }
.btn-presenca-oracao { background: var(--color-green-light); color: var(--color-teal); border: 1px solid #9fe1cb; }
.btn-presenca-salvar:hover, .btn-presenca-oracao:hover { opacity: 0.82; }

.presenca-oracao-bloqueado {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--color-bg); border: 1px solid var(--color-border);
    font-size: 12px; color: var(--color-text-muted);
    font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1.4;
}

/* ============================================================
   Grupos Familiares — listas com busca/scroll e escalas
   ============================================================ */

.gf-lista-scroll { max-height: 240px; overflow-y: auto; overflow-x: hidden; }
.gf-cargo        { font-size: 11px; color: var(--color-text-muted); font-weight: 400; }

.escala-secao {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px; margin-bottom: 20px;
}

.escala-secao-titulo {
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--color-text-muted); margin-bottom: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.escala-hint { font-size: 11px; font-weight: 400; color: var(--color-text-muted); margin-left: 6px; }

.escala-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.escala-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--radius-full);
    font-size: 12px; font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.escala-badge-celeiro { background: var(--color-amber-light); color: var(--color-amber); border: 1px solid #fac775; }
.escala-badge-oracao  { background: var(--color-purple-light); color: var(--color-purple); border: 1px solid #afa9ec; }
.escala-badge-cantina { background: #e9f5ea; color: #246b39; border: 1px solid #abd2b2; }

.form-filtro-compacto {
    padding-bottom: 10px;
}

.form-inline-tabela {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.acoes-tabela-inline {
    flex-wrap: nowrap;
    align-items: stretch;
}

.acoes-tabela-inline .btn-gf {
    width: 100%;
}

.tabela-cantina {
    min-width: 1180px;
}

.tabela-cantina th:nth-child(1), .tabela-cantina td:nth-child(1) { width: 150px; }
.tabela-cantina th:nth-child(2), .tabela-cantina td:nth-child(2) { width: 160px; }
.tabela-cantina th:nth-child(3), .tabela-cantina td:nth-child(3) { width: 280px; }
.tabela-cantina th:nth-child(4), .tabela-cantina td:nth-child(4) { width: 250px; }
.tabela-cantina th:nth-child(5), .tabela-cantina td:nth-child(5) { width: 150px; }
.tabela-cantina th:nth-child(6), .tabela-cantina td:nth-child(6) { width: 190px; }

.cantina-listagem-limitada {
    max-height: 62vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.cantina-listagem-limitada table {
    min-width: unset;
    width: 100%;
    table-layout: fixed;
}

.cantina-tabela-enxuta {
    font-size: 12px;
}

.cantina-tabela-enxuta thead th,
.cantina-tabela-enxuta tbody td {
    padding: 8px 10px;
}

.cantina-tabela-enxuta th:nth-child(1), .cantina-tabela-enxuta td:nth-child(1) { width: 15%; }
.cantina-tabela-enxuta th:nth-child(2), .cantina-tabela-enxuta td:nth-child(2) { width: 14%; }
.cantina-tabela-enxuta th:nth-child(3), .cantina-tabela-enxuta td:nth-child(3) { width: 25%; }
.cantina-tabela-enxuta th:nth-child(4), .cantina-tabela-enxuta td:nth-child(4) { width: 22%; }
.cantina-tabela-enxuta th:nth-child(5), .cantina-tabela-enxuta td:nth-child(5) { width: 12%; }
.cantina-tabela-enxuta th:nth-child(6), .cantina-tabela-enxuta td:nth-child(6) { width: 12%; }

.cantina-tabela-enxuta select,
.cantina-tabela-enxuta input[type="date"],
.cantina-tabela-enxuta input[type="text"] {
    font-size: 12px;
    padding: 7px 8px;
}

.cantina-acoes-inline {
    flex-direction: column;
    gap: 6px;
}
.cantina-mes-separador td {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}
.cantina-mes-separador-conteudo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.cantina-mes-separador-titulo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cantina-mes-toggle {
    min-height: 24px !important;
    width: 24px;
    padding: 0 !important;
    border-radius: 999px !important;
    border: 1px solid var(--color-border) !important;
    background: #fff !important;
    color: var(--color-text-secondary) !important;
    font-size: 12px !important;
}
.cantina-mes-toggle:hover {
    background: var(--color-blue-light) !important;
    border-color: var(--color-blue-mid) !important;
    color: var(--color-blue) !important;
}
.cantina-mes-linha-oculta {
    display: none;
}
.cantina-linha-mes-atual td {
    background: #fcfbf8;
}

/* ============================================================
   Tela de Login
   ============================================================ */

.login-wrapper {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    padding: 24px 16px; background: #f0ede8;
}

.login-card {
    background: #fff; border: 1px solid #e2ddd6;
    border-radius: 20px; overflow: hidden;
    width: 100%; max-width: 860px;
    display: grid; grid-template-columns: 1fr 1fr;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.login-painel-esq {
    background: linear-gradient(145deg, #0f3d6e 0%, #185FA5 60%, #1D9E75 100%);
    padding: 48px 40px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; gap: 0;
}

.login-logo-topo  { margin-bottom: 20px; }
.login-logo-nome  { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600; color: #fff; letter-spacing: -0.2px; line-height: 1; display: block; }
.login-logo-sub   { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 4px; font-family: 'Plus Jakarta Sans', sans-serif; display: block; }
.login-logo-img   { width: 200px; height: 200px; object-fit: contain; flex-shrink: 0; }
.login-logo-svg   { width: 160px; height: 160px; flex-shrink: 0; }
.login-logo-rodape { margin-top: 4px; }
.login-logo-igreja { font-size: 13px; color: rgba(255,255,255,0.55); font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1.7; display: block; }

.login-painel-dir { padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-form-titulo    { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 500; color: #1a1917; margin-bottom: 6px; }
.login-form-subtitulo { font-size: 13px; color: #9a948a; margin-bottom: 32px; font-family: 'Plus Jakarta Sans', sans-serif; }

.login-form { border: none; padding: 0; background: transparent; margin-bottom: 0; }
.login-form .campo { margin-bottom: 18px; }
.login-form label  { font-size: 13px; font-weight: 500; color: #3a3733; margin-bottom: 6px; }

.login-form input[type="text"],
.login-form input[type="password"] {
    border: 1px solid #dedad3; border-radius: 10px;
    padding: 11px 14px; font-size: 15px;
    background: #faf9f7; color: #1a1917;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form input:focus { outline: none; border-color: #378ADD; box-shadow: 0 0 0 3px rgba(55,138,221,0.12); background: #fff; }

.login-btn-entrar {
    width: 100%; padding: 12px; background: #1a1917; color: #fff;
    border: none; border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 500;
    cursor: pointer; margin-top: 8px; transition: background 0.15s; min-height: 46px;
}

.login-btn-entrar:hover { background: #2e2b27; }

.login-link-esqueci {
    display: block; text-align: center; margin-top: 16px;
    font-size: 13px; color: #9a948a; text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif; transition: color 0.15s;
}

.login-link-esqueci:hover { color: #185FA5; }

.login-erro {
    background: #FCEBEB; color: #7a1f1f;
    border-left: 3px solid #E24B4A;
    padding: 11px 14px; border-radius: 8px;
    font-size: 13px; margin-bottom: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.login-mensagem {
    background: #EAF3DE; color: #1a4a1e;
    border-left: 3px solid #2e7d32;
    padding: 11px 14px; border-radius: 8px;
    font-size: 13px; margin-bottom: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ============================================================
   Telas de autenticação (esqueci/redefinir senha)
   ============================================================ */

.auth-wrapper {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    padding: 24px 16px; background: #f0ede8;
}

.auth-card {
    background: #fff; border: 1px solid #e2ddd6;
    border-radius: 20px; padding: 40px 44px;
    width: 100%; max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.auth-logo         { margin-bottom: 28px; text-align: center; }
.auth-logo-nome    { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 600; color: #1a1917; display: block; letter-spacing: -0.3px; }
.auth-logo-sub     { font-size: 11px; color: #9a948a; font-family: 'Plus Jakarta Sans', sans-serif; display: block; margin-top: 3px; }
.auth-titulo       { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 500; color: #1a1917; margin-bottom: 6px; }
.auth-subtitulo    { font-size: 13px; color: #9a948a; margin-bottom: 28px; font-family: 'Plus Jakarta Sans', sans-serif; }

/* ============================================================
   Responsividade
   ============================================================ */

@media (max-width: 1100px) {
    .presencas-layout  { grid-template-columns: 1fr; }
    .cards-resumo      { grid-template-columns: repeat(3, 1fr); }
    .dashboard-admin-top,
    .dashboard-admin-main { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 60px; }

    .sidebar-logo-subtitulo, .sidebar-logo-igreja,
    .nav-secao, .nav-item span,
    .usuario-nome, .usuario-perfil, .sidebar-sair span { display: none; }

    .sidebar-logo-titulo { font-size: 14px; }
    .nav-item            { justify-content: center; padding: 10px; }
    .nav-item svg        { opacity: 1; width: 18px; height: 18px; }
    .sidebar-usuario     { justify-content: center; }
    .usuario-avatar      { width: 36px; height: 36px; font-size: 13px; }
    .sidebar-sair        { justify-content: center; }
    .jtro-main           { padding: 24px 20px; }
    .cards-resumo        { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    .login-card       { grid-template-columns: 1fr; }
    .login-painel-esq { padding: 32px 28px; }
    .login-painel-dir { padding: 32px 28px; }
    .auth-card        { padding: 32px 24px; }
}

@media (max-width: 600px) {
    .cards-resumo { grid-template-columns: 1fr 1fr; }
    .grid, .grid-perfil { grid-template-columns: 1fr; }
    .grid-endereco-pessoa { grid-template-columns: 1fr; }
    .campo-endereco-logradouro,
    .campo-endereco-complemento { grid-column: span 1; }
    .acoes-grid   { grid-template-columns: 1fr; }
    .jtro-main    { padding: 20px 16px; }
}

/* ============================================================
   Dashboard do líder — últimas reuniões
   Ajuste específico para tabela com 4 colunas
   ============================================================ */

.quadro-ultimas-reunioes-lider .tabela-wrapper-lider {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 340px;
}

.quadro-ultimas-reunioes-lider .tabela-reunioes-lider {
    width: 100%;
    min-width: unset;
    table-layout: fixed;
    border-collapse: collapse;
}

.quadro-ultimas-reunioes-lider .tabela-reunioes-lider th,
.quadro-ultimas-reunioes-lider .tabela-reunioes-lider td {
    vertical-align: middle;
}

.quadro-ultimas-reunioes-lider .tabela-reunioes-lider th:nth-child(1),
.quadro-ultimas-reunioes-lider .tabela-reunioes-lider td:nth-child(1) {
    width: 30%;
}

.quadro-ultimas-reunioes-lider .tabela-reunioes-lider th:nth-child(2),
.quadro-ultimas-reunioes-lider .tabela-reunioes-lider td:nth-child(2) {
    width: 24%;
    white-space: nowrap;
}

.quadro-ultimas-reunioes-lider .tabela-reunioes-lider th:nth-child(3),
.quadro-ultimas-reunioes-lider .tabela-reunioes-lider td:nth-child(3) {
    width: 18%;
    white-space: nowrap;
}

.quadro-ultimas-reunioes-lider .tabela-reunioes-lider th:nth-child(4),
.quadro-ultimas-reunioes-lider .tabela-reunioes-lider td:nth-child(4) {
    width: 28%;
}

.quadro-ultimas-reunioes-lider .tabela-reunioes-lider .tabela-acoes {
    min-width: unset;
    text-align: center;
}

.quadro-ultimas-reunioes-lider .acoes-reuniao-lider {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.quadro-ultimas-reunioes-lider .acoes-reuniao-lider .botao-link {
    width: 100%;
    min-height: 32px;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.quadro-ultimas-reunioes-lider .acoes-reuniao-lider .btn-presenca-oracao {
    background: var(--color-green-light);
    color: var(--color-teal);
    border: 1px solid #9fe1cb;
}

.quadro-ultimas-reunioes-lider .acoes-reuniao-lider .btn-presenca-oracao:hover {
    opacity: 0.88;
    color: var(--color-teal);
}

/* ============================================================
   Dashboard do líder — metadados do GF em badges
   ============================================================ */

.grupo-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.grupo-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f6f4f1;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.grupo-meta-badge strong {
    font-weight: 600;
    color: var(--color-text-strong);
}

.escala-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 14px;
}

.escala-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.escala-badge-celeiro {
    background: #fff4df;
    color: #9a6400;
    border: 1px solid #f0c36a;
}

.escala-badge-oracao {
    background: #efedff;
    color: #5646c0;
    border: 1px solid #b5aef8;
}

.notif-detalhe {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-detalhe {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 2px;
}

.notif-motivo {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.dashboard-lista-limitada {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.dashboard-lista-limitada > * + * {
    margin-top: 10px;
}

.dashboard-grupos-scroll {
    max-height: 72vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.reuniao-visualizar-acoes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.reuniao-visualizar-acoes .botao-link,
.reuniao-visualizar-acoes .btn-presenca-oracao {
    flex: 1 1 220px;
    justify-content: center;
}

.reuniao-status-celula {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.reuniao-status-principal {
    font-weight: 600;
    line-height: 1.3;
}

.reuniao-status-principal.presente {
    color: var(--color-green);
}

.reuniao-status-principal.ausente {
    color: var(--color-red);
}

.reuniao-status-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reuniao-status-justificativa {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.45;
}

/* ============================================================
   Carta Semanal — formulário e visualização
   ============================================================ */
 
/* Seções do formulário */
.carta-secao {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
}
 
.carta-secao-titulo {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
 
/* Row de aviso no formulário */
.carta-aviso-row {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
}
 
/* Lista de cartas */
.carta-item-ant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}
 
.carta-item-ant:last-child { border-bottom: none; }
 
.carta-item-data {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
 
.carta-item-pregacao {
    font-size: 12px;
    color: var(--color-text-muted);
}
 
.carta-badge-rascunho {
    display: inline-flex;
    padding: 2px 8px;
    background: var(--color-amber-light);
    color: var(--color-amber);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
 
/* Preview na listagem */
.carta-preview { }
.carta-preview-data { font-size: 18px; font-weight: 600; font-family: 'Outfit', sans-serif; color: var(--color-text-primary); margin-bottom: 6px; }
.carta-preview-pregacao { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 16px; }
.carta-preview-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
 
/* Visualização da carta */
.carta-visualizar-wrap {
    max-width: 680px;
    margin: 0 auto;
}
 
.carta-vis-header {
    margin-bottom: 24px;
}
 
.carta-vis-imagem {
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
 
.carta-vis-imagem img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
}
 
.carta-vis-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
 
.carta-vis-local { font-size: 14px; color: var(--color-text-secondary); }
.carta-vis-graça  { font-size: 14px; color: var(--color-text-secondary); }
 
.carta-vis-conteudo {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-primary);
    margin-bottom: 28px;
    padding: 0;
    border: none;
}
 
/* Remove bordas do Quill no modo visualização */
.carta-vis-conteudo.ql-editor { padding: 0; }
 
.carta-vis-secao {
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}
 
.carta-vis-secao-titulo {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-blue);
    margin-bottom: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
 
.carta-vis-pregacao-titulo { font-size: 15px; margin-bottom: 10px; }
 
.carta-link-externo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-blue);
    text-decoration: none;
    margin-left: 4px;
}
 
.carta-vis-pergunta {
    font-size: 14px;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border-left: 3px solid var(--color-blue-mid);
    padding: 10px 14px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    line-height: 1.6;
}
 
.carta-vis-aviso {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}
 
.carta-vis-aviso:last-child { border-bottom: none; margin-bottom: 0; }
 
.carta-vis-aviso-nome {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}
 
.carta-vis-aviso-data { font-weight: 400; color: var(--color-text-muted); font-size: 13px; }
.carta-vis-aviso-body { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; }
 
.carta-vis-assinatura {
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.8;
}
#editor-fallback {
    border-radius: var(--radius-md);
}
.ql-toolbar.ql-snow { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.ql-container.ql-snow { border-radius: 0 0 var(--radius-md) var(--radius-md); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; }
.ql-editor { min-height: 200px; }

/* ============================================================
   Agenda — layout, mini calendário e lista de eventos
   ============================================================ */

.agenda-wrap {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 780px) {
    .agenda-wrap { grid-template-columns: 1fr; }
}

/* Mini calendário */
.agenda-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    text-align: center;
}

.agenda-mini-dow {
    font-size: 10px;
    color: var(--color-text-muted);
    padding: 3px 0;
    font-weight: 500;
}

.agenda-mini-dia {
    font-size: 12px;
    padding: 4px 2px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    position: relative;
    line-height: 1.3;
}

.agenda-mini-dia:hover { background: var(--color-bg); opacity: 1; }
.agenda-mini-outro     { opacity: 0.3; pointer-events: none; }

.agenda-mini-hoje {
    background: var(--color-blue-light);
    color: var(--color-blue);
    font-weight: 500;
}

.agenda-mini-selecionado {
    background: var(--color-blue) !important;
    color: #fff !important;
    font-weight: 500;
}

.agenda-mini-ponto {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-blue);
    display: block;
}

.agenda-mini-selecionado .agenda-mini-ponto { background: rgba(255,255,255,0.7); }

/* Lista de eventos */
.agenda-lista-eventos { display: flex; flex-direction: column; gap: 2px; }

.agenda-evento-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 11px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.agenda-evento-row:hover { background: var(--color-bg); }

.agenda-evento-hora {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    min-width: 44px;
    padding-top: 2px;
    flex-shrink: 0;
    text-align: right;
}

.agenda-evento-barra {
    width: 3px;
    border-radius: 99px;
    align-self: stretch;
    flex-shrink: 0;
    min-height: 20px;
}

.agenda-evento-info { flex: 1; min-width: 0; }

.agenda-evento-titulo {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.agenda-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ============================================================
   Privacidade, LGPD e verificacao anti-bot
   ============================================================ */

.auth-card-wide {
    width: min(720px, calc(100% - 32px));
    max-width: 720px;
}

.legal-card {
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.legal-section {
    border-top: 1px solid var(--color-border);
    padding-top: 18px;
    margin-top: 18px;
}

.legal-section h2 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--color-text-primary);
}

.legal-section p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.privacy-panel {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 18px;
}

.privacy-panel-texto {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.privacy-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.privacy-checkbox input[type="checkbox"] {
    margin-top: 3px;
}

.privacy-checkbox label {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.privacy-checkbox a,
.auth-documentos a,
.privacy-profile-help a {
    color: var(--color-blue);
    text-decoration: none;
}

.privacy-checkbox a:hover,
.auth-documentos a:hover,
.privacy-profile-help a:hover {
    text-decoration: underline;
}

.privacy-profile-banner {
    margin-bottom: 16px;
}

.privacy-profile-help {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.auth-documentos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 18px;
    font-size: 12px;
    justify-content: center;
    text-align: center;
}

.login-turnstile {
    margin: 6px 0 18px;
}

.login-turnstile .cf-turnstile {
    width: 100%;
}

@media (max-width: 780px) {
    .legal-card {
        max-height: none;
    }
}
