/*
 * Sistema ISA - Estilos Bootstrap Unificados
 * Arquivo CSS para todas as páginas modernizadas com Bootstrap 5
 * Versão: 1.0
 * Data: 6 de setembro de 2025
 */

/* ========================================
   VARIÁVEIS CSS GLOBAIS
   ======================================== */
        :root {
            --bs-primary: #3674b3;
            --bs-primary-rgb: 54, 116, 179;
            --navbar-height: 70px;
            --sidebar-width: 280px;
        }

        /* Classe para cabeçalho das páginas */
        .page-header {
            padding: 1.5rem 0;
            margin-bottom: 1.5rem;
        }

        /* Customização da Navbar */
        .navbar-custom {
            background: linear-gradient(135deg, var(--bs-primary) 0%, #2c5aa0 100%);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            min-height: var(--navbar-height);
            padding: 0.5rem 1rem;
        }

        .navbar-brand {
            font-weight: 600;
            font-size: 1.4rem;
            color: white !important;
        }

        .navbar-brand img {
            max-height: 45px;
            margin-right: 10px;
        }

        /* Menu Principal */
        .navbar-nav .nav-link {
            color: rgba(255,255,255,0.9) !important;
            font-weight: 500;
            padding: 0.75rem 1rem !important;
            border-radius: 6px;
            margin: 0 2px;
            transition: all 0.3s ease;
            position: relative;
        }

        .navbar-nav .nav-link:hover,
        .navbar-nav .nav-link:focus {
            color: white !important;
            background: rgba(255,255,255,0.15);
            transform: translateY(-1px);
        }

        .navbar-nav .nav-link.active {
            color: white !important;
            background: rgba(255,255,255,0.2);
        }

        /* Dropdown Menus Modernos */
        .dropdown-menu {
            border: none;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            border-radius: 12px;
            padding: 0.5rem 0;
            margin-top: 8px;
            min-width: 320px;
            max-width: 400px;
            animation: dropdownFadeIn 0.3s ease;
            /* Altura máxima com scroll para menus longos */
            max-height: 70vh;
            overflow-y: auto;
            overflow-x: hidden;
        }

        /* Scrollbar customizada para dropdowns */
        .dropdown-menu::-webkit-scrollbar {
            width: 6px;
        }

        .dropdown-menu::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }

        .dropdown-menu::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 3px;
        }

        .dropdown-menu::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

        /* Menu em múltiplas colunas para telas grandes */
        @media (min-width: 1200px) {
            .dropdown-menu.mega-menu {
                min-width: 600px;
                max-width: 800px;
                padding: 1rem;
            }
            
            .mega-menu .dropdown-columns {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 2rem;
            }
            
            .mega-menu .dropdown-column {
                min-width: 0;
            }
        }

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

        .dropdown-item {
            padding: 0.75rem 1.5rem;
            font-size: 0.95rem;
            color: #495057;
            transition: all 0.2s ease;
            border-left: 3px solid transparent;
        }

        .dropdown-item:hover,
        .dropdown-item:focus {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            color: var(--bs-primary);
            border-left-color: var(--bs-primary);
            transform: translateX(3px);
        }

        .dropdown-item i {
            width: 20px;
            margin-right: 10px;
            color: #6c757d;
        }

        .dropdown-item:hover i {
            color: var(--bs-primary);
        }

        /* Separadores no Dropdown */
        .dropdown-divider {
            margin: 0.5rem 0;
            border-color: #e9ecef;
        }

        /* Header de Seção no Dropdown */
        .dropdown-header {
            font-size: 0.8rem;
            font-weight: 600;
            color: #6c757d;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 0.5rem 1.5rem 0.25rem;
        }

        /* Área do Usuário */
        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

		.user-avatar {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			width: 50px;
			height: 50px;
			background: linear-gradient(135deg, #007bff, #0056b3);
			border-radius: 50%;
			color: white;
			text-decoration: none;
			transition: all 0.3s ease;
		}

		.avatar-img {
		  width: 50px;
		  height: 50px;
		  border-radius: 50%;
		  object-fit: cover;
		  border: 1px solid #fff;
		  box-shadow: 0 0 3px rgba(0,0,0,0.1);
		}

		.user-avatar:hover {
			transform: translateY(-2px);
			color: white;
			text-decoration: none;
		}

/*        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
        }
*/
        .user-details {
            color: white;
            text-align: right;
        }

        .user-name {
            font-weight: 600;
            font-size: 0.9rem;
            margin: 0;
        }

        .user-role {
            font-size: 0.75rem;
            opacity: 0.8;
            margin: 0;
        }

        /* Botões de Ação */
        .action-buttons {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn-action {
            background: rgba(255,255,255,0.15);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            transition: all 0.3s ease;
            text-decoration: none;
            font-size: 0.9rem;
        }

        .btn-action:hover {
            background: rgba(255,255,255,0.25);
            color: white;
            transform: translateY(-1px);
            text-decoration: none;
        }

        .btn-action i {
            margin-right: 5px;
        }

        /* Conteúdo Principal */
        .main-content {
            height: calc(100vh - var(--navbar-height));
            overflow: hidden;
        }

        .system-iframe {
            width: 100%;
            height: 100%;
            border: none;
            background: white;
        }

        /* Loading Overlay Moderno */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(5px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .loading-overlay.show {
            visibility: visible;
            opacity: 1;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--bs-primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

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

        .loading-text {
            color: var(--bs-primary);
            font-weight: 500;
            font-size: 1.1rem;
        }

        /* Responsividade */
        @media (max-width: 991.98px) {
            .navbar-nav {
                background: rgba(0,0,0,0.1);
                border-radius: 12px;
                margin-top: 1rem;
                padding: 1rem;
            }
            
            .dropdown-menu {
                position: static !important;
                transform: none !important;
                box-shadow: none;
                border: 1px solid rgba(255,255,255,0.2);
                background: rgba(255,255,255,0.1);
                margin: 0.5rem 0;
                /* Altura máxima menor em mobile */
                max-height: 50vh;
                min-width: 100%;
            }
            
            .dropdown-item {
                color: rgba(255,255,255,0.9);
                border-left: none;
            }
            
            .dropdown-item:hover {
                background: rgba(255,255,255,0.2);
                color: white;
                transform: none;
            }
            
        /* Área do Usuário */
            .user-info {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                margin-top: 1rem;
                padding-top: 1rem;
                border-top: 1px solid rgba(255,255,255,0.2);
            }

			.user-avatar {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 50px;
				height: 50px;
				background: linear-gradient(135deg, #007bff, #0056b3);
				border-radius: 50%;
				color: white;
				text-decoration: none;
				transition: all 0.3s ease;
			}

			.avatar-img {
			  width: 50px;
			  height: 50px;
			  border-radius: 50%;
			  object-fit: cover;
			  border: 1px solid #fff;
			  box-shadow: 0 0 3px rgba(0,0,0,0.1);
			}

			.user-avatar:hover {
				transform: translateY(-2px);
				color: white;
				text-decoration: none;
			}
        }

        @media (max-width: 575.98px) {
            .navbar-brand {
                font-size: 1.2rem;
            }
            
            .navbar-brand img {
                max-height: 35px;
            }
            
            .action-buttons {
                flex-direction: column;
                width: 100%;
            }
            
            .btn-action {
                width: 100%;
                text-align: center;
            }
        }

        /* Animações e Efeitos */
        .navbar-nav .nav-item {
            animation: slideInDown 0.5s ease;
            animation-fill-mode: both;
        }

        .navbar-nav .nav-item:nth-child(1) { animation-delay: 0.1s; }
        .navbar-nav .nav-item:nth-child(2) { animation-delay: 0.2s; }
        .navbar-nav .nav-item:nth-child(3) { animation-delay: 0.3s; }
        .navbar-nav .nav-item:nth-child(4) { animation-delay: 0.4s; }
        .navbar-nav .nav-item:nth-child(5) { animation-delay: 0.5s; }

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

        /* Badges e Notificações */
        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #dc3545;
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 0.7rem;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        /* Tema Escuro */
        @media (prefers-color-scheme: dark) {
            .dropdown-menu {
                background: #2d3748;
                color: #e2e8f0;
            }
            
            .dropdown-item {
                color: #e2e8f0;
            }
            
            .dropdown-item:hover {
                background: #4a5568;
                color: white;
            }
        }
/* ========================================
   FIM DO ARQUIVO CSS
   ======================================== */

