/* =========================================================
   СТИЛИ ДЛЯ ПЕРЕПИСКИ (ЧАТ)
   ========================================================= */

/* Убираем серый фон, делаем белый */
.mesgs {
    background-color: #ffffff !important; 
    padding: 20px 0;
    border-radius: 12px;
}

/* Контейнер для всей переписки (если используется) */
#message-list {
    background: #ffffff !important; /* Принудительно белый */
    padding: 20px;
    border-radius: 12px;
}

/* Общие настройки для облачек */
.received_withd_msg p, 
.sent_msg p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
}

/* ----- ВХОДЯЩИЕ (Клиент) ----- */
.incoming_msg {
    margin-bottom: 20px;
    clear: both;
}

.received_msg {
    display: inline-block;
    padding: 0;
    vertical-align: top;
    max-width: 80%;
}

.received_withd_msg {
    width: auto;
}

/* Клиент пишет — светло-серый фон */
.received_withd_msg p {
    background: #f1f5f9 !important; /* Светло-серый */
    color: #1f2937;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px; 
}

/* ----- ИСХОДЯЩИЕ (Сотрудник) ----- */
.outgoing_msg {
    margin-bottom: 20px;
    clear: both;
    text-align: right; 
}

.sent_msg {
    display: inline-block;
    max-width: 80%;
    text-align: left;
}

/* Сотрудник пишет — синий фон */
.sent_msg p {
    background: #eff6ff !important; /* Легкий синий */
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    border-bottom-right-radius: 4px;
}

/* ----- ДАТА И ИМЯ ----- */
.time_date {
    color: #94a3b8;
    display: block;
    font-size: 12px;
    margin: 6px 0 4px 0;
    font-weight: 500;
}

.outgoing_msg .time_date {
    text-align: right;
}

/* ----- ВЛОЖЕНИЯ (ФАЙЛЫ) ----- */
.received_withd_msg .row, 
.sent_msg .row {
    margin: 10px -5px 0 -5px;
}

.received_withd_msg .col-xs-6,
.sent_msg .col-xs-6 {
    padding: 5px;
}

.received_withd_msg a[href*="download_attachment"],
.sent_msg a[href*="download_attachment"] {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    color: #3b82f6;
    transition: background 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.received_withd_msg a[href*="download_attachment"]:hover,
.sent_msg a[href*="download_attachment"]:hover {
    background: #f8fafc;
}

/* Миниатюры картинок */
#message-list .thumbnail {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    margin: 0;
    background: #fff;
}

#message-list .thumbnail img {
    border-radius: 4px;
}

/* =========================================================
   СТИЛИ ФОРМЫ ОТВЕТА (ВНИЗУ)
   ========================================================= */

#reply .well {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  padding: 20px;
}

#message {
    height: 200px;
    border-radius: 8px;
    border-color: #cbd5e1;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    resize: vertical;
}

#message:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* =========================================================
   СЛУЖЕБНЫЕ СТИЛИ (ОСТАВЛЕНЫ БЕЗ ИЗМЕНЕНИЙ)
   ========================================================= */

#message-preloader{
    text-align: center;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 28px 0;
}

.login-logo-svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.login-logo-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--msg-admin-text);
  letter-spacing: -0.3px;
}

.empty-state {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: #999;
  font-size: 15px;
  height: calc(100vh - 170px);
}

.empty-state svg {
  display: block;
  width: 48px;
  height: 48px;
}

.dot-loader{
    padding:0px;
}