/* ==========================================================================
   1. ESTRUTURA GLOBAL E FLEXBOX (FOOTER NO FUNDO)
   ========================================================================== */
html, body {
    height: 100%;
    margin: 0;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

#content {
    flex: 1 0 auto;
    padding-bottom: 40px;
    transition: all 0.3s;
}

.main-content {
    flex: 1 0 auto;
}

footer.section {
    flex-shrink: 0;
    background-color: #344f8a;
    color: white;
    width: 100%;
    padding: 40px 0;
    margin-top: auto;
}

/* ==========================================================================
   2. COLUNA LATERAL (SIDEBAR) E PERFIL
   ========================================================================== */
#column-left {
    width: 50px;
    min-height: 100%;
    background-color: #2c3e66;
    position: absolute;
    top: 0px;
    padding-top: 50px;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

#column-left.active {
    width: 235px;
    display: block;
    height: 100%;
}

/* Scrollbar Customizada Sidebar */
#column-left::-webkit-scrollbar {
    width: 5px;
}
#column-left::-webkit-scrollbar-track {
    background: transparent;
}
#column-left::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Área de Perfil */
#profile {
    display: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#column-left.active #profile {
    display: block;
    padding: 20px 15px;
    overflow: auto;
}

#profile div {
    float: left;
    color: #ffffff;
}

#profile div + div {
    margin-left: 15px;
}

#profile h4 {
    margin-top: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 2px;
}

#profile small {
    color: rgba(255,255,255,0.6);
    margin-left: 0;
}

/* ==========================================================================
   3. MENU DA SIDEBAR (DOIS TONS E SUBMENUS)
   ========================================================================== */
#menu, #menu ul, #menu li {
    list-style: none;
    padding: 0;
}

#menu {
    margin-bottom: 25px;
    margin-top: 10px;
}

#menu .panel-default {
    background: transparent;
    border: none;
    margin: 4px 8px;
}

#menu .panel-heading {
    background: transparent !important;
    border: none !important;
    padding: 0;
    transition: all 0.2s;
    border-bottom: none !important; /* Removendo borda extra */
}

#menu .panel-title {
    color: rgba(255,255,255,0.8) !important;
    font-size: 13px;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    margin-left: 0;
}

#menu .panel-heading:hover .panel-title {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

#menu .panel-title i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    margin-right: 12px;
}

/* Submenus */
.list-group-item {
    background: rgba(0,0,0,0.2) !important;
    color: rgba(255,255,255,0.7) !important;
    border: none !important;
    margin: 2px 5px !important;
    padding: 10px 15px 10px 45px !important;
    font-size: 12px;
    border-radius: 6px !important;
}

.list-group-item:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}

#menu .list-group-item {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Remove linhas do menu principal */
#menu .panel-collapse, #menu .list-group, #menu li ul, #menu li a {
    border: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

/* ==========================================================================
   4. COMPORTAMENTO DA BARRA RECOLHIDA (NOT ACTIVE)
   ========================================================================== */
#column-left:not(.active) #menu .panel-title span {
    display: none;
}

#column-left:not(.active) #menu .panel-title {
    padding: 12px 0 !important;
    justify-content: center !important;
    width: 100%;
}

#column-left:not(.active) #menu .panel-title i {
    margin-right: 0 !important;
    width: 50px;
    text-align: center;
}

#column-left:not(.active) .panel-collapse,
#column-left:not(.active) .list-group,
#column-left:not(.active) ul li ul,
#column-left:not(.active) .panel-title:after,
#column-left:not(.active) .parent:after {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ==========================================================================
   5. MIOLO DO SISTEMA (PAINÉIS, BOTÕES E COMPONENTES)
   ========================================================================== */
.panel {
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.panel-heading {
    background-color: #344f8a;
    border-color: #2c4375;
    color: white;
}


.panel-title {
    color: black;
}

/* Links dentro do heading */
.panel-heading a:hover, .panel-heading a:focus {
    color: white;
    text-decoration: none !important;
}

/* Estilo para Títulos sem Hover */
.panel-title, .panel-title:hover {
    background: none !important;
    color: inherit !important;
    text-decoration: none !important;
}

/* Botões */
.btn-primary {
    color: #fff;
    background-color: #344f8a;
    border-color: #344f8a;
}



.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}

.pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover {
    background-color: #344f8a;
    border-color: #344f8a;
}

/* Sobrescrevendo os estados do botão primário para o azul desejado */
/*.btn-primary.active,
.btn-primary:active,
.btn-primary:hover,
.btn-primary:focus,
.open > .btn-primary.dropdown-toggle {
    color: #fff !important;
    background-color: #344f8a !important; !* A cor que você escolheu *!
    border-color: #2b4172 !important;     !* Um tom levemente mais escuro para a borda *!
}

!* Garante que o efeito de "sombra" ao clicar não use o azul claro antigo *!
.btn-primary:active:hover,
.btn-primary:active:focus,
.btn-primary.active:hover,
.btn-primary.active:focus {
    background-color: #2b4172 !important;
    border-color: #24365f !important;
}*/

/* Outros componentes */
a { color: #344f8a; }

#disabled {
    pointer-events: none;
    cursor: not-allowed;
    background: #eee;
}

.floating-button {
    position: fixed;
    width: auto;
    right: 22px;
    padding: 13px;
    background-color: #fff;
    border: #eee 1px solid;
    border-radius: 10px;
    text-align: center;
    box-shadow: 3px 3px 3px #999;
    z-index: 999;
}

.table thead td span[data-toggle="tooltip"]:after,
label.control-label span:after {
    font-family: FontAwesome;
    color: #1E91CF;
    content: "\f059";
    margin-left: 4px;
}

.img-eventos {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.cke_notifications_area {
    display: none !important;
}

/* ==========================================================================
   6. AJUSTES DE MARGEM, BOTÃO MENU E RESPONSIVIDADE
   ========================================================================== */
#button-menu {
    padding: 14px 17px 9px 17px;
    line-height: 25px;
    float: left;
    display: inline-block;
    cursor: pointer;
    color: #344f8a;
    border-right: 1px solid #E1E1E1;
}

#button-menu:hover {
    background-color: rgba(52, 79, 138, 0.05);
}

#column-left + #content,
#column-left + #content + #footer {
    margin-left: 50px;
}

.col-md-offset-2 { margin-left: 50px; }
.col-md-8 { width: 100%; }

/* Media Queries Desktop Active */
@media (min-width: 768px) {
    #column-left.active { overflow: auto; }
    #column-left.active + #content,
    #column-left.active + #content + #footer {
        margin-left: 235px;
    }
    .col-md-offset-2 { margin-left: 50px; }
}

/* Media Queries Mobile */
@media (max-width: 767px) {
    #column-left { overflow: hidden; display: none; }
    #column-left + #content, #column-left + #content + #footer { margin-left: 0; }
    #column-left.active + #content,
    #column-left.active + #content + #footer {
        position: relative;
        left: 235px;
    }
    .col-md-offset-2 { margin-left: 0px; }
}

/* ==========================================================================
   1. PAINÉIS (REGRAS SEGURAS)
   ========================================================================== */
.panel {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

/* USANDO SELETOR DE ESPECIFICIDADE:
   Aqui dizemos: "Pinte de azul apenas se o #form-style estiver dentro do #content
   e NÃO possuir um style de background definido diretamente na tag (comum em eventos)"
*/
#content #form-style:not([style*="background"]) {
    background-color: #344f8a !important;
    border-color: #2c4375 !important;
    color: white !important;
    padding: 15px 20px;
}

/* Removemos o hover apenas para o Admin */
#content #form-style:not([style*="background"]):hover {
    background-color: #344f8a !important;
    cursor: default;
}

/* Garante que o texto seja branco apenas no Admin */
#content #form-style:not([style*="background"]) h4,
#content #form-style:not([style*="background"]) .panel-title {
    margin: 0;
    font-weight: 600;
    color: white !important;
    display: inline-block;
}

/* ==========================================================================
   2. ESTILIZAÇÃO DA TABELA (NEUTRA)
   ========================================================================== */
.table-responsive {
    border: none !important;
    margin-top: 10px;
}

table.dataTable {
    border-collapse: collapse !important;
    border: none !important;
}

/* Header da Tabela - Cinza neutro */
table.dataTable thead tr td,
table.dataTable thead tr th {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 12px 15px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none !important;
}

/* Linhas e Hover */
table.dataTable tbody tr td {
    padding: 12px 15px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f4f8 !important;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc !important;
}

/* ==========================================================================
   3. BOTÕES E COMPONENTES
   ========================================================================== */
.btn {
    border-radius: 6px !important;
    font-weight: 500;
}

.btn-primary {
    background-color: #344f8a;
    border-color: #344f8a;
}

/* Botão de Eventos Antigos: Só fica transparente/branco se estiver no Admin Azul */
#content #form-style:not([style*="background"]) .btn-default {
    background-color: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: white !important;
}

.pagination > .active > a {
    background-color: #344f8a !important;
    border-color: #344f8a !important;
}


     /* Container do Switch que permite clique na linha toda */
 .switch-container {
     display: flex;
     align-items: center;
     justify-content: space-between;
     background: #f9f9f9;
     padding: 10px 15px;
     border-radius: 4px;
     border: 1px solid #ddd;
     margin-bottom: 10px;
     cursor: pointer;
     transition: all 0.2s;
 }
.switch-container:hover {
    background: #f0f0f0;
    border-color: #004a8d;
}
.switch-label-text {
    font-weight: bold;
    flex: 1;
    cursor: pointer;
}
/* Esconde o checkbox original */
.switch-input { display: none; }
/* Visual do Slider */
.switch-slider {
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    position: relative;
    display: inline-block;
    transition: .4s;
}
.switch-slider:before {
    content: "";
    position: absolute;
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}
.switch-input:checked + .switch-slider { background-color: #28a745; }
.switch-input:checked + .switch-slider:before { transform: translateX(20px); }

/* Container principal com leve sombra */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Efeito de hover */
.switch-container:hover {
    border-color: #004a8d;
    background: #fcfcfc;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Muda a cor do fundo quando o checkbox dentro dele estiver marcado */
.switch-container:has(input:checked) {
    background-color: #f0fdf4; /* Verde bem clarinho */
    border-color: #28a745;
}

.switch-label-text {
    font-weight: 600;
    color: #444;
    font-size: 13px;
    flex: 1;
}

/* Estilo do Slider (Botão) */
.switch-slider {
    width: 38px;
    height: 20px;
    background-color: #d1d1d1;
    border-radius: 20px;
    position: relative;
    transition: .3s;
}

.switch-slider:before {
    content: "";
    position: absolute;
    height: 14px; width: 14px;
    left: 3px; bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

.switch-input:checked + .switch-slider {
    background-color: #28a745;
}

.switch-input:checked + .switch-slider:before {
    transform: translateX(18px);
}

