/* ===========================================================
   Área da Chefia — GE Brownsea 113/SC
   Login + painel de edição (Mural, Agenda, Documentos internos)
   =========================================================== */

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

:root {
    --navy: #0f1b35;
    --navy2: #16264a;
    --red: #c0392b;
    --red-dark: #9b1c1c;
    --gold: #f2c94c;
    --verde: #2b5d34;
    --dim: rgba(255, 255, 255, 0.5);
    --linha: rgba(255, 255, 255, 0.1);
    --fn: 'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--fn);
    min-height: 100vh;
    background: var(--navy);
    position: relative;
    padding: 4em 1em 3em;
}

/* brasão desfocado + gradiente de cor no fundo, fixos */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../../images/brasao.png') center center / 55% auto no-repeat;
    opacity: 0.04;
    filter: blur(4px);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(30, 77, 183, 0.3) 0%, transparent 60%),
                radial-gradient(ellipse at bottom right, rgba(155, 28, 28, 0.3) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.btn-voltar {
    position: fixed;
    top: 0.7em; left: 1em;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em;
    transition: color 0.2s ease;
    z-index: 10;
}
.btn-voltar:hover { color: var(--gold); }

/* ---------- CARD DE LOGIN ---------- */
.card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3em 2.5em;
    width: 100%;
    max-width: 460px;
    margin: 1em auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: fadeUp 0.6s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-header { text-align: center; margin-bottom: 2em; }
.card-header .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 50%;
    font-size: 2em;
    margin-bottom: 1em;
    box-shadow: 0 8px 25px rgba(192, 57, 43, 0.4);
}
.card-header h1 { font-size: 1.6em; font-weight: 800; color: white; letter-spacing: 1px; margin-bottom: 0.3em; }
.card-header p { color: rgba(255, 255, 255, 0.5); font-size: 0.82em; letter-spacing: 0.5px; }

.btn-entrar {
    width: 100%;
    padding: 0.95em;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--fn);
    font-size: 0.92em;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
    transition: all 0.3s ease;
}
.btn-entrar:hover { background: linear-gradient(135deg, #a93226, #7f1d1d); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(192, 57, 43, 0.55); }

.erro {
    background: rgba(192, 57, 43, 0.2);
    border: 1px solid rgba(192, 57, 43, 0.4);
    border-radius: 8px;
    color: #ff8a80;
    font-size: 0.82em;
    padding: 0.7em 1em;
    margin-top: 0.8em;
    text-align: center;
    display: none;
}
.erro.show { display: block; }

.card-footer {
    text-align: center;
    margin-top: 1.5em;
    padding-top: 1.2em;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.72em;
    letter-spacing: 0.5px;
}

/* ---------- PAINEL (pós-login) ---------- */
#painel { display: none; position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }

.painel-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8em;
    margin-bottom: 1.6em;
    color: white;
}
.painel-topo h1 { font-size: 1.4em; font-weight: 800; letter-spacing: 0.5px; }
.painel-topo .chefia-user { font-size: 0.78em; color: var(--dim); }
.painel-topo .chefia-user strong { color: var(--gold); font-weight: 700; }

.btn-sair {
    padding: 0.6em 1.1em;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-family: var(--fn);
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-sair:hover { background: rgba(255, 255, 255, 0.1); color: white; }

/* abas */
.painel-tabs {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.4em;
    overflow-x: auto;
    padding-bottom: 2px;
}
.painel-tab {
    flex: none;
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.2em;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--linha);
    border-radius: 999px;
    font-family: var(--fn);
    font-size: 0.82em;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.painel-tab:hover { color: white; border-color: rgba(255, 255, 255, 0.25); }
.painel-tab.ativa { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.painel-secao { display: none; }
.painel-secao.ativa { display: block; animation: fadeUp 0.35s ease both; }

.painel-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--linha);
    border-radius: 18px;
    padding: 1.8em;
    margin-bottom: 1.2em;
}
.painel-card h2 {
    font-size: 1.05em;
    font-weight: 800;
    color: white;
    margin-bottom: 0.3em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.painel-card > p.painel-desc { color: var(--dim); font-size: 0.8em; margin-bottom: 1.3em; }

/* campos de formulário */
.campo { display: block; margin-bottom: 1em; }
.campo-label {
    display: block;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.4em;
}
/* título solto acima de uma lista (ex.: "O que levar", "Avisos") — não é label de um campo específico */
.lista-titulo {
    display: block;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 1.3em 0 0.6em;
}
.campo input,
.campo textarea,
.campo select {
    width: 100%;
    padding: 0.75em 0.9em;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: white;
    font-family: var(--fn);
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.campo textarea { resize: vertical; min-height: 4.5em; }
.campo input:focus, .campo textarea:focus, .campo select:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.11);
}
.campo input::placeholder, .campo textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
.campo select option { background: var(--navy2); color: white; }

.campos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1em; }
@media (max-width: 560px) { .campos-grid { grid-template-columns: 1fr; } }

/* listas dinâmicas (avisos, eventos, itens, categorias) */
.lista-dinamica { display: flex; flex-direction: column; gap: 0.9em; margin-bottom: 1em; }
.lista-item {
    position: relative;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--linha);
    border-radius: 12px;
    padding: 1.1em 2.6em 0.2em 1.1em;
}
.lista-item .campo { margin-bottom: 0.8em; }
.lista-remover {
    position: absolute;
    top: 0.7em; right: 0.7em;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(192, 57, 43, 0.15);
    color: #ff8a80;
    border: 1px solid rgba(192, 57, 43, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.78em;
    transition: background 0.2s ease;
}
.lista-remover:hover { background: rgba(192, 57, 43, 0.35); }

.lista-vazia { color: var(--dim); font-size: 0.85em; font-style: italic; padding: 0.6em 0; }

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.6em 1em;
    background: rgba(242, 201, 76, 0.1);
    color: var(--gold);
    border: 1px dashed rgba(242, 201, 76, 0.4);
    border-radius: 10px;
    font-family: var(--fn);
    font-size: 0.8em;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-add:hover { background: rgba(242, 201, 76, 0.18); }

/* categoria (documentos internos) dentro de uma lista de categorias */
.categoria-bloco { border: 1px solid var(--linha); border-radius: 12px; padding: 1.1em; background: rgba(0, 0, 0, 0.15); margin-bottom: 0.9em; position: relative; }
.categoria-bloco .lista-remover { top: 0.7em; right: 0.7em; }
.categoria-itens { border-top: 1px solid var(--linha); margin-top: 0.9em; padding-top: 0.9em; }
.categoria-itens .lista-item { background: rgba(255, 255, 255, 0.04); }

/* barra de ações (salvar) */
.painel-acoes {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
    margin-top: 1.4em;
}
.btn-salvar {
    padding: 0.9em 1.8em;
    background: linear-gradient(135deg, var(--verde), #3a7a49);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--fn);
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(43, 93, 52, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-salvar:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(43, 93, 52, 0.5); }
.btn-salvar:disabled { opacity: 0.6; cursor: wait; transform: none; }

.status-salvar { font-size: 0.8em; color: var(--dim); }
.status-salvar.ok { color: #6fe89a; }
.status-salvar.erro { color: #ff8a80; }

.painel-carregando { text-align: center; color: var(--dim); font-size: 0.85em; padding: 2em 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}
