.demo-page {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0f1419;
  color: #e8eaed;
  margin: 0;
  min-height: 100vh;
}

.demo-hero {
  padding: 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(160deg, #1a2f1f 0%, #0f1419 60%);
}

.demo-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7dcea0;
  border: 1px solid #3d5c45;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.demo-tagline { color: #9aa0a6; }
.demo-disclaimer {
  font-size: 0.85rem;
  color: #f4b183;
  max-width: 36rem;
  margin: 1rem auto 0;
}
.demo-disclaimer.small { font-size: 0.75rem; margin: 0.5rem 0 0; }

.demo-grid {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  max-width: 52rem;
  margin: 0 auto;
}
.demo-card {
  background: #1c2128;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid #30363d;
}
.demo-card.wide { grid-column: 1 / -1; }
.demo-btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.demo-btn.primary {
  background: #2ea043;
  color: #fff;
}
.demo-stats { list-style: none; padding: 0; }
.demo-stats li { margin: 0.5rem 0; }
.demo-scenarios { padding-left: 1.2rem; color: #c9d1d9; }
.demo-hint { font-size: 0.8rem; color: #8b949e; word-break: break-all; }
.demo-warn { color: #f85149; }
.demo-footer { text-align: center; padding: 2rem; }
.demo-footer a { color: #58a6ff; }

.demo-chat-layout { display: flex; flex-direction: column; max-width: 40rem; margin: 0 auto; }

.demo-chat-split { max-width: none; }
.demo-split-wrap {
  display: grid;
  grid-template-columns: 1fr min(22rem, 38vw);
  gap: 0;
  min-height: 100vh;
  max-width: 72rem;
  margin: 0 auto;
}
.demo-chat-main {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #30363d;
  min-width: 0;
}
.demo-manager-inbox {
  display: flex;
  flex-direction: column;
  background: #0d1117;
  min-height: 50vh;
}
.demo-inbox-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #30363d;
}
.demo-manager-inbox.channel-line .demo-inbox-header {
  background: linear-gradient(90deg, #06c755 0%, #00b900 100%);
  color: #fff;
}
.demo-manager-inbox.channel-telegram .demo-inbox-header {
  background: linear-gradient(90deg, #2aabee 0%, #229ed9 100%);
  color: #fff;
}
.demo-inbox-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.demo-inbox-sub { display: block; font-size: 0.7rem; opacity: 0.9; }
.demo-inbox-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}
.demo-inbox-placeholder {
  font-size: 0.85rem;
  color: #8b949e;
  line-height: 1.5;
}
.demo-inbox-meta {
  font-size: 0.72rem;
  color: #8b949e;
  margin-bottom: 0.5rem;
}
.demo-inbox-bubble {
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px 12px 12px 4px;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.demo-inbox-bubble pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
}
.demo-inbox-foot {
  font-size: 0.72rem;
  color: #f4b183;
  margin-top: 0.75rem;
}
@media (max-width: 768px) {
  .demo-split-wrap { grid-template-columns: 1fr; }
  .demo-manager-inbox { border-top: 1px solid #30363d; max-height: 45vh; }
  .demo-chat-main { border-right: none; }
}
.demo-chat-header { padding: 1rem 1rem 0; }
.demo-back { color: #58a6ff; font-size: 0.9rem; }
.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.75rem;
}
.demo-btn.small {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
}
.demo-btn.small:hover { background: #30363d; }
.demo-toast {
  font-size: 0.75rem;
  color: #7dcea0;
}
.demo-llm-badge {
  font-size: 0.72rem;
  color: #8b949e;
  margin: 0.35rem 0 0;
}
.demo-chat-log {
  flex: 1;
  min-height: 50vh;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.demo-msg {
  max-width: 90%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.demo-msg.user {
  align-self: flex-end;
  background: #238636;
}
.demo-msg.assistant {
  align-self: flex-start;
  background: #21262d;
  border: 1px solid #30363d;
}
.demo-chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid #30363d;
}
.demo-satisfaction {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 1rem;
  border-top: 1px solid #30363d;
  font-size: 0.85rem;
}
.demo-bar-row {
  display: grid;
  grid-template-columns: 5rem 1fr 2rem;
  gap: 0.5rem;
  align-items: center;
  margin: 0.4rem 0;
}
.demo-bar-track {
  background: #0d1117;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.demo-bar-fill {
  background: #2ea043;
  height: 100%;
}
.demo-bar-label, .demo-bar-num { font-size: 0.8rem; color: #8b949e; }
.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.demo-table th, .demo-table td {
  border-bottom: 1px solid #30363d;
  padding: 0.4rem;
  text-align: left;
}

.demo-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}
.demo-login-form input {
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e8eaed;
}

.demo-chat-form input {
  flex: 1;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e8eaed;
}
