.tuagpt-chat-wrap {
  max-width: 920px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
}

.tuagpt-chat-wrap .text-caption {
  color: rgba(255, 255, 255, 0.55);
}

.tuagpt-chat-status {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
}

.tuagpt-chat-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tuagpt-chat-toolbar-guest {
  justify-content: flex-end;
}

.tuagpt-chat-toolbar label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  margin-right: 8px;
}

.tuagpt-chat-toolbar select {
  min-width: 220px;
  background: #151515;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
}

.tuagpt-chat-wallet {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.tuagpt-chat-wallet strong {
  color: #fff;
}

.tuagpt-chat-log {
  min-height: 360px;
  max-height: 58vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tuagpt-chat-msg {
  max-width: 88%;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.94);
}

.tuagpt-chat-msg-user {
  align-self: flex-end;
  background: rgba(99, 102, 241, 0.22);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #f8fafc;
}

.tuagpt-chat-msg-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.94);
}

.tuagpt-chat-msg-system {
  align-self: center;
  max-width: 100%;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  border: none;
  text-align: center;
}

.tuagpt-chat-compose {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tuagpt-chat-compose textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  background: #121212;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.tuagpt-chat-compose textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.tuagpt-chat-compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.tuagpt-chat-hint {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

.tuagpt-chat-error {
  color: #fca5a5;
  font-size: 0.9rem;
  margin-top: 8px;
}

.tuagpt-chat-promo {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.55;
}

.tuagpt-chat-promo .link1 {
  color: rgba(255, 255, 255, 0.82);
}

.tuagpt-chat-promo-alt {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.42);
}

.tuagpt-chat-subscription {
  width: 100%;
}

.tuagpt-chat-subscription .license-plans-grid {
  --bs-gutter-x: 12px;
  --bs-gutter-y: 12px;
}

.tuagpt-chat-subscription .license-plans-grid > [class*="col-"] {
  display: flex;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

.tuagpt-chat-subscription .license-plan-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

.tuagpt-chat-subscription .license-plan-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.tuagpt-chat-subscription .license-plan-title-block,
.tuagpt-chat-subscription .license-plan-intro,
.tuagpt-chat-subscription .license-plan-footer {
  width: 100%;
  max-width: 100%;
}

.tuagpt-chat-subscription .license-plan-title {
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.tuagpt-chat-subscription .license-plan-card .content.license-plan-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.tuagpt-chat-subscription .license-plan-card .content.license-plan-body > * {
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
}

.tuagpt-chat-subscription .license-plan-intro .text {
  white-space: normal;
  line-height: 1.5;
}

.tuagpt-chat-subscription .license-plan-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.tuagpt-chat-subscription .license-plan-actions .tf-btn,
.tuagpt-chat-subscription .license-plan-actions .tf-btn-2 {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.tuagpt-chat-subscription .license-plan-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tuagpt-chat-subscription .license-plan-features {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tuagpt-chat-subscription .license-plan-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
}

.tuagpt-chat-subscription .license-plan-features li .icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.tuagpt-chat-subscription .license-plan-features li span {
  flex: 1 1 auto;
  min-width: 0;
}

.tuagpt-chat-loading {
  opacity: 0.85;
  font-style: italic;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 767px) {
  .tuagpt-chat-msg {
    max-width: 100%;
  }

  .tuagpt-chat-toolbar select {
    min-width: 100%;
  }
}
