:root {

    --Form_Background_Cor:          white;
    --Container_Background_Cor:     #F1F6FA;
    --Container_Border_Left_Cor:    5px solid #444444;
    --Container_Border_Right_Cor:   5px solid #444444;
    --PnBorderRadius:               20px;
    --PnPadding:                    20px;
    --Container_H3_BackGround_Color:#0D47A1;

    --Botao_Padrao_Cor_Face:        #64B5F6;
    --Botao_Padrao_Cor_Hover:       #1E88E5;
    --Botao_Padrao_Fonte_Cor_Face:  white;
    --Botao_Padrao_Fonte_Cor_Hover: white;
    --Botao_Disable_Cor_Face:       #d3d3d3;
    --Botao_Disable_Cor_Hover:      #444444;
    --Botao_Disable_Fonte_Cor_Face: #888;
    --Botao_Disable_Fonte_Cor_Hover:white;
    --Botao_Padrao_Border_Radius:   6px;
    --Botao_Padrao_Border:          none;
    --Botao_Padrao_Cursor:          pointer;
    --Botao_Padrao_Padding:         6px 14px;

    --Input_Background_Cor_Normal:    #ffffff;
    --Input_Background_Cor_Ativo:     #E3F2FD;
    --Input_Background_Cor_Bloqueado: #e5e7eb;
    --Input_Borda_Cor_Ativo:        #1E88E5;
    --Input_Borda_Cor_Normal:       1px solid #ccc;
    --Input_Borda_Radius:           6px;

    --Label_Normal_Cor:             #1565C0;
    --Label_Alerta_Cor:             #b02a2a;

    --MainMenu_BackGround_Cor:      #1e3a5f;
    --MainMenu_Opcao_Cor_Face:      #3c7dcf;
    --MainMenu_Opcao_Cor_Hover:     #1f4f9a;
    --MainMenu_Fonte_Cor_Face:      #ffffff;
    --MainMenu_Fonte_Cor_Hover:     #ffffff;
    --MainMenu_H3_BackGround_Color: #CC5500;

    --SubMenu_BackGround_Cor:       #2c4a6e;
    --SubMenu_Opcao_Cor_Face:       #8aa9d6;
    --SubMenu_Opcao_Cor_Hover:      #1f4f9a;
    --SubMenu_Fonte_Cor_Face:       #ffffff;
    --SubMenu_Fonte_Cor_Hover:      #ffffff;
    --SubMenu_H3_BackGround_Color:  #E67100;
    --SubMenu_Item_Ativo_Cor:       #1e3a5f;
    --SubMenu_Item_Ativo_Borda:     #f59e0b;
    --SubMenu_Titulo_Cor:           #93b4d4;

    --Tabela_Titulo_Background_Cor: #3C7DCF;
    --Tabela_Titulo_Fonte_Cor:      #ffffff;
    --Tabela_Titulo_Borda_Cor:      #1e3a5f;

    --Tabela_Header_Cor:            #3C7DCF;
    --Tabela_Header_Fonte_Cor:      #ffffff;
    --Tabela_Linha_Par_Cor:         #ffffff;
    --Tabela_Linha_Impar_Cor:       #f8fafc;
    --Tabela_Linha_Hover_Cor:       #eff6ff;
    --Tabela_Borda_Cor:             #cbd5e1;
    --Tabela_Footer_Cor:            #f1f5f9;
    --Tabela_Footer_Fonte_Cor:      #64748b;

    --Toolbar_Background_Cor:       #f1f5f9;
    --Toolbar_Borda_Cor:            #cbd5e1;

    --Pagina_Background_Cor:        #e2e8f0;

    --Ficha_Header_Cor:             #1e3a5f;
    --Ficha_Header_Fonte_Cor:       #ffffff;
    --Ficha_Background_Cor:         #ffffff;
    --Ficha_Borda_Cor:              #cbd5e1;

    --Msg_Sucesso_Background:       #dcfce7;
    --Msg_Sucesso_Fonte_Cor:        #166534;
    --Msg_Erro_Background:          #fee2e2;
    --Msg_Erro_Fonte_Cor:           #991b1b;

    --Acao_Editar_Cor:              #1d4ed8;
    --Acao_Editar_Hover_Cor:        #1e3a8a;
    --Acao_Excluir_Cor:             #dc2626;
    --Acao_Excluir_Hover_Cor:       #991b1b;

    --Botao_Confirmar_Cor:          #16a34a;
    --Botao_Confirmar_Hover_Cor:    #15803d;

    --Excluir_Header_Cor:           #dc2626;
    --Excluir_Header_Fonte_Cor:     #ffffff;
    --Excluir_Borda_Cor:            #fca5a5;
}

.input-padrao:focus {
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.tabela-toolbar-wrapper {
    min-height: 82px;
}

.sem-toolbar .tabela-toolbar-wrapper {
    min-height: 0;
    padding: 8px 0;
}

.breadcrumb-conteudo {
    padding-top: 16px;
    padding-bottom: 8px;
    padding-left: 4px;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    color: var(--Tabela_Footer_Fonte_Cor);
}
.breadcrumb-conteudo .crumb-sep {
    color: #94a3b8;
}
.breadcrumb-conteudo .crumb-atual {
    color: var(--MainMenu_BackGround_Cor);
    font-weight: 600;
}

/* ── Overlay cosmético de carregamento ── */
/* Modal com ícone girando + texto que cicla por etapas + barra que avança
   sozinha sem nunca fechar (não é progresso real do servidor, só ameniza
   a espera de uma navegação ou POST síncrono demorado). Markup: um único
   #overlay-processando (em base.html, presente em toda página) disparado
   via iniciarOverlayCarregamento(etapas) — ver templates/base.html. */
.overlay-processando { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.55); align-items: center; justify-content: center; padding: 20px; }
.overlay-processando.aberto { display: flex; }
.overlay-caixa { background: var(--Ficha_Background_Cor); border-radius: 8px; width: 100%; max-width: 420px; text-align: center; padding: 32px 24px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.overlay-caixa .overlay-icone { font-size: 32px; color: var(--Botao_Padrao_Cor_Hover); }
.overlay-caixa .overlay-texto { margin: 16px 0 4px; font-weight: 600; }
.overlay-caixa .overlay-barra-trilha { background: var(--Tabela_Borda_Cor); border-radius: 6px; height: 8px; overflow: hidden; margin: 12px 0; }
.overlay-caixa .overlay-barra-preenchida { background: var(--Botao_Padrao_Cor_Hover); height: 100%; width: 0%; transition: width .5s ease; }
.overlay-caixa .overlay-rodape { color: #64748b; font-size: 13px; margin: 0; }

/* Hover/toque da capa em mobile: o pop-up ancorado à miniatura (right:0)
   estoura a lateral da tela; centraliza na viewport. */
@media (max-width: 768px) {
    .manual-cover-preview figure .image-zoom {
        position: fixed; top: 50%; left: 50%; right: auto; margin: 0;
        transform: translate(-50%, -50%);
    }
    .manual-cover-preview figure .image-zoom img { max-width: 80vw; max-height: 70vh; }
}

/* Ampliação da capa em mobile: abre por toque (hover não existe), fecha com
   toque em qualquer lugar; o X é só a indicação visual (injetado por
   standard.js) e o fundo escurece pra deixar claro que é uma camada. */
@media (max-width: 768px) {
    .manual-cover-preview figure:not(.zoom-aberto):hover .image-zoom { display: none; }
    .manual-cover-preview figure.zoom-aberto .image-zoom { display: block; box-shadow: 0 0 0 100vmax rgba(2,6,23,.6); }
    .manual-cover-preview .image-zoom-fechar {
        position: absolute; top: -14px; right: -14px; width: 34px; height: 34px;
        border-radius: 50%; border: 2px solid #fff; background: #dc2626; color: #fff;
        font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,.4); pointer-events: none;
    }
}
