:root {
	--primary-color: #ea1d2c;
	--primary-dark: #c4121f;
	--gradient-primary: linear-gradient(135deg, #2196F3 0%, #ea1d2c 100%);
	--gradient-primary-hover: linear-gradient(135deg, #1976D2 0%, #c4121f 100%);
	--gradient-light: linear-gradient(135deg, #E3F2FD 0%, #FFEBEE 100%);
	--gradient-surface: linear-gradient(135deg, #f8fdff 0%, #fff5f6 100%);
	--bg-color: #f5f5f5;
	--surface-color: #ffffff;
	--text-primary: #333333;
	--text-secondary: #666666;
	--text-light: #999999;
	--border-color: #e0e0e0;
	--shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	--radius: 18px;
	--radius-small: 8px;
	--spacing-xs: 4px;
	--spacing-sm: 8px;
	--spacing-md: 16px;
	--spacing-lg: 24px;
	--spacing-xl: 32px;
}

.dark-theme {
	--gradient-primary: linear-gradient(135deg, #1976D2 0%, #c4121f 100%);
	--gradient-primary-hover: linear-gradient(135deg, #1565C0 0%, #a0101a 100%);
	--gradient-light: linear-gradient(135deg, #1a237e 0%, #4a148c 100%);
	--gradient-surface: linear-gradient(135deg, #1e1e1e 0%, #2d1a1a 100%);
	--bg-color: #121212;
	--surface-color: #1e1e1e;
	--text-primary: #f5f5f5;
	--text-secondary: #cccccc;
	--text-light: #888888;
	--border-color: #333333;
	--shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
	height: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	/* Prevenir zoom indesejado em mobile */
	touch-action: manipulation;
	-webkit-text-size-adjust: 100%;
}

body {
	height: 100vh;
	height: 100dvh; /* Dynamic viewport height para mobile */
	width: 100vw;
	margin: 0;
	padding: 0;
	overflow: hidden;
	position: relative;
	background-color: var(--bg-color);
	color: var(--text-primary);
	transition: background-color 0.3s, color 0.3s;
	display: flex;
	flex-direction: column;
	/* Prevenir scroll horizontal em mobile */
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}

body.dark-theme {
	background-color: #121212 !important;
	background: #121212 !important;
}

/* Garantir que a navbar apareça */
.header.modern-header {
	background: rgba(255, 255, 255, 0.98) !important;
	backdrop-filter: blur(20px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 80px !important;
	min-height: 80px !important;
	max-height: 80px !important;
	z-index: 10000 !important;
	transition: all 0.3s ease;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	flex-shrink: 0;
}

/* Garantir que os elementos da navbar também apareçam */
.header.modern-header .header-container,
.header.modern-header .nav-menu,
.header.modern-header .nav-links,
.header.modern-header .logo {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Garantir que os links da navbar apareçam */
.header.modern-header .nav-links li,
.header.modern-header .nav-link {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Garantir que o dropdown apareça acima de tudo */
.header.modern-header .dropdown-menu {
	z-index: 10001 !important;
	position: absolute !important;
}

/* Garantir que o header-container tenha altura adequada */
.header.modern-header .header-container {
	min-height: 70px;
	height: 80px !important;
	max-height: 80px !important;
}

/* Garantir que o header-buttons apareça */
.header.modern-header .header-buttons {
	display: flex !important;
	visibility: visible !important;
}

/* Layout principal do chat - ocupa toda a tela abaixo do header */
.app-container {
	display: flex;
	flex: 1;
	height: calc(100vh - 80px);
	height: calc(100dvh - 80px); /* Dynamic viewport height para mobile */
	min-height: calc(100vh - 80px);
	min-height: calc(100dvh - 80px);
	max-height: calc(100vh - 80px);
	max-height: calc(100dvh - 80px);
	width: 100%;
	margin: 0;
	padding: 0;
	margin-top: 80px;
	position: relative;
	z-index: 1;
	background: radial-gradient(circle at top left, #1e293b 0%, #020617 45%, #111827 100%);
	overflow: hidden;
	align-self: stretch;
	/* Prevenir scroll horizontal */
	overflow-x: hidden;
}

/* Sidebar - visual escuro em cartão */
.sidebar {
	width: 360px;
	min-width: 360px;
	max-width: 360px;
	height: 100%;
	background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
	border-right: 1px solid rgba(148, 163, 184, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	position: relative;
	z-index: 1;
	margin-top: 0;
	box-shadow: 0 20px 40px rgba(15, 23, 42, 0.7);
}

/* Sidebar header removido */

.theme-toggle {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 50%;
	color: white;
	cursor: pointer;
	width: 36px;
	height: 36px;
	font-size: 1.1rem;
	transition: all 0.3s;
	backdrop-filter: blur(10px);
}

.theme-toggle:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.1);
}

.search-container {
	padding: var(--spacing-md);
	border-bottom: 1px solid var(--border-color);
	background: rgba(15, 23, 42, 0.95);
}

.search-box {
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	border-radius: var(--radius-small);
	padding: var(--spacing-sm) var(--spacing-md);
	border: 2px solid rgba(255, 255, 255, 0.2);
	transition: all 0.3s;
}

.search-box:focus-within {
	border-color: #2196F3;
	box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.3);
	background: rgba(255, 255, 255, 0.25);
}

.search-box i {
	color: rgba(255, 255, 255, 0.9);
	margin-right: var(--spacing-sm);
	font-size: 1rem;
}

.search-box input {
	background: none;
	border: none;
	outline: none;
	color: #ffffff;
	width: 100%;
	font-size: 0.95rem;
	font-weight: 500;
}

.search-box input::placeholder {
	color: rgba(255, 255, 255, 0.6);
	opacity: 1;
}

.chats-list {
	flex: 1;
	overflow-y: auto;
}

.chat-item {
	display: flex;
	padding: var(--spacing-md);
	border-bottom: 1px solid var(--border-color);
	cursor: pointer;
	transition: all 0.3s;
	position: relative;
	overflow: hidden;
}

.chat-item::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: var(--gradient-light);
	transition: left 0.3s;
	z-index: 0;
}

.chat-item:hover::before,
.chat-item.active::before {
	left: 0;
}

.chat-item:hover,
.chat-item.active {
	transform: translateX(4px);
}

.chat-avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	margin-right: var(--spacing-md);
	background: var(--gradient-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: bold;
	position: relative;
	z-index: 1;
	box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
	overflow: hidden;
	flex-shrink: 0;
}

.chat-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.chat-info {
	flex: 1;
	overflow: hidden;
	position: relative;
	z-index: 1;
}

.chat-info-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: var(--spacing-xs);
}

.chat-name {
	font-weight: 600;
	color: var(--text-primary);
}

.chat-time {
	font-size: 0.8rem;
	color: var(--text-light);
}

.chat-preview {
	font-size: 0.9rem;
	color: var(--text-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Chat Main Area - Container para as camadas */
.chat-main-area {
	flex: 1;
	position: relative;
	overflow: hidden;
	height: 100%;
	width: 100%;
	background: radial-gradient(circle at top right, #1d3557 0%, #020617 55%, #0b1120 100%);
}

/* CAMADA 1: Tela de Seleção */
.chat-selection-layer {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at top right, #1d3557 0%, #020617 55%, #0b1120 100%);
	z-index: 1;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	overflow: hidden;
	opacity: 1;
	visibility: visible;
}

.chat-selection-layer.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	display: none !important;
}

.selection-content {
	text-align: center;
	padding: var(--spacing-xl);
	max-width: 500px;
}

.selection-icon {
	font-size: 5rem;
	color: var(--text-light);
	margin-bottom: var(--spacing-lg);
	opacity: 0.6;
}

.selection-title {
	font-size: 2rem;
	color: var(--text-primary);
	margin-bottom: var(--spacing-md);
	font-weight: 600;
}

.selection-description {
	font-size: 1.1rem;
	color: var(--text-secondary);
	margin-bottom: var(--spacing-xl);
	line-height: 1.6;
}

.selection-features {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md);
	align-items: flex-start;
	margin-top: var(--spacing-xl);
}

.feature-item {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	color: var(--text-secondary);
	font-size: 1rem;
}

.feature-item i {
	color: #4CAF50;
	font-size: 1.2rem;
}

/* CAMADA 2: Área de Chat Ativo */
.chat-active-layer {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
	z-index: 2;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	overflow: hidden;
	opacity: 1;
	visibility: visible;
	position: relative;
}

/* Removido ::before que podia causar elipse/glow indesejado */

.chat-active-layer.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	display: none !important;
}

/* Chat Area - mantido para compatibilidade */
.chat-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: radial-gradient(circle at top right, #1d3557 0%, #020617 55%, #0b1120 100%);
	position: relative;
	overflow: hidden;
}

.chat-header {
	padding: 16px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(30, 41, 59, 0.95);
	backdrop-filter: blur(20px);
	color: white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	z-index: 2;
	flex-shrink: 0;
	min-height: 72px;
	position: relative;
}

.chat-header-actions {
	position: relative;
	display: flex;
	align-items: center;
	z-index: 10001;
}


.chat-contact {
	display: flex;
	align-items: center;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
}

.chat-contact::before,
.chat-contact::after {
	display: none !important;
	content: none !important;
}

/* Avatar do contato no header do chat - LIMPO SEM ELIPSE BRANCA */
.contact-avatar,
#contactAvatar {
	width: 48px;
	height: 48px;
	min-width: 48px;
	border-radius: 50%;
	margin-right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: 600;
	font-size: 1.1rem;
	overflow: hidden;
	cursor: pointer;
	/* Fundo gradiente para quando mostra iniciais (sem foto) - a imagem cobre isso */
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	/* SEM SOMBRA/BORDA/GLOW QUE PAREÇA ELIPSE */
	box-shadow: none;
	border: none;
	outline: none;
	position: relative;
}

/* Bloqueia pseudo-elementos que causam elipse branca */
.contact-avatar::before,
.contact-avatar::after,
#contactAvatar::before,
#contactAvatar::after {
	display: none !important;
	content: none !important;
	background: none !important;
}

.contact-avatar:focus,
.contact-avatar:active,
.contact-avatar:focus-visible,
#contactAvatar:focus,
#contactAvatar:active,
#contactAvatar:focus-visible {
	box-shadow: none;
	border: none;
	outline: none;
}

.contact-avatar:hover,
#contactAvatar:hover {
	transform: scale(1.05);
	box-shadow: none;
	border: none;
	outline: none;
}

/* Imagem dentro do avatar - cobre o fundo gradiente */
.contact-avatar img,
#contactAvatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	border: none;
	outline: none;
	box-shadow: none;
	/* Garante que a imagem fique sobre o fundo gradiente */
	position: relative;
	z-index: 1;
}

.contact-info h2 {
	font-size: 1.15rem;
	margin-bottom: 4px;
	font-weight: 600;
	color: #ffffff;
	letter-spacing: -0.3px;
}

.contact-status {
	font-size: 0.85rem;
	opacity: 0.85;
	color: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	gap: 6px;
}

.status-online {
	color: #10b981;
	font-size: 0.75rem;
}

.status-online::before {
	content: '●';
	display: inline-block;
	margin-right: 4px;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

.status-typing {
	color: #FFC107;
	font-style: italic;
}

/* Removido chat-actions - não mais necessário */

.messages-container {
	flex: 1;
	padding: 24px;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
	min-height: 0;
	height: 0;
	position: relative;
}

.messages-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

.message {
	max-width: 75%;
	padding: 12px 16px;
	margin-bottom: 12px;
	border-radius: 18px;
	position: relative;
	animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	word-wrap: break-word;
	line-height: 1.5;
}

.message:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes messageSlideIn {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.message.received {
	align-self: flex-start;
	background: rgba(255, 255, 255, 0.95);
	color: #1f2937;
	border-bottom-left-radius: 4px;
	border-top-left-radius: 18px;
	border-top-right-radius: 18px;
	border-bottom-right-radius: 18px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.sent {
	align-self: flex-end;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border-bottom-right-radius: 4px;
	border-top-left-radius: 18px;
	border-top-right-radius: 18px;
	border-bottom-left-radius: 18px;
	box-shadow: 0 2px 12px rgba(102, 126, 234, 0.4);
}

.message-time {
	font-size: 0.7rem;
	text-align: right;
	margin-top: 6px;
	opacity: 0.65;
	font-weight: 500;
	letter-spacing: 0.3px;
}

.message.sent .message-time {
	text-align: right;
	color: rgba(255, 255, 255, 0.8);
}

.message.received .message-time {
	text-align: left;
	color: rgba(31, 41, 55, 0.7);
}

.typing-indicator {
	align-self: flex-start;
	background: rgba(255, 255, 255, 0.95);
	padding: 12px 16px;
	border-radius: 18px;
	margin-bottom: 12px;
	display: none;
	border: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.typing-indicator.active {
	display: block;
	animation: fadeIn 0.3s ease;
}

.typing-dots {
	display: flex;
}

.typing-dots span {
	height: 8px;
	width: 8px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 50%;
	display: inline-block;
	margin-right: 5px;
	animation: typing 1.5s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typing {

	0%,
	60%,
	100% {
		transform: translateY(0);
		opacity: 0.4;
	}

	30% {
		transform: translateY(-5px);
		opacity: 1;
	}
}

/* Barra de entrada de mensagem - flutuante, moderna */
.chat-input-container {
	padding: 16px 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: flex-end;
	background: rgba(30, 41, 59, 0.95);
	backdrop-filter: blur(20px);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
	flex-shrink: 0;
	min-height: 80px;
	position: relative;
	z-index: 3;
}

.chat-input-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.emoji-picker-container {
	position: relative;
	margin-right: var(--spacing-md);
}

.emoji-btn {
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	font-size: 1.4rem;
	transition: all 0.3s ease;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 8px;
}

.emoji-btn:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.1);
}

.emoji-picker {
	position: absolute;
	bottom: 60px;
	left: 0;
	background: rgba(30, 41, 59, 0.98);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	padding: 16px;
	width: 300px;
	max-height: 250px;
	overflow-y: auto;
	z-index: 1000;
	animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.emoji-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: var(--spacing-sm);
}

.emoji-item {
	font-size: 1.5rem;
	cursor: pointer;
	padding: var(--spacing-xs);
	border-radius: var(--radius-small);
	transition: all 0.2s;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
}

.emoji-item:hover {
	background: var(--gradient-light);
	transform: scale(1.2);
}

.message-input {
	flex: 1;
	padding: 12px 16px;
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	color: #ffffff;
	outline: none;
	resize: none;
	max-height: 120px;
	font-size: 0.95rem;
	transition: all 0.3s ease;
	min-height: 44px;
	font-family: inherit;
	line-height: 1.5;
}

.message-input::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.message-input:focus {
	border-color: rgba(102, 126, 234, 0.6);
	background: rgba(255, 255, 255, 0.15);
	box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.send-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	color: white;
	cursor: pointer;
	margin-left: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	flex-shrink: 0;
	font-size: 1.1rem;
}

.send-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
	transform: scale(1.08) translateY(-2px);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.send-btn:active:not(:disabled) {
	transform: scale(0.95);
}

.send-btn:disabled {
	background: rgba(255, 255, 255, 0.1);
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
	opacity: 0.4;
}

.send-btn:active:not(:disabled) {
	transform: scale(0.95);
}

/* Status de conexão - oculto para evitar mensagens flutuantes */
.connection-status {
	display: none !important;
}

/* Responsividade - Tablet e Mobile */
@media (max-width: 768px) {
	.app-container {
		width: 100%;
		height: calc(100vh - 80px);
		min-height: calc(100vh - 80px);
		max-height: calc(100vh - 80px);
		margin-top: 80px;
		position: relative;
	}

	/* Sidebar em mobile - overlay com backdrop */
	.sidebar {
		position: fixed;
		top: 80px;
		left: 0;
		height: calc(100vh - 80px);
		width: 85%;
		max-width: 320px;
		min-width: 280px;
		z-index: 1000;
		transform: translateX(-100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
	}

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

	/* Overlay para fechar sidebar ao clicar fora */
	.sidebar-overlay {
		position: fixed;
		top: 80px;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease;
		backdrop-filter: blur(2px);
	}

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

	.chat-area {
		width: 100%;
		height: 100%;
	}
	
	.chat-main-area {
		width: 100%;
		height: 100%;
	}
	
	.chat-selection-layer,
	.chat-active-layer {
		width: 100%;
		height: 100%;
	}

	/* Mensagens mais largas em mobile */
	.message {
		max-width: 85%;
		padding: 10px 14px;
		font-size: 0.95rem;
		margin-bottom: 10px;
	}

	.message-time {
		font-size: 0.65rem;
		margin-top: 4px;
	}

	.menu-toggle {
		display: flex;
		position: fixed;
		top: 90px;
		left: 16px;
		z-index: 1001;
		width: 44px;
		height: 44px;
	}

	/* Header do chat em mobile */
	.chat-header {
		padding: 12px 16px;
		min-height: 64px;
		position: sticky;
		top: 0;
		z-index: 100;
	}

	.contact-avatar {
		width: 40px;
		height: 40px;
		min-width: 40px;
		margin-right: 10px;
	}

	.contact-info h2 {
		font-size: 1rem;
	}

	.contact-status {
		font-size: 0.8rem;
	}

	.chat-avatar {
		width: 48px;
		height: 48px;
		margin-right: 12px;
	}

	/* Container de mensagens em mobile */
	.messages-container {
		padding: 16px 12px;
		padding-bottom: 20px;
	}

	/* Input container em mobile - ajustado para teclado virtual */
	.chat-input-container {
		padding: 12px 16px;
		min-height: 72px;
		padding-bottom: max(12px, env(safe-area-inset-bottom));
		position: sticky;
		bottom: 0;
		z-index: 100;
	}

	.message-input {
		font-size: 0.95rem;
		padding: 10px 14px;
		min-height: 44px;
		max-height: 100px;
	}

	.send-btn {
		width: 44px;
		height: 44px;
		margin-left: 8px;
		font-size: 1rem;
	}

	.emoji-btn {
		width: 40px;
		height: 40px;
		margin-right: 8px;
		font-size: 1.2rem;
	}

	.emoji-picker {
		width: calc(100vw - 32px);
		max-width: 300px;
		left: 0;
		bottom: 70px;
		max-height: 200px;
	}

	/* Botão de voltar para lista em mobile */
	.back-to-chats-btn {
		display: flex !important;
		width: 40px;
		height: 40px;
		margin-right: 10px;
	}

	/* Search box em mobile */
	.search-container {
		padding: 12px;
	}

	.search-box {
		padding: 10px 12px;
	}

	.search-box input {
		font-size: 0.9rem;
	}

	/* Chat items em mobile */
	.chat-item {
		padding: 12px;
	}

	.chat-name {
		font-size: 0.95rem;
	}

	.chat-preview {
		font-size: 0.85rem;
	}

	.chat-time {
		font-size: 0.75rem;
	}

	/* Selection layer em mobile */
	.selection-content {
		padding: 24px 16px;
	}

	.selection-icon {
		font-size: 4rem;
		margin-bottom: 16px;
	}

	.selection-title {
		font-size: 1.5rem;
		margin-bottom: 12px;
	}

	.selection-description {
		font-size: 1rem;
		margin-bottom: 24px;
	}

	.feature-item {
		font-size: 0.9rem;
	}

	/* Menu dropdown em mobile */
	.chat-menu-dropdown {
		min-width: 200px;
		right: 8px;
		top: calc(100% + 4px);
	}
}

/* Responsividade - Mobile pequeno (até 480px) */
@media (max-width: 480px) {
	.app-container {
		height: calc(100vh - 70px);
		margin-top: 70px;
	}

	.sidebar {
		width: 90%;
		max-width: 100%;
		top: 70px;
		height: calc(100vh - 70px);
	}

	.sidebar-overlay {
		top: 70px;
	}

	.menu-toggle {
		top: 80px;
		left: 12px;
		width: 40px;
		height: 40px;
	}

	.chat-header {
		padding: 10px 12px;
		min-height: 60px;
	}

	.contact-avatar {
		width: 36px;
		height: 36px;
		min-width: 36px;
		margin-right: 8px;
	}

	.contact-info h2 {
		font-size: 0.95rem;
	}

	.contact-status {
		font-size: 0.75rem;
	}

	.message {
		max-width: 90%;
		padding: 8px 12px;
		font-size: 0.9rem;
		margin-bottom: 8px;
	}

	.messages-container {
		padding: 12px 8px;
		padding-bottom: 16px;
	}

	.chat-input-container {
		padding: 10px 12px;
		min-height: 68px;
	}

	.message-input {
		font-size: 0.9rem;
		padding: 8px 12px;
		min-height: 40px;
	}

	.send-btn {
		width: 40px;
		height: 40px;
		margin-left: 6px;
	}

	.emoji-btn {
		width: 36px;
		height: 36px;
		margin-right: 6px;
		font-size: 1.1rem;
	}

	.emoji-picker {
		width: calc(100vw - 24px);
		max-height: 180px;
	}

	.chat-avatar {
		width: 42px;
		height: 42px;
		margin-right: 10px;
	}

	.chat-item {
		padding: 10px;
	}

	.chat-name {
		font-size: 0.9rem;
	}

	.chat-preview {
		font-size: 0.8rem;
	}

	.selection-icon {
		font-size: 3.5rem;
	}

	.selection-title {
		font-size: 1.3rem;
	}

	.selection-description {
		font-size: 0.95rem;
	}
}

/* Ajustes para orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
	.app-container {
		height: calc(100vh - 70px);
		margin-top: 70px;
	}

	.chat-header {
		min-height: 56px;
		padding: 8px 16px;
	}

	.messages-container {
		padding: 12px;
	}

	.chat-input-container {
		min-height: 64px;
		padding: 8px 16px;
	}

	.message-input {
		min-height: 40px;
		max-height: 80px;
	}
}

@media (min-width: 769px) {
	.menu-toggle {
		display: none;
	}
}

.menu-toggle {
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	color: white;
	cursor: pointer;
	width: 40px;
	height: 40px;
	font-size: 1.1rem;
	margin-right: 12px;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	display: none;
	align-items: center;
	justify-content: center;
	/* Melhorar área de toque em mobile */
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	z-index: 1001;
}

.menu-toggle:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.1);
	border-color: rgba(255, 255, 255, 0.3);
}

.back-to-chats-btn {
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	color: white;
	cursor: pointer;
	width: 40px;
	height: 40px;
	font-size: 1.1rem;
	margin-right: 12px;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	display: none;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	/* Melhorar área de toque em mobile */
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.back-to-chats-btn:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.1);
	border-color: rgba(255, 255, 255, 0.3);
}

/* Menu do Chat - Lado Direito */
.chat-menu-btn {
	background: transparent; /* Remove a bola/brilho branco */
	border: none; /* Remove a borda branca */
	border-radius: 50%;
	color: #e5e7eb;
	cursor: pointer;
	width: 40px;
	height: 40px;
	font-size: 1.1rem;
	transition: color 0.2s ease, transform 0.2s ease;
	backdrop-filter: none;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: none;
}

.chat-menu-btn:hover {
	background: transparent; /* Mantém sem círculo no hover */
	transform: scale(1.05);
	color: #ffffff;
}

.chat-menu-btn.active {
	background: transparent; /* Sem fundo também quando ativo */
	color: #ffffff;
}

.chat-menu-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: rgba(30, 41, 59, 0.98);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	min-width: 220px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 10000;
	overflow: hidden;
	display: block;
}

.chat-menu-dropdown.show {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
	display: block !important;
}

.menu-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	color: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 0.95rem;
}

.menu-item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.menu-item i {
	width: 20px;
	text-align: center;
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.7);
}

.menu-item:hover i {
	color: #667eea;
}

.menu-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.1);
	margin: 4px 0;
}

.menu-item.danger {
	color: #ef4444;
}

.menu-item.danger:hover {
	background: rgba(239, 68, 68, 0.1);
	color: #f87171;
}

.menu-item.danger i {
	color: #ef4444;
}

/* Scrollbar personalizado */
.chats-list::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
	width: 6px;
}

.chats-list::-webkit-scrollbar-track,
.messages-container::-webkit-scrollbar-track {
	background: transparent;
}

.chats-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb {
	background: var(--gradient-primary);
	border-radius: 3px;
}

.chats-list::-webkit-scrollbar-thumb:hover,
.messages-container::-webkit-scrollbar-thumb:hover {
	background: var(--gradient-primary-hover);
}

/* Melhorias de acessibilidade */
.chat-item:focus,
.message-input:focus,
.send-btn:focus,
.theme-toggle:focus,
.emoji-btn:focus,
.chat-action-btn:focus {
	outline: 2px solid #2196F3;
	outline-offset: 2px;
}

/* Animações suaves para transições de tema */
.sidebar-header,
.search-container,
.chat-item,
.chat-header,
.chat-input-container {
	transition: all 0.3s ease;
}

/* Efeito de loading para mensagens */
.message.sending {
	opacity: 0.7;
	transform: scale(0.98);
}

.message.error {
	background: linear-gradient(135deg, #ffebee, #ffcdd2);
	border: 1px solid #f44336;
}

/* Indicador de mensagem não lida */
.chat-item.unread .chat-preview {
	font-weight: 600;
	color: #2196F3;
}

.chat-item.unread::after {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--gradient-primary);
	border-radius: 50%;
	position: absolute;
	right: var(--spacing-md);
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
}

/* Efeito de brilho nos elementos gradientes */
/* REMOVIDO .contact-avatar::after que causava a elipse branca */
.chat-avatar::after,
.send-btn::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: inherit;
	background: linear-gradient(135deg,
			rgba(255, 255, 255, 0.2) 0%,
			rgba(255, 255, 255, 0) 50%,
			rgba(255, 255, 255, 0.2) 100%);
	pointer-events: none;
}

/* Estado vazio do chat */
.empty-chat-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: var(--spacing-xl);
	text-align: center;
}

.empty-chat-state i {
	font-size: 4rem;
	color: var(--text-light);
	margin-bottom: var(--spacing-md);
	opacity: 0.5;
}

.empty-chat-state p {
	color: var(--text-light);
	font-size: 1.15rem;
	max-width: 420px;
	line-height: 1.6;
}

/* Garantir que elementos sejam clicáveis */
.chat-item,
.send-btn,
.emoji-btn,
.chat-action-btn,
.menu-toggle,
.theme-toggle {
	cursor: pointer;
	pointer-events: auto;
	position: relative;
	z-index: 1;
}

/* Garantir que mensagens sejam visíveis */
.message {
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

/* Garantir que sidebar seja clicável */
.sidebar {
	position: relative;
	z-index: 10;
}

.chat-area {
	position: relative;
	z-index: 1;
}

/* Ajustar z-index para mobile */
@media (max-width: 768px) {
	.sidebar {
		z-index: 1000;
	}

	.sidebar-overlay {
		z-index: 999;
	}

	.chat-area {
		z-index: 1;
	}

	.menu-toggle {
		z-index: 1001;
	}
}

/* Estilos para chats inativos */
.chat-item.inactive {
	opacity: 0.7;
}

.chat-item.inactive:hover {
	opacity: 0.9;
}

.status-badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.7rem;
	font-weight: 600;
	margin-left: 6px;
	text-transform: uppercase;
}

.status-badge.canceled {
	background-color: #ffebee;
	color: #c62828;
}

.status-badge.completed {
	background-color: #e8f5e9;
	color: #2e7d32;
}

.dark-theme .status-badge.canceled {
	background-color: #4a1f1f;
	color: #ffcdd2;
}

.dark-theme .status-badge.completed {
	background-color: #1b3e1f;
	color: #c8e6c9;
}

/* Estilos antigos de navbar removidos - usando header padrão agora */
/* Barra de Navegação Prato Justo - DESCONTINUADO */
/* .navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
} */

/* Estilos genéricos de navbar antiga REMOVIDOS - usando header padrão agora */
/* .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo:hover {
    transform: scale(1.05);
    color: #fff;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
} */

/* Estilos genéricos de navbar REMOVIDOS - usando header padrão agora */
/* Esses estilos estavam conflitando com a navbar padrão do projeto */
/*
.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.nav-link::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;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.nav-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after {
    width: 80%;
}

.nav-link.active ~ ::after {
    width: 80%;
}

.nav-link:hover {
    filter: brightness(1.2);
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-icon {
        font-size: 1.7rem;
    }

    .nav-menu {
        gap: 8px;
    }

    .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .nav-link i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .logo {
        margin-bottom: 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .nav-link span {
        display: none;
    }

    .nav-link i {
        font-size: 1.1rem;
        margin: 0;
    }
}
*/

/* Animações suaves - DESCONTINUADO (usando header padrão) */
/* .navbar {
    animation: slideDown 0.5s ease-out;
} */

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

/* Melhorias de acessibilidade - REMOVIDO (usando header padrão) */
/* .nav-link:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
} */

/* Efeito de profundidade - DESCONTINUADO (usando header padrão) */
/* .navbar {
    background:
        linear-gradient(135deg, #667eea 0%, #764ba2 100%),
        radial-gradient(circle at top right, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
} */

/* Loading suave para os itens - REMOVIDO (usando header padrão) */
/* .nav-item {
    animation: fadeInUp 0.6s ease-out;
}

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

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