/* ===== AmoLab Chat — theme tokens ===== */
:root {
	--amc-brand: #9E61FF;
	--amc-brand-dark: #7b3fe0;
	--amc-brand-light: #b07cff;
	--amc-brand-gradient: linear-gradient(145deg, #b07cff 0%, #9E61FF 45%, #7b3fe0 100%);
	--amc-header-gradient: linear-gradient(135deg, #a56bff 0%, #9E61FF 40%, #7d45e8 100%);
	--amc-surface: #ffffff;
	--amc-surface-muted: #f7f4fc;
	--amc-surface-input: #fbf9ff;
	--amc-text: #2b2340;
	--amc-text-muted: #8a7aa8;
	--amc-text-soft: #b0a3c4;
	--amc-border: #efe8f8;
	--amc-border-strong: #e8ddf7;
	--amc-bubble-operator: #f1f3f8;
	--amc-bubble-client: #efe3ff;
	--amc-bubble-operator-op: #efe3ff;
	--amc-bubble-client-op: #f1f3f8;
	--amc-dialog-bg: #ffffff;
	--amc-dialog-active: #fbf9ff;
	--amc-dialog-unread: #fff6f8;
	--amc-unread-border: #ffd8df;
	--amc-active-border: #d7c4f5;
	--amc-shadow: 0 24px 60px rgba(40, 16, 72, 0.28);
	--amc-link: #7b3fe0;
	--amc-spinner-track: #e6d8ff;
	--amc-badge-ring: #ffffff;
	--amc-sender-idle: #d7c4f5;
}

html.dark-theme,
html[data-theme="dark"],
html[data-bs-theme="dark"] {
	--amc-surface: #1c1826;
	--amc-surface-muted: #14101c;
	--amc-surface-input: #221c30;
	--amc-text: #ece6f8;
	--amc-text-muted: #a89bc0;
	--amc-text-soft: #7d7394;
	--amc-border: #2f2840;
	--amc-border-strong: #3a324f;
	--amc-bubble-operator: #252033;
	--amc-bubble-client: #3d2f66;
	--amc-bubble-operator-op: #3d2f66;
	--amc-bubble-client-op: #252033;
	--amc-dialog-bg: #211c2d;
	--amc-dialog-active: #2e2642;
	--amc-dialog-unread: #2d1f28;
	--amc-unread-border: #5c3040;
	--amc-active-border: #5a4a78;
	--amc-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	--amc-link: #c4a8ff;
	--amc-spinner-track: #3a324f;
	--amc-badge-ring: #1c1826;
	--amc-sender-idle: #4a3a66;
}

/* ===== Visitor widget (AmoLab Chat) ===== */
.buttonChat {
	display: none;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99990;
	align-items: flex-end;
	gap: 12px;
	font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	letter-spacing: 0;
}
.buttonChat.is-ready {
	display: flex;
}
.buttonChat .message {
	display: none;
	position: relative;
	width: min(260px, calc(100vw - 110px));
	padding: 14px 34px 14px 14px;
	border-radius: 16px 16px 4px 16px;
	background: var(--amc-brand-gradient) !important;
	color: #fff !important;
	border: 0 !important;
	box-shadow: 0 14px 40px rgba(158, 97, 255, 0.42) !important;
	text-align: left;
	line-height: 1.35;
	animation: amcPop 0.28s ease;
}
.buttonChat .message.is-on {
	display: block;
}
.buttonChat .message .name {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 4px;
	color: rgba(255,255,255,0.9) !important;
}
.buttonChat .message .text {
	font-size: 13px;
	color: rgba(255,255,255,0.96) !important;
}
.buttonChat .message .number {
	display: none;
}
.amc-preview-close {
	position: absolute;
	top: 6px;
	right: 8px;
	border: 0;
	background: transparent;
	color: rgba(255,255,255,0.55);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}
.amc-preview-close:hover {
	color: #fff;
}
.amc-fab {
	position: relative;
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: var(--amc-brand-gradient);
	box-shadow: 0 12px 28px rgba(158, 97, 255, 0.42);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	display: grid;
	place-items: center;
	padding: 0;
}
.amc-fab:hover {
	transform: translateY(-2px) scale(1.03);
	box-shadow: 0 16px 34px rgba(158, 97, 255, 0.5);
}
.amc-fab-icon {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 26px;
	height: 26px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 26px;
	transition: opacity 0.18s ease, transform 0.18s ease;
}
.amc-fab-icon--chat {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8.5 8.5 0 0 1-8.5 8.5c-1.4 0-2.7-.3-3.9-.9L3 21l1.5-4.4A8.4 8.4 0 0 1 3.5 12 8.5 8.5 0 0 1 12 3.5 8.5 8.5 0 0 1 21 12z'/%3E%3C/svg%3E");
	opacity: 1;
	transform: scale(1);
}
.amc-fab-icon--close {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
	opacity: 0;
	transform: scale(0.6) rotate(-40deg);
}
.buttonChat.is-open .amc-fab-icon--chat {
	opacity: 0;
	transform: scale(0.6) rotate(40deg);
}
.buttonChat.is-open .amc-fab-icon--close {
	opacity: 1;
	transform: scale(1) rotate(0);
}
.amc-badge {
	display: none;
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: #ff4d6a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	box-shadow: 0 0 0 2px var(--amc-badge-ring);
}
.amc-badge.is-on {
	display: block;
}
.buttonChat.has-unread .amc-fab {
	animation: amcPulse 1.8s ease-in-out infinite;
}

.chat {
	display: flex;
	flex-direction: column;
	position: fixed;
	right: 22px;
	bottom: 96px;
	width: min(380px, calc(100vw - 24px));
	height: min(620px, calc(100vh - 120px));
	z-index: 99991;
	border-radius: 20px;
	overflow: hidden;
	background: var(--amc-surface);
	box-shadow: var(--amc-shadow);
	font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(16px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.chat.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}
.headerChat {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 48px 16px 16px;
	background: var(--amc-header-gradient);
	color: #fff;
	border: 0;
	box-shadow: none;
}
.headerChat .avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #fff center/cover no-repeat;
	background-image: url(/img/chat/default-avatar.svg);
	box-shadow: 0 0 0 2px rgba(255,255,255,0.45);
	flex: 0 0 auto;
}
.headerChat .user {
	margin: 0;
	min-width: 0;
}
.headerChat .name {
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.headerChat .meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 3px;
	font-size: 12px;
	opacity: 0.92;
}
.headerChat .tochka {
	width: 8px;
	height: 8px;
	border: 0;
	border-radius: 50%;
	background: #ffb4c0;
	display: inline-block;
}
.headerChat .user.online .tochka {
	background: #5dffa0;
	box-shadow: 0 0 0 3px rgba(93,255,160,0.25);
}
.headerChat .status {
	margin: 0;
	border: 0;
	color: inherit;
	display: inline;
}
.headerChat .user.online .status,
.headerChat .user.offline .status {
	color: inherit;
	border: 0;
}
.headerChat .exit,
.headerChat .amc-sound-toggle {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background-color: rgba(255,255,255,0.14);
	background-position: center;
	background-size: 18px;
	background-repeat: no-repeat;
	color: transparent;
	font-size: 0;
	line-height: 0;
	padding: 0;
	cursor: pointer;
	opacity: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
.headerChat .exit {
	right: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cline x1='7' y1='7' x2='17' y2='17'/%3E%3Cline x1='17' y1='7' x2='7' y2='17'/%3E%3C/svg%3E");
}
.headerChat .amc-sound-toggle {
	right: 52px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3Cpath d='M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E");
}
.headerChat .amc-sound-toggle.is-muted {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cline x1='23' y1='9' x2='17' y2='15'/%3E%3Cline x1='17' y1='9' x2='23' y2='15'/%3E%3C/svg%3E");
	opacity: 0.85;
}
.headerChat .exit:hover,
.headerChat .amc-sound-toggle:hover {
	background-color: rgba(255,255,255,0.24);
}
.foochat {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	height: auto;
	background: var(--amc-surface);
}
.bodyChat {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	background: transparent;
	padding: 8px 0 4px;
	scrollbar-width: thin;
	scrollbar-color: var(--amc-border-strong) transparent;
}
.bodyChat::-webkit-scrollbar {
	width: 6px;
}
.bodyChat::-webkit-scrollbar-thumb {
	background: var(--amc-border-strong);
	border-radius: 6px;
}
.bodyChat .service-message {
	margin: 18px 18px 8px;
	padding: 12px 14px;
	border: 0;
	border-radius: 14px;
	background: rgba(158,97,255,0.08);
	color: var(--amc-text-muted);
	font-size: 13px;
	text-align: center;
}
.bodyChat .messages {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0 12px 8px;
}
.bodyChat .message {
	position: relative;
	max-width: 86%;
	margin: 4px 0;
	padding: 10px 12px 12px;
	border-radius: 16px;
	color: var(--amc-text);
	box-shadow: 0 1px 0 rgba(40,16,72,0.04);
}
.bodyChat .message.operator {
	align-self: flex-start;
	background: var(--amc-bubble-operator);
	border: 1px solid var(--amc-border);
	border-bottom-left-radius: 5px;
}
.bodyChat .message.client,
.bodyChat .message.user {
	align-self: flex-end;
	background: var(--amc-bubble-client) !important;
	border: 1px solid rgba(158, 97, 255, 0.12);
	border-bottom-right-radius: 5px;
}
.bodyChat .message .corner {
	display: none;
}
.bodyChat .sender {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 11px;
	color: var(--amc-text-muted);
	margin-bottom: 4px;
}
.bodyChat .text {
	margin: 0;
	margin-right: 0;
	overflow: visible;
	line-height: 1.4;
	word-break: break-word;
}
.bodyChat .text a {
	color: var(--amc-link);
}
.bodyChat .typing {
	display: none;
	align-items: center;
	gap: 4px;
	width: auto;
	height: auto;
	margin: 0 0 10px 18px;
	padding: 8px 10px;
	border-radius: 14px;
	background: var(--amc-bubble-operator);
	float: none;
	background-image: none;
}
.bodyChat .typing.is-on {
	display: inline-flex;
}
.bodyChat .typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--amc-brand);
	opacity: 0.35;
	animation: amcDot 1.1s infinite ease-in-out;
}
.bodyChat .typing span:nth-child(2) { animation-delay: 0.15s; }
.bodyChat .typing span:nth-child(3) { animation-delay: 0.3s; }
.beforeSend {
	display: none;
	text-align: center;
	width: 100%;
	padding: 8px 0 12px;
}
.beforeSend.is-on {
	display: block;
}
.messages .loader {
	padding: 24px 0;
}
.amc-spinner {
	width: 28px;
	height: 28px;
	margin: 0 auto;
	display: block;
	border: 2.5px solid var(--amc-spinner-track);
	border-top-color: var(--amc-brand);
	border-radius: 50%;
	animation: amcSpin 0.75s linear infinite;
}
.message .status {
	float: none;
	position: absolute;
	right: 10px;
	bottom: 8px;
	margin: 0;
	width: 16px;
	height: 15px;
	background-repeat: no-repeat;
	background-size: contain;
}
.message .name {
	text-transform: none;
	margin-right: 0;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.amc-ai-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1px 6px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.3;
	color: #6d28d9;
	background: rgba(109, 40, 217, 0.12);
	border: 1px solid rgba(109, 40, 217, 0.22);
	flex-shrink: 0;
}
.bodyChat .message.is-ai,
.dialogMessage .bodyChat .message.is-ai {
	border-color: rgba(109, 40, 217, 0.28);
}
.message img {
	max-width: 100%;
	border-radius: 10px;
	cursor: pointer;
}
/* 1✓ отправлено · 2✓ доставлено · 2✓ зелёные прочитано */
.chat .client.message[data-status="Отправлено"] .status,
.chat .user.message[data-status="Отправлено"] .status,
.chat .operator.message[data-status="Отправлено"] .status {
	background-image: url(/img/chat/message-send.svg);
}
.chat .client.message[data-status="Доставлено"] .status,
.chat .user.message[data-status="Доставлено"] .status,
.chat .operator.message[data-status="Доставлено"] .status {
	background-image: url(/img/chat/message-delivered.svg);
}
.chat .client.message[data-status="Прочитано"] .status,
.chat .user.message[data-status="Прочитано"] .status,
.chat .operator.message[data-status="Прочитано"] .status {
	background-image: url(/img/chat/message-read.svg);
}

.chat .footerChat {
	background: var(--amc-surface);
	border-top: 1px solid var(--amc-border);
	padding: 10px 12px 8px;
	position: relative;
}
.amc-emoji-panel {
	display: none;
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: calc(100% + 6px);
	max-height: 210px;
	overflow-y: auto;
	padding: 10px;
	border-radius: 16px;
	background: var(--amc-surface);
	border: 1px solid var(--amc-border-strong);
	box-shadow: var(--amc-shadow);
	grid-template-columns: repeat(8, 1fr);
	gap: 2px;
	z-index: 3;
}
.amc-emoji-panel.is-open {
	display: grid;
}
.amc-emoji-item {
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	padding: 6px 2px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.12s ease, transform 0.12s ease;
}
.amc-emoji-item:hover {
	background: rgba(158, 97, 255, 0.12);
	transform: scale(1.08);
}
.amc-emoji-btn {
	flex: 0 0 auto;
	align-self: center;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	opacity: 0.75;
	background: transparent center/18px no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b3fe0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 14s1.5 2 4 2 4-2 4-2'/%3E%3Cline x1='9' y1='9' x2='9.01' y2='9'/%3E%3Cline x1='15' y1='9' x2='15.01' y2='9'/%3E%3C/svg%3E");
}
.amc-emoji-btn:hover,
.amc-emoji-btn.is-active {
	opacity: 1;
	background-color: rgba(158, 97, 255, 0.12);
}
.bodyChat .text {
	font-size: 15px;
	line-height: 1.45;
}
.amc-chat-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--amc-brand-gradient);
	color: #fff !important;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none !important;
	box-shadow: 0 8px 20px rgba(158, 97, 255, 0.28);
}
.amc-chat-btn:hover {
	filter: brightness(1.05);
	color: #fff !important;
}
.chat .footerChat .textarea {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px 6px 10px;
	border: 1px solid var(--amc-border-strong);
	border-radius: 16px;
	background: var(--amc-surface-input);
	min-height: 44px;
}
.chat .footerChat textarea {
	flex: 1;
	width: auto;
	min-height: 22px;
	max-height: 120px;
	height: 22px;
	border: 0;
	box-shadow: none;
	resize: none;
	outline: none;
	padding: 0;
	margin: 0;
	background: transparent;
	font: inherit;
	color: var(--amc-text);
	line-height: 1.35;
	align-self: center;
}
.chat .footerChat .skrepka {
	position: relative;
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	align-self: center;
	border-radius: 8px;
	cursor: pointer;
	opacity: 0.7;
	background: transparent center/18px no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b3fe0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.4 11.6l-8.5 8.5a5 5 0 0 1-7.1-7.1l9.2-9.2a3.2 3.2 0 0 1 4.5 4.5l-9.2 9.2a1.4 1.4 0 0 1-2-2l8.1-8.1'/%3E%3C/svg%3E");
}
.chat .footerChat .skrepka input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}
.chat .footerChat .skrepka span { display: none; }
.chat .footerChat .sender {
	flex: 0 0 auto;
	align-self: center;
	display: block;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	float: none;
	border: 0;
	border-radius: 12px;
	background: var(--amc-sender-idle) center/17px no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 11.2 20.8 3.2 13.6 20.8 10.8 13.2 3.2 11.2z'/%3E%3C/svg%3E");
	opacity: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.chat .footerChat .textarea.has-text .sender,
.chat .footerChat .sender:hover {
	background-color: var(--amc-brand);
}
.chat .footerChat .foofoo {
	display: flex;
	justify-content: center;
	border: 0;
	padding: 6px 0 0;
	color: var(--amc-text-soft);
	font-size: 11px;
}
.chat .footerChat .foofoo div,
.chat .footerChat .smile {
	display: none;
}

body.amc-open {
	overscroll-behavior: none;
}

@media (max-width: 991.98px) {
	.buttonChat {
		right: max(14px, env(safe-area-inset-right, 0px));
		bottom: var(--amolab-fab-bottom, max(14px, env(safe-area-inset-bottom, 0px)));
	}
	.buttonChat .amc-fab {
		width: 44px;
		height: 44px;
		background: linear-gradient(135deg, #b07aff 0%, #9e61ff 55%, #7c3aed 100%);
		box-shadow: 0 8px 20px rgba(158, 97, 255, .4);
	}
	.buttonChat .amc-fab:hover {
		transform: translateY(-2px) scale(1.03);
		box-shadow: 0 12px 26px rgba(158, 97, 255, .48);
	}
	.buttonChat .amc-fab-icon {
		width: 20px;
		height: 20px;
		background-size: 20px;
	}
	.buttonChat .message {
		width: min(260px, calc(100vw - 88px));
	}
	.chat {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100vw;
		width: 100dvw;
		height: 100vh;
		height: 100dvh;
		max-height: none;
		border-radius: 0;
	}
	.chat.is-open ~ .buttonChat,
	body.amc-open .buttonChat {
		display: none !important;
	}
	.headerChat {
		padding-top: calc(16px + env(safe-area-inset-top, 0px));
		padding-right: calc(48px + env(safe-area-inset-right, 0px));
	}
	.chat .footerChat {
		padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
	}
	.chat .footerChat textarea,
	.dialogMessage .footerChat textarea {
		font-size: 16px;
	}
	.amc-emoji-panel {
		left: 8px;
		right: 8px;
		max-height: min(42vh, 240px);
	}
}

@keyframes amcSpin { to { transform: rotate(360deg); } }
@keyframes amcDot {
	0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}
@keyframes amcPop {
	from { opacity: 0; transform: translateY(8px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes amcPulse {
	0%, 100% { box-shadow: 0 12px 28px rgba(158, 97, 255, 0.42); }
	50% { box-shadow: 0 12px 28px rgba(158, 97, 255, 0.42), 0 0 0 10px rgba(158, 97, 255, 0.12); }
}

/* ===== Operator messenger (legacy page /chates) ===== */
.dialogs::-webkit-scrollbar {
	width: 10px;
}
.dialogs::-webkit-scrollbar-thumb {
	background-color: var(--amc-border-strong);
	border-radius: 10px;
}
.block-dialogs {
	min-height: 500px;
	height: 70vh;
	position: relative;
	display: flex;
	color: var(--amc-text);
	padding: 1rem;
	margin: 0;
	background: transparent;
	border: none;
	box-shadow: none;
	border-radius: 0;
}
.dialogs {
	min-width: 370px;
	max-width: 370px;
	height: 100%;
	position: relative;
	overflow-y: overlay;
}
@media screen and (max-width: 1199px) {
	.dialogs {
		min-width: 320px;
		max-width: 320px;
	}
}
@media screen and (max-width: 991px) {
	.dialogs {
		min-width: 250px;
		max-width: 250px;
	}
}
@media screen and (max-width: 767px) {
	.chates-mobile-bar {
		position: relative;
		top: auto;
		z-index: 2;
		margin-bottom: 0;
		flex-shrink: 0;
	}
	.chates-mobile-bar .chates-list {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
	}
	.block-dialogs {
		min-height: calc(100dvh - 170px);
		height: calc(100dvh - 170px);
		padding: 10px !important;
		overflow: hidden;
		flex-direction: column;
	}
	body.amc-chates-chat-open .chates-mobile-bar {
		display: none;
	}
	body.amc-chates-chat-open .block-dialogs {
		min-height: calc(100dvh - 120px);
		height: calc(100dvh - 120px);
		margin-top: 0 !important;
	}
	.block-dialogs .dialogs-rail,
	.block-dialogs .dialogs {
		min-width: 0;
		max-width: none;
		width: 100%;
		margin-right: 0 !important;
		height: 100%;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
	.block-dialogs.is-chat-open .dialogs-rail,
	.block-dialogs.is-chat-open .dialogs {
		display: none !important;
	}
	.dialogMessage {
		display: none;
		min-height: 0;
		border-radius: 14px !important;
		overflow: hidden;
	}
	.block-dialogs.is-chat-open .dialogMessage {
		display: flex !important;
		flex: 1;
		width: 100%;
		min-height: 0;
	}
	.amc-mobile-chat-head {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 12px 14px;
		background: var(--amc-header-gradient);
		color: #fff;
		flex-shrink: 0;
	}
	.amc-mobile-back {
		width: 36px;
		height: 36px;
		border: 0;
		border-radius: 10px;
		flex: 0 0 auto;
		cursor: pointer;
		background: rgba(255,255,255,0.14) center/18px no-repeat;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 6l-6 6 6 6'/%3E%3C/svg%3E");
	}
	.amc-mobile-chat-title {
		min-width: 0;
	}
	.amc-mobile-chat-title .name {
		font-size: 15px;
		font-weight: 600;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.amc-mobile-chat-title .meta {
		margin-top: 2px;
		font-size: 12px;
		opacity: 0.9;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.dialogMessage .bodyChat {
		flex: 1;
		min-height: 0;
	}
	.dialogMessage .footerChat {
		padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
		flex-shrink: 0;
	}
	.dialogMessage .footerChat .amc-emoji-panel {
		left: 8px;
		right: 8px;
		max-height: min(38vh, 220px);
	}
	.dialog .client-info {
		flex-direction: row;
		align-items: flex-start;
	}
	.dialog .client-info .name,
	.amc-dialog-title .name {
		display: block;
	}
}
.dialog {
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}
.amc-dialog {
	border: 1px solid var(--amc-border);
	background: var(--amc-dialog-bg);
}
.amc-dialog:hover {
	box-shadow: 0 6px 18px rgba(40, 16, 72, 0.08);
}
html.dark-theme .amc-dialog:hover,
html[data-theme="dark"] .amc-dialog:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.amc-dialog.noread {
	background: var(--amc-dialog-unread) !important;
	border-color: var(--amc-unread-border);
}
.amc-dialog.active {
	background: var(--amc-dialog-active) !important;
	border-color: var(--amc-active-border);
	box-shadow: 0 6px 18px rgba(40, 16, 72, 0.08);
}
html.dark-theme .amc-dialog.active,
html[data-theme="dark"] .amc-dialog.active {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.amc-dialog-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}
.amc-dialog-title {
	min-width: 0;
}
.amc-dialog-title .name {
	display: block;
	font-weight: 600;
	color: var(--amc-text);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.amc-dialog-domain {
	display: block;
	font-size: 11px;
	color: var(--amc-brand);
	margin-top: 2px;
	text-transform: lowercase;
}
.amc-dialog-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}
.amc-dialog-delete {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--amc-text-soft, #94a3b8);
	width: 1.6rem;
	height: 1.6rem;
	padding: 0;
	border-radius: .45rem;
	display: inline-grid;
	place-items: center;
	line-height: 1;
	cursor: pointer;
	opacity: .55;
	transition: opacity .15s ease, color .15s ease, background .15s ease;
}
.amc-dialog-delete:hover,
.amc-dialog:hover .amc-dialog-delete {
	opacity: 1;
	color: #dc2626;
	background: rgba(220, 38, 38, .08);
}
.amc-dialog-delete:disabled {
	opacity: .35;
	cursor: wait;
}
.amc-dialog-delete i {
	font-size: .9rem;
}
.amc-dialog-preview {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	color: var(--amc-text-muted);
	font-size: 13px;
}
.amc-dialog-preview .message {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}
.amc-dialog-preview .date {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--amc-text-soft);
}
.amc-dialog-empty {
	padding: 24px 16px;
	text-align: center;
	color: var(--amc-text-muted);
	font-size: 14px;
}
.dialog:first-child {
	margin-top: 0 !important;
}
.dialog:last-child {
	margin-bottom: 0 !important;
}
.dialog.noread {
	background: var(--amc-dialog-unread);
}
.dialog.active {
	background: var(--amc-dialog-active) !important;
}
.dialog .client-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.dialog .client-info .name {
	max-width: 100%;
	text-transform: capitalize;
	overflow: hidden;
	white-space: nowrap;
	margin-right: 10px;
	color: var(--amc-link);
}
.dialog .client-info .id {
	background: none;
	border: none;
	box-shadow: none;
	padding: 0;
	margin: 0 10px 0 0;
	color: var(--amc-text-muted);
}
.dialog .client-info .tochka {
	display: inline-block;
	border: 3px solid;
	width: 10px;
	height: 10px;
	border-radius: 10px;
	border-color: #ff0033;
	color: #ff0033;
}
.dialog .client-info.online .tochka {
	border-color: #4CAF50;
	color: #4CAF50;
}
.dialog .chat-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 5px 0;
}
.dialog .chat-info .name {
	text-transform: uppercase;
	color: #4CAF50;
	font-size: 11px;
}
.dialog .chat-info .date {
	font-size: 12px;
	color: var(--amc-text-soft);
}
.dialog .xmessage {
	color: var(--amc-text-muted);
	display: flex;
}
.dialog .message {
	overflow: hidden;
	white-space: nowrap;
}
.dialog.amc-dialog {
	cursor: pointer;
	user-select: none;
}
.dialogMessage {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--amc-surface-muted);
	border: 1px solid var(--amc-border);
}
.dialogMessage .bodyChat .message .sender {
	color: var(--amc-text-muted);
}
.dialogMessage .bodyChat .message .text a {
	color: var(--amc-link);
}
.amc-dialog-meta .id {
	font-size: 12px;
	color: var(--amc-text-muted);
}
.dialogMessage .bodyChat {
	background: transparent;
	overflow-y: auto;
	height: 100%;
}
.dialogMessage .bodyChat .messages {
	display: flex;
	flex-direction: column;
	padding: 8px 12px;
}
.dialogMessage .bodyChat .message {
	padding: 10px 12px 12px;
	margin: 4px 0;
	border-radius: 16px;
	max-width: 86%;
	color: var(--amc-text);
}
.dialogMessage .bodyChat .message.operator {
	background: var(--amc-bubble-operator-op);
	align-self: flex-end;
	border-bottom-right-radius: 5px;
}
.dialogMessage .bodyChat .message.client,
.dialogMessage .bodyChat .message.user {
	background: var(--amc-bubble-client-op) !important;
	align-self: flex-start;
	border-bottom-left-radius: 5px;
}
.dialogMessage .bodyChat .message .corner {
	display: none;
}
.dialogMessage .bodyChat .typing {
	display: none;
	float: none !important;
	margin: 0 0 10px 12px;
	width: auto;
	height: auto;
	background-image: none;
	padding: 8px 10px;
	border-radius: 14px;
	background: var(--amc-bubble-client-op);
}
.dialogMessage .bodyChat .typing.is-on,
.dialogMessage .bodyChat .typing[style*="block"] {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
}
.client-info div {
	white-space: nowrap;
}
.dialogMessage .operator.message[data-status="Отправлено"] .status {
	background-image: url(/img/chat/message-send.svg);
}
.dialogMessage .operator.message[data-status="Доставлено"] .status {
	background-image: url(/img/chat/message-delivered.svg);
}
.dialogMessage .operator.message[data-status="Прочитано"] .status {
	background-image: url(/img/chat/message-read.svg);
}
.dialogMessage .footerChat {
	background: var(--amc-surface);
	border-top: 1px solid var(--amc-border);
	padding: 10px 12px 8px;
	position: relative;
}
.dialogMessage .footerChat .textarea {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px 6px 10px;
	border: 1px solid var(--amc-border-strong);
	border-radius: 16px;
	background: var(--amc-surface-input);
	min-height: 44px;
}
.dialogMessage .footerChat .amc-emoji-panel {
	left: 12px;
	right: 12px;
	bottom: calc(100% + 6px);
}
.dialogMessage .footerChat .amc-emoji-btn {
	flex: 0 0 auto;
	align-self: center;
}
.dialogMessage .footerChat textarea {
	flex: 1;
	width: auto;
	min-height: 22px;
	max-height: 120px;
	height: 22px;
	border: 0;
	box-shadow: none;
	resize: none;
	outline: none;
	padding: 0;
	margin: 0;
	background: transparent;
	font: inherit;
	color: var(--amc-text);
	line-height: 1.35;
	align-self: center;
}
.dialogMessage .footerChat .sender {
	flex: 0 0 auto;
	align-self: center;
	display: block;
	width: 36px;
	height: 36px;
	margin: 0 !important;
	padding: 0;
	float: none;
	border: 0;
	border-radius: 12px;
	background: var(--amc-brand) center/17px no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 11.2 20.8 3.2 13.6 20.8 10.8 13.2 3.2 11.2z'/%3E%3C/svg%3E");
	opacity: 1;
	cursor: pointer;
}
.dialogMessage .footerChat .foofoo {
	display: none;
}
.dialogMessage .footerChat .skrepka {
	position: relative;
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	align-self: center;
	opacity: 0.7;
	cursor: pointer;
	background: transparent center/18px no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b3fe0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.4 11.6l-8.5 8.5a5 5 0 0 1-7.1-7.1l9.2-9.2a3.2 3.2 0 0 1 4.5 4.5l-9.2 9.2a1.4 1.4 0 0 1-2-2l8.1-8.1'/%3E%3C/svg%3E");
}
.dialogMessage .footerChat .skrepka input {
	position: absolute;
	inset: 0;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

@media only screen and (max-width: 768px) {
	.right-block > .content {
		padding: 70px 0px 5px 0px;
	}
	.block-dialogs {
		left: 0px;
	}
	.dialog {
		padding: 10px;
	}
	.dialog .chat-info {
		align-items: flex-start;
		margin: 1px 0px;
		flex-direction: column;
	}
	.dialog .chat-info .name {
		margin-top: 3px;
		overflow: hidden;
		max-width: 100%;
	}
}

/* ===== /chates in tasks-shell (exchange / LK style) ===== */
.chates-page .tasks-shell-section--flush.chates-shell-section {
	padding: 0;
	border-bottom: 0;
	border-radius: 0 0 1.25rem 1.25rem;
	overflow: hidden;
}

.chates-page .chates-mobile-bar {
	padding: .75rem 1rem .55rem;
}

@media screen and (max-width: 767px) {
	.chates-page .tasks-shell-section--flush.chates-shell-section {
		display: flex;
		flex-direction: column;
		overflow: visible;
	}
	.chates-page .chates-mobile-bar {
		position: relative;
		top: auto;
		z-index: 2;
		background: rgba(248, 250, 252, .96);
	}
	.chates-page .block-dialogs {
		padding: .75rem;
		gap: 0;
		min-height: calc(100dvh - 240px);
		height: calc(100dvh - 240px);
	}
	.chates-page .dialogs-rail {
		flex: 1 1 auto;
		min-width: 0 !important;
		max-width: none !important;
		width: 100% !important;
	}
	.chates-page .dialogs {
		padding: .15rem 0;
		width: 100% !important;
	}
	.chates-page .dialogs-scroll {
		display: none;
	}
	.chates-page .dialogs .dialog.amc-dialog,
	.chates-page .dialogs .dialog {
		margin-right: 0;
		width: 100%;
		max-width: none;
	}
	.chates-page .dialogMessage {
		margin-left: 0;
	}
	body.amc-chates-chat-open .chates-page .block-dialogs {
		min-height: calc(100dvh - 160px);
		height: calc(100dvh - 160px);
	}
}

.chates-page .chates-mobile-bar .chates-list {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	border-radius: .75rem;
	border: 1px solid rgba(158, 97, 255, .22);
	background: rgba(158, 97, 255, .08);
	color: #6d28d9;
	font-weight: 600;
	padding: .55rem .9rem;
}

.chates-page .chates-mobile-bar .chates-list:hover {
	background: rgba(158, 97, 255, .14);
	border-color: rgba(158, 97, 255, .4);
	color: #5b21b6;
}

.chates-page .block-dialogs {
	/* один отступ: слева у списка чатов и с обеих сторон скролла */
	--chates-gutter: 12px;
	--chates-scroll-w: 10px;
	gap: var(--chates-gutter);
	background: rgba(248, 250, 252, .65);
	align-items: stretch;
}

.chates-page .dialogs-rail {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	height: 100%;
	min-height: 0;
	min-width: 0;
	max-width: none;
	width: 100%;
}

@media screen and (min-width: 768px) {
	.chates-page .dialogs-rail {
		min-width: 370px;
		max-width: 370px;
		width: auto;
	}
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
	.chates-page .dialogs-rail {
		min-width: 320px;
		max-width: 320px;
	}
}

@media screen and (min-width: 768px) and (max-width: 991px) {
	.chates-page .dialogs-rail {
		min-width: 250px;
		max-width: 250px;
	}
}

.chates-page .dialogs {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0 !important;
	max-width: none !important;
	height: 100%;
	padding: .15rem 0;
	margin: 0;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.chates-page .dialogs::-webkit-scrollbar {
	width: 0 !important;
	height: 0 !important;
	display: none !important;
}

.chates-page .dialogs-scroll {
	position: relative;
	flex: 0 0 var(--chates-scroll-w);
	width: var(--chates-scroll-w);
	align-self: stretch;
	margin: .35rem 0;
	pointer-events: auto;
	z-index: 2;
}

.chates-page .dialogs-scroll.is-scrollable .dialogs-scroll__thumb {
	opacity: 1;
}

.chates-page .dialogs-scroll__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #f3ecff;
}

.chates-page .dialogs-scroll__thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	min-height: 28px;
	border-radius: 999px;
	background: #b89ae8;
	opacity: 0;
	pointer-events: auto;
	cursor: grab;
	transition: opacity .15s ease, background-color .15s ease;
}

.chates-page .dialogs-scroll__thumb:hover,
.chates-page .dialogs-scroll__thumb.is-dragging {
	background: #9e61ff;
}

.chates-page .dialogs-scroll__thumb.is-dragging {
	cursor: grabbing;
}

.chates-page .dialogs .dialog.amc-dialog,
.chates-page .dialogs .dialog {
	border-radius: .75rem;
	margin: .35rem 0;
	padding: .75rem .85rem;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, .08);
}

.chates-page .dialogMessage {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	margin: 0;
	border-radius: .85rem !important;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, .08);
	box-shadow: 0 2px 10px rgba(15, 23, 42, .03);
}

.chates-page .dialogMessage .footerChat {
	border-top: 1px solid rgba(15, 23, 42, .06);
	background: rgba(248, 250, 252, .9);
}

.chates-page .service-message,
.chates-page .amc-dialog-empty {
	color: #64748b;
}

.chates-page .chates-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 2rem 1rem 1.5rem;
	gap: .65rem;
}

.chates-page .chates-empty__icon {
	width: 3.25rem;
	height: 3.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: .9rem;
	background: rgba(158, 97, 255, .1);
	color: #9e61ff;
	font-size: 1.45rem;
}

.chates-page .chates-empty__title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #1e293b;
}

.chates-page .chates-empty__text {
	margin: 0 0 .5rem;
	max-width: 28rem;
	color: #64748b;
	font-size: .925rem;
	line-height: 1.5;
}

.chates-page .tasks-shell-section .black-bg-block {
	margin: 0;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: .85rem;
	box-shadow: none;
	background: rgba(248, 250, 252, .9);
}

html.dark-theme .chates-page .block-dialogs,
html[data-theme="dark"] .chates-page .block-dialogs,
html[data-bs-theme="dark"] .chates-page .block-dialogs {
	background: rgba(0, 0, 0, .22);
}

html.dark-theme .chates-page .dialogs-scroll__track,
html[data-theme="dark"] .chates-page .dialogs-scroll__track,
html[data-bs-theme="dark"] .chates-page .dialogs-scroll__track {
	background: rgba(158, 97, 255, .18);
}

html.dark-theme .chates-page .dialogs-scroll__thumb,
html[data-theme="dark"] .chates-page .dialogs-scroll__thumb,
html[data-bs-theme="dark"] .chates-page .dialogs-scroll__thumb {
	background: #9e61ff;
}

html.dark-theme .chates-page .dialogs .dialog.amc-dialog,
html.dark-theme .chates-page .dialogs .dialog,
html[data-theme="dark"] .chates-page .dialogs .dialog.amc-dialog,
html[data-theme="dark"] .chates-page .dialogs .dialog,
html[data-bs-theme="dark"] .chates-page .dialogs .dialog.amc-dialog,
html[data-bs-theme="dark"] .chates-page .dialogs .dialog {
	background: #211c2d;
	border-color: rgba(148, 163, 184, .16);
	color: #ece6f8;
}

html.dark-theme .chates-page .dialogs .dialog.amc-dialog.active,
html.dark-theme .chates-page .dialogs .dialog.active,
html[data-theme="dark"] .chates-page .dialogs .dialog.amc-dialog.active,
html[data-theme="dark"] .chates-page .dialogs .dialog.active,
html[data-bs-theme="dark"] .chates-page .dialogs .dialog.amc-dialog.active,
html[data-bs-theme="dark"] .chates-page .dialogs .dialog.active {
	background: #2e2642;
	border-color: rgba(158, 97, 255, .4);
}

html.dark-theme .chates-page .dialogs .dialog.amc-dialog.noread,
html.dark-theme .chates-page .dialogs .dialog.noread,
html[data-theme="dark"] .chates-page .dialogs .dialog.amc-dialog.noread,
html[data-theme="dark"] .chates-page .dialogs .dialog.noread,
html[data-bs-theme="dark"] .chates-page .dialogs .dialog.amc-dialog.noread,
html[data-bs-theme="dark"] .chates-page .dialogs .dialog.noread {
	background: #2d1f28;
	border-color: rgba(239, 68, 68, .28);
}

html.dark-theme .chates-page .amc-dialog-title .name,
html.dark-theme .chates-page .dialog .client-info .name,
html[data-theme="dark"] .chates-page .amc-dialog-title .name,
html[data-theme="dark"] .chates-page .dialog .client-info .name,
html[data-bs-theme="dark"] .chates-page .amc-dialog-title .name,
html[data-bs-theme="dark"] .chates-page .dialog .client-info .name {
	color: #e9e0ff;
}

html.dark-theme .chates-page .amc-dialog-domain,
html[data-theme="dark"] .chates-page .amc-dialog-domain,
html[data-bs-theme="dark"] .chates-page .amc-dialog-domain {
	color: #c4a8ff;
}

html.dark-theme .chates-page .amc-dialog-preview,
html.dark-theme .chates-page .amc-dialog-preview .message,
html.dark-theme .chates-page .dialog .xmessage,
html[data-theme="dark"] .chates-page .amc-dialog-preview,
html[data-theme="dark"] .chates-page .amc-dialog-preview .message,
html[data-theme="dark"] .chates-page .dialog .xmessage,
html[data-bs-theme="dark"] .chates-page .amc-dialog-preview,
html[data-bs-theme="dark"] .chates-page .amc-dialog-preview .message,
html[data-bs-theme="dark"] .chates-page .dialog .xmessage {
	color: #b7adcc;
}

html.dark-theme .chates-page .amc-dialog-preview .date,
html.dark-theme .chates-page .amc-dialog-meta .id,
html.dark-theme .chates-page .dialog .client-info .id,
html[data-theme="dark"] .chates-page .amc-dialog-preview .date,
html[data-theme="dark"] .chates-page .amc-dialog-meta .id,
html[data-theme="dark"] .chates-page .dialog .client-info .id,
html[data-bs-theme="dark"] .chates-page .amc-dialog-preview .date,
html[data-bs-theme="dark"] .chates-page .amc-dialog-meta .id,
html[data-bs-theme="dark"] .chates-page .dialog .client-info .id {
	color: #8f84a8;
}

html.dark-theme .chates-page .dialogMessage,
html[data-theme="dark"] .chates-page .dialogMessage,
html[data-bs-theme="dark"] .chates-page .dialogMessage {
	background: #1c1826;
	border-color: rgba(148, 163, 184, .16);
	color: #ece6f8;
}

html.dark-theme .chates-page .dialogMessage .bodyChat .message.operator,
html[data-theme="dark"] .chates-page .dialogMessage .bodyChat .message.operator,
html[data-bs-theme="dark"] .chates-page .dialogMessage .bodyChat .message.operator {
	background: #3d2f66;
	color: #f3eeff;
}

html.dark-theme .chates-page .dialogMessage .bodyChat .message.client,
html.dark-theme .chates-page .dialogMessage .bodyChat .message.user,
html[data-theme="dark"] .chates-page .dialogMessage .bodyChat .message.client,
html[data-theme="dark"] .chates-page .dialogMessage .bodyChat .message.user,
html[data-bs-theme="dark"] .chates-page .dialogMessage .bodyChat .message.client,
html[data-bs-theme="dark"] .chates-page .dialogMessage .bodyChat .message.user {
	background: #252033 !important;
	color: #ece6f8;
}

html.dark-theme .chates-page .dialogMessage .bodyChat .message .sender,
html[data-theme="dark"] .chates-page .dialogMessage .bodyChat .message .sender,
html[data-bs-theme="dark"] .chates-page .dialogMessage .bodyChat .message .sender {
	color: #a89bc0;
}

html.dark-theme .chates-page .dialogMessage .footerChat,
html[data-theme="dark"] .chates-page .dialogMessage .footerChat,
html[data-bs-theme="dark"] .chates-page .dialogMessage .footerChat {
	background: #171322;
	border-top-color: rgba(148, 163, 184, .14);
}

html.dark-theme .chates-page .dialogMessage .footerChat .textarea,
html[data-theme="dark"] .chates-page .dialogMessage .footerChat .textarea,
html[data-bs-theme="dark"] .chates-page .dialogMessage .footerChat .textarea {
	background: #221c30;
	border-color: rgba(148, 163, 184, .18);
}

html.dark-theme .chates-page .dialogMessage .footerChat textarea,
html[data-theme="dark"] .chates-page .dialogMessage .footerChat textarea,
html[data-bs-theme="dark"] .chates-page .dialogMessage .footerChat textarea {
	color: #ece6f8;
	background: transparent;
}

html.dark-theme .chates-page .dialogMessage .footerChat textarea::placeholder,
html[data-theme="dark"] .chates-page .dialogMessage .footerChat textarea::placeholder,
html[data-bs-theme="dark"] .chates-page .dialogMessage .footerChat textarea::placeholder {
	color: #8f84a8;
}

html.dark-theme .chates-page .service-message,
html.dark-theme .chates-page .amc-dialog-empty,
html[data-theme="dark"] .chates-page .service-message,
html[data-theme="dark"] .chates-page .amc-dialog-empty,
html[data-bs-theme="dark"] .chates-page .service-message,
html[data-bs-theme="dark"] .chates-page .amc-dialog-empty {
	color: #b7adcc;
	background: rgba(255, 255, 255, .04);
}

html.dark-theme .chates-page .chates-empty__title,
html[data-theme="dark"] .chates-page .chates-empty__title,
html[data-bs-theme="dark"] .chates-page .chates-empty__title {
	color: #e2e8f0;
}

html.dark-theme .chates-page .chates-empty__text,
html[data-theme="dark"] .chates-page .chates-empty__text,
html[data-bs-theme="dark"] .chates-page .chates-empty__text {
	color: #94a3b8;
}

html.dark-theme .chates-page .chates-mobile-bar .chates-list,
html[data-theme="dark"] .chates-page .chates-mobile-bar .chates-list,
html[data-bs-theme="dark"] .chates-page .chates-mobile-bar .chates-list {
	background: rgba(158, 97, 255, .14);
	border-color: rgba(158, 97, 255, .28);
	color: #d8b4fe;
}

html.dark-theme .chates-page .tasks-shell-section .black-bg-block,
html[data-theme="dark"] .chates-page .tasks-shell-section .black-bg-block,
html[data-bs-theme="dark"] .chates-page .tasks-shell-section .black-bg-block {
	background: rgba(255, 255, 255, .04);
	border-color: rgba(148, 163, 184, .14);
	color: #e2e8f0;
}
