/* identidade.css — o Admin com a cara do site público (26/09/2026).
   Pedido do Vinicius: "deveria adotar o mesmo design do site" e usar o MESMO
   vídeo de fundo (trocou no site, troca aqui). Carregado por último no
   base.html, vale sobre admin.css e os estilos de cada tela.
   Regra de leitura: o vídeo fica bem escurecido atrás das telas de trabalho;
   tudo o que tem texto fica sobre vidro escuro com desfoque. */

:root {
    /* mesmas cores do site (assets/css/skin.css) */
    --color-primary: #e1121f;
    --color-primary-light: #ff2f41;
    --color-primary-dark: #8d0610;
    --color-text-light: #f7f8fb;
    --color-text-muted: #a7afbf;
    --color-border: rgba(255, 255, 255, .12);
    --color-surface-dark: rgba(10, 10, 15, .74);
    --vidro: rgba(10, 10, 15, .72);
    --vidro-forte: rgba(8, 8, 12, .86);
    --borda-vidro: rgba(255, 255, 255, .12);
    --sombra-site: 0 28px 90px rgba(0, 0, 0, .5);
    --raio: 20px;
}

/* ── Fundo: o vídeo do site + o mesmo véu escuro com brilho vermelho ─────── */
html { background: #020203; }
body, body.logged-in { background: transparent !important; color: var(--color-text-light); }
.wrapper, .content, .content-full { background: transparent !important; }
.fundo-site {
    position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover;
    z-index: -3; pointer-events: none; opacity: .55 !important; filter: saturate(1.08) contrast(1.04);
}
.fundo-site-veu {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(circle at 78% 18%, rgba(225, 18, 31, .24), transparent 42%),
        radial-gradient(circle at 10% 92%, rgba(255, 255, 255, .05), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, .94) 0%, rgba(0, 0, 0, .84) 38%, rgba(0, 0, 0, .74) 100%) !important;
}
/* na tela de login o vídeo aparece mais, como no site */
body.sem-login .fundo-site { opacity: .75 !important; }
body.sem-login .fundo-site-veu {
    background:
        radial-gradient(circle at 70% 25%, rgba(225, 18, 31, .30), transparent 40%),
        linear-gradient(90deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .62) 55%, rgba(0, 0, 0, .78) 100%) !important;
}

/* ── Vidro: menu, topo, cartões, tabelas, painéis do editor ─────────────── */
.sidebar, .topbar, .card, .dashboard-card, .status-item, .form-section, table,
.ed-painel, .ed-barra, .ed-modal .caixa, .ed-ver .caixa {
    background: var(--vidro) !important;
    border-color: var(--borda-vidro) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
            backdrop-filter: blur(14px) saturate(1.15);
    box-shadow: var(--sombra-site);
}
.card, .dashboard-card, .status-item, .form-section, .ed-painel { border-radius: var(--raio); }
.sidebar { background: var(--vidro-forte) !important; border-right: 1px solid var(--borda-vidro); }
.topbar { background: rgba(8, 8, 12, .78) !important; border-bottom: 1px solid var(--borda-vidro); }
.card-header { border-bottom-color: var(--borda-vidro) !important; background: transparent !important; }
/* vidro dentro de vidro escurece em dobro e pesa: por dentro, só um véu leve */
.card table, .ed-painel table, .card .card, .ed-painel .card {
    background: transparent !important; box-shadow: none !important;
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
.ed-cartao, .ed-midia { background: rgba(255, 255, 255, .035) !important; border-color: var(--borda-vidro) !important; border-radius: 14px; }
.ed-abas { background: transparent !important; border-color: var(--borda-vidro) !important; }

/* títulos com o acabamento do site */
.page-title, .card-header, .section-header h2, h1, h2, h3 { letter-spacing: -.02em; color: var(--color-text-light); }
p, td, .user-info { color: var(--color-text-muted); }

/* ── Menu lateral: item ativo com a barra vermelha do site ──────────────── */
.sidebar-nav li a { border-radius: 12px; border-left: 3px solid transparent; }
.sidebar-nav li a:hover { background: rgba(255, 255, 255, .06) !important; color: #fff; }
.sidebar-nav li a.active {
    background: linear-gradient(90deg, rgba(225, 18, 31, .22), rgba(225, 18, 31, .04)) !important;
    border-left-color: var(--color-primary); color: #fff;
    box-shadow: inset 0 0 0 1px rgba(225, 18, 31, .18);
}

/* ── Botões iguais aos do site ──────────────────────────────────────────── */
.btn { border-radius: 12px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-dark)) !important;
    border: 0 !important; color: #fff !important;
    box-shadow: 0 14px 38px rgba(225, 18, 31, .32);
}
.btn-primary:hover { box-shadow: 0 18px 50px rgba(225, 18, 31, .45); }
.btn-outline {
    background: rgba(0, 0, 0, .28) !important; color: var(--color-text-light) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
}
.btn-outline:hover { border-color: rgba(225, 18, 31, .6) !important; background: rgba(225, 18, 31, .10) !important; }

/* ── Campos: escuros, borda vermelha ao focar ───────────────────────────── */
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number],
input[type=date], input:not([type]), select, textarea {
    background: rgba(0, 0, 0, .38) !important; color: var(--color-text-light) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important; border-radius: 12px !important;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: rgba(225, 18, 31, .7) !important;
    box-shadow: 0 0 0 3px rgba(225, 18, 31, .18) !important;
}
input[type=file] { color: var(--color-text-muted); }
textarea { font-family: var(--font-main) !important; line-height: 1.55; }

/* ── Tabelas legíveis sobre o vidro ─────────────────────────────────────── */
table th { background: rgba(225, 18, 31, .08) !important; color: #f0c9cd; }
table tbody tr:hover { background: rgba(255, 255, 255, .04) !important; }

/* ── Login: o cartão de vidro do site sobre o vídeo ─────────────────────── */
.login-container, main.content { background: transparent !important; }
.login-box {
    background: rgba(10, 10, 15, .62) !important; border: 1px solid var(--borda-vidro) !important;
    border-radius: 28px !important; box-shadow: var(--sombra-site), 0 0 0 1px rgba(225, 18, 31, .10);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
            backdrop-filter: blur(18px) saturate(1.2);
}

/* avisos com o vidro também */
.alert { border-radius: 14px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* ══ Moldura "Adm 2" (26/09/2026): barra de cima + menu lateral ══════════════
   Desenho escolhido pelo Vinicius: barra de cima com a marca e o menu do site,
   menu lateral "Painel administrativo" com ícones e o destaque dourado, selo de
   status embaixo. Dourado = navegação; vermelho = ação (botões). */
:root { --ouro: #d9ae5f; --ouro-suave: rgba(217, 174, 95, .22); --topo: 64px; --lateral: 250px; }

.barra-topo {
    position: fixed; top: 0; left: 0; right: 0; height: var(--topo); z-index: 60;
    display: flex; align-items: center; gap: 18px; padding: 0 20px;
    background: rgba(8, 8, 12, .82); border-bottom: 1px solid var(--borda-vidro);
    -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
}
.barra-topo .marca { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: calc(var(--lateral) - 40px); }
.barra-topo .marca img { width: 34px; height: 34px; border-radius: 8px; }
.barra-topo .brand-nome { font-weight: 900; font-size: 20px; letter-spacing: -.04em; color: #fff; }
.barra-topo .brand-studies { color: var(--color-primary-light); }
.barra-botao { display: none; background: none; border: 0; color: var(--color-text-light); padding: 6px; border-radius: 10px; cursor: pointer; }
.barra-botao:hover { background: rgba(255, 255, 255, .06); }

.nav-site { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.nav-site a {
    color: var(--color-text-muted); text-decoration: none; font-size: 14px; font-weight: 600;
    padding: 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav-site a:hover { color: #fff; }
.nav-site a.aqui { color: #fff; border-bottom-color: var(--ouro); }
.nav-site .estilo-sga { color: #ff5a67; }
.nav-site .estilo-half { color: #5aa9ff; }
.nav-site .verde { color: #63e56d; }

.topo-direita { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.sino { position: relative; color: var(--color-text-muted); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; }
.sino:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sino-ponto { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
    background: var(--color-primary); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800;
    color: #1a1204; background: linear-gradient(135deg, #f1c77a, #9a7338); box-shadow: 0 0 0 2px rgba(217, 174, 95, .25); }
.topo-direita .user-info { color: var(--color-text-light); font-weight: 600; }
.topo-direita .sair { display: inline-flex; align-items: center; gap: 6px; }

/* menu lateral abaixo da barra de cima */
.sidebar {
    position: fixed !important; top: var(--topo) !important; left: 0; bottom: 0; height: auto !important;
    width: var(--lateral); display: flex; flex-direction: column; padding: 18px 12px; z-index: 50; overflow-y: auto;
}
.sidebar-header { display: none; }
.sidebar-rotulo { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--color-text-muted); padding: 6px 12px 14px; }
.sidebar-nav li a { display: flex !important; align-items: center; gap: 12px; padding: 11px 14px !important; margin-bottom: 4px; }
.sidebar-nav li a .icone { flex-shrink: 0; opacity: .85; }
.sidebar-nav li a.active {
    background: linear-gradient(90deg, var(--ouro-suave), rgba(217, 174, 95, .04)) !important;
    border-left-color: var(--ouro) !important; color: #fff !important; box-shadow: inset 0 0 0 1px rgba(217, 174, 95, .16) !important;
}
.selo-sistema {
    margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
    border: 1px solid var(--borda-vidro); background: rgba(255, 255, 255, .03); color: var(--color-text-light);
    text-decoration: none; font-size: 13px; font-weight: 600;
}
.selo-sistema .icone { margin-left: auto; color: var(--color-text-muted); }
.selo-luz { width: 9px; height: 9px; border-radius: 50%; background: #8a8f99; }
.selo-sistema.ok .selo-luz { background: #4fd08a; box-shadow: 0 0 0 4px rgba(79, 208, 138, .15); }
.selo-sistema.atencao .selo-luz { background: #f0b44c; box-shadow: 0 0 0 4px rgba(240, 180, 76, .18); }

/* conteúdo ao lado do menu e abaixo da barra */
.com-login .content { margin-left: var(--lateral) !important; padding: calc(var(--topo) + 24px) 28px 32px !important; }
.content .page-title { font-size: 26px; font-weight: 800; margin: 0 0 18px; }
.content .page-title:empty { display: none; }
.topbar { display: none !important; }

/* telas médias: some o menu do site; estreitas: menu lateral vira gaveta */
@media (max-width: 1180px) { .nav-site { display: none; } }
@media (max-width: 900px) {
    .barra-botao { display: grid; place-items: center; }
    .barra-topo { gap: 10px; padding: 0 12px; }
    .barra-topo .marca { min-width: 0; }
    .topo-direita .user-info, .topo-direita .sair span { display: none; }
    .sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: none;
        width: min(290px, 86vw) !important; border-bottom: 0 !important; }
    body.menu-aberto .sidebar { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .6); }
    /* as regras antigas de celular do admin.css punham o menu em linha e na largura toda */
    .sidebar-nav ul { display: block !important; padding: 0 !important; }
    .sidebar-nav li a { border-bottom: 0 !important; border-left: 3px solid transparent !important; justify-content: flex-start !important; }
    .wrapper { flex-direction: row !important; }
    .com-login .content { margin-left: 0 !important; padding: calc(var(--topo) + 16px) 16px 24px !important; }
}
@media (max-width: 520px) {
    .barra-topo .brand-nome { display: none; }   /* no celular, só o logo: o nome encostava no sino */
}