/* MoneyFy - Global Styles */
body, html {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Sidebar - Левая колонка */
.sidebar {
    width: 350px;
    background: #fff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px;
    background: #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.search-box {
    padding: 10px;
    background: #fff;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: #f0f2f5;
    border-radius: 8px;
    box-sizing: border-box;
    outline: none;
}

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

.chat-item {
    display: flex;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.2s;
}

.chat-item:hover {
    background: #f5f6f6;
}

.chat-item.active {
    background: #ebebeb;
}

.chat-item.unread {
    font-weight: bold;
}

.chat-info {
    flex: 1;
    overflow: hidden;
}

.chat-name {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 4px;
}

.chat-time {
    font-size: 12px;
    color: #667781;
    font-weight: normal;
}

.chat-last-msg {
    font-size: 14px;
    color: #667781;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wait-tag {
    font-size: 11px;
    color: #fff;
    background: #d9534f;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 5px;
}

/* Main Chat - Центральная колонка */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #efe7de; /* Классический фон WhatsApp */
    position: relative;
}

.chat-header {
    padding: 15px 20px;
    background: #f0f2f5;
    border-bottom: 1px solid #ddd;
    z-index: 10;
}

.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Облачка сообщений */
.msg-bubble {
    max-width: 65%;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14.5px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.msg-in {
    align-self: flex-start;
    background: #fff;
    border-top-left-radius: 0;
}

.msg-out {
    align-self: flex-end;
    background: #dcf8c6;
    border-top-right-radius: 0;
}

.msg-time {
    font-size: 11px;
    color: #667781;
    margin-top: 4px;
    display: block;
    text-align: right;
}

/* Зона ввода */
.chat-input-area {
    padding: 10px 15px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #ddd;
}

.chat-input-area input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    outline: none;
}

/* Info Panel - Правая колонка */
.info-panel {
    width: 300px;
    background: #fff;
    border-left: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h3 {
    font-size: 14px;
    color: #008069;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.notes-area {
    width: 100%;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 14px;
    resize: none;
}

/* Статусы сообщений (галочки) */
.status-icon {
    font-weight: bold;
    margin-left: 3px;
}

.status-sent { color: #8696a0; }
.status-delivered { color: #8696a0; }
.status-read { color: #53bdeb; }

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}
::-webkit-scrollbar-track {
    background: transparent;
}