﻿:root {
  --bg-0: #f6efe7;
  --bg-1: #ffe7d0;
  --bg-2: #d8ecff;
  --ink: #1f2328;
  --muted: #5a6572;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(31, 35, 40, 0.12);
  --primary: #1a6d5f;
  --primary-hover: #145448;
  --assistant: #f8f8fb;
  --user: #dff5ef;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, var(--bg-1) 0%, transparent 35%),
    radial-gradient(circle at 90% 20%, var(--bg-2) 0%, transparent 30%),
    linear-gradient(160deg, #fffdf9 0%, var(--bg-0) 100%);
}

.site-header {
  padding-top: 1.2rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.site-nav .nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.site-nav .nav-link:hover {
  color: var(--ink);
}

.page-wrap {
  padding: 1.5rem 0 1rem;
}

.chat-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(27, 40, 55, 0.12);
}

.chat-head h1 {
  margin: 0.25rem 0 0.5rem;
  font-weight: 800;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  color: #0f5f83;
  background: rgba(15, 95, 131, 0.09);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.text-muted {
  color: var(--muted) !important;
}

.chat-log {
  border: 1px solid var(--line);
  border-radius: 14px;
  height: 440px;
  overflow-y: auto;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.82);
  margin: 1rem 0 0.8rem;
}

.chat-item {
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  line-height: 1.65;
  border: 1px solid transparent;
  animation: rise-in 220ms ease;
}

.chat-item strong {
  font-size: 0.93rem;
}

.chat-item span {
  white-space: pre-wrap;
}

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

.typing-cursor {
  display: none;
  margin-left: 2px;
  color: #1a6d5f;
  font-weight: 700;
}

.chat-item.assistant.is-streaming .typing-cursor {
  display: inline-block;
  animation: blink-caret 0.9s steps(1, end) infinite;
}

@keyframes blink-caret {
  0%, 45% {
    opacity: 1;
  }

  46%, 100% {
    opacity: 0;
  }
}

.chat-item.user {
  background: var(--user);
  border-color: rgba(26, 109, 95, 0.2);
}

.chat-item.assistant {
  background: var(--assistant);
  border-color: rgba(39, 51, 65, 0.15);
}

@keyframes rise-in {
  from {
    transform: translateY(4px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#messageInput.form-control {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  resize: vertical;
}

#messageInput.form-control:focus {
  border-color: #49a996;
  box-shadow: 0 0 0 0.2rem rgba(73, 169, 150, 0.16);
}

#sendButton {
  min-width: 130px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #247f70);
  color: #fff;
  font-weight: 700;
  padding: 0.55rem 1rem;
}

#sendButton:hover,
#sendButton:focus {
  background: linear-gradient(135deg, var(--primary-hover), #1b6f62);
}

#sendButton:disabled {
  opacity: 0.86;
}

.confirm-actions {
  display: flex;
  gap: 0.6rem;
}

.usage-help {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.usage-help summary {
  cursor: pointer;
  user-select: none;
}

.usage-help-body {
  margin-top: 0.45rem;
  line-height: 1.6;
}

.mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mode-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.mode-actions {
  display: flex;
  gap: 0.5rem;
}

.mode-actions .btn.active {
  color: #fff;
  background-color: #1a6d5f;
  border-color: #1a6d5f;
}

.release-notes-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.release-note-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.8rem 0.9rem;
}

.release-note-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.release-note-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.dashboard-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 42px rgba(27, 40, 55, 0.12);
}

.dashboard-head h1 {
  margin: 0.2rem 0 0.4rem;
  font-weight: 800;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.9rem 0 1rem;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.65rem 0.7rem;
}

.summary-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.summary-value {
  margin-top: 0.2rem;
  font-weight: 800;
  font-size: 1rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.75rem;
  min-height: 320px;
}

.chart-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
}

.chart-card canvas {
  width: 100% !important;
  height: 250px !important;
}

.site-footer {
  padding: 1rem 0 1.25rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

@media (max-width: 768px) {
  .page-wrap {
    padding-top: 1rem;
  }

  .chat-shell {
    border-radius: 16px;
    padding: 0.95rem;
  }

  .chat-log {
    height: 56vh;
  }

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

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

  #sendButton {
    width: 100%;
  }
}

