/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors - WhatsApp inspired */
    --bg-primary: #0b141a;
    --bg-secondary: #111b21;
    --bg-tertiary: #1f2c33;
    --bg-chat: #0b141a;
    --bg-hover: #2a3942;
    --bg-active: #2a3942;
    
    /* Message colors */
    --bg-message-sent: #005c4b;
    --bg-message-received: #1f2c33;
    
    /* Text colors */
    --text-primary: #e9edef;
    --text-secondary: #8696a0;
    --text-muted: #667781;
    
    /* Accent colors */
    --accent-primary: #00a884;
    --accent-hover: #06cf9c;
    --border-color: #2a3942;
    
    /* Status colors */
    --error: #f15c6d;
    --success: #00a884;
    --warning: #ffa940;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* Login Page Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-md);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 32px;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent-primary);
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    padding: 12px;
    background: rgba(241, 92, 109, 0.1);
    border: 1px solid var(--error);
    border-radius: 6px;
    color: var(--error);
    font-size: 14px;
}

.login-button {
    padding: 14px 24px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-button:hover:not(:disabled) {
    background: var(--accent-hover);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main App Container */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Left Sidebar */
.sidebar {
    width: 60px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 8px;
    border-right: 1px solid var(--border-color);
}

.sidebar-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.sidebar-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-icon.active {
    background: var(--bg-active);
    color: var(--accent-primary);
}

.sidebar-icon .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--accent-primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-profile {
    margin-top: auto;
}

.user-profile .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.logout-btn {
    margin-top: 8px;
}

.sidebar-spacer {
    flex: 1;
}

/* Chat List Panel */
.chat-list-panel {
    width: 380px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: relative;
}

.chat-list-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inbox-selector select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 200px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Search Bar */
.search-bar {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar svg {
    color: var(--text-muted);
}

.search-bar input {
    flex: 1;
    background: var(--bg-tertiary);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab:hover {
    background: var(--bg-hover);
}

.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-badge {
    background: var(--accent-primary);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.chat-list::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.chat-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

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

.chat-item.active {
    background: var(--bg-active);
}

.chat-item.unread {
    background: rgba(0, 168, 132, 0.05);
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    position: relative;
}

.channel-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.channel-whatsapp {
    background: #25d366;
}

.channel-email {
    background: #ea4335;
}

.channel-linkedin {
    background: #0077b5;
}

.channel-messenger {
    background: #0084ff;
}

.channel-telegram {
    background: #0088cc;
}

.channel-instagram {
    background: #e4405f;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-preview {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-preview p {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.unread-indicator {
    color: var(--accent-primary);
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

/* Messages Panel */
.messages-panel {
    flex: 1;
    background: var(--bg-chat);
    display: flex;
    flex-direction: column;
}

.empty-chat-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-muted);
}

.empty-chat-state svg {
    opacity: 0.3;
}

.empty-chat-state h2 {
    font-size: 24px;
    color: var(--text-secondary);
}

.empty-chat-state p {
    font-size: 14px;
}

.messages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.messages-header {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-info-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.chat-status {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Messages List */
.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.messages-list::-webkit-scrollbar {
    width: 6px;
}

.messages-list::-webkit-scrollbar-track {
    background: transparent;
}

.messages-list::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.date-separator {
    text-align: center;
    margin: 12px 0;
}

.date-separator span {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.message-bubble {
    max-width: 65%;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.message-bubble.sent {
    align-self: flex-end;
    background: var(--bg-message-sent);
    margin-left: auto;
}

.message-bubble.received {
    align-self: flex-start;
    background: var(--bg-message-received);
}

.message-sender {
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.reaction-add-btn {
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-bubble:hover .reaction-add-btn,
.reaction-add-btn.active {
    opacity: 1;
}

.reaction-add-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.reaction-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 4px;
    display: flex;
    gap: 4px;
    box-shadow: var(--shadow-md);
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

.reaction-option {
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
    user-select: none;
}

.reaction-option:hover {
    transform: scale(1.2);
    background: var(--bg-hover);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-content {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    position: relative;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Message Input */
.message-input-container {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.message-input-form {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: 12px;
}

.message-input-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
}

.message-input-form input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

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

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading and Empty States */
.loading-state,
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Channel and Inbox Items */
.channel-item,
.inbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.channel-item:hover,
.inbox-item:hover {
    background: var(--bg-hover);
}

.channel-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.channel-icon-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.channel-info,
.inbox-info {
    flex: 1;
    min-width: 0;
}

.channel-info h3,
.inbox-info h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.channel-info p,
.inbox-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.inbox-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.default-badge {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(0, 168, 132, 0.2);
    color: var(--success);
}

.status-badge.inactive {
    background: rgba(102, 119, 129, 0.2);
    color: var(--text-muted);
}

.inbox-actions svg {
    color: var(--text-muted);
}

/* Channel Details */
.channel-details {
    padding: 24px;
    overflow-y: auto;
}

.detail-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-item span {
    font-size: 14px;
    color: var(--text-primary);
}

.inbox-list-small {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inbox-badge-item {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-muted);
    font-size: 14px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group:last-of-type {
    margin-bottom: 0;
}

.modal-body select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.modal-body select:focus {
    border-color: var(--accent-primary);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: var(--bg-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: var(--text-primary);
}

.channel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    min-height: 60px;
}

.channel-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-primary);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--error);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: rgba(241, 92, 109, 0.2);
}

.add-channel-group {
    display: flex;
    gap: 12px;
}

.add-channel-group select {
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #d94655;
}

.chat-list-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* FAB Button Styles */
.fab-container {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 100;
}

.fab-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.4);
    transition: all 0.3s ease;
}

.fab-button:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.5);
}

.fab-button:active {
    transform: scale(0.95);
}

/* FAB Menu (Radial Menu) */
.fab-menu {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
}

.fab-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: fabSlideIn 0.3s ease;
}

.fab-option:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.4);
}

.fab-option:active {
    transform: scale(0.95);
}

@keyframes fabSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Compose Modal Specific Styles */
.compose-modal {
    max-width: 600px;
}

.compose-modal textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.2s;
}

.compose-modal textarea:focus {
    border-color: var(--accent-primary);
}

.compose-modal textarea::placeholder {
    color: var(--text-muted);
}

/* Attachment Preview Area */
.attachment-preview-area {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-width: 300px;
}

.attachment-name {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.attachment-size {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.remove-attachment-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remove-attachment-btn:hover {
    background: var(--bg-hover);
    color: var(--error);
}

/* Message Attachments Display */
.message-attachments {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.message-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.message-attachment:hover {
    background: rgba(0, 0, 0, 0.3);
}

.attachment-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    flex-shrink: 0;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-info .name {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-info .size {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.attachment-download-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .chat-list-panel {
        width: 320px;
    }
    
    .fab-container {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 50px;
    }
    
    .chat-list-panel {
        width: 280px;
    }
    
    .message-bubble {
        max-width: 80%;
    }
    
    .fab-button {
        width: 48px;
        height: 48px;
    }
    
    .fab-option {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    
    .compose-modal {
        max-width: 95%;
    }
    
    .attachment-preview-item {
        max-width: 200px;
    }
}
