/* Portal de Visitas IFCE Campus Tiangua - design unico (site publico + painel administrativo).
   Tokens iguais aos demais sistemas do campus (Eventos, Agende, RA).
   Bootstrap 4 entra so como grade e comportamento (modal, colapso); todo o visual e definido aqui. */
:root {
    --ifce-green: #155e21;
    --ifce-green-dark: #114e1a;
    --ifce-light-green: #e8f5e9;
    --ifce-red: #d0343a;
    --text-dark: #2c3e50;
    --text-body: #33414e;
    --text-light: #5f6c76;
    --border-color: #e2e6ea;
    --body-bg: #f8f9fc;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #c5ccd3;
    --header-bg: #ffffff;
    --nav-bg: #ffffff;
    --card-radius: 12px;
    --ok-bg: #dcfce7; --ok-fg: #15803d;
    --warn-bg: #fef3c7; --warn-fg: #b45309;
    --err-bg: #fee2e2; --err-fg: #b91c1c;
    --info-bg: #e0f2fe; --info-fg: #0369a1;
    --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
html[data-theme="dark"] {
    --ifce-green: #38b259;
    --ifce-green-dark: #4ade80;
    --ifce-light-green: #143320;
    --ifce-red: #f87171;
    --text-dark: #f8fafc;
    --text-body: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #2e384d;
    --body-bg: #0b1120;
    --card-bg: #1e293b;
    --input-bg: #172033;
    --input-border: #334155;
    --header-bg: #131c2e;
    --nav-bg: #131c2e;
    --ok-bg: rgba(34, 197, 94, 0.18); --ok-fg: #86efac;
    --warn-bg: rgba(245, 158, 11, 0.18); --warn-fg: #fcd34d;
    --err-bg: rgba(239, 68, 68, 0.18); --err-fg: #fca5a5;
    --info-bg: rgba(14, 165, 233, 0.18); --info-fg: #7dd3fc;
    --shadow: 0 2px 4px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.25);
}
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text-body); background: var(--body-bg); font-size: 1rem; line-height: 1.55; }
h1, h2, h3, h4, h5, h6 { color: var(--text-dark); font-weight: 700; line-height: 1.25; }
a { color: var(--ifce-green); }
a:hover { color: var(--ifce-green-dark); }
:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 3000; }
.skip-link:focus { left: 0; }

/* ---------- Botoes ---------- */
.btn { border-radius: 8px; font-weight: 600; min-height: 44px; padding: .6rem 1.1rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 40px; padding: .4rem .8rem; }
@media (max-width: 767.98px) { .btn-sm { min-height: 44px; padding: .45rem .85rem; } }
.btn-primary, .btn-success { background: var(--ifce-green); border-color: var(--ifce-green); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus,
.btn-primary:not(:disabled):not(.disabled):active { background: var(--ifce-green-dark); border-color: var(--ifce-green-dark); color: #fff; }
.btn-outline-primary { color: var(--ifce-green); border-color: var(--ifce-green); background: #fff; }
.btn-outline-primary:hover { background: var(--ifce-green); border-color: var(--ifce-green); color: #fff; }
.btn-light, .btn-secondary { background: #fff; border: 1px solid #c5ccd3; color: var(--text-dark); }
.btn-light:hover, .btn-secondary:hover { background: var(--ifce-light-green); border-color: var(--ifce-green); color: var(--ifce-green-dark); }
.btn-danger { background: var(--err-fg); border-color: var(--err-fg); }
.btn-outline-danger { color: var(--err-fg); border-color: var(--err-fg); background: #fff; }
.btn-outline-danger:hover { background: var(--err-fg); color: #fff; }
.btn-block { width: 100%; }

/* ---------- Formularios ---------- */
label { font-weight: 600; color: var(--text-dark); margin-bottom: .3rem; }
.form-group { display: block; margin-bottom: 1rem; }
.form-control, .custom-select { min-height: 46px; border-radius: 8px; border: 1px solid #c5ccd3; color: var(--text-dark); }
.form-control:focus, .custom-select:focus { border-color: var(--ifce-green); box-shadow: 0 0 0 .2rem rgba(21,94,33,.18); }
.form-text, small.form-text { color: var(--text-body); }
.form-check { padding-left: 1.75rem; margin-bottom: .35rem; min-height: 32px; display: flex; align-items: center; }
.form-check-input { margin-left: -1.75rem; width: 1.15rem; height: 1.15rem; position: absolute; }
.form-check-label { font-weight: 500; margin: 0; }
.campo-ajuda { color: var(--text-body); font-size: .92rem; margin-top: .25rem; }

/* ---------- Alertas ---------- */
.alert { border-radius: 10px; border: 0; padding: .9rem 1.1rem; display: flex; gap: .75rem; align-items: flex-start; }
.alert .alert-icone { font-size: 1.15rem; margin-top: .1rem; }
.alert-success { background: var(--ok-bg); color: #14532d; }
.alert-danger { background: var(--err-bg); color: #7f1d1d; }
.alert-warning { background: var(--warn-bg); color: #78350f; }
.alert-info { background: var(--info-bg); color: #0c4a6e; }
.alert .close { margin-left: auto; opacity: .7; min-width: 44px; min-height: 44px; }

/* ---------- Cards e status ---------- */
.card { border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); background: #fff; }
.card-header { background: #fff; border-bottom: 1px solid var(--border-color); border-radius: var(--card-radius) var(--card-radius) 0 0 !important; font-weight: 700; color: var(--text-dark); }
.pilula { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.pilula-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pilula-atencao { background: var(--warn-bg); color: var(--warn-fg); }
.pilula-erro { background: var(--err-bg); color: var(--err-fg); }
.pilula-info { background: var(--info-bg); color: var(--info-fg); }
.pilula-neutro { background: #eceff2; color: #3b4652; }

/* ---------- Casca publica ---------- */
.site-topo { background: #fff; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1030; }
.site-topo .container { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.site-marca img { height: 46px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.site-nav a, .site-nav .dropdown-toggle { color: var(--text-dark); font-weight: 600; padding: .6rem .9rem; border-radius: 8px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; }
.site-nav a:hover, .site-nav .dropdown-toggle:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); }
.site-nav a.ativo { color: var(--ifce-green); box-shadow: inset 0 -3px 0 var(--ifce-green); border-radius: 8px 8px 0 0; }
.site-nav .btn-entrar { background: var(--ifce-green); color: #fff; }
.site-nav .btn-entrar:hover { background: var(--ifce-green-dark); color: #fff; }
.site-menu-botao { display: none; margin-left: auto; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--border-color); background: #fff; border-radius: 8px; font-size: 1.2rem; color: var(--text-dark); flex: 0 0 44px; }
@media (max-width: 991.98px) {
    .site-menu-botao { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: .75rem 16px 1rem; border-bottom: 1px solid var(--border-color); box-shadow: 0 12px 20px rgba(0,0,0,.08); margin: 0; }
    .site-nav.aberto { display: flex; }
    .site-nav a, .site-nav .dropdown-toggle { width: 100%; min-height: 46px; }
    .site-nav .dropdown { width: 100%; }
    .site-nav .dropdown-toggle { justify-content: space-between; }
    .site-nav .dropdown-menu { position: static !important; transform: none !important; float: none; border: 0; box-shadow: none; padding: .25rem 0 .5rem 1rem; width: 100%; }
    .site-nav .dropdown-item { min-height: 44px; display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: 8px; font-weight: 600; color: var(--text-dark); }
    .site-nav .dropdown-item:hover, .site-nav .dropdown-item:focus { background: var(--ifce-light-green); color: var(--ifce-green-dark); }
}
.site-principal { min-height: 60vh; padding-bottom: 3rem; }
.hero { position: relative; color: #fff; background: #0e3d17 center/cover no-repeat; }
.hero::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(10,50,18,.92) 0%, rgba(10,50,18,.75) 55%, rgba(10,50,18,.35) 100%); }
.hero .container { position: relative; padding-top: 4rem; padding-bottom: 4rem; }
.hero h1 { color: #fff; font-size: 2.4rem; max-width: 18ch; }
.hero p { font-size: 1.15rem; max-width: 54ch; color: #f1f7f2; }
.hero .btn-hero { background: #fff; color: var(--ifce-green-dark); border-color: #fff; font-size: 1.05rem; }
.hero .btn-hero:hover { background: var(--ifce-light-green); }
.hero .btn-hero-2 { background: transparent; color: #fff; border: 2px solid #fff; }
.hero .btn-hero-2:hover { background: rgba(255,255,255,.15); color: #fff; }
@media (max-width: 767.98px) { .hero h1 { font-size: 1.8rem; } .hero .container { padding-top: 2.5rem; padding-bottom: 2.5rem; } }
.secao { padding: 3rem 0 0; }
.secao-titulo { font-size: 1.6rem; margin-bottom: .35rem; }
.secao-sub { color: var(--text-body); margin-bottom: 1.5rem; }
.passos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.passo { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); padding: 1.25rem; box-shadow: var(--shadow); }
.passo-numero { width: 40px; height: 40px; border-radius: 50%; background: var(--ifce-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: .6rem; }
.passo h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.passo p { margin: 0; color: var(--text-body); }
@media (max-width: 767.98px) { .passos { grid-template-columns: 1fr; } }
.espacos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.espaco { position: relative; border-radius: var(--card-radius); overflow: hidden; height: 220px; background: #dfe5e0; box-shadow: var(--shadow); margin: 0; }
.espaco img { width: 100%; height: 100%; object-fit: cover; display: block; }
.espaco figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .9rem .7rem; color: #fff; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
@media (max-width: 991.98px) { .espacos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479.98px) { .espacos { grid-template-columns: 1fr; } }
.chamada { background: var(--ifce-green-dark, #114e1a); color: #fff; border-radius: var(--card-radius); padding: 1.75rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.chamada h2 { color: #fff; font-size: 1.4rem; margin: 0; }
.chamada .btn { background: #fff; color: #114e1a; font-weight: 700; }
.chamada .btn:hover { background: #f0fdf4; color: #0d3d14; }
.painel-form { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1.75rem; max-width: 520px; margin: 2rem auto; }
.painel-form h1 { font-size: 1.6rem; margin-bottom: .25rem; }
.painel-form .sub { color: var(--text-body); margin-bottom: 1.25rem; }
.painel-largo { max-width: 760px; }
.titulo-pagina { padding: 2rem 0 1rem; }
.titulo-pagina h1 { font-size: 1.8rem; margin: 0 0 .25rem; }
.titulo-pagina p { color: var(--text-body); margin: 0; }
.site-rodape { background: #10381a; color: #e8f1ea; margin-top: 3rem; }
.site-rodape .container { padding-top: 2.25rem; padding-bottom: 1.75rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-rodape .rodape-logo { height: 42px; width: auto; max-width: 210px; object-fit: contain; background: rgba(255, 255, 255, 0.95); border-radius: 8px; padding: 4px 10px; margin-bottom: 0.85rem; display: inline-block; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.site-rodape h2 { color: #fff; font-size: 1.05rem; font-weight: 700; margin-bottom: 0.75rem; text-transform: none; letter-spacing: 0; }
.site-rodape p { color: #d0e4d4; font-size: 0.95rem; line-height: 1.45; margin: 0 0 0.5rem; }
.site-rodape ul { list-style: none; padding: 0; margin: 0; }
.site-rodape li { margin-bottom: .6rem; }
.site-rodape a { color: #f0fdf4; text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; font-size: .95rem; min-height: 36px; transition: color .15s ease; }
.site-rodape a:hover { color: #86efac; text-decoration: underline; }
.site-rodape a i { width: 1.25rem; text-align: center; color: #4ade80; font-size: 1rem; flex-shrink: 0; }
.site-rodape .direitos { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.25rem; font-size: .88rem; color: #bbf7d0; line-height: 1.6; }
.site-rodape .direitos a { display: inline; text-decoration: underline; color: #fff; min-height: unset; }
@media (max-width: 767.98px) {
  .site-rodape .container { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-rodape .rodape-logo { display: none !important; }
}

/* ---------- Casca administrativa ---------- */
body.admin { background: var(--body-bg); }
.adm-topo { background: var(--ifce-green); color: #fff; height: 60px; display: flex; align-items: center; gap: .75rem; padding: 0 1rem; position: fixed; top: 0; left: 0; right: 0; z-index: 1040; }
.adm-topo .adm-menu { display: none; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: rgba(255,255,255,.14); color: #fff; border-radius: 8px; font-size: 1.15rem; flex: 0 0 44px; }
.adm-topo .adm-marca { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; }
.adm-topo .adm-marca:hover { color: #fff; }
.adm-topo .adm-marca img { height: 34px; background: #fff; border-radius: 6px; padding: 3px 6px; }
.adm-topo .adm-marca span { line-height: 1.1; font-size: .95rem; }
.adm-topo .adm-usuario { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-weight: 600; }
.adm-topo .adm-usuario a { color: #fff; text-decoration: none; padding: 0 .85rem; border-radius: 8px; background: rgba(255,255,255,.14); min-height: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.adm-topo .adm-usuario a:hover { background: rgba(255,255,255,.26); }
.adm-nav { position: fixed; top: 60px; bottom: 0; left: 0; width: 248px; background: #fff; border-right: 1px solid var(--border-color); padding: 1rem .75rem; overflow-y: auto; z-index: 1035; }
.adm-nav a { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 8px; color: var(--text-dark); font-weight: 600; text-decoration: none; min-height: 44px; margin-bottom: .2rem; }
.adm-nav a i { width: 1.25rem; text-align: center; color: var(--ifce-green); }
.adm-nav a:hover { background: var(--ifce-light-green); }
.adm-nav a.ativo { background: var(--ifce-light-green); color: var(--ifce-green-dark); box-shadow: inset 3px 0 0 var(--ifce-green); }
.adm-nav .adm-nav-sep { height: 1px; background: var(--border-color); margin: .75rem 0; }
.adm-conteudo { margin-left: 248px; padding: 76px 1.5rem 2rem; min-height: 100vh; }
.adm-fundo { display: none; }
@media (max-width: 991.98px) {
    .adm-topo .adm-menu { display: inline-flex; align-items: center; justify-content: center; }
    .adm-topo .adm-marca span { display: none; }
    .adm-topo .adm-usuario .nome { display: none; }
    .adm-nav { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 8px 0 24px rgba(0,0,0,.18); width: 280px; }
    .adm-nav.aberto { transform: none; }
    .adm-fundo.aberto { display: block; position: fixed; top: 60px; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.4); z-index: 1034; }
    .adm-conteudo { margin-left: 0; padding: 72px 12px 2rem; }
}

/* Cabecalho de pagina (padrao IFCE) */
.header-premium-ifce { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1rem 1.25rem; margin-bottom: 1rem; position: relative; overflow: hidden; }
.header-premium-ifce::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2.5px; background: linear-gradient(90deg, var(--ifce-green) 0%, rgba(21,94,33,0.25) 100%); }
.header-premium-bc { align-items: center; font-size: .9rem; color: var(--text-body); margin-bottom: .5rem; }
.header-premium-bc a { text-decoration: none; font-weight: 600; }
.header-premium-bc .bc-sep { margin: 0 .5rem; color: #98a2ab; }
.header-premium-bc .bc-current { color: var(--text-dark); font-weight: 700; }
.header-eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ifce-green); display: flex; align-items: center; gap: .4rem; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ifce-red); }
.header-premium-title-wrap { display: flex; align-items: center; gap: .6rem; }
.header-premium-title { font-size: 1.6rem; margin: 0; }
.header-counter-badge { background: var(--ifce-light-green); color: var(--ifce-green-dark); font-weight: 700; padding: .1rem .7rem; border-radius: 999px; }
.btn-header-action { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border-radius: 8px; border: 1px solid var(--border-color); background: #fff; color: var(--text-dark); font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-header-action:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); border-color: var(--ifce-green); }
@media (max-width: 767.98px) {
    .header-premium-ifce { padding: .75rem 1rem; }
    .btn-header-action { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: 0 0 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; }
    .btn-header-action .btn-label { display: none; }
    .header-premium-title { font-size: 1.25rem; }
}

/* Indicadores */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 768px) { .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.kpi-card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: .9rem 1rem; display: flex; align-items: center; gap: .8rem; }
.kpi-icone { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: none; }
.kpi-icone.verde { background: var(--ifce-light-green); color: var(--ifce-green); }
.kpi-icone.amarelo { background: var(--warn-bg); color: var(--warn-fg); }
.kpi-icone.vermelho { background: var(--err-bg); color: var(--err-fg); }
.kpi-icone.azul { background: var(--info-bg); color: var(--info-fg); }
.kpi-val { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); line-height: 1.1; }
.kpi-rotulo { color: var(--text-body); font-size: .9rem; }

/* Busca e filtros */
.barra-busca { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); padding: .9rem 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.filter-chip { min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid #c5ccd3; background: #fff; color: var(--text-dark); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: .92rem; white-space: nowrap; }
.filter-chip:hover { border-color: var(--ifce-green); }
.filter-chip.active { background: var(--ifce-green); border-color: var(--ifce-green); color: #fff; }

/* ---------- Card Hero: Próxima Visita ---------- */
.card-proxima-visita {
    background: #ffffff;
    border: 1px solid rgba(21, 94, 33, 0.22);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 14px rgba(21, 94, 33, 0.08);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.card-proxima-visita::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #155e21 0%, #38b259 100%);
}
.proxima-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
.proxima-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ifce-green-dark, #114e1a);
}
.proxima-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    display: inline-block;
}
.proxima-prazo {
    background: var(--ok-bg, #dcfce7);
    color: var(--ok-fg, #15803d);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0;
}
.proxima-corpo {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.proxima-info {
    flex: 1 1 520px;
    min-width: 0;
}
.proxima-escola {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark, #2c3e50);
    margin: 0 0 1rem;
    line-height: 1.3;
}
.proxima-grade {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}
.proxima-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.proxima-item .item-rotulo {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light, #5f6c76);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.proxima-item .item-rotulo i {
    color: var(--ifce-green, #155e21);
    font-size: 0.85rem;
}
.proxima-item .item-valor {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark, #2c3e50);
}
.proxima-item .item-sub {
    font-size: 0.82rem;
    color: var(--text-light, #5f6c76);
}
.proxima-item .item-sub a {
    color: var(--ifce-green, #155e21);
    font-weight: 600;
    text-decoration: underline;
}
.proxima-acoes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 0 0 auto;
}
@media (max-width: 767.98px) {
    .proxima-acoes {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .proxima-acoes .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
    }
}

/* Selos de destaque da próxima visita */
.linha-proxima {
    background: rgba(21, 94, 33, 0.04) !important;
}
.linha-proxima td {
    border-top: 2px solid rgba(21, 94, 33, 0.25) !important;
    border-bottom: 2px solid rgba(21, 94, 33, 0.25) !important;
}
.selo-proxima-tabela {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #e8f5e9;
    color: #155e21;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.35rem;
}
.cartao-proxima {
    border: 2px solid rgba(21, 94, 33, 0.35) !important;
    background: #ffffff;
    position: relative;
    padding-top: 0 !important;
    overflow: hidden;
}
.tag-proxima-cartao {
    background: linear-gradient(90deg, #155e21 0%, #1c742c 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.45rem 1rem;
    margin: 0 -1rem 0.85rem -1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tag-proxima-cartao .badge-prazo {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-transform: none;
}

/* Tabela enxuta (computador) e cards (celular) */
.tabela-lista { width: 100%; background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); border-collapse: separate; border-spacing: 0; overflow: hidden; box-shadow: var(--shadow); }
.tabela-lista th { background: #f3f6f4; color: var(--text-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; padding: .75rem 1rem; border-bottom: 1px solid var(--border-color); text-align: left; }
.tabela-lista td { padding: .8rem 1rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.tabela-lista tbody tr { cursor: pointer; }
.tabela-lista tbody tr:hover { background: #f5faf6; }
.tabela-lista tbody tr:last-child td { border-bottom: 0; }
.celula-principal strong { display: block; color: var(--text-dark); }
.celula-principal small { color: var(--text-body); }
.lista-cartoes { display: none; }
.cartao-item { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: .9rem 1rem; margin-bottom: .75rem; }
.cartao-item h3 { font-size: 1.05rem; margin: 0 0 .15rem; }
.cartao-item .meta { color: var(--text-body); font-size: .95rem; }
.cartao-item .btn-ver { margin-top: .75rem; width: 100%; justify-content: space-between; }
@media (max-width: 767.98px) { .tabela-lista-wrap { display: none; } .lista-cartoes { display: block; } }
.vazio { background: #fff; border: 1px dashed #b8c2ca; border-radius: var(--card-radius); text-align: center; padding: 2rem 1rem; color: var(--text-dark); }
.vazio i { font-size: 1.8rem; color: var(--ifce-green); display: block; margin-bottom: .5rem; }

/* Ficha lateral */
.ficha-fundo { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.4); z-index: 1050; }
.ficha-fundo.aberto { display: block; }
.ficha { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100%; background: #fff; z-index: 1060; transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.2); }
.ficha.aberto { transform: none; }
.ficha-topo { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: flex-start; gap: .75rem; }
.ficha-topo h2 { font-size: 1.2rem; margin: 0; }
.ficha-fechar { margin-left: auto; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--border-color); background: #fff; border-radius: 50%; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; color: var(--text-dark); }
.ficha-fechar:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); border-color: var(--ifce-green); }
.ficha-corpo { padding: 1.25rem; overflow-y: auto; flex: 1; }
.ficha-corpo dl { display: grid; grid-template-columns: 1fr 1fr; gap: .1rem 1rem; margin: 0; }
.ficha-item { margin-bottom: .8rem; min-width: 0; }
.ficha-item.larga { grid-column: 1 / -1; }
@media (max-width: 479.98px) { .ficha-corpo dl { grid-template-columns: 1fr; } }
.ficha-item dt { font-size: .85rem; color: var(--text-body); font-weight: 600; margin: 0 0 .1rem; }
.ficha-item dd { margin: 0; color: var(--text-dark); font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.ficha-rodape { padding: .8rem 1.25rem; border-top: 1px solid var(--border-color); display: flex; flex-wrap: wrap; gap: .5rem; }
.ficha-rodape .btn { flex: 1 1 44%; white-space: normal; }
.ficha-rodape .btn:first-child { flex-basis: 100%; }
.ficha-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1.25rem; border-top: 1px solid var(--border-color); background: #f8faf8; }
.ficha-nav .btn { flex: 1; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
#fichaPosicao { text-align: center; min-width: 70px; font-weight: 700; font-size: .9rem; color: var(--text-dark); white-space: nowrap; padding: 0 .3rem; }

body[data-local] .g-recaptcha { display: none; }

.selo-contagem { background: var(--ifce-red); color: #fff; font-size: .75rem; font-weight: 700; min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
.avaliacao-item { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.avaliacao-topo { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: flex-start; }
.avaliacao-topo h2 { font-size: 1.15rem; margin: 0 0 .15rem; }
.avaliacao-topo .meta { color: var(--text-body); font-size: .92rem; }
.avaliacao-autorizacoes { list-style: none; padding: 0; margin: .5rem 0 .9rem; font-size: .93rem; }
.avaliacao-autorizacoes li { margin-bottom: .25rem; }
.avaliacao-acoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.avaliacao-acoes form { margin: 0; }
@media (max-width: 575.98px) {
    .avaliacao-acoes { flex-direction: column; align-items: stretch; }
    .avaliacao-acoes .btn { width: 100%; min-height: 44px; }
    .avaliacao-acoes form { width: 100%; }
}
.fotos-grade-pequena { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-width: 460px; margin: .5rem 0; }
.depoimento-publico { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; height: 100%; display: flex; flex-direction: column; }
.depoimento-publico .estrelas-leitura { font-size: 1.15rem; margin: 0 0 .4rem; }
.depoimento-publico blockquote { margin: 0 0 .75rem; color: var(--text-dark); flex: 1; white-space: pre-wrap; font-size: 1.02rem; }
.depoimento-publico footer { font-weight: 700; color: var(--text-dark); }
.depoimento-publico footer small { display: block; font-weight: 500; color: var(--text-body); }
.depoimentos-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 991.98px) { .depoimentos-grade { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .depoimentos-grade { grid-template-columns: 1fr; } }
.abas-ano { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.aba-ano { min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; padding: 0 1rem; border-radius: 10px; border: 1px solid var(--border-color); background: #fff; color: var(--text-dark); font-weight: 700; text-decoration: none; }
.aba-ano small { font-weight: 500; color: var(--text-body); }
.aba-ano:hover { border-color: var(--ifce-green); color: var(--ifce-green-dark); }
.aba-ano.ativa { background: var(--ifce-green); border-color: var(--ifce-green); color: #fff; }
.aba-ano.ativa small { color: #e8f5e9; }
a.filter-chip { display: inline-flex; align-items: center; text-decoration: none; }
a.filter-chip.active { color: #fff; }
.paginacao { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.25rem 0; color: var(--text-dark); }
.paginacao-botoes { display: flex; align-items: center; gap: .5rem; }
.paginacao-botoes .btn { min-height: 44px; min-width: 44px; padding: .45rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; }
.paginacao-atual { font-weight: 700; padding: 0 .5rem; font-size: .95rem; white-space: nowrap; }
.paginacao-espaco { width: 0; min-width: 0; display: inline-block; }
@media (max-width: 575.98px) {
    .paginacao { flex-direction: column; align-items: stretch; text-align: center; gap: .75rem; }
    .paginacao > span { font-size: .9rem; color: var(--text-body); }
    .paginacao-botoes { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; width: 100%; }
    .paginacao-botoes .btn { width: 100%; padding: .45rem .6rem; font-size: .9rem; }
    .paginacao-botoes .btn:first-child:nth-last-child(2) { grid-column: 1; }
    .paginacao-botoes .paginacao-atual { grid-column: 2; padding: 0 .25rem; font-size: .88rem; text-align: center; }
    .paginacao-botoes .btn:last-child { grid-column: 3; }
    .paginacao-botoes .paginacao-espaco:first-child { grid-column: 1; }
    .paginacao-botoes .paginacao-espaco:last-child { grid-column: 3; }
}
.novidade { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1rem 1.25rem; margin-bottom: .75rem; }
.novidade-topo { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.novidade-publico { color: var(--text-body); font-size: .9rem; font-weight: 600; }
.novidade h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.novidade p { margin: 0; max-width: 78ch; color: var(--text-body); }
.selo-novo { background: var(--ifce-red); color: #fff; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.adm-versao { margin-top: 1rem; padding: 0 .85rem; font-size: .82rem; line-height: 1.5; color: var(--text-body); word-break: break-word; }
.adm-versao a { font-weight: 600; display: inline; padding: 0; min-height: 0; margin: 0; }
.adm-versao a:hover { background: none; text-decoration: underline; }
.aviso-topo { background: var(--warn-bg); color: #78350f; border-bottom: 1px solid #f3d98a; }
.aviso-topo .container { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; min-height: 48px; padding-top: .4rem; padding-bottom: .4rem; }
.aviso-topo a { color: #78350f; font-weight: 700; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.btn-google { background: #fff; border: 1px solid #c5ccd3; color: var(--text-dark); gap: .7rem; }
.btn-google:hover { background: #f7f9fc; border-color: #8aa0b8; color: var(--text-dark); }
.divisor-ou { display: flex; align-items: center; gap: .75rem; color: var(--text-body); font-size: .92rem; margin: 1.1rem 0; }
.divisor-ou::before, .divisor-ou::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }

/* Acoes do responsavel: remarcar, editar, comprovante */
.acoes-linha { display: flex; flex-wrap: wrap; gap: .4rem; }
.acoes-cartao { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.acoes-cartao .btn { width: 100%; padding-left: .5rem; padding-right: .5rem; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font-size: .92rem; }
.acoes-cartao .btn:only-child, .acoes-cartao .btn.btn-outline-danger { grid-column: 1 / -1; }
@media (max-width: 400px) {
    .acoes-cartao .btn { font-size: .86rem; padding-left: .3rem; padding-right: .3rem; }
}
.meta-rotulo { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ifce-green); }
.dia-card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); padding: 1rem 1.1rem; margin-bottom: .75rem; box-shadow: var(--shadow); }
.dia-titulo { font-weight: 700; color: var(--text-dark); margin-bottom: .6rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.horarios-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.horarios-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.horarios-chips label { margin: 0; cursor: pointer; min-width: 84px; min-height: 48px; padding: .5rem .9rem; border: 2px solid #c5ccd3; border-radius: 10px; background: #fff; font-weight: 700; color: var(--text-dark); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.horarios-chips label small { font-weight: 500; font-size: .72rem; color: var(--text-body); }
.horarios-chips label:hover { border-color: var(--ifce-green); }
.horarios-chips input:checked + label { border-color: var(--ifce-green); background: var(--ifce-light-green); color: var(--ifce-green-dark); }
.horarios-chips input:disabled + label { background: #f1f3f4; color: #6b7680; cursor: not-allowed; border-style: dashed; }
.horarios-chips input:focus-visible + label { outline: 3px solid #f5b400; outline-offset: 2px; }
.barra-confirmar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border-color); box-shadow: 0 -6px 16px rgba(0,0,0,.06); margin: 1rem -15px 0; padding: .9rem 15px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; z-index: 5; }
.comprovante { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1.5rem; max-width: 820px; margin: 0 auto 2rem; }
.comprovante-topo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .9rem; border-bottom: 3px solid var(--ifce-green); margin-bottom: 1rem; }
.comprovante-topo img { height: 46px; width: auto; }
.comprovante-num { font-weight: 700; font-size: 1.15rem; color: var(--ifce-green); }
.comprovante-destaque { background: var(--ifce-light-green); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1.1rem; }
.comprovante-data { font-size: 1.6rem; font-weight: 700; color: var(--text-dark); line-height: 1.2; margin: .2rem 0; }
.comprovante-hora { font-size: 1.15rem; margin-bottom: .5rem; }
.comprovante-dados { margin-bottom: 1rem; }
.comprovante-local { background: #f3f6f4; border-radius: 10px; padding: .8rem 1rem; margin-bottom: .75rem; }
.comprovante-aviso { background: var(--warn-bg); color: #78350f; border-radius: 10px; padding: .8rem 1rem; }
.comprovante-rodape { margin-top: 1rem; font-size: .85rem; color: var(--text-body); }
@media print { .comprovante { border: 0; box-shadow: none; padding: 0; max-width: none; } .comprovante-destaque, .comprovante-local, .comprovante-aviso { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media (max-width: 575.98px) {
    .barra-confirmar { margin-left: -15px; margin-right: -15px; padding: .85rem 15px; flex-direction: column; align-items: stretch; gap: .6rem; }
    .barra-confirmar > div:first-child { text-align: center; font-size: .95rem; }
    .barra-confirmar .d-flex { flex-direction: column; width: 100%; gap: .5rem !important; }
    .barra-confirmar .btn { width: 100%; min-height: 44px; }
}

/* Politica de privacidade */
.priv-card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1rem; }
.priv-card h2 { font-size: 1.25rem; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.priv-card h2 i { color: var(--ifce-green); font-size: 1.1rem; }
.priv-card h3 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; color: var(--ifce-green-dark); }
.priv-card ul { padding-left: 1.25rem; }
.priv-card li { margin-bottom: .4rem; }
.priv-card p, .priv-card li { max-width: 78ch; }
.priv-destaque { background: var(--ifce-light-green); border-radius: 10px; padding: .9rem 1.1rem; margin: 1rem 0; color: #1c3b22; }
.priv-resumo { margin-top: 0; }
.priv-resumo h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.priv-resumo ul { margin: 0; padding-left: 1.25rem; }
.priv-lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem 1.5rem; margin: 0 0 1rem; }
.priv-lista dt { font-size: .85rem; color: var(--text-body); font-weight: 600; }
.priv-lista dd { margin: 0; color: var(--text-dark); font-weight: 600; word-break: break-word; }
.priv-atualizacao { color: var(--text-body); font-size: .92rem; margin: 1rem 0 0; }
.priv-badge-lgpd { display: inline-flex; align-items: center; gap: .35rem; background: #dcfce7; color: #15803d; font-size: .8rem; font-weight: 700; padding: .25rem .7rem; border-radius: 50rem; margin-bottom: .6rem; }

/* Avaliacao da visita */
.estrelas { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .5rem; }
.estrelas input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.estrelas label { margin: 0; cursor: pointer; text-align: center; border: 2px solid #c5ccd3; border-radius: 10px; padding: .6rem .3rem; min-height: 72px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; font-size: .9rem; line-height: 1.2; }
.estrelas label i { font-size: 1.4rem; color: #b8c2ca; }
.estrelas label:hover { border-color: var(--ifce-green); }
.estrelas input:checked + label { border-color: var(--ifce-green); background: var(--ifce-light-green); color: var(--ifce-green-dark); }
.estrelas input:checked + label i { color: #e0a800; }
.estrelas input:focus-visible + label { outline: 3px solid #f5b400; outline-offset: 2px; }
.estrelas-leitura { font-size: 1.5rem; color: #e0a800; margin: .5rem 0; }
.estrelas-leitura span { font-size: 1rem; color: var(--text-dark); font-weight: 700; }
.depoimento { border-left: 4px solid var(--ifce-green); background: #f3f6f4; margin: 1rem 0; padding: .8rem 1rem; border-radius: 0 8px 8px 0; color: var(--text-dark); white-space: pre-wrap; }
.caixa-fotos { background: #f8faf8; border: 1px solid var(--border-color); border-radius: 10px; padding: 1rem; }
.fotos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.fotos-grade a { display: block; border-radius: 8px; overflow: hidden; background: #dfe5e0; aspect-ratio: 1; }
.fotos-grade img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Detalhe da visita */
.ficha-grade { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.5rem; margin: 0; }
.ficha-grade dt { font-size: .85rem; color: var(--text-body); font-weight: 600; margin: 0 0 .1rem; }
.ficha-grade dd { margin: 0; color: var(--text-dark); font-weight: 600; word-break: break-word; white-space: pre-wrap; }
.ficha-grade .larga { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .ficha-grade { grid-template-columns: 1fr; } }
.tratativa { border-left: 3px solid var(--ifce-green); padding: .25rem 0 .25rem 1rem; margin-bottom: 1rem; }
.tratativa-topo { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; color: var(--text-dark); }
.tratativa-corpo { color: var(--text-body); margin-top: .25rem; }

/* Campo de senha com botao de mostrar */
.campo-senha { position: relative; }
.campo-senha .form-control { padding-right: 52px; }
.btn-senha { position: absolute; top: 1px; right: 1px; min-width: 46px; height: 44px; border: 0; background: transparent; color: var(--text-body); border-radius: 0 8px 8px 0; }
.btn-senha:hover { color: var(--ifce-green); }
.links-form { margin-top: 1.25rem; text-align: center; line-height: 2; }
.links-form a { font-weight: 600; }
.texto-lgpd { max-height: 150px; overflow-y: auto; background: #f3f6f4; border: 1px solid var(--border-color); border-radius: 8px; padding: .75rem .9rem; font-size: .92rem; color: var(--text-body); margin-bottom: .6rem; white-space: pre-line; }

/* Modal */
.modal-content { border-radius: var(--card-radius); border: 0; }
.modal-header { border-bottom: 1px solid var(--border-color); }
.modal-footer { border-top: 1px solid var(--border-color); }
.modal-title { color: var(--text-dark); font-weight: 700; }
.modal-header .close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: -0.5rem -0.5rem -0.5rem auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-body); opacity: .75; }
.modal-header .close:hover { opacity: 1; background: var(--ifce-light-green); color: var(--ifce-green-dark); }

/* Modal com rolagem garantida (previne campos escondidos e botoes cortados no celular) */
.modal-dialog-scrollable {
    display: flex;
    max-height: calc(100vh - 1rem);
    align-items: stretch;
}
.modal-dialog-scrollable .modal-content,
.modal-dialog-scrollable form.modal-content {
    max-height: calc(100vh - 1rem);
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;
}
.modal-dialog-scrollable .modal-header {
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    padding: 1rem 1.15rem;
}
.modal-dialog-scrollable .modal-footer {
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    background: #fff;
}
html[data-theme="dark"] .modal-dialog-scrollable .modal-footer {
    background: var(--card-bg);
}
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: .5rem;
        max-width: calc(100% - 1rem);
    }
    .modal-dialog-scrollable {
        max-height: calc(100vh - 1rem);
    }
    .modal-dialog-scrollable .modal-content,
    .modal-dialog-scrollable form.modal-content {
        max-height: calc(100vh - 1rem);
    }
    .modal-footer { flex-direction: column-reverse; gap: .5rem; padding: .75rem 1rem; }
    .modal-footer .btn { width: 100%; margin: 0 !important; min-height: 44px; }
}

/* Calendario (FullCalendar) */
.calendario-cartao { background: #fff; border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1rem; }
.fc { --fc-button-bg-color: var(--ifce-green); --fc-button-border-color: var(--ifce-green); --fc-button-hover-bg-color: var(--ifce-green-dark); --fc-button-hover-border-color: var(--ifce-green-dark); --fc-button-active-bg-color: var(--ifce-green-dark); --fc-button-active-border-color: var(--ifce-green-dark); --fc-list-event-hover-bg-color: var(--ifce-light-green); }
.fc .fc-button { min-height: 44px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.fc-list-event { cursor: pointer; }
.fc .fc-toolbar-title { font-size: 1.25rem; color: var(--text-dark); }
.fc-list-event-title a { color: var(--ifce-green); font-weight: 600; text-decoration: none; }
.fc-list-event-title a:hover { text-decoration: underline; }
@media (max-width: 767.98px) {
    .fc .fc-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: .75rem; }
    .fc .fc-toolbar-chunk { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: .5rem; }
    .fc .fc-toolbar-chunk:nth-child(2) { justify-content: center; order: -1; }
    .fc .fc-toolbar-title { font-size: 1.25rem; text-align: center; }
    .fc .fc-button-group { display: inline-flex; }
    .fc .fc-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .4rem .85rem; }
    .fc .fc-prev-button, .fc .fc-next-button { min-width: 44px; width: 44px; padding: 0; }
    .fc .fc-today-button { min-height: 44px; padding: 0 1rem; }
}

@media (max-width: 767.98px) {
    .titulo-pagina.d-flex { flex-direction: column; align-items: stretch !important; }
    .titulo-pagina.d-flex .btn { width: 100%; margin-top: .5rem; }
    .topo-comprovante { flex-direction: column; align-items: stretch !important; }
    .topo-comprovante .d-flex { flex-direction: column; width: 100%; gap: .5rem !important; }
    .topo-comprovante .btn { width: 100%; min-height: 44px; }
    .painel-form .d-flex { flex-direction: column; }
    .painel-form .d-flex .btn { width: 100%; min-height: 44px; }
    .acoes-topo-visita { width: 100%; margin-left: 0 !important; margin-top: .5rem; flex-direction: column; align-items: stretch; }
    .acoes-topo-visita .btn { width: 100%; min-height: 44px; }
}

/* ---------- Botoes e Acoes de Alternancia de Tema ---------- */
.btn-tema {
    min-height: 44px;
    height: 44px;
    padding: 0 .9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-dark);
    font-weight: 600;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-tema:hover {
    background: var(--ifce-light-green);
    border-color: var(--ifce-green);
    color: var(--ifce-green-dark);
}
.btn-tema i { font-size: 1.05rem; color: #d97706; }

/* Botao no topo publico (mobile) */
.site-tema-botao {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    font-size: 1.15rem;
    color: var(--text-dark);
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    cursor: pointer;
}
.site-tema-botao:hover {
    background: var(--ifce-light-green);
    border-color: var(--ifce-green);
    color: var(--ifce-green-dark);
}
.site-tema-botao i { color: #d97706; }
@media (max-width: 991.98px) {
    .site-tema-botao { display: inline-flex; }
    .site-nav .btn-tema { width: 100%; justify-content: flex-start; }
}

/* Botao no topo administrativo */
.adm-btn-tema {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    border-radius: 8px;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    cursor: pointer;
    transition: background-color .15s ease;
}
.adm-btn-tema:hover {
    background: rgba(255,255,255,.26);
    color: #fff;
}
.adm-btn-tema i { color: #fef08a; }

/* Botao de tema no menu lateral adm */
.adm-nav-tema {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .85rem;
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 600;
    min-height: 44px;
    margin-bottom: .2rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-family: inherit;
}
.adm-nav-tema i { width: 1.25rem; text-align: center; color: #d97706; }
.adm-nav-tema:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); }

/* ---------- Regras do Modo Escuro (html[data-theme="dark"]) ---------- */
html[data-theme="dark"] body { background: var(--body-bg); color: var(--text-body); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 { color: var(--text-dark); }

html[data-theme="dark"] .skip-link { background: var(--card-bg); color: var(--text-dark); border: 1px solid var(--border-color); }
html[data-theme="dark"] .card { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .card-header { background: var(--card-bg); border-color: var(--border-color); color: var(--text-dark); }
html[data-theme="dark"] .pilula-neutro { background: #243046; color: #cbd5e1; }

html[data-theme="dark"] .site-topo { background: var(--header-bg); border-color: var(--border-color); }
html[data-theme="dark"] .site-nav a, html[data-theme="dark"] .site-nav .dropdown-toggle { color: var(--text-dark); }
html[data-theme="dark"] .site-nav a:hover, html[data-theme="dark"] .site-nav .dropdown-toggle:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .site-nav a.ativo { color: var(--ifce-green); box-shadow: inset 0 -3px 0 var(--ifce-green); }
html[data-theme="dark"] .site-menu-botao { background: var(--card-bg); border-color: var(--border-color); color: var(--text-dark); }
@media (max-width: 991.98px) {
    html[data-theme="dark"] .site-nav { background: var(--header-bg); border-color: var(--border-color); }
    html[data-theme="dark"] .site-nav .dropdown-item { color: var(--text-dark); }
}
html[data-theme="dark"] .site-nav .dropdown-menu { background: var(--card-bg); border: 1px solid var(--border-color); }
html[data-theme="dark"] .site-nav .dropdown-item { color: var(--text-dark); }
html[data-theme="dark"] .site-nav .dropdown-item:hover, html[data-theme="dark"] .site-nav .dropdown-item:focus { background: var(--ifce-light-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .site-marca img { background: rgba(255,255,255,0.92); border-radius: 6px; padding: 3px 8px; }

html[data-theme="dark"] .btn-tema { background: var(--input-bg); border-color: var(--input-border); color: var(--text-dark); }
html[data-theme="dark"] .btn-tema:hover { background: var(--ifce-light-green); border-color: var(--ifce-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .btn-tema i { color: #fcd34d; }
html[data-theme="dark"] .site-tema-botao { background: var(--card-bg); border-color: var(--border-color); color: var(--text-dark); }
html[data-theme="dark"] .site-tema-botao:hover { background: var(--ifce-light-green); border-color: var(--ifce-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .site-tema-botao i { color: #fcd34d; }

html[data-theme="dark"] .adm-topo { background: #0c2b14; border-bottom: 1px solid #1a4221; }
html[data-theme="dark"] .adm-nav { background: var(--nav-bg); border-color: var(--border-color); }
html[data-theme="dark"] .adm-nav a { color: var(--text-dark); }
html[data-theme="dark"] .adm-nav a:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .adm-nav a.ativo { background: var(--ifce-light-green); color: var(--ifce-green-dark); box-shadow: inset 3px 0 0 var(--ifce-green); }
html[data-theme="dark"] .adm-nav .adm-nav-sep { background: var(--border-color); }
html[data-theme="dark"] .adm-nav-tema { color: var(--text-dark); }
html[data-theme="dark"] .adm-nav-tema i { color: #fcd34d; }
html[data-theme="dark"] .adm-nav-tema:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); }

html[data-theme="dark"] .header-premium-ifce { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .header-premium-bc .bc-current { color: var(--text-dark); }
html[data-theme="dark"] .btn-header-action { background: var(--input-bg); border-color: var(--border-color); color: var(--text-dark); }
html[data-theme="dark"] .btn-header-action:hover { background: var(--ifce-light-green); border-color: var(--ifce-green); color: var(--ifce-green-dark); }

html[data-theme="dark"] .kpi-card { background: var(--card-bg); border-color: var(--border-color); }

/* Card Hero e selos de Próxima Visita no tema escuro */
html[data-theme="dark"] .card-proxima-visita {
    background: var(--card-bg, #1e293b);
    border-color: rgba(56, 178, 89, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .card-proxima-visita::before {
    background: linear-gradient(90deg, #38b259 0%, #4ade80 100%);
}
html[data-theme="dark"] .proxima-tag {
    color: #86efac;
}
html[data-theme="dark"] .proxima-prazo {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}
html[data-theme="dark"] .proxima-escola {
    color: var(--text-dark, #f8fafc);
}
html[data-theme="dark"] .proxima-item .item-rotulo {
    color: var(--text-light, #94a3b8);
}
html[data-theme="dark"] .proxima-item .item-rotulo i {
    color: #38b259;
}
html[data-theme="dark"] .proxima-item .item-valor {
    color: var(--text-dark, #f8fafc);
}
html[data-theme="dark"] .proxima-item .item-sub {
    color: var(--text-light, #94a3b8);
}
html[data-theme="dark"] .proxima-item .item-sub a {
    color: #4ade80;
}
html[data-theme="dark"] .linha-proxima {
    background: rgba(56, 178, 89, 0.08) !important;
}
html[data-theme="dark"] .linha-proxima td {
    border-top: 2px solid rgba(56, 178, 89, 0.35) !important;
    border-bottom: 2px solid rgba(56, 178, 89, 0.35) !important;
}
html[data-theme="dark"] .selo-proxima-tabela {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}
html[data-theme="dark"] .cartao-proxima {
    border-color: rgba(56, 178, 89, 0.45) !important;
    background: var(--card-bg, #1e293b);
}
html[data-theme="dark"] .tag-proxima-cartao {
    background: linear-gradient(90deg, #132e1b 0%, #1e4529 100%);
    border-bottom: 1px solid rgba(56, 178, 89, 0.3);
    color: #86efac;
}

html[data-theme="dark"] .barra-busca { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .filter-chip { background: var(--card-bg); border-color: var(--input-border); color: var(--text-dark); }
html[data-theme="dark"] .filter-chip:hover { border-color: var(--ifce-green); }
html[data-theme="dark"] .filter-chip.active { background: var(--ifce-green); border-color: var(--ifce-green); color: #fff; }

html[data-theme="dark"] .tabela-lista { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .tabela-lista th { background: var(--input-bg); color: var(--text-dark); border-color: var(--border-color); }
html[data-theme="dark"] .tabela-lista td { border-color: var(--border-color); color: var(--text-body); }
html[data-theme="dark"] .tabela-lista tbody tr:hover { background: #222f46; }
html[data-theme="dark"] .celula-principal strong { color: var(--text-dark); }
html[data-theme="dark"] .cartao-item { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .vazio { background: var(--card-bg); border-color: #3b4861; color: var(--text-dark); }

html[data-theme="dark"] .form-control, html[data-theme="dark"] .custom-select { background-color: var(--input-bg); border-color: var(--input-border); color: var(--text-dark); }
html[data-theme="dark"] .form-control:focus, html[data-theme="dark"] .custom-select:focus { background-color: var(--input-bg); color: var(--text-dark); border-color: var(--ifce-green); }
html[data-theme="dark"] .input-group-text { background-color: #243046; border-color: var(--input-border); color: var(--text-body); }

html[data-theme="dark"] .btn-light, html[data-theme="dark"] .btn-secondary { background: var(--card-bg); border-color: var(--input-border); color: var(--text-dark); }
html[data-theme="dark"] .btn-light:hover, html[data-theme="dark"] .btn-secondary:hover { background: var(--ifce-light-green); border-color: var(--ifce-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .btn-outline-primary { background: transparent; border-color: var(--ifce-green); color: var(--ifce-green); }
html[data-theme="dark"] .btn-outline-primary:hover { background: var(--ifce-green); color: #fff; }
html[data-theme="dark"] .btn-outline-danger { background: transparent; border-color: var(--err-fg); color: var(--err-fg); }
html[data-theme="dark"] .btn-outline-danger:hover { background: var(--err-fg); color: #fff; }

/* Alertas no tema escuro com contraste acessivel */
html[data-theme="dark"] .alert-success { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid rgba(34, 197, 94, 0.35); }
html[data-theme="dark"] .alert-success strong, html[data-theme="dark"] .alert-success b { color: #f8fafc; }
html[data-theme="dark"] .alert-danger { background: var(--err-bg); color: var(--err-fg); border: 1px solid rgba(239, 68, 68, 0.35); }
html[data-theme="dark"] .alert-danger strong, html[data-theme="dark"] .alert-danger b { color: #f8fafc; }
html[data-theme="dark"] .alert-warning { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid rgba(245, 158, 11, 0.35); }
html[data-theme="dark"] .alert-warning strong, html[data-theme="dark"] .alert-warning b { color: #f8fafc; }
html[data-theme="dark"] .alert-info { background: var(--info-bg); color: var(--info-fg); border: 1px solid rgba(14, 165, 233, 0.35); }
html[data-theme="dark"] .alert-info strong, html[data-theme="dark"] .alert-info b { color: #ffffff; }
html[data-theme="dark"] .alert-info .alert-icone { color: #38bdf8; }

/* Chamada da pagina inicial no tema escuro */
html[data-theme="dark"] .chamada {
    background: linear-gradient(135deg, #132e1b 0%, #0c1f12 100%);
    border: 1px solid rgba(56, 178, 89, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: #f8fafc;
}
html[data-theme="dark"] .chamada h2 {
    color: #f8fafc;
}
html[data-theme="dark"] .chamada .btn {
    background: #22c55e;
    color: #051a0c;
    font-weight: 700;
    border: 1px solid #4ade80;
}
html[data-theme="dark"] .chamada .btn:hover {
    background: #4ade80;
    color: #020c05;
}

html[data-theme="dark"] .passo { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .painel-form { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .site-rodape { background: #070e17; border-top: 1px solid #1a2538; color: #94a3b8; }
html[data-theme="dark"] .site-rodape .rodape-logo { background: rgba(255, 255, 255, 0.92); }
html[data-theme="dark"] .site-rodape h2 { color: #f8fafc; }
html[data-theme="dark"] .site-rodape p { color: #94a3b8; }
html[data-theme="dark"] .site-rodape a { color: #cbd5e1; }
html[data-theme="dark"] .site-rodape a:hover { color: #38b259; }
html[data-theme="dark"] .site-rodape a i { color: #38b259; }
html[data-theme="dark"] .site-rodape .direitos { border-top-color: #1e293b; color: #64748b; }
html[data-theme="dark"] .site-rodape .direitos a { color: #94a3b8; }
html[data-theme="dark"] .site-rodape .direitos a:hover { color: #38b259; }
html[data-theme="dark"] .novidade { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .dia-card { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .horarios-chips label { background: var(--input-bg); border-color: var(--input-border); color: var(--text-dark); }
html[data-theme="dark"] .horarios-chips input:checked + label { background: var(--ifce-light-green); border-color: var(--ifce-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .horarios-chips input:disabled + label { background: #111827; color: #475569; border-color: #2e384d; }
html[data-theme="dark"] .barra-confirmar { background: var(--header-bg); border-color: var(--border-color); box-shadow: 0 -6px 16px rgba(0,0,0,.4); }

html[data-theme="dark"] .comprovante { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .comprovante-local { background: var(--input-bg); }
html[data-theme="dark"] .priv-card { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .priv-destaque { background: var(--ifce-light-green); color: #86efac; }
html[data-theme="dark"] .priv-badge-lgpd { background: rgba(45, 158, 69, .25); color: #86efac; }
html[data-theme="dark"] .priv-lista dd { color: var(--text-dark); }
html[data-theme="dark"] .estrelas label { background: var(--input-bg); border-color: var(--input-border); color: var(--text-dark); }
html[data-theme="dark"] .estrelas input:checked + label { background: var(--ifce-light-green); border-color: var(--ifce-green); color: var(--ifce-green-dark); }
html[data-theme="dark"] .estrelas-leitura span { color: var(--text-dark); }
html[data-theme="dark"] .depoimento { background: var(--input-bg); color: var(--text-dark); }
html[data-theme="dark"] .caixa-fotos { background: var(--input-bg); border-color: var(--border-color); }
html[data-theme="dark"] .fotos-grade a { background: #27354d; }
html[data-theme="dark"] .depoimento-publico { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .depoimento-publico blockquote { color: var(--text-dark); }
html[data-theme="dark"] .depoimento-publico footer { color: var(--text-dark); }
html[data-theme="dark"] .aba-ano { background: var(--card-bg); border-color: var(--border-color); color: var(--text-dark); }
html[data-theme="dark"] .aba-ano.ativa { background: var(--ifce-green); border-color: var(--ifce-green); color: #fff; }
html[data-theme="dark"] .avaliacao-item { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .paginacao { color: var(--text-dark); }
html[data-theme="dark"] .texto-lgpd { background: var(--input-bg); border-color: var(--border-color); color: var(--text-body); }
html[data-theme="dark"] .btn-google { background: var(--input-bg); border-color: var(--input-border); color: var(--text-dark); }
html[data-theme="dark"] .btn-google:hover { background: #222f46; color: var(--text-dark); border-color: #475569; }

html[data-theme="dark"] .ficha { background: var(--card-bg); box-shadow: -10px 0 30px rgba(0,0,0,.6); }
html[data-theme="dark"] .ficha-topo, html[data-theme="dark"] .ficha-rodape, html[data-theme="dark"] .ficha-nav { border-color: var(--border-color); }
html[data-theme="dark"] .ficha-nav { background: #0f172a; }
html[data-theme="dark"] .ficha-fechar { background: var(--input-bg); border-color: var(--border-color); color: var(--text-dark); }
html[data-theme="dark"] .ficha-fechar:hover { background: var(--ifce-light-green); color: var(--ifce-green-dark); border-color: var(--ifce-green); }
html[data-theme="dark"] .ficha-item dd { color: var(--text-dark); }
html[data-theme="dark"] #fichaPosicao { color: var(--text-dark); }
html[data-theme="dark"] .ficha-grade dd { color: var(--text-dark); }
html[data-theme="dark"] .tratativa-topo { color: var(--text-dark); }

html[data-theme="dark"] .modal-content { background: var(--card-bg); border: 1px solid var(--border-color); }
html[data-theme="dark"] .modal-header, html[data-theme="dark"] .modal-footer { border-color: var(--border-color); }
html[data-theme="dark"] .modal-header .close { color: var(--text-dark); }
html[data-theme="dark"] .modal-header .close:hover { background: var(--ifce-light-green); color: var(--ifce-green); }

html[data-theme="dark"] .calendario-cartao { background: var(--card-bg); border-color: var(--border-color); }
html[data-theme="dark"] .fc-theme-standard th, html[data-theme="dark"] .fc-theme-standard td, html[data-theme="dark"] .fc-theme-standard .fc-scrollgrid { border-color: var(--border-color) !important; }
html[data-theme="dark"] .fc-col-header-cell { background: var(--input-bg) !important; }
html[data-theme="dark"] .fc-list-day-cushion { background: var(--input-bg) !important; }
html[data-theme="dark"] .fc-list-event td { background: transparent; border-color: var(--border-color); }
html[data-theme="dark"] .fc-list-event:hover td { background: var(--ifce-light-green) !important; }
html[data-theme="dark"] .fc-daygrid-day.fc-day-today { background: rgba(56,178,89,.1) !important; }
html[data-theme="dark"] .fc-daygrid-day-number { color: var(--text-dark); }
html[data-theme="dark"] .fc-day-other { background: rgba(0,0,0,0.18); }

@media print { .site-topo, .site-rodape, .adm-topo, .adm-nav, .print-hide, .barra-busca, .kpi-grid, .ficha, .ficha-fundo { display: none !important; } .adm-conteudo { margin: 0; padding: 0; } .lista-cartoes { display: none !important; } .tabela-lista-wrap { display: block !important; } @page { size: landscape; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }


/* Agendador de visita: calendario mensal proprio + horarios em botoes grandes */
.ag { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ag { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; } }
.ag-cabecalho { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.ag-mes { font-size: 1.35rem; font-weight: 700; color: var(--text-dark); text-transform: capitalize; text-align: center; }
.ag-mes small { font-size: .95rem; color: var(--text-light); font-weight: 600; }
.ag-nav { min-height: 44px; padding: 0 .9rem; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--ifce-green); border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; transition: background .15s, border-color .15s; }
.ag-nav:hover:not(:disabled) { background: var(--ifce-light-green); border-color: var(--ifce-green); }
.ag-nav:disabled { opacity: .4; cursor: default; }
.ag-nav:focus-visible, .ag-dia:focus-visible, .ag-hora:focus-visible, .ag-chip:focus-visible { outline: 3px solid var(--ifce-green); outline-offset: 2px; }
.ag-semana, .ag-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ag-semana span { text-align: center; font-size: .78rem; font-weight: 700; color: var(--text-light); padding-bottom: .35rem; }
.ag-dia { aspect-ratio: 1 / 1; min-height: 40px; min-width: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 600; border: 2px solid transparent; background: transparent; padding: 0; position: relative; }
.ag-dia.off { color: var(--text-light); opacity: .45; font-weight: 500; }
.ag-dia.livre { background: #bfe8c9; border-color: #2d9e45; color: #0b3d14; font-weight: 700; cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s; }
.ag-dia.livre:hover { border-color: var(--ifce-green); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(21,94,33,.18); }
.ag-dia.sel, .ag-dia.sel:hover { background: var(--ifce-green); color: #fff; border-color: var(--ifce-green); box-shadow: 0 6px 14px rgba(21,94,33,.32); }
.ag-dia.hoje:not(.sel)::after { content: ""; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--ifce-red); }
.ag-legenda { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1rem; font-size: .85rem; color: var(--text-light); }
.ag-bola { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: .3rem; }
.ag-bola.livre { background: #bfe8c9; border: 2px solid #2d9e45; }
.ag-bola.off { background: var(--border-color); }
.ag-painel { background: var(--body-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.25rem; align-self: start; }
.ag-rotulo { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ifce-green); }
.ag-titulo-dia { font-size: 1.35rem; margin: .25rem 0 .35rem; }
.ag-ajuda { color: var(--text-light); margin-bottom: 1rem; }
.ag-horarios { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.ag-hora { min-height: 56px; border-radius: 14px; border: 2px solid var(--ifce-green); background: var(--card-bg); color: var(--ifce-green); font-size: 1.2rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; transition: background .15s, color .15s, transform .12s; }
.ag-hora:hover { background: var(--ifce-green); color: #fff; transform: translateY(-1px); }
.ag-proximas { border-top: 1px solid var(--border-color); padding-top: 1rem; margin-top: .25rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.ag-chip { min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-dark); font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.ag-chip:hover { border-color: var(--ifce-green); background: var(--ifce-light-green); }
.ag-nav-vazio { min-width: 44px; }
.ag-nav span { text-transform: capitalize; }
html[data-theme="dark"] .ag-dia.livre { background: rgba(56,178,89,.35); border-color: #4ade80; color: #ecfdf5; }
html[data-theme="dark"] .ag-bola.livre { background: rgba(56,178,89,.35); border-color: #4ade80; }
.ag-dia.livre:hover { background: #a3dcb1; }
html[data-theme="dark"] .ag-dia.livre:hover { background: rgba(56,178,89,.5); }
.ag-dia.sel, .ag-dia.sel:hover { background: var(--ifce-green); color: #fff; border-color: var(--ifce-green-dark); }
html[data-theme="dark"] .ag-dia.livre.sel, html[data-theme="dark"] .ag-dia.livre.sel:hover { background: #38b259; border-color: #bbf7d0; color: #06210d; }
.ag > * { min-width: 0; }
@media (max-width: 575px) {
    .calendario-cartao { padding: .75rem; }
    .ag-semana, .ag-dias { gap: 4px; }
    .ag-cabecalho { flex-wrap: wrap; gap: .6rem; }
    .ag-mes { order: -1; flex: 0 0 100%; }
    .ag-nav { flex: 1 1 0; justify-content: center; min-height: 48px; }
    .ag-nav-vazio { display: none; }
}

/* Painel de indicadores (/administrativo/indicadores). Cores das series validadas (CVD e contraste). */
.viz-root { --viz-c1: #2a78d6; --viz-c2: #eb6834; --viz-c3: #1baf7a; --viz-barra: var(--ifce-green); --viz-trilho: var(--border-color); }
html[data-theme="dark"] .viz-root { --viz-c1: #3987e5; --viz-c2: #d95926; --viz-c3: #199e70; --viz-barra: #38b259; }
.viz-barra-topo { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.viz-acoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.viz-periodo { color: var(--text-light); margin-bottom: 1rem; }
.viz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.viz-kpi { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1rem; display: flex; flex-direction: column; }
.viz-kpi-n { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--text-dark); font-variant-numeric: tabular-nums; }
.viz-kpi-r { font-weight: 600; color: var(--text-body); }
.viz-kpi small { color: var(--text-light); margin-top: .2rem; }
.viz-leituras { background: var(--ifce-light-green); border: 1px solid var(--border-color); border-left: 4px solid var(--ifce-green); border-radius: var(--card-radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.viz-leituras h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.viz-leituras ul { padding-left: 1.1rem; margin-bottom: .5rem; }
.viz-leituras li { margin-bottom: .4rem; color: var(--text-body); }
.viz-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.viz-cartao { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; min-width: 0; }
.viz-largo { grid-column: 1 / -1; }
.viz-cartao h2 { font-size: 1.05rem; margin: 0 0 .15rem; }
.viz-sub { color: var(--text-light); font-size: .88rem; margin-bottom: .9rem; }
.viz-nota { color: var(--text-light); font-size: .82rem; margin-top: .6rem; }
.viz-barras, .viz-uso, .viz-empilhadas { list-style: none; padding: 0; margin: 0; }
.viz-barras li, .viz-uso li, .viz-empilhadas li { display: grid; grid-template-columns: minmax(96px, 30%) 1fr auto; align-items: center; gap: .6rem; padding: .28rem 0; }
.viz-rot { color: var(--text-body); font-size: .9rem; overflow-wrap: anywhere; }
.viz-val { font-weight: 700; color: var(--text-dark); font-variant-numeric: tabular-nums; text-align: right; min-width: 3ch; }
.viz-val small { color: var(--text-light); font-weight: 500; }
.viz-trilho { background: var(--viz-trilho); border-radius: 4px; height: 12px; display: block; overflow: hidden; }
.viz-barra { display: block; height: 100%; background: var(--viz-barra); border-radius: 0 4px 4px 0; min-width: 2px; }
.viz-pilha { display: flex; gap: 2px; height: 26px; }
.viz-pilha span { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; font-weight: 700; min-width: 24px; border-radius: 4px; }
.viz-c1 { background: var(--viz-c1); } .viz-c2 { background: var(--viz-c2); } .viz-c3 { background: var(--viz-c3); }
.viz-pilha .viz-c3 { color: #06281c; }
.viz-legenda { list-style: none; display: flex; gap: 1.1rem; flex-wrap: wrap; padding: 0; margin: 0 0 .7rem; font-size: .88rem; color: var(--text-body); }
.viz-legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.viz-tabela { margin-top: .8rem; font-size: .88rem; }
.viz-tabela summary { cursor: pointer; color: var(--ifce-green); font-weight: 600; min-height: 32px; }
.viz-qualidade ul { padding-left: 1.1rem; margin: 0; }
.viz-qualidade li { margin-bottom: .45rem; color: var(--text-body); }
@media (max-width: 575px) { .viz-barras li, .viz-uso li, .viz-empilhadas li { grid-template-columns: minmax(80px, 34%) 1fr auto; gap: .4rem; } .viz-kpi-n { font-size: 1.7rem; } }
@media print {
    .viz-tabela { display: none; }
    .viz-cartao, .viz-kpi, .viz-leituras { box-shadow: none; break-inside: avoid; }
    .viz-grade { grid-template-columns: 1fr 1fr; }
    .viz-pilha span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .viz-barra, .viz-trilho { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Sugestão de escola no formulário de agendamento */
.escola-combo { position: relative; }
.escola-sugestoes { position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .25rem; list-style: none; background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.18); max-height: 260px; overflow-y: auto; }
.escola-sugestoes li { padding: .55rem .7rem; min-height: 44px; border-radius: 8px; cursor: pointer; color: var(--text-dark); display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .5rem; }
.escola-sugestoes li small { color: var(--text-light); }
.escola-sugestoes li:hover, .escola-sugestoes li.ativo { background: var(--ifce-light-green); }
.viz-mini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1.1rem; }
.viz-mini-kpis div { border: 1px solid var(--border-color); border-radius: 10px; padding: .6rem .8rem; display: flex; flex-direction: column; }
.viz-mini-kpis strong { font-size: 1.6rem; line-height: 1.1; color: var(--text-dark); font-variant-numeric: tabular-nums; }
.viz-mini-kpis span { color: var(--text-light); font-size: .85rem; }
.viz-subtitulo { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--text-dark); }
.viz-escolas th { white-space: nowrap; font-size: .82rem; color: var(--text-light); }
.viz-escolas td { vertical-align: middle; }
.viz-lista-simples { padding-left: 1.1rem; margin: 0; }
.viz-lista-simples li { margin-bottom: .3rem; color: var(--text-body); }
@media print { .viz-escolas { font-size: .8rem; } }
.viz-quatro { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.viz-pergunta { border: 1px solid var(--border-color); border-radius: 12px; padding: .9rem 1rem; background: var(--card-bg); min-width: 0; }
.viz-pergunta h3 { font-size: .95rem; margin: 0 0 .5rem; color: var(--ifce-green); }
.viz-resposta { font-size: 1rem; margin-bottom: .6rem; color: var(--text-dark); }
.viz-pergunta small { color: var(--text-light); }
