/* =========================================
   1. VARIÁVEIS GLOBAIS
   ========================================= */
:root {
    --bg-color: #0b1f52;
    --neon-accent: #58ffe6;
    --neon-solid: #03de74;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(88, 255, 230, 0.15);
}

/* =========================================
   2. BASE
   ========================================= */
body {
    background-color: var(--bg-color);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at 50% 50%, #0b1f52 0%, #06112e 100%);
    min-height: 100vh;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(3, 222, 116, 0.3); }

/* =========================================
   3. TIPOGRAFIA E UTILITÁRIOS GERAIS
   ========================================= */
.text-glow { text-shadow: 0 0 10px rgba(88, 255, 230, 0.3); }
.text-neon { color: var(--neon-accent) !important; }
.text-success { color: var(--neon-solid) !important; }
.bg-main { background-color: #050a15 !important; }

/* =========================================
   4. ESTRUTURA E PAINÉIS (ESTRUTURAÇÃO GERAL DAS PÁGINAS)
   ========================================= */
.glass-panel {
    background: linear-gradient(135deg, rgba(11, 31, 82, 0.4), rgba(5, 10, 20, 0.6));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(3, 222, 116, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dashboard-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 255, 230, 0.4);
}

.dash-card-empresa {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--neon-solid);
}

/* =========================================
   5. NAVEGAÇÃO E SIDEBAR
   ========================================= */
.sidebar-wrapper { width: 280px; min-width: 280px; background: transparent; }
.sidebar-header-border { border-color: rgba(3, 222, 116, 0.2) !important; }
.sidebar-footer-border { border-color: rgba(255, 255, 255, 0.05) !important; }
.logo-nav { max-height: 40px; }
.logo-sidebar { max-height: 30px; }
.nav-icon { width: 24px; text-align: center; }
.profile-avatar { width: 35px; height: 35px; font-size: 12px; }

.custom-hover { transition: all 0.3s ease; border-radius: 12px; border: 1px solid transparent; }
.custom-hover:hover { background-color: rgba(3, 222, 116, 0.05); border: 1px solid rgba(3, 222, 116, 0.2); opacity: 1 !important; transform: translateX(5px); }

.active-menu { background-color: rgba(3, 222, 116, 0.1) !important; border-left: 4px solid var(--neon-solid); border-radius: 12px; opacity: 1 !important; }

.custom-toggler { width: 26px; height: 18px; position: relative; background: transparent; cursor: pointer; }
.custom-toggler .toggler-line { position: absolute; left: 0; width: 100%; height: 2px; background-color: #ffffff; border-radius: 2px; }
.custom-toggler .toggler-line:nth-child(1) { top: 0px; }
.custom-toggler .toggler-line:nth-child(2) { top: 8px; }
.custom-toggler .toggler-line:nth-child(3) { top: 16px; }

/* =========================================
   6. BOTÕES E AÇÕES
   ========================================= */
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-radius: 8px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-fechar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-radius: 8px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-custom.btn-neon:hover, .btn-custom.btn-neon:focus {
    color: var(--neon-solid);
    border-color: var(--neon-solid);
    background: rgba(3, 222, 116, 0.1);
    box-shadow: 0 0 15px rgba(3, 222, 116, 0.3);
}

.btn-fechar.btn-danger:hover, .btn-custom.btn-danger:focus {
    color: #ff4d4d;
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

.btn-custom.btn-danger:hover, .btn-custom.btn-danger:focus {
    color: #ff4d4d;
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.3);
}

.btn-custom.btn-warning:hover, .btn-custom.btn-warning:focus {
    color: #ffcc00;
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

.btn-custom.btn-secondary:hover, .btn-custom.btn-secondary:focus {
    color: #8bb4f7;
    border-color: #8bb4f7;
    background: rgba(139, 180, 247, 0.1);
    box-shadow: 0 0 15px rgba(139, 180, 247, 0.3);
}

/* =========================================
   7. RESPONSIVIDADE (AJUSTES MOBILE/TABLET)
   ========================================= */

/* Regras exclusivas para Celulares (telas menores que 768px) */
@media (max-width: 767.98px) {
    .glass-panel {
        border-radius: 16px !important;
        padding: 1.5rem !important; /* Reduz o respiro interno para ganhar espaço */
    }

    h2.text-glow {
        font-size: 1.5rem;
    }

    .table-title {
        font-size: 0.95rem;
    }

    /* Botões 100% de largura apenas em celulares */
    .btn-custom {
        width: 100%; 
        padding: 12px 20px;
    }

    /* Remove a margem extra do último botão para não quebrar o layout */
    .btn-custom:last-child {
        margin-bottom: 0;
    }

    .page-header-mobile {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
        text-align: center;
    }

    .table-responsive {
        padding-bottom: 10px;
    }

    .custom-table tbody td {
        padding: 12px 10px;
    }

    .pagination-container .btn-custom {
        width: auto; 
        padding: 8px 14px; /* Deixa o botão um pouco menorzinho pra caber na tela */
    }
}

/* Regras exclusivas para Tablets (telas entre 768px e 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .btn-custom {
        padding: 8px 16px;
        font-size: 0.85rem;
        /* Garante que os botões não fiquem gigantes como no celular */
        width: auto; 
    }
}

/* =========================================
   8. FULL SCREEN LOADER (OVERLAY)
   ========================================= */
main.glass-panel {
    position: relative; 
}

#loader-overlay {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 31, 82, 0.4), rgba(5, 10, 20, 0.6));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: none; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50; 
    border-radius: inherit; 
    transition: opacity 0.3s ease;
}

.loader-content {
    text-align: center;
}

.loader-content .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.3em;
    filter: drop-shadow(0 0 10px var(--neon-solid));
}

/* =========================================
   9. MODAL NEON / GLASS
   ========================================= */
.modal-content.glass-modal {
    background: linear-gradient(135deg, rgba(11, 31, 82, 0.95), rgba(5, 10, 20, 0.98));
    backdrop-filter: blur(20px);
    border: 1px solid #ffcc00; 
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    color: #ffffff;
}

.modal-backdrop.show {
    opacity: 0.7; 
}

.glass-modal.modal-success {
    border: 1px solid var(--neon-solid); 
}

/* =========================================
   MENSAGEM DE ERRO GLOBAL
   ========================================= */
.error-message-custom {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

/* =========================================
CUSTOM SWITCHES (DIAS DA SEMANA) - ATUALIZADO
========================================= */

.custom-switch .form-check-input,
.custom-switch .form-check-input:checked,
.custom-switch .form-check-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

.custom-switch .form-check-input {
    background-color: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255, 255, 255, 0.1);
    width: 2.8em; 
    height: 1.4em;
    cursor: pointer;
    margin-top: 0.1em; 
    margin-right: 0.5em; 
}

.custom-switch .form-check-input:checked {
    background-color: var(--neon-solid) !important; 
    border-color: var(--neon-solid) !important;
}

.custom-switch .form-check-input:focus {
    box-shadow: 0 0 10px rgba(3, 222, 116, 0.3) !important;
}

.custom-switch .form-check-label {
    cursor: pointer;
    padding-top: 3px; 
}
