.lc-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.lc-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
}
.lc-search-wrap {
    position: relative;
    width: min(34rem, 100%);
}
.lc-search-icon {
    position: absolute;
    left: 0.72rem;
    top: 50%;
    width: 0.95rem;
    height: 0.95rem;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.lc-search-input {
    width: 100%;
    min-height: 2.25rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.7rem;
    background: #fff;
    color: #0f172a;
    padding: 0.42rem 0.85rem 0.42rem 2.15rem;
    font-size: 0.82rem;
    font-weight: 600;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.lc-search-input:focus {
    border-color: #0088ff;
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.12);
}
.lc-status-filter-group {
    width: fit-content;
}
.lc-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.18rem;
    border: 1px solid #dbe3ee;
    border-radius: 9999px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
[x-cloak] {
    display: none !important;
}
.lc-filter-btn {
    position: relative;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.34rem 0.62rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease, transform 120ms ease, box-shadow 150ms ease;
    user-select: none;
}
.lc-filter-btn:hover {
    background: #fff;
    border-color: #dbe3ee;
    color: #0f172a;
}
.lc-filter-btn:focus-visible {
    outline: 2px solid #00ccff;
    outline-offset: 2px;
}
.lc-filter-btn:active {
    transform: translateY(1px) scale(0.98);
}
.lc-filter-btn:disabled {
    cursor: progress;
}
.lc-filter-btn-active {
    background: #0088ff;
    border-color: #0088ff;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 136, 255, 0.22);
}
.lc-filter-btn-loading {
    padding-left: 0.55rem;
}
.lc-filter-btn-dimmed {
    opacity: 0.56;
}
.lc-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
}
.lc-filter-btn-active .lc-filter-count {
    background: rgba(255, 255, 255, 0.22);
}
.lc-filter-spinner {
    width: 0.78rem;
    height: 0.78rem;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    animation: lc-spin 0.75s linear infinite;
}
.lc-filter-status {
    min-height: 1rem;
    padding-left: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}
.lc-filter-selects {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 14rem));
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
}
.lc-filter-field {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}
.lc-filter-field span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}
.lc-filter-field select {
    width: 100%;
    min-height: 2.35rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.7rem;
    background: #fff;
    color: #0f172a;
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 700;
    outline: none;
}
.lc-filter-field select:focus {
    border-color: #0088ff;
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.12);
}
.lc-desktop-filter-group {
    display: none;
}
html.dark .lc-filter-btn {
    color: #b0b5c0;
}
html.dark .lc-filter-group {
    border-color: #1a2b5c;
    background: #0a1433;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
html.dark .lc-filter-btn:hover {
    background: #050a1f;
    border-color: #1a2b5c;
    color: #fff;
}
html.dark .lc-filter-btn-active {
    background: #0088ff;
    border-color: #00ccff;
    color: #fff;
}
html.dark .lc-filter-count {
    background: rgba(255, 255, 255, 0.08);
}
html.dark .lc-filter-btn-active .lc-filter-count {
    background: rgba(255, 255, 255, 0.22);
}
html.dark .lc-filter-status {
    color: #b0b5c0;
}
html.dark .lc-filter-field span {
    color: #b0b5c0;
}
html.dark .lc-filter-field select {
    border-color: #1a2b5c;
    background: #0a1433;
    color: #fff;
}
html.dark .lc-search-input {
    border-color: #1a2b5c;
    background: #0a1433;
    color: #fff;
}
html.dark .lc-search-input:focus {
    border-color: #00ccff;
    box-shadow: 0 0 0 3px rgba(0, 204, 255, 0.12);
}

.lc-wrap {
    display: flex;
    height: calc(100vh - 240px);
    min-height: 480px;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
html.dark .lc-wrap {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Conversation list */
.lc-list {
    width: 22rem;
    flex-shrink: 0;
    position: relative;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid #e5e7eb;
}
html.dark .lc-list {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
}
.lc-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}
html.dark .lc-item {
    border-color: rgba(255, 255, 255, 0.06);
}
.lc-item:hover {
    background: #f5f6f6;
}
html.dark .lc-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.lc-item-active {
    background: #e7f5ef;
}
html.dark .lc-item-active {
    background: rgba(0, 168, 132, 0.16);
}
.lc-item-loading {
    cursor: wait;
    opacity: 0.78;
}
.lc-item-loading::after {
    content: "";
    flex-shrink: 0;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 9999px;
    border: 2px solid rgba(0, 136, 255, 0.2);
    border-top-color: #0088ff;
    animation: lc-spin 0.75s linear infinite;
}
.lc-list-loading {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid rgba(0, 136, 255, 0.16);
    background: rgba(239, 247, 255, 0.96);
    color: #075985;
    font-size: 0.76rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}
.lc-list-loading-spinner {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 9999px;
    border: 2px solid rgba(0, 136, 255, 0.24);
    border-top-color: #0088ff;
    animation: lc-spin 0.75s linear infinite;
}
html.dark .lc-list-loading {
    border-color: rgba(0, 204, 255, 0.18);
    background: rgba(10, 20, 51, 0.96);
    color: #bfdbfe;
}
.lc-avatar {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    border: 1px solid #dbe3ee;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.lc-avatar-messenger,
.lc-avatar-telegram,
.lc-avatar-website {
    background: #fff;
}
html.dark .lc-avatar {
    color: #050a1f;
    background: #fff;
    border-color: rgba(255, 255, 255, 0.72);
}
.lc-item-body {
    flex: 1;
    min-width: 0;
}
.lc-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.lc-name-row {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.35rem;
}
.lc-channel-logo {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.lc-channel-logo svg {
    width: 0.72rem;
    height: 0.72rem;
    fill: currentColor;
}
.lc-channel-logo-messenger { background: #1877f2; }
.lc-channel-logo-telegram { background: #29b6f6; }
.lc-channel-logo-website { background: #22c55e; }
.lc-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.dark .lc-item-name {
    color: #f1f5f9;
}
.lc-thread-header-name {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.4rem;
}
.lc-thread-header-name > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lc-item-time {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}
.lc-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.15rem;
}
.lc-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.18rem;
}
.lc-item-preview {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.dark .lc-item-preview {
    color: #94a3b8;
}
.lc-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: #00a884;
    border-radius: 9999px;
}
.lc-chan {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    border-radius: 0.25rem;
    padding: 0.05rem 0.35rem;
    vertical-align: middle;
}
.lc-chan-messenger { background: rgba(24, 119, 242, 0.12); color: #1877f2; }
.lc-chan-telegram { background: rgba(0, 136, 255, 0.12); color: #0088ff; }
.lc-chan-website { background: rgba(0, 168, 132, 0.12); color: #00a884; }
.lc-status-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 1.15rem;
    border-radius: 9999px;
    padding: 0.08rem 0.45rem;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}
.lc-status-chip-open {
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
}
.lc-status-chip-follow_up {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}
.lc-status-chip-spam {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
}
html.dark .lc-status-chip-open {
    background: rgba(255, 255, 255, 0.08);
    color: #b0b5c0;
}
html.dark .lc-status-chip-follow_up {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}
html.dark .lc-status-chip-spam {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

/* Thread */
.lc-thread {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    position: relative;
}
.lc-thread-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.lc-thread-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 100%;
    background: #eef1f4;
    color: #64748b;
}
html.dark .lc-thread-loading {
    background: #0b141a;
    color: #94a3b8;
}
.lc-thread-loading-spinner {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 3px solid rgba(148, 163, 184, 0.28);
    border-top-color: #00ccff;
    animation: lc-spin 0.75s linear infinite;
}
.lc-thread-loading-text {
    font-size: 0.82rem;
    font-weight: 600;
}
@keyframes lc-spin {
    to {
        transform: rotate(360deg);
    }
}
.lc-thread-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
html.dark .lc-thread-header {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}
.lc-thread-header-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.lc-thread-title {
    min-width: 0;
}
.lc-thread-header-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.dark .lc-thread-header-name {
    color: #f1f5f9;
}
.lc-mobile-back {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #dbe3ee;
    border-radius: 9999px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
}
.lc-mobile-back svg {
    width: 1rem;
    height: 1rem;
}
html.dark .lc-mobile-back {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.lc-ai-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}
html.dark .lc-ai-toggle {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #dbeafe;
}
.lc-ai-toggle-on {
    border-color: rgba(0, 168, 132, 0.4);
    background: rgba(0, 168, 132, 0.12);
    color: #047857;
}
html.dark .lc-ai-toggle-on {
    color: #67e8f9;
}
.lc-ai-toggle-off {
    border-color: rgba(239, 68, 68, 0.36);
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}
html.dark .lc-ai-toggle-off {
    color: #fca5a5;
}
.lc-ai-toggle-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: currentColor;
}
.lc-ai-toggle-global {
    min-height: 2.1rem;
}
.lc-thread-actions {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.lc-status-action {
    min-height: 2rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background: #fff;
    color: #334155;
    padding: 0.35rem 0.68rem;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.lc-status-action:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.lc-status-action-active {
    border-color: rgba(245, 158, 11, 0.48);
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}
.lc-status-action-spam.lc-status-action-active {
    border-color: rgba(239, 68, 68, 0.44);
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
html.dark .lc-status-action {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #dbeafe;
}
html.dark .lc-status-action-active {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}
html.dark .lc-status-action-spam.lc-status-action-active {
    border-color: rgba(239, 68, 68, 0.44);
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
}
.lc-messenger-window {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.78rem;
    line-height: 1.45;
}
.lc-messenger-window-icon {
    flex: 0 0 auto;
    min-width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 900;
}
.lc-messenger-window-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.lc-messenger-window-body strong {
    font-size: 0.8rem;
}
.lc-messenger-window-open {
    border-color: rgba(24, 119, 242, 0.16);
    background: rgba(24, 119, 242, 0.08);
    color: #1e3a8a;
}
.lc-messenger-window-open .lc-messenger-window-icon {
    background: #1877f2;
    color: #fff;
}
.lc-messenger-window-expired {
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.09);
    color: #991b1b;
}
.lc-messenger-window-expired .lc-messenger-window-icon {
    background: #ef4444;
    color: #fff;
}
html.dark .lc-messenger-window {
    border-color: rgba(255, 255, 255, 0.08);
}
html.dark .lc-messenger-window-open {
    background: rgba(24, 119, 242, 0.14);
    color: #bfdbfe;
}
html.dark .lc-messenger-window-expired {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}
.lc-delete-conversation {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 68, 68, 0.32);
    border-radius: 9999px;
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    cursor: pointer;
}
.lc-delete-conversation:hover {
    background: rgba(239, 68, 68, 0.16);
}
.lc-delete-conversation svg {
    width: 1rem;
    height: 1rem;
}
html.dark .lc-delete-conversation {
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}
.lc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: #eef1f4;
}
html.dark .lc-messages {
    background: #0b141a;
}
.lc-bubble-row {
    display: flex;
    width: 100%;
}
.lc-bubble-row-agent {
    justify-content: flex-end;
}
.lc-bubble-row-customer {
    justify-content: flex-start;
}
.lc-bubble {
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: min(70%, 480px);
    min-width: 0;
    text-align: left;
    border-radius: 0.85rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.875rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.lc-bubble-media {
    max-width: min(70%, 320px);
    padding: 0.3rem;
}
.lc-bubble-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.lc-bubble-body-with-media {
    margin-top: 0.35rem;
    padding: 0 0.25rem;
}
.lc-reply-quote {
    width: 100%;
    min-width: 10rem;
    margin-bottom: 0.35rem;
    padding: 0.35rem 0.45rem;
    border-left: 3px solid rgba(0, 136, 255, 0.75);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.46);
}
html.dark .lc-reply-quote {
    background: rgba(255, 255, 255, 0.08);
}
.lc-reply-quote-agent {
    border-left-color: rgba(0, 204, 255, 0.85);
}
.lc-reply-quote-customer {
    border-left-color: rgba(0, 168, 132, 0.85);
}
.lc-reply-quote-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: #0088ff;
    margin-bottom: 0.12rem;
}
.lc-reply-quote-body {
    font-size: 0.76rem;
    line-height: 1.25;
    opacity: 0.82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lc-bubble-customer {
    background: #fff;
    color: #111b21;
    border-bottom-left-radius: 0.2rem;
}
html.dark .lc-bubble-customer {
    background: #202c33;
    color: #e9edef;
}
.lc-bubble-agent {
    background: #d9fdd3;
    color: #111b21;
    border-bottom-right-radius: 0.2rem;
}
html.dark .lc-bubble-agent {
    background: #005c4b;
    color: #e9edef;
}
.lc-bubble-time {
    align-self: flex-end;
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 0.2rem;
    margin-left: 1.5rem;
    text-align: right;
    line-height: 1;
}
.lc-bubble-meta {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.65rem;
    opacity: 0.62;
    margin-top: 0.2rem;
    margin-left: 1.5rem;
    text-align: right;
    line-height: 1;
}
.lc-reply-action {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0;
}
.lc-bubble:hover .lc-reply-action,
.lc-reply-action:focus {
    opacity: 1;
}
@media (hover: none) {
    .lc-reply-action {
        opacity: 1;
    }
}
.lc-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #9ca3af;
    font-size: 0.875rem;
}
.lc-bubble img, .lc-bubble video {
    width: auto;
    max-width: min(300px, 100%);
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
    cursor: pointer;
}
.lc-media-button {
    display: block;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}
.lc-media-button img {
    cursor: zoom-in;
}
.lc-bubble audio {
    max-width: 260px;
}
.lc-bubble a.lc-file {
    display: block;
    text-decoration: underline;
}
.lc-lightbox [x-cloak], .lc-lightbox[x-cloak] {
    display: none !important;
}
.lc-lightbox-lock {
    overflow: hidden;
}
.lc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(3, 7, 18, 0.86);
    backdrop-filter: blur(8px);
}
.lc-lightbox-image {
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    border-radius: 0.75rem;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}
.lc-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.lc-lightbox-close:hover {
    background: rgba(15, 23, 42, 0.95);
}

/* Composer */
.lc-composer-note {
    padding: 0.35rem 0.85rem 0;
    font-size: 0.7rem;
    color: #94a3b8;
}
.lc-attach-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0.35rem 0.85rem 0;
}
.lc-attach-preview button {
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    font-weight: 600;
}
.lc-reply-preview {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
    margin: 0.5rem 0.85rem 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(0, 136, 255, 0.24);
    border-radius: 0.55rem;
    background: rgba(0, 136, 255, 0.08);
}
html.dark .lc-reply-preview {
    border-color: rgba(0, 204, 255, 0.22);
    background: rgba(0, 204, 255, 0.08);
}
.lc-reply-preview-bar {
    width: 3px;
    border-radius: 9999px;
    background: #0088ff;
}
.lc-reply-preview-main {
    min-width: 0;
    flex: 1;
}
.lc-reply-preview-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0088ff;
}
.lc-reply-preview-body {
    margin-top: 0.12rem;
    font-size: 0.76rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.dark .lc-reply-preview-body {
    color: #b0b5c0;
}
.lc-reply-preview button {
    align-self: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.1);
    color: #475569;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
html.dark .lc-reply-preview button {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}
.lc-composer {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}
html.dark .lc-composer {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}
.lc-attach-btn {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 0.4rem;
}
.lc-attach-btn:hover,
.lc-template-btn:hover {
    color: #0088ff;
}
.lc-template-wrap {
    position: relative;
    flex-shrink: 0;
}
.lc-template-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 0.4rem;
}
.lc-template-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.65rem);
    z-index: 40;
    width: min(23rem, calc(100vw - 2rem));
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}
html.dark .lc-template-panel {
    border-color: #1a2b5c;
    background: #0a1433;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}
.lc-template-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid #edf2f7;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 800;
}
html.dark .lc-template-head {
    border-color: #1a2b5c;
    color: #fff;
}
.lc-template-head span:last-child {
    min-width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(0, 136, 255, 0.1);
    color: #0088ff;
    font-size: 0.68rem;
}
.lc-template-list {
    max-height: 13rem;
    overflow-y: auto;
    padding: 0.35rem;
}
.lc-template-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.35rem;
}
.lc-template-use {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.52rem 0.55rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}
.lc-template-use:hover {
    background: #f1f7ff;
}
html.dark .lc-template-use {
    color: #fff;
}
html.dark .lc-template-use:hover {
    background: rgba(0, 136, 255, 0.14);
}
.lc-template-use span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 800;
}
.lc-template-use small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.7rem;
}
html.dark .lc-template-use small {
    color: #b0b5c0;
}
.lc-template-delete {
    width: 2rem;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.lc-template-delete:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}
.lc-template-delete svg {
    width: 0.95rem;
    height: 0.95rem;
}
.lc-template-empty {
    padding: 0.85rem;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 600;
}
.lc-template-create {
    display: grid;
    gap: 0.45rem;
    padding: 0.7rem;
    border-top: 1px solid #edf2f7;
    background: #f8fafc;
}
html.dark .lc-template-create {
    border-color: #1a2b5c;
    background: #050a1f;
}
.lc-template-create input,
.lc-template-create textarea {
    width: 100%;
    border: 1px solid #dbe3ee;
    border-radius: 0.5rem;
    background: #fff;
    color: #0f172a;
    padding: 0.48rem 0.55rem;
    font-size: 0.76rem;
    outline: none;
}
.lc-template-create textarea {
    resize: vertical;
    min-height: 4.5rem;
}
.lc-template-create input:focus,
.lc-template-create textarea:focus {
    border-color: #0088ff;
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.12);
}
html.dark .lc-template-create input,
html.dark .lc-template-create textarea {
    border-color: #1a2b5c;
    background: #0a1433;
    color: #fff;
}
.lc-template-create button {
    justify-self: end;
    border: 0;
    border-radius: 0.5rem;
    background: #0088ff;
    color: #fff;
    cursor: pointer;
    padding: 0.48rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 800;
}
.lc-template-create button:disabled {
    cursor: wait;
    opacity: 0.7;
}
.lc-template-error {
    color: #dc2626;
    font-size: 0.68rem;
    font-weight: 700;
}
.lc-composer-input {
    flex: 1;
    min-width: 0;
    min-height: 2.5rem;
    max-height: 9rem;
    border-radius: 1.25rem;
    border: 1px solid #d1d5db;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    line-height: 1.35;
    resize: none;
    overflow-y: auto;
    outline: none;
    font: inherit;
}
.lc-composer-input:focus {
    border-color: #0088ff;
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.12);
}
html.dark .lc-composer-input {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}
button:disabled.lc-attach-btn,
button:disabled.lc-template-btn,
button:disabled.lc-send-btn,
.lc-composer-input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.lc-send-btn {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: none;
    background: #00a884;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 767px) {
    .lc-filters {
        align-items: stretch;
        flex-direction: column;
        gap: 0.65rem;
    }

    .lc-filter-stack,
    .lc-search-wrap {
        width: 100%;
    }

    .lc-filter-selects {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .lc-filter-status {
        padding-left: 0;
    }

    .lc-wrap {
        height: calc(100dvh - 218px);
        min-height: 0;
        border-radius: 0.75rem;
        position: relative;
    }

    .lc-list,
    .lc-thread {
        width: 100%;
        min-width: 100%;
    }

    .lc-list {
        border-right: 0;
    }

    .lc-filter-loading .lc-list {
        pointer-events: none;
    }

    .lc-thread {
        display: none;
    }

    .lc-wrap.lc-mobile-thread-open .lc-list,
    body.lc-mobile-thread-open-body .lc-wrap .lc-list {
        display: none;
    }

    .lc-wrap.lc-mobile-thread-open .lc-thread,
    body.lc-mobile-thread-open-body .lc-wrap .lc-thread {
        display: flex;
    }

    .lc-item {
        padding: 0.8rem;
    }

    .lc-thread-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding: 0.65rem 0.7rem;
    }

    .lc-thread-header-main {
        width: 100%;
        min-width: 0;
        gap: 0.5rem;
    }

    .lc-mobile-back {
        display: inline-flex;
    }

    .lc-thread-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .lc-thread-actions {
        width: 100%;
        gap: 0.35rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.05rem;
        scrollbar-width: none;
    }

    .lc-thread-actions::-webkit-scrollbar {
        display: none;
    }

    .lc-status-action,
    .lc-ai-toggle {
        flex: 0 0 auto;
        min-height: 1.85rem;
        padding: 0.28rem 0.5rem;
        font-size: 0.66rem;
    }

    .lc-delete-conversation {
        width: 1.85rem;
        height: 1.85rem;
    }

    .lc-messenger-window {
        padding: 0.55rem 0.7rem;
        font-size: 0.72rem;
    }

    .lc-messages {
        padding: 0.75rem;
        gap: 0.35rem;
    }

    .lc-bubble {
        max-width: 86%;
        font-size: 0.84rem;
    }

    .lc-bubble-media {
        max-width: 78%;
    }

    .lc-bubble img,
    .lc-bubble video {
        max-height: 240px;
    }

    .lc-reply-preview,
    .lc-attach-preview {
        margin-inline: 0.65rem;
    }

    .lc-composer {
        gap: 0.35rem;
        padding: 0.55rem 0.6rem;
    }

    .lc-attach-btn,
    .lc-template-btn {
        width: 2.35rem;
        height: 2.35rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .lc-composer-input {
        min-height: 2.45rem;
        max-height: 8rem;
        border-radius: 1rem;
        padding: 0.55rem 0.75rem;
        font-size: 0.84rem;
    }

    .lc-send-btn {
        width: 2.45rem;
        height: 2.45rem;
    }

    .lc-template-panel {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 4.2rem;
        width: auto;
        max-height: 62dvh;
    }

    .lc-template-list {
        max-height: 14rem;
    }
}

@media (max-width: 640px) {
    .lc-template-panel {
        left: 0.75rem;
        width: auto;
    }

    .lc-template-list {
        max-height: 11rem;
    }
}
