/* =====================================================================
   Consulta Pública de Concluintes — folha de estilo
   Tokens medidos diretamente na tela de referência da SED:
     fonte  Arial / 14px / #333
     azul   #459AD6   (título, links e botões)
     borda  #ccc (campos, 1.5px) · #ddd (painel, 1.5px)
     campo  34px de altura · padding 6px 12px · raio 4px
     rótulo 40% de largura · alinhado à direita · line-height 34px
   ===================================================================== */

:root {
    --sed-azul: #459AD6;
    --sed-azul-borda: #2E6DA4;
    --sed-azul-hover: #3789c7;
    --sed-texto: #333333;
    --sed-borda-campo: #cccccc;
    --sed-borda-painel: #dddddd;
}

html, body {
    height: auto;
}

body {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: var(--sed-texto);
    background: #ffffff;
}

/* ---------- Breadcrumb ---------- */
.sed-breadcrumb {
    font-size: 12px;
    color: var(--sed-texto);
    margin: 8px 0 0;
    padding: 0 15px;
}
.sed-breadcrumb a {
    color: var(--sed-azul);
    text-decoration: none;
}
.sed-breadcrumb a:hover {
    text-decoration: underline;
}
.sed-breadcrumb span.sep {
    color: var(--sed-texto);
    margin: 0 4px;
}

/* ---------- Título ---------- */
.sed-titulo {
    color: var(--sed-azul);
    font-size: 36px;
    line-height: 39.6px;
    font-weight: 700;
    margin: 0 0 15px;
    padding: 0 15px;
}

/* ---------- Painel ---------- */
.sed-painel {
    border: 1.5px solid var(--sed-borda-painel);
    border-radius: 4px;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .176);
    background: #fff;
    padding: 15px;
    margin: 0 15px 20px;
}
.sed-instrucao {
    font-size: 14px;
    margin-bottom: 15px;
}

/* ---------- Formulário ----------
   Layout próprio (independe do grid do Bootstrap) reproduzindo o
   rótulo a 40% da largura, alinhado à direita, como no original. */
.sed-linha {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}
.sed-label {
    flex: 0 0 40%;
    max-width: 40%;
    font-weight: 700;
    font-size: 14px;
    line-height: 34px;
    text-align: right;
    padding-right: 15px;
}
.sed-campo {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}
@media (max-width: 640px) {
    .sed-linha { flex-direction: column; }
    .sed-label { flex: 1 1 auto; max-width: 100%; text-align: left; line-height: 1.6; padding-right: 0; }
    .sed-titulo { font-size: 26px; line-height: 1.2; }
}

.sed-form .form-control,
.sed-form .form-select {
    display: inline-block;
    width: auto;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.42857143;
    color: var(--sed-texto);
    background-color: #fff;
    border: 1.5px solid var(--sed-borda-campo);
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
.sed-form .form-control:focus,
.sed-form .form-select:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}
.sed-form .form-select {
    height: 35px;
    padding: 6px 24px 6px 12px;
}

/* As larguras precisam vencer o `width:auto` das regras acima */
.sed-form .w-num     { width: 170px; }
.sed-form .w-dig     { width: 70px;  }
.sed-form .w-uf      { width: 80px;  }
.sed-form .w-tipo    { width: 170px; }
.sed-form .w-captcha { width: 100px; }

.sep-barra {
    line-height: 34px;
    color: var(--sed-texto);
}

/* ---------- Captcha ---------- */
.sed-captcha {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.sed-captcha-img {
    /* Mesmo tamanho do captcha da tela de referencia. A imagem e gerada em
       600x180 e reduzida aqui, para ficar nitida em tela de alta densidade. */
    width: 200px;
    height: 60px;
    border: 0;
    border-radius: 8px;
    display: block;
    cursor: pointer;
}

/* ---------- Botões ---------- */
.sed-acoes {
    text-align: right;
    margin-top: 15px;
}
.sed-acoes .btn-sed + .btn-sed { margin-left: 5px; }

.btn-sed {
    display: inline-block;
    background: var(--sed-azul);
    border: 1px solid var(--sed-azul-borda);
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    line-height: 1.42857143;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}
.btn-sed:hover,
.btn-sed:focus {
    background: var(--sed-azul-hover);
    border-color: var(--sed-azul-borda);
    color: #fff;
}
.btn-sed.btn-sm { font-size: 12px; padding: 4px 9px; }

/* ---------- Resultado (modal, como na tela de referência) ---------- */
.sed-modal-fundo {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1050;
    overflow-y: auto;
    padding: 30px 15px;
}
.sed-modal {
    width: 65%;              /* mesma proporção do modal da tela de referência */
    min-width: 300px;
    max-width: 1400px;
    margin: 0 auto;
}
@media (max-width: 1100px) {
    .sed-modal { width: 96%; }
}
.sed-modal-conteudo {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
    overflow: hidden;
}
.sed-modal-cabecalho {
    background: var(--sed-azul);
    color: #fff;
    padding: 15px;
    font-size: 14px;
    font-weight: 700;
    position: relative;
}
.sed-modal-fechar {
    position: absolute;
    right: 15px;
    top: 10px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 21px;
    line-height: 1;
    opacity: .9;
    cursor: pointer;
}
.sed-modal-fechar:hover { opacity: 1; }
.sed-modal-corpo { padding: 15px 20px 20px; }
.sed-titulo-modal { padding: 0; margin-bottom: 10px; }
.sed-modal-linha { margin: 0 0 2px; font-size: 14px; }
.sed-modal-aviso { font-weight: 700; margin-bottom: 12px; }

.sed-ficha {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px 15px 5px;
    margin-bottom: 15px;
}
.sed-linha-ficha { margin-bottom: 10px; }
.sed-linha-ficha .sed-label { line-height: 1.4; }
.sed-valor { flex: 1 1 auto; font-size: 14px; line-height: 1.4; }
.sed-modal-datahora { font-size: 14px; margin: 0 0 10px; }
.sed-obs { font-size: 12px; color: #777; }

/* ---------- Faixa "Processo em Andamento..." ---------- */
.sed-carregando {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--sed-azul);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 45px 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.sed-carregando.ativo { display: flex; }
.sed-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sed-girar .8s linear infinite;
}
@keyframes sed-girar { to { transform: rotate(360deg); } }

/* ---------- Rodapé ---------- */
.sed-rodape {
    margin: 20px 15px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sed-rodape img { width: 34px; height: auto; }
.sed-rodape .gov   { font-size: 13px; font-weight: 700; line-height: 1.4; }
.sed-rodape .orgao { font-size: 13px; font-weight: 400; line-height: 1.4; }

/* ---------- Alertas (independem do CDN do Bootstrap) ---------- */
.alert { padding: 10px 15px; border: 1px solid transparent; border-radius: 4px; margin-bottom: 15px; font-size: 14px; }
.alert-danger  { color: #a94442; background: #f2dede; border-color: #ebccd1; }
.alert-warning { color: #8a6d3b; background: #fcf8e3; border-color: #faebcc; }
.alert-info    { color: #31708f; background: #d9edf7; border-color: #bce8f1; }
.alert-success { color: #3c763d; background: #dff0d8; border-color: #d6e9c6; }

/* ---------- Declaração (impressão) ---------- */
.declaracao {
    max-width: 800px;
    margin: 30px auto;
    padding: 40px;
    border: 1px solid #ddd;
    font-size: 14px;
    line-height: 1.7;
}
.declaracao h1 {
    font-size: 18px;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 1px;
}
.declaracao .assinatura { margin-top: 60px; text-align: center; }
.declaracao .assinatura .linha { border-top: 1px solid #333; width: 300px; margin: 0 auto 6px; }
.declaracao .validacao {
    margin-top: 40px; font-size: 11px; color: #555;
    border-top: 1px dashed #bbb; padding-top: 10px;
}

@media print {
    /* Remove cabeçalho e rodapé automáticos do navegador */
    @page {
        margin: 0;
    }
    body {
        margin: 1.2cm;
        font-size: 12pt;
    }

    .no-print { display: none !important; }
    .declaracao { border: none; margin: 0; padding: 0; }

    /* Ao imprimir o resultado, sai apenas o conteúdo do modal */
    body.imprimindo-resultado > *:not(.sed-modal-fundo) { display: none !important; }
    body.imprimindo-resultado .sed-modal-fundo {
        position: static; background: none; padding: 0; overflow: visible;
    }
    body.imprimindo-resultado .sed-modal { max-width: none; }
    body.imprimindo-resultado .sed-modal-conteudo { box-shadow: none; border-radius: 0; }
    body.imprimindo-resultado .sed-modal-cabecalho { display: none; }
}

/* ---------- Admin ---------- */
.admin-body { background: #f4f6f9; font-size: 14px; }
.admin-navbar { background: var(--sed-azul-borda); }
.admin-navbar .navbar-brand,
.admin-navbar .nav-link { color: #fff !important; }
.admin-navbar .nav-link:hover { color: #d9ecf9 !important; }
.admin-card {
    background: #fff; border: 1px solid #e3e6ea; border-radius: 6px;
    padding: 20px; margin-bottom: 20px;
}
.admin-card h1, .admin-card h2 {
    font-size: 18px; font-weight: 700; color: #2c3e50; margin-bottom: 16px;
}
.tabela-admin { font-size: 13px; }
.tabela-admin thead th { background: #eef2f6; white-space: nowrap; }
.login-box { max-width: 380px; margin: 8vh auto; }