.gpt-chat-page .gpt-sessions {
  max-height: 70vh;
  overflow-y: auto;
}

.gpt-chat-page .gpt-messages {
  min-height: 48vh;
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.gpt-chat-page .gpt-msg {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.75rem;
  max-width: 92%;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
}

.gpt-chat-page .gpt-msg-user {
  margin-left: auto;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.gpt-chat-page .gpt-msg-assistant {
  margin-right: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.gpt-chat-page .gpt-msg-pending {
  opacity: 0.95;
}

.gpt-chat-page .gpt-msg-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.3rem;
}

.gpt-chat-page .gpt-msg-content {
  white-space: pre-wrap;
}

.gpt-chat-page .gpt-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
}

.gpt-chat-page .gpt-typing-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  border-top-color: transparent;
  animation: gpt-chat-spin 0.75s linear infinite;
}

@keyframes gpt-chat-spin {
  to {
    transform: rotate(360deg);
  }
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content {
  white-space: normal;
  line-height: 1.5;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content h1,
.gpt-chat-page .gpt-msg-assistant .gpt-msg-content h2,
.gpt-chat-page .gpt-msg-assistant .gpt-msg-content h3,
.gpt-chat-page .gpt-msg-assistant .gpt-msg-content h4 {
  margin: 0.65rem 0 0.45rem;
  line-height: 1.25;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content p {
  margin: 0.45rem 0;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content ul,
.gpt-chat-page .gpt-msg-assistant .gpt-msg-content ol {
  margin: 0.4rem 0 0.55rem 1.2rem;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content blockquote {
  margin: 0.6rem 0;
  padding: 0.4rem 0.65rem;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
  color: #334155;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content code {
  background: #e2e8f0;
  border-radius: 4px;
  padding: 0.08rem 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  overflow-x: auto;
  margin: 0.6rem 0;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.65rem 0;
  font-size: 0.92rem;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content th,
.gpt-chat-page .gpt-msg-assistant .gpt-msg-content td {
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.gpt-chat-page .gpt-msg-assistant .gpt-msg-content th {
  background: #f1f5f9;
}

.gpt-chat-page .gpt-input-wrap {
  min-width: 0;
}

.gpt-chat-page .gpt-md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.gpt-chat-page .gpt-md-toolbar .btn {
  min-width: 2rem;
  line-height: 1;
  padding: 0.32rem 0.5rem;
}

.gpt-chat-page #billingStatusInfo {
  display: inline-block;
  margin-top: 0.18rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.gpt-chat-page .gpt-balance-high {
  color: #15803d !important;
}

.gpt-chat-page .gpt-balance-normal {
  color: #334155 !important;
}

.gpt-chat-page .gpt-balance-low {
  color: #ca8a04 !important;
}

.gpt-chat-page .gpt-balance-critical {
  color: #dc2626 !important;
}

.gpt-chat-page .gpt-balance-own-token {
  color: #0369a1 !important;
}

/* GPT Chat home page */
.gpt-chat-home .gpt-home-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #7c3aed 100%);
  color: #fff;
  border-radius: 1.25rem;
  padding: 3.5rem 2rem;
}

.gpt-chat-home .gpt-home-hero .hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2rem;
  padding: 0.25rem 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.gpt-chat-home .gpt-home-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}

.gpt-chat-home .gpt-home-hero .lead {
  font-size: 1.15rem;
  opacity: 0.88;
  max-width: 600px;
}

.gpt-chat-home .gpt-home-hero .btn-hero {
  padding: 0.75rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.gpt-chat-home .gpt-home-hero .btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.gpt-chat-home .gpt-home-hero .hero-preview {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  padding: 1.25rem;
  font-size: 0.88rem;
}

.gpt-chat-home .gpt-home-hero .hero-preview .msg {
  border-radius: 0.6rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.gpt-chat-home .gpt-home-hero .hero-preview .msg-user {
  background: rgba(255, 255, 255, 0.18);
  margin-left: auto;
  max-width: 85%;
  text-align: right;
}

.gpt-chat-home .gpt-home-hero .hero-preview .msg-ai {
  background: rgba(255, 255, 255, 0.08);
  max-width: 90%;
}

.gpt-chat-home .gpt-home-preview-note {
  opacity: 0.5;
  font-size: 0.75rem;
}

.gpt-chat-home .gpt-feature-card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.07);
  transition: transform 0.18s, box-shadow 0.18s;
}

.gpt-chat-home .gpt-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.13);
}

.gpt-chat-home .gpt-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.gpt-chat-home .icon-blue {
  background: #dbeafe;
}

.gpt-chat-home .icon-purple {
  background: #ede9fe;
}

.gpt-chat-home .icon-green {
  background: #dcfce7;
}

.gpt-chat-home .icon-orange {
  background: #ffedd5;
}

.gpt-chat-home .icon-pink {
  background: #fce7f3;
}

.gpt-chat-home .icon-teal {
  background: #ccfbf1;
}

.gpt-chat-home .gpt-how-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.gpt-chat-home .gpt-how-step:last-child {
  border-bottom: none;
}

.gpt-chat-home .gpt-step-num {
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpt-chat-home .gpt-rag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 2rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.gpt-chat-home .gpt-providers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gpt-chat-home .gpt-provider-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
}

.gpt-chat-home .gpt-cta {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  border-radius: 1.25rem;
  color: #fff;
}

.gpt-chat-home .gpt-home-cta-lead {
  opacity: 0.85;
}

.gpt-chat-home .text-purple {
  color: #7c3aed;
}
