/* ===== MESSAGING PAGE ===== */
.messaging-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    height: calc(100vh - 120px);
    overflow: hidden;
}

/* Conversations List */
.conversations-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.conversations-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.conversations-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.conversations-search {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.conversations-search:focus {
    border-color: var(--primary-color);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

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

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

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

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

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

.conversation-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.conversation-last-message {
    font-size: 13px;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 12px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.conversation-unread {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-top: 4px;
}

/* Chat Area */
.chat-area {
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.chat-header-info {
    flex: 1;
}

.chat-header-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-header-status {
    font-size: 12px;
    color: var(--secondary-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    display: flex;
    gap: 8px;
    max-width: 70%;
}

.message-item.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message-content {
    background: var(--bg-secondary);
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.message-item.sent .message-content {
    background: var(--primary-color);
    color: white;
}

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

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 100px;
}

.chat-input:focus {
    border-color: var(--primary-color);
}

.chat-send-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.chat-send-btn:hover {
    background: var(--primary-hover);
}

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

