:root {
  --bg: #14100c;
  --card: #1c1410;
  --border: rgba(255, 200, 120, 0.12);
  --accent: #f7954c;
  --text: #f5f0ea;
}

body {
  background: radial-gradient(circle at top, #2a1810 0%, var(--bg) 45%);
  color: var(--text);
  min-height: 100vh;
}

.support-header {
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.support-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.support-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.support-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.support-brand {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
}

.support-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
}

.support-status-dot.is-checking {
  background: rgba(255, 255, 255, 0.4);
}

.support-status-dot.is-ok {
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55);
  animation: support-status-ok 2.8s ease-out infinite;
}

.support-status-dot.is-bad {
  background: #ff5c6c;
  box-shadow: 0 0 0 0 rgba(255, 92, 108, 0.5);
  animation: support-status-bad 2.8s ease-out infinite;
}

@keyframes support-status-ok {
  0% {
    box-shadow:
      0 0 0 0 rgba(61, 220, 132, 0.55),
      0 0 0 0 rgba(61, 220, 132, 0.28);
  }
  28% {
    box-shadow:
      0 0 0 9px rgba(61, 220, 132, 0),
      0 0 0 3px rgba(61, 220, 132, 0.2);
  }
  48%,
  100% {
    box-shadow:
      0 0 0 14px rgba(61, 220, 132, 0),
      0 0 0 8px rgba(61, 220, 132, 0);
  }
}

@keyframes support-status-bad {
  0% {
    box-shadow:
      0 0 0 0 rgba(255, 92, 108, 0.55),
      0 0 0 0 rgba(255, 92, 108, 0.28);
  }
  28% {
    box-shadow:
      0 0 0 9px rgba(255, 92, 108, 0),
      0 0 0 3px rgba(255, 92, 108, 0.2);
  }
  48%,
  100% {
    box-shadow:
      0 0 0 14px rgba(255, 92, 108, 0),
      0 0 0 8px rgba(255, 92, 108, 0);
  }
}

.support-user-menu {
  background: #1c1410;
  border: 1px solid var(--border);
}

.support-user-menu .dropdown-item {
  color: var(--text);
  font-size: 0.9rem;
}

.support-user-menu .dropdown-item:hover,
.support-user-menu .dropdown-item:focus {
  background: rgba(247, 149, 76, 0.12);
  color: var(--accent);
}

.support-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.support-pill {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.support-pill.online { background: rgba(40, 167, 69, 0.25); color: #b8f0c8; }
.support-pill.partial { background: rgba(255, 193, 7, 0.2); color: #ffe08a; }
.support-pill.offline,
.support-pill.degraded { background: rgba(220, 53, 69, 0.25); color: #ffb3b8; }

.support-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.15rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}

.support-lang-btn:hover,
.support-lang-btn:focus,
.support-lang-btn:active,
.support-lang-btn.show {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
  outline: none;
}

.support-lang-btn::after {
  margin-left: 0.2rem;
  opacity: 0.7;
}

.support-lang-menu {
  background: #1c1410;
  border: 1px solid var(--border);
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.support-lang-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.support-lang-menu .dropdown-item {
  color: var(--text);
  font-size: 0.9rem;
}

.support-lang-menu .dropdown-item:hover,
.support-lang-menu .dropdown-item:focus {
  background: rgba(247, 149, 76, 0.12);
  color: var(--accent);
}

.support-lang-menu .dropdown-item.active {
  background: rgba(247, 149, 76, 0.18);
  color: var(--accent);
}


.support-auth-hint {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(247, 149, 76, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  line-height: 1.45;
}

.support-auth-hint__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-auth-hint__link:hover {
  color: #ffb06e;
}

.support-examples li {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 200, 120, 0.08);
}

.support-examples li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.support-examples__q {
  display: block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.support-examples__a {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  line-height: 1.4;
}

.support-banner {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(247, 149, 76, 0.08);
  font-size: 0.9rem;
}

.support-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.support-promo {
  border-color: rgba(247, 149, 76, 0.35);
  background: linear-gradient(135deg, rgba(247, 149, 76, 0.08), rgba(0, 0, 0, 0.2));
}

.support-accordion .accordion-item {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.support-accordion .accordion-button {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: none;
  font-size: 0.95rem;
}

.support-accordion .accordion-button:not(.collapsed) {
  background: rgba(247, 149, 76, 0.1);
  color: var(--accent);
}

.support-accordion .accordion-button::after {
  filter: invert(1);
}

.support-accordion .accordion-body {
  background: rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.75);
}

.support-chat {
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.support-chat-head {
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.support-chat-scroll {
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 149, 76, 0.45) transparent;
}

.support-chat-scroll::-webkit-scrollbar {
  width: 8px;
}

.support-chat-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.support-chat-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(247, 149, 76, 0.55) 0%,
    rgba(247, 149, 76, 0.28) 100%
  );
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.support-chat-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(247, 149, 76, 0.8) 0%,
    rgba(247, 149, 76, 0.45) 100%
  );
  background-clip: padding-box;
}

.msg {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  white-space: normal;
  line-height: 1.45;
  font-size: 0.92rem;
}

.msg.user { background: rgba(247, 149, 76, 0.12); white-space: pre-wrap; }
.msg.assistant { background: rgba(255, 255, 255, 0.04); line-height: 1.45; }

.msg.assistant strong { color: var(--accent); font-weight: 600; }

.msg-votes {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.55rem;
  opacity: 0.75;
}

.msg-vote {
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.2;
}

.msg-vote:hover { border-color: var(--accent); opacity: 1; }
.msg-vote.is-active { border-color: var(--accent); background: rgba(247, 149, 76, 0.15); opacity: 1; }

.msg--typing {
  opacity: 0.85;
  font-style: italic;
}

.support-typing-dots {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
  margin-right: 4px;
}

.support-typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(247, 149, 76, 0.85);
  animation: support-dot 1.2s infinite ease-in-out;
}

.support-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.support-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes support-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

#chatStatusText {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

#chatStatusText.is-busy {
  color: var(--accent);
}

#clearChatBtn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.support-input,
.form-select.support-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text);
}

.support-input:focus,
.form-select.support-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(247, 149, 76, 0.45);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(247, 149, 76, 0.12);
}

.form-select.support-input option {
  background: #1c1410;
  color: var(--text);
}

.support-composer {
  border-top: 1px solid var(--border);
}

#ticketFeedback.ok { color: #7dcea0; }
#ticketFeedback.err { color: #ff8a8a; }

.support-report-profile__status--new { background: rgba(255, 193, 7, 0.25); color: #ffe08a; }
.support-report-profile__status--read { background: rgba(13, 202, 240, 0.2); color: #9eeaf9; }
.support-report-profile__status--closed { background: rgba(108, 117, 125, 0.35); color: #dee2e6; }

@media (max-width: 991px) {
  .support-chat-scroll { max-height: 280px; }
  .support-chat--tall .support-chat-scroll { max-height: 320px; min-height: 240px; }
  .support-caps { grid-template-columns: 1fr; }

  .support-header-bar {
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  .support-header-brand {
    min-width: 0;
    flex-shrink: 1;
  }

  .support-header-brand .support-sub {
    display: none;
  }

  .support-header-actions {
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: 0.35rem;
  }

  .support-nav-label {
    display: none;
  }

  .support-page-nav__link {
    padding: 0.35rem 0.55rem;
    gap: 0;
  }

  .support-auth-btn {
    gap: 0;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .support-auth-btn.dropdown-toggle::after {
    margin-left: 0.35rem;
  }
}

.support-page-nav {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.support-page-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.support-page-nav__link:hover { color: var(--accent); }

.support-page-nav__link.is-active {
  background: rgba(247, 149, 76, 0.2);
  color: var(--accent);
}

.support-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55);
  animation: support-pulse 1.8s infinite;
}

@keyframes support-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

.support-ai-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  background: rgba(247, 149, 76, 0.2);
  color: var(--accent);
  vertical-align: middle;
}

.support-caps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.support-caps__item {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}

.support-caps__item i {
  color: var(--accent);
  margin-right: 0.25rem;
}

.support-tip {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed rgba(247, 149, 76, 0.35);
  background: rgba(247, 149, 76, 0.06);
  color: rgba(255, 255, 255, 0.75);
}

.support-checklist__item {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.75);
}

.support-checklist__item--warn { color: #ffb3b8; }

.support-chat--tall .support-chat-scroll {
  max-height: 480px;
  min-height: 360px;
}

.support-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.ai-chip {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

.support-side-fab {
  display: none;
}

.support-offcanvas.offcanvas,
.support-offcanvas.offcanvas-lg {
  background: #14100c;
  color: var(--text);
  border-left: 1px solid var(--border);
}

.support-offcanvas .offcanvas-header {
  background: rgba(0, 0, 0, 0.35);
}

.support-offcanvas .offcanvas-body {
  background: transparent;
}

@media (min-width: 992px) {
  .support-side-fab {
    display: none !important;
  }

  .support-offcanvas.offcanvas-lg {
    position: static;
    visibility: visible !important;
    transform: none !important;
    z-index: auto;
    height: auto;
    max-width: none;
    background: transparent;
    border: 0;
  }

  .support-offcanvas .offcanvas-body {
    overflow: visible;
  }

  .support-offcanvas .support-card {
    border-radius: 16px;
    border: 1px solid var(--border);
  }
}

@media (max-width: 991.98px) {
  .support-side-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 0;
    top: 28vh;
    z-index: 1030;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(247, 149, 76, 0.45);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: linear-gradient(270deg, rgba(60, 32, 16, 0.98) 0%, rgba(36, 22, 12, 0.98) 100%);
    color: var(--accent);
    box-shadow: -2px 0 14px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: filter 0.2s ease, color 0.2s ease;
  }

  .support-side-fab:hover,
  .support-side-fab:focus {
    filter: brightness(1.12);
    color: #ffc078;
    outline: none;
  }

  .support-side-fab i {
    font-size: 1.15rem;
    line-height: 1;
  }

  .support-offcanvas .support-card {
    background: transparent;
  }

  .support-chat--tall .support-chat-scroll {
    max-height: min(62vh, 480px);
    min-height: 280px;
  }
}
