/* ═══════════════════════════════════════════════
   EEB 25 DE MAIO — Design System
   Paleta verde | style.css global
   ═══════════════════════════════════════════════

   Variáveis de cor
   --verde-escuro : #1b4332
   --verde        : #2d6a4f
   --verde-medio  : #40916c
   --verde-claro  : #52b788
   --verde-bg     : #f0f7f2
   --verde-light  : #d8f3dc
   --verde-borda  : #b7e4c7
   --verde-hover  : #edf7f0
*/

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

/* ── Base ── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    color: #1a2e1e;
    background: #f0f7f2;
}


/* ════════════════════════════════════════════
   LOGIN PAGE   (body.login-page)
   ════════════════════════════════════════════ */

body.login-page {
    background: linear-gradient(135deg, #2d6a4f 0%, #74c69d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

.logo {
    width: 150px;
    height: 150px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

h1 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 0.4rem;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.8rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; }

.alert-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* Form */
.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.forgot-link {
    font-weight: 400;
    color: #2d6a4f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.forgot-link:hover { color: #1b4332; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
    flex-shrink: 0;
}

.input-wrapper input {
    width: 100%;
    padding: 0.7rem 2.8rem;
    border: 1.5px solid #b7e4c7;
    border-radius: 8px;
    font-size: 1rem;
    color: #1b4332;
    background: #f9fafb;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.input-wrapper input::placeholder { color: #d1d5db; }

.input-wrapper input:focus {
    border-color: #40916c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.15);
}

.input-wrapper input.input-error {
    border-color: #ef4444;
    background: #fef2f2;
}

.input-wrapper input.input-error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.toggle-password {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-password:hover { color: #2d6a4f; }
.toggle-password svg { width: 18px; height: 18px; }

/* Checkbox */
.remember { margin-bottom: 1.4rem; }

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 400 !important;
    color: #6b7280;
    user-select: none;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid #b7e4c7;
    border-radius: 4px;
    background: #f9fafb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.checkbox-label input:checked + .checkmark {
    background: #2d6a4f;
    border-color: #2d6a4f;
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #ffffff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

/* Botão */
.btn-login {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #2d6a4f, #52b788);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(45, 106, 79, 0.35);
    margin-bottom: 1.4rem;
}

.btn-login:hover {
    opacity: 0.92;
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.45);
}

.btn-login:active { transform: scale(0.98); }

.register-link {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
}

.register-link a {
    color: #2d6a4f;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.register-link a:hover { color: #1b4332; }

@media (max-width: 480px) {
    .login-card { padding: 1.5rem 1.2rem; }
    .logo { width: 90px; height: 90px; margin-bottom: .8rem; }
}


/* ════════════════════════════════════════════
   LAYOUT COMPARTILHADO (horário + chamada)
   ════════════════════════════════════════════ */

body.horario-page,
body.chamada-page {
    padding: 1.5rem;
}

.page {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Cabeçalho verde compartilhado */
.topo,
.diario-header {
    background: linear-gradient(135deg, #2d6a4f, #52b788);
    border-radius: 14px;
    padding: 1.3rem 1.8rem;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #fff;
}

.topo {
    border-radius: 14px 14px 0 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Nomes e subtítulos no cabeçalho */
.escola,
.escola-nome {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.subtitulo,
.escola-sub {
    display: block;
    font-size: 0.8rem;
    opacity: 0.78;
    margin-top: 3px;
}

/* Select do horário */
.topo-select {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
}

.topo-select label { opacity: 0.85; white-space: nowrap; }

.topo-select select {
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    background: rgba(255,255,255,0.18);
    color: #fff;
    cursor: pointer;
    outline: none;
    min-width: 240px;
}

.topo-select select option { background: #1b4332; color: #fff; }

/* Meta do diário */
.header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

.meta-item span { opacity: 0.7; margin-right: 2px; }

/* Legenda do diário */
.header-legenda {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
}

.leg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dica { font-size: 0.72rem; opacity: 0.6; margin-top: 4px; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-p  { background: #d8f3dc; color: #1b4332; }
.badge-f  { background: #fecaca; color: #b91c1c; }
.badge-fj { background: #fed7aa; color: #c2410c; }

/* Card branco (horário) */
.card {
    background: #fff;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 1.5rem 1.8rem;
}

/* Info do professor */
.prof-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1.5px solid #d8f3dc;
    flex-wrap: wrap;
}

.prof-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2d6a4f, #52b788);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prof-nome { font-weight: 700; font-size: 1.05rem; color: #1b4332; }

.prof-disc { font-size: 0.85rem; color: #40916c; margin-top: 2px; }

.prof-resumo {
    margin-left: auto;
    background: #d8f3dc;
    color: #1b4332;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Wrapper da tabela */
.tabela-wrapper { overflow-x: auto; }

/* Card wrapper da chamada */
body.chamada-page .tabela-wrapper {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}


/* ════════════════════════════════════════════
   HORÁRIO DO PROFESSOR   (.grade)
   ════════════════════════════════════════════ */

body.horario-page .page { max-width: 960px; }

.grade {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.grade th {
    background: #f0f7f2;
    color: #2d6a4f;
    font-weight: 700;
    padding: 0.65rem 0.5rem;
    text-align: center;
    border-bottom: 2px solid #b7e4c7;
    white-space: nowrap;
}

.th-hora { width: 52px; }

.grade td {
    padding: 0.55rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid #edf7f0;
    transition: background 0.15s;
}

.td-hora {
    font-weight: 700;
    color: #9ca3af;
    font-size: 0.8rem;
    background: #fafafa;
}

/* Intervalo */
.linha-intervalo td {
    background: #f0f7f2;
    color: #74c69d;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.3rem;
    border-top: 1.5px dashed #b7e4c7;
    border-bottom: 1.5px dashed #b7e4c7;
}

/* Células livres */
.livre { color: #e5e7eb; font-size: 0.8rem; }

/* Células com aula */
.aula {
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.82rem;
}

.turma-label {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
}

/* Cores por turma — mantidas distintas para leitura rápida */
.ano6   { background: #eff6ff; }
.ano6   .turma-label { background: #dbeafe; color: #1d4ed8; }

.ano7   { background: #f0fdf4; }
.ano7   .turma-label { background: #dcfce7; color: #15803d; }

.ano8   { background: #fff7ed; }
.ano8   .turma-label { background: #fed7aa; color: #c2410c; }

.ano9   { background: #fdf4ff; }
.ano9   .turma-label { background: #f3e8ff; color: #7e22ce; }

.ano1em { background: #fefce8; }
.ano1em .turma-label { background: #fef08a; color: #a16207; }

.ano2em { background: #fff1f2; }
.ano2em .turma-label { background: #fecdd3; color: #be123c; }

.ano3em { background: #f0fdfa; }
.ano3em .turma-label { background: #ccfbf1; color: #0f766e; }

/* Legenda de turmas */
.legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1.5px solid #d8f3dc;
}

.leg-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.leg-cor {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.leg-cor.ano6   { background: #dbeafe; }
.leg-cor.ano7   { background: #dcfce7; }
.leg-cor.ano8   { background: #fed7aa; }
.leg-cor.ano9   { background: #f3e8ff; }
.leg-cor.ano1em { background: #fef08a; }
.leg-cor.ano2em { background: #fecdd3; }
.leg-cor.ano3em { background: #ccfbf1; }
.leg-cor.livre  { background: #f3f4f6; border: 1px solid #e5e7eb; }

@media (max-width: 600px) {
    body.horario-page { padding: 0.75rem; }
    .topo  { padding: 1rem; }
    .card  { padding: 1rem; }
    .topo-select select { min-width: 180px; }
    .prof-resumo { margin-left: 0; }
}


/* ════════════════════════════════════════════
   CHAMADA / DIÁRIO   (.chamada)
   ════════════════════════════════════════════ */

body.chamada-page .page { max-width: 1100px; }

/* Tabela de chamada */
.chamada {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-size: 0.73rem;
}

.chamada thead th {
    background: #f0f7f2;
    color: #2d6a4f;
    font-weight: 700;
    padding: 0.55rem 0.5rem;
    text-align: center;
    border-bottom: 2px solid #b7e4c7;
    white-space: nowrap;
}

.th-num    { width: 36px; }
.th-nome   { text-align: left !important; padding-left: 1rem !important; min-width: 190px; }
.th-data   { min-width: 48px; }
.th-diasem { font-size: 0.7rem; font-weight: 500; color: #52b788; background: #f8fcf9; }
.th-total  { background: #fefce8; color: #92400e; min-width: 38px; }

.chamada tbody tr { transition: background 0.12s; }
.chamada tbody tr:hover { background: #f6fbf7; }
.chamada tbody tr:last-child td { border-bottom: none; }

.td-num {
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
    border-bottom: 1px solid #edf7f0;
    padding: 0.45rem 0.3rem;
}

.td-nome {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: 0.45rem 0.5rem 0.45rem 1rem;
    font-weight: 500;
    font-size: 0.73rem;
    border-bottom: 1px solid #edf7f0;
    color: #1b4332;
}
.td-nome .nome-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Células de chamada */
.td-celula {
    text-align: center;
    border-bottom: 1px solid #edf7f0;
    border-left: 1px solid #edf7f0;
    cursor: pointer;
    padding: 0.3rem 0.2rem;
    font-weight: 700;
    font-size: 0.8rem;
    user-select: none;
    transition: transform 0.08s, box-shadow 0.08s;
}

.td-celula:hover {
    transform: scale(1.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 1;
    position: relative;
    border-radius: 4px;
}

.td-celula:active { transform: scale(1.05); }

/* Estados das células */
.estado-p  { color: #1b4332; background: #d8f3dc; }
.estado-f  { color: #b91c1c; background: #fef2f2; }
.estado-fj { color: #c2410c; background: #fff7ed; }

/* Totais por aluno */
.td-soma {
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    border-bottom: 1px solid #edf7f0;
    border-left: 2px solid #b7e4c7;
    padding: 0.3rem;
}

.td-soma-f  { color: #b91c1c; background: #fef9f9; }
.td-soma-fj { color: #c2410c; background: #fffaf5; }

/* Rodapé totais por data */
.chamada tfoot td {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.3rem;
    border-top: 2px solid #b7e4c7;
}

.tr-tfoot-f  td { background: #fef2f2; color: #b91c1c; }
.tr-tfoot-fj td { background: #fff7ed; color: #c2410c; }

.tfoot-label {
    text-align: right !important;
    padding-right: 0.6rem !important;
    font-size: 0.7rem;
    color: #9ca3af !important;
    background: #f9fafb !important;
}

.tfoot-val { min-width: 40px; }

/* Resumo de frequência */
.resumo-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    padding: 1.4rem 1.8rem;
    overflow-x: auto;
}

.resumo-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1.5px solid #d8f3dc;
}

.resumo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

.resumo-table th {
    background: #f0f7f2;
    color: #2d6a4f;
    font-weight: 700;
    padding: 0.55rem 0.6rem;
    text-align: center;
    border-bottom: 2px solid #b7e4c7;
    white-space: nowrap;
}

.resumo-table th:nth-child(2) { text-align: left; }

.resumo-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #edf7f0;
    text-align: center;
    color: #374151;
}

.resumo-table tbody tr:hover { background: #f6fbf7; }

.r-num  { color: #9ca3af; font-size: 0.75rem; }
.r-nome { text-align: left; font-weight: 500; white-space: nowrap; }
.r-pres { color: #1b4332; font-weight: 600; }
.r-f    { color: #b91c1c; font-weight: 600; }
.r-fj   { color: #c2410c; font-weight: 600; }
.r-freq { font-weight: 700; }

.sit {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.sit-ok    { background: #d8f3dc; color: #1b4332; }
.sit-risco { background: #fecaca; color: #b91c1c; }

/* Filtro de período do resumo de frequência */
.resumo-filtro {
    display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
    margin-bottom: .85rem; padding: .45rem .75rem;
    background: #f5f9f6; border-radius: 8px; border: 1px solid #d8f3dc;
}
.rf-label { font-size: .78rem; font-weight: 700; color: #2d6a4f; white-space: nowrap; }
.rf-sep   { font-size: .75rem; color: #9ca3af; }
.rf-date {
    padding: .26rem .5rem; border: 1.5px solid #b7e4c7; border-radius: 6px;
    font-size: .78rem; color: #1b4332; outline: none; background: #fff;
}
.rf-date:focus { border-color: #40916c; background: #f0fdf4; }
.rf-btn-reset {
    padding: .22rem .65rem; border: 1.5px solid #d1d5db; border-radius: 6px;
    font-size: .74rem; color: #6b7280; background: #fff; cursor: pointer; margin-left: .2rem;
}
.rf-btn-reset:hover { border-color: #9ca3af; color: #374151; }

/* ── Colunas fixas: #, Matrícula e Aluno(a) ── */
/* # oculto em todos os tamanhos de tela */
.th-num, .td-num, .th-vd-num, .tfl-n { display: none !important; }

.th-mat, .td-mat { width: 90px !important; min-width: 90px !important; max-width: 90px !important; }
.th-nome, .td-nome { width: 270px !important; min-width: 270px !important; max-width: 270px !important; }

/* mat: agora começa em left:0 (sem # antes) */
.th-mat  { position: sticky; left: 0; z-index: 3; background: #f0f7f2; }
.th-nome { position: sticky; left: 0; z-index: 3; background: #f0f7f2;
           box-shadow: 3px 0 6px rgba(0,0,0,.06); overflow: visible; }
.th-mat ~ .th-nome { left: 90px; }
.th-vd-mat  { position: sticky; left: 0;   z-index: 3; }
.th-vd-nome { position: sticky; left: 90px; z-index: 3; box-shadow: 3px 0 6px rgba(0,0,0,.06); }
.td-mat  { position: sticky; left: 0; z-index: 2; background: #fff;
           font-family: monospace; font-size: 0.72rem; color: #6b7280;
           padding: 0.45rem 0.4rem; border-bottom: 1px solid #edf7f0; white-space: nowrap; }
.td-nome { position: sticky; left: 0; z-index: 2; background: #fff;
           box-shadow: 3px 0 6px rgba(0,0,0,.06); overflow: visible; }
.td-mat ~ .td-nome { left: 90px; }
.chamada tbody tr:hover .td-mat,
.chamada tbody tr:hover .td-nome { background: #f6fbf7; }
.tfl-m  { position: sticky; left: 0;   z-index: 2; }
.tfl-nm { position: sticky; left: 90px; z-index: 2; box-shadow: 3px 0 6px rgba(0,0,0,.06); }

@media (max-width: 640px) {
    body.chamada-page { padding: .4rem; }

    /* Header empilha verticalmente */
    .diario-header {
        flex-direction: column;
        padding: .75rem 1rem;
        gap: .5rem;
        border-radius: 10px;
    }
    .escola-nome { font-size: .92rem; }
    .escola-sub  { font-size: .7rem; }

    /* Esconde meta (turma/turno já aparece no select) e legenda */
    .header-meta, .header-legenda { display: none !important; }

    /* Nav: select em linha própria, links menores */
    body.chamada-page .topo-links {
        flex-wrap: wrap !important;
        flex-shrink: 1 !important;
        width: 100%;
        gap: .35rem;
    }
    body.chamada-page .topo-links select {
        flex-basis: 100%;
        width: 100%;
        min-width: 0;
        font-size: .78rem;
    }
    body.chamada-page .topo-links a,
    body.chamada-page .topo-links span {
        font-size: .7rem;
        padding: .25rem .5rem;
    }

    /* Abas de mês */
    .mes-bar { padding: .4rem .5rem; gap: .2rem; }
    .mes-btn { padding: .25rem .5rem; font-size: .72rem; }

    /* Tabela mobile: oculta matrícula */
    .th-mat, .td-mat, .th-vd-mat, .tfl-m { display: none !important; }

    /* Nome sticky em left:0 (sem # nem mat no mobile) */
    .th-mat ~ .th-nome,
    .td-mat ~ .td-nome { left: 0 !important; }
    .th-vd-nome         { left: 0 !important; }
    .tfl-nm             { left: 0 !important; }

    /* Células: área de toque confortável */
    .td-celula {
        padding: .52rem .12rem;
        font-size: .8rem;
        min-width: 36px;
    }
    .th-data   { min-width: 36px; font-size: .62rem; padding: .4rem .1rem; }
    .th-diasem { font-size: .58rem; padding: .25rem .1rem; }

    .nf-badge, .badge-alert { font-size: .55rem; padding: .04rem .2rem; }

    /* Resumo compacto */
    .resumo-card { padding: .75rem .6rem; }
    .resumo-table { font-size: .72rem; }
    .resumo-table th:nth-child(3),
    .resumo-table td:nth-child(3),
    .resumo-table th:nth-child(4),
    .resumo-table td:nth-child(4) { display: none; }
}


/* ════════════════════════════════════════════
   HOME / BOAS-VINDAS   (body.home-page)
   ════════════════════════════════════════════ */

body.home-page {
    background: #f0f7f2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.home-nav {
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.home-nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.home-nav-logo {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-nav-logo svg { width: 18px; height: 18px; color: #fff; }

.home-nav-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.home-nav-sub {
    display: block;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.6);
}

.home-nav-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.home-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-nav-info { display: flex; flex-direction: column; }
.home-nav-nome  { font-size: 0.82rem; font-weight: 600; color: #fff; line-height: 1.2; }
.home-nav-email { font-size: 0.68rem; color: rgba(255,255,255,0.55); }

.home-btn-sair {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.8rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 7px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.home-btn-sair:hover { background: rgba(255,255,255,0.22); }
.home-btn-sair svg { width: 14px; height: 14px; }

/* Main */
.home-main {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 1.8rem 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

/* Banner de boas-vindas */
.home-welcome {
    background: linear-gradient(135deg, #2d6a4f, #52b788);
    border-radius: 14px;
    padding: 1.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 6px 20px rgba(45,106,79,0.22);
    animation: slideUp 0.4s ease;
}

.home-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem;
    line-height: 1.2;
}

.home-sub {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.home-welcome-badge {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Cards de navegação */
.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.home-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.3rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1.5px solid #e8f5ec;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    animation: slideUp 0.4s ease both;
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45,106,79,0.13);
    border-color: #b7e4c7;
}

.home-card:active { transform: translateY(0); }
.home-card:nth-child(2) { animation-delay: 0.07s; }

.home-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-card-icon svg { width: 22px; height: 22px; }
.home-card-icon--blue  { background: #eff6ff; color: #1d4ed8; }
.home-card-icon--green { background: #f0fdf4; color: #15803d; }

.home-card-body { flex: 1; }

.home-card-body h2 {
    font-size: 0.97rem;
    font-weight: 700;
    color: #1b4332;
    margin: 0 0 0.2rem;
}

.home-card-body p {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

.home-card-arrow {
    color: #b7e4c7;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.2s;
}

.home-card-arrow svg { width: 18px; height: 18px; }
.home-card:hover .home-card-arrow { color: #2d6a4f; transform: translateX(3px); }

/* Rodapé */
.home-footer {
    text-align: center;
    font-size: 0.78rem;
    color: #9ca3af;
}

.home-footer strong { color: #52b788; }

@media (max-width: 600px) {
    .home-nav-inner       { padding: 0 1rem; height: 54px; }
    .home-nav-info        { display: none; }
    .home-main            { padding: 1rem 1rem 2rem; }
    .home-welcome         { padding: 1.2rem; }
    .home-title           { font-size: 1.25rem; }
    .home-welcome-badge   { width: 44px; height: 44px; font-size: 1rem; }
}
