/* ═══════════════════════════════════════════════════════════════════════════
   Land Tools — Expert Management System Styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
	--em-primary:    #1a6b3c;
	--em-primary-dk: #155230;
	--em-accent:     #e8a020;
	--em-danger:     #c0392b;
	--em-light:      #f4f6f8;
	--em-border:     #dde1e7;
	--em-text:       #2c3e50;
	--em-muted:      #7f8c8d;
	--em-radius:     10px;
	--em-shadow:     0 2px 12px rgba(0,0,0,.08);
	--em-font:       'SolaimanLipi', 'Noto Sans Bengali', system-ui, sans-serif;
}

/* ── Hub integration ────────────────────────────────────────────────────────── */

.lt-hub-section {
	margin-top: 24px;
}
.lt-hub-section__header {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--em-primary);
	font-family: var(--em-font);
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--em-border);
}
.lt-hub-section__header i { font-size: 1.1rem; }

/* Marquee in hub: no search bar, compact height */
.lt-hub-experts-marquee .lt-em-search__filters { display: none; }
.lt-hub-experts-marquee .lt-em-marquee__track  { padding: 4px 0 8px; }

/* Search section in hub: no extra top padding */
.lt-hub-experts-search .lt-em-search__filters  { margin-bottom: 16px; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */

.lt-em-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 9px 20px;
	border: none;
	border-radius: 6px;
	font-family: var(--em-font);
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .18s, box-shadow .18s, transform .1s;
	text-decoration: none;
}
.lt-em-btn:active { transform: translateY(1px); }
.lt-em-btn--primary  { background: var(--em-primary); color: #fff; }
.lt-em-btn--primary:hover { background: var(--em-primary-dk); color: #fff; }
.lt-em-btn--outline  { background: transparent; color: var(--em-primary); }
.lt-em-btn--outline:hover { background: var(--em-primary); color: #fff; }
.lt-em-btn--danger   { background: var(--em-danger); color: #fff; }
.lt-em-btn--danger:hover { opacity: .9; }
.lt-em-btn--sm  { padding: 5px 12px; font-size: .8rem; }
.lt-em-btn--xs  { padding: 3px 8px;  font-size: .75rem; }
.lt-em-btn--lg  { padding: 12px 28px; font-size: 1rem; }
.lt-em-btn--send { border-radius: 0 6px 6px 0; }

.lt-em-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 20px;
	font-size: .75rem;
	font-weight: 700;
	font-family: var(--em-font);
}
.lt-em-badge--pending    { background: #fff3cd; color: #856404; }
.lt-em-badge--accepted   { background: #cce5ff; color: #004085; }
.lt-em-badge--progress   { background: #d1ecf1; color: #0c5460; }
.lt-em-badge--submitted  { background: #e2d9f3; color: #4a1d96; }
.lt-em-badge--completed  { background: #d4edda; color: #155724; }
.lt-em-badge--disputed   { background: #f8d7da; color: #721c24; }
.lt-em-badge--cancelled  { background: #e2e3e5; color: #383d41; }

.lt-em-loading-spinner::after {
	content: '';
	display: block;
	width: 36px; height: 36px;
	margin: 32px auto;
	border: 4px solid var(--em-border);
	border-top-color: var(--em-primary);
	border-radius: 50%;
	animation: lt-em-spin .8s linear infinite;
}
@keyframes lt-em-spin { to { transform: rotate(360deg); } }

.lt-em-error { color: var(--em-danger); font-size: .875rem; margin-top: 8px; }
.lt-em-notice { color: #0c5460; background: #d1ecf1; padding: 10px 14px; border-radius: 6px; font-size: .875rem; }

/* ── Login wall ─────────────────────────────────────────────────────────────── */

.lt-em-login-wall {
	text-align: center;
	padding: 48px 24px;
	background: var(--em-light);
	border-radius: var(--em-radius);
	border: 2px dashed var(--em-border);
}
.lt-em-login-wall__icon { font-size: 2.5rem; }
.lt-em-login-wall__title { font-family: var(--em-font); font-size: 1.25rem; color: var(--em-text); margin: 10px 0 6px; }
.lt-em-login-wall__text { color: var(--em-muted); margin-bottom: 20px; }
.lt-em-login-wall__actions { display: flex; gap: 10px; justify-content: center; }

/* ── Expert card / search ───────────────────────────────────────────────────── */

.lt-em-search__filters {
	background: var(--em-light);
	border-radius: var(--em-radius);
	padding: 20px 24px;
	margin-bottom: 24px;
	border: 1px solid var(--em-border);
}
.lt-em-search__title {
	font-family: var(--em-font);
	font-size: 1.3rem;
	color: var(--em-primary);
	margin: 0 0 16px;
}
.lt-em-search__row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: flex-end;
}
.lt-em-search__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1 1 180px;
}
.lt-em-search__field label { font-weight: 600; font-size: .875rem; color: var(--em-text); }
.lt-em-search__field select,
.lt-em-search__field input {
	padding: 8px 12px;
	border: 1.5px solid var(--em-border);
	border-radius: 6px;
	font-family: var(--em-font);
	font-size: .9rem;
	background: #fff;
	transition: border-color .2s;
}
.lt-em-search__field select:focus,
.lt-em-search__field input:focus {
	outline: none;
	border-color: var(--em-primary);
	box-shadow: 0 0 0 3px rgba(26,107,60,.12);
}
.lt-em-search__field select:disabled {
	background: var(--em-light);
	color: var(--em-muted);
	cursor: not-allowed;
	opacity: .7;
}

.lt-em-grid {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	min-height: 80px;
}
.lt-em-grid .lt-em-expert-card {
	flex: 0 0 240px;
}

/* ── Expert card — landscape layout ─────────────────────────────────────────── */

.lt-em-expert-card {
	background: #fff;
	border-radius: var(--em-radius);
	border: 1px solid var(--em-border);
	box-shadow: var(--em-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;          /* column: top-content + footer */
	transition: transform .18s, box-shadow .18s;
}
.lt-em-expert-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,.11);
}

/* Top row: avatar left, text right */
.lt-em-expert-card__top {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 10px;
	flex: 1;
}

.lt-em-expert-card__photo-wrap {
	position: relative;
	flex-shrink: 0;
}
.lt-em-expert-card__photo {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--em-border);
	box-shadow: 0 1px 6px rgba(0,0,0,.10);
	background: #e8f0ec;
	display: block;
}
.lt-em-expert-card__photo[data-no-photo="1"] {
	object-fit: contain;
	padding: 6px;
}
.lt-em-expert-card__verified {
	position: absolute;
	bottom: 0;
	right: -2px;
	background: var(--em-primary);
	color: #fff;
	width: 16px; height: 16px;
	border-radius: 50%;
	border: 2px solid #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .6rem;
	font-weight: 900;
}

.lt-em-expert-card__body {
	flex: 1;
	min-width: 0;
}
.lt-em-expert-card__name {
	font-family: var(--em-font);
	font-size: .9rem;
	font-weight: 700;
	color: var(--em-text);
	margin: 0 0 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: capitalize;
}
.lt-em-expert-card__name-link {
	color: inherit;
	text-decoration: none;
}
.lt-em-expert-card__name-link:hover {
	text-decoration: underline;
	color: var(--em-primary, #1d4ed8);
}
.lt-em-expert-card__desig,
.lt-em-expert-card__location {
	font-size: .75rem;
	color: var(--em-muted);
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lt-em-expert-card__location { margin-top: 1px; }

/* Footer: buttons full-width across the bottom */
.lt-em-expert-card__actions {
	display: flex;
	gap: 0;
	border-top: 1px solid var(--em-border);
}
.lt-em-expert-card__actions .lt-em-btn {
	flex: 1;
	justify-content: center;
	border-radius: 0;
	padding: 7px 6px;
	font-size: .78rem;
	border-right: 1px solid var(--em-border);
}
.lt-em-expert-card__actions .lt-em-btn:last-child { border-right: none; }

.lt-em-search__empty { text-align: center; padding: 32px; color: var(--em-muted); }

/* ── Marquee search strip ───────────────────────────────────────────────────── */

.lt-em-marquee-search {
	padding: 10px 0 14px;
}
.lt-em-marquee-search__row {
	display: flex;
	gap: 8px;
	align-items: stretch;
	flex-wrap: wrap;
}
.lt-em-marquee-search__field {
	flex: 1 1 180px;
	min-width: 0;
}
.lt-em-marquee-search__field select {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1.5px solid var(--em-border);
	border-radius: 6px;
	font-family: var(--em-font);
	font-size: .875rem;
	background: #fff;
	color: var(--em-text);
	transition: border-color .2s;
	box-sizing: border-box;
}
.lt-em-marquee-search__field select:focus {
	outline: none;
	border-color: var(--em-primary);
}
.lt-em-marquee-search__btn {
	flex: 0 0 auto;
	height: 40px;
	padding: 0 20px;
	font-size: .875rem;
	white-space: nowrap;
}
@media (max-width: 480px) {
	.lt-em-marquee-search__field { flex: 1 1 100%; }
	.lt-em-marquee-search__btn  { width: 100%; justify-content: center; height: 42px; }
}

/* ── Results container — scrollable + drag-to-scroll ────────────────────────── */

.lt-em-results {
	overflow-x: auto;
	overflow-y: hidden;
	cursor: grab;
}
.lt-em-results.is-dragging {
	cursor: grabbing;
	user-select: none;
}

/* ── Marquee mode ───────────────────────────────────────────────────────────── */

.lt-em-search--marquee-mode .lt-em-results { overflow: hidden; max-height: none; cursor: default; }
.lt-em-marquee__track {
	display: flex;
	gap: 20px;
	animation: lt-em-marquee 280s linear infinite;
	width: max-content;
	cursor: grab;
}
.lt-em-marquee__track:hover { animation-play-state: paused; }
.lt-em-marquee__track.is-dragging { cursor: grabbing; user-select: none; }
@keyframes lt-em-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
.lt-em-marquee__track .lt-em-expert-card           { width: 220px; flex-shrink: 0; }
.lt-em-marquee__track .lt-em-expert-card__photo    { width: 44px; height: 44px; }
.lt-em-marquee__track .lt-em-expert-card__top      { padding: 10px 10px 8px; gap: 9px; }
.lt-em-marquee__track .lt-em-expert-card__name     { font-size: .8rem; }
.lt-em-marquee__track .lt-em-expert-card__desig,
.lt-em-marquee__track .lt-em-expert-card__location { font-size: .7rem; }
.lt-em-marquee__track .lt-em-expert-card__actions .lt-em-btn { padding: 5px 4px; font-size: .72rem; }
.lt-em-marquee__loading { padding: 24px; color: var(--em-muted); }
.lt-em-marquee__footer {
	display: flex;
	justify-content: center;
	padding: 14px 0 4px;
}
.lt-em-marquee__all-btn {
	font-size: .85rem;
	padding: 8px 22px;
	border-radius: 999px;
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */

.lt-em-pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 24px 0 8px;
}
.lt-em-pag__count {
	font-size: .82rem;
	color: var(--em-muted);
	font-weight: 500;
}
.lt-em-pag__btns {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	justify-content: center;
}
.lt-em-pag__btn {
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #374151;
	font-size: .85rem;
	font-weight: 500;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
	line-height: 1;
}
.lt-em-pag__btn:hover:not(:disabled):not(.is-active) {
	background: #f0f9ff;
	border-color: var(--em-primary);
	color: var(--em-primary);
}
.lt-em-pag__btn.is-active {
	background: var(--em-primary);
	border-color: var(--em-primary);
	color: #fff;
	cursor: default;
	font-weight: 700;
}
.lt-em-pag__btn:disabled {
	opacity: .38;
	cursor: not-allowed;
}
.lt-em-pag__btn--nav {
	font-size: 1rem;
	padding: 0 12px;
}
.lt-em-pag__ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 36px;
	color: var(--em-muted);
	font-size: .9rem;
	user-select: none;
}
@media (max-width: 480px) {
	.lt-em-pag__btn { min-width: 32px; height: 32px; font-size: .78rem; }
}

/* ── Modal ──────────────────────────────────────────────────────────────────── */

.lt-em-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lt-em-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.55);
}
.lt-em-modal__box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: var(--em-radius);
	padding: 28px 32px;
	max-width: 480px;
	width: 92%;
	box-shadow: 0 16px 48px rgba(0,0,0,.18);
}
.lt-em-modal__box--sm { max-width: 380px; }
.lt-em-modal__close {
	position: absolute;
	top: 14px; right: 18px;
	background: none;
	border: none;
	font-size: 1.4rem;
	cursor: pointer;
	color: var(--em-muted);
}
.lt-em-modal__title { font-family: var(--em-font); font-size: 1.1rem; margin: 0 0 16px; }

.lt-em-task-type-list { display: flex; flex-direction: column; gap: 8px; }
.lt-em-task-type-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 12px 16px;
	border: 1.5px solid var(--em-border);
	border-radius: 8px;
	background: none;
	cursor: pointer;
	text-align: left;
	font-family: var(--em-font);
	transition: border-color .18s, background .18s;
}
.lt-em-task-type-item:hover { border-color: var(--em-primary); background: rgba(26,107,60,.04); }
.lt-em-task-type-item__name { font-size: .95rem; font-weight: 700; color: var(--em-text); }
.lt-em-task-type-item__price { font-size: .9rem; color: var(--em-primary); font-weight: 600; }
.lt-em-task-type-item__desc { font-size: .8rem; color: var(--em-muted); margin-top: 2px; }

/* ── Chat ───────────────────────────────────────────────────────────────────── */

.lt-em-chat {
	display: flex;
	gap: 0;
	height: 70vh;
	min-height: 420px;
	border: 1px solid var(--em-border);
	border-radius: var(--em-radius);
	overflow: hidden;
	font-family: var(--em-font);
	box-shadow: var(--em-shadow);
}

.lt-em-chat__sidebar {
	width: 280px;
	flex-shrink: 0;
	background: #f8faf8;
	border-right: 1px solid var(--em-border);
	display: flex;
	flex-direction: column;
}
.lt-em-chat__sidebar-header {
	padding: 14px 16px;
	border-bottom: 1px solid var(--em-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--em-primary);
}
.lt-em-chat__sidebar-header h3 { margin: 0; font-size: 1rem; color: #fff; }

.lt-em-thread-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
}
.lt-em-thread-list__empty { padding: 16px; color: var(--em-muted); font-size: .875rem; }
.lt-em-thread-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	cursor: pointer;
	transition: background .15s;
	border-bottom: 1px solid var(--em-border);
}
.lt-em-thread-item:hover { background: #edf3ef; }
.lt-em-thread-item--active { background: #daeee1; }
.lt-em-thread-item__photo {
	width: 38px; height: 38px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--em-primary);
	flex-shrink: 0;
}
.lt-em-thread-item__body { flex: 1; min-width: 0; }
.lt-em-thread-item__name { display: block; font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-em-thread-item__time { display: block; font-size: .73rem; color: var(--em-muted); }
.lt-em-thread-item__sensitive { color: var(--em-danger); font-size: .85rem; }

.lt-em-chat__pane {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: #fff;
}
.lt-em-chat__pane-empty {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--em-muted);
}
.lt-em-chat__pane-inner { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.lt-em-chat__pane-header {
	padding: 12px 16px;
	background: var(--em-light);
	border-bottom: 1px solid var(--em-border);
	display: flex;
	align-items: center;
	gap: 10px;
}
.lt-em-chat__pane-photo {
	width: 36px; height: 36px;
	border-radius: 50%;
	object-fit: cover;
}
.lt-em-chat__messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lt-em-msg {
	display: flex;
	flex-direction: column;
	max-width: 72%;
}
.lt-em-msg--mine { align-self: flex-end; align-items: flex-end; }
.lt-em-msg--other { align-self: flex-start; align-items: flex-start; }
.lt-em-msg__bubble {
	padding: 9px 14px;
	border-radius: 14px;
	font-size: .9rem;
	line-height: 1.5;
	word-break: break-word;
}
.lt-em-msg--mine  .lt-em-msg__bubble { background: var(--em-primary); color: #fff; border-bottom-right-radius: 2px; }
.lt-em-msg--other .lt-em-msg__bubble { background: var(--em-light); color: var(--em-text); border-bottom-left-radius: 2px; }
.lt-em-msg--sensitive .lt-em-msg__bubble { border: 1.5px solid var(--em-danger); }
.lt-em-msg__meta { font-size: .7rem; color: var(--em-muted); margin-top: 2px; }

.lt-em-sensitive-banner {
	background: #fff3cd;
	color: #856404;
	padding: 4px 10px;
	font-size: .75rem;
	border-radius: 4px;
	margin-top: 3px;
}

.lt-em-chat__compose {
	padding: 10px 14px;
	border-top: 1px solid var(--em-border);
	display: flex;
	gap: 0;
	background: #fff;
}
.lt-em-chat__input {
	flex: 1;
	resize: none;
	padding: 10px 14px;
	font-family: var(--em-font);
	font-size: .9rem;
	border: 1.5px solid var(--em-border);
	border-right: none;
	border-radius: 6px 0 0 6px;
	transition: border-color .2s;
}
.lt-em-chat__input:focus { outline: none; border-color: var(--em-primary); }

/* ── Task form ──────────────────────────────────────────────────────────────── */

.lt-em-task-form-wrap {
	max-width: 580px;
	margin: 0 auto;
	padding: 24px;
	background: #fff;
	border-radius: var(--em-radius);
	box-shadow: var(--em-shadow);
	border: 1px solid var(--em-border);
}
.lt-em-task-form__title { font-family: var(--em-font); color: var(--em-primary); margin: 0 0 20px; }
.lt-em-task-form__expert-info {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--em-light);
	padding: 10px 14px;
	border-radius: 8px;
	margin-bottom: 20px;
}
.lt-em-task-form__expert-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.lt-em-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.lt-em-form-group label { font-weight: 600; font-size: .875rem; }
.lt-em-form-group select,
.lt-em-form-group textarea,
.lt-em-form-group input[type="text"],
.lt-em-form-group input[type="date"],
.lt-em-form-group input[type="email"],
.lt-em-form-group input[type="number"] {
	padding: 9px 12px;
	border: 1.5px solid var(--em-border);
	border-radius: 6px;
	font-family: var(--em-font);
	font-size: .9rem;
	background: #fff;
	transition: border-color .2s;
}
.lt-em-form-group select:focus,
.lt-em-form-group textarea:focus,
.lt-em-form-group input:focus {
	outline: none;
	border-color: var(--em-primary);
	box-shadow: 0 0 0 3px rgba(26,107,60,.12);
}

.lt-em-task-form__price-preview {
	background: #f0f7f2;
	border: 1px solid #c3e0cc;
	border-radius: 8px;
	padding: 14px 18px;
	margin-bottom: 16px;
}
.lt-em-price-row {
	display: flex;
	justify-content: space-between;
	font-size: .9rem;
	padding: 3px 0;
}
.lt-em-price-row--fee { color: var(--em-muted); }
.lt-em-price-row--expert strong { color: var(--em-primary); font-size: 1rem; }

.lt-em-task-form__notice { font-size: .82rem; color: var(--em-muted); margin-bottom: 12px; }
.lt-em-task-form__actions { display: flex; gap: 10px; }

/* ── Task view ──────────────────────────────────────────────────────────────── */

.lt-em-task-view {
	max-width: 640px;
	margin: 0 auto;
	background: #fff;
	border-radius: var(--em-radius);
	box-shadow: var(--em-shadow);
	border: 1px solid var(--em-border);
	overflow: hidden;
}
.lt-em-task-view__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	background: var(--em-primary);
	color: #fff;
}
.lt-em-task-view__header h2 { margin: 0; font-family: var(--em-font); font-size: 1.1rem; }
.lt-em-task-view__meta,
.lt-em-task-view__desc,
.lt-em-task-view__expert-note,
.lt-em-task-view__payment,
.lt-em-task-view__actions { padding: 16px 24px; border-bottom: 1px solid var(--em-border); }
.lt-em-task-view__meta { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; background: var(--em-light); }
.lt-em-task-view__payment h3 { margin: 0 0 10px; font-size: 1rem; }
.lt-em-task-view__release-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.lt-em-task-view__completed,
.lt-em-task-view__disputed { padding: 20px 24px; text-align: center; font-family: var(--em-font); }
.lt-em-task-view__completed { color: #155724; background: #d4edda; }
.lt-em-task-view__disputed  { color: #721c24; background: #f8d7da; }

/* ── Admin styles ───────────────────────────────────────────────────────────── */

.lt-em-admin { font-family: var(--em-font); }
.lt-em-admin-messages { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 16px; }
.lt-em-admin-messages { grid-template-columns: 1fr 1fr; }
.lt-em-row--sensitive { background: #fff8e1 !important; }
.lt-em-admin-msg {
	background: var(--em-light);
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 10px;
	border-left: 3px solid var(--em-border);
}
.lt-em-admin-msg--sensitive { border-left-color: var(--em-danger); background: #fff8e1; }
.lt-em-admin-msg__header { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.lt-em-admin-msg__time { font-size: .75rem; color: var(--em-muted); }
.lt-em-admin-msg__body { font-size: .875rem; line-height: 1.6; word-break: break-word; }
.lt-em-admin-empty { text-align: center; padding: 20px; color: var(--em-muted); }
.lt-em-admin-thread-view { border: 1px solid var(--em-border); border-radius: var(--em-radius); padding: 16px; max-height: 60vh; overflow-y: auto; }
.lt-em-inline-msg { padding: 8px 14px; border-radius: 6px; font-size: .875rem; margin-top: 10px; }
.lt-em-inline-msg.success { background: #d4edda; color: #155724; }
.lt-em-inline-msg.error   { background: #f8d7da; color: #721c24; }

.lt-em-type-form-wrap {
	background: #f8faf8;
	border: 1px solid var(--em-border);
	border-radius: var(--em-radius);
	padding: 20px 24px;
	margin: 16px 0;
}
.lt-em-btn--sync { background: #2271b1 !important; color: #fff !important; border: none; margin-left: 8px; }
.lt-em-btn--sync:hover { opacity: .9; }

/* ── Full-page Messages (/message) ──────────────────────────────────────────── */

.lt-em-msg-page {
	display: flex;
	height: calc(100vh - 200px);
	min-height: 500px;
	border: 1px solid var(--em-border);
	border-radius: var(--em-radius);
	overflow: hidden;
	font-family: var(--em-font);
	box-shadow: var(--em-shadow);
	background: #fff;
}

/* Sidebar */
.lt-em-msg-page__sidebar {
	width: 300px;
	flex-shrink: 0;
	background: #f8faf8;
	border-right: 1px solid var(--em-border);
	display: flex;
	flex-direction: column;
}
.lt-em-msg-page__sidebar-head {
	padding: 14px 16px;
	background: var(--em-primary);
	border-bottom: 1px solid rgba(0,0,0,.1);
}
.lt-em-msg-page__sidebar-title {
	margin: 0 0 10px;
	font-size: 1.05rem;
	color: #fff;
}
.lt-em-msg-page__search {
	width: 100%;
	padding: 7px 12px;
	border: none;
	border-radius: 20px;
	font-size: .85rem;
	font-family: var(--em-font);
	background: rgba(255,255,255,.2);
	color: #fff;
	transition: background .2s;
	box-sizing: border-box;
}
.lt-em-msg-page__search::placeholder { color: rgba(255,255,255,.7); }
.lt-em-msg-page__search:focus { outline: none; background: rgba(255,255,255,.35); }

/* Thread list – reuse existing .lt-em-thread-item with unread dot */
.lt-em-thread-item__photo-wrap {
	position: relative;
	flex-shrink: 0;
}
.lt-em-thread-item__photo--initials {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--em-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .95rem;
	border: 2px solid rgba(255,255,255,.5);
}
.lt-em-thread-item__unread {
	position: absolute;
	top: -3px;
	right: -3px;
	background: var(--em-danger);
	color: #fff;
	font-size: .6rem;
	font-weight: 700;
	min-width: 16px;
	height: 16px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 3px;
	border: 1.5px solid #fff;
}
.lt-em-thread-item__preview {
	display: block;
	font-size: .73rem;
	color: var(--em-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 160px;
}
.lt-em-thread-item__preview--unread { color: var(--em-text); font-weight: 600; }
.lt-em-thread-item__right {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}
.lt-em-thread-item__time { font-size: .7rem; color: var(--em-muted); }

/* Pane */
.lt-em-msg-page__pane {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: #fff;
	min-width: 0;
}
.lt-em-msg-page__empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--em-muted);
	gap: 10px;
}
.lt-em-msg-page__empty-icon { font-size: 3rem; }
.lt-em-msg-page__inner { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Pane header */
.lt-em-msg-page__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	background: var(--em-light);
	border-bottom: 1px solid var(--em-border);
	min-height: 56px;
}
.lt-em-msg-page__back {
	background: none;
	border: none;
	font-size: 1.3rem;
	cursor: pointer;
	color: var(--em-primary);
	padding: 4px 8px;
	display: none;
}
.lt-em-msg-page__header-avatar {
	position: relative;
	flex-shrink: 0;
}
.lt-em-msg-page__header-photo {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--em-primary);
}
.lt-em-msg-page__header-initials {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--em-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.1rem;
}
.lt-em-msg-page__header-info { flex: 1; min-width: 0; }
.lt-em-msg-page__header-info strong { font-size: .95rem; font-family: var(--em-font); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Messages area */
.lt-em-msg-page__messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
}

/* Compose area */
.lt-em-msg-page__compose {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	padding: 10px 12px;
	border-top: 1px solid var(--em-border);
	background: #fff;
}
.lt-em-compose-tool-btn {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border: 1.5px solid var(--em-border);
	border-radius: 50%;
	background: var(--em-light);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	transition: background .15s, border-color .15s;
	padding: 0;
}
.lt-em-compose-tool-btn:hover { background: var(--em-primary); border-color: var(--em-primary); }
.lt-em-compose-tool-btn:hover span { filter: brightness(100); }
.lt-em-file-input { display: none; }
.lt-em-compose-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lt-em-file-preview {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--em-light);
	border-radius: 6px;
	padding: 4px 10px;
	font-size: .8rem;
}
.lt-em-file-preview__name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.lt-em-file-preview__remove {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--em-danger);
	font-size: 1rem;
	line-height: 1;
	padding: 0 2px;
}
.lt-em-msg-page__input {
	width: 100%;
	resize: none;
	padding: 9px 12px;
	font-family: var(--em-font);
	font-size: .9rem;
	border: 1.5px solid var(--em-border);
	border-radius: 18px;
	background: var(--em-light);
	transition: border-color .2s;
	min-height: 38px;
	max-height: 120px;
	overflow-y: auto;
	box-sizing: border-box;
}
.lt-em-msg-page__input:focus { outline: none; border-color: var(--em-primary); background: #fff; }
.lt-em-msg-page__send-btn {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Sender name above bubble (non-mine) */
.lt-em-msg__name { font-size: .72rem; color: var(--em-muted); margin-bottom: 2px; }

/* ── Task Card (inside chat) ─────────────────────────────────────────────────── */

.lt-em-task-card {
	border: 1.5px solid var(--em-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
	max-width: 420px;
	margin: 4px auto;
	width: 100%;
	font-family: var(--em-font);
}
.lt-em-task-card__header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: linear-gradient(135deg, var(--em-primary) 0%, #2e9e60 100%);
	color: #fff;
}
.lt-em-task-card__icon { font-size: 1.1rem; }
.lt-em-task-card__label { flex: 1; font-weight: 700; font-size: .9rem; }
.lt-em-task-card__body { padding: 12px 14px; }
.lt-em-task-card__type {
	font-weight: 700;
	font-size: .95rem;
	color: var(--em-primary);
	margin-bottom: 4px;
}
.lt-em-task-card__desc {
	font-size: .875rem;
	color: var(--em-text);
	line-height: 1.5;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.lt-em-task-card__meta {
	display: flex;
	justify-content: space-between;
	font-size: .8rem;
	color: var(--em-muted);
}
.lt-em-task-card__price { font-weight: 700; color: var(--em-primary); font-size: .9rem; }
.lt-em-task-card__actions {
	display: flex;
	gap: 8px;
	padding: 10px 14px;
	border-top: 1px solid var(--em-border);
	background: #f9fbf9;
	flex-wrap: wrap;
}
.lt-em-task-card__final { font-size: .85rem; color: var(--em-muted); padding: 2px 0; }

/* ── Attachment bubbles ──────────────────────────────────────────────────────── */

.lt-em-attachment { display: block; }
.lt-em-attachment--image .lt-em-attachment__img {
	max-width: 260px;
	max-height: 200px;
	border-radius: 8px;
	display: block;
	object-fit: cover;
	cursor: zoom-in;
}
.lt-em-attachment--file {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255,255,255,.15);
	border-radius: 8px;
	padding: 8px 12px;
	border: 1px solid rgba(255,255,255,.3);
}
.lt-em-msg--other .lt-em-attachment--file {
	background: rgba(0,0,0,.04);
	border-color: var(--em-border);
}
.lt-em-attachment__file-icon { font-size: 1.4rem; flex-shrink: 0; }
.lt-em-attachment__link { color: inherit; text-decoration: underline; font-size: .875rem; word-break: break-all; }
.lt-em-attachment__file-type { font-size: .7rem; color: rgba(255,255,255,.7); font-weight: 700; flex-shrink: 0; }
.lt-em-msg--other .lt-em-attachment__file-type { color: var(--em-muted); }
.lt-em-msg__caption { margin: 6px 0 0; font-size: .875rem; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	/* Chat widget (embedded) */
	.lt-em-chat { flex-direction: column; height: auto; min-height: auto; }
	.lt-em-chat__sidebar { width: 100%; max-height: 200px; border-right: none; border-bottom: 1px solid var(--em-border); }
	.lt-em-chat__pane { min-height: 380px; }

	/* Full-page messages */
	.lt-em-msg-page {
		position: relative;
		height: calc(100vh - 140px);
	}
	.lt-em-msg-page__sidebar {
		position: absolute;
		inset: 0;
		width: 100%;
		z-index: 2;
		transition: transform .25s ease;
	}
	.lt-em-msg-page__pane {
		position: absolute;
		inset: 0;
		z-index: 1;
		transform: translateX(100%);
		transition: transform .25s ease;
	}
	.lt-em-sidebar--hidden { transform: translateX(-100%); z-index: 1; }
	.lt-em-pane--visible   { transform: translateX(0);    z-index: 2; }
	.lt-em-msg-page__back  { display: flex; }
}

@media (max-width: 640px) {
	.lt-em-grid { grid-template-columns: 1fr; }
	.lt-em-search__row { flex-direction: column; }
	.lt-em-task-view__release-btns { flex-direction: column; }
	.lt-em-task-card { max-width: 100%; }
}
