/* ============================================
   SISTEMA DE GESTÃO ACADÊMICA - DAC/UNICAMP
   ============================================ */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif;
    background: #fff;
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 14px;
}

/* ============ CABEÇALHO ============ */
.topo-novo {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 5px 25px 5px 25px;
    background: #fff;
    flex-wrap: nowrap;
    gap: 15px;
    position: relative;
    min-height: 75px;
}

.topo-esq-novo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-dac {
    height: 50px !important;
    width: auto !important;
    max-width: 65px !important;
    object-fit: contain;
}

.texto-dac small {
    color: #51418f;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
    display: block;
}

.titulo-sistema {
    font-size: 24px !important;
    color: #333 !important;
    font-weight: 400 !important;
    margin: 0 0 0 10px !important;
    line-height: 1;
}

.topo-dir-novo {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0px;
    flex-shrink: 0;
    height: 100%;
    position: absolute;
    top: 0;
    right: 25px;
    bottom: 0;
}

.link-legenda {
    color: #d97706;
    text-decoration: underline;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
}

/* Botões de acessibilidade */
.acessibilidade {
    display: flex;
    gap: 5px;
    align-items: center;
}

.btn-acess {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    font-weight: bold !important;
    color: white !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    transition: transform 0.2s;
}

.btn-acess:hover {
    transform: scale(1.1);
}

.btn-a-pequeno {
    background: #f97316 !important;
    font-size: 9px !important;
}

.btn-a-medio {
    background: #f97316 !important;
    font-size: 11px !important;
}

.btn-a-grande {
    background: #f97316 !important;
    font-size: 14px !important;
}

.btn-contraste {
    background: #1e3a8a !important;
    font-size: 13px !important;
}

/* Logo Unicamp - TAMANHO CONTROLADO */
.logo-unicamp {
    height: 60px !important;
    width: auto !important;
    max-width: 78px !important;
    max-height: 60px !important;
    object-fit: contain;
    display: block;
}

/* ============ BARRA ROXA ============ */
.barra-roxa-nova {
    background: #51418f;
    height: 28px;
    width: 100%;
}
/* ============ SESSÃO ============ */
.sessao-info-nova {
    text-align: right;
    padding: 5px 25px;
    font-size: 12px;
    color: #333;
}

.sessao-info-nova strong {
    color: #333;
    font-weight: bold;
}

/* ============ CONTAINER ============ */
.container-novo {
    padding: 0 25px 15px 25px;
    min-height: auto;
}

.titulo-pagina {
    font-size: 24px;
    color: #333;
    font-weight: 400;
    margin: 8px 0 15px 0;
}

.campos-obrigatorios {
    font-size: 13px;
    color: #000000;
    margin: 10px 0 15px 0;
    font-style: italic;
}

.asterisco {
    color: #d97706;
    font-weight: bold;
    font-size: 15px;
    margin-right: 3px;
}

/* ============ FORMULÁRIO ============ */
.fieldset-novo {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 20px 25px;
    margin: 0;
    background: #fff;
}

.fieldset-novo legend {
    font-size: 14px;
    color: #555;
    padding: 0 10px;
    font-weight: normal;
}

.form-group-novo {
    margin-bottom: 20px;
}

.form-group-novo label {
    display: block;
    font-size: 13px;
    color: #333;
    margin-bottom: 7px;
    font-weight: normal;
}

.form-group-novo select,
.form-group-novo input[type="text"] {
    width: 100%;
    max-width: 380px;
    padding: 7px 30px 7px 10px;
    border: 1px solid #999;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23333' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
}

.form-group-novo input[type="text"] {
    background-image: none;
    padding-right: 10px;
}

.form-group-novo select:focus,
.form-group-novo input[type="text"]:focus {
    outline: none;
    border-color: #51418f;
    box-shadow: 0 0 3px rgba(81, 65, 143, 0.4);
}

.btn-consultar {
    background: #51418f;
    color: white;
    padding: 9px 28px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.btn-consultar:hover {
    background: #403477;
}

/* ============ RODAPÉ ============ */
.rodape-novo {
    background: #51418f;
    color: white;
    padding: 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-top: 20px;
    flex-wrap: nowrap;
    gap: 10px;
    line-height: 1;
    height: 28px;
    box-sizing: border-box;
}

.rodape-novo a,
.rodape-novo u {
    color: white;
    text-decoration: underline;
}

.versao {
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

/* ============ ALTO CONTRASTE ============ */
body.alto-contraste {
    background: #000 !important;
    color: #ffeb3b !important;
}

body.alto-contraste .topo-novo,
body.alto-contraste .container-novo,
body.alto-contraste .fieldset-novo,
body.alto-contraste .sessao-info-nova {
    background: #000 !important;
    color: #ffeb3b !important;
}

body.alto-contraste .titulo-sistema,
body.alto-contraste .titulo-pagina,
body.alto-contraste label,
body.alto-contraste legend,
body.alto-contraste .texto-dac small {
    color: #ffeb3b !important;
}

body.alto-contraste select,
body.alto-contraste input {
    background: #000 !important;
    color: #ffeb3b !important;
    border-color: #ffeb3b !important;
}

/* ============ ALERTAS ============ */
.alerta {
    padding: 12px 18px;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alerta.erro {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alerta.sucesso {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

/* ============================================
   LAYOUTS ANTIGOS (para outras páginas)
   ============================================ */

/* Cabeçalho antigo (resultado.php) */
.topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.topo-esq {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topo-esq strong {
    display: block;
    color: #51418f;
    font-size: 14px;
}

.topo-esq span {
    font-size: 20px;
    color: #333;
}

.topo-esq .logo,
.topo-dir .logo {
    height: 55px !important;
    width: auto !important;
    max-width: 70px !important;
    max-height: 55px !important;
    object-fit: contain;
}

.topo-dir {
    display: flex;
    align-items: center;
}

.barra-roxa {
    height: 18px;
    background: #51418f;
}

.sessao-info {
    text-align: right;
    padding: 8px 24px;
    font-size: 13px;
}

.container {
    max-width: 1180px;
    margin: 20px auto 80px;
    padding: 0 24px;
}

h1 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 24px;
}

fieldset {
    border: 1px solid #ccc;
    padding: 20px;
    margin-bottom: 22px;
}

legend {
    padding: 0 8px;
    font-weight: bold;
    color: #444;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group label span,
.obrigatorio-info {
    color: #c0392b;
}

input,
select,
textarea {
    padding: 9px;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 14px;
}

textarea {
    min-height: 90px;
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 9px 18px;
    background: #eee;
    color: #222;
    border: 1px solid #999;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    background: #e1e1e1;
}

.btn-roxo {
    background: #51418f;
    color: #fff;
    border-color: #51418f;
}

.btn-roxo:hover {
    background: #403477;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 22px;
}

.table-wrap {
    overflow-x: auto;
}

.tabela-doc {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

.tabela-doc th {
    background: #51418f;
    color: #fff;
    padding: 12px;
    border: 1px solid #ccc;
    font-size: 13px;
    text-align: left;
}

.tabela-doc td {
    background: #b8ecb5;
    padding: 12px;
    border: 1px solid #ccc;
    font-size: 13px;
}

.acoes {
    margin-top: 20px;
}

.rodape {
    background: #51418f;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

/* ============================================
   ADMIN
   ============================================ */

.admin-login {
    max-width: 420px;
    margin: 80px auto;
    border: 1px solid #ddd;
    padding: 30px;
    border-radius: 8px;
    background: #fafafa;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
}

.admin-menu {
    width: 240px;
    background: #2f285f;
    color: #fff;
    padding: 24px;
}

.admin-menu h2 {
    margin-top: 0;
}

.admin-menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

.busca {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.busca input {
    max-width: 420px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.admin-table th,
.admin-table td {
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 13px;
    text-align: left;
}

.admin-table th {
    background: #f0f0f0;
}

.link-danger {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-left: 8px;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 800px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        display: block;
    }

    .admin-menu {
        width: 100%;
    }

    .topo-novo {
        flex-direction: column;
        text-align: center;
    }

    .titulo-sistema {
        font-size: 20px !important;
        margin: 10px 0 !important;
    }

    .rodape-novo {
        flex-direction: column;
        text-align: center;
    }

    .form-group-novo select,
    .form-group-novo input[type="text"] {
        max-width: 100%;
    }
}
.linha-botoes {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}
/* Mensagem de documento não encontrado */
.msg-erro-doc {
    background: #fff;
    color: #dc2626;
    padding: 10px 15px;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.msg-erro-icone {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}