.xs-support-fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(15, 29, 54, 0.95), rgba(37, 99, 235, 0.88));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #F8FAFC;
  border: 1px solid rgba(59, 130, 246, 0.55);
  border-radius: 999px;
  padding: 11px 18px;
  min-height: 46px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.55);
  cursor: pointer;
}
@media (max-width: 860px) {
  .xs-support-fab { bottom: calc(78px + env(safe-area-inset-bottom)); right: 16px; }
}
.xs-support-panel {
  position: fixed;
  right: 20px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 960;
  width: min(380px, calc(100vw - 24px));
  height: 510px;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: rgba(7, 15, 30, 0.96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(59, 130, 246, 0.42);
  border-radius: 20px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  color: #F8FAFC;
}
@media (max-width: 860px) {
  .xs-support-panel { bottom: calc(134px + env(safe-area-inset-bottom)); right: 12px; }
}
.xs-support-panel[hidden] { display: none !important; }
.xs-support-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(15, 29, 54, 0.92), rgba(30, 58, 138, 0.65));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.xs-support-head-brand { display: flex; align-items: center; gap: 10px; }
.xs-support-sub { font-size: 0.76rem; color: #22D3EE; font-weight: 600; }
.xs-support-x { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1; min-width: 36px; min-height: 36px; }
.xs-support-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.xs-msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 0.88rem; line-height: 1.4; }
.xs-msg-meta { font-size: 0.7rem; opacity: 0.75; margin-bottom: 2px; }
.xs-msg-user { align-self: flex-end; background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; font-weight: 500; }
.xs-msg-bot, .xs-msg-employee { align-self: flex-start; background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(148, 163, 184, 0.14); color: #F8FAFC; }
.xs-msg-system { align-self: center; background: rgba(251, 191, 36, 0.14); color: #FBBF24; font-size: 0.78rem; text-align: center; }
.xs-support-chips {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12); max-height: 114px; overflow-y: auto;
}
.xs-chip {
  background: rgba(30, 41, 59, 0.78); color: #F8FAFC;
  border: 1px solid rgba(59, 130, 246, 0.35); border-radius: 999px;
  padding: 6px 11px; font-size: 0.76rem; cursor: pointer; text-align: left;
}
.xs-chip:hover { background: rgba(59, 130, 246, 0.25); }
.xs-chip-ok { border-color: #10B981; color: #6EE7B7; }
.xs-chip-warn { border-color: #FBBF24; color: #FBBF24; font-weight: 700; }
.xs-support-feedback {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 7px 10px; background: rgba(15, 29, 54, 0.75); font-size: 0.78rem;
}
.xs-support-feedback[hidden] { display: none !important; }
.xs-support-form {
  display: flex; gap: 6px; padding: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14); background: rgba(4, 12, 24, 0.94);
}
.xs-support-form input {
  flex: 1; padding: 8px 10px !important; border-radius: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important; background: rgba(15, 23, 42, 0.85) !important; color: #fff !important;
}
.xs-support-form button {
  padding: 8px 14px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; font-weight: 700; cursor: pointer;
}

/* Employee Support Desk */
.support-desk { display: grid; grid-template-columns: 310px 1fr; gap: 16px; min-height: 540px; }
@media (max-width: 860px) { .support-desk { grid-template-columns: 1fr; } }
.desk-sidebar {
  background: rgba(13, 23, 42, 0.74); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 14px;
}
.desk-section h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #22D3EE; margin-bottom: 8px; }
.ticket-card {
  display: block; padding: 11px; border-radius: 14px; margin-bottom: 6px;
  background: rgba(4, 12, 24, 0.52); border: 1px solid rgba(148, 163, 184, 0.12);
  text-decoration: none; color: inherit;
}
.ticket-card.active, .ticket-card:hover { border-color: #3B82F6; background: rgba(59, 130, 246, 0.16); }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 4px; }
.ticket-preview { font-size: 0.8rem; opacity: 0.78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-priority { background: rgba(251, 191, 36, 0.18); color: #FBBF24; border: 1px solid rgba(251, 191, 36, 0.45); border-radius: 999px; padding: 2px 8px; font-size: 0.72rem; font-weight: 700; }
.badge-free, .badge-status { background: rgba(148, 163, 184, 0.16); color: #CBD5E1; border-radius: 999px; padding: 2px 8px; font-size: 0.72rem; }
.desk-main {
  background: rgba(13, 23, 42, 0.74); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden;
}
.desk-chat-head {
  padding: 14px 16px; border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.desk-actions { display: flex; gap: 8px; }
.desk-transcript { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; max-height: 430px; }
.chat-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; }
.chat-meta { font-size: 0.72rem; opacity: 0.75; margin-bottom: 3px; }
.msg-me { align-self: flex-end; background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff; }
.msg-them { align-self: flex-start; background: rgba(30, 41, 59, 0.85); }
.msg-sys { align-self: center; background: rgba(251, 191, 36, 0.15); color: #FBBF24; font-size: 0.8rem; }
.desk-reply { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(148, 163, 184, 0.14); }
.desk-reply input { flex: 1; }
.desk-banner, .empty-desk { padding: 20px; text-align: center; opacity: 0.85; }
