/* ========== SIDEBAR THEMES CSS ========== */
/* Arquivo único contendo todos os temas para os diferentes níveis de acesso */

/* Estilos Base para Sidebar (compartilhado entre todos os temas) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 70px;
    background-color: #1e3a5f;
    color: #fff;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
    padding-top: 60px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar.expanded {
    width: 240px;
}

/* Estilo para o botão de toggle do sidebar em dispositivos móveis */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1002;
    font-size: 1.5rem;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: none;
}

/* Dashboard - Seção principal no topo */
.sidebar-dashboard {
    padding: 15px 0;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-dashboard-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    height: 50px;
}

.sidebar-dashboard-link i {
    font-size: 1.8rem;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sidebar-dashboard-link span {
    display: none;
    margin-left: 15px;
}

.sidebar.expanded .sidebar-dashboard-link {
    justify-content: flex-start;
    padding-left: 20px;
}

.sidebar.expanded .sidebar-dashboard-link span {
    display: inline;
}

/* Seções organizadas em cards */
.sidebar-section {
    margin: 2px 4px 8px 4px;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-section-title {
    padding: 12px 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: none;
}

.sidebar.expanded .sidebar-section-title {
    display: block;
    text-align: left;
    padding-left: 15px;
}

.sidebar-section-content {
    padding: 0;
}

/* Itens de menu dentro das seções */
.sidebar-menu-item {
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    opacity: 0.9;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    height: 55px;
}

.sidebar.expanded .sidebar-menu-item {
    justify-content: flex-start;
    padding-left: 20px;
}

.sidebar-menu-item:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
}

.sidebar-menu-item.active {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.sidebar-menu-item i {
    font-size: 1.4rem;
    text-align: center;
    min-width: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sidebar-menu-item span {
    display: none;
    margin-left: 15px;
}

.sidebar.expanded .sidebar-menu-item span {
    display: inline;
}

/* Tooltip para sidebar quando não expandido - SOLUÇÃO FUNCIONAL */
.sidebar:not(.expanded) .sidebar-menu-item .tooltip {
    position: absolute;
    left: 75px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Seta do tooltip */
.sidebar:not(.expanded) .sidebar-menu-item .tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #333;
}

/* Mostrar tooltip no hover - MÁXIMA ESPECIFICIDADE */
.sidebar:not(.expanded) .sidebar-menu-item:hover .tooltip {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Esconder tooltips quando sidebar expandido */
.sidebar.expanded .sidebar-menu-item .tooltip {
    display: none !important;
}

/* Responsividade */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar.expanded {
        width: 240px;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

/* Estilos para dispositivos muito pequenos */
@media (max-width: 576px) {
    .sidebar {
        width: 70px;
        opacity: 0;
    }
    
    .sidebar.expanded {
        width: 240px;
        opacity: 1;
    }
}

/* ========== TEMAS ESPECÍFICOS POR NÍVEL DE ACESSO ========== */

/* 1. TEMA ADMINISTRADOR - Tons de Azul */
.sidebar.admin-theme {
    background-color: #1e3a5f;
}

.sidebar.admin-theme .sidebar-dashboard {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

.sidebar.admin-theme .sidebar-section.atendimento {
    background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
}

.sidebar.admin-theme .sidebar-section.cadastros {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

.sidebar.admin-theme .sidebar-section.clinica {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
}

.sidebar.admin-theme .sidebar-section.financeiro {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.sidebar.admin-theme .sidebar-section.configuracoes {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

/* 2. TEMA GERENTE - Tons de Verde Água */
.sidebar.gerente-theme {
    background-color: #00695c;
}

.sidebar.gerente-theme .sidebar-dashboard {
    background-color: #009688;
}

.sidebar.gerente-theme .sidebar-section.atendimento {
    background-color: #26a69a;
}

.sidebar.gerente-theme .sidebar-section.cadastros {
    background-color: #4db6ac;
}

.sidebar.gerente-theme .sidebar-section.clinica {
    background-color: #80cbc4;
}

.sidebar.gerente-theme .sidebar-section.financeiro {
    background-color: #26a69a;
}

.sidebar.gerente-theme .sidebar-section.configuracoes {
    background-color: #00897b;
}

/* 3. TEMA VETERINÁRIO - Tons de Verde */
.sidebar.veterinario-theme {
    background-color: #2e7d32;
}

.sidebar.veterinario-theme .sidebar-dashboard {
    background-color: #4caf50;
}

.sidebar.veterinario-theme .sidebar-section.atendimento {
    background-color: #66bb6a;
}

.sidebar.veterinario-theme .sidebar-section.cadastros {
    background-color: #81c784;
}

.sidebar.veterinario-theme .sidebar-section.clinica {
    background-color: #a5d6a7;
}

.sidebar.veterinario-theme .sidebar-section.financeiro {
    background-color: #66bb6a;
}

.sidebar.veterinario-theme .sidebar-section.configuracoes {
    background-color: #43a047;
}

/* 4. TEMA RECEPCIONISTA - Tons de Laranja */
.sidebar.recepcionista-theme {
    background-color: #e65100;
}

.sidebar.recepcionista-theme .sidebar-dashboard {
    background-color: #ff9800;
}

.sidebar.recepcionista-theme .sidebar-section.atendimento {
    background-color: #ffa726;
}

.sidebar.recepcionista-theme .sidebar-section.cadastros {
    background-color: #ffb74d;
}

.sidebar.recepcionista-theme .sidebar-section.clinica {
    background-color: #ffcc80;
}

.sidebar.recepcionista-theme .sidebar-section.financeiro {
    background-color: #ffa726;
}

.sidebar.recepcionista-theme .sidebar-section.configuracoes {
    background-color: #fb8c00;
}

/* 5. TEMA AUXILIAR - Tons de Roxo */
.sidebar.auxiliar-theme {
    background-color: #6a1b9a;
}

.sidebar.auxiliar-theme .sidebar-dashboard {
    background-color: #9c27b0;
}

.sidebar.auxiliar-theme .sidebar-section.atendimento {
    background-color: #ab47bc;
}

.sidebar.auxiliar-theme .sidebar-section.cadastros {
    background-color: #ba68c8;
}

.sidebar.auxiliar-theme .sidebar-section.clinica {
    background-color: #ce93d8;
}

.sidebar.auxiliar-theme .sidebar-section.financeiro {
    background-color: #ab47bc;
}

.sidebar.auxiliar-theme .sidebar-section.configuracoes {
    background-color: #8e24aa;
}

/* Ajustes para visibilidade de texto */
.sidebar-section-title,
.sidebar-menu-item,
.sidebar-dashboard-link {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 1px rgb(10, 11, 11);
    letter-spacing: 1px;
}