* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px;
}

.topbar {
    background: #1a73e8;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar .logo a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.topbar nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 12px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.topbar nav a:hover { opacity: 1; }

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

h1 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #444;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.centro { text-align: center; }

.subtitulo {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.alerta {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.erro { background: #fde8e8; color: #c53030; }

.dica {
    font-size: 0.8rem;
    color: #888;
    margin-top: 12px;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 4px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

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

select {
    background: #fff;
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    margin-top: 8px;
}

.btn:hover { background: #1557b0; }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

.btn-block { display: block; width: 100%; }

.btn-link {
    display: block;
    background: #e8f0fe;
    color: #1a73e8;
    margin: 4px 0;
    padding: 10px;
    text-decoration: none;
}

.btn-warning { background: #e8a317; }
.btn-warning:hover { background: #d4950f; }

.card-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aluno-card {
    text-decoration: none;
    color: #333;
    border-left: 4px solid #1a73e8;
    transition: box-shadow 0.2s;
}

.aluno-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

.aluno-nome { font-weight: 700; font-size: 1.05rem; }

.aluno-info { font-size: 0.85rem; color: #666; margin-top: 2px; }

.nav-voltar {
    margin-bottom: 8px;
}

.nav-voltar a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.95rem;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabela th, .tabela td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tabela th { font-weight: 600; color: #555; }

.form-inline {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.form-inline label {
    margin: 0;
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.form-carga {
    display: flex;
    gap: 4px;
    align-items: center;
}

.input-carga {
    width: 80px;
    padding: 4px 8px;
    font-size: 0.85rem;
}

.lista {
    list-style: none;
}

.lista li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.resumo {
    flex-direction: row;
    gap: 12px;
}

.destaque {
    flex: 1;
    text-align: center;
}

.valor {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8a317;
}

.verde { color: #2e7d32; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pago { background: #e8f5e9; color: #2e7d32; }

.pendente { background: #fff3e0; color: #e65100; }

.qr-img {
    width: 180px;
    height: 180px;
    margin: 12px auto;
    display: block;
}

.qr-img-grande {
    width: 250px;
    height: 250px;
    margin: 12px auto;
    display: block;
}

@media (min-width: 768px) {
    .container {
        max-width: 800px;
    }
    .card-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .aluno-card {
        flex: 1 1 250px;
    }
    .resumo {
        flex-direction: row;
    }
    .portal-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .personal-card {
        flex: 1 1 280px;
        max-width: 320px;
    }
}

/* ---- Portal ---- */
.portal-hero {
    text-align: center;
    padding: 32px 0 24px;
}
.portal-hero h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}
.busca-cidade {
    max-width: 400px;
    margin: 16px auto 0;
}
.busca-cidade input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 8px;
}
.busca-cidade input:focus {
    border-color: #1a73e8;
}
.cidades-lista h2 {
    margin-top: 24px;
    font-size: 1rem;
    color: #666;
}
.cidade-card {
    text-decoration: none;
    color: #333;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}
.cidade-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.personal-card {
    text-decoration: none;
    color: #333;
    padding: 16px;
    transition: box-shadow 0.2s;
}
.personal-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.personal-card-topo {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}
.personal-foto {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}
.personal-nome {
    font-size: 1.05rem;
    font-weight: 700;
    display: block;
}
.personal-exp {
    font-size: 0.8rem;
    color: #888;
}
.personal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
}
.tag-especialidade {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.personal-academias {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}
.personal-card-info {
    margin-left: 68px;
}
.perfil-topo {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.perfil-foto {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}
.perfil-topo h1 {
    margin-bottom: 2px;
    font-size: 1.3rem;
}
.perfil-exp {
    font-size: 0.9rem;
    color: #888;
}
.perfil-bio {
    font-size: 0.9rem;
    color: #555;
    margin-top: 6px;
    line-height: 1.5;
}
.form-consulta {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

/* --- Novos estilos: avaliacao, termo, viagem --- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
table th, table td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
table th { font-weight: 600; color: #555; }

.positivo { color: #2e7d32; }
.negativo { color: #c53030; }

.termo-pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
    background: #fafafa;
    padding: 12px;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.status-ok {
    color: #2e7d32;
    font-weight: 700;
    font-size: 1.1rem;
}
.status-pendente {
    color: #e65100;
    font-weight: 700;
    font-size: 1.1rem;
}

.viagem-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.viagem-item pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.85rem;
    background: #fafafa;
    padding: 8px;
    border-radius: 6px;
    margin-top: 4px;
}

.small { font-size: 0.8rem; color: #888; }

/* --- Share / Indicacao --- */
.btn-share {
    background: #34a853;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-block;
    margin-bottom: 12px;
}
.btn-share:hover { background: #2d8f47; }

.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}
.modal h3 { margin-bottom: 12px; }
.share-texto {
    width: 100%;
    font-size: 0.85rem;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    margin-bottom: 8px;
}
.share-link-input {
    width: 100%;
    font-size: 0.8rem;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
}
.share-botoes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.share-botoes .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.8rem;
    padding: 8px 6px;
    margin: 0;
}
.btn-whats { background: #25d366; }
.btn-whats:hover { background: #1da851; }
.btn-telegram { background: #0088cc; }
.btn-telegram:hover { background: #006699; }
.btn-facebook { background: #1877f2; }
.btn-facebook:hover { background: #125ac7; }
.btn-email { background: #ea4335; }
.btn-email:hover { background: #c62828; }
.btn-copy { background: #555; }
.btn-copy:hover { background: #333; }
.share-msg { font-size: 0.8rem; color: #34a853; margin-top: 8px; }

/* --- Midia / Galeria / Moderacao --- */
.midia-thumb {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
}
.moderacao-item {
    border-left: 4px solid #1a73e8;
}
.moderacao-item .midia-info p {
    margin: 4px 0;
    font-size: 0.9rem;
}
.midia-acoes {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.input-motivo {
    width: auto;
    min-width: 120px;
    padding: 4px 8px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.input-rede {
    padding: 4px 8px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}
.btn-aprovar { background: #2e7d32; }
.btn-aprovar:hover { background: #1b5e20; }
.btn-recusar { background: #c53030; }
.btn-recusar:hover { background: #9b2c2c; }
.btn-publicar { background: #1565c0; }
.btn-publicar:hover { background: #0d47a1; }
.btn-galeria {
    background: #7b1fa2;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
}
.btn-galeria:hover { background: #6a1b9a; }
.tag-pendente { background: #fff3e0; color: #e65100; }
.tag-aprovado { background: #e8f5e9; color: #2e7d32; }
.tag-recusado { background: #fde8e8; color: #c53030; }
.motivo-recusa {
    font-size: 0.8rem;
    color: #c53030;
    background: #fde8e8;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 2px;
}
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0;
}
.checkbox-label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.galeria-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 600px) {
    .galeria-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.galeria-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
}
.galeria-legenda {
    font-size: 0.9rem;
    margin-top: 6px;
    color: #555;
}

/* --- Agenda Lotada / Lista de Espera --- */
.tag-lotada {
    background: #fde8e8;
    color: #c53030;
    font-size: 0.7rem;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 700;
    display: inline-block;
    margin-top: 2px;
}
.tag-lotada-grande {
    font-size: 0.85rem;
    padding: 3px 12px;
    border-radius: 14px;
    margin-top: 6px;
}
.filtro-vagas {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.filtro-vagas .btn {
    margin: 0;
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #c4d8f7;
}
.filtro-vagas .btn-ativo {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* --- Agua / Lembretes / Notificacoes --- */
.agua-hoje {
    text-align: center;
}
.agua-copos {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a73e8;
    margin-bottom: 8px;
}
.agua-barra {
    width: 100%;
    height: 20px;
    background: #e8f0fe;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}
.agua-barra-preenchimento {
    height: 100%;
    background: #1a73e8;
    border-radius: 10px;
    transition: width 0.3s;
}
.btn-large {
    padding: 14px 32px;
    font-size: 1.2rem;
    font-weight: 700;
    width: 100%;
}
.form-agua label,
.form-lembrete label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.form-agua input[type="number"],
.form-agua input[type="time"],
.form-agua select,
.form-lembrete input[type="time"] {
    width: auto;
    max-width: 120px;
}
.form-lembrete input[type="checkbox"] {
    width: 18px;
    height: 18px;
}
.frase-motivacional {
    font-style: italic;
    font-size: 1rem;
    color: #555;
    padding: 8px;
    text-align: center;
    background: #fafafa;
    border-radius: 8px;
}
.notificacao-topo {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}
.notif-item {
    padding: 6px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.notif-item em {
    color: #555;
    font-size: 0.85rem;
}
.btn-notif-fechar {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
    margin-left: auto;
}
.btn-notif-link,
.btn-notif-mapa {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}
.local-details {
    margin-top: 8px;
    font-size: 0.85rem;
}
.local-details summary {
    cursor: pointer;
    color: #1a73e8;
    font-weight: 600;
}
.form-local label {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
}
.card-alerta {
    background: #fff3e0;
    border: 2px solid #e65100;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}
.card-alerta h2 {
    color: #e65100;
}
.card-alerta p {
    color: #bf360c;
}
.btn-success {
    background: #2e7d32;
}
.btn-success:hover { background: #1b5e20; }

.form-local input {
    width: auto;
    flex: 1;
    padding: 6px 8px;
    font-size: 0.85rem;
}