                .tchat-wrapper {
                    display: flex;
                    height: calc(100vh - 120px);
                    background: #ffffff;
                    border-radius: 16px;
                    border: 1px solid #cbd5e1;
                    overflow: hidden;
                    font-family: 'Outfit', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
                    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
                }

                .tchat-sidebar {
                    width: 280px;
                    background: #f8fafc;
                    border-right: 1px solid #cbd5e1;
                    display: flex;
                    flex-direction: column;
                    flex-shrink: 0;
                }

                .tchat-sidebar-header {
                    padding: 20px;
                    border-bottom: 1px solid #e2e8f0;
                    background: #f8fafc;
                }

                .tchat-sidebar-header h2 {
                    font-size: 1.3rem;
                    font-weight: 800;
                    margin: 0;
                    color: #0f172a;
                    display: flex;
                    align-items: center;
                    gap: 10px;
                }

                .tchat-sidebar-sections {
                    flex-grow: 1;
                    overflow-y: auto;
                    padding: 15px 0;
                }

                .tchat-section-title {
                    font-size: 0.75rem;
                    color: #64748b;
                    text-transform: uppercase;
                    font-weight: 800;
                    letter-spacing: 1px;
                    padding: 10px 20px 5px 20px;
                    margin-top: 15px;
                }
                .tchat-section-title:first-of-type {
                    margin-top: 0;
                }

                .tchat-item {
                    display: flex;
                    align-items: center;
                    gap: 12px;
                    padding: 10px 20px;
                    cursor: pointer;
                    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
                    border-left: 4px solid transparent;
                    user-select: none;
                }

                .tchat-item:hover {
                    background: var(--tchat-bg-soft);
                }

                .tchat-item.active {
                    background: var(--tchat-bg-light);
                    border-left-color: var(--tchat-color);
                }

                .tchat-avatar {
                    width: 36px;
                    height: 36px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-weight: bold;
                    font-size: 0.9em;
                    color: white;
                    background: #3498db;
                    object-fit: cover;
                    flex-shrink: 0;
                    border: 2px solid white;
                    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
                }

                .tchat-item-info {
                    flex-grow: 1;
                    overflow: hidden;
                }

                .tchat-item-name {
                    font-weight: 600;
                    font-size: 0.92rem;
                    color: #1e293b;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    display: flex;
                    align-items: center;
                    gap: 6px;
                }

                .tchat-item-role {
                    font-size: 0.75rem;
                    color: #64748b;
                    display: block;
                }

                .tchat-badge {
                    background: var(--tchat-color);
                    color: white;
                    font-size: 0.75rem;
                    font-weight: bold;
                    padding: 2px 8px;
                    border-radius: 10px;
                    min-width: 20px;
                    text-align: center;
                    box-shadow: 0 2px 4px var(--tchat-rgba-shadow-light);
                    display: none;
                }

                .tchat-main {
                    flex-grow: 1;
                    display: flex;
                    flex-direction: column;
                    background: #ffffff;
                    position: relative;
                }

                .tchat-main-header {
                    padding: 18px 25px;
                    border-bottom: 1px solid #e2e8f0;
                    background: #ffffff;
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    justify-content: space-between;
                    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.01);
                }

                .tchat-main-header-info {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                }

                .tchat-main-header h3 {
                    font-size: 1.15rem;
                    font-weight: 800;
                    margin: 0;
                    color: #0f172a;
                    display: flex;
                    align-items: center;
                    gap: 10px;
                }

                .tchat-main-subtitle {
                    font-size: 0.8rem;
                    color: #64748b;
                    margin-top: 2px;
                }

                .tchat-messages-container {
                    flex-grow: 1;
                    overflow-y: auto;
                    padding: 25px;
                    background: #ffffff;
                    display: flex;
                    flex-direction: column;
                    gap: 15px;
                }

                .tchat-date-separator {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin: 15px 0;
                    position: relative;
                }
                .tchat-date-separator::before {
                    content: '';
                    position: absolute;
                    width: 100%;
                    height: 1px;
                    background: #f1f5f9;
                    z-index: 1;
                }
                .tchat-date-text {
                    background: #ffffff;
                    padding: 4px 12px;
                    font-size: 0.75rem;
                    color: #94a3b8;
                    font-weight: 600;
                    z-index: 2;
                    border-radius: 20px;
                    border: 1px solid #f1f5f9;
                }

                .tchat-message-row {
                    display: flex;
                    margin-bottom: 8px;
                    width: 100%;
                    position: relative;
                }

                .tchat-message-row.sent {
                    justify-content: flex-end;
                }

                .tchat-message-row.received {
                    justify-content: flex-start;
                }

                .tchat-message-bubble {
                    max-width: 65%;
                    padding: 12px 16px;
                    border-radius: 16px;
                    position: relative;
                    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
                    line-height: 1.5;
                    font-size: 0.95rem;
                    word-break: break-word;
                }

                .tchat-message-row.sent .tchat-message-bubble {
                    background: var(--tchat-color);
                    color: white;
                    border-bottom-right-radius: 4px;
                    box-shadow: 0 4px 12px var(--tchat-rgba-shadow-light);
                }

                .tchat-message-row.received .tchat-message-bubble {
                    background: #f1f5f9;
                    color: #1e293b;
                    border-bottom-left-radius: 4px;
                }

                .tchat-message-sender {
                    font-size: 0.75rem;
                    font-weight: 800;
                    color: #475569;
                    margin-bottom: 4px;
                    display: block;
                }

                .tchat-message-text {
                    white-space: pre-wrap;
                }

                .tchat-message-time {
                    font-size: 0.7rem;
                    margin-top: 4px;
                    display: block;
                    text-align: right;
                }

                .tchat-message-row.sent .tchat-message-time {
                    color: rgba(255, 255, 255, 0.75);
                }

                .tchat-message-row.received .tchat-message-time {
                    color: #94a3b8;
                }

                .tchat-input-container {
                    padding: 20px 25px;
                    border-top: 1px solid #e2e8f0;
                    background: #ffffff;
                }

                .tchat-form {
                    display: flex;
                    gap: 12px;
                    align-items: center;
                }

                .tchat-textarea {
                    flex-grow: 1;
                    border: 1px solid #cbd5e1;
                    border-radius: 12px;
                    padding: 12px 16px;
                    font-size: 0.95rem;
                    outline: none;
                    resize: none;
                    height: 48px;
                    font-family: inherit;
                    transition: all 0.2s ease;
                    background: #f8fafc;
                    line-height: 1.4;
                }

                .tchat-textarea:focus {
                    border-color: var(--tchat-color);
                    background: #ffffff;
                    box-shadow: 0 0 0 4px var(--tchat-rgba-shadow-very-light);
                }

                .tchat-send-btn {
                    width: 48px;
                    height: 48px;
                    border-radius: 50%;
                    background: var(--tchat-color);
                    color: white;
                    border: none;
                    cursor: pointer;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 1.1rem;
                    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
                    box-shadow: 0 4px 12px var(--tchat-rgba-shadow);
                    flex-shrink: 0;
                }

                .tchat-send-btn:hover {
                    background: var(--tchat-hover);
                    transform: scale(1.05);
                }

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

                .tchat-send-btn:disabled {
                    background: #cbd5e1;
                    color: #94a3b8;
                    cursor: not-allowed;
                    box-shadow: none;
                    transform: none;
                }

                .tchat-attach-btn {
                    width: 48px;
                    height: 48px;
                    border-radius: 50%;
                    background: #f1f5f9;
                    color: #64748b;
                    border: none;
                    cursor: pointer;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 1.1rem;
                    transition: all 0.2s ease;
                    flex-shrink: 0;
                }
                .tchat-attach-btn:hover {
                    background: #e2e8f0;
                    color: #1e293b;
                }

                .tchat-empty-state {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    height: 100%;
                    color: #94a3b8;
                    text-align: center;
                    padding: 40px;
                }

                .tchat-empty-state i {
                    font-size: 3rem;
                    margin-bottom: 15px;
                    color: #cbd5e1;
                }

                .tchat-empty-state-title {
                    font-size: 1.1rem;
                    font-weight: 700;
                    color: #64748b;
                    margin-bottom: 5px;
                }

                /* Online state indicator on avatars */
                .tchat-avatar-container {
                    position: relative;
                    flex-shrink: 0;
                }
                .tchat-online-dot {
                    position: absolute;
                    bottom: -1px;
                    right: -1px;
                    width: 10px;
                    height: 10px;
                    background: #2ecc71;
                    border-radius: 50%;
                    border: 2px solid #f8fafc;
                }

                /* File previews inside conversation */
                .tchat-image-preview {
                    max-width: 280px;
                    max-height: 200px;
                    border-radius: 12px;
                    margin-top: 8px;
                    display: block;
                    cursor: zoom-in;
                    transition: opacity 0.2s;
                    border: 1px solid rgba(0,0,0,0.05);
                }
                .tchat-image-preview:hover {
                    opacity: 0.9;
                }

                .tchat-pdf-link {
                    display: inline-flex;
                    align-items: center;
                    gap: 10px;
                    padding: 10px 14px;
                    background: rgba(0, 0, 0, 0.03);
                    border-radius: 10px;
                    color: inherit;
                    text-decoration: none;
                    font-weight: 600;
                    font-size: 0.9rem;
                    margin-top: 8px;
                    border: 1px solid rgba(0, 0, 0, 0.05);
                    transition: background 0.2s;
                }
                .tchat-message-row.sent .tchat-pdf-link {
                    background: rgba(255, 255, 255, 0.15);
                    border-color: rgba(255, 255, 255, 0.2);
                }
                .tchat-pdf-link:hover {
                    background: rgba(0, 0, 0, 0.06);
                }
                .tchat-message-row.sent .tchat-pdf-link:hover {
                    background: rgba(255, 255, 255, 0.25);
                }
                .tchat-pdf-link i {
                    font-size: 1.3rem;
                    color: #e74c3c;
                }
                .tchat-message-row.sent .tchat-pdf-link i {
                    color: white;
                }

                /* Delete message icons */
                .btn-delete-msg {
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    background: #ffffff;
                    border: 1px solid #cbd5e1;
                    color: #94a3b8;
                    width: 26px;
                    height: 26px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    cursor: pointer;
                    opacity: 0;
                    transition: all 0.2s ease;
                    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                    z-index: 10;
                }
                .tchat-message-row.sent .btn-delete-msg {
                    left: -35px;
                }
                .tchat-message-row.received .btn-delete-msg {
                    right: -35px;
                }
                .tchat-message-row:hover .btn-delete-msg {
                    opacity: 1;
                }
                .btn-delete-msg:hover {
                    color: #e74c3c;
                    border-color: #fca5a5;
                    background: #fef2f2;
                    transform: translateY(-50%) scale(1.1);
                }

                /* Deletion in Header */
                .tchat-header-actions {
                    margin-left: auto;
                }
                .btn-delete-conv {
                    background: #ffffff;
                    border: 1px solid #cbd5e1;
                    color: #64748b;
                    padding: 8px 14px;
                    border-radius: 8px;
                    font-size: 0.85rem;
                    font-weight: 600;
                    cursor: pointer;
                    transition: all 0.2s;
                    display: flex;
                    align-items: center;
                    gap: 6px;
                }
                .btn-delete-conv:hover {
                    color: #e74c3c;
                    border-color: #fca5a5;
                    background: #fef2f2;
                }
            