/* ═══════════════════════════════════════════════════════════
   GRUPO WHITE EDUCACIONAL — PAINEL ADMINISTRATIVO
   ═══════════════════════════════════════════════════════════ */
:root {
    --azul-900: #072a5c;
    --azul-800: #0b3c7e;
    --azul-700: #0d4a9b;
    --azul-600: #1259b8;
    --azul-500: #1e6fd9;
    --azul-100: #dcebfb;
    --azul-50:  #eef5fd;
    --branco:   #ffffff;
    --texto:    #2c3a4e;
    --fundo:    #f0f5fb;
    --verde:    #0a7a3d;
    --vermelho: #c0392b;
    --raio: 14px;
    --sombra: 0 6px 24px rgba(11, 60, 126, .1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--fundo);
    color: var(--texto);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; }
img { max-width: 100%; }
a { color: var(--azul-600); }

/* ─── LOGIN ───────────────────────────────────────────────── */
.tela-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--azul-900) 0%, var(--azul-800) 50%, var(--azul-600) 100%);
    padding: 24px;
}
.login-caixa {
    background: var(--branco);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0,0,0,.32);
    padding: 44px 40px 34px;
    width: 100%;
    max-width: 410px;
}
.login-topo { text-align: center; margin-bottom: 28px; }
.login-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--azul-500);
}
.login-logo span { color: var(--azul-900); }
.login-topo p { color: #7385a0; font-size: .95rem; margin-top: 2px; }
.login-voltar {
    display: block;
    text-align: center;
    margin-top: 22px;
    font-size: .88rem;
    color: #7385a0;
    text-decoration: none;
}
.login-voltar:hover { color: var(--azul-600); }

/* ─── LAYOUT DO PAINEL ────────────────────────────────────── */
.painel { display: flex; min-height: 100vh; }

.menu-lateral {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(175deg, var(--azul-900), var(--azul-800));
    color: var(--branco);
    display: flex;
    flex-direction: column;
    padding: 26px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.menu-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #8fc3ff;
    text-align: center;
    margin-bottom: 30px;
}
.menu-logo span { color: var(--branco); }
.menu-lateral nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.menu-lateral nav a, .menu-rodape a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: .94rem;
    font-weight: 500;
    padding: 11px 16px;
    border-radius: 10px;
    transition: background .2s, color .2s;
}
.menu-lateral nav a:hover, .menu-rodape a:hover { background: rgba(255,255,255,.1); color: var(--branco); }
.menu-lateral nav a.ativo { background: var(--azul-500); color: var(--branco); box-shadow: 0 4px 14px rgba(30,111,217,.4); }
.menu-rodape { border-top: 1px solid rgba(255,255,255,.14); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }

.conteudo { flex: 1; padding: 32px 38px 60px; min-width: 0; }
.conteudo-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.conteudo-topo h1 { font-size: 1.55rem; color: var(--azul-900); }
.usuario-chip {
    background: var(--branco);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(11,60,126,.08);
}

/* ─── CARTÕES / GRIDS ─────────────────────────────────────── */
.cartao {
    background: var(--branco);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 28px;
    margin-bottom: 26px;
}
.cartao h2 { font-size: 1.15rem; color: var(--azul-900); margin-bottom: 18px; }

.grade-estatisticas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.estatistica {
    background: var(--branco);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--texto);
    transition: transform .2s, box-shadow .2s;
}
.estatistica:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(11,60,126,.16); }
.estatistica-icone {
    width: 52px; height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--azul-50);
    color: var(--azul-600);
    flex-shrink: 0;
}
.estatistica-num { font-family: 'Poppins', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--azul-900); line-height: 1.1; }
.estatistica-rotulo { font-size: .86rem; color: #7385a0; }

/* ─── FORMULÁRIOS ─────────────────────────────────────────── */
.campo { display: block; margin-bottom: 18px; }
.campo > span {
    display: block;
    font-weight: 600;
    font-size: .88rem;
    color: var(--azul-900);
    margin-bottom: 7px;
}
.campo input[type="text"],
.campo input[type="password"],
.campo input[type="url"],
.campo input[type="email"],
.campo input[type="number"],
.campo input[type="datetime-local"],
.campo select,
.campo textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.6px solid #d5e2f2;
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--texto);
    background: var(--branco);
    transition: border-color .2s, box-shadow .2s;
}
.campo input:focus, .campo textarea:focus, .campo select:focus {
    outline: none;
    border-color: var(--azul-500);
    box-shadow: 0 0 0 4px rgba(30,111,217,.12);
}
.campo textarea { min-height: 110px; resize: vertical; }
.campo-dica { font-size: .8rem; color: #8494ab; margin-top: 5px; }
.campo input[type="file"] { font-size: .9rem; padding: 8px 0; }

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

.caixa-marcar { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; margin-bottom: 18px; }
.caixa-marcar input { width: 18px; height: 18px; accent-color: var(--azul-600); }

/* ─── BOTÕES ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .93rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primario { background: linear-gradient(135deg, var(--azul-700), var(--azul-500)); color: var(--branco); box-shadow: 0 5px 16px rgba(18,89,184,.35); }
.btn-primario:hover { box-shadow: 0 8px 22px rgba(18,89,184,.45); }
.btn-suave { background: var(--azul-50); color: var(--azul-700); }
.btn-suave:hover { background: var(--azul-100); }
.btn-perigo { background: #fdecea; color: var(--vermelho); }
.btn-perigo:hover { background: #f9d6d1; }
.btn-bloco { width: 100%; justify-content: center; }
.btn-mini { padding: 7px 14px; font-size: .84rem; border-radius: 8px; }

/* ─── TABELAS ─────────────────────────────────────────────── */
.tabela-envolve { overflow-x: auto; }
table.tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.tabela th {
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #7385a0;
    padding: 10px 14px;
    border-bottom: 2px solid #e4edf8;
}
.tabela td { padding: 13px 14px; border-bottom: 1px solid #edf3fa; vertical-align: middle; }
.tabela tr:hover td { background: var(--azul-50); }
.tabela .acoes { display: flex; gap: 8px; justify-content: flex-end; }
.miniatura {
    width: 72px; height: 46px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(11,60,126,.15);
    display: block;
}
.miniatura-vazia {
    width: 72px; height: 46px;
    border-radius: 8px;
    background: var(--azul-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a8bdd8;
    font-size: .7rem;
}

.etiqueta {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}
.etiqueta-ativo { background: #e2f6ea; color: var(--verde); }
.etiqueta-inativo { background: #fdecea; color: var(--vermelho); }

/* ─── ALERTAS ─────────────────────────────────────────────── */
.alerta {
    padding: 14px 18px;
    border-radius: 11px;
    margin-bottom: 20px;
    font-size: .93rem;
    font-weight: 500;
}
.alerta-sucesso { background: #e2f6ea; color: var(--verde); border-left: 4px solid var(--verde); }
.alerta-erro { background: #fdecea; color: var(--vermelho); border-left: 4px solid var(--vermelho); }

.vazio-admin { text-align: center; padding: 48px 20px; color: #8494ab; }

.previa-imagem {
    max-height: 120px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(11,60,126,.18);
    margin: 6px 0 4px;
}

/* ─── RESPONSIVO ──────────────────────────────────────────── */
@media (max-width: 860px) {
    .painel { flex-direction: column; }
    .menu-lateral {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 14px 16px;
    }
    .menu-logo { margin: 0 14px 0 0; font-size: 1.2rem; }
    .menu-lateral nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .menu-lateral nav a, .menu-rodape a { padding: 8px 12px; font-size: .85rem; }
    .menu-rodape { border: none; padding: 0; flex-direction: row; }
    .conteudo { padding: 22px 18px 50px; }
}
