.support-container {
    display: flex;
    height: 80vh;
    max-width: 1200px;
    margin: 30px auto;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

/* ЛЕВАЯ КОЛОНКА (СПИСОК ТИКЕТОВ) */
.ticket-list-area {
    width: 350px;
    background: #161616;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
}

.ticket-list-header {
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.tickets-scroll {
    flex: 1;
    overflow-y: auto;
}

.ticket-item {
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.ticket-item:hover {
    background: #1a1a1a;
}

.ticket-item.active {
    background: #1a1a1a;
    border-left-color: var(--primary);
}

.ticket-subj {
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.s-open {
    background: #4caf5022;
    color: #4caf50;
}

.s-answered {
    background: #ff980022;
    color: #ff9800;
}

.s-closed {
    background: #55555522;
    color: #888;
}

/* ПРАВАЯ КОЛОНКА (ЧАТ) */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #111;
    position: relative;
}

.chat-header {
    padding: 20px;
    background: #161616;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Сообщения */
.msg-bubble {
    max-width: 70%;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    gap: 15px;
}

.msg-my {
    align-self: flex-end;
    background: #2a1414;
    border: 1px solid #4a1414;
    border-bottom-right-radius: 2px;
}

.msg-other {
    align-self: flex-start;
    background: #1a1a1a;
    border: 1px solid #333;
    border-bottom-left-radius: 2px;
}

.msg-admin {
    border-color: #cc2b14;
    box-shadow: inset 0 0 15px rgba(204, 43, 20, 0.1);
}

.msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.msg-content {
    flex: 1;
}

.msg-author {
    font-weight: 700;
    color: #aaa;
    margin-bottom: 5px;
    font-size: 12px;
}

.msg-text {
    color: #eee;
}

/* Форма ввода */
.chat-input-area {
    padding: 20px;
    background: #161616;
    border-top: 1px solid #2a2a2a;
    display: flex;
    gap: 15px;
}

.chat-input-area input {
    flex: 1;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--primary);
}

/* Модалка создания тикета */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-box {
    background: #161616;
    padding: 30px;
    border-radius: 12px;
    width: 500px;
    border: 1px solid #333;
}

.modal-box input,
.modal-box textarea {
    width: 100%;
    margin-bottom: 15px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    outline: none;
}

/* Добавить в конец файла /Css/support.css */
@media (max-width: 768px) {
    .support-container { flex-direction: column; height: auto; min-height: 80vh; }
    .ticket-list-area { width: 100%; border-right: none; border-bottom: 1px solid #2a2a2a; max-height: 250px; }
    .chat-area { min-height: 500px; flex: 1; }
    
    .chat-header { flex-direction: column; gap: 15px; text-align: center; }
    .chat-header .btn { width: 100%; justify-content: center; }
    
    .msg-bubble { max-width: 95%; flex-direction: column; gap: 10px; }
    .msg-avatar { width: 30px; height: 30px; font-size: 14px; }
    
    .chat-input-area { flex-direction: column; }
    .chat-input-area input, .chat-input-area .btn { width: 100%; justify-content: center; }
    
    .modal-box { width: 95vw; padding: 20px; }
}