:root {
  --bg-main: #f5f7fb;
  --bg-panel: #ffffff;
  --bg-dark: #040a20;
  --bg-dark-panel: rgba(10, 20, 50, 0.7);
  --line: #e7edf5;
  --line-dark: rgba(32, 105, 224, 0.3);
  --text-main: #162033;
  --text-muted: #6f7b91;
  --text-light: #f8fbff;
  --primary: #2069e0;
  --primary-hover: #1656bf;
  --success: #24b47e;
  --danger: #e5484d;
  --warning: #ff8c42;
  --brand-font: "STXingkai", "STKaiti", "KaiTi", "FangSong", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: var(--bg-main);
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.login-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 96px;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-dark);
}

.circuit-pattern,
.tech-background,
.circuit-lines {
  position: absolute;
  inset: 0;
}

.circuit-pattern {
  background-image:
    radial-gradient(circle at 15% 30%, rgba(32, 105, 224, 0.22) 0%, transparent 22%),
    radial-gradient(circle at 85% 70%, rgba(32, 105, 224, 0.18) 0%, transparent 22%),
    linear-gradient(to right, rgba(32, 105, 224, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(32, 105, 224, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  animation: pulse 6s infinite alternate;
}

.tech-background .particle,
.circuit-lines .circuit-line {
  position: absolute;
  border-radius: 999px;
}

.tech-background .particle {
  width: 8px;
  height: 8px;
  background: rgba(92, 175, 255, 0.9);
  box-shadow: 0 0 18px rgba(92, 175, 255, 0.7);
  animation: float linear infinite;
}

.circuit-lines .circuit-line {
  height: 1px;
  background: linear-gradient(90deg, rgba(32, 105, 224, 0), rgba(32, 105, 224, 0.8), rgba(32, 105, 224, 0));
  animation: slide 14s linear infinite;
}

.sci-fi-title {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.hero-sheep {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.title-text {
  position: relative;
  display: block;
  color: #eef6ff;
  background: linear-gradient(180deg, #fff 15%, #96c8ff 55%, #1b68df 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 24px rgba(0, 100, 255, 0.45);
}

.title-text-cn {
  font-family: var(--brand-font);
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 4px;
}

.title-glow {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.92), transparent);
  filter: blur(4px);
}

.login-form-container,
.admin-login-card {
  position: relative;
  z-index: 2;
  width: min(420px, calc(100vw - 32px));
  padding: 40px;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: var(--bg-dark-panel);
  box-shadow: 0 24px 80px rgba(4, 10, 32, 0.45);
  backdrop-filter: blur(16px);
  color: var(--text-light);
}

.login-form-container {
  margin-top: 84px;
}

.login-title,
.admin-login-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  text-align: center;
}

.login-subtitle,
.admin-login-card p {
  margin: 0 0 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
}

.admin-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(32, 105, 224, 0.18), transparent 30%), var(--bg-dark);
}

.admin-logo {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
}

.admin-login-brand {
  font-family: var(--brand-font);
  text-align: center;
  font-size: 34px;
  margin-bottom: 8px;
}

.login-form,
.admin-login-form {
  display: grid;
  gap: 14px;
}

.form-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(32, 105, 224, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: rgba(32, 105, 224, 0.8);
  box-shadow: 0 0 0 4px rgba(32, 105, 224, 0.16);
}

textarea {
  resize: none;
}

.primary-button,
.header-ghost-button,
.sideband-item,
.tool-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: linear-gradient(90deg, #1a4a9f, #3a70d1);
  color: #fff;
  padding: 12px 16px;
  font-weight: 600;
}

.primary-button:hover {
  background: linear-gradient(90deg, #1750b3, #4481ea);
}

.header-ghost-button,
.sideband-item,
.tool-button {
  background: #eef3fb;
  color: var(--text-main);
  padding: 10px 14px;
}

.header-ghost-button:hover,
.sideband-item:hover,
.tool-button:hover {
  background: #dfe9f8;
}

.form-hint,
.login-footnote {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.login-footnote {
  margin-top: 18px;
  text-align: center;
}

.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.app-sideband {
  width: 150px;
  padding: 22px 16px;
  background: linear-gradient(180deg, #06112e 0%, #11224d 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sideband-brand,
.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 48px;
  height: 48px;
  flex: none;
}

.brand-title,
.admin-topbar-brand {
  font-family: var(--brand-font);
  font-size: 26px;
}

.brand-subtitle,
.admin-topbar-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.sideband-menu {
  display: grid;
  gap: 10px;
}

.sideband-item {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-decoration: none;
  text-align: center;
}

.sideband-item.is-active {
  background: rgba(255, 255, 255, 0.18);
}

.sideband-card-info {
  margin-top: auto;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.6;
}

.sideband-card-code {
  word-break: break-all;
  color: #fff;
}

.sideband-card-expire {
  color: rgba(255, 255, 255, 0.72);
}

.chat-inner-container {
  flex: 1;
  display: flex;
  background: var(--bg-main);
}

.chat-sider {
  width: 310px;
  border-right: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.contact-panel-header,
.panel-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.contact-panel-title,
.panel-head h2 {
  display: block;
  margin: 0 0 4px;
  font-size: 18px;
}

.contact-panel-tip,
.panel-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.contact-list,
.conversation-list {
  flex: 1;
  overflow: auto;
}

.contact-card,
.conversation-card {
  display: grid;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.contact-card.is-active,
.conversation-card.is-active {
  background: linear-gradient(90deg, rgba(32, 105, 224, 0.08), transparent);
}

.contact-card-title,
.conversation-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.contact-card-subtitle,
.conversation-card-subtitle {
  color: var(--text-muted);
  font-size: 13px;
}

.chat-layout,
.reply-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f7f9fd;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-header-avatar,
.avatar-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1a4a9f, #3a70d1);
  color: #fff;
  font-weight: 700;
}

.chat-header-name {
  font-size: 16px;
  font-weight: 600;
}

.ip-location {
  color: var(--text-muted);
  font-size: 13px;
}

.message-list,
.admin-message-list {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.message-row {
  display: flex;
  margin-bottom: 14px;
}

.message-row.mine {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(540px, 78%);
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(22, 32, 51, 0.06);
  line-height: 1.7;
  white-space: pre-wrap;
}

.message-row.mine .message-bubble {
  background: linear-gradient(180deg, #2d6ee5, #1f5dcc);
  color: #fff;
}

.message-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.input-container,
.admin-reply-box {
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.message-input,
.admin-reply-box textarea {
  flex: 1;
  min-height: 48px;
  max-height: 140px;
  background: #f5f8fd;
  color: var(--text-main);
}

.input-icons {
  display: flex;
  gap: 8px;
}

.tool-button {
  width: 40px;
  height: 40px;
  padding: 0;
}

.send-button {
  min-width: 96px;
}

.input-tip {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-shell {
  min-height: 100vh;
  background: #eef3fa;
  padding: 24px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  margin-bottom: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #06112e, #11224d);
  color: #fff;
}

.admin-topbar-actions {
  display: flex;
  gap: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card,
.admin-panel {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(17, 34, 77, 0.06);
}

.stat-card {
  padding: 18px;
}

.stat-card-label {
  color: var(--text-muted);
  font-size: 13px;
}

.stat-card-value {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 700;
}

.admin-grid {
  display: grid;
  grid-template-columns: 320px 1fr 420px;
  gap: 18px;
  min-height: calc(100vh - 210px);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-generator {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.generator-row {
  display: grid;
  gap: 6px;
}

.generator-row label {
  font-size: 13px;
  color: var(--text-muted);
}

.generator-row input,
.invite-link-input,
.admin-reply-box textarea {
  background: #f5f8fd;
  color: var(--text-main);
}

.invite-preview {
  margin: 0 20px 18px;
  padding: 16px;
  border-radius: 16px;
  background: #f5f8fd;
  display: grid;
  gap: 12px;
}

.invite-preview-head {
  font-size: 14px;
}

.invite-qr {
  width: 168px;
  height: 168px;
  justify-self: center;
  border-radius: 12px;
  background: #fff;
}

.invite-link-input {
  border: 1px solid var(--line);
}

.invite-preview-actions {
  display: flex;
  gap: 10px;
}

.text-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.cards-table-wrap {
  flex: 1;
  overflow: auto;
}

.cards-table {
  width: 100%;
  border-collapse: collapse;
}

.cards-table th,
.cards-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill.active {
  background: rgba(36, 180, 126, 0.14);
  color: var(--success);
}

.status-pill.expired {
  background: rgba(255, 140, 66, 0.16);
  color: var(--warning);
}

.status-pill.revoked {
  background: rgba(229, 72, 77, 0.14);
  color: var(--danger);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-button {
  border: 0;
  border-radius: 10px;
  background: #eef3fb;
  padding: 8px 10px;
  cursor: pointer;
}

@keyframes float {
  0% { transform: translateY(0) translateX(0); opacity: 0.9; }
  100% { transform: translateY(-42vh) translateX(24vw); opacity: 0; }
}

@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}

@keyframes pulse {
  0% { opacity: 0.55; }
  100% { opacity: 0.92; }
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .conversations-panel,
  .reply-panel,
  .cards-panel {
    min-height: 420px;
  }
}

@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }

  .app-sideband {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .chat-inner-container {
    flex-direction: column;
  }

  .chat-sider {
    width: 100%;
    min-height: 200px;
  }

  .title-text-cn {
    font-size: 58px;
    letter-spacing: 3px;
  }

  .login-container {
    padding-top: 64px;
  }

  .sci-fi-title {
    top: 34px;
  }

  .login-form-container {
    margin-top: 64px;
  }
}

@media (max-width: 640px) {
  .login-form-container,
  .admin-login-card {
    padding: 28px 20px;
  }

  .hero-sheep {
    width: 72px;
    height: 72px;
  }

  .title-text-cn {
    font-size: 42px;
  }

  .login-container {
    padding-top: 36px;
  }

  .sci-fi-title {
    top: 18px;
  }

  .login-form-container {
    margin-top: 48px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.support-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #eef3fa;
}

.support-sidebar {
  width: 240px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #06112e 0%, #11224d 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.support-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-card-meta {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1.6;
  font-size: 13px;
}

.support-card-code {
  word-break: break-all;
}

.support-card-expire {
  color: rgba(255, 255, 255, 0.72);
}

.support-nav {
  display: grid;
  gap: 10px;
}

.support-nav-item {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.support-nav-item.is-active,
.support-nav-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.support-day-count span {
  margin-left: 6px;
  font-weight: 700;
}

.support-main {
  flex: 1;
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.support-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(17, 34, 77, 0.06);
}

.support-topbar-title {
  font-size: 28px;
  font-family: var(--brand-font);
}

.support-topbar-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
}

.support-board {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
}

.support-conversation-panel,
.support-chat-panel {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(17, 34, 77, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-panel-head,
.support-chat-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.support-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-panel-head span,
.support-chat-subtitle {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.support-conversation-list,
.support-message-list {
  flex: 1;
  overflow: auto;
}

.support-conversation-item {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.support-conversation-item-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.support-conversation-avatar,
.support-message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  flex: none;
}

.support-conversation-content {
  min-width: 0;
  flex: 1;
}

.support-conversation-item.is-active {
  background: linear-gradient(90deg, rgba(32, 105, 224, 0.08), transparent);
}

.support-conversation-name {
  font-weight: 600;
}

.support-conversation-preview,
.support-conversation-time {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.support-message-list {
  padding: 20px;
  background: #f7f9fd;
}

.support-message-row {
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.support-message-row.mine {
  justify-content: flex-end;
}

.support-message-bubble {
  display: inline-block;
  max-width: min(540px, 78%);
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(22, 32, 51, 0.06);
  line-height: 1.7;
  white-space: pre-wrap;
}

.support-message-row.mine .support-message-bubble {
  background: linear-gradient(180deg, #2d6ee5, #1f5dcc);
  color: #fff;
}

.support-message-col {
  max-width: min(540px, 78%);
}

.support-message-sender {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.support-message-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.support-input-bar {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.support-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 0;
  background: #f7f9fd;
}

.support-quick-chip {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #e6f0ff;
  color: #1656bf;
  cursor: pointer;
}

.support-input-bar textarea {
  min-height: 56px;
  max-height: 140px;
  background: #f5f8fd;
  color: var(--text-main);
}

.support-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 44px;
  border-radius: 12px;
  background: #eef3fb;
  color: var(--text-main);
  cursor: pointer;
}

.support-empty {
  padding: 24px 20px;
  color: var(--text-muted);
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(6, 17, 46, 0.55);
  backdrop-filter: blur(6px);
}

.support-modal-card {
  position: relative;
  width: min(420px, calc(100vw - 24px));
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(6, 17, 46, 0.24);
}

.support-panel-card {
  position: relative;
  width: min(960px, calc(100vw - 24px));
  min-height: min(720px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(6, 17, 46, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.support-panel-body {
  flex: 1;
  overflow: auto;
  margin-top: 18px;
}

.support-panel-grid {
  display: grid;
  gap: 12px;
}

.support-panel-row {
  display: grid;
  gap: 8px;
}

.support-panel-row input,
.support-panel-row textarea {
  background: #f5f8fd;
  color: var(--text-main);
}

.support-panel-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.support-data-list {
  display: grid;
  gap: 10px;
}

.support-data-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.support-data-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.support-data-item-title {
  font-weight: 700;
}

.support-data-item-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.support-data-item-content {
  white-space: pre-wrap;
  line-height: 1.7;
}

.support-data-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.support-mini-button {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #eef3fb;
  cursor: pointer;
}

.support-record-table {
  width: 100%;
  border-collapse: collapse;
}

.support-record-table th,
.support-record-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.support-qr-image-inline {
  display: block;
  width: 280px;
  height: 280px;
  margin: 12px auto;
  background: #fff;
  border-radius: 16px;
}

.support-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.support-modal-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.support-modal-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.support-qr-image {
  display: block;
  width: 260px;
  height: 260px;
  margin: 20px auto 18px;
  border-radius: 16px;
  background: #fff;
}

.customer-shell {
  height: 100vh;
  overflow: hidden;
  background: #f5f5f7;
  display: grid;
  place-items: start center;
}

.customer-phone {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customer-header {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.customer-header-main {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 64px;
  padding: 0 8px;
}

.customer-header-icon {
  border: 0;
  background: transparent;
  font-size: 22px;
  color: #333;
}

.customer-header-center {
  text-align: center;
}

.customer-service-name {
  font-size: 22px;
  font-weight: 700;
}

.customer-service-host {
  margin-top: 2px;
  color: #888;
  font-size: 12px;
}

.customer-notice-bar {
  padding: 6px 12px;
  background: #ef4c43;
  color: #fff;
  text-align: center;
  font-size: 13px;
}

.customer-connected-tip {
  align-self: center;
  margin: 12px 0 8px;
  padding: 8px 22px;
  border-radius: 999px;
  background: #ededed;
  color: #999;
  font-size: 14px;
}

.customer-message-list {
  flex: 1;
  overflow: auto;
  padding: 8px 14px 0;
}

.customer-message-row {
  margin-bottom: 14px;
}

.customer-message-row.mine {
  text-align: right;
}

.customer-message-card {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 90%;
}

.customer-message-card.mine {
  max-width: 76%;
}

.customer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  flex: none;
}

.customer-message-name {
  margin-bottom: 6px;
  color: #9a9a9a;
  font-size: 13px;
}

.customer-message-name span {
  margin-left: 6px;
}

.customer-message-bubble {
  display: inline-block;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  color: #333;
  line-height: 1.7;
  text-align: left;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.customer-message-bubble.mine {
  background: #dff6ff;
}

.message-image {
  display: block;
  max-width: 220px;
  max-height: 280px;
  border-radius: 12px;
}

.customer-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #ececec;
}

.customer-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customer-tool-image,
.customer-tool-photo,
.customer-tool-video {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid;
}

.customer-tool-image {
  border-color: #3b82f6;
}

.customer-tool-photo {
  border-color: #65c146;
}

.customer-tool-video {
  border-color: #ff8c42;
}

.customer-tool-text {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #ff8c42;
  color: #ff8c42;
  font-size: 12px;
}

.customer-input-bar {
  display: flex;
  gap: 10px;
  padding: 10px 12px 14px;
  background: #fff;
  border-top: 1px solid #ececec;
}

.customer-input-bar input {
  background: #f4f4f4;
  color: #333;
  border-color: transparent;
  border-radius: 999px;
}

.customer-send-button {
  min-width: 72px;
  border: 0;
  border-radius: 999px;
  background: #ececec;
  color: #b0b0b0;
  font-weight: 700;
}

.customer-send-button:not(:disabled) {
  background: #2d6ee5;
  color: #fff;
}

@media (max-width: 960px) {
  .support-shell {
    flex-direction: column;
  }

  .support-sidebar {
    width: 100%;
  }

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