/*
    --- Versionamento ---
    11/02/2026 - César - Sol. 24493
    --- Fim Versionamento ---
*/

.container-principal-admin {
    position: relative; 
    margin: 15px 130px; 
    display: block;
    min-height: 400px;
}

#panel_administrativo {
    background-color: transparent;
    width: 100%;
    border-collapse: separate; 
    border-spacing: 15px;
}

#panel_administrativo td {
    height: 100px;
    width: 120px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #cbd5e0; 
    border-bottom: 4px solid #cbd5e0;
    border-radius: 8px;        
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-align: center;
    vertical-align: middle;
    transition:
    transform 0.1s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

#panel_administrativo td::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -15px;
    height: 15px;
    z-index: -1;
    pointer-events: none;
}

#panel_administrativo td:hover {
    transform: translateY(-5px);
    border-top-color: #3282a5;
    border-left-color: #3282a5;
    border-right-color: #3282a5;
    border-bottom-color: #3cb0aa;
    box-shadow: 0 15px 20px -5px rgba(50, 130, 165, 0.2);
    z-index: 10;
}

#panel_administrativo td > a {
    color: #436D87;
    text-decoration: none;
    font-size: 14px; 
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    position: static;
}

#panel_administrativo td > a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }

.grid-permissoes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.input-padrao, 
.select-padrao {
    width: 100%;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    height: 40px;
    font-size: 14px;
    background-color: #fff;
    box-sizing: border-box;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-padrao:focus, 
.select-padrao:focus {
    border-color: #3cb0aa;
    box-shadow: 0 0 0 2px rgba(60, 176, 170, 0.2);
    outline: none;
}

.input-padrao:disabled,
.input-padrao[readonly] {
    background-color: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.text-panel {
    margin-top: 10px;
    text-transform: uppercase;
    font-size: 14px; 
    font-weight: 800; 
    color: #436D87;
}

#titulo_pagina {
    display: flex;
    align-items: center;
    background-color: #436D87;
    border-left: 6px solid #3cb0AA;
    padding: 18px 180px 18px 80px; 
    margin-bottom: 25px;
    font-size: 15px;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 700;
    min-height: 24px; 
    height: 24px;     
    line-height: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    position: relative;
}

#titulo_pagina::before {
    content: ""; 
    display: block;
    width: 50px;
    height: 50px;
    background: url('/Imagens/sh3_logo.png') no-repeat center center;
    background-size: contain; 
    position: absolute;
    left: 15px; 
    top: 50%;
    filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.25));
    transform: translateY(-50%);
    z-index: 1;
}

#titulo_pagina a {
    text-decoration: none;
    color: #a5e0dc;
    font-weight: 500;
}

#titulo_pagina a:hover {
    color: #ffffff; 
    text-decoration: underline;
}

#titulo_pagina a::after {
    content: "/";
    margin: 0 10px;
    color: #6daabf; 
    font-weight: 400;
    display: inline-block;
    pointer-events: none;
}

.titulo_secundario {
    background: linear-gradient(to right, #eef2f6 0%, #ffffff 100%);
    color: #436d87;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-left: 6px solid #3cb0aa;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.descricao-modulo {
    background-color: #f8fafc;
    border-left: 4px solid #6daabf;
    padding: 18px 25px;
    margin-bottom: 25px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.descricao-modulo p:last-child {
    margin-bottom: 0;
}

.barra-acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f5f9;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.barra-acoes p {
    margin: 0;
    color: #475569;
}

.botoes-topo-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    height: 60px; 
    display: flex; 
    align-items: center;
    z-index: 50;
}

.busca-painel {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 5px 15px;
    margin-right: 15px;
    width: 250px;
    transition: all 0.3s ease;
}

.busca-painel:focus-within {
    background-color: #ffffff;
    border-color: #3cb0aa;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#inputBuscaPainel {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    outline: none;
    font-size: 14px;
}

#inputBuscaPainel::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.busca-painel:focus-within #inputBuscaPainel {
    color: #436d87;
}
.busca-painel:focus-within #inputBuscaPainel::placeholder {
    color: #ccc;
}

.btn-busca {
    background: none;
    border: none;
    padding: 0;
    color: #fff;
    cursor: default;
    display: flex;
    align-items: center;
}

.busca-painel:focus-within .btn-busca {
    color: #3cb0aa;
}

.lista-resultados {
    position: absolute;
    top: 120%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.lista-resultados a {
    display: block;
    padding: 10px 15px;
    color: #436d87;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    text-align: left;
}

.lista-resultados a:hover,
.lista-resultados a.selecionado {
    background-color: #eef6f9;
    color: #3cb0aa;
    outline: none;
}

.lista-resultados .sem-resultado {
    padding: 15px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.ajuda-painel,
.perfil-painel {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

.ajuda-painel {
      width: 50px;
}

.perfil-painel {
    width: auto;
    padding: 0 20px;
}

.ajuda-painel:hover,
.perfil-painel:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.icone-ajuda svg,
.perfil-trigger svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.perfil-trigger {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px;
}

.nome-login {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    margin: 0;
    padding-top: 2px;
}

.menu-dropdown-ajuda,
.menu-dropdown-perfil {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-top: 3px solid #3cb0AA;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    z-index: 100;
}

.ajuda-painel:hover .menu-dropdown-ajuda,
.perfil-painel:hover .menu-dropdown-perfil {
    display: block;
}

.menu-dropdown-ajuda a,
.menu-dropdown-perfil a {
    display: block;
    padding: 12px 15px;
    color: #436D87;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.menu-dropdown-ajuda a:hover,
.menu-dropdown-perfil a:hover {
    background-color: #eef6f9;
    color: #3cb0AA;
}

.menu-dropdown-perfil a.item-logout {
    color: #d32f2f;
}

.menu-dropdown-perfil a.item-logout:hover {
    background-color: #ffebee;
    color: #b71c1c;
}

.aviso,
.aviso-esic,
.atrasado {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #ddd;
    border-left-width: 6px;
    border-left-style: solid;
}

.aviso { 
    background-color: #eef6f9; 
    border-left-color: #3282A5; 
    color: #1c4e66;
}

.aviso-esic { 
    background-color: #fffde7; 
    border-left-color: #fbc02d; 
    color: #854d0e; 
}

.atrasado { 
    background-color: #ffebee; 
    border-left-color: #d32f2f; 
    color: #b71c1c; 
}

/* --- MINIATURA DE ÁLBUM E GALERIA --- */
.miniatura-album {
    width: 60px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    margin: 5px;
    flex-shrink: 0;
}

.sem-miniatura {
    width: 60px;
    height: 50px;
    border-radius: 6px;
    border: 1px dashed #cbd5e0;
    background-color: #f1f5f9;
    margin: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
    text-transform: uppercase;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge-success:hover {
    background-color: #c8e6c9;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.badge-danger:hover {
    background-color: #ffcdd2;
}

.texto-inativo {
    color: #475569;
    opacity: 0.7;
}

.sem-registros {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-style: italic;
    color: #64748b;
    border: 1px dashed #cbd5e0;
    background-color: #f8fafc;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.95rem;
    min-height: 15vh;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.item-permissao {
    padding: 8px 10px;
    transition: background-color 0.2s, transform 0.1s;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.item-permissao:hover {
    background-color: #f1f5f9;
    transform: translateX(3px);
}

@media (max-width: 1366px) {
    .container-principal-admin {
        margin: 15px 50px;
    }
}

@media (max-width: 768px) {
    .aviso {
        display: none !important;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .col-span-1, .col-span-2, .col-span-3, .col-span-4 {
        grid-column: span 1;
    }

    .container-principal-admin {
        margin: 10px;
        width: auto;
        overflow-x: hidden;
    }

    #panel_administrativo,
    #panel_administrativo tbody,
    #panel_administrativo tr {
        display: block;
        width: 100%;
    }

    #panel_administrativo tbody {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }

    #panel_administrativo td {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: auto;
        height: auto;
        min-height: 120px;
        margin: 0;
        box-sizing: border-box;
    }

    #titulo_pagina {
        flex-direction: column;
        text-align: center;
        padding: 60px 10px 10px 10px;
        height: auto;
    }

    #titulo_pagina::before {
        left: 50%;
        transform: translateX(-50%);
        top: 10px;
    }
    
    .botoes-topo-wrapper {
        position: static !important;
        width: 100%;
        box-sizing: border-box;
        height: auto;
        display: flex;
        flex-direction: column;
        margin-top: 15px;
        background: #f8f9fa;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #eee;
    }

    .busca-painel {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        background-color: #fff;
        border: 1px solid #cbd5e0;
        border-radius: 6px;
        height: 45px;
        box-sizing: border-box;
    }
    
    #inputBuscaPainel {
        color: #333;
    }
    
    #inputBuscaPainel::placeholder {
        color: #999;
    }
    
    .btn-busca {
        color: #436d87;
    }

    .barra-acoes {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .lista-resultados {
        position: absolute;
        width: 100%;
        z-index: 5000;
    }

    .ajuda-painel, 
    .perfil-painel {
        position: relative !important;
        width: 100%;
        display: block;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        margin-bottom: 10px;
        padding: 0;
        height: auto;
    }

    .icone-ajuda,
    .perfil-trigger {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 15px;
        width: 100%;
        box-sizing: border-box;
        height: 50px;
    }

    .icone-ajuda svg,
    .perfil-trigger svg {
        fill: #436d87;
        margin-right: 10px;
    }

    .nome-login {
        display: inline-block !important;
        color: #333;
        margin: 0;
    }

    .icone-ajuda::after {
        content: "Central de Ajuda";
        color: #333;
        font-weight: 700;
        font-size: 14px;
    }

    .menu-dropdown-ajuda,
    .menu-dropdown-perfil {
        position: static !important;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
        background: #fafafa;
        display: none;
    }

    .ajuda-painel:hover .menu-dropdown-ajuda,
    .perfil-painel:hover .menu-dropdown-perfil {
        display: none;
    }

    .ajuda-painel.ativo .menu-dropdown-ajuda,
    .perfil-painel.ativo .menu-dropdown-perfil {
        display: block !important;
    }

    .ajuda-painel.ativo,
    .perfil-painel.ativo {
        border-color: #3cb0aa;
        background-color: #f0fdfa;
    }

    .menu-dropdown-ajuda a,
    .menu-dropdown-perfil a {
        padding: 15px;
        border-bottom: 1px solid #e0e0e0;
        display: block;
        color: #333;
        padding-left: 45px;
    }
}