﻿/* ========================================
   TYPOGRAPHY IMPROVEMENTS
   ======================================== */

/* Importar fontes do Google Fonts para melhor legibilidade */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Configuração base de tipografia */
:root {
	--font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--font-headings: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-size-base: 0.95rem;
	--font-size-sm: 0.875rem;
	--font-size-xs: 0.8125rem;
	--font-size-lg: 1.05rem;
	--font-size-xl: 1.15rem;
	--line-height-base: 1.6;
	--line-height-headings: 1.3;
	--letter-spacing-tight: -0.02em;
	--letter-spacing-normal: 0;
	--letter-spacing-wide: 0.02em;
}

/* Aplicar fonte principal ao body */
body {
	font-family: var(--font-primary) !important;
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	letter-spacing: var(--letter-spacing-normal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-weight: 400;
	color: #3f4254;
}

/* Headings com fonte Poppins */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--font-headings) !important;
	line-height: var(--line-height-headings);
	letter-spacing: var(--letter-spacing-tight);
	font-weight: 600;
	color: #181C32;
	margin-bottom: 0.75rem;
}

/* Tamanhos de headings otimizados */
h1, .h1 {
	font-size: 2rem !important;
	font-weight: 700;
	letter-spacing: -0.03em;
}

h2, .h2 {
	font-size: 1.65rem !important;
	font-weight: 700;
}

h3, .h3 {
	font-size: 1.35rem !important;
	font-weight: 600;
}

h4, .h4 {
	font-size: 1.15rem !important;
	font-weight: 600;
}

h5, .h5 {
	font-size: 1.05rem !important;
	font-weight: 600;
}

h6, .h6 {
	font-size: 0.95rem !important;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Parágrafos e textos */
p {
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	margin-bottom: 1rem;
	color: #5E6278;
}

/* Labels e textos de formulário */
label,
.form-label {
	font-size: var(--font-size-sm) !important;
	font-weight: 500 !important;
	color: #3F4254 !important;
	letter-spacing: 0.01em;
	margin-bottom: 0.5rem;
}

/* Inputs e selects */
.form-control,
.form-select {
	font-size: var(--font-size-base) !important;
	font-weight: 400;
	color: #3F4254;
	line-height: 1.5;
}

.form-control::placeholder {
	color: #A1A5B7;
	font-size: var(--font-size-sm);
}

/* Botões */
.btn {
	font-family: var(--font-primary) !important;
	font-size: var(--font-size-base) !important;
	font-weight: 500 !important;
	letter-spacing: 0.01em;
	line-height: 1.5;
}

.btn-sm {
	font-size: var(--font-size-sm) !important;
}

.btn-lg {
	font-size: var(--font-size-lg) !important;
	font-weight: 600 !important;
}

/* Tabelas */
.table {
	font-size: var(--font-size-sm);
}

.table thead th {
	font-weight: 600;
	font-size: var(--font-size-xs);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #3F4254;
}

.table tbody td {
	font-size: var(--font-size-sm);
	color: #5E6278;
}

/* Cards */
.card-title {
	font-family: var(--font-headings) !important;
	font-size: 1.15rem !important;
	font-weight: 600 !important;
	color: #181C32;
	letter-spacing: -0.01em;
}

.card-subtitle {
	font-size: var(--font-size-sm);
	color: #A1A5B7;
	font-weight: 400;
}

.card-text {
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	color: #5E6278;
}

/* Badges */
.badge {
	font-size: 0.8rem !important;
	font-weight: 500 !important;
	letter-spacing: 0.02em;
	padding: 0.4em 0.75em;
}

/* Menu e Navegação */
.menu .menu-link {
	font-size: var(--font-size-base) !important;
	font-weight: 500 !important;
	letter-spacing: 0;
}

.menu .menu-title {
	font-weight: 500;
}

/* Breadcrumbs */
.breadcrumb {
	font-size: var(--font-size-sm);
}

/* Tooltips e Popovers */
.tooltip,
.popover {
	font-size: var(--font-size-sm);
}

/* Alertas */
.alert {
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
}

/* Links */
a {
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
}

a:hover {
	text-decoration: none;
}

/* Text utilities customizados */
.text-lead {
	font-size: 1.15rem;
	font-weight: 400;
	line-height: 1.7;
	color: #5E6278;
}

.text-muted {
	color: #A1A5B7 !important;
}

.text-dark {
	color: #181C32 !important;
}

/* Small text */
small,
.small {
	font-size: var(--font-size-sm) !important;
}

.text-xs {
	font-size: var(--font-size-xs) !important;
}

/* Responsividade */
@media (max-width: 768px) {
	:root {
		--font-size-base: 0.9rem;
	}
	
	h1, .h1 { font-size: 1.75rem !important; }
	h2, .h2 { font-size: 1.5rem !important; }
	h3, .h3 { font-size: 1.25rem !important; }
	h4, .h4 { font-size: 1.1rem !important; }
	h5, .h5 { font-size: 1rem !important; }
	h6, .h6 { font-size: 0.9rem !important; }
}

/* ========================================
   END TYPOGRAPHY IMPROVEMENTS
   ======================================== */

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
}

.sticky-notice {
	position: sticky;
	top: 74px;
	z-index: 10; /* Ajuste para evitar sobreposições indesejadas */
	max-height: 200px; /* Limitar a altura do sticky-notice */
	overflow-y: auto; /* Adicionar rolagem vertical se o conteúdo exceder a altura máxima */
	padding: 10px;
}


div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button.current:hover {
	background-color: #1B84FF !important;
	border-color: #1B84FF !important;
	color: #fff !important;
	border-radius: 5px !important;
	background-image: none !important;
}

#file-dropzone {
	background-color: #DBEAFE;
	min-height: 250px;
	border-radius: 10px;
	border: 1px dashed #000 !important;
}

/* Role Badges */
.role-badge {
	display: inline-block;
	padding: 0.35em 0.65em;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: 0.425rem;
}

/* Role Colors */
.role-admin {
	background-color: #F8285A;
	color: #ffffff;
}

.role-manager {
	background-color: #7239EA;
	color: #ffffff;
}

.role-editor {
	background-color: #F6C000;
	color: #000000;
}

.role-user {
	background-color: #17C653;
	color: #ffffff;
}

.role-guest {
	background-color: #78829D;
	color: #ffffff;
}

.role-moderator {
	background-color: #1B84FF;
	color: #ffffff;
}

.role-viewer {
	background-color: #F1F1F4;
	color: #071437;
}

.role-default {
	background-color: #252F4A;
	color: #ffffff;
}

/* Role Badge Sizes */
.role-badge-sm {
	padding: 0.25em 0.5em;
	font-size: 0.75rem;
}

.role-badge-lg {
	padding: 0.5em 0.85em;
	font-size: 1rem;
}

/* Role Badge with Icon */
.role-badge i {
	margin-right: 0.35em;
}

/* Hover effect for clickable role badges */
.role-badge.clickable {
	cursor: pointer;
	transition: opacity 0.2s ease-in-out;
}

.role-badge.clickable:hover {
	opacity: 0.85;
}

/* Sidebar User Info Styles */
.app-sidebar-user {
	background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
	transition: all 0.3s ease;
}

.app-sidebar-user .symbol {
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	transition: transform 0.3s ease;
}

.app-sidebar-user .symbol:hover {
	transform: scale(1.05);
}

.app-sidebar-user .badge {
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	border-radius: 20px;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.app-sidebar-user .badge:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ========================================
   ENVIRONMENT BANNER STYLES
   ======================================== */

/* Banner base */
.environment-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10000;
	color: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	font-size: 0.9rem;
}

/* Estado minimizado */
.environment-banner.minimized {
	transform: translateY(-70px);
	padding: 0 !important;
}

.environment-banner.minimized:hover {
	transform: translateY(-55px);
}

/* Beta Environment - Vermelho/Laranja (WARNING) */
.env-banner-beta {
	background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
	animation: pulse-glow 3s ease-in-out infinite;
}

/* Staging Environment - Azul */
.env-banner-staging {
	background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
}

/* Testing Environment - Verde */
.env-banner-testing {
	background: linear-gradient(135deg, #198754 0%, #20c997 100%);
}

/* Development Environment - Roxo */
.env-banner-development {
	background: linear-gradient(135deg, #6f42c1 0%, #d63384 100%);
}

/* Default Environment - Cinza */
.env-banner-default {
	background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
}

/* Badge de warning */
.badge-warning {
	background-color: #ffc107;
	color: #000;
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 20px;
}

/* Animação de pulso para o ícone de warning */
.pulse-animation {
	animation: pulse 2s ease-in-out infinite;
}

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

/* Animação de brilho para o banner Beta */
@keyframes pulse-glow {
	0%, 100% {
		box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
	}
	50% {
		box-shadow: 0 2px 20px rgba(220, 53, 69, 0.6);
	}
}

/* Ajuste do corpo quando o banner está visível */
body.has-environment-banner {
	padding-top: 60px;
	transition: padding-top 0.3s ease;
}

body.has-environment-banner.minimized {
	padding-top: 0;
}

/* Botão de toggle do banner */
.environment-banner .btn-icon {
	width: 32px;
	height: 32px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	transition: all 0.2s ease;
}

.environment-banner .btn-icon:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.1);
}

/* Responsividade */
@media (max-width: 768px) {
	.environment-banner {
		font-size: 0.8rem;
		padding: 0.5rem 0;
	}
	
	.environment-banner .small {
		display: none; /* Esconde a mensagem detalhada em mobile */
	}
	
	.environment-banner .badge-warning {
		font-size: 0.7rem;
		padding: 0.3rem 0.6rem;
	}
}

/* Ajuste para o header quando o banner está visível */
#kt_app_header {
	top: 0px;
	transition: top 0.3s ease;
}

body.has-environment-banner.minimized #kt_app_header {
	top: 0;
}

/* Estilo para o texto "DADOS DE PRODUÇÃO" mais destacado */
.env-banner-beta .badge-warning {
	animation: flash-warning 2s ease-in-out infinite;
}

@keyframes flash-warning {
	0%, 100% {
		background-color: #ffc107;
	}
	50% {
		background-color: #ffed4e;
	}
}
