:root {
  --support-panel: rgba(23, 22, 28, .82);
  --support-panel-strong: rgba(23, 22, 28, .94);
  --support-line: rgba(235, 230, 243, .095);
  --support-line-strong: rgba(235, 230, 243, .17);
}

.support-body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #111016;
  color: var(--text);
  font-family: var(--font-ui);
}

.support-body a { color: inherit; text-decoration: none; }
.support-body svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-dither-bg {
  z-index: 0;
  overflow: hidden;
  opacity: .35;
  background: #111016;
}

.support-dither-bg canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.support-dither-veil { z-index: 0; background: rgba(17, 16, 22, .34); }
.support-app-shell { position: relative; z-index: 1; background: transparent; }
.support-main-content { position: relative; z-index: 1; background: transparent; }

.support-sidebar .nav-item {
  text-decoration: none;
}

.support-sidebar .nav-item svg { flex: 0 0 auto; stroke-width: 2; }

.owner-navigation[hidden] { display: none !important; }

.support-topbar .breadcrumb svg { width: 14px; height: 14px; }
.support-topbar .icon-button svg,
.support-topbar .logout-button svg { width: 18px; height: 18px; }
.support-topbar .muted-icon { width: 15px; height: 15px; }

.support-page-wrap { max-width: 1580px; }
.support-page-heading {
  min-height: 121px;
  align-items: flex-end;
  padding: 3px 2px 25px;
}

.support-page-heading h1 { margin-top: 10px; }
.eyebrow-mark {
  display: inline-block;
  width: 15px;
  height: 1px;
  background: var(--accent-bright);
  box-shadow: 0 0 8px rgba(196, 173, 250, .5);
}

.support-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.support-stats > button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 108px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 22, 28, .76);
  padding: 14px 16px 13px;
  color: inherit;
  text-align: left;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.support-stats > button::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 173, 250, .55), transparent);
  content: '';
  opacity: 0;
}

.support-stats > button:hover,
.support-stats > button.active {
  border-color: var(--accent-line);
  background: rgba(30, 28, 36, .84);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22), var(--glow-sm);
}
.support-stats > button.active::before { opacity: 1; }
.support-stat-top { display: flex; align-items: center; gap: 8px; }
.support-stat-top small { overflow: hidden; color: #8f8996; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.stat-symbol { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .025); color: #918b9a; }
.stat-symbol svg { width: 13px; height: 13px; }
.stat-symbol.waiting,
.stat-symbol.all { border-color: rgba(157, 122, 248, .24); background: var(--accent-soft); color: var(--accent-bright); }
.stat-symbol.answered { border-color: rgba(102, 215, 157, .2); background: rgba(102, 215, 157, .07); color: #78d7a6; }
.support-stats b { margin-top: 7px; color: #eee9f3; font-family: var(--font-display); font-size: 27px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.support-stats > button > span:last-child { margin-top: 4px; color: #706a77; font-size: 8.5px; }

.support-workspace {
  display: grid;
  height: calc(100vh - 330px);
  min-height: 590px;
  max-height: 820px;
  grid-template-columns: minmax(315px, 372px) minmax(0, 1fr);
  overflow: hidden;
  border-color: var(--glass-border);
  background: rgba(23, 22, 28, .72);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .2);
}

.ticket-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(13, 12, 18, .36);
}

.ticket-tools {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 15px;
}

.ticket-column-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; }
.ticket-column-title > span { min-width: 0; }
.ticket-column-title strong,
.ticket-column-title small { display: block; }
.ticket-column-title strong { color: #e6e0ec; font-size: 12px; font-weight: 600; }
.ticket-column-title small { margin-top: 2px; color: #77717e; font-size: 9px; }
.ticket-tools label {
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(26, 25, 31, .9);
  padding: 0 10px;
  color: #817b88;
  transition: border-color .18s ease, background .18s ease;
}
.ticket-tools label:focus-within { border-color: var(--accent-line); background: var(--surface-hover); }
.ticket-tools label > svg { width: 15px; height: 15px; flex: 0 0 auto; }
.ticket-tools input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 0; color: var(--text); font: inherit; font-size: 10.5px; }
.ticket-tools input::placeholder { color: #716b78; }
.ticket-tools kbd { border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .025); padding: 2px 5px; color: #6f6976; font-family: var(--font-mono); font-size: 8px; white-space: nowrap; }

.ticket-list { min-height: 0; overflow: auto; scrollbar-color: #34313b transparent; }
.ticket-card {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 14px 15px;
  color: inherit;
  text-align: left;
  transition: background .17s ease, box-shadow .17s ease;
}
.ticket-card::before { position: absolute; top: 13px; bottom: 13px; left: 0; width: 2px; border-radius: 2px; background: var(--accent-bright); content: ''; opacity: 0; transform: scaleY(.4); transition: .17s ease; }
.ticket-card:hover { background: rgba(157, 122, 248, .055); }
.ticket-card.active { background: rgba(157, 122, 248, .09); box-shadow: inset 0 0 24px rgba(157, 122, 248, .035); }
.ticket-card.active::before { opacity: 1; transform: scaleY(1); }
.ticket-card.has-activity::after { position: absolute; top: 15px; right: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-bright); content: ''; box-shadow: 0 0 10px rgba(196, 173, 250, .7); }
.ticket-avatar { position: relative; display: grid; width: 34px; height: 34px; flex: 0 0 auto; overflow: hidden; place-items: center; border: 1px solid rgba(157, 122, 248, .26); border-radius: 7px; background: rgba(157, 122, 248, .11); color: #d9cdf8; font-family: var(--font-display); font-size: 10px; font-weight: 700; }
.ticket-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; background: #15131a; object-fit: cover; }
.ticket-avatar-large { width: 40px; height: 40px; font-size: 11px; }
.ticket-card-copy { display: grid; min-width: 0; gap: 5px; }
.ticket-card-head,
.ticket-card-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.ticket-card-head strong { overflow: hidden; color: #ded8e5; font-size: 11.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ticket-preview { overflow: hidden; color: #aaa4b0; font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.ticket-card-meta { color: #716b78; font-size: 8.5px; }
.ticket-status { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .025); padding: 3px 6px; color: #817b88; font-size: 7.5px; font-weight: 500; }
.ticket-status.open { border-color: rgba(157, 122, 248, .19); background: rgba(157, 122, 248, .09); color: #c9b6f8; }
.ticket-status.replied { border-color: rgba(102, 215, 157, .15); background: rgba(102, 215, 157, .07); color: #78d7a6; }
.ticket-status.closed { color: #77717e; }
.ban-mark,
.ban-heading { display: flex; align-items: center; gap: 5px; }
.ban-mark { color: #df8b99; }
.ban-mark .support-icon svg { width: 10px; height: 10px; }

.ticket-detail { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: rgba(19, 18, 24, .36); }
.ticket-detail-empty { align-items: center; justify-content: center; }
.detail-placeholder { max-width: 330px; padding: 30px; color: #77717e; text-align: center; }
.detail-placeholder b { display: block; margin: 13px 0 6px; color: #ded8e5; font-size: 12px; font-weight: 600; }
.detail-placeholder p { margin: 0; font-size: 10px; line-height: 1.6; }
.support-icon { display: inline-grid; place-items: center; }
.support-icon svg { width: 15px; height: 15px; }
.support-icon-large { width: 42px; height: 42px; margin: auto; border: 1px solid var(--accent-line); border-radius: 8px; background: var(--accent-soft); color: var(--accent-bright); box-shadow: var(--glow-sm); }
.support-icon-large svg { width: 20px; height: 20px; }

.detail-head {
  display: flex;
  min-height: 71px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(23, 22, 28, .48);
  padding: 13px 17px;
}
.detail-person { display: flex; min-width: 0; align-items: center; gap: 11px; }
.detail-identity { display: grid; min-width: 0; gap: 5px; }
.detail-identity > strong { overflow: hidden; color: #e8e2ed; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-identity-meta { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; }
.detail-identity-meta i { overflow: hidden; max-width: 210px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .02); padding: 2px 5px; color: #77717e; font-size: 7.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.detail-actions,
.composer-actions,
.ban-actions { display: flex; align-items: center; gap: 8px; }

.support-button {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #a990e8;
  border-radius: 8px;
  background: var(--accent);
  padding: 8px 12px;
  color: #18131f;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.support-button:hover { background: #ad8ef4; transform: translateY(-1px); box-shadow: var(--glow-sm); }
.support-button:disabled { opacity: .45; cursor: default; transform: none; }
.support-button-ghost { border-color: var(--line-strong); background: transparent; color: var(--accent-bright); }
.support-button-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); }

.conversation {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 18px;
  scrollbar-color: #34313b transparent;
}
.message { display: grid; width: fit-content; max-width: min(76%, 620px); align-self: flex-start; gap: 7px; border: 1px solid var(--line); border-radius: 8px 8px 8px 3px; background: rgba(31, 30, 37, .82); padding: 10px 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, .12); }
.message.staff { align-self: flex-end; border-color: rgba(157, 122, 248, .2); border-radius: 8px 8px 3px 8px; background: rgba(157, 122, 248, .14); }
.message p { margin: 0; color: #dcd6e2; font-size: 10.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.message small { color: #716b78; font-size: 7.5px; line-height: 1.3; }
.message.staff small { color: #9183b1; }

.message-media { position: relative; max-width: 100%; overflow: hidden; border-radius: 6px; background: rgba(8, 7, 11, .45); }
.message-media img,
.message-media video { display: block; max-width: 100%; object-fit: contain; }
.media-photo img { width: min(100%, 520px); max-height: 390px; }
.media-video video,
.media-animation video { width: min(100%, 560px); max-height: 390px; background: #09080c; }
.media-video_note { overflow: visible; background: transparent; }
.media-video_note video { width: 230px; height: 230px; border: 2px solid rgba(157, 122, 248, .3); border-radius: 50%; background: #09080c; object-fit: cover; box-shadow: var(--glow-sm); }
.media-sticker { width: 180px; height: 180px; overflow: visible; background: transparent; }
.media-sticker img,
.media-sticker video { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .25)); }
.media-sticker .tgs-player { width: 100%; height: 100%; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .25)); }
.media-sticker .tgs-player svg { display: block; width: 100% !important; height: 100% !important; }
.media-voice { overflow: visible; background: transparent; }
.media-voice audio { display: block; width: min(320px, 64vw); height: 36px; color-scheme: dark; }
.media-fallback { display: none; align-items: center; justify-content: center; min-height: 50px; border: 1px dashed var(--line-strong); border-radius: 6px; padding: 12px; color: var(--accent-bright); font-size: 9px; }
.message-media.media-failed > :not(.media-fallback) { display: none; }
.message-media.media-failed .media-fallback { display: flex; }

.composer { display: grid; flex: 0 0 auto; gap: 9px; border-top: 1px solid var(--line); background: rgba(23, 22, 28, .5); padding: 13px 17px; }
.composer textarea { width: 100%; min-height: 68px; max-height: 180px; resize: vertical; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: rgba(13, 12, 18, .58); padding: 10px 11px; color: var(--text); font: inherit; font-size: 10.5px; line-height: 1.5; transition: border-color .18s ease, background .18s ease; }
.composer textarea:focus { border-color: var(--accent-line); background: rgba(20, 18, 25, .84); }
.composer textarea::placeholder { color: #716b78; }
.composer-actions { justify-content: space-between; }
.composer-actions small { color: #716b78; font-size: 8.5px; }

.ban-panel { display: grid; flex: 0 0 auto; gap: 8px; border-top: 1px solid var(--line); background: rgba(231, 125, 142, .025); padding: 10px 17px 12px; }
.ban-heading { color: #d98694; }
.ban-heading strong { color: inherit; font-size: 9px; font-weight: 500; }
.ban-actions { flex-wrap: wrap; }
.ban-actions button { border: 1px solid rgba(231, 125, 142, .16); border-radius: 6px; background: rgba(231, 125, 142, .055); padding: 6px 9px; color: #d98694; font: inherit; font-size: 8.5px; transition: .17s ease; }
.ban-actions button:hover { border-color: rgba(231, 125, 142, .34); background: rgba(231, 125, 142, .1); }

.ticket-empty { display: grid; justify-items: center; gap: 7px; padding: 44px 20px; color: #716b78; text-align: center; }
.ticket-empty .support-icon { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .02); color: #817b88; }
.ticket-empty strong { color: #aaa4b0; font-size: 10.5px; font-weight: 600; }
.ticket-empty span { max-width: 220px; font-size: 8.5px; line-height: 1.5; }

.support-toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; max-width: min(360px, calc(100vw - 32px)); border: 1px solid var(--accent-line); border-radius: 8px; background: rgba(30, 28, 36, .96); padding: 11px 13px; color: #e9e4ef; box-shadow: var(--shadow-float), var(--glow-sm); opacity: 0; transform: translateY(10px); pointer-events: none; font-size: 10px; transition: opacity .2s ease, transform .2s ease; }
.support-toast.show { opacity: 1; transform: translateY(0); }

.support-body .mobile-scrim { display: none; }

@media (max-width: 1120px) {
  .support-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-workspace { height: calc(100vh - 445px); min-height: 590px; grid-template-columns: minmax(285px, 330px) minmax(0, 1fr); }
  .support-page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
}

@media (max-width: 900px) {
  .support-workspace { height: auto; max-height: none; grid-template-columns: minmax(0, 1fr); }
  .ticket-column { max-height: 390px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ticket-detail { min-height: 650px; }
}

@media (max-width: 800px) {
  .support-body .support-sidebar.sidebar-open + .mobile-scrim { display: block; }
  .support-topbar .breadcrumb { margin-right: auto; margin-left: 14px; }
  .support-page-heading { padding-top: 10px; }
}

@media (max-width: 600px) {
  .support-stats { gap: 8px; }
  .support-stats > button { min-height: 96px; padding: 12px; }
  .support-stats b { font-size: 24px; }
  .support-workspace { border-radius: 8px; }
  .ticket-detail { min-height: 620px; }
  .detail-head { align-items: flex-start; flex-direction: column; }
  .detail-actions,
  .detail-actions .support-button { width: 100%; }
  .message { max-width: 90%; }
  .composer-actions { align-items: stretch; flex-direction: column; }
  .composer-actions .support-button { width: 100%; }
  .ban-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ban-actions button { width: 100%; }
  .media-video_note video { width: 190px; height: 190px; }
  .media-sticker { width: 150px; height: 150px; }
  .support-toast { right: 16px; bottom: 16px; }
}
