html,
body,
#root {
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial,
    sans-serif;
  letter-spacing: 0;
}

.app-root {
  min-height: 100vh;
}

.app-sider {
  min-height: 100vh;
}

.app-menu {
  padding: 8px 6px;
}

.sider-footer {
  margin-top: auto;
  padding: 12px;
}

.app-main {
  min-width: 0;
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 16px 0 24px;
}

.app-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-avatar {
  font-weight: 800;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.app-content {
  min-height: calc(100vh - 60px);
  padding: 24px;
}

.hero-card {
  min-height: 118px;
  margin-bottom: 16px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(122, 0, 0, 0.94), rgba(122, 0, 0, 0.72)),
    radial-gradient(circle at 78% 42%, rgba(255, 224, 138, 0.45), transparent 24%),
    #850000;
}

.hero-card .n-card__content {
  min-height: 118px;
}

.hero-content {
  display: grid;
  align-content: center;
  max-width: 720px;
  min-height: 86px;
  gap: 8px;
}

.hero-content h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.hero-content p {
  margin: 0;
  line-height: 1.7;
}

.dashboard-grid {
  margin-top: 16px;
}

.chat-card {
  min-height: 560px;
}

.chat-card .n-card__content {
  padding: 0;
}

.messages-viewport {
  height: 442px;
  padding: 8px 16px;
  overflow-y: auto;
}

.empty-wrap {
  display: grid;
  min-height: 420px;
  place-items: center;
}

.message-item {
  padding: 14px 0;
}

.message-item.own .n-thing {
  flex-direction: row-reverse;
}

.message-item.own .n-thing-main {
  text-align: right;
}

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

.message-text {
  display: inline-block;
  max-width: min(680px, 100%);
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.7;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.theme-dark .message-text {
  background: rgba(255, 255, 255, 0.08);
}

.theme-light .message-text {
  background: #f4f7fb;
}

.message-item.own .message-text {
  color: #fff;
  background: #3b82f6;
}

.login-card {
  width: min(92vw, 460px);
}

.login-alert,
.login-form,
.login-actions {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .app-header {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    padding: 12px;
  }

  .app-content {
    padding: 12px;
  }

  .app-sider {
    display: none;
  }

  .brand-title {
    font-size: 16px;
  }

  .hero-content h2 {
    font-size: 20px;
  }

  .messages-viewport {
    height: 390px;
  }
}
