body.support-body {
  overflow: hidden;
}

body.support-body footer {
  display: none;
}

body.support-body main {
  width: 100%;
  max-width: 1260px;
  height: calc(100vh - 88px);
  padding: 0 1rem 2rem;
}

.support-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.support-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.support-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  overflow-y: auto;
}

.support-sidebar-action {
  width: 100%;
  margin-top: 0;
  min-height: 54px;
  border: 1px solid #86efac;
  border-radius: 18px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.support-sidebar-action:hover:not(:disabled) {
  transform: none;
  background: #c7f9d8;
  border-color: #4ade80;
  box-shadow: none;
}

.support-secondary-btn.support-sidebar-action:disabled {
  opacity: 1;
  background: #fff3db;
  border-color: #f3c98b;
  color: #8a5100;
}

.support-facts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.support-sidebar-card,
.support-chat-card,
.support-message,
.support-empty,
.support-inline-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(194, 204, 218, 0.88);
  box-shadow: none;
}

.support-sidebar-card,
.support-chat-card {
  border-radius: 24px;
}

.support-sidebar-card {
  padding: 1.05rem;
}

.support-details-menu {
  padding: 1.05rem;
}

.support-details-summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.support-details-summary::-webkit-details-marker {
  display: none;
}

.support-details-summary i {
  color: #64748b;
  font-size: 0.85rem;
  transition: transform 0.18s ease;
}

.support-details-menu[open] .support-details-summary i {
  transform: rotate(180deg);
}

.support-details-menu .support-facts-grid {
  margin-top: 0;
}

.support-ticket-card {
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(31, 142, 241, 0.12), transparent 72%),
    radial-gradient(220px 160px at 0% 100%, rgba(34, 197, 94, 0.12), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.support-fact-card {
  padding: 0.88rem 0.92rem;
}

.support-ticket-head,
.support-chat-header,
.support-message-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.support-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.68rem;
  border-radius: 999px;
  border: 1px solid #dbe3ef;
  color: #375175;
  background: #f8fbff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.support-ticket-card strong,
.support-chat-header h1 {
  color: #0f172a;
  letter-spacing: -0.04em;
}

.support-ticket-card strong {
  display: block;
  margin-top: 0.62rem;
  font-size: 1.16rem;
}

.support-fact-label {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-fact-card strong {
  display: block;
  margin-top: 0.38rem;
  color: #0f172a;
  font-size: 0.94rem;
  line-height: 1.35;
}

.support-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fff3db;
  color: #8a5100;
}

.support-status-chip.active {
  background: #e9f3ff;
  color: #0057b8;
}

.support-status-chip.done {
  background: #e9f9ef;
  color: #13653e;
}

.support-sidebar-copy,
.support-sidebar-card p,
.support-chat-header p,
.support-message-time {
  color: #64748b;
  line-height: 1.55;
}

.support-message-header {
  align-items: center;
}

.support-message-time {
  font-size: 0.72rem;
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

.support-sidebar-card h2 {
  margin: 0.52rem 0 0.38rem;
  color: #0f172a;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.support-sidebar-card label {
  display: block;
  margin: 0.78rem 0 0.38rem;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
}

.support-email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0.6rem;
  align-items: stretch;
}

.support-sidebar-card input,
.support-email-row input,
.support-form textarea {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 15px;
  background: #f8fafc;
  color: #0f172a;
}

.support-sidebar-card input,
.support-email-row input {
  min-height: 46px;
  padding: 0.75rem 0.85rem;
}

.support-form textarea {
  min-height: 48px;
  max-height: 124px;
  padding: 0.82rem 0.9rem;
  resize: none;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  line-height: 1.45;
}

.support-form textarea::-webkit-scrollbar {
  display: none;
}

.support-sidebar-card input:focus,
.support-email-row input:focus,
.support-form textarea:focus {
  outline: none;
  border-color: #7eb8ff;
  box-shadow: 0 0 0 4px rgba(31, 142, 241, 0.12);
  background: #ffffff;
}

.support-email-row .support-primary-btn {
  min-height: 46px;
  border-radius: 16px;
}

.support-primary-btn,
.support-secondary-btn {
  border: 0;
  border-radius: 15px;
  padding: 0.8rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.support-primary-btn {
  background: linear-gradient(135deg, #22c55e 0%, #1f8ef1 100%);
  color: #ffffff;
}

.support-secondary-btn {
  width: 100%;
  margin-top: 0.95rem;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #dbe3ef;
}

.support-primary-btn:hover,
.support-secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.support-primary-btn:disabled,
.support-secondary-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.support-chat-card {
  width: 100%;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f9fc 0%, #edf2f7 100%);
}

.support-chat-header {
  padding: 1.05rem 1.05rem 0.95rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(194, 204, 218, 0.88);
}

.support-chat-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1.08;
}

.support-chat-header > div {
  min-width: 0;
}

.support-connection {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.44rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.support-connection::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.support-connected {
  background: #e9f9ef;
  color: #13653e;
}

.support-connecting {
  background: #fff3db;
  color: #8a5100;
}

.support-disconnected {
  background: #fdecee;
  color: #a1272d;
}

.support-chat-surface {
  flex: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.support-messages {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding: 1rem 1.05rem 0;
}

.support-empty {
  padding: 1.15rem;
  border-radius: 18px;
  color: #64748b;
  text-align: center;
}

.support-message {
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  max-width: min(82%, 760px);
}

.support-message p {
  color: #0f172a;
  line-height: 1.65;
  white-space: pre-wrap;
}

.support-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.support-message-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  max-width: 100%;
  padding: 0.42rem 0.68rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.78rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.support-message-attachment:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.support-message strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.support-message-author {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.support-automatic-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: #fff1d6;
  color: #9a5d00;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.support-message.user {
  margin-left: auto;
  background: #e9f3ff;
  border-color: #bddaff;
}

.support-message.admin {
  background: #ffffff;
  border-color: #dbe3ef;
}

.support-message.system {
  background: #ffffff;
  border-color: #dbe3ef;
}

.support-inline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 18px;
  padding: 0.92rem 1rem;
}

.support-inline-copy {
  min-width: 0;
}

.support-inline-card strong {
  display: block;
  color: #0f172a;
  font-size: 0.94rem;
}

.support-email-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.8rem;
  max-width: min(82%, 760px);
  background: #ffffff;
  border-color: #dbe3ef;
}

.support-login-card {
  margin: 0 1.05rem 1rem;
  background:
    radial-gradient(280px 160px at 100% 0%, rgba(34, 197, 94, 0.1), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.support-login-card .support-primary-btn {
  min-width: 170px;
}

.support-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 0.7rem;
  margin-top: 0;
  align-items: end;
  padding: 1rem 1.05rem 1.05rem;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(194, 204, 218, 0.88);
}

.support-send-btn {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
}

.support-send-btn i {
  font-size: 1rem;
}

.support-messages::-webkit-scrollbar,
.support-form textarea::-webkit-scrollbar {
  width: 10px;
}

.support-messages::-webkit-scrollbar-thumb,
.support-form textarea::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.support-messages::-webkit-scrollbar-track,
.support-form textarea::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1024px) {
  .support-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
    height: auto;
  }

  body.support-body {
    overflow: auto;
  }

  body.support-body footer {
    display: block;
  }

  body.support-body main {
    height: auto;
  }

  .support-page {
    height: auto;
    overflow: visible;
  }

  .support-sidebar {
    overflow: visible;
  }

  .support-chat-card {
    min-height: 72vh;
    height: auto;
  }
}

@media (max-width: 720px) {
  body.support-body main {
    padding: 0 0.6rem 1.6rem;
  }

  .support-shell {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .support-sidebar-card,
  .support-chat-card {
    border-radius: 22px;
  }

  .support-ticket-head {
    flex-direction: column;
  }

  .support-message-header {
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
  }

  .support-inline-card,
  .support-email-card {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .support-details-menu {
    padding: 0.95rem 1rem;
  }

  .support-details-summary {
    display: flex;
  }

  .support-details-menu .support-facts-grid {
    margin-top: 0.85rem;
  }

  .support-email-row {
    grid-template-columns: 1fr;
  }

  .support-chat-header {
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 0.95rem 0.85rem;
  }

  .support-chat-header h1 {
    font-size: 1.28rem;
  }

  .support-connection {
    padding: 0.38rem 0.62rem;
    font-size: 0.72rem;
  }

  .support-messages {
    padding: 0.9rem 0.95rem 0;
  }

  .support-login-card {
    margin: 0 0.95rem 0.95rem;
  }

  .support-form {
    padding: 0.95rem;
  }

  .support-message {
    max-width: 100%;
  }
}
