#trg-message-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.trg-message-modal-box {
	width: 100%;
	max-width: 520px;
	background: #ffffff;
	border-radius: 20px;
	padding: 24px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.trg-message-modal-box h3 {
	margin: 0 0 14px;
	font-size: 24px;
	font-weight: 700;
	color: #14281d;
}

#trg-first-message {
	width: 100%;
	min-height: 140px;
	border: 1px solid #d8ddd8;
	border-radius: 14px;
	padding: 14px 16px;
	font-size: 15px;
	line-height: 1.5;
	resize: vertical;
	outline: none;
	margin-bottom: 16px;
}

#trg-first-message:focus {
	border-color: #166534;
	box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

#trg-send-first-message {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: #166534;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

#trg-send-first-message:hover {
	background: #14532d;
}

#trg-send-first-message:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

@media (max-width: 767px) {
	.trg-message-modal-box {
		padding: 20px;
		border-radius: 16px;
	}

	.trg-message-modal-box h3 {
		font-size: 21px;
	}

	#trg-first-message {
		min-height: 120px;
	}
}
.trg-messages-app {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 24px;
	margin: 40px auto;
	max-width: 1200px;
}

.trg-messages-sidebar,
.trg-messages-main {
	background: #ffffff;
	border: 1px solid #d8ddd8;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.trg-messages-sidebar {
	padding: 20px;
	min-height: 620px;
}

.trg-messages-sidebar h3 {
	margin: 0 0 18px;
	font-size: 24px;
	font-weight: 700;
	color: #14281d;
}

.trg-conversation-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.trg-conversation-item {
	padding: 14px 16px;
	border: 1px solid #e2e6e2;
	border-radius: 14px;
	cursor: pointer;
	background: #fafaf8;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.trg-conversation-item:hover {
	background: #f2f6f2;
	border-color: #166534;
}

.trg-conversation-item.active {
	border-color: #166534;
	background: rgba(22, 101, 52, 0.08);
}

.trg-conversation-title {
	font-weight: 700;
	color: #14281d;
	margin-bottom: 4px;
}

.trg-conversation-meta {
	font-size: 14px;
	color: #66746d;
}

.trg-messages-main {
	display: flex;
	flex-direction: column;
	min-height: 620px;
	overflow: hidden;
}

.trg-chat-header {
	padding: 18px 22px;
	border-bottom: 1px solid #e4e8e4;
	font-size: 18px;
	font-weight: 700;
	color: #14281d;
	background: #fcfcfb;
}

.trg-chat-messages {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	background: #f8faf8;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 400px;
}

.trg-message-bubble {
	max-width: 75%;
	padding: 12px 16px;
	border-radius: 18px;
	font-size: 15px;
	line-height: 1.5;
	word-break: break-word;
}

.trg-message-bubble.mine {
	align-self: flex-end;
	background: #166534;
	color: #ffffff;
	border-bottom-right-radius: 6px;
}

.trg-message-bubble.theirs {
	align-self: flex-start;
	background: #ffffff;
	color: #14281d;
	border: 1px solid #dde3dd;
	border-bottom-left-radius: 6px;
}

.trg-chat-input-wrap {
	display: flex;
	gap: 12px;
	padding: 18px;
	border-top: 1px solid #e4e8e4;
	background: #ffffff;
}

#trg-chat-input {
	flex: 1;
	min-height: 54px;
	max-height: 140px;
	border: 1px solid #d8ddd8;
	border-radius: 14px;
	padding: 14px 16px;
	font-size: 15px;
	line-height: 1.5;
	resize: vertical;
	outline: none;
}

#trg-chat-input:focus {
	border-color: #166534;
	box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

#trg-chat-send {
	min-width: 110px;
	border: 0;
	border-radius: 999px;
	background: #166534;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	padding: 0 20px;
	cursor: pointer;
}

#trg-chat-send:hover {
	background: #14532d;
}

.trg-empty-state {
	color: #6b756f;
	font-size: 15px;
	margin: 0;
}

@media (max-width: 900px) {
	.trg-messages-app {
		grid-template-columns: 1fr;
	}

	.trg-messages-sidebar,
	.trg-messages-main {
		min-height: auto;
	}

	.trg-chat-messages {
		min-height: 320px;
	}

	.trg-message-bubble {
		max-width: 88%;
	}
}
.trg-client-auth-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.trg-client-auth-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.45);
}

.trg-client-auth-box {
	position: relative;
	width: 100%;
	max-width: 680px;
	background: #fff;
	border-radius: 22px;
	box-shadow: 0 24px 60px rgba(0,0,0,0.18);
	padding: 26px;
	z-index: 2;
}

.trg-client-auth-close {
	position: absolute;
	top: 16px;
	right: 18px;
	background: transparent;
	border: 0;
	font-size: 38px;
	line-height: 1;
	color: #7a7a7a;
	cursor: pointer;
}

.trg-client-auth-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 24px;
	border: 1px solid #2f6f17;
	border-radius: 12px;
	overflow: hidden;
}

.trg-client-auth-tab {
	flex: 1;
	border: 0;
	padding: 14px 18px;
	background: #fff;
	color: #2f6f17;
	font-size: 18px;
	font-weight: 500;
	cursor: pointer;
}

.trg-client-auth-tab.active {
	background: #2f6f17;
	color: #fff;
}

.trg-client-auth-panel {
	display: none;
}

.trg-client-auth-panel.active {
	display: block;
}

.trg-client-auth-panel h3 {
	font-size: 40px;
	font-weight: 700;
	color: #4e4e7a;
	margin: 0 0 8px;
}

.trg-client-auth-panel p {
	font-size: 18px;
	color: #666;
	margin: 0 0 24px;
}

.trg-client-auth-field {
	margin-bottom: 18px;
}

.trg-client-auth-field input {
	width: 100%;
	height: 62px;
	border: 1px solid #d7d7e2;
	border-radius: 14px;
	padding: 0 20px;
	font-size: 18px;
	color: #4e4e7a;
	background: #fff;
	outline: none;
}

.trg-client-auth-field input:focus {
	border-color: #9fd0f8;
	box-shadow: 0 0 0 3px rgba(159,208,248,0.20);
}

.trg-client-auth-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 16px;
	line-height: 1.5;
	color: #56567a;
	margin-bottom: 22px;
}

.trg-client-auth-check input {
	margin-top: 4px;
}

.trg-client-auth-submit {
	width: 100%;
	height: 56px;
	border: 0;
	border-radius: 12px;
	background: #256d0c;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	cursor: pointer;
}

.trg-client-auth-submit:hover {
	background: #1f5b09;
}

.trg-client-auth-errors {
	background: #fff4f4;
	border: 1px solid #f3c3c3;
	color: #9d2d2d;
	padding: 14px 16px;
	border-radius: 12px;
	margin-bottom: 18px;
}

.trg-client-auth-errors p {
	margin: 0 0 6px;
	font-size: 15px;
	color: #9d2d2d;
}

.trg-client-auth-errors p:last-child {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.trg-client-auth-box {
		padding: 20px 16px;
		border-radius: 18px;
	}

	.trg-client-auth-panel h3 {
		font-size: 30px;
	}

	.trg-client-auth-panel p {
		font-size: 16px;
	}

	.trg-client-auth-field input {
		height: 56px;
		font-size: 16px;
	}

	.trg-client-auth-submit {
		font-size: 20px;
		height: 52px;
	}
}