:root {
  --ai-red: #c62031;
  --ai-red-dark: #991725;
  --ai-ink: #132d36;
  --ai-muted: #6d7e84;
  --ai-line: #dfe7e9;
  --ai-canvas: #f3f7f8;
  --ai-teal: #176a73;
  --ai-blue: #2f6fd4;
}

.ai-brand-copy { display: grid; gap: 2px; min-width: 0; }
.ai-brand-copy .brand-name { font-size: 15px; line-height: 1.15; white-space: nowrap; }
.ai-brand-copy small { color: #75838c; font-size: 10px; line-height: 1.2; white-space: nowrap; }

body.ai-ask-page {
  min-width: 320px;
  color: var(--ai-ink);
  background: var(--ai-canvas);
}

.ai-main {
  min-height: calc(100vh - 72px);
  padding: 30px 0 40px;
  background-color: var(--ai-canvas);
  background-image:
    linear-gradient(rgba(19, 45, 54, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 45, 54, 0.022) 1px, transparent 1px);
  background-size: 32px 32px;
}

.ai-layout {
  display: block;
  height: calc(100vh - 142px);
  min-height: 680px;
}

.ai-sidebar,
.ai-workspace {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce5e7;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(23, 54, 63, 0.08);
}

.ai-sidebar {
  display: flex;
  flex-direction: column;
  align-self: start;
  padding: 18px;
}

.ai-assistant-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid #edf1f2;
}

.ai-assistant-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--ai-red);
  border-radius: 9px;
  box-shadow: 0 8px 18px rgba(198, 32, 49, 0.18);
}

.ai-assistant-mark svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.ai-assistant-mark svg path:last-child { fill: #f4b148; }

.ai-assistant-card div { display: grid; gap: 2px; }
.ai-assistant-card strong { font-size: 17px; }
.ai-assistant-card div > span { color: var(--ai-muted); font-size: 12px; line-height: 1.45; }

.ai-new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 16px 0 20px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  background: var(--ai-red);
  border: 1px solid var(--ai-red);
  border-radius: 6px;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ai-new-chat:hover {
  background: var(--ai-red-dark);
  box-shadow: 0 8px 18px rgba(153, 23, 37, 0.16);
  transform: translateY(-1px);
}

.ai-new-chat svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ai-sidebar-guide {
  padding: 16px;
  background: linear-gradient(145deg, #fff7f8 0%, #f6fafb 100%);
  border: 1px solid #eadfe1;
  border-radius: 8px;
}

.ai-sidebar-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ai-sidebar-guide-head h2 {
  margin: 0;
  color: #263f47;
  font-size: 14px;
}

.ai-sidebar-guide-head span {
  color: var(--ai-red-dark);
  font-size: 11px;
  font-weight: 700;
}

.ai-sidebar-steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-sidebar-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 18px;
}

.ai-sidebar-steps li:last-child { padding-bottom: 0; }

.ai-sidebar-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 3px;
  left: 14px;
  width: 1px;
  background: #e4ced1;
}

.ai-sidebar-steps li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  background: var(--ai-red);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(198, 32, 49, 0.08);
}

.ai-sidebar-steps div {
  display: grid;
  gap: 3px;
  padding-top: 2px;
}

.ai-sidebar-steps strong { color: #243d45; font-size: 13px; }
.ai-sidebar-steps small { color: #7d8c91; font-size: 11px; line-height: 1.55; }

.ai-sidebar-notice {
  margin-top: 14px;
  padding: 13px 14px;
  background: #f6f9fa;
  border: 1px solid #e5ecee;
  border-radius: 7px;
}

.ai-sidebar-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #4b6067;
  font-size: 12px;
}

.ai-sidebar-notice p {
  margin: 0;
  color: #8a989d;
  font-size: 11px;
  line-height: 1.6;
}

.ai-workspace {
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) auto;
  width: 100%;
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
}

.ai-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--ai-line);
}

.ai-workspace-header > div {
  display: flex;
  gap: 9px;
  align-items: center;
}

.ai-workspace-header > .ai-workspace-header-actions {
  gap: 14px;
}

.ai-workspace-header h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  background: #20ad91;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(32, 173, 145, 0.11);
}

.ai-trial-label {
  padding: 3px 7px;
  color: var(--ai-red-dark);
  font-size: 11px;
  background: #fff3f4;
  border: 1px solid #f2cdd1;
  border-radius: 3px;
}

.ai-workspace-header p {
  margin: 0;
  color: #829095;
  font-size: 12px;
}

.ai-return-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  color: var(--ai-red-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  background: #fff4f5;
  border: 1px solid #efc5ca;
  border-radius: 5px;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.ai-return-button[hidden] { display: none; }
.ai-return-button:hover { color: #fff; background: var(--ai-red); border-color: var(--ai-red); }
.ai-return-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ai-workspace.is-result,
.ai-workspace.is-empty {
  grid-template-rows: 62px minmax(0, 1fr);
}

.ai-workspace.is-result .ai-workspace-header-actions > p,
.ai-workspace.is-empty .ai-workspace-header-actions > p { display: none; }
.ai-workspace.is-result .ai-chat-body,
.ai-workspace.is-empty .ai-chat-body { padding-top: 26px; padding-bottom: 30px; }
.ai-workspace.is-result .ai-message-list { max-width: 1080px; }

.ai-chat-body {
  overflow-y: auto;
  padding: 22px 34px;
  background: #fbfcfc;
  scrollbar-color: #cbd6d9 transparent;
  scrollbar-width: thin;
}

.ai-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 32px;
  align-content: center;
  min-height: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 16px 0;
}

.ai-welcome[hidden] { display: none; }

.ai-welcome-copy { align-self: center; }

.ai-welcome-label {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  color: var(--ai-red-dark);
  font-size: 12px;
  font-weight: 700;
  background: #fff3f4;
  border-left: 3px solid var(--ai-red);
}

.ai-welcome-copy h2 {
  margin: 14px 0 9px;
  color: var(--ai-ink);
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.ai-welcome-copy p {
  max-width: 600px;
  margin: 0;
  color: var(--ai-muted);
  font-size: 15px;
  line-height: 1.85;
}

.ai-welcome-visual {
  position: relative;
  width: 210px;
  height: 176px;
  align-self: center;
  justify-self: end;
}

.ai-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  color: #fff;
  font-size: 25px;
  font-weight: 800;
  background: #164d61;
  border: 7px solid #e9f1f3;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(22, 77, 97, 0.2);
  transform: translate(-50%, -50%) rotate(45deg);
}

.ai-core::after { content: "AI"; transform: rotate(-45deg); }
.ai-core { font-size: 0; }

.ai-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid #cadde2;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ai-orbit.is-one { width: 142px; height: 142px; }
.ai-orbit.is-two { width: 198px; height: 110px; border-style: dashed; }

.ai-data-node {
  position: absolute;
  z-index: 4;
  display: grid;
  min-width: 48px;
  height: 34px;
  padding: 0 9px;
  place-items: center;
  color: #3a5963;
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #d7e3e6;
  border-radius: 6px;
  box-shadow: 0 7px 18px rgba(31, 68, 80, 0.08);
}

.ai-data-node.is-top { top: 3px; left: 18px; }
.ai-data-node.is-right { top: 39px; right: 0; }
.ai-data-node.is-bottom { right: 30px; bottom: 3px; }

.ai-suggestion-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.ai-suggestion-grid button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  min-height: 76px;
  padding: 13px 14px;
  color: var(--ai-ink);
  font: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid #dfe7e9;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(23, 54, 63, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ai-suggestion-grid button:hover {
  border-color: rgba(198, 32, 49, 0.34);
  box-shadow: 0 10px 22px rgba(111, 24, 34, 0.08);
  transform: translateY(-2px);
}

.ai-suggestion-grid button > span:nth-child(2) { display: grid; gap: 4px; }
.ai-suggestion-grid strong { font-size: 14px; }
.ai-suggestion-grid small { overflow: hidden; color: #7f8d92; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ai-suggestion-grid button > i { color: #a5b0b4; font-size: 18px; font-style: normal; }

.ai-suggestion-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ai-red);
  background: #fff1f2;
  border-radius: 7px;
}

.ai-suggestion-icon.is-blue { color: var(--ai-blue); background: #eff5ff; }
.ai-suggestion-icon.is-orange { color: #d56a31; background: #fff4ed; }
.ai-suggestion-icon.is-teal { color: var(--ai-teal); background: #ecf6f7; }
.ai-suggestion-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ai-message-list {
  display: grid;
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
}

.ai-message {
  display: grid;
  gap: 9px;
}

.ai-message.is-user { justify-items: end; }
.ai-message.is-assistant { width: 100%; }

.ai-message-bubble {
  max-width: min(740px, 88%);
  padding: 15px 17px;
  color: #344950;
  font-size: 14px;
  line-height: 1.75;
  background: #fff;
  border: 1px solid #dfe7e9;
  border-radius: 4px 10px 10px 10px;
  box-shadow: 0 7px 18px rgba(23, 54, 63, 0.045);
}

.ai-message.is-assistant .ai-message-bubble {
  width: 100%;
  max-width: 100%;
}

.ai-message.is-user .ai-message-bubble {
  color: #fff;
  background: #284c58;
  border-color: #284c58;
  border-radius: 10px 4px 10px 10px;
}

.ai-loading-bubble {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 260px;
}

.ai-loading-dots { display: flex; gap: 4px; }
.ai-loading-dots i { width: 6px; height: 6px; background: var(--ai-red); border-radius: 50%; animation: ai-dot 1s infinite ease-in-out; }
.ai-loading-dots i:nth-child(2) { animation-delay: 120ms; }
.ai-loading-dots i:nth-child(3) { animation-delay: 240ms; }

@keyframes ai-dot {
  0%, 70%, 100% { opacity: 0.28; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.ai-answer { display: grid; gap: 16px; }
.ai-answer > p { margin: 0; }

.ai-answer-summary {
  padding: 13px 15px;
  color: #31505a;
  font-size: 15px;
  font-weight: 500;
  background: #f2f7f8;
  border-left: 3px solid var(--ai-teal);
}

.ai-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-metric-card {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 13px;
  background: #fff;
  border: 1px solid #e0e8ea;
  border-top: 3px solid var(--ai-red);
  border-radius: 5px;
}

.ai-metric-card:nth-child(2) { border-top-color: var(--ai-blue); }
.ai-metric-card:nth-child(3) { border-top-color: var(--ai-teal); }
.ai-metric-card small { color: #819095; }
.ai-metric-card strong { color: #183842; font-size: 22px; }
.ai-metric-card span { color: #169071; font-size: 12px; }

.ai-analysis-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(190px, 0.65fr);
  gap: 12px;
}

.ai-chart-card,
.ai-insight-card {
  padding: 15px;
  background: #fff;
  border: 1px solid #e0e8ea;
  border-radius: 5px;
}

.ai-chart-card h3,
.ai-insight-card h3,
.ai-related h3 {
  margin: 0 0 12px;
  color: #243e47;
  font-size: 14px;
}

.ai-bar-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(28px, 1fr));
  gap: 10px;
  align-items: end;
  height: 132px;
  padding: 16px 10px 0;
  border-bottom: 1px solid #ccd8db;
  background-image: linear-gradient(rgba(30, 71, 83, 0.07) 1px, transparent 1px);
  background-size: 100% 32px;
}

.ai-bar-chart span {
  position: relative;
  display: block;
  height: var(--bar-height);
  background: #2c7881;
  border-radius: 3px 3px 0 0;
}

.ai-bar-chart span:nth-child(5),
.ai-bar-chart span:nth-child(6) { background: var(--ai-red); }

.ai-bar-chart span::before {
  content: attr(data-value);
  position: absolute;
  right: 50%;
  bottom: calc(100% + 3px);
  color: #687b82;
  font-size: 10px;
  transform: translateX(50%);
}

.ai-bar-chart span::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 5px);
  right: 50%;
  color: #89979c;
  font-size: 10px;
  transform: translateX(50%);
}

.ai-insight-card ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ai-insight-card li { position: relative; padding-left: 12px; color: #667a81; font-size: 12px; line-height: 1.6; }
.ai-insight-card li::before { content: ""; position: absolute; top: 8px; left: 0; width: 5px; height: 5px; background: var(--ai-red); border-radius: 50%; }

.ai-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }

.ai-related-card {
  display: grid;
  gap: 7px;
  min-height: 122px;
  padding: 12px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e0e8ea;
  border-radius: 5px;
  transition: border-color 150ms ease, transform 150ms ease;
}

.ai-related-card:hover { border-color: rgba(198, 32, 49, 0.3); transform: translateY(-2px); }
.ai-related-card small { color: var(--ai-red-dark); font-weight: 700; }
.ai-related-card strong { color: #2b444c; font-size: 13px; line-height: 1.5; }
.ai-related-card span { margin-top: auto; color: #7d8c91; font-size: 11px; }

.ai-source-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
  color: #96a1a5;
  font-size: 10px;
  border-top: 1px solid #e6ecee;
}

.ai-recommendation-answer { gap: 14px; }

.ai-recommendation-answer .ai-answer-summary strong {
  margin: 0 3px;
  color: #173d48;
  font-size: 18px;
}

.ai-recommendation-section {
  display: grid;
  gap: 12px;
}

.ai-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-recommendation-card {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  min-height: 142px;
  padding: 13px;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(145deg, #fff 0%, #fbfcfd 100%);
  border: 1px solid #dfe7e9;
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(23, 54, 63, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ai-recommendation-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 12px;
  left: 12px;
  height: 2px;
  background: linear-gradient(90deg, var(--ai-red), #e29d44);
  border-radius: 0 0 2px 2px;
  opacity: 0.78;
}

.ai-recommendation-card:hover {
  border-color: rgba(198, 32, 49, 0.32);
  box-shadow: 0 10px 22px rgba(112, 31, 41, 0.09);
  transform: translateY(-2px);
}

.ai-recommendation-rank {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ai-red-dark);
  font-size: 11px;
  font-weight: 800;
  background: #fff2f3;
  border-radius: 7px;
}

.ai-recommendation-card-body {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.ai-recommendation-card-body > small {
  color: var(--ai-red-dark);
  font-size: 11px;
  font-weight: 700;
}

.ai-recommendation-card-body > strong {
  overflow: hidden;
  color: #223d46;
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-recommendation-card-body > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #718187;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-recommendation-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.ai-recommendation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.ai-recommendation-tags span {
  padding: 2px 6px;
  color: #697c82;
  font-size: 10px;
  line-height: 1.4;
  background: #f3f6f7;
  border: 1px solid #e1e8ea;
  border-radius: 3px;
}

.ai-recommendation-view {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--ai-red-dark);
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #efc7cc;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.ai-recommendation-view i {
  font-size: 13px;
  font-style: normal;
}

.ai-recommendation-card:hover .ai-recommendation-view {
  color: #fff;
  background: var(--ai-red);
  border-color: var(--ai-red);
}

.ai-recommendation-owner {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid #edf1f2;
}

.ai-recommendation-owner span {
  flex: 0 0 auto;
  color: #8a989d;
  font-size: 10px;
}

.ai-recommendation-owner strong {
  overflow: hidden;
  color: #536970;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-recommendation-card.is-demand::before {
  background: linear-gradient(90deg, #258c80, #64b8a8);
}

.ai-recommendation-card.is-demand .ai-recommendation-rank {
  color: #17685f;
  background: #eef9f7;
}

.ai-search-more {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: center;
  min-width: 132px;
  min-height: 38px;
  padding: 0 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: var(--ai-red);
  border-radius: 5px;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.ai-search-more:hover {
  background: var(--ai-red-dark);
  box-shadow: 0 8px 18px rgba(153, 23, 37, 0.15);
  transform: translateY(-1px);
}

.ai-composer {
  padding: 16px 30px 18px;
  background: #fff;
  border-top: 1px solid var(--ai-line);
}

.ai-composer[hidden] { display: none; }

.ai-query-prompts {
  width: min(760px, 100%);
  margin-bottom: 12px;
}

.ai-query-prompts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ai-query-prompts button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 46px 12px 20px;
  overflow: hidden;
  color: #415b64;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  background: linear-gradient(90deg, #fff 0%, #f8fafb 100%);
  border: 1px solid #d8e2e5;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(23, 54, 63, 0.045);
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.ai-query-prompts button::before {
  width: 6px;
  height: 6px;
  margin-right: 12px;
  flex: 0 0 auto;
  content: "";
  background: var(--ai-red);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(198, 32, 49, 0.07);
}

.ai-empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
}

.ai-empty-state-card {
  width: min(620px, 100%);
  padding: 42px 46px 40px;
  border: 1px solid #e2e8eb;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(199, 31, 46, .08), transparent 42%),
    #fff;
  box-shadow: 0 20px 48px rgba(19, 49, 57, .08);
}

.ai-empty-state-icon {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  color: var(--ai-red);
  background: linear-gradient(145deg, #fff7f7, #f9e8ea);
  box-shadow: inset 0 0 0 1px rgba(199, 31, 46, .12), 0 14px 30px rgba(199, 31, 46, .12);
}

.ai-empty-state-icon::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px dashed rgba(199, 31, 46, .22);
  border-radius: 32px;
}

.ai-empty-state-icon svg {
  width: 44px;
  height: 44px;
  stroke: currentColor;
}

.ai-empty-state h2 {
  margin: 0;
  color: var(--ai-ink);
  font-size: 28px;
  line-height: 1.35;
}

.ai-empty-state p {
  max-width: 520px;
  margin: 16px auto 0;
  color: #667b82;
  font-size: 15px;
  line-height: 1.8;
}

.ai-empty-state p strong { color: #263f47; font-weight: 650; }

.ai-empty-state-tips {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-empty-state-tips span {
  padding: 8px 14px;
  border: 1px solid #e4eaec;
  border-radius: 999px;
  color: #61747b;
  font-size: 13px;
  background: #f3f6f7;
}

.ai-empty-state button {
  min-width: 164px;
  min-height: 44px;
  margin-top: 28px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #b81729, #d52c3c);
  box-shadow: 0 10px 22px rgba(199, 31, 46, .2);
  transition: transform .2s ease, box-shadow .2s ease;
}

.ai-empty-state button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(199, 31, 46, .28);
}

.ai-query-prompts button::after {
  position: absolute;
  right: 17px;
  color: #94a4a9;
  font-size: 18px;
  font-weight: 400;
  content: "\2192";
}

.ai-query-prompts button:hover {
  color: var(--ai-red-dark);
  background: linear-gradient(90deg, #fff8f8 0%, #fff 100%);
  border-color: #e8bfc4;
  box-shadow: 0 8px 20px rgba(153, 23, 37, 0.09);
  transform: translateX(3px);
}

.ai-query-prompts button:hover::after {
  color: var(--ai-red);
}

.ai-composer-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 11px 12px 10px 15px;
  background: #fff;
  border: 1px solid #cfdadd;
  border-radius: 7px;
  box-shadow: 0 5px 14px rgba(23, 54, 63, 0.04);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ai-composer-box:focus-within {
  border-color: rgba(198, 32, 49, 0.6);
  box-shadow: 0 0 0 3px rgba(198, 32, 49, 0.07);
}

.ai-composer textarea {
  width: 100%;
  max-height: 96px;
  resize: none;
  color: #2a424a;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  background: transparent;
  border: 0;
  outline: 0;
}

.ai-composer textarea::placeholder { color: #a2adb0; }

.ai-composer-actions { display: flex; gap: 12px; align-items: center; }
.ai-composer-actions > span { color: #9aa5a9; font-size: 10px; }
.ai-composer-actions button {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 38px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  background: var(--ai-red);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: background 150ms ease;
}

.ai-composer-actions button:hover { background: var(--ai-red-dark); }
.ai-composer-actions button:disabled { cursor: not-allowed; opacity: 0.5; }
.ai-composer-actions button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ai-composer > p { margin: 7px 0 0; color: #9aa5a9; font-size: 10px; text-align: center; }

@media (max-width: 1180px) {
  .ai-layout { display: block; }
  .ai-chat-body { padding-right: 24px; padding-left: 24px; }
  .ai-welcome { grid-template-columns: minmax(0, 1fr) 180px; }
  .ai-welcome-visual { width: 180px; transform: scale(0.9); transform-origin: right center; }
}

@media (max-width: 1020px) {
  .ai-main { padding: 18px 0 28px; }
  .ai-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .ai-sidebar { display: none; }
  .ai-workspace { min-height: calc(100vh - 120px); }
}

@media (max-width: 720px) {
  .ai-main { padding: 0; }
  .ai-main .container { width: 100%; }
  .ai-workspace { min-height: calc(100vh - 64px); border: 0; border-radius: 0; box-shadow: none; }
  .ai-workspace-header { padding: 0 14px; }
  .ai-workspace-header-actions > p { display: none; }
  .ai-return-button { min-height: 32px; padding: 0 10px; }
  .ai-chat-body { padding: 20px 14px; }
  .ai-welcome { grid-template-columns: 1fr; gap: 8px; min-height: auto; padding: 12px 0; }
  .ai-welcome-visual { display: none; }
  .ai-suggestion-grid { grid-template-columns: 1fr; margin-top: 16px; }
  .ai-suggestion-grid button { min-height: 70px; }
  .ai-metric-grid,
  .ai-analysis-panel,
  .ai-related-grid { grid-template-columns: 1fr; }
  .ai-message-bubble { max-width: 94%; }
  .ai-message.is-assistant .ai-message-bubble { max-width: 100%; }
  .ai-recommendation-grid { grid-template-columns: 1fr; }
  .ai-recommendation-card { min-height: 122px; }
  .ai-source-note { display: grid; }
  .ai-composer { padding: 10px 12px 12px; }
  .ai-query-prompts { width: 100%; margin-bottom: 10px; }
  .ai-query-prompts > div { gap: 7px; }
  .ai-query-prompts button { min-height: 48px; padding: 10px 40px 10px 15px; font-size: 14px; }
  .ai-composer-box { grid-template-columns: 1fr; gap: 6px; }
  .ai-composer-actions { justify-content: space-between; }
  .ai-empty-state { padding: 26px 14px; }
  .ai-empty-state-card { padding: 34px 20px 32px; }
  .ai-empty-state h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-new-chat,
  .ai-suggestion-grid button,
  .ai-related-card,
  .ai-recommendation-card,
  .ai-search-more,
  .ai-query-prompts button { transition: none; }
  .ai-loading-dots i { animation: none; }
}
