:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --sidebar: #f0f1f4;
  --panel: #ffffff;
  --ink: #171923;
  --muted: #737987;
  --line: #e5e7eb;
  --hover: #e8eaee;
  --green: #18a37f;
  --green-dark: #108467;
  --shadow: 0 18px 60px rgba(28, 35, 48, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-button:single-button,
::-webkit-scrollbar-button:vertical:start:decrement,
::-webkit-scrollbar-button:vertical:end:increment,
::-webkit-scrollbar-button:horizontal:start:decrement,
::-webkit-scrollbar-button:horizontal:end:increment {
  display: none;
  width: 0;
  height: 0;
}

.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px;
  background: var(--sidebar);
  border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.sidebar-backdrop {
  display: none;
}

.side-top {
  display: grid;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #25c49a, #0f7f67);
  color: #fff;
  font-weight: 900;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.new-chat,
.history button,
.nav-button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  color: #2a2f3a;
  text-align: left;
}

.new-chat {
  padding: 0 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(30, 35, 45, 0.06);
  font-weight: 700;
}

.history button {
  padding: 0 12px;
  background: transparent;
}

.history button:hover {
  background: var(--hover);
}

.history {
  display: block;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
}

.history::-webkit-scrollbar {
  display: none;
}

#historyList {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: visible;
}

.history p {
  margin: 8px 10px 6px;
  color: #969ca8;
  font-size: 12px;
}

.history-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  min-height: 42px;
  border-radius: 12px;
}

.history-row:hover,
.history-row.active-history {
  background: var(--hover);
}

.history-row.active-history {
  background: #fff;
  box-shadow: 0 6px 18px rgba(28, 35, 48, 0.05);
}

.history-title,
.history-menu-button {
  min-height: 42px;
  border: 0;
  background: transparent;
}

.history-title {
  color: #565d6c;
  font-size: 14px;
  min-width: 0;
  max-width: 100%;
  padding: 0 4px 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.history-menu-button {
  display: grid;
  place-items: center;
  color: #9aa0aa;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
}

.history-row:hover .history-menu-button,
.history-row.active-history .history-menu-button {
  opacity: 1;
}

.history-row.active-history .history-title {
  color: #171923;
  font-weight: 700;
}

.history-popover {
  position: fixed;
  z-index: 25;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 40px rgba(28, 35, 48, 0.16);
}

.history-popover button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #3f4654;
  padding: 0 10px;
  text-align: left;
}

.history-popover button:hover {
  background: #f0f2f5;
}

.history-popover button:disabled {
  color: #b0b5bf;
  cursor: not-allowed;
}

.main {
  position: relative;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto;
  height: 100vh;
  min-width: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(24, 163, 127, 0.08), transparent 28%),
    var(--bg);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.menu-button,
.login-button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #424857;
}

.menu-button {
  display: none;
  width: 36px;
  font-size: 19px;
}

.model-picker {
  position: relative;
}

.model-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #424857;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(28, 35, 48, 0.05);
}

.model-trigger span {
  color: #8a91a0;
  font-size: 12px;
}

.model-trigger strong {
  color: #303746;
  font-size: 14px;
}

.model-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #7d8492;
  border-bottom: 1.5px solid #7d8492;
  transform: rotate(45deg) translateY(-2px);
}

.model-menu {
  position: fixed;
  z-index: 20;
  display: grid;
  width: 280px;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(28, 35, 48, 0.16);
  backdrop-filter: blur(18px);
}

.model-menu[hidden] {
  display: none;
}

.model-menu button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
}

.model-menu button:hover,
.model-menu button.active {
  background: #eefaf6;
}

.model-menu strong {
  color: #222936;
  font-size: 14px;
}

.model-menu span {
  color: #818895;
  font-size: 12px;
  line-height: 1.35;
}

.login-button {
  padding: 0 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(28, 35, 48, 0.06);
}

.login-button.logged-in {
  background: #e9f8f3;
  color: var(--green-dark);
  font-weight: 800;
}

.conversation {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 72px max(24px, calc((100% - 800px) / 2)) 82px;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.conversation.is-scrolling {
  scrollbar-color: rgba(105, 113, 130, 0.28) transparent;
}

.conversation::-webkit-scrollbar {
  width: 8px;
}

.conversation::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.conversation::-webkit-scrollbar-track {
  background: transparent;
}

.conversation::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  background-clip: padding-box;
}

.conversation.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(105, 113, 130, 0.24);
  background-clip: padding-box;
}

.conversation::-webkit-scrollbar-thumb:hover {
  background: rgba(105, 113, 130, 0.38);
  background-clip: padding-box;
}

.welcome {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: auto 0;
  text-align: center;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(16, 132, 103, 0.22);
  font-size: 26px;
}

.welcome h1 {
  margin: 8px 0 0;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: 0;
}

.welcome p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.message {
  display: grid;
  gap: 7px;
}

.message.user {
  justify-items: end;
}

.role {
  color: #9aa0aa;
  font-size: 12px;
  font-weight: 700;
}

.bubble {
  max-width: min(680px, 92%);
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(28, 35, 48, 0.06);
  line-height: 1.75;
  white-space: pre-wrap;
}

.markdown-body {
  white-space: normal;
}

.markdown-body h3,
.markdown-body h4,
.markdown-body h5 {
  margin: 18px 0 8px;
  color: #111827;
  line-height: 1.35;
}

.markdown-body h3 {
  font-size: 17px;
}

.markdown-body h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.markdown-body h5 {
  font-size: 15px;
}

.markdown-body p {
  margin: 8px 0;
}

.markdown-body p:first-child,
.markdown-body h3:first-child,
.markdown-body h4:first-child,
.markdown-body h5:first-child {
  margin-top: 0;
}

.markdown-body p:last-child,
.markdown-body ul:last-child,
.markdown-body pre:last-child {
  margin-bottom: 0;
}

.markdown-body ul {
  margin: 8px 0;
  padding-left: 20px;
}

.markdown-body li {
  margin: 5px 0;
}

.markdown-body strong {
  color: #101722;
  font-weight: 800;
}

.markdown-body .subheading {
  margin: 14px 0 6px;
  color: #101722;
  font-weight: 800;
}

.markdown-body a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(16, 132, 103, 0.28);
}

.markdown-body a:hover {
  color: var(--green);
  border-bottom-color: currentColor;
}

.markdown-body code {
  border-radius: 6px;
  background: #f0f2f5;
  padding: 2px 5px;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.92em;
}

.markdown-body pre {
  overflow: auto;
  margin: 10px 0;
  border-radius: 12px;
  background: #f5f6f8;
  padding: 12px;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid #e8eaee;
  border-radius: 14px;
  background: #fff;
}

.markdown-body table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 14px;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f3;
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: #f7f8fa;
  color: #3f4654;
  font-weight: 800;
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.markdown-body td:first-child {
  color: #596170;
  font-weight: 700;
  white-space: nowrap;
}

.math-block {
  margin: 10px 0;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 11px 13px;
  color: #253044;
  font-weight: 800;
  line-height: 1.7;
}

.math-inline {
  display: inline-block;
  border-radius: 7px;
  background: #f1f5f9;
  padding: 1px 6px;
  color: #253044;
  font-weight: 700;
}

.bullet-line {
  position: relative;
  padding-left: 18px;
}

.bullet-line::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.82em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}


.message.user .bubble {
  background: #e7f7f2;
}

.message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.message-image {
  width: 112px;
  height: 112px;
  overflow: hidden;
  border: 1px solid rgba(15, 122, 95, 0.18);
  border-radius: 14px;
  background: #fff;
  padding: 0;
}

.message-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.76);
  backdrop-filter: blur(10px);
  padding: 32px;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer img {
  max-width: min(92vw, 1080px);
  max-height: 86vh;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
}

#closeImageViewer {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
}

.message.assistant .bubble.markdown-body {
  width: min(720px, 96%);
  max-width: min(720px, 96%);
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.message.assistant .bubble.markdown-body.streaming {
  max-width: min(680px, 92%);
  width: auto;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.thinking-bubble {
  width: fit-content;
  min-width: 0;
  padding: 6px 0;
  background: transparent;
  box-shadow: none;
  color: #727b8b;
}

.thinking {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.thinking i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.28;
  animation: thinkingPulse 1.1s infinite ease-in-out;
}

.thinking i:nth-child(2) {
  animation-delay: 0.14s;
}

.thinking i:nth-child(3) {
  animation-delay: 0.28s;
}

.thinking em {
  margin-left: 6px;
  color: #8c94a3;
  font-size: 12px;
  font-style: normal;
}

@keyframes thinkingPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.32;
  }

  40% {
    transform: translateY(-3px);
    opacity: 0.9;
  }
}

.report {
  display: grid;
  gap: 12px;
}

.report-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(28, 35, 48, 0.06);
}

.report-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px 10px;
  border-bottom: 1px solid #f0f1f3;
}

.report-title span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #eef7f4;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.report-title strong {
  color: #111827;
  font-size: 15px;
}

.report-body {
  padding: 10px 15px 14px;
  color: #2e3543;
}

.report-body h4 {
  margin-top: 12px;
}

.report-conclusion {
  border-color: rgba(24, 163, 127, 0.24);
}

.report-conclusion .report-title {
  background: #f1fbf7;
}

.report-policy .report-title span {
  background: #eff5ff;
  color: #2c5ea8;
}

.report-risk {
  border-color: rgba(196, 123, 32, 0.28);
}

.report-risk .report-title {
  background: #fff8ed;
}

.report-risk .report-title span,
.report-missing .report-title span {
  background: #fff1d8;
  color: #a16013;
}

.composer-wrap {
  width: min(820px, calc(100% - 48px));
  margin: 0 auto;
  padding: 6px 0 18px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.composer-wrap::before {
  content: "";
  position: absolute;
  left: -24px;
  right: -24px;
  top: -44px;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(245, 246, 248, 0),
    rgba(245, 246, 248, 0.86) 34%,
    var(--bg) 72%
  );
}

.composer-wrap > * {
  position: relative;
  z-index: 1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #596170;
}

.chips button {
  min-height: 34px;
  padding: 0 13px;
  font-size: 14px;
}

.chips button.active {
  border-color: rgba(24, 163, 127, 0.42);
  background: #e9f8f3;
  color: var(--green-dark);
  font-weight: 700;
}

.chips .analysis-toggle {
  border-color: rgba(42, 57, 92, 0.16);
  background: rgba(248, 250, 252, 0.92);
  color: #465066;
}

.chips .analysis-toggle.active {
  border-color: rgba(24, 163, 127, 0.5);
  background: linear-gradient(180deg, #f0fbf7, #e5f6ef);
  color: var(--green-dark);
  box-shadow: 0 8px 22px rgba(24, 163, 127, 0.12);
}

.composer {
  min-height: 104px;
  padding: 11px;
  border: 1px solid rgba(20, 25, 35, 0.08);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: text;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 4px 8px;
}

.attachment-item {
  position: relative;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
}

.attachment-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.74);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

textarea {
  display: block;
  width: 100%;
  min-height: 38px;
  max-height: 160px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 2px 8px 5px;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  line-height: 1.55;
}

textarea::placeholder {
  color: #a1a7b2;
}

.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 3px;
}

.tool-note {
  color: #8f96a3;
  font-size: 13px;
}

.chips button:hover {
  border-color: rgba(24, 163, 127, 0.32);
  background: #eefaf6;
  color: var(--green-dark);
}

.send {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(24, 163, 127, 0.2);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  cursor: pointer;
}

.send:hover {
  background: #0f9d74;
  box-shadow: 0 8px 18px rgba(24, 163, 127, 0.24);
}

.send:active {
  transform: scale(0.96);
}

.send-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.send-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  transform: translateY(-0.5px);
}

.send-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send-icon-stop {
  opacity: 0;
}

.send-icon-stop::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3.5px;
  background: currentColor;
}

.send[data-state="stop"] .send-icon-send {
  opacity: 0;
}

.send[data-state="stop"] .send-icon-stop {
  opacity: 1;
}

.composer.is-answering .send {
  background: #222936;
  box-shadow: 0 8px 18px rgba(20, 25, 35, 0.2);
}

.composer.is-answering .send:hover {
  background: #171d27;
  box-shadow: 0 10px 22px rgba(20, 25, 35, 0.24);
}

.notice {
  margin: 10px 0 0;
  color: #a0a5af;
  text-align: center;
  font-size: 12px;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.24);
  backdrop-filter: blur(8px);
}

.dialog-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.24);
  backdrop-filter: blur(8px);
}

.dialog-modal[hidden] {
  display: none;
}

.dialog-panel {
  width: min(420px, calc(100% - 32px));
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.22);
  padding: 18px;
}

.dialog-panel h2 {
  margin: 0;
  font-size: 20px;
}

.dialog-panel p {
  margin: 8px 0 14px;
  color: #697182;
  line-height: 1.6;
}

.dialog-panel p.error {
  color: #b42318;
  background: #fff4f2;
  border: 1px solid #ffd7d0;
  border-radius: 12px;
  padding: 9px 11px;
  font-weight: 700;
}

.dialog-panel input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  padding: 0 12px;
  font: inherit;
}

.dialog-panel input + input {
  margin-top: 8px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.dialog-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
}

#dialogCancel {
  background: #f0f2f5;
  color: #596170;
}

#dialogConfirm {
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

#dialogConfirm.danger {
  background: #c24141;
}

.admin-modal[hidden] {
  display: none;
}

.admin-panel {
  width: min(640px, calc(100% - 32px));
  border: 1px solid rgba(31, 41, 55, 0.1);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.22);
  padding: 18px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-head p,
.admin-head h2 {
  margin: 0;
}

.admin-head p {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.admin-head h2 {
  margin-top: 4px;
  font-size: 22px;
}

.admin-head button {
  border: 0;
  border-radius: 999px;
  background: #f0f2f5;
  color: #596170;
  padding: 8px 12px;
}

.admin-grid {
  display: grid;
  gap: 10px;
}

.admin-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: #fbfcfd;
}

.admin-grid strong {
  display: block;
  margin-bottom: 6px;
}

.admin-grid p {
  margin: 0;
  color: #697182;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 45;
    display: flex;
    width: min(292px, 82vw);
    transform: translateX(-104%);
    box-shadow: 20px 0 60px rgba(17, 24, 39, 0.16);
    transition: transform 0.2s ease;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    border: 0;
    background: rgba(17, 24, 39, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  .app.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-button {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 6px 20px rgba(28, 35, 48, 0.06);
  }

  .conversation,
  .composer-wrap {
    width: min(100% - 28px, 820px);
  }

  .conversation {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
    padding-top: 44px;
    padding-bottom: 96px;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 14px;
  }

  .model-select {
    padding: 0 10px;
    font-size: 14px;
  }

  .conversation {
    padding-top: 26px;
    padding-bottom: 78px;
  }

  .welcome h1 {
    font-size: 27px;
  }

  .welcome p {
    font-size: 14px;
  }

  .chips {
    justify-content: center;
    overflow: visible;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0;
  }

  .chips button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
  }

  .composer {
    min-height: 82px;
    padding: 8px 9px;
    border-radius: 18px;
  }

  textarea {
    min-height: 28px;
    padding: 1px 6px 3px;
    font-size: 15px;
    line-height: 1.38;
  }

  .tool-row {
    padding-top: 0;
  }

  .tool-note {
    font-size: 10.5px;
  }

  .composer-wrap {
    width: calc(100% - 24px);
    padding-top: 4px;
    padding-bottom: 12px;
  }

  .composer-wrap::before {
    left: -12px;
    right: -12px;
    top: -34px;
  }
}
