        .sidebar {
            transition: all 0.3s;
        }
        .sidebar.collapsed {
            width: 70px;
        }
        .sidebar.collapsed .sidebar-text {
            display: none;
        }
        .sidebar.collapsed .logo-text {
            display: none;
        }
        .sidebar.collapsed .menu-item {
            justify-content: center;
        }
        .main-content {
            transition: all 0.3s;
        }
        .sidebar.collapsed + .main-content {
            margin-left: 70px;
        }
        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            font-size: 10px;
            background-color: #ef4444;
        }
        .fade-in {
            animation: fadeIn 0.3s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @media print {
            .no-print {
                display: none !important;
            }
            body, html {
                background: white !important;
            }
            .main-content {
                margin-left: 0 !important;
                width: 100% !important;
            }
        }
        .auth-container {
            max-width: 400px;
            margin: 0 auto;
            padding: 2rem;
            border-radius: 0.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

@media print {
    body * {
        visibility: hidden;
    }
    .print-container, .print-container * {
        visibility: visible;
    }
    .print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
}

/* Estilo para itens de menu e botões de planos superiores */
.feature-bloqueada {
    opacity: 0.5; /* Deixa o item meio transparente/cinza */
    cursor: not-allowed; /* O cursor do mouse vira um sinal de 'proibido' */
}

/* --- NOVO ESTILO PARA LOGIN/REGISTER (Glassmorphism) --- */
        
        /* Animação do Fundo Gradiente */
        .animated-bg {
            background: linear-gradient(-45deg, #1e3a8a, #2563eb, #3b82f6, #06b6d4, #7c3aed);
            background-size: 400% 400%;
            animation: gradientBG 15s ease infinite;
            position: relative;
            overflow: hidden;
        }

        /* Partículas flutuantes (opcional, para dar profundidade) */
        .animated-bg::before {
            content: "";
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background-image: 
                radial-gradient(circle at 15% 50%, rgba(255,255,255,0.1) 0%, transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(255,255,255,0.1) 0%, transparent 25%);
            pointer-events: none;
        }

        @keyframes gradientBG {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* Cartão de Vidro (Glassmorphism) */
        .glass-card {
            background: rgba(255, 255, 255, 0.85); /* Branco com transparência */
            backdrop-filter: blur(12px);            /* O desfoque atrás do vidro */
            -webkit-backdrop-filter: blur(12px);    /* Safari support */
            border: 1px solid rgba(255, 255, 255, 0.6);
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
            border-radius: 1rem;
        }

        /* Ajuste nos inputs para combinar */
        .glass-input {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid #e2e8f0;
            transition: all 0.3s ease;
        }
        .glass-input:focus {
            background: #fff;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
            border-color: #3b82f6;
        }

        /* Keep only the custom login password toggle icon */
        #login-password::-ms-reveal,
        #login-password::-ms-clear {
            display: none;
        }
/* --- UPGRADE DE INTERFACE (UI/UX) --- */

        /* 1. Efeito de "Levitação" nos Cards do Dashboard */
        /* Faz os cards subirem levemente e ganharem sombra ao passar o mouse */
        #dashboard-content .bg-white.rounded-lg.shadow {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: default;
        }
        #dashboard-content .bg-white.rounded-lg.shadow:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
            border-color: #3b82f6; /* Borda azul sutil */
        }

        /* 2. Menu Lateral (Sidebar) com Gradiente Profundo */
        /* Substitui o azul sólido por um gradiente profissional */
        .sidebar {
            background: linear-gradient(180deg, #1e3a8a 0%, #172554 100%) !important;
            box-shadow: 4px 0 24px rgba(0,0,0,0.15);
        }
        
        /* Item de menu ativo com efeito de brilho */
        .sidebar .menu-item.bg-blue-900 {
            background: rgba(255, 255, 255, 0.15) !important;
            border-left: 4px solid #60a5fa; /* Barra azul clara na esquerda */
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }
        
        /* 3. Animação de Entrada dos Modais (Pop-in) */
        /* Faz os modais surgirem suavemente em vez de aparecerem secos */
        
        @keyframes modalPop {
            0% {
                opacity: 0;
                transform: scale(0.95) translateY(10px);
            }
            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        /* Aplica a animação em todos os modais */
        [id$="-modal"] > div { 
            /* Seleciona a div branca dentro de qualquer ID que termine com "-modal" */
            animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        /* 4. Tabelas mais elegantes */
        tbody tr {
            transition: background-color 0.2s ease;
        }
        tbody tr:hover {
            background-color: #f8fafc !important; /* Cinza muito suave no hover */
            transform: scale(1.002); /* Expansão imperceptível para dar destaque */
        }

        /* 5. Scrollbar Personalizada (Para navegadores baseados em Chrome/Edge) */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        ::-webkit-scrollbar-track {
            background: #f1f1f1; 
        }
        ::-webkit-scrollbar-thumb {
            background: #cbd5e1; 
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #94a3b8; 
        }

@media print {
        /* Força a impressão de fundos e cores exatas */
        body {
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
        }
        
        /* Garante que as linhas da tabela sejam pretas */
        table, td, tr {
            border-color: #000 !important;
        }
    }

/* --- ESTILO PARA TOOLTIPS (ATUALIZADO E CORRIGIDO) --- */
.tooltip-container {
    position: relative;
    display: inline-flex; /* Mudado para inline-flex para alinhar melhor com texto */
    align-items: center;
    cursor: help;
    vertical-align: middle;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1e293b; /* Slate 800 */
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px; /* Mais espaçamento */
    position: absolute;
    z-index: 9999; /* Z-index altíssimo para ficar por cima de tudo */
    bottom: 135%; /* Um pouco mais alto */
    left: 50%;
    transform: translateX(-50%); /* Centraliza perfeitamente */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 0.75rem;
    font-weight: normal;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    pointer-events: none; /* Garante que o mouse não trave no balão */
    white-space: normal; /* Garante que o texto quebre linha */
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.help-center-shell {
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.support-submenu {
    border-left: 1px solid rgba(147, 197, 253, 0.25);
}

.sidebar.collapsed .support-submenu {
    display: none !important;
}

#suporte-btn[aria-expanded="true"] #support-menu-chevron {
    transform: rotate(180deg);
}

.help-chapter-item {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    background: #ffffff;
    padding: 14px 16px;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.help-chapter-item:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
    box-shadow: 0 14px 30px rgba(148, 163, 184, 0.18);
}

.help-chapter-item.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.18);
}

.help-chapter-time {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.65rem;
}

.help-chapter-item.active .help-chapter-time {
    background: #1d4ed8;
    color: #ffffff;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Ajuste específico para tooltips dentro de tabelas para não cortar */
table .tooltip-text {
    min-width: 180px;
}

/* --- CORREÇÃO DE TOOLTIPS EM TABELAS (Evita corte no topo) --- */
table th .tooltip-container .tooltip-text {
    bottom: auto !important;   /* Anula a posição padrão de baixo para cima */
    top: 140% !important;      /* Posiciona abaixo do ícone */
    left: 50%;
    transform: translateX(-50%);
}

/* Corrige a setinha para ficar no topo do balão e apontar para cima */
table th .tooltip-container .tooltip-text::after {
    top: auto !important;
    bottom: 100% !important;   /* Cola a seta no topo do balão */
    border-color: transparent transparent #1e293b transparent !important; /* Inverte a cor da seta */
}

/* Ajuste específico para a coluna 'Diagnóstico' para não cortar na direita se a tela for pequena */
table th:nth-child(5) .tooltip-text {
    left: auto !important;
    right: 0 !important;
    transform: translateX(10%) !important; /* Ajuste fino para esquerda */
}
table th:nth-child(5) .tooltip-text::after {
    left: 80% !important; /* Move a setinha para acompanhar */
}

    
