/* =====================================================================
   ESTILO GERAL — Sara Porto Alegre
   ---------------------------------------------------------------------
   Antes esse mesmo CSS estava copiado dentro de 15 arquivos .php.
   Agora está só aqui: mudou a cor aqui, mudou no site inteiro.

   Índice
     1. Base e cores
     2. Menu do site (nav) e menu lateral do perfil
     3. Páginas de conteúdo
     4. Telas de formulário (login, batismo, célula, oração...)
     5. Painel administrativo
     6. Rodapé
     7. Ajustes de celular
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. BASE E CORES                                                     */
/* ------------------------------------------------------------------ */

:root {
    --escuro:      #2e2e2e;
    --escuro-forte:#1a1a1a;
    --fundo:       #f8f9fa;
    --fundo-painel:#f4f7f6;
    --texto:       #333;
    --texto-suave: #777;
    --borda:       #ddd;
    --azul:        #17a2b8;
    --laranja:     #ff9800;
    --verde:       #28a745;
    --vermelho:    #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--fundo);
    color: var(--texto);
    overflow-x: hidden;
}

/* Fundo levemente esverdeado usado nos painéis e listagens */
body.fundo-painel { background-color: var(--fundo-painel); }

img { max-width: 100%; }

/* Contorno visível para quem navega pelo teclado (acessibilidade) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--azul);
    outline-offset: 2px;
}

/* Botões que fazem o papel de link dentro de um formulário */
.form-acao { display: inline; margin: 0; }
.form-acao button { font: inherit; cursor: pointer; border: none; }

/* ------------------------------------------------------------------ */
/* 2. MENU DO SITE E MENU LATERAL DO PERFIL                            */
/* ------------------------------------------------------------------ */

nav.nav-site {
    background: var(--escuro);
    padding: 15px 5%;
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

nav.nav-site a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}
nav.nav-site a:hover { transform: translateY(1px); color: #ccc; }

.nav-links { display: flex; gap: 20px; justify-content: flex-start; }
.nav-logo  { justify-self: center; }
.nav-user  { justify-self: end; }

.menu-hamburger {
    display: none;              /* aparece só no celular */
    cursor: pointer;
    font-size: 24px;
    color: white;
    background: none;
    border: none;
    line-height: 1;
}

.perfil-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.avatar-nav {
    width: 35px; height: 35px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    border: 2px solid white;
}

/* Menu lateral do perfil */
.sidebar {
    position: fixed; top: 0; right: -350px;
    width: 320px; height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);
    z-index: 1000;
    padding: 40px 25px;
    display: flex; flex-direction: column; align-items: center;
}
.sidebar.active { right: 0; }

.overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: none; z-index: 999;
}
.overlay.active { display: block; }

.foto-perfil-grande {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    border: 3px solid var(--escuro);
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.side-btn {
    width: 100%; padding: 12px; margin-bottom: 10px;
    border-radius: 8px; text-decoration: none;
    font-weight: 600; text-align: center;
    transition: 0.3s; display: block; font-size: 13px;
}
.btn-redefinir { background: var(--fundo-painel); color: var(--escuro); border: 1px solid var(--borda); }
.btn-sair      { background: #ff4d4d; color: white; }
.btn-escuro    { background: var(--escuro); color: white; }

/* ------------------------------------------------------------------ */
/* 3. PÁGINAS DE CONTEÚDO                                              */
/* ------------------------------------------------------------------ */

.content-page {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 5px solid var(--escuro);
}
.content-page h1 { color: var(--escuro); margin-bottom: 25px; text-align: center; }

/* ------------------------------------------------------------------ */
/* 4. TELAS DE FORMULÁRIO                                              */
/*    login, primeiro acesso, recuperar senha, batismo, célula,        */
/*    pedido de oração — todas usavam o mesmo cartão branco.           */
/* ------------------------------------------------------------------ */

.tela-form {
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #838383 url('imgs/wallpaper.jpg') no-repeat center center;
    background-image: image-set(url('imgs/wallpaper.webp') type('image/webp'),
                                url('imgs/wallpaper.jpg')  type('image/jpeg'));
    background-size: cover;
}

.login-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 380px;
    text-align: center;
    border-top: 5px solid var(--escuro);
}
.login-card.card-largo { max-width: 450px; }

.login-card h2 {
    color: var(--texto);
    margin-bottom: 10px;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.login-card .subtitle {
    color: var(--texto-suave);
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"],
.login-card input[type="tel"],
.login-card textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    font-size: 16px;
    background-color: #fafafa;
    transition: all 0.3s;
}
.login-card textarea { height: 150px; resize: none; font-family: inherit; }

.login-card input:focus,
.login-card textarea:focus {
    border-color: var(--escuro);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(46,46,46,0.1);
    outline: none;
}

/* Campo do código de 6 dígitos */
.input-codigo {
    font-size: 24px !important;
    text-align: center;
    letter-spacing: 8px;
    font-weight: bold;
    color: var(--escuro);
}
.input-codigo::placeholder { letter-spacing: normal; font-size: 16px; font-weight: normal; }

.login-card button[type="submit"] {
    width: 100%;
    padding: 14px;
    background-color: var(--escuro);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
}
.login-card button[type="submit"]:hover { background-color: var(--escuro-forte); transform: translateY(-1px); }

/* Avisos (erro / sucesso) */
.msg {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}
.msg-erro    { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.msg-sucesso { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.msg-aviso   { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

.links-apoio {
    margin-top: 25px;
    font-size: 14px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
.links-apoio a {
    color: var(--escuro);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-top: 12px;
}
.links-apoio a:hover { text-decoration: underline; }

.link-voltar {
    display: inline-block;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.link-voltar:hover { text-decoration: underline; color: var(--escuro); }

/* Caixa de aceite da LGPD */
.lgpd-box {
    text-align: left;
    margin-bottom: 20px;
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.lgpd-box input { margin-top: 3px; cursor: pointer; }
.lgpd-box label { line-height: 1.4; cursor: pointer; }
.lgpd-box a { color: var(--escuro); font-weight: bold; text-decoration: underline; }

/* Campo invisível anti-robô: pessoa nenhuma enxerga, robô preenche */
.campo-oculto {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* 5. PAINEL ADMINISTRATIVO                                            */
/* ------------------------------------------------------------------ */

nav.nav-admin {
    background: var(--escuro);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 10px;
}
nav.nav-admin .marca { font-weight: bold; letter-spacing: 1px; }
nav.nav-admin a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-left: 20px;
    display: inline-block;
    transition: 0.3s;
    font-size: 14px;
}
nav.nav-admin a:hover { color: #ccc; }
nav.nav-admin a.ativo { color: var(--laranja); }
nav.nav-admin a.sair  { color: #ff4d4d; }

.admin-container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border-top: 5px solid var(--escuro);
}
.card h2, .card h3 { color: var(--escuro); margin-bottom: 20px; }
.card-azul    { border-top-color: var(--azul); }
.card-laranja { border-top-color: var(--laranja); }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.card input, .card select, .card textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
    background: #fff;
}
.card small { color: #666; font-size: 11px; display: block; margin-bottom: 10px; }

.btn-principal {
    background: var(--escuro);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    width: 100%;
}
.btn-principal:hover { background: #454545; }
.btn-laranja { background: var(--laranja); text-transform: uppercase; }
.btn-laranja:hover { background: #e68a00; }

.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; background: white; }
th {
    background: #f8f9fa;
    color: var(--escuro);
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #eee;
}
td { padding: 15px; border-bottom: 1px solid #eee; font-size: 14px; vertical-align: middle; }
tr:hover { background: #fafafa; }

.btn-excluir {
    background: var(--vermelho);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}
.btn-excluir:hover { background: #c82333; }

.btn-salvar-inline {
    background: var(--azul);
    color: white;
    border: none;
    width: auto;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.btn-salvar-inline:hover { background: #138496; }

.alert { padding: 15px; border-radius: 6px; margin-bottom: 20px; font-weight: bold; }
.alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Listas de pedidos (oração, batismo, célula) */
.lista-pedidos {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 90%;
    border-top: 5px solid var(--escuro);
}
.lista-pedidos h2 {
    color: var(--escuro);
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 22px;
    text-transform: uppercase;
}

.pedido-card {
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    background: #fafafa;
    transition: 0.3s;
}
.pedido-card.pendente  { border-left: 5px solid #ffc107; background: #fffdf5; }
.pedido-card.contatado,
.pedido-card.orado     { border-left: 5px solid var(--verde); opacity: 0.7; }
.pedido-card.arquivado { border-left: 5px solid #6c757d; opacity: 0.5; }

.pedido-card .data  { font-size: 12px; color: #888; display: block; margin-bottom: 5px; }
.pedido-card .nome  { font-size: 1.2rem; font-weight: bold; color: var(--escuro); display: block; margin-bottom: 5px; }
.pedido-card .texto { font-style: italic; color: #555; font-size: 15px; line-height: 1.5; margin-bottom: 15px; }
.info-destaque { color: var(--azul); font-weight: bold; font-size: 1.1rem; }
.info-bairro   { color: #e67e22; font-weight: bold; font-size: 1.1rem; }

.acoes {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}
.btn {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    border-radius: 6px;
    color: white;
    text-align: center;
    text-transform: uppercase;
    border: none;
    display: inline-block;
}
.btn-whats { background: #25D366; }
.btn-whats:hover { background: #20bd5a; }
.btn-check { background: var(--verde); }
.btn-check:hover { background: #218838; }
.btn-arq   { background: #6c757d; }
.btn-arq:hover { background: #5a6268; }
.btn-excel {
    background: #1d6f42;
    padding: 12px 20px;
    display: inline-block;
    margin-bottom: 25px;
    font-weight: bold;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
}
.btn-excel:hover { background: #155724; }

/* ------------------------------------------------------------------ */
/* 6. RODAPÉ                                                           */
/* ------------------------------------------------------------------ */

footer {
    background-color: var(--escuro);
    color: white;
    padding: 50px 5% 20px;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-section { flex: 1; min-width: 250px; }
.footer-section h3 {
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-left: 3px solid #fff;
    padding-left: 10px;
}
.footer-texto { font-size: 14px; color: #bbb; line-height: 1.6; }

.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.social-box {
    height: 60px;
    aspect-ratio: 1/1;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    text-decoration: none;
    transition: 0.3s;
    overflow: hidden;
}
.social-box:hover { background: #555; color: white; transform: scale(1.05); }
.social-box img { width: 100%; height: 100%; object-fit: cover; }

.contact-info p { font-size: 14px; color: #bbb; margin-bottom: 10px; line-height: 1.6; }

.btn-insta-footer {
    display: inline-block;
    background: #e1306c;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    transition: 0.3s;
    margin-top: 10px;
}
.btn-insta-footer:hover { background: #b12555; transform: translateY(-2px); }

.copyright-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 12px;
    color: #777;
}

/* ------------------------------------------------------------------ */
/* 7. AJUSTES DE CELULAR                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
    .menu-hamburger { display: block; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 65px; left: 0;
        width: 100%;
        background: var(--escuro);
        padding: 20px;
        z-index: 99;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }
    .nav-links.show { display: flex; }
    .nav-logo { grid-column: 2; }
}

@media (max-width: 600px) {
    .lista-pedidos { padding: 20px 15px; width: 95%; margin: 20px auto; }
    nav.nav-admin { flex-direction: column; gap: 10px; text-align: center; }
    nav.nav-admin a { margin: 0 10px; }
    .acoes { flex-direction: column; align-items: stretch; }
    .acoes .btn, .acoes .form-acao, .acoes .form-acao button { width: 100%; }
    .btn-excel { width: 100%; text-align: center; }
    .grid-form { grid-template-columns: 1fr; }
    .content-page { padding: 25px 20px; margin: 20px 10px; }
}

@media (max-width: 480px) {
    .login-card { padding: 30px 20px; }
}

/* Respeita quem pediu menos animação no sistema */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
