/* Все предыдущие стили + новые */

/* Чат */
.chat-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 24px;
}
.chat-wrapper {
    display: flex;
    gap: 24px;
    background: white;
    border-radius: 24px;
    border: 1px solid #f0e6ff;
    overflow: hidden;
    min-height: 600px;
}
.chat-sidebar {
    width: 320px;
    border-right: 1px solid #f0e6ff;
    background: #f8f4ff;
}
.chat-search {
    padding: 16px;
    border-bottom: 1px solid #f0e6ff;
}
.chat-search input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e8d5f5;
    border-radius: 40px;
    background: white;
}
.chat-users-list {
    overflow-y: auto;
    max-height: 500px;
}
.chat-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.chat-user-item:hover {
    background: white;
}
.chat-user-item.active {
    background: linear-gradient(95deg, #f8f4ff, #fff0f5);
    border-left: 3px solid #e84393;
}
.chat-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-user-info {
    flex: 1;
}
.chat-user-name {
    font-weight: 600;
    color: #2d1b4e;
}
.chat-user-last {
    font-size: 12px;
    color: #b8a9d4;
}
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.chat-header {
    padding: 16px;
    border-bottom: 1px solid #f0e6ff;
    background: white;
}
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
}
.message {
    max-width: 70%;
    padding: 10px 16px;
    border-radius: 20px;
}
.message.my {
    background: linear-gradient(135deg, #9b59b6, #e84393);
    color: white;
    align-self: flex-end;
}
.message.their {
    background: #f8f4ff;
    color: #2d1b4e;
    align-self: flex-start;
}
.message-img {
    max-width: 200px;
    border-radius: 12px;
    margin-top: 8px;
}
.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
}
.chat-input-area {
    padding: 16px;
    border-top: 1px solid #f0e6ff;
    display: flex;
    gap: 12px;
    align-items: center;
    background: white;
}
.chat-input-area input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e8d5f5;
    border-radius: 40px;
    outline: none;
}
.chat-attach-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Кошелёк */
.wallet-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 24px;
}
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}
.wallet-card {
    background: linear-gradient(135deg, #9b59b6, #e84393);
    border-radius: 24px;
    padding: 24px;
    color: white;
    text-align: center;
}
.wallet-balance {
    font-size: 48px;
    font-weight: 800;
    margin: 16px 0;
}
.wallet-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}
.wallet-actions .btn {
    background: white;
    color: #9b59b6;
}
.transfer-form {
    background: white;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #f0e6ff;
    margin-bottom: 24px;
}
.transactions-list {
    background: white;
    border-radius: 24px;
    border: 1px solid #f0e6ff;
    overflow: hidden;
}
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0e6ff;
}
.transaction-positive {
    color: #5cb85c;
}
.transaction-negative {
    color: #e74c3c;
}

/* Критерии товара по категориям */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    background: #f8f4ff;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
}
.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0e6ff;
}
.spec-label {
    font-weight: 600;
    color: #9b59b6;
}
.spec-value {
    color: #2d1b4e;
}

/* Загрузка файлов */
.file-upload-area {
    border: 2px dashed #e8d5f5;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f4ff;
}
.file-upload-area:hover {
    border-color: #e84393;
    background: #fff0f5;
}
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
}
.preview-item img, .preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.remove-file {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Кнопка чатов на главной */
.chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #9b59b6, #e84393);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(155,89,182,0.3);
    transition: all 0.3s ease;
    z-index: 100;
}
.chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(232,67,147,0.4);
}
