/* Reset e configurações globais - Padrão Fadelito */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 16px;
}

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Layout com sidebar */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Botão de Logout - Garantir visibilidade */
.nav-logout,
.logout-button {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.logout-button:hover {
    background: rgba(231, 76, 60, 0.1) !important;
    color: #e74c3c !important;
}

.nav-item .logout-button {
    transition: all 0.3s ease;
}

.nav-item .logout-button:hover {
    padding-left: 25px !important;
    background: rgba(231, 76, 60, 0.1) !important;
}

/* Sidebar - Estilo Fadelito */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 50%, #3498db 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-right: 3px solid #3498db;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

.sidebar-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
    padding: 8px;
    margin: 0 auto 15px;
    display: block;
    object-fit: contain;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 3px solid #3498db;
}

.sidebar-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sidebar-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
}

.sidebar-user {
    padding: 20px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(41, 128, 185, 0.3) 100%);
    margin: 15px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}

.sidebar-user strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.sidebar-user small {
    opacity: 0.8;
    font-size: 0.8rem;
}

.sidebar-nav {
    padding: 0 15px;
    margin-top: 10px;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.4) 0%, rgba(41, 128, 185, 0.4) 100%);
    color: white;
    transform: translateX(8px);
    border-color: rgba(255,255,255,0.3);
}

.nav-link.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    border-color: rgba(255,255,255,0.5);
}

.nav-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 18px;
    text-align: center;
}

/* Conteúdo principal */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Header do conteúdo */
.content-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    overflow: hidden;
}

.content-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9, #1abc9c);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.header-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #3498db;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-content {
    padding: 30px;
}

.card-header {
    padding: 25px 30px;
    border-bottom: 1px solid #ecf0f1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.card-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Grid de estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #3498db;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 10px;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

.stat-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Formulários */
.form-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(52, 152, 219, 0.1);
    margin-bottom: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #2c3e50;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #bdc3c7;
    font-size: 0.95rem;
}

/* Botões - Estilo Fadelito com Hierarquia de Cores Profissional */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    margin: 8px;
    gap: 10px;
    min-height: 56px;
    min-width: 200px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(-1px);
}

/* Botões Específicos do Dashboard - Hierarquia Visual Profissional */

/* Azul Claro - Visitas */
.btn-visitas {
    background: linear-gradient(135deg, #7DD3FC 0%, #38BDF8 100%);
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(125, 211, 252, 0.4);
}

.btn-visitas:hover {
    background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
}

/* Azul Médio - Planejamento */
.btn-planejamento {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-planejamento:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

/* Laranja - Chamados */
.btn-chamados {
    background: linear-gradient(135deg, #FB923C 0%, #F97316 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.4);
}

.btn-chamados:hover {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
}

/* Verde - QR Code */
.btn-qrcode {
    background: linear-gradient(135deg, #4ADE80 0%, #22C55E 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.btn-qrcode:hover {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

/* Cinza Claro - Relatórios */
.btn-relatorios {
    background: linear-gradient(135deg, #A1A1AA 0%, #71717A 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(161, 161, 170, 0.4);
}

.btn-relatorios:hover {
    background: linear-gradient(135deg, #71717A 0%, #52525B 100%);
    box-shadow: 0 8px 25px rgba(113, 113, 122, 0.5);
}

/* Roxo Sóbrio - Usuários */
.btn-usuarios {
    background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.4);
}

.btn-usuarios:hover {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

/* Vermelho - Aniversariantes */
.btn-aniversariantes {
    background: linear-gradient(135deg, #F87171 0%, #EF4444 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4);
}

.btn-aniversariantes:hover {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

/* Botões Genéricos */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

/* Melhorias específicas para botão logout no mobile */
.logout-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.logout-button:hover, .logout-button:focus {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5) !important;
}

.logout-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
}

/* Responsividade específica para mobile */
@media (max-width: 768px) {
    .logout-button {
        min-height: 56px !important;
        padding: 16px 20px !important;
        font-size: 1.1rem !important;
        margin: 8px 0 80px 0 !important; /* Aumentar margin-bottom para espaçamento da navegação mobile */
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .nav-buttons .logout-button {
        order: 999 !important; /* Colocar no final */
        margin-top: 20px !important;
        margin-bottom: 80px !important; /* Garantir espaço para navegação mobile */
        border-top: 2px solid rgba(239, 68, 68, 0.2) !important;
        padding-top: 20px !important;
    }

    /* Adicionar padding-bottom ao sidebar para garantir visibilidade */
    .sidebar {
        padding-bottom: 100px !important;
    }

    .sidebar-nav {
        padding-bottom: 80px !important;
    }
}

@media (max-width: 480px) {
    .logout-button {
        min-height: 52px !important;
        padding: 14px 18px !important;
        font-size: 1rem !important;
    }
}

.btn-success {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4B5563 0%, #374151 100%);
    box-shadow: 0 8px 25px rgba(75, 85, 99, 0.5);
}

.btn-info {
    background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891B2 0%, #0E7490 100%);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.5);
}

/* Manter compatibilidade com classes antigas */
.btn-purple {
    background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.4);
}

.btn-purple:hover {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-birthday {
    background: linear-gradient(135deg, #F87171 0%, #EF4444 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4);
}

.btn-birthday:hover {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

        .aniversariante-item {
            border-left: 4px solid #e74c3c;
            background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
            animation: birthday-highlight 2s ease-in-out infinite alternate;
        }

        @keyframes birthday-highlight {
            0% { box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2); }
            100% { box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4); }
        }

        /* Animações para lembretes */
        .lembrete-visita {
            background: linear-gradient(135deg, #e8f5e8 0%, #d4f1d4 100%);
            border: 2px solid #27ae60;
            border-radius: 15px;
            padding: 20px;
            margin: 20px 0;
            animation: pulse-green 2s ease-in-out infinite alternate;
        }

        .lembrete-aniversario {
            background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
            border: 2px solid #e74c3c;
            border-radius: 15px;
            padding: 20px;
            margin: 20px 0;
            animation: pulse-red 2s ease-in-out infinite alternate;
        }

        @keyframes pulse-green {
            0% { 
                transform: scale(1);
                box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
            }
            100% { 
                transform: scale(1.02);
                box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5);
            }
        }

        @keyframes pulse-red {
            0% { 
                transform: scale(1);
                box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
            }
            100% { 
                transform: scale(1.02);
                box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
            }
        }

        /* Melhorias no layout inspirado no Fadelito */
        .brand-header {
            background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
            color: white;
            padding: 15px 0;
            text-align: center;
            box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
        }

        .brand-inspiration {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
            border: 1px solid rgba(39, 174, 96, 0.1);
        }

/* Centralização do header em todas as páginas */
.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (max-width: 768px) {
    .header-content {
        justify-content: center !important;
        text-align: center !important;
        flex-direction: column;
        gap: 10px;
    }

    .header-content .logo {
        margin: 0 auto;
    }
}

/* Responsividade aprimorada */
        @media (max-width: 480px) {
            .sidebar {
                width: 100%;
                transform: translateX(-100%);
            }

            .main-content {
                margin-left: 0;
                padding: 10px;
            }

            .content-header {
                padding: 15px;
                margin-bottom: 15px;
            }

            .header-title {
                font-size: 1.5rem;
            }

            .stats-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .stat-card {
                padding: 20px;
            }

            .stat-number {
                font-size: 2rem;
            }

            .form-section, .table-section, .recent-section {
                padding: 20px;
                margin: 15px 0;
            }

            .nav-buttons {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .btn {
                padding: 12px 16px;
                font-size: 0.9rem;
            }
        }

        /* Melhorias para tablet */
        @media (max-width: 1024px) and (min-width: 769px) {
            .sidebar {
                width: 250px;
            }

            .main-content {
                margin-left: 250px;
                padding: 20px;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .nav-buttons {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* Animações suaves para interações */
        .card, .stat-card, .recent-item, .visit-card, .birthday-card {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .card:hover, .stat-card:hover, .recent-item:hover, 
        .visit-card:hover, .birthday-card:hover {
            transform: translateY(-8px) scale(1.02);
        }

        /* Efeitos de loading */
        .loading {
            opacity: 0.7;
            pointer-events: none;
            position: relative;
        }

        .loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 30px;
            height: 30px;
            margin: -15px 0 0 -15px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #3498db;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
color: white;
}

/*/* Estilos para tabelas */
/* JavaScript functions */
<script>
function toggleSidebar() {
    const sidebar = document.querySelector('.sidebar');
    const overlay = document.querySelector('.sidebar-overlay');

    if (sidebar && overlay) {
        sidebar.classList.toggle('active');
        overlay.classList.toggle('active');
    }
}

// Fechar sidebar ao clicar no overlay
document.addEventListener('DOMContentLoaded', function() {
    const overlay = document.querySelector('.sidebar-overlay');
    if (overlay) {
        overlay.addEventListener('click', function() {
            const sidebar = document.querySelector('.sidebar');
            if (sidebar) {
                sidebar.classList.remove('active');
                overlay.classList.remove('active');
            }
        });
    }
});```python


/* Estilos para tabelas */
.table-container {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Barra de busca */
.search-section, .filter-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Filtros */
.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(135deg, #d5f4e6 0%, #a3e9c4 100%);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fce4a4 100%);
    color: #f39c12;
    border: 1px solid #f39c12;
}

.badge-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #b8daff 100%);
    color: #3498db;
    border: 1px solid #3498db;
}

.badge-secondary {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #6c757d;
    border: 1px solid #6c757d;
}

/* Mensagens de alerta */
.alert {
    padding: 18px 24px;
    border-radius: 15px;
    margin-bottom: 25px;
    font-weight: 500;
    border-left: 4px solid;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.alert-success {
    background: linear-gradient(135deg, #d5f4e6 0%, #a3e9c4 100%);
    color: #27ae60;
    border-left-color: #27ae60;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #e74c3c;
    border-left-color: #e74c3c;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #b8daff 100%);
    color: #3498db;
    border-left-color: #3498db;
}

/* Ações rápidas - Dashboard Profissional */
.actions {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 35px;
    border-radius: 24px;
    margin-top: 30px;
    border: 1px solid rgba(52, 152, 219, 0.08);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.actions h3 {
    margin-bottom: 30px;
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    position: relative;
}

.actions h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    border-radius: 2px;
}

/* Botões de navegação do dashboard com hierarquia visual UX */
.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Cores dos botões seguindo hierarquia UX profissional */
.btn-visitas {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: 2px solid #3498db;
}

.btn-visitas:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    border-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-planejamento {
    background: linear-gradient(135deg, #5DADE2 0%, #3498db 100%);
    border: 2px solid #5DADE2;
}

.btn-planejamento:hover {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(93, 173, 226, 0.4);
}

.btn-chamados {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: 2px solid #f39c12;
}

.btn-chamados:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border-color: #e67e22;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-qrcode {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border: 2px solid #27ae60;
}

.btn-qrcode:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    border-color: #229954;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-relatorios {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    border: 2px solid #95a5a6;
}

.btn-relatorios:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #566573 100%);
    border-color: #7f8c8d;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4);
}

.btn-usuarios {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border: 2px solid #8B5CF6;
}

.btn-usuarios:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #6B46C1 100%);
    border-color: #7C3AED;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-aniversariantes {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 2px solid #e74c3c;
}

.btn-aniversariantes:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    border-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Responsividade Melhorada */
@media (max-width: 1200px) {
    .nav-buttons {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .actions {
        padding: 25px 20px;
        margin-top: 20px;
    }

    .nav-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }

    .btn {
        min-width: 100%;
        padding: 18px 20px;
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .actions {
        padding: 20px 15px;
    }

    .actions h3 {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }

    .nav-buttons {
        gap: 12px;
    }

    .btn {
        padding: 16px 18px;
        font-size: 1rem;
        min-height: 52px;
    }
}

/* Inputs com ícones */
.input-with-icon {
    padding-left: 45px !important;
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 16px;
}

.input-email {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%233498db" viewBox="0 0 16 16"><path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2z"/></svg>');
}

.input-password {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%233498db" viewBox="0 0 16 16"><path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"/></svg>');
}

/* Exemplos de Login */
.login-examples {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-examples h4 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.example-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .example-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.example-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
}

.example-item strong {
    color: #ffd700;
    display: block;
    margin-bottom: 5px;
}

.example-item code {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: block;
    margin: 2px 0;
    font-family: 'Courier New', monospace;
}

.password-hint {
    color: #ffd700;
    text-align: center;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* Login Rápido */
.quick-login {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.quick-login h5 {
    color: white;
    text-align: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.quick-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (min-width: 768px) {
    .quick-buttons {
        flex-direction: row;
        justify-content: space-between;
    }
}

.quick-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
}

.quick-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quick-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.quick-btn.admin:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.quick-btn.local:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.quick-btn.manut:hover {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

/* Estilos específicos para login - Padrão Fadelito */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.login-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 1;
}

.login-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
}

.login-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: white;
    padding: 12px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.3);
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.login-subtitle {
    opacity: 0.9;
    font-size: 1rem;
    font-weight: 400;
}

.login-form {
    padding: 40px 30px;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form input {
    padding: 16px 20px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 2px solid #ecf0f1;
    transition: all 0.3s ease;
}

.login-form input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1002;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.mobile-menu-toggle:active {
    transform: translateY(0);
}

/* Responsividade específica para iPad e tablets */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex !important;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.open,
    .sidebar.active {
        transform: translateX(0) !important;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }

    .main-content {
        margin-left: 0;
        padding: 70px 20px 20px;
        width: 100%;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block !important;
        opacity: 1;
    }

    /* Garantir que o body não tenha scroll quando menu aberto */
    body.menu-aberto {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Lista de items recentes */
.recent-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 20px;
    margin: 25px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.recent-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.recent-list {
    display: grid;
    gap: 15px;
}

.recent-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #ecf0f1;
    transition: all 0.3s ease;
}
.recent-item:hover {
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.recent-item p {
    margin: 10px 0;
    color: #7f8c8d;
    line-height: 1.5;
}

.recent-item small {
    color: #bdc3c7;
    font-size: 0.85rem;
}

/* Overlay para mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsividade */
/* Responsividade Mobile Primeira */
@media (max-width: 1024px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        display: none;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        display: block;
    }

    /* Garantir que o botão sair seja sempre visível */
    .nav-item:last-child,
    .nav-item form,
    .nav-item button[type="submit"] {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Garantir que o sidebar apareça corretamente em tablets */
@media (max-width: 768px) {
    .sidebar {
        width: 90%;
        max-width: 300px;
        background: linear-gradient(to bottom, #1e3c72, #2a5298);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }

    .mobile-menu-toggle {
        top: 15px;
        left: 15px;
    }
}

/* Para telas muito pequenas */
@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0) !important;
    }

    .mobile-menu-toggle {
        top: 10px;
        left: 10px;
        padding: 10px 12px;
        font-size: 1rem;
    }
}

        /* Centralização do header mobile */
        @media (max-width: 1024px) {
            .content-header,
            .visits-header,
            .form-section,
            .brand-inspiration {
                text-align: center;
            }

            .content-header .header-content,
            .visits-header .header-content {
                text-align: center;
                justify-content: center;
                flex-direction: column;
                align-items: center;
            }

            .header-nav {
                display: flex;
                justify-content: center;
                margin-bottom: 20px;
                width: 100%;
            }

            .header-title {
                text-align: center;
                margin: 15px 0;
            }

            .header-subtitle {
                text-align: center;
                margin-bottom: 15px;
            }

            /* Centralizar logo e título do sistema */
            .sidebar-header {
                text-align: center;
            }

            .sidebar-logo {
                margin: 0 auto 15px;
            }

            .sidebar-title,
            .sidebar-subtitle {
                text-align: center;
            }

            /* Centralizar conteúdo das páginas específicas */
            .visit-type-section,
            .visit-form-section,
            .visits-list-section {
                text-align: center;
            }

            .visit-type-section h3,
            .visit-form-section h3 {
                text-align: center;
            }

            .form-header {
                justify-content: center;
                text-align: center;
                flex-direction: column;
                gap: 15px;
            }

            .back-button {
                align-self: center;
            }
        }

        /* Específico para mobile pequeno */
        @media (max-width: 768px) {
            .content-header,
            .visits-header {
                padding: 20px;
                text-align: center;
            }

            .header-content {
                flex-direction: column;
                align-items: center;
                text-align: center;
                gap: 15px;
            }

            .header-right {
                align-items: center;
                text-align: center;
            }

            .header-datetime {
                text-align: center;
            }

            /* Centralizar títulos e subtítulos */
            .header-title {
                font-size: 1.8rem;
                text-align: center;
                margin: 10px 0;
            }

            .header-subtitle {
                text-align: center;
                font-size: 1rem;
            }

            /* Centralizar elementos da página de planejamento */
            .filters-section {
                text-align: center;
            }

            .filters-section h3 {
                text-align: center;
                margin-bottom: 20px;
            }

            .turma-buttons {
                justify-content: center;
            }

            .search-box {
                text-align: center;
            }
        }

/* JavaScript Functions */

/* Melhorias para acessibilidade */
.btn:focus,
.nav-link:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

/* JavaScript para sidebar */

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 100%;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 70px 15px 15px;
    }

    .mobile-menu-toggle {
        display: flex !important;
        top: 15px;
        left: 15px;
    }
}

/* Script para mobile sidebar */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.sidebar-overlay {
    display: none;position: fixed;
top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Botões de ação */
        .action-buttons {
            display: flex;
            gap: 8px;
            justify-content: center;
        }

        .btn-icon {
            width: 35px;
            height: 35px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            transition: all 0.3s ease;
        }

        .btn-edit {
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            color: white;
        }

        .btn-edit:hover {
            background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
            transform: scale(1.1);
        }

        .btn-delete {
            background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
            color: white;
        }

        .btn-delete:hover {
            background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
            transform: scale(1.1);
        }

        /* Modal - Corrigido para mobile */
        .modal {
            display: none;
            position: fixed;
            z-index: 9999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.7);
            animation: fadeIn 0.3s ease;
            overflow: auto;
            -webkit-overflow-scrolling: touch;
        }

        .modal-content {
            background: white;
            margin: 5% auto;
            padding: 0;
            border-radius: 20px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: slideIn 0.3s ease;
            position: relative;
            max-height: 90vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        @keyframes slideIn {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .modal-header {
            padding: 25px 30px;
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            color: white;
            border-radius: 20px 20px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }

        .modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 2rem;
            cursor: pointer;
            padding: 5px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background-color 0.3s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .modal-close:hover {
            background-color: rgba(255,255,255,0.2);
        }

        .modal-body {
            padding: 30px;
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .modal-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 25px;
            flex-shrink: 0;
            padding: 0 10px 10px;
        }

        /* Melhorias específicas para botões do modal no mobile */
        .modal-actions .btn {
            min-height: 50px;
            padding: 15px 20px;
            font-size: 1rem;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }

        /* JavaScript global para toggle do sidebar */
<script>
function toggleSidebar() {
    const sidebar = document.getElementById('sidebar');
    const overlay = document.querySelector('.sidebar-overlay');

    if (sidebar && overlay) {
        sidebar.classList.toggle('open');
        overlay.classList.toggle('active');
    }
}
</script>

/* The following CSS class is made responsive to ensure that the copy button does not break on mobile devices. */
        .copy-btn {
            background: #28a745;
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 5px;
            cursor: pointer;
            margin: 0.25rem;
            min-width: 120px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .copy-btn:hover {
            background: #218838;
        }

        /* Melhorias específicas para modal no mobile */
        @media (max-width: 768px) {
            .modal {
                z-index: 10000;
                padding: 10px;
                display: flex;
                align-items: flex-start;
                justify-content: center;
                padding-top: 5vh;
            }

            .modal-content {
                margin: 0;
                width: 100%;
                max-width: 450px;
                max-height: 85vh;
                border-radius: 15px;
                overflow: hidden;
                position: relative;
            }

            .modal-header {
                padding: 20px 25px;
                border-radius: 15px 15px 0 0;
            }

            .modal-close {
                width: 45px;
                height: 45px;
                font-size: 1.8rem;
                border-radius: 8px;
                background: rgba(255,255,255,0.1);
            }

            .modal-body {
                padding: 20px 25px;
                max-height: 60vh;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }

            .modal-actions {
                position: sticky;
                bottom: 0;
                background: white;
                padding: 20px 25px;
                margin: 0;
                border-top: 1px solid rgba(0,0,0,0.1);
                display: flex;
                flex-direction: column;
                gap: 12px;
                box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
            }

            .modal-actions .btn {
                width: 100%;
                min-height: 55px;
                padding: 16px 20px;
                font-size: 1.1rem;
                font-weight: 600;
                border-radius: 12px;
                margin: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 10px;
                touch-action: manipulation;
                -webkit-tap-highlight-color: transparent;
            }

            .copy-btn {
                width: 100% !important;
                margin: 0 !important;
                padding: 16px 20px !important;
                font-size: 1.1rem !important;
                min-width: auto !important;
                order: -1;
                background: #6c757d !important;
                color: white !important;
                border: none !important;
            }

            .copy-btn:hover {
                background: #5a6268 !important;
            }

            /* Botões específicos do WhatsApp e Fechar */
            .btn-whatsapp {
                background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
                color: white !important;
                order: 1;
            }

            .btn-whatsapp:hover {
                background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
            }

            .btn-close-modal {
                background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
                color: white !important;
                order: 2;
            }

            .btn-close-modal:hover {
                background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
            }
        }

        @media (max-width: 480px) {
            .modal {
                padding: 5px;
                padding-top: 2vh;
            }

            .modal-content {
                width: 100%;
                max-height: 90vh;
                border-radius: 12px;
            }

            .modal-header {
                padding: 18px 20px;
                border-radius: 12px 12px 0 0;
            }

            .modal-close {
                width: 42px;
                height: 42px;
                font-size: 1.6rem;
            }

            .modal-body {
                padding: 18px 20px;
                max-height: 65vh;
            }

            .modal-actions {
                padding: 18px 20px;
                gap: 10px;
            }

            .modal-actions .btn {
                min-height: 52px;
                padding: 14px 18px;
                font-size: 1rem;
            }

            .copy-btn {
                padding: 14px 18px !important;
                font-size: 1rem !important;
            }
        }

        /* Garantir que o modal tenha prioridade sobre outros elementos */
        .modal.show {
            display: flex !important;
            z-index: 10001 !important;
        }

        /* Evitar scroll do body quando modal estiver aberto */
        body.modal-open {
            overflow: hidden;
            position: fixed;
            width: 100%;
        }

/* User Menu Styles */
        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
            position: relative;
            z-index: 100;
        }

        .header-datetime {
            text-align: right;
            color: #7f8c8d;
        }

        .user-menu {
            position: relative;
            z-index: 1001;
        }

        .user-dropdown {
            position: relative;
            z-index: 1001;
        }

        .user-toggle {
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
            position: relative;
            z-index: 1002;
        }

        .user-toggle:hover {
            background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(52, 152, 219, 0.4);
        }

        .user-dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 10px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.25);
            border: 1px solid rgba(52, 152, 219, 0.1);
            min-width: 220px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-15px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 10000;
            overflow: visible;
        }

        .user-dropdown-menu.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            z-index: 10001;
        }

/* Responsividade para o menu do usuário */
        @media (max-width: 768px) {
            .header-right {
                flex-direction: column;
                gap: 10px;
                align-items: center;
                position: relative;
                z-index: 1001;
            }

            .user-toggle {
                padding: 10px 15px;
                font-size: 0.9rem;
            }

            .user-dropdown {
                position: static;
                display: flex;
                flex-direction: column;
                align-items: center;
            }

            .user-dropdown-menu {
                position: fixed;
                top: auto;
                right: 50%;
                left: 50%;
                transform: translateX(-50%) translateY(-15px);
                margin-top: 15px;
                min-width: 280px;
                max-width: 90vw;
                z-index: 10002;
                box-shadow: 0 25px 80px rgba(0,0,0,0.35);
            }

            .user-dropdown-menu.active {
                transform: translateX(-50%) translateY(0);
                z-index: 10003;
            }

            /* Garantir que o header não corte o dropdown */
            .content-header {
                overflow: visible !important;
                position: relative;
                z-index: 100;
            }

            .header-content {
                overflow: visible !important;
            }
        }

/* Overlay para dropdown mobile */
        .user-dropdown-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.3);
            z-index: 9999;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .user-dropdown-overlay.active {
            display: block;
            opacity: 1;
        }

        @media (max-width: 768px) {
            .user-dropdown-overlay.active {
                display: block;
            }
        }

        /* Fechar menu do usuário ao clicar fora */
        document.addEventListener('click', function(event) {
            const userMenu = document.querySelector('.user-dropdown');
            const dropdown = document.getElementById('userDropdown');

            if (userMenu && dropdown && !userMenu.contains(event.target)) {
                dropdown.classList.remove('active');
                document.querySelector('.user-dropdown-overlay')?.classList.remove('active');
            }
        });
</script>