.support-workspace [hidden], .support-admin [hidden] { display: none !important; }
.support-workspace { color: #294337; }
.support-retention { margin: 0 0 16px; padding: 12px 15px; border-left: 3px solid #aa8c50; background: #f8f1df; color: #775e2c; font-size: 13px; line-height: 1.8; }
.support-status { margin: 12px 0; color: #60765e; line-height: 1.8; }
.support-status:empty, .support-chat-error:empty { display: none; }
.support-status.error, .support-chat-error.error, .support-admin-status.error, .support-profile-status.error { color: #a33c31; }
.support-profile { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 0 0 18px; padding: 12px; background: #eef3e9; border-radius: 7px; }
.support-profile label { display: grid; gap: 6px; flex: 1 1 180px; font-size: 12px; color: #526848; }
.support-profile input { width: 100%; box-sizing: border-box; min-width: 0; padding: 8px 10px; border: 1px solid #bdcbb8; border-radius: 6px; font: inherit; background: #fff; color: #294337; }
.support-profile-status { flex-basis: 100%; color: #60765e; line-height: 1.7; }
.support-profile-status:empty { display: none; }
.support-layout { display: grid; min-width: 0; }
.support-layout.support-agent { grid-template-columns: minmax(210px, .7fr) minmax(0, 1.7fr); gap: 22px; }
.support-sidebar { min-width: 0; border-right: 1px solid #d5dfd1; padding-right: 20px; }
.support-sidebar h2, .support-chat-head h2 { font-size: 21px; margin: 0 0 12px; }
.support-conversations { display: grid; gap: 9px; max-height: 620px; overflow-y: auto; align-content: start; }
.support-conversation { display: grid; gap: 8px; width: 100%; min-width: 0; padding: 13px; border: 1px solid #d2ddcc; border-radius: 7px; background: #ffffffb3; color: #304936; text-align: left; cursor: pointer; font: inherit; }
.support-conversation:hover, .support-conversation.selected { border-color: #b49a61; background: #fff6e5; }
.support-conversation-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.support-conversation-head strong { overflow-wrap: anywhere; }
.support-conversation small, .support-conversation-preview { color: #6d7c66; font-size: 12px; }
.support-conversation-preview { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.support-unread { flex-shrink: 0; border-radius: 12px; background: #a84433; color: #fff; font-size: 11px; padding: 3px 7px; }
.support-chat { display: grid; align-content: start; gap: 13px; min-width: 0; }
.support-chat-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #d7e0d0; }
.support-chat-head h2 { margin-bottom: 5px; overflow-wrap: anywhere; }
.support-chat-head p { font-size: 12px; color: #65785e; margin: 0; line-height: 1.7; }
.support-back { display: none; }
.support-transfer { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; flex-basis: 100%; }
.support-transfer label { display: grid; gap: 5px; min-width: 0; font-size: 12px; color: #5a7052; }
.support-transfer select { max-width: 100%; min-width: 160px; padding: 8px 10px; border: 1px solid #bdcbb8; border-radius: 6px; background: #fff; color: #294337; font: inherit; }
.support-transfer-hint { flex-basis: 100%; font-size: 11px; color: #718169; line-height: 1.7; }
.support-messages { height: 380px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: flex-start; gap: 15px; border: 1px solid #d4dece; border-radius: 8px; background: #eef3e9; padding: 18px; }
.support-messages:empty::before { content: attr(data-empty); margin: auto; color: #74816c; font-size: 13px; text-align: center; line-height: 1.8; }
.support-message { display: grid; gap: 6px; max-width: 88%; }
.support-message.mine { align-self: flex-end; }
.support-message > small { color: #6e8065; font-size: 11px; }
.support-message.mine > small { text-align: right; }
.support-message p { margin: 0; padding: 11px 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; border-radius: 0 9px 9px; background: #fff; box-shadow: 0 2px 5px #294a3008; }
.support-message.mine p { background: #dfe9ce; border-radius: 9px 0 9px 9px; }
.support-compose { display: grid; gap: 9px; }
.support-text-label { display: grid; gap: 7px; color: #5a7052; font-size: 12px; }
.support-compose textarea, .support-admin-form input, .support-admin-form textarea { width: 100%; box-sizing: border-box; min-width: 0; padding: 11px 12px; border: 1px solid #bdcbb8; border-radius: 6px; background: #ffffffc9; color: #294337; font: inherit; font-size: 14px; line-height: 1.7; }
.support-compose textarea { resize: vertical; min-height: 82px; }
.support-compose textarea:focus, .support-admin-form input:focus, .support-admin-form textarea:focus, .support-transfer select:focus, .support-profile input:focus { outline: 2px solid #9daf7d; outline-offset: 2px; }
.support-compose-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.support-compose-tools small { flex: 1; color: #718169; font-size: 11px; }
.support-compose button:disabled, .support-pending button:disabled, .support-admin button:disabled, .support-transfer button:disabled, .support-profile button:disabled { opacity: .55; cursor: not-allowed; }
.support-pending { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 11px; background: #fff4dc; border-radius: 5px; font-size: 12px; color: #84602c; }
.support-pending > span { flex: 1 1 200px; }
.support-chat-error { margin: 0; font-size: 13px; }
.support-image { border: 1px solid #bacaaf; border-radius: 7px; background: #fff; overflow: hidden; padding: 7px; color: #506749; cursor: zoom-in; }
.support-image img { display: block; max-width: min(250px, 100%); max-height: 220px; object-fit: contain; }
.support-preview { max-width: 95vw; max-height: 95vh; border: 0; border-radius: 9px; padding: 13px; background: #f5f8f0; }
.support-preview::backdrop { background: #19291de0; }
.support-preview > button { display: block; margin: 0 0 10px auto; }
.support-preview > img { display: block; max-width: 88vw; max-height: 78vh; object-fit: contain; }
.support-gate { padding: 25px 0; text-align: center; color: #5d7354; }
.support-gate p { line-height: 1.8; margin-bottom: 22px; }
.support-admin { min-width: 0; }
.support-admin > p { color: #697b60; font-size: 13px; line-height: 1.8; }
.support-admin-form { display: flex; align-items: end; gap: 12px; margin: 18px 0; }
.support-admin-form label { display: grid; gap: 8px; flex: 1; color: #526848; }
.support-admin-form textarea { resize: vertical; }
.support-admin-form > button { flex-shrink: 0; min-height: 46px; }
@media (max-width: 700px) {
  .support-layout.support-agent { grid-template-columns: minmax(0, 1fr); }
  .support-agent .support-sidebar { border: 0; padding: 0; }
  .support-agent .support-chat { display: none; }
  .support-agent.support-show-chat .support-chat { display: grid; }
  .support-agent.support-show-chat .support-sidebar { display: none; }
  .support-agent .support-back { display: inline-flex; flex-shrink: 0; }
  .support-messages { height: min(430px, 48dvh); min-height: 230px; padding: 12px; }
  .support-message { max-width: 94%; }
  .support-compose-tools { gap: 8px; }
  .support-compose-tools small { order: 3; flex-basis: 100%; }
  .support-compose-tools button[type="submit"] { margin-left: auto; }
  .support-admin-form { flex-direction: column; align-items: stretch; }
  .support-retention { font-size: 12px; }
  .support-chat-head h2 { font-size: 18px; }
}
