:root {
  --support-bg: #090b0f;
  --support-panel: #111419;
  --support-panel-soft: #15181e;
  --support-line: rgba(255,255,255,.085);
  --support-line-strong: rgba(255,255,255,.13);
  --support-text: #f3f4f6;
  --support-muted: #858a94;
  --support-accent: #c9c1dc;
  --support-accent-strong: #e6e0f3;
  --support-green: #9bc9b7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; min-height: 100%; }
html { background: var(--support-bg); }
body.support-page { min-width: 320px; margin: 0; padding: 0 !important; overflow: hidden; background: var(--support-bg); color: var(--support-text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.support-page img { display: block; max-width: 100%; }
.support-app { display: grid; width: 100%; height: 100vh; min-height: 0; margin: 0; padding: 0 !important; grid-template-rows: 72px minmax(0, 1fr); overflow: hidden; }
.support-topbar { display: flex; align-items: center; gap: 26px; padding: 0 max(24px, calc((100vw - 1420px) / 2 + 20px)); border-bottom: 1px solid var(--support-line); background: rgba(12,14,18,.92); backdrop-filter: blur(18px); }
.support-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--support-text); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-decoration: none; }
.support-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.support-topbar-title { display: grid; gap: 2px; min-width: 0; padding-left: 26px; border-left: 1px solid var(--support-line); }
.support-topbar-title strong { font-size: 15px; font-weight: 650; }
.support-topbar-title span { color: #9297a1; font-size: 12px; font-weight: 400; }
.support-topbar-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.support-sync { color: #858b95; font-size: 11px; font-weight: 400; }
.support-back-link { color: #d0d2d7; font-size: 12px; font-weight: 550; text-decoration: none; }
.support-back-link:hover { color: #fff; }
.support-logout { padding: 8px 13px; border: 1px solid var(--support-line-strong); border-radius: 8px; background: transparent; color: #e7e8eb; font-size: 12px; cursor: pointer; }
.support-logout:hover { background: var(--support-panel-soft); }
.support-shell { display: grid; width: min(1420px, 100%); height: 100%; min-height: 0; margin: 0 auto; grid-template-columns: 360px minmax(0, 1fr); overflow: hidden; border-right: 1px solid var(--support-line); border-left: 1px solid var(--support-line); background: var(--support-panel); }
.support-sidebar { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border-right: 1px solid var(--support-line); background: #0e1116; }
.support-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 27px 20px 18px; }
.support-sidebar-head h1 { margin: 3px 0 0; color: var(--support-text); font-family: Manrope, Inter, sans-serif; font-size: 27px; font-weight: 750; letter-spacing: -.045em; }
.support-overline { color: #b8b0ca; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.support-primary { min-height: 42px; padding: 0 17px; border: 1px solid rgba(201,193,220,.48); border-radius: 9px; background: var(--support-accent); color: #15131b; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.support-primary:hover { background: var(--support-accent-strong); transform: translateY(-1px); }
.support-primary-small { display: grid; width: 40px; height: 40px; min-height: 40px; flex: 0 0 40px; align-self: center; padding: 0; place-items: center; border-radius: 50%; font-size: 24px; font-weight: 400; line-height: 1; text-align: center; }
.support-list-tools { display: grid; gap: 8px; padding: 0 14px 14px; }
.support-list-tools select, .support-search { width: 100%; min-height: 40px; border: 1px solid var(--support-line); border-radius: 9px; background: #0b0e12; color: #dfe1e5; font-size: 12px; }
.support-list-tools select { padding: 0 10px; }
.support-restriction { border: 1px solid rgba(223,167,170,.25); border-radius: 9px; background: rgba(128,61,68,.13); color: #e6b7ba; font-size: 11px; line-height: 1.45; }
.support-restriction-sidebar { margin: 0 14px 12px; padding: 9px 10px; }
.support-restriction-chat { margin: 10px clamp(18px, 5vw, 74px) 0; padding: 9px 11px; }
.support-primary:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.support-search { display: flex; align-items: center; gap: 8px; padding: 0 11px; }
.support-search span { color: #7d828c; font-size: 18px; line-height: 1; }
.support-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #e8e9ec; font-size: 12px; }
.support-search input::placeholder { color: #666b75; }
.support-chats { min-height: 0; flex: 1; overflow: auto; border-top: 1px solid var(--support-line); }
.support-chat-item { display: flex; width: 100%; gap: 12px; padding: 13px 15px; border: 0; border-bottom: 1px solid rgba(255,255,255,.055); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.support-chat-item:hover { background: rgba(255,255,255,.035); }
.support-chat-item.is-active { background: #1a1921; box-shadow: inset 2px 0 0 var(--support-accent); }
.support-chat-item-avatar, .support-chat-avatar { display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #393746, #1e1e28); color: #e0dbef; font-weight: 700; }
.support-chat-item-avatar { width: 44px; height: 44px; font-size: 14px; }
.support-chat-item-body { display: grid; min-width: 0; flex: 1; gap: 7px; align-content: center; }
.support-chat-item-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.support-chat-item-line strong { overflow: hidden; color: #f0f1f3; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.support-chat-item-line time { flex: 0 0 auto; color: #7c828d; font-size: 10px; font-weight: 400; }
.support-chat-item-preview { color: #9a9fa8; font-size: 12px; font-weight: 400; }
.support-chat-item-preview > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-pill { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; color: #aaa3ba; font-size: 8px; font-style: normal; font-weight: 700; }
.support-pill-open { background: rgba(201,193,220,.13); }
.support-pill-in_progress { background: rgba(155,201,183,.13); color: var(--support-green); }
.support-pill-closed { background: rgba(255,255,255,.07); color: #777c85; }
.support-sidebar-foot { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-top: 1px solid var(--support-line); color: #626772; font-size: 9px; }
.support-online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--support-green); box-shadow: 0 0 10px rgba(155,201,183,.5); }
.support-conversation { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #12151a; }
.support-conversation::before { position: absolute; inset: 0; opacity: .18; background-image: radial-gradient(rgba(255,255,255,.08) .7px, transparent .7px); background-size: 18px 18px; content: ''; pointer-events: none; }
.support-empty-state { position: relative; z-index: 1; display: grid; width: 100%; height: 100%; min-height: 0; align-content: center; justify-items: center; gap: 10px; padding: 40px; text-align: center; }
.support-empty-orb { display: grid; width: 62px; height: 62px; margin-bottom: 7px; place-items: center; border: 1px solid rgba(201,193,220,.34); border-radius: 50%; background: rgba(201,193,220,.07); color: var(--support-accent); font-size: 27px; box-shadow: 0 0 50px rgba(201,193,220,.08); }
.support-empty-state h2 { margin: 0; font-family: Manrope, Inter, sans-serif; font-size: 22px; letter-spacing: -.035em; }
.support-empty-state p { max-width: 310px; margin: 0 0 10px; color: var(--support-muted); font-size: 13px; line-height: 1.55; }
.support-chat-view { position: relative; z-index: 1; display: flex; width: 100%; height: 100%; min-height: 0; flex-direction: column; overflow: hidden; }
.support-chatbar { display: flex; min-height: 84px; align-items: center; gap: 12px; padding: 15px 23px; border-bottom: 1px solid var(--support-line); background: rgba(17,20,25,.88); backdrop-filter: blur(12px); }
.support-chat-avatar { width: 42px; height: 42px; font-size: 15px; }
.support-chat-title { display: grid; min-width: 0; gap: 3px; }
.support-chat-title h2 { overflow: hidden; margin: 0; color: #f4f5f7; font-size: 16px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.support-chat-title > span:last-child { overflow: hidden; color: #9399a3; font-size: 11px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.support-chat-actions { position: relative; display: flex; gap: 7px; margin-left: auto; }
.support-ghost { min-height: 34px; padding: 0 11px; border: 1px solid var(--support-line-strong); border-radius: 8px; background: transparent; color: #d5d6da; font-size: 11px; cursor: pointer; }
.support-ghost:hover { background: rgba(255,255,255,.05); }
.support-ghost-danger { color: #dfa7aa; }
.support-timeout-menu { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; display: grid; min-width: 164px; gap: 4px; padding: 8px; border: 1px solid var(--support-line-strong); border-radius: 10px; background: #171a20; box-shadow: 0 14px 30px rgba(0,0,0,.28); }
.support-timeout-menu span { padding: 3px 5px 6px; color: #9298a4; font-size: 10px; }
.support-timeout-menu button { min-height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #e0e1e5; text-align: left; font-size: 11px; cursor: pointer; }
.support-timeout-menu button:hover { background: rgba(201,193,220,.12); color: #fff; }
.support-chat-back { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--support-line); border-radius: 8px; background: rgba(255,255,255,.025); color: #c9c1dc; cursor: pointer; }
.support-chat-back:hover { border-color: rgba(201,193,220,.35); background: rgba(201,193,220,.07); }
.support-chat-back span { font-size: 17px; line-height: 1; }
.support-chat-back b { font-size: 10px; font-weight: 650; }
.support-messages { display: grid; align-content: start; gap: 11px; min-height: 0; flex: 1; padding: 24px clamp(18px, 5vw, 74px); overflow: auto; }
.support-bubble { width: min(72%, 590px); padding: 10px 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px 13px 13px 4px; background: #1a1d23; box-shadow: 0 5px 15px rgba(0,0,0,.08); }
.support-bubble.is-mine { justify-self: end; border-color: rgba(201,193,220,.22); border-radius: 13px 13px 4px 13px; background: #282531; }
.support-bubble.is-admin:not(.is-mine) { border-color: rgba(155,201,183,.16); }
.support-bubble.is-system { justify-self: center; width: min(88%, 620px); border-color: rgba(201,193,220,.22); background: rgba(201,193,220,.06); }
.support-bubble.is-system .support-bubble-head strong { color: #c9c1dc; }
.support-bubble-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.support-bubble-head strong { color: var(--support-accent); font-size: 11px; font-weight: 700; }
.support-bubble.is-admin:not(.is-mine) .support-bubble-head strong { color: var(--support-green); }
.support-bubble-head time { color: #8a909a; font-size: 10px; font-weight: 400; white-space: nowrap; }
.support-bubble p { margin: 0; color: #f0f1f3; font-size: 14px; font-weight: 400; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-files { display: grid; gap: 7px; margin-top: 8px; }
.support-file { color: #d9d5e5; font-size: 10px; text-decoration: none; }
.support-file-image { display: grid; gap: 5px; }
.support-file-image img { display: block; width: min(100%, 280px); max-height: 220px; border-radius: 8px; object-fit: cover; }
.support-file-video { display: grid; gap: 5px; }
.support-file-video video { display: block; width: min(100%, 340px); max-height: 230px; border-radius: 8px; background: #080a0e; }
.support-file-document { display: flex; align-items: center; gap: 9px; width: min(100%, 300px); padding: 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: rgba(255,255,255,.035); }
.support-file-document > span:last-child { display: grid; min-width: 0; gap: 2px; }
.support-file-document strong { overflow: hidden; color: #dedbea; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.support-file-document small { color: #777c85; font-size: 9px; }
.support-document-icon { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 6px; background: rgba(201,193,220,.14); color: var(--support-accent); font-size: 14px; }
.support-composer { padding: 13px clamp(18px, 5vw, 74px) 17px; border-top: 1px solid var(--support-line); background: rgba(14,17,22,.94); }
.support-subject { display: block; width: 100%; min-height: 39px; margin-bottom: 8px; padding: 0 12px; border: 1px solid var(--support-line-strong); border-radius: 9px; outline: 0; background: #0b0e12; color: #e8e9ec; font-size: 12px; }
.support-compose-main { display: flex; align-items: flex-end; gap: 8px; }
.support-attach { display: grid; width: 40px; height: 44px; flex: 0 0 auto; place-items: center; border: 1px solid var(--support-line-strong); border-radius: 10px; color: var(--support-accent); font-size: 23px; cursor: pointer; }
.support-attach:hover { background: rgba(255,255,255,.05); }
.support-compose-main textarea { width: 100%; height: 44px; min-height: 44px; max-height: 128px; padding: 10px 14px; overflow-y: hidden; resize: none; border: 1px solid var(--support-line-strong); border-radius: 10px; outline: 0; background: #0b0e12; color: #f2f3f5; font-size: 14px; font-weight: 400; line-height: 22px; scrollbar-width: none; }
.support-compose-main textarea::-webkit-scrollbar { display: none; width: 0; height: 0; }
.support-compose-main textarea:focus, .support-subject:focus { border-color: rgba(201,193,220,.6); }
.support-compose-main textarea::placeholder { color: #686d77; }
.support-send { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 10px; background: var(--support-accent); color: #15131b; font-size: 19px; cursor: pointer; }
.support-send:hover { background: var(--support-accent-strong); }
.support-send:disabled { cursor: wait; opacity: .55; }
.support-compose-foot { display: flex; align-items: center; gap: 8px; min-height: 20px; margin-left: 46px; color: #858b95; font-size: 10px; font-weight: 400; }
.support-compose-foot input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.support-compose-foot span { overflow-wrap: anywhere; }
.support-form-error { color: #e1a7aa; }
.support-no-messages, .support-no-chats { display: grid; align-content: center; justify-items: center; min-height: 130px; gap: 6px; color: #777c85; font-size: 12px; text-align: center; }
.support-no-chats { min-height: 230px; padding: 25px; }
.support-no-chats div { color: var(--support-accent); font-size: 26px; }
.support-no-chats strong { color: #dfe0e4; font-size: 13px; }
.support-no-chats span { color: #707580; font-size: 11px; }
.support-loading { display: grid; gap: 9px; padding: 20px; }
.support-loading span { display: block; height: 50px; border-radius: 9px; background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(255,255,255,.09), rgba(255,255,255,.035)); background-size: 200% 100%; animation: supportShimmer 1.3s infinite; }
.support-chats, .support-messages { scrollbar-width: none; -ms-overflow-style: none; }
.support-chats::-webkit-scrollbar, .support-messages::-webkit-scrollbar { display: none; width: 0; height: 0; }
.support-page-loading { display: grid; min-height: 100vh; align-content: center; justify-items: center; gap: 12px; background: var(--support-bg); color: var(--support-muted); font-size: 12px; }
.support-loading-mark { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(201,193,220,.35); border-radius: 13px; color: var(--support-accent); font-family: Manrope, sans-serif; font-weight: 800; }
@keyframes supportShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 800px) {
  body.support-page { overflow: hidden; }
  .support-app { height: 100svh; min-height: 0; grid-template-rows: 62px minmax(0, 1fr); }
  .support-topbar { gap: 14px; padding: 0 14px; }
  .support-topbar-title { display: none; }
  .support-topbar-actions { gap: 9px; }
  .support-sync { display: none; }
  .support-back-link { font-size: 11px; }
  .support-logout { padding: 7px 9px; font-size: 11px; }
  .support-shell { position: relative; display: block; height: calc(100svh - 62px); min-height: 0; border: 0; }
  .support-sidebar { height: 100%; min-height: 0; border: 0; }
  .support-conversation { position: absolute; inset: 0; display: none; height: 100%; min-height: 0; }
  .support-conversation.is-open { display: block; }
  .support-chat-back { width: 34px; min-height: 34px; justify-content: center; padding: 0; }
  .support-chat-back b { display: none; }
  .support-chatbar { min-height: 70px; padding: 12px 14px; }
  .support-chat-actions { gap: 4px; }
  .support-ghost { padding: 0 8px; font-size: 10px; }
  .support-timeout-menu { right: -4px; }
  .support-messages { padding: 18px 13px; }
  .support-bubble { width: 88%; }
  .support-composer { padding: 10px 12px 13px; }
  .support-compose-foot { margin-left: 46px; }
  .support-restriction-chat { margin: 8px 12px 0; }
}

@media (max-width: 430px) {
  .support-brand span { display: none; }
  .support-chat-avatar { width: 36px; height: 36px; }
  .support-chat-title h2 { max-width: 170px; }
  .support-bubble { width: 94%; }
}
