:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #15162a;
  --panelGlass: rgba(12, 14, 26, .88);
  --panelStrong: #1d1f38;
  --ink: #eef4ff;
  --muted: #9aa8bd;
  --line: rgba(148, 163, 184, .22);
  --soft: #2b2d46;
  --field: #111722;
  --blue: #27d6ff;
  --blue-dark: #325dff;
  --shadow: 0 22px 70px -38px rgba(0, 0, 0, .9);
  --danger: #fb7185;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 86, 240, .08), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(6, 182, 212, .06), transparent 28%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
.hidden { display: none !important; }
.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.visuallyHiddenFile {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.appShell {
  min-height: 100dvh;
  padding: 14px 18px 18px;
}

.topbar {
  max-width: 1380px;
  height: 58px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 780;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand img {
  filter: brightness(0) invert(1);
}

.accountCluster {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.statusPill, .userPill, .ghostBtn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 680;
}

.themeToggle {
  width: 36px;
  height: 36px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panelStrong);
  color: var(--ink);
  box-shadow: 0 12px 28px -22px rgba(15, 23, 42, .8);
}
.themeIcon { font-size: 16px; line-height: 1; }
.statusPill { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.userPill { background: var(--panelStrong); color: var(--ink); border-color: var(--line); max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.ghostBtn { background: var(--panelStrong); color: var(--ink); border-color: var(--line); }

.workspace {
  max-width: 1380px;
  height: calc(100dvh - 102px);
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
}

.sideRail {
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panelGlass);
  box-shadow: var(--shadow);
  overflow: auto;
}

.newChatBtn {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 760;
}

.sideBlock {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.sideTitle {
  padding: 0 4px;
  color: #777f8c;
  font-size: 12px;
  font-weight: 760;
}

.chatList {
  display: grid;
  gap: 8px;
}

.chatItem {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panelStrong);
  color: var(--ink);
  padding: 8px 10px;
}

.chatItem::before {
  content: "";
  width: 14px;
  height: 11px;
  justify-self: center;
  border: 1.8px solid rgba(238, 244, 255, .72);
  border-radius: 8px 8px 8px 2px;
  transform: rotate(-2deg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
}

.chatSelect {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.chatItem span, .chatItem small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatItem span { font-size: 14px; font-weight: 760; }
.chatItem small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.chatItem.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 24%, transparent); background: color-mix(in srgb, var(--blue) 12%, var(--panelStrong)); }
.chatActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding-right: 2px;
}
.chatRename,
.chatDelete {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8b94a1;
  line-height: 1;
}
.chatRename svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chatDelete { font-size: 18px; }
.chatRename:hover, .chatDelete:hover { background: var(--soft); color: var(--ink); }
.chatRename,
.chatDelete {
  opacity: .92;
  visibility: visible;
}

/* Left rail session list override */
.chatList {
  gap: 10px !important;
}

.chatItem {
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
  align-items: center !important;
  padding: 8px 10px !important;
}

.chatSelect {
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  min-height: 44px !important;
}

.chatSelect span,
.chatSelect small {
  text-align: left;
}

.chatActions {
  align-self: center !important;
  padding-left: 2px !important;
}

.chatRename,
.chatDelete {
  opacity: 1 !important;
}

.chatItem::before {
  content: "" !important;
}
.sideBlock.compact p { padding: 0 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.chatStage {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panelGlass);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chatScroll {
  height: 100%;
  overflow-y: auto;
  padding: 48px 22px max(330px, 38vh);
  scroll-padding: 120px 0 max(330px, 38vh);
  scroll-behavior: smooth;
}

.chatScroll::-webkit-scrollbar, .inlineTemplateList::-webkit-scrollbar, .templateList::-webkit-scrollbar { height: 0; width: 0; }

.announcementBanner {
  width: min(880px, 100%);
  margin: 0 auto 18px;
  display: grid;
  gap: 10px;
}

.announcementItem {
  position: relative;
  border: 1px solid rgba(139, 92, 246, .46);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(39, 214, 255, .08)),
    rgba(23, 25, 44, .96);
  box-shadow: 0 18px 54px -34px rgba(124, 58, 237, .85);
  padding: 14px 48px 14px 16px;
}

.announcementItem strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.announcementItem p {
  margin-top: 6px;
  color: #c5ccda;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.announcementClose {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.announcementClose:hover {
  color: var(--ink);
  border-color: rgba(139, 92, 246, .8);
}

.agentWelcome {
  max-width: 520px;
  margin: 86px auto 24px;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.welcomeMark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #34d5ff, #9b5cff 58%, #f3f6ff);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 18px 42px -24px rgba(124, 92, 255, .9);
}

.agentWelcome strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

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

.stripHead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stripHead span {
  display: block;
  color: var(--blue);
  font-size: 13px;
  font-weight: 760;
}

.stripHead strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.inlineTemplateList {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
}

.inlineTemplateList .templateBtn {
  min-height: 112px;
}

.lightBtn, .toolBtn, .secondaryBtn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panelStrong);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 740;
  white-space: nowrap;
}

.messageBlock {
  max-width: 920px;
  margin: 16px auto;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.messageBlock.hidden, .templateStrip.hidden { display: none; }

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 800;
}

.messageBlock article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panelStrong);
  padding: 14px;
  box-shadow: 0 18px 50px -42px rgba(15, 23, 42, .55);
}

.messageTitle {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.promptBox {
  min-height: 110px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  border: 1px solid #202936;
  border-radius: 16px;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  white-space: pre-wrap;
  font: 12px/1.58 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#promptMessage {
  display: none !important;
}

.agentConversation {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.agentTurn {
  display: grid;
  gap: 8px;
}

.userTurn {
  justify-items: end;
}

.assistantTurn {
  justify-items: start;
}

.assistantName {
  margin-left: 44px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 860;
}

.userRequestCard {
  width: min(320px, 82vw);
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panelStrong);
  padding: 12px;
}

.requestImages {
  display: flex;
  gap: 8px;
  overflow: hidden;
}

.requestImages img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: cover;
  background: #111827;
}

.userRequestCard strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.requestMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.requestMeta span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 720;
}

.agentQuestionCard,
.thinkingCard {
  width: min(420px, 88vw);
  border: 1px solid rgba(139, 92, 246, .18);
  border-radius: 12px;
  background: #1d1f38;
  color: #eef4ff;
  padding: 14px 14px 12px;
  box-shadow: 0 24px 70px -50px rgba(0, 0, 0, .9);
}

.agentQuestionCard p {
  margin-bottom: 12px;
  color: #eef4ff;
  font-size: 13px;
  font-weight: 760;
}

.agentQuestionCard p b {
  color: #ff3d73;
  margin-right: 8px;
}

.questionPanel {
  max-height: 286px;
  overflow: auto;
  border-radius: 8px;
  background: #30324e;
  padding: 12px;
}

.questionTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.questionTitle span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  background: rgba(139, 92, 246, .55);
  color: #d8c6ff;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
}

.questionTitle strong {
  min-width: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
}

.optionList {
  display: grid;
  gap: 9px;
}

.optionCard {
  min-height: 66px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(177, 183, 210, .22);
  border-radius: 7px;
  background: #33364f;
  color: #fff;
  padding: 12px;
  text-align: left;
}

.optionCard strong {
  font-size: 14px;
  line-height: 1.2;
}

.optionCard small {
  color: #aab2c7;
  font-size: 12px;
  line-height: 1.35;
}

.optionCard.selected {
  border-color: #a65cff;
  background: #453767;
  box-shadow: inset 0 0 0 1px rgba(166, 92, 255, .58);
}

.customAnswerBox {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.customAnswerBox.hidden {
  display: none;
}

.customAnswerBox span {
  color: #c7ccdc;
  font-size: 12px;
  font-weight: 760;
}

.customAnswerBox textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid rgba(166, 92, 255, .5);
  border-radius: 7px;
  background: #25283c;
  color: #fff;
  padding: 11px 12px;
  font: inherit;
  line-height: 1.45;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(166, 92, 255, .14);
}

.customAnswerBox textarea:focus {
  border-color: #cf54ff;
  box-shadow: 0 0 0 3px rgba(166, 92, 255, .16);
}

.customAnswerBox textarea::placeholder {
  color: #81889f;
}

.questionActions {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.questionActions button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 14px;
  font-weight: 820;
}

.cancelQuestion {
  background: #494b60;
}

.submitQuestion {
  background: linear-gradient(90deg, #2d63ff, #f03ff0);
}

.agentTurn.answered .agentQuestionCard {
  max-height: 64px;
  overflow: hidden;
  opacity: .48;
  transform: scale(.96);
  transform-origin: left top;
}

.agentTurn.answered .questionActions {
  display: none;
}

.agentTurn.answered .questionPanel,
.agentTurn.answered .customAnswerBox {
  display: none;
}

.agentTurn.answered .agentQuestionCard p {
  margin: 0;
}

.thinkingCard {
  width: min(720px, 88vw);
  padding: 16px;
  color: #b9c2d8;
  line-height: 1.8;
  font-size: 13px;
}

.thinkingCard b {
  color: #eef4ff;
}

.thinkingHead {
  margin-bottom: 10px;
}

.thinkingHead span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #c7cfdd;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
}

.thinkingBody {
  display: grid;
  gap: 8px;
}

.thinkingLine {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0;
  color: #aeb8ce;
  line-height: 1.65;
}

.thinkingLine span {
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: #6b7280;
}

.thinkingLine em {
  font-style: normal;
}

.thinkingLine em b {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  margin-right: 8px;
  border-radius: 5px;
  background: rgba(139, 92, 246, .24);
  color: #d9c8ff;
  padding: 0 7px;
  font-size: 12px;
  line-height: 1;
}

.thinkingLine.active {
  color: #eef4ff;
}

.thinkingLine.active span {
  background: #38bdf8;
  box-shadow: 0 0 0 5px rgba(56, 189, 248, .12);
  animation: thinkingPulse 1s ease-in-out infinite;
}

@keyframes thinkingPulse {
  50% { transform: scale(1.35); opacity: .72; }
}

.resultGrid {
  display: grid;
  gap: 18px;
}

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

.generationMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.generationMetaLeft,
.generationMetaRight {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.generationMeta strong {
  color: var(--ink);
  font-size: 13px;
}

.metaPill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: #5d6673;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.metaPill.processing { background: #edf5ff; color: #1764d9; }
.metaPill.waiting { background: #fff8dc; color: #9a6b00; }
.metaPill.done { background: #ecfdf3; color: #118045; }
.metaPill.failed { background: #fff1f2; color: #b91c1c; }

.generationImages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.processingCard {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panelStrong), var(--soft));
  color: var(--muted);
}

.processingInner {
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: var(--blue);
  animation: spin .9s linear infinite;
}

.processingInner strong {
  color: var(--muted);
  font-size: 14px;
}

.elapsedPill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panelStrong) 78%, transparent);
  padding: 0 10px;
  color: #8a94a3;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

.resultItem {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panelStrong);
}

.resultItem img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eef1f3;
}

.resultActions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.resultActions button {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 760;
}

.resultActions a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 740;
  text-decoration: none;
  white-space: nowrap;
}

.composerDock {
  position: absolute;
  inset: auto 18px 188px;
  z-index: 10;
  pointer-events: none;
}

.composerPanel {
  position: relative;
  max-width: 980px;
  min-height: 124px;
  margin: 0 auto;
  border: 1px solid rgba(85, 102, 255, .65);
  border-radius: 20px;
  background: rgba(9, 13, 22, .96);
  box-shadow:
    0 0 0 1px rgba(234, 54, 255, .42),
    0 26px 92px -54px rgba(147, 51, 234, .95);
  padding: 12px 36px 10px 24px;
  pointer-events: auto;
}

.agentHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 2px 2px 0;
}

.agentHeader div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agentHeader span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 840;
}

.agentHeader strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agentHeader select {
  width: 120px;
  flex: 0 0 auto;
}

.composerInputRow {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  min-height: 100px;
  padding: 18px 0 32px;
  align-items: start;
}

.composerPanel.hasUploads .composerInputRow {
  padding-top: 70px;
}

.uploadChip {
  position: static;
  width: 72px;
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}
.uploadChip::before {
  content: "";
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23c8d0df' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='8.5' cy='10.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / 25px 25px no-repeat,
    #20263a;
  color: #8c96aa;
  transform: rotate(-14deg);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .85);
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, opacity .16s ease;
  font-weight: 600;
  line-height: 1;
}

.uploadChip:hover::before {
  transform: translateY(-2px) rotate(-14deg);
  border-color: rgba(139, 92, 246, .55);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23eef4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='8.5' cy='10.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / 25px 25px no-repeat,
    #252d44;
}

.uploadChip input { display: none; }
.uploadChip.hasPreview {
  border-style: solid;
  background: transparent;
}
.uploadChip span:not(.srOnly) {
  display: none;
  color: #2d63ff;
  font-size: 12px;
  font-weight: 820;
}
.uploadChip strong { display: none; }
.uploadPreviewList {
  position: absolute;
  top: 16px;
  left: 24px;
  right: 24px;
  width: auto;
  display: none;
  grid-template-columns: repeat(5, 52px);
  justify-content: start;
  gap: 8px;
  padding: 0;
}
.uploadPreviewList.hasPreview { display: grid; }

.uploadPreviewItem {
  position: relative;
  width: 52px;
  height: 52px;
}

.uploadPreviewItem img {
  width: 52px;
  height: 52px;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: #e5e7eb;
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .7);
}

.removeUploadBtn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(82, 88, 101, .92);
  color: #fff;
  padding: 0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: scale(.86);
  transition: opacity .14s ease, transform .14s ease, background .14s ease;
}

.uploadPreviewItem:hover .removeUploadBtn,
.removeUploadBtn:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.removeUploadBtn:hover {
  background: rgba(117, 124, 138, .98);
}

.primaryFields {
  min-width: 0;
  min-height: 68px;
  display: block;
}

.uploadStatus {
  position: absolute;
  left: 112px;
  top: 24px;
  color: #8e97aa;
  font-size: 13px;
  font-weight: 760;
  pointer-events: none;
}

.composerPanel.hasUploads .uploadStatus {
  top: 78px;
}
.fieldGrid { display: grid; grid-template-columns: 1fr 1fr 150px; gap: 7px; }
.agentBriefField textarea {
  min-height: 62px;
  border: 0;
  background: transparent;
  color: #eef4ff;
  padding: 0 4px 8px;
  font-size: 14px;
  line-height: 1.55;
}

.agentBriefField textarea::placeholder {
  color: #7c8496;
  font-weight: 700;
}

.agentBriefField textarea:focus {
  background: transparent;
  box-shadow: none;
}

.agentComposerBar {
  position: absolute;
  left: 84px;
  right: 30px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(17, 24, 39, .58);
  border: 1px solid rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
}

.agentComposerBar .sendBtn {
  margin-left: auto;
  min-width: 72px;
  min-height: 40px;
  width: auto;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #315dff, #8f48ff);
}

.agentComposerBar .sendBtn::before {
  content: "";
  display: none;
}

.choiceWrap {
  position: relative;
  display: grid;
  gap: 4px;
}

.choiceLabel {
  display: block;
  color: rgba(218, 226, 253, .42);
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: .04em;
}

.choicePill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(205, 181, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: #eef4ff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 780;
}

.apiInlineBtn {
  align-self: end;
  min-width: 54px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: #1b2232;
  color: #eef4ff;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 820;
}

.apiInlineBtn.active {
  border-color: rgba(39, 214, 255, .55);
  color: var(--blue);
}

.choicePill[aria-expanded="true"] {
  border-color: rgba(139, 92, 246, .8);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .25);
}

.choiceIcon {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #fb6b1d;
  color: #fff;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.choiceIcon.logo-badge {
  min-width: 20px;
  padding: 0;
  background: transparent;
  font-size: 0;
}

.choiceIcon.logo-badge::before {
  content: attr(data-icon);
  min-width: 20px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  padding: 0 3px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

#languageChoiceBtn .choiceIcon {
  background: transparent;
  padding: 0;
  font-size: 15px;
}

.chevron {
  color: #aeb7ca;
  font-size: 14px;
  line-height: 1;
}

.choicePopover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  z-index: 30;
  width: min(646px, calc(100vw - 52px));
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 12px;
  background: #111827;
  padding: 16px 18px;
  box-shadow: 0 30px 90px -42px rgba(0, 0, 0, .9);
}

.languagePopover {
  width: min(392px, calc(100vw - 52px));
}

.choiceTitle {
  padding: 0 6px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .2);
  color: #aeb7ca;
  font-size: 12px;
  font-weight: 820;
}

.choiceGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
  gap: 12px 18px;
  padding-top: 14px;
}

.languageGrid {
  grid-template-columns: repeat(3, minmax(92px, 1fr));
}

.choiceGrid button {
  min-width: 0;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d9deea;
  padding: 2px 4px;
  text-align: left;
  font-size: 13px;
  font-weight: 760;
}

.choiceGrid button::before {
  content: attr(data-icon);
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: #fb6b1d;
  color: #fff;
  padding: 0 3px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.platformPopover .choiceGrid button.logo-badge::before {
  min-width: 20px;
  height: 18px;
  border-radius: 4px;
  padding: 0 3px;
  font-size: 9px;
  letter-spacing: 0;
}

.logo-badge.taobao::before { background: #ff6a00; color: #fff; }
.logo-badge.ozon::before { background: #6f7480; color: #fff; }
.logo-badge.mercado::before { background: #ffe600; color: #21356f; }
.logo-badge.tmall::before { background: #d7000f; color: #fff; }
.logo-badge.takealot::before { background: #1682d4; color: #fff; }
.logo-badge.rakuten::before { background: #fff; color: #c40000; border: 1px solid #e5e7eb; }
.logo-badge.amazon::before { background: #fff; color: #111827; }
.logo-badge.wildberries::before { background: #b125c8; color: #fff; }
.logo-badge.wish::before { background: #35e770; color: #063a1a; }
.logo-badge.aliexpress::before { background: #d71920; color: #fff; }
.logo-badge.noon::before { background: #f6e500; color: #111827; border-radius: 999px; }
.logo-badge.platform1688::before { background: #ff6a00; color: #fff; }
.logo-badge.pdd::before { background: #e6322b; color: #fff; }
.logo-badge.xhs::before { background: #ff2442; color: #fff; }
.logo-badge.tokopedia::before { background: #46d43e; color: #0f2f12; }
.logo-badge.ebay::before { background: linear-gradient(90deg, #e53238 0 25%, #0064d2 25% 50%, #f5af02 50% 75%, #86b817 75%); color: #fff; }
.logo-badge.coupang::before { background: #e5232e; color: #fff; border-radius: 999px; }
.logo-badge.jd::before { background: #e1251b; color: #fff; }
.logo-badge.douyin::before,
.logo-badge.tiktok::before { background: #050505; color: #fff; text-shadow: -1px 0 #25f4ee, 1px 0 #fe2c55; }
.logo-badge.shein::before { background: #050505; color: #fff; }
.logo-badge.falabella::before { background: #92d400; color: #111827; }
.logo-badge.etsy::before { background: #f16521; color: #fff; }
.logo-badge.temu::before { background: #ff6a00; color: #fff; }
.logo-badge.shopee::before { background: #ee4d2d; color: #fff; }
.logo-badge.cdiscount::before { background: #4f46e5; color: #fff; }
.logo-badge.otto::before { background: transparent; color: #e30613; font-size: 14px; }
.logo-badge.walmart::before { background: transparent; color: #ffc220; font-size: 15px; }

.languageGrid button::before {
  background: transparent;
  padding: 0;
  font-size: 15px;
}

.choiceGrid button:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 730;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--field);
  color: var(--ink);
  outline: none;
  padding: 8px 10px;
  font-size: 13px;
}

textarea {
  min-height: 60px;
  resize: vertical;
  border-radius: 16px;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(20, 86, 240, .42);
  background: var(--panelStrong);
  box-shadow: 0 0 0 3px rgba(20, 86, 240, .1);
}

.composerTools {
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto 126px minmax(122px, 1fr) 150px 104px 112px 90px 72px;
  gap: 7px;
  align-items: end;
}

.toolBtn { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.composerPanel .toolBtn,
.composerPanel .secondaryBtn {
  padding: 8px 12px;
  font-size: 12px;
}

.composerFooter {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.footerActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.sendBtn {
  min-height: 38px;
  min-width: 106px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 780;
}

.sendBtn:hover { background: var(--blue-dark); }
button:disabled { cursor: wait; opacity: .65; }
.error { color: var(--danger) !important; }

.templateModal {
  width: min(1180px, calc(100vw - 56px));
  max-height: min(860px, calc(100dvh - 48px));
  border: 1px solid rgba(40, 128, 210, .38);
  border-radius: 26px;
  padding: 0;
  background: transparent;
  box-shadow: 0 30px 90px -35px rgba(15, 23, 42, .55);
}

.apiConfigModal {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0;
  background: transparent;
  box-shadow: 0 30px 90px -40px rgba(0, 0, 0, .78);
}

.apiConfigModal::backdrop {
  background: rgba(3, 7, 18, .55);
  backdrop-filter: blur(5px);
}

.apiConfigCard {
  overflow: hidden;
  border-radius: inherit;
  background: var(--panelStrong);
}

.apiConfigForm {
  display: grid;
  gap: 14px;
  padding: 8px 24px 24px;
}

.apiConfigActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.templateModal::backdrop {
  background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(5px);
}

.modalCard {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: inherit;
  background: var(--panelStrong);
}

.modalHead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
}

.modalHead h1 { font-size: 24px; line-height: 1.15; }
.modalHead p { margin-top: 8px; color: var(--muted); font-size: 13px; }

.closeBtn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
}

.modalFilters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 120px 160px 140px;
  gap: 10px;
  padding: 14px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.templateList {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
  padding: 18px 24px 24px;
}

.templateBtn {
  min-width: 0;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panelStrong);
  color: var(--ink);
  padding: 14px;
  text-align: left;
  scroll-snap-align: start;
}

.templateBtn strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.templateBtn span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.templateBtn.active {
  border-color: rgba(20, 86, 240, .55);
  background: color-mix(in srgb, var(--blue) 14%, var(--panelStrong));
  box-shadow: inset 0 0 0 1px rgba(20, 86, 240, .16);
}

.adminModal {
  width: min(1180px, calc(100vw - 48px));
  max-height: min(860px, calc(100dvh - 44px));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  background: transparent;
  box-shadow: 0 30px 90px -35px rgba(15, 23, 42, .65);
}

.adminModal::backdrop {
  background: rgba(15, 23, 42, .32);
  backdrop-filter: blur(5px);
}

.adminShell {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--panelStrong);
  border-radius: inherit;
}

.adminHead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
}

.adminHead h1 { font-size: 24px; line-height: 1.15; }
.adminHead p { margin-top: 8px; color: var(--muted); font-size: 13px; }

.adminTabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 24px 14px;
  border-bottom: 1px solid var(--line);
}

.adminTab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panelStrong);
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.adminTab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.adminStatus {
  min-height: 24px;
  padding: 8px 24px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 740;
}

.adminPanel {
  min-height: 0;
  overflow: auto;
  padding: 16px 24px 24px;
}

.adminPanelHead {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.adminForm {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.adminForm .sendBtn { min-height: 36px; }

.compactForm {
  grid-template-columns: minmax(160px, 240px) auto;
  justify-content: start;
}

.announcementForm {
  grid-template-columns: 180px minmax(260px, 1fr) auto auto auto auto auto;
}

.checkLabel {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.checkLabel input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.adminList {
  display: grid;
  gap: 10px;
}

.adminRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panelStrong);
}

.adminRow strong,
.adminRow span,
.adminRow small {
  display: block;
  min-width: 0;
}

.adminRow strong { font-size: 14px; }
.adminRow span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.adminRow small { margin-top: 5px; color: #8b94a1; font-size: 12px; }

.adminRowActions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dangerBtn {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}

.jsonEditor {
  min-height: 520px;
  border-radius: 16px;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

.statGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.statGrid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panelStrong);
}

.statGrid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.statGrid strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  word-break: break-word;
}

.emptyLine {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .sideRail { display: none; }
  .composerTools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adminForm, .announcementForm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .appShell { padding: 10px; }
  .topbar { height: auto; align-items: flex-start; }
  .brand span { font-size: 16px; }
  .accountCluster { flex-wrap: wrap; }
  .workspace { height: auto; min-height: calc(100dvh - 90px); }
  .chatStage { min-height: calc(100dvh - 92px); border-radius: 20px; }
  .chatScroll { padding: 18px 12px 18px; }
  .composerDock { position: static; margin: 0 12px 12px; }
  .composerPanel {
    min-height: 174px;
    padding: 14px;
  }
  .composerInputRow {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 138px;
    padding: 42px 0 58px;
  }
  .uploadChip {
    width: 76px;
  }
  .uploadChip::before {
    width: 54px;
    height: 54px;
  }
  .agentComposerBar {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
  .choicePill {
    max-width: 132px;
  }
  .fieldGrid, .composerFooter, .modalFilters { grid-template-columns: 1fr; }
  .composerTools { grid-template-columns: 1fr 1fr; }
  .choicePopover,
  .languagePopover {
    left: 0;
    right: auto;
    width: calc(100vw - 48px);
  }
  .choiceGrid,
  .languageGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .templateList { grid-template-columns: 1fr; }
  .templateModal { width: calc(100vw - 20px); }
  .adminModal { width: calc(100vw - 20px); }
  .adminHead, .adminTabs, .adminPanel { padding-left: 14px; padding-right: 14px; }
  .adminForm, .announcementForm, .compactForm, .adminRow, .statGrid { grid-template-columns: 1fr; }
  .adminRowActions { justify-content: flex-start; flex-wrap: wrap; }
}

/* Premium reference-style overrides */
:root {
  --bg: #0b1326;
  --panelGlass: rgba(23, 31, 51, .84);
  --panelStrong: #1c2437;
  --ink: #dae2fd;
  --muted: #aeb8ce;
  --line: rgba(255, 255, 255, .08);
  --field: rgba(255, 255, 255, .03);
  --blue: #d0bcff;
  --blue-dark: #8f48ff;
  --gold: #ffb95f;
}

body {
  background:
    radial-gradient(circle at 14% 10%, rgba(208, 188, 255, .16), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(255, 185, 95, .09), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(93, 105, 255, .12), transparent 32%),
    var(--bg);
}

.appShell {
  position: relative;
  padding: 16px 18px 18px;
}

.appShell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(currentColor 1px, transparent 1px);
  background-size: 18px 18px;
  color: rgba(148, 163, 184, .28);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.topbar,
.sideRail,
.chatStage,
.composerPanel,
.templateModal,
.apiConfigModal,
.adminModal,
.loginPanel,
.demoStage,
.glassPanel {
  backdrop-filter: blur(18px);
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  padding: 0 16px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 19, 38, .82);
  box-shadow: var(--shadow);
}

.workspace {
  height: calc(100dvh - 116px);
}

.sideRail,
.chatStage {
  border-radius: 24px;
  border-color: var(--line);
  background: var(--panelGlass);
}

.newChatBtn {
  background: linear-gradient(135deg, var(--blue), #f2e7ff);
  color: #25104d;
  box-shadow: 0 16px 36px -22px rgba(139, 92, 246, .92);
}

.chatItem {
  border-color: transparent;
  background: rgba(255, 255, 255, .03);
}

.chatItem.active {
  border-color: rgba(208, 188, 255, .32);
  background: rgba(208, 188, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(208, 188, 255, .14);
}

.agentWelcome {
  margin-top: 76px;
}

.welcomeMark {
  background: linear-gradient(135deg, #d0bcff, #ffb95f);
  color: #25104d;
  box-shadow: 0 18px 42px -24px rgba(208, 188, 255, .9);
}

.messageBlock article,
.userRequestCard,
.agentQuestionCard,
.thinkingCard,
.resultItem,
.processingCard,
.choicePopover,
.templateModal,
.apiConfigModal,
.adminModal {
  background: rgba(255, 255, 255, .04);
}

.messageBlock article {
  backdrop-filter: blur(16px);
}

.promptBox,
input,
select,
textarea,
.choicePill,
.apiInlineBtn,
.sendBtn,
.lightBtn,
.secondaryBtn,
.toolBtn {
  border-color: rgba(255, 255, 255, .08);
}

.choicePill,
.apiInlineBtn {
  background: rgba(255, 255, 255, .04);
}

.choicePill[aria-expanded="true"] {
  border-color: rgba(208, 188, 255, .8);
  box-shadow: 0 0 0 1px rgba(208, 188, 255, .22);
}

.choiceGrid button:hover {
  background: rgba(208, 188, 255, .08);
}

.sendBtn {
  background: linear-gradient(135deg, var(--blue), var(--gold));
  color: #25104d;
  box-shadow: 0 18px 38px -24px rgba(208, 188, 255, .7);
}

.sendBtn:hover {
  background: linear-gradient(135deg, #e4d6ff, #ffd59c);
}

.composerPanel {
  border-color: rgba(208, 188, 255, .16);
  background: rgba(11, 19, 38, .88);
  box-shadow:
    0 0 0 1px rgba(208, 188, 255, .08),
    0 26px 92px -54px rgba(139, 92, 246, .72);
}

.uploadChip::before {
  border-color: rgba(255, 255, 255, .08);
}

.uploadChip:hover::before {
  border-color: rgba(208, 188, 255, .55);
}

.templateModal,
.apiConfigModal,
.adminModal {
  border: 1px solid rgba(255, 255, 255, .08);
}

.statGrid article {
  background: rgba(255, 255, 255, .04);
}

@media (max-width: 1100px) {
  .workspace { height: auto; min-height: calc(100dvh - 120px); }
}

@media (max-width: 760px) {
  .topbar { position: static; }
  .workspace { min-height: calc(100dvh - 96px); }
  .sideRail { display: none; }
}

/* Layout pass: closer to the provided AuraGen workspace reference */
body {
  overflow: hidden;
}

.appShell {
  padding: 0;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
}

.topbar {
  position: relative;
  top: auto;
  max-width: none;
  width: 100%;
  height: 76px;
  margin: 0;
  padding: 0 34px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: rgba(9, 16, 31, .92);
  box-shadow: none;
}

.brand {
  font-size: 25px;
  font-weight: 820;
}

.brand img {
  width: 34px;
  height: 34px;
}

.mainNav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 38px;
}

.mainNav a {
  color: #d5d8e8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 720;
}

.mainNav a.active {
  color: var(--blue);
  text-shadow: 0 0 18px rgba(208, 188, 255, .28);
}

.accountCluster {
  gap: 10px;
}

.statusPill {
  display: none;
}

.ghostBtn,
.userPill {
  min-height: 36px;
  background: transparent;
}

.workspace {
  max-width: none;
  width: 100%;
  height: calc(100dvh - 76px);
  min-height: 0;
  margin: 0;
  grid-template-columns: 306px minmax(0, 1fr);
  gap: 0;
}

.sideRail {
  display: flex;
  flex-direction: column;
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: rgba(9, 16, 31, .78);
  box-shadow: none;
  padding: 20px 18px;
}

.newChatBtn {
  min-height: 56px;
  border: 1px solid rgba(208, 188, 255, .24);
  border-radius: 18px;
  background: transparent;
  color: var(--blue);
  font-size: 15px;
  box-shadow: none;
}

.newChatBtn::before {
  content: "+";
  margin-right: 10px;
  font-size: 20px;
  line-height: 1;
}

.sideBlock {
  margin-top: 28px;
}

.sideBlock.compact {
  display: none;
}

.sideTitle {
  padding: 0 6px 12px;
  color: rgba(203, 195, 215, .52);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.chatList {
  gap: 10px;
}

.chatItem {
  min-height: 64px;
  grid-template-columns: minmax(0, 1fr) auto;
  border-radius: 14px;
  padding: 12px 14px;
  background: transparent;
}

.chatItem.active {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .08);
}

.chatItem span {
  font-size: 14px;
}

.chatItem small,
.chatActions {
  display: none;
}

.chatSelect {
  padding: 0;
}

.sideFooter {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.sideFooter button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d5d8e8;
  text-align: left;
  padding: 0 12px;
  font-size: 14px;
}

.sideFooter button:hover {
  background: rgba(255, 255, 255, .05);
}

.chatStage {
  border: 0;
  border-radius: 0;
  background: rgba(8, 14, 29, .74);
  box-shadow: none;
}

.chatScroll {
  padding: 56px 48px 310px;
}

.agentWelcome {
  max-width: 740px;
  margin-top: 46px;
  gap: 16px;
}

.welcomeMark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.agentWelcome strong {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
}

.agentWelcome p {
  max-width: 620px;
  color: rgba(218, 226, 253, .68);
  font-size: 17px;
  line-height: 1.7;
}

.agentConversation {
  max-width: 940px;
  gap: 34px;
}

.userRequestCard {
  width: min(780px, 82vw);
  border-radius: 20px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, .06);
}

.userRequestCard strong {
  font-size: 19px;
  font-weight: 520;
  line-height: 1.7;
}

.assistantName {
  color: var(--blue);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.agentQuestionCard,
.thinkingCard,
.messageBlock article {
  border-radius: 18px;
}

.resultGrid {
  gap: 28px;
}

.generationImages {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 20px;
}

.resultItem {
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
}

.resultItem img {
  border-radius: 17px 17px 0 0;
}

.composerDock {
  left: 306px;
  right: 0;
  bottom: 0;
  inset: auto 0 0 306px;
  padding: 0 42px 30px;
  background: linear-gradient(to top, rgba(8, 14, 29, .98) 0%, rgba(8, 14, 29, .82) 58%, transparent 100%);
}

.composerPanel {
  max-width: 940px;
  min-height: 154px;
  border-radius: 22px;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(13, 21, 39, .92);
  padding: 18px 20px 18px 22px;
  box-shadow:
    0 0 0 1px rgba(208, 188, 255, .07),
    0 32px 90px -54px rgba(139, 92, 246, .95);
}

.composerInputRow {
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 112px;
  padding: 46px 0 48px;
  gap: 18px;
}

.uploadChip {
  width: 52px;
  min-height: 52px;
  align-self: end;
}

.uploadChip::before {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transform: none;
}

.uploadChip:hover::before {
  transform: translateY(-1px);
}

.agentBriefField textarea {
  min-height: 54px;
  font-size: 19px;
  line-height: 1.55;
}

.agentBriefField textarea::placeholder {
  color: rgba(218, 226, 253, .42);
  font-size: 19px;
  font-weight: 460;
}

.agentComposerBar {
  left: 92px;
  right: 20px;
  bottom: 78px;
  justify-content: center;
}

.choicePill,
.apiInlineBtn {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .07);
  font-size: 13px;
}

.agentComposerBar .sendBtn {
  position: absolute;
  right: 0;
  bottom: -68px;
  min-width: 170px;
  height: 64px;
  border-radius: 999px;
  font-size: 20px;
}

.agentComposerBar .sendBtn::after {
  content: " Generate";
}

.engineStatus {
  position: absolute;
  right: 22px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(174, 184, 206, .56);
  font-size: 11px;
  letter-spacing: .04em;
}

.engineStatus span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #24d399;
  box-shadow: 0 0 12px rgba(36, 211, 153, .55);
}

@media (max-width: 1100px) {
  body { overflow: auto; }
  .appShell { min-height: 100dvh; display: block; }
  .topbar { height: auto; min-height: 66px; flex-wrap: wrap; }
  .mainNav { display: none; }
  .workspace {
    height: auto;
    min-height: calc(100dvh - 76px);
    grid-template-columns: 1fr;
  }
  .sideRail { display: none; }
  .chatStage { min-height: calc(100dvh - 76px); }
  .composerDock {
    position: static;
    inset: auto;
    padding: 0 14px 14px;
    background: transparent;
  }
  .composerPanel { max-width: none; }
}

@media (max-width: 760px) {
  .topbar { padding: 12px; }
  .chatScroll { padding: 24px 14px 18px; }
  .agentWelcome strong { font-size: 32px; }
  .generationImages { grid-template-columns: 1fr; }
  .composerInputRow { grid-template-columns: 46px minmax(0, 1fr); padding: 48px 0 62px; }
  .agentComposerBar { left: 14px; right: 14px; bottom: 14px; justify-content: flex-start; }
  .agentComposerBar .sendBtn { position: static; min-width: 90px; height: 44px; font-size: 14px; }
  .agentComposerBar .sendBtn::after { content: ""; }
  .engineStatus { display: none; }
}

/* Exact-console skin based on the provided reference */
:root {
  --console-bg: #081122;
  --console-rail: #091225;
  --console-panel: #111a2e;
  --console-panel-2: #182236;
  --console-border: rgba(221, 226, 255, .09);
  --console-text: #f0f3ff;
  --console-muted: rgba(218, 226, 253, .58);
  --console-primary: #cdb5ff;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--console-bg);
}

body {
  background:
    linear-gradient(180deg, #081122 0%, #081122 100%);
  color: var(--console-text);
}

.appShell {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: 78px minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.appShell::before {
  display: none;
}

.topbar {
  position: relative;
  z-index: 50;
  width: 100%;
  height: 78px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--console-border);
  border-radius: 0;
  background: #081122;
  backdrop-filter: none;
}

.brand {
  gap: 12px;
  color: var(--console-text);
  font-size: 14px;
  font-weight: 800;
}

.brand img {
  width: 32px;
  height: 32px;
  filter: none;
}

.mainNav {
  position: static;
  transform: none;
  justify-self: center;
  gap: 18px;
}

.mainNav a {
  color: rgba(240, 243, 255, .86);
  font-size: 12px;
  font-weight: 500;
}

.mainNav a.active {
  color: var(--console-primary);
  font-weight: 800;
  text-shadow: none;
}

.accountCluster {
  gap: 8px;
}

.statusPill {
  display: none !important;
}

.userPill {
  max-width: 120px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: rgba(240, 243, 255, .86);
  padding: 0;
  font-size: 13px;
}

.ghostBtn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.ghostBtn::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.8px solid rgba(240, 243, 255, .8);
  border-radius: 50%;
}

#adminBtn::before {
  border-radius: 4px;
}

#logoutBtn::before {
  border-radius: 4px;
  border-left-color: transparent;
}

.avatarThumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(205, 181, 255, .35);
  background:
    radial-gradient(circle at 50% 35%, #425f68 0 17%, transparent 18%),
    radial-gradient(circle at 50% 85%, #1d303a 0 32%, transparent 33%),
    linear-gradient(135deg, #0e2530, #1c142d 58%, #443564);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .03);
}

.workspace {
  width: 100%;
  height: calc(100dvh - 78px);
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  margin: 0;
  gap: 0;
}

.sideRail {
  width: 220px;
  min-height: 0;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  border: 0;
  border-right: 1px solid var(--console-border);
  border-radius: 0;
  background: var(--console-rail);
  box-shadow: none;
  backdrop-filter: none;
}

.newChatBtn {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(205, 181, 255, .28);
  border-radius: 16px;
  background: transparent;
  color: var(--console-primary);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.newChatBtn::before {
  content: "+";
  margin-right: 6px;
  font-size: 16px;
  font-weight: 500;
}

.sideBlock {
  margin-top: 14px;
}

.sideBlock.compact {
  display: none;
}

.sideTitle {
  padding: 0 4px 6px;
  color: rgba(218, 226, 253, .38);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.chatList {
  gap: 6px;
}

.chatItem {
  min-height: 40px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--console-text);
}

.chatItem::before {
  content: "";
  width: 10px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 2px;
  opacity: .7;
}

.chatItem.active {
  border-color: rgba(255, 255, 255, .04);
  background: rgba(255, 255, 255, .06);
}

.chatSelect {
  padding: 0;
}

.chatItem span {
  color: rgba(240, 243, 255, .94);
  font-size: 11px;
  font-weight: 520;
}

.chatItem small,
.chatActions {
  display: none !important;
}

.sideFooter {
  margin-top: auto;
  border-top: 1px solid var(--console-border);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.sideFooter button {
  min-height: 30px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(240, 243, 255, .86);
  text-align: left;
  padding: 0 8px 0 24px;
  position: relative;
  font-size: 11px;
}

.sideFooter button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(240, 243, 255, .8);
  border-radius: 50%;
  transform: translateY(-50%);
}

.chatStage {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--console-bg);
  box-shadow: none;
  overflow: hidden;
}

.chatScroll {
  height: 100%;
  padding: 28px 32px 240px;
  overflow-y: auto;
}

.agentWelcome {
  max-width: 560px;
  min-height: 180px;
  margin: 0 auto 0;
  place-content: center;
  gap: 10px;
}

.welcomeMark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #cdb5ff;
  color: #2f145d;
  font-size: 10px;
}

.agentWelcome strong {
  max-width: 560px;
  color: var(--console-text);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.04;
}

.agentWelcome p {
  max-width: 480px;
  color: var(--console-muted);
  font-size: 11px;
  line-height: 1.7;
}

.agentConversation {
  width: min(640px, 100%);
  max-width: 640px;
  margin: 0 auto;
  gap: 18px;
}

.userTurn {
  align-items: flex-end;
}

.assistantTurn {
  align-items: flex-start;
}

.userRequestCard {
  width: min(560px, 100%);
  border: 1px solid rgba(205, 181, 255, .18);
  border-radius: 22px 22px 8px 22px;
  background: rgba(255, 255, 255, .055);
  padding: 22px 28px;
  box-shadow: none;
}

.userRequestCard strong {
  color: var(--console-text);
  font-size: 12px;
  font-weight: 420;
  line-height: 1.7;
}

.requestMeta span {
  background: rgba(255, 255, 255, .07);
  color: var(--console-muted);
}

.assistantName {
  margin-left: 40px;
  color: var(--console-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agentQuestionCard,
.thinkingCard,
.messageBlock article {
  border: 1px solid var(--console-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
  box-shadow: none;
}

.questionPanel {
  background: rgba(255, 255, 255, .035);
}

.optionCard {
  border-color: rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .04);
}

.optionCard.selected {
  border-color: rgba(205, 181, 255, .62);
  background: rgba(205, 181, 255, .1);
}

.resultGrid {
  width: min(640px, 100%);
  margin: 0 auto;
}

.generationImages {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.resultItem {
  border: 1px solid rgba(205, 181, 255, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  overflow: hidden;
}

.resultItem img {
  aspect-ratio: 1;
  border-radius: 18px 18px 0 0;
}

.resultActions {
  min-height: 56px;
  background: rgba(8, 17, 34, .72);
}

.resultActions button,
.resultActions a {
  color: var(--console-primary);
}

.composerDock {
  position: absolute;
  inset: auto 0 0 220px;
  z-index: 30;
  padding: 0 26px 14px;
  pointer-events: none;
  background: linear-gradient(to top, #081122 0%, rgba(8, 17, 34, .92) 52%, rgba(8, 17, 34, 0) 100%);
}

.composerPanel {
  pointer-events: auto;
  width: min(620px, 100%);
  max-width: 620px;
  min-height: 96px;
  margin: 0 auto;
  border: 1px solid var(--console-border);
  border-radius: 22px;
  background: rgba(13, 22, 40, .96);
  box-shadow: none;
  backdrop-filter: none;
  padding: 16px 20px 18px;
}

.composerInputRow {
  min-height: 72px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px;
  padding: 20px 0 24px;
}

.uploadChip {
  width: 30px;
  min-height: 30px;
  align-self: end;
}

.uploadChip::before {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(218, 226, 253, .78);
  border-radius: 50%;
  background:
    linear-gradient(rgba(218, 226, 253, .9), rgba(218, 226, 253, .9)) center / 18px 3px no-repeat,
    linear-gradient(rgba(218, 226, 253, .9), rgba(218, 226, 253, .9)) center / 3px 18px no-repeat,
    transparent;
  transform: none;
  box-shadow: none;
}

.uploadChip:hover::before {
  transform: none;
  border-color: var(--console-primary);
}

.uploadPreviewList {
  top: 14px;
  left: 20px;
  right: 20px;
}

.primaryFields {
  min-height: 0;
}

.agentBriefField textarea {
  min-height: 34px;
  color: var(--console-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  padding: 2px 170px 0 0;
}

.agentBriefField textarea::placeholder {
  color: rgba(218, 226, 253, .35);
  font-size: 12px;
  font-weight: 400;
}

.agentComposerBar {
  position: absolute;
  left: 66px;
  right: 20px;
  bottom: 36px;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.choicePill,
.apiInlineBtn {
  min-height: 28px;
  border: 1px solid rgba(205, 181, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .065);
  color: var(--console-text);
  padding: 0 10px;
  font-size: 10px;
  font-weight: 800;
}

.choicePill[aria-expanded="true"],
.apiInlineBtn.active {
  border-color: rgba(205, 181, 255, .42);
  box-shadow: none;
}

.choicePopover {
  border: 1px solid var(--console-border);
  border-radius: 16px;
  background: rgba(13, 22, 40, .98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}

.choiceTitle {
  color: rgba(218, 226, 253, .54);
  font-size: 11px;
  font-weight: 760;
  padding-bottom: 8px;
}

.agentComposerBar .sendBtn {
  position: absolute;
  right: 0;
  bottom: -28px;
  width: 104px;
  height: 34px;
  min-width: 104px;
  border: 0;
  border-radius: 999px;
  background: #cdb5ff;
  color: #371267;
  font-size: 0;
  font-weight: 900;
  box-shadow: none;
}

.agentComposerBar .sendBtn::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  vertical-align: middle;
  background: currentColor;
  clip-path: polygon(48% 0, 59% 34%, 94% 34%, 65% 54%, 76% 88%, 48% 67%, 20% 88%, 31% 54%, 2% 34%, 37% 34%);
}

.agentComposerBar .sendBtn::after {
  content: "生成";
  display: inline;
  font-size: 11px;
  vertical-align: middle;
}

.engineStatus {
  display: none;
}

/* True EOF full-width override. */
@media (min-width: 901px) {
  html,
  body {
    width: 100% !important;
    overflow: hidden !important;
  }

  .appShell {
    width: 100vw !important;
    max-width: none !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .appShell::before {
    display: none !important;
  }

  .topbar {
    width: 100vw !important;
    max-width: none !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 0 !important;
    background: rgba(7, 11, 18, .78) !important;
    box-shadow: none !important;
    backdrop-filter: blur(18px) !important;
  }

  .workspace {
    width: 100vw !important;
    max-width: none !important;
    height: calc(100dvh - 64px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 252px minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .sideRail {
    display: flex !important;
    flex-direction: column !important;
    width: 252px !important;
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .sideFooter {
    margin-top: auto !important;
    padding-top: 18px !important;
  }

  .chatStage {
    width: 100% !important;
    min-width: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .chatScroll {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* Background polish matching the login/home page. Layout-safe: no sizing changes. */
body {
  background:
    radial-gradient(circle at 18% 18%, rgba(124, 58, 237, .28), transparent 34%),
    radial-gradient(circle at 82% 72%, rgba(6, 182, 212, .18), transparent 30%),
    linear-gradient(180deg, #0c1222, #070b16) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .44;
  background-image: radial-gradient(rgba(148, 163, 184, .38) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.appShell {
  position: relative !important;
  z-index: 1 !important;
}

/* Center welcome title accent. */
.agentWelcome strong::before {
  background: linear-gradient(135deg, #f4e9ff 0%, #c084fc 34%, #8b5cf6 68%, #6d28d9 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  text-shadow: 0 12px 38px rgba(139, 92, 246, .32);
}

/* Sidebar footer pinning. Keep after the layout override. */
@media (min-width: 901px) {
  .sideRail {
    display: flex !important;
    flex-direction: column !important;
  }

  .sideFooter {
    margin-top: auto !important;
    padding-top: 18px !important;
  }
}

/* Actual final full-width override. Keep this block at the end of the file. */
@media (min-width: 901px) {
  html,
  body {
    width: 100% !important;
    overflow: hidden !important;
  }

  .appShell {
    width: 100vw !important;
    max-width: none !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .appShell::before {
    display: none !important;
  }

  .topbar {
    width: 100vw !important;
    max-width: none !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 0 !important;
    background: rgba(7, 11, 18, .78) !important;
    box-shadow: none !important;
    backdrop-filter: blur(18px) !important;
  }

  .workspace {
    width: 100vw !important;
    max-width: none !important;
    height: calc(100dvh - 64px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 252px minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .sideRail {
    display: flex !important;
    flex-direction: column !important;
    width: 252px !important;
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .sideFooter {
    margin-top: auto !important;
    padding-top: 18px !important;
  }

  .chatStage {
    width: 100% !important;
    min-width: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .chatScroll {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* Full-bleed desktop layout: remove the outer left/right gutters. */
@media (min-width: 901px) {
  .appShell {
    width: 100vw !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .topbar {
    width: 100% !important;
    max-width: none !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
    background: rgba(7, 11, 18, .78) !important;
    backdrop-filter: blur(18px) !important;
  }

  .workspace {
    width: 100% !important;
    max-width: none !important;
    height: calc(100dvh - 64px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    grid-template-columns: 252px minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .sideRail {
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .chatStage {
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

/* Final full-width layout */
html,
body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden !important;
}

.appShell {
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 78px minmax(0, 1fr) !important;
  padding: 0 !important;
}

.topbar {
  width: 100% !important;
  max-width: none !important;
  height: 78px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace {
  width: 100% !important;
  max-width: none !important;
  height: calc(100dvh - 78px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 0 !important;
}

.sideRail {
  width: 240px !important;
  min-height: 0 !important;
  padding: 16px 14px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: var(--panelGlass) !important;
  box-shadow: none !important;
  overflow: auto !important;
}

.chatStage {
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--panelGlass) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.chatScroll {
  height: 100% !important;
  padding: 48px 48px 310px !important;
}

.sideFooter {
  margin-top: auto !important;
  padding-top: 18px !important;
  border-top: 1px solid var(--line) !important;
  display: grid !important;
  gap: 8px !important;
}

.sideFooter button {
  min-height: 40px !important;
  padding: 0 12px !important;
  text-align: left !important;
}

.ecomComposerDock {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 18px !important;
  padding: 0 42px 30px !important;
  display: flex !important;
  justify-content: center !important;
  pointer-events: none !important;
}

.ecomComposerShell {
  width: 100% !important;
  max-width: 940px !important;
  margin: 0 auto !important;
  pointer-events: auto !important;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }

  .sideRail {
    width: 220px !important;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto !important;
  }

  .appShell {
    display: block !important;
    min-height: 100dvh !important;
  }

  .topbar {
    height: auto !important;
    min-height: 68px !important;
    padding: 12px 16px !important;
  }

  .workspace {
    height: auto !important;
    min-height: calc(100dvh - 92px) !important;
    display: block !important;
  }

  .sideRail {
    display: none !important;
  }

  .chatStage {
    min-height: calc(100dvh - 92px) !important;
  }

  .chatScroll {
    padding: 28px 16px 20px !important;
  }

  .ecomComposerDock {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 14px 14px !important;
  }

  .ecomComposerShell {
    max-width: none !important;
  }
}

/* Restore pre-background layout */
body {
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 86, 240, .08), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(6, 182, 212, .06), transparent 28%),
    var(--bg) !important;
}

.appShell {
  display: block !important;
  min-height: 100dvh !important;
  padding: 14px 18px 18px !important;
  background: transparent !important;
}

.appShell::before {
  display: none !important;
}

.topbar {
  max-width: 1380px !important;
  height: 58px !important;
  margin: 0 auto 12px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace {
  max-width: 1380px !important;
  width: 100% !important;
  height: calc(100dvh - 102px) !important;
  min-height: 620px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 14px !important;
}

.sideRail {
  display: block !important;
  width: auto !important;
  min-height: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
  background: var(--panelGlass) !important;
  box-shadow: var(--shadow) !important;
  overflow: auto !important;
}

.chatStage {
  position: relative !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: var(--panelGlass) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
}

.chatScroll {
  height: 100% !important;
  overflow-y: auto !important;
  padding: 48px 22px max(330px, 38vh) !important;
}

.ecomComposerDock {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 48px !important;
  z-index: 50 !important;
  padding: 0 26px !important;
  pointer-events: none !important;
  transform: none !important;
  display: flex !important;
  justify-content: center !important;
}

.ecomComposerShell {
  position: relative !important;
  width: 100% !important;
  max-width: 600px !important;
  min-height: 100px !important;
  margin: 0 !important;
  padding: 12px 18px 8px !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: 24px !important;
  background: rgba(13, 22, 40, .96) !important;
  pointer-events: auto !important;
  overflow: visible !important;
  transition: box-shadow .18s ease, transform .18s ease;
}

@media (max-width: 900px) {
  body {
    overflow: auto !important;
  }

  .appShell {
    display: block !important;
    min-height: 100dvh !important;
  }

  .topbar {
    height: auto !important;
    min-height: 68px !important;
    margin: 0 auto 10px !important;
    padding: 12px 16px !important;
  }

  .workspace {
    height: auto !important;
    min-height: calc(100dvh - 92px) !important;
    display: block !important;
  }

  .sideRail {
    display: none !important;
  }

  .chatStage {
    min-height: calc(100dvh - 92px) !important;
  }

  .chatScroll {
    padding: 28px 16px 20px !important;
  }

  .ecomComposerDock {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 14px 14px !important;
  }

  .ecomComposerShell {
    max-width: none !important;
  }
}

/* Final layout restore: keep the login-style background, restore the original page skeleton */
html,
body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden !important;
}

.appShell {
  position: relative !important;
  display: block !important;
  min-height: 100dvh !important;
  padding: 14px 18px 18px !important;
}

.topbar {
  max-width: 1380px !important;
  height: 58px !important;
  margin: 0 auto 12px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace {
  max-width: 1380px !important;
  width: 100% !important;
  height: calc(100dvh - 102px) !important;
  min-height: 620px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 14px !important;
}

.sideRail {
  width: auto !important;
  min-height: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
  background: var(--panelGlass) !important;
  box-shadow: var(--shadow) !important;
  overflow: auto !important;
  display: block !important;
}

.chatStage {
  position: relative !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: var(--panelGlass) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
}

.chatScroll {
  height: 100% !important;
  overflow-y: auto !important;
  padding: 48px 22px max(330px, 38vh) !important;
}

.chatItem {
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 8px 10px !important;
}

.chatActions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  width: auto !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

.chatItem:hover .chatActions,
.chatItem:focus-within .chatActions {
  width: auto !important;
}

.ecomComposerDock {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  bottom: 48px !important;
  z-index: 50 !important;
  padding: 0 26px !important;
  pointer-events: none !important;
  transform: none !important;
  display: flex !important;
  justify-content: center !important;
}

.ecomComposerShell {
  position: relative !important;
  width: 100% !important;
  max-width: 600px !important;
  min-height: 100px !important;
  margin: 0 !important;
  padding: 12px 18px 8px !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: 24px !important;
  background: rgba(13, 22, 40, .96) !important;
  pointer-events: auto !important;
  overflow: visible !important;
  transition: box-shadow .18s ease, transform .18s ease;
}

@media (max-width: 900px) {
  body {
    overflow: auto !important;
  }

  .appShell {
    display: block !important;
    min-height: 100dvh !important;
  }

  .topbar {
    height: auto !important;
    min-height: 68px !important;
    margin: 0 auto 10px !important;
    padding: 12px 16px !important;
  }

  .workspace {
    height: auto !important;
    min-height: calc(100dvh - 92px) !important;
    display: block !important;
  }

  .sideRail {
    display: none !important;
  }

  .chatStage {
    min-height: calc(100dvh - 92px) !important;
  }

  .chatScroll {
    padding: 28px 16px 20px !important;
  }

  .ecomComposerDock {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 14px 14px !important;
  }

  .ecomComposerShell {
    max-width: none !important;
  }
}

/* Layout lock: keep the restored page regions as the final cascade */
body {
  overflow: hidden !important;
}

.appShell {
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 78px minmax(0, 1fr) !important;
  padding: 0 !important;
}

.topbar {
  position: relative !important;
  top: auto !important;
  z-index: 50 !important;
  width: 100% !important;
  height: 78px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(221, 226, 255, .09) !important;
  border-radius: 0 !important;
  background: rgba(8, 17, 34, .78) !important;
  backdrop-filter: blur(18px) !important;
}

.workspace {
  width: 100% !important;
  max-width: none !important;
  height: calc(100dvh - 78px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) !important;
  gap: 0 !important;
}

.sideRail {
  width: 220px !important;
  min-height: 0 !important;
  padding: 16px 14px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  border: 0 !important;
  border-right: 1px solid rgba(221, 226, 255, .09) !important;
  border-radius: 0 !important;
  background: rgba(9, 18, 37, .82) !important;
  box-shadow: none !important;
}

.chatStage {
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(8, 17, 34, .72) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.chatScroll {
  height: 100% !important;
  padding: 28px 32px 240px !important;
}

.ecomComposerDock {
  position: absolute !important;
  left: 220px !important;
  right: 0 !important;
  bottom: 18px !important;
  z-index: 50 !important;
  padding: 0 26px !important;
}

.ecomComposerShell {
  width: 100% !important;
  max-width: 620px !important;
  margin: 0 auto !important;
}

@media (max-width: 900px) {
  body {
    overflow: auto !important;
  }

  .appShell {
    height: auto !important;
    min-height: 100dvh !important;
    display: block !important;
  }

  .topbar {
    height: auto !important;
    min-height: 68px !important;
    padding: 12px 16px !important;
  }

  .workspace {
    height: auto !important;
    min-height: calc(100dvh - 68px) !important;
    display: block !important;
  }

  .sideRail {
    display: none !important;
  }

  .chatStage {
    min-height: calc(100dvh - 68px) !important;
  }

  .chatScroll {
    padding: 28px 16px 20px !important;
  }

  .ecomComposerDock {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 14px 14px !important;
  }
}

/* Final layout recovery: keep background, restore page regions */
body {
  overflow: hidden !important;
}

.appShell {
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 78px minmax(0, 1fr) !important;
  padding: 0 !important;
}

.appShell::before {
  position: fixed !important;
  inset: 0 !important;
}

.topbar {
  position: relative !important;
  top: auto !important;
  z-index: 50 !important;
  width: 100% !important;
  height: 78px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border-bottom: 1px solid rgba(221, 226, 255, .09) !important;
  background: rgba(8, 17, 34, .78) !important;
  backdrop-filter: blur(18px) !important;
}

.workspace {
  width: 100% !important;
  max-width: none !important;
  height: calc(100dvh - 78px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) !important;
  gap: 0 !important;
}

.sideRail {
  width: 220px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 16px 14px 14px !important;
  border-right: 1px solid rgba(221, 226, 255, .09) !important;
  background: rgba(9, 18, 37, .82) !important;
  box-shadow: none !important;
}

.chatStage {
  min-height: 0 !important;
  background: rgba(8, 17, 34, .72) !important;
  overflow: hidden !important;
}

.chatScroll {
  height: 100% !important;
  padding: 28px 32px 240px !important;
}

.ecomComposerDock {
  position: absolute !important;
  left: 220px !important;
  right: 0 !important;
  bottom: 18px !important;
  z-index: 50 !important;
  padding: 0 26px !important;
}

.ecomComposerShell {
  width: 100% !important;
  max-width: 620px !important;
  margin: 0 auto !important;
}

@media (max-width: 900px) {
  body {
    overflow: auto !important;
  }

  .appShell {
    height: auto !important;
    min-height: 100dvh !important;
    display: block !important;
  }

  .topbar {
    height: auto !important;
    min-height: 68px !important;
    padding: 12px 16px !important;
  }

  .workspace {
    height: auto !important;
    min-height: calc(100dvh - 68px) !important;
    display: block !important;
  }

  .sideRail {
    display: none !important;
  }

  .chatStage {
    min-height: calc(100dvh - 68px) !important;
  }

  .chatScroll {
    padding: 28px 16px 20px !important;
  }

  .ecomComposerDock {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 14px 14px !important;
  }
}

/* Chat item hover actions */
.chatItem {
  grid-template-columns: 18px minmax(0, 1fr) auto !important;
}

.chatActions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: width .14s ease, opacity .14s ease;
}

.chatItem:hover .chatActions,
.chatItem:focus-within .chatActions {
  width: 62px;
  opacity: 1;
  pointer-events: auto;
}

.chatRename,
.chatDelete {
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 28px !important;
  border-radius: 999px !important;
  color: rgba(238, 244, 255, .74) !important;
  background: transparent !important;
}

.chatRename:hover,
.chatDelete:hover {
  color: #eef4ff !important;
  background: rgba(255, 255, 255, .09) !important;
}

/* Clean ecom composer */
.ecomComposerDock {
  position: absolute;
  left: 0;
  right: 0;
  width: auto;
  bottom: 48px;
  z-index: 50;
  padding: 0 26px;
  pointer-events: none;
  transform: none;
  display: flex;
  justify-content: center;
}

.ecomComposerShell {
  position: relative;
  width: 100%;
  min-height: 100px;
  max-width: 600px;
  margin: 0;
  padding: 12px 18px 8px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 24px;
  background: rgba(13, 22, 40, .96);
  pointer-events: auto;
  overflow: visible;
  transition: box-shadow .18s ease, transform .18s ease;
}

.ecomComposerShell::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg,
    rgba(124, 58, 237, 0) 0%,
    rgba(99, 102, 241, .85) 18%,
    rgba(56, 189, 248, .9) 42%,
    rgba(236, 72, 153, .88) 66%,
    rgba(245, 158, 11, .82) 82%,
    rgba(124, 58, 237, 0) 100%);
  background-size: 260% 260%;
  opacity: 1;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: ecomComposerBorderFlow 7s linear infinite;
}

.ecomComposerShell::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: inherit;
  background: linear-gradient(120deg,
    rgba(99, 102, 241, .18),
    rgba(56, 189, 248, .22),
    rgba(236, 72, 153, .2),
    rgba(245, 158, 11, .16));
  filter: blur(22px);
  opacity: .82;
  pointer-events: none;
  animation: ecomComposerGlowPulse 6s ease-in-out infinite;
}

@keyframes ecomComposerBorderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes ecomComposerGlowPulse {
  0%, 100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(1.015); opacity: .98; }
}

.ecomComposerShell.hasUploads {
  min-height: 140px;
  padding-top: 54px;
}

.ecomComposerHeader {
  position: absolute;
  top: 12px;
  left: 18px;
  right: 18px;
  display: none;
  align-items: center;
}

.ecomComposerShell.hasUploads .ecomComposerHeader {
  display: flex;
}

.ecomUploadPreviewList {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ecomUploadPreviewList.hasPreview {
  display: flex;
}

.ecomUploadPreviewList .uploadPreviewItem {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}

.ecomUploadPreviewList .uploadPreviewItem img {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
}

.ecomUploadPreviewList .uploadPreviewItem span {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eef4ff;
  font-size: 12px;
}

.ecomUploadPreviewList .removeUploadBtn {
  position: static;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #eef4ff;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  opacity: 1;
  transform: none;
}

.ecomComposerInput {
  position: relative;
  min-height: 116px;
  padding: 12px 16px 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  --composer-control-offset: 0px;
}

.ecomComposerLeft {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  align-content: start;
  max-width: none;
}

.ecomComposerPlus {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #eef4ff;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.ecomComposerPlusWrap {
  position: relative;
}

.ecomComposerMenu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 180px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(8, 13, 24, .98);
  box-shadow: 0 22px 52px rgba(0, 0, 0, .35);
}

.ecomComposerMenu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #eef4ff;
  text-align: left;
  padding: 0 10px;
  font-size: 13px;
}

.ecomComposerMenu button:hover {
  background: rgba(255, 255, 255, .07);
}

.ecomPrimaryFields {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: stretch;
  padding: 0 0 0 var(--composer-control-offset);
}

.ecomBriefField {
  width: 100%;
}

.ecomBriefField textarea {
  width: 100%;
  height: 54px;
  min-height: 54px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #eef4ff;
  padding: 12px 0 0 2px;
  font-size: 14px;
  line-height: 1.5;
  overflow: auto;
  text-align: left;
  direction: ltr;
}

.ecomBriefField textarea::placeholder {
  color: rgba(218, 226, 253, .42);
  font-weight: 500;
}

.ecomUploadStatus {
  position: absolute;
  top: 0;
  left: 0;
  color: rgba(218, 226, 253, .54);
  font-size: 12px;
}

.ecomComposerBar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.ecomChoiceWrap {
  position: relative;
  min-width: 0;
}

.ecomChoiceLabel {
  display: block;
  margin: 0 0 4px 4px;
  color: rgba(218, 226, 253, .48);
  font-size: 9px;
  font-weight: 700;
}

.ecomChoicePill {
  min-width: 82px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #eef4ff;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.ecomChoiceIcon {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 9px;
}

.ecomChoiceIcon.logo-badge {
  font-size: 0;
}

.ecomChoiceIcon.logo-badge::before {
  content: attr(data-icon);
  min-width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  padding: 0 1px;
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
}

.ecomChoicePopover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: 260px;
  max-height: 330px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 16px;
  background: rgba(8, 13, 24, .98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
  z-index: 80;
}

.ecomChoiceTitle {
  margin-bottom: 8px;
  color: rgba(218, 226, 253, .58);
  font-size: 11px;
  font-weight: 800;
}

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

.ecomChoiceGrid button {
  position: relative;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: #eef4ff;
  padding: 0 10px 0 32px;
  font-size: 12px;
  text-align: center;
  justify-content: center;
  gap: 0;
}

.ecomChoiceGrid button::before {
  content: attr(data-icon);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: #fb6b1d;
  color: #fff;
  padding: 0 2px;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.ecomPlatformPopover .ecomChoiceGrid button::before {
  min-width: 16px;
  height: 16px;
  border-radius: 4px;
  padding: 0 2px;
  font-size: 8px;
  letter-spacing: 0;
}

.ecomPlatformPopover .logo-badge.taobao::before { background: #ff6a00; color: #fff; }
.ecomPlatformPopover .logo-badge.ozon::before { background: #6f7480; color: #fff; }
.ecomPlatformPopover .logo-badge.mercado::before { background: #ffe600; color: #21356f; }
.ecomPlatformPopover .logo-badge.tmall::before { background: #d7000f; color: #fff; }
.ecomPlatformPopover .logo-badge.takealot::before { background: #1682d4; color: #fff; }
.ecomPlatformPopover .logo-badge.rakuten::before { background: #fff; color: #c40000; border: 1px solid #e5e7eb; }
.ecomPlatformPopover .logo-badge.amazon::before { background: #fff; color: #111827; }
.ecomPlatformPopover .logo-badge.wildberries::before { background: #b125c8; color: #fff; }
.ecomPlatformPopover .logo-badge.wish::before { background: #35e770; color: #063a1a; }
.ecomPlatformPopover .logo-badge.aliexpress::before { background: #d71920; color: #fff; }
.ecomPlatformPopover .logo-badge.noon::before { background: #f6e500; color: #111827; border-radius: 999px; }
.ecomPlatformPopover .logo-badge.platform1688::before { background: #ff6a00; color: #fff; }
.ecomPlatformPopover .logo-badge.pdd::before { background: #e6322b; color: #fff; }
.ecomPlatformPopover .logo-badge.xhs::before { background: #ff2442; color: #fff; }
.ecomPlatformPopover .logo-badge.tokopedia::before { background: #46d43e; color: #0f2f12; }
.ecomPlatformPopover .logo-badge.ebay::before { background: linear-gradient(90deg, #e53238 0 25%, #0064d2 25% 50%, #f5af02 50% 75%, #86b817 75%); color: #fff; }
.ecomPlatformPopover .logo-badge.coupang::before { background: #e5232e; color: #fff; border-radius: 999px; }
.ecomPlatformPopover .logo-badge.jd::before { background: #e1251b; color: #fff; }
.ecomPlatformPopover .logo-badge.douyin::before,
.ecomPlatformPopover .logo-badge.tiktok::before { background: #050505; color: #fff; text-shadow: -1px 0 #25f4ee, 1px 0 #fe2c55; }
.ecomPlatformPopover .logo-badge.shein::before { background: #050505; color: #fff; }
.ecomPlatformPopover .logo-badge.falabella::before { background: #92d400; color: #111827; }
.ecomPlatformPopover .logo-badge.etsy::before { background: #f16521; color: #fff; }
.ecomPlatformPopover .logo-badge.temu::before { background: #ff6a00; color: #fff; }
.ecomPlatformPopover .logo-badge.shopee::before { background: #ee4d2d; color: #fff; }
.ecomPlatformPopover .logo-badge.cdiscount::before { background: #4f46e5; color: #fff; }
.ecomPlatformPopover .logo-badge.otto::before { background: transparent; color: #e30613; font-size: 14px; }
.ecomPlatformPopover .logo-badge.walmart::before { background: transparent; color: #ffc220; font-size: 15px; }

.ecomLanguagePopover .ecomChoiceGrid button::before {
  background: transparent;
  padding: 0;
  font-size: 14px;
}

.ecomSendBtn {
  min-width: 84px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: #cdb5ff;
  color: #35125f;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 900;
}

.ecomSendBtn::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  clip-path: polygon(48% 0, 59% 34%, 94% 34%, 65% 54%, 76% 88%, 48% 67%, 20% 88%, 31% 54%, 2% 34%, 37% 34%);
}

@media (max-width: 900px) {
  .ecomComposerDock {
    position: static;
    left: auto;
    transform: none;
    width: auto;
    padding: 0 14px 14px;
  }

  .ecomComposerShell {
    width: 100%;
    max-width: none;
  }

  .ecomComposerInput {
    min-height: 156px;
    padding: 12px 12px 12px;
  }

  .ecomComposerBar {
    align-items: stretch;
  }

  .ecomComposerLeft {
    width: auto;
  }

  .ecomSendBtn {
    margin-left: auto;
  }
}

/* Hard composer override */
.composerDock {
  inset: auto 0 48px 220px !important;
}

.composerPanel {
  position: relative !important;
  width: min(600px, 100%) !important;
  max-width: 600px !important;
  min-height: 96px !important;
  margin: 0 auto !important;
  padding: 12px 16px 14px !important;
  border-radius: 24px !important;
}

.composerPanel.hasUploads {
  min-height: 136px !important;
}

.composerHeader {
  display: none !important;
  top: 10px !important;
  left: 16px !important;
  right: 16px !important;
}

.composerPanel.hasUploads .composerHeader {
  display: flex !important;
}

.composerHeader .uploadPreviewList {
  margin-left: 0 !important;
  justify-content: flex-start !important;
}

.composerInputRow {
  display: block !important;
  position: relative !important;
  min-height: 70px !important;
  padding: 0 !important;
}

.composerPanel.hasUploads .composerInputRow {
  padding-top: 44px !important;
}

.composerLeftTools {
  position: absolute !important;
  left: 0 !important;
  bottom: 2px !important;
  z-index: 4 !important;
}

.primaryFields {
  position: relative !important;
  min-height: 70px !important;
  padding-bottom: 40px !important;
}

.agentBriefField textarea {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  resize: none !important;
}

.uploadStatus {
  left: 0 !important;
  top: 0 !important;
}

.agentComposerBar {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  gap: 6px !important;
}

.choiceLabel {
  font-size: 9px !important;
  margin: 0 0 3px 4px !important;
}

.choicePill {
  min-width: 78px !important;
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
}

.choiceIcon {
  width: 16px !important;
  height: 16px !important;
  font-size: 10px !important;
}

.agentComposerBar .sendBtn {
  min-width: 78px !important;
  height: 30px !important;
  padding: 0 14px !important;
}

.composerHeader .uploadPreviewItem {
  height: 34px !important;
}

.composerHeader .uploadPreviewItem .removeUploadBtn {
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  margin-left: 2px !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Composer final overrides */
.composerPanel {
  width: min(620px, 100%) !important;
  max-width: 620px !important;
  min-height: 108px !important;
  padding: 14px 18px 14px !important;
}

.composerPanel.hasUploads {
  min-height: 142px !important;
}

.composerHeader {
  top: 12px !important;
  left: 18px !important;
  right: 18px !important;
}

.composerHeader .uploadPreviewList {
  margin-left: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
}

.composerHeader .uploadPreviewItem {
  height: 34px !important;
  padding: 4px 8px 4px 4px !important;
}

.composerHeader .uploadPreviewItem span {
  max-width: 130px;
}

.composerHeader .uploadPreviewItem .removeUploadBtn {
  position: static;
  width: 18px;
  height: 18px;
  opacity: 1;
  transform: none;
  margin-left: 2px;
}

.composerInputRow {
  position: relative;
  padding: 44px 0 0 !important;
}

.composerPanel.hasUploads .composerInputRow {
  padding-top: 54px !important;
}

.primaryFields {
  min-height: 66px !important;
}

.composerLeftTools {
  position: absolute;
  left: 0;
  bottom: 4px;
  z-index: 4;
}

.agentBriefField textarea {
  min-height: 34px !important;
  padding: 2px 170px 0 36px !important;
  font-size: 13px !important;
}

.uploadStatus {
  left: 36px !important;
  top: 0 !important;
}

.agentComposerBar {
  padding: 0 !important;
  gap: 6px !important;
}

.choiceLabel {
  margin: 0 0 4px 4px !important;
  font-size: 9px !important;
}

.choicePill {
  min-width: 82px !important;
  height: 28px !important;
  padding: 0 9px !important;
  font-size: 10px !important;
}

.choicePopover {
  bottom: calc(100% + 10px) !important;
  top: auto !important;
}

.choiceGrid,
.languageGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.agentComposerBar .sendBtn {
  min-width: 82px !important;
  height: 30px !important;
  padding: 0 16px !important;
}

.engineStatus span {
  background: #21d29a;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 0 22px;
  }
  .mainNav {
    gap: 22px;
  }
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sideRail {
    width: 220px;
  }
  .composerDock {
    left: 220px;
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    overflow: auto;
  }
  .appShell {
    height: auto;
    min-height: 100dvh;
    display: block;
  }
  .topbar {
    height: auto;
    min-height: 68px;
    display: flex;
    padding: 12px 16px;
  }
  .mainNav {
    display: none;
  }
  .avatarThumb,
  .userPill {
    display: none;
  }
  .workspace {
    height: auto;
    display: block;
  }
  .sideRail {
    display: none;
  }
  .chatStage {
    min-height: calc(100dvh - 68px);
  }
  .chatScroll {
    padding: 28px 16px 20px;
  }
  .composerDock {
    position: static;
    inset: auto;
    padding: 0 14px 14px;
    background: transparent;
  }
  .composerPanel {
    width: 100%;
    min-height: 178px;
  }
  .agentComposerBar {
    left: 14px;
    right: 14px;
    bottom: 14px;
    justify-content: flex-start;
  }
  .agentComposerBar .sendBtn {
    position: static;
    width: auto;
    min-width: 112px;
    height: 46px;
    font-size: 0;
  }
  .agentComposerBar .sendBtn::after {
    font-size: 14px;
  }
  .engineStatus {
    display: none;
  }
  .generationImages {
    grid-template-columns: 1fr;
  }
}

/* Final workspace overrides */
body {
  background: var(--bg) !important;
}

.appShell {
  position: relative !important;
  isolation: isolate;
  padding: 22px !important;
  background: transparent !important;
}

.appShell::before {
  display: none;
}

.workspace,
.chatStage,
.chatScroll {
  background: transparent !important;
}

.topbar {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  width: min(1180px, 100%) !important;
  height: 46px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace {
  max-width: 1180px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  grid-template-columns: minmax(410px, 1fr) 410px !important;
  gap: 22px !important;
}

.sideRail {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.chatStage {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.chatScroll {
  padding: 28px 0 max(330px, 38vh) !important;
}

.composerDock {
  left: 0 !important;
  right: 0 !important;
  padding: 0 !important;
  bottom: 18px !important;
}

.composerPanel {
  max-width: 680px !important;
  border-color: rgba(255, 255, 255, .18) !important;
  background: rgba(17, 19, 24, .82) !important;
}

.mainNav {
  display: none !important;
}

.sideFooter {
  padding-left: 10px !important;
}

.sideFooter button {
  padding-left: 34px !important;
}

#apiSettingsBtn::before {
  border-radius: 3px !important;
}

.userMenuWrap {
  position: relative;
}

.userMenuBtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px 0 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
}

.userMenuBtn .avatarThumb {
  width: 28px;
  height: 28px;
}

.menuChevron {
  color: rgba(240, 243, 255, .74);
  font-size: 12px;
}

.userMenu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(11, 19, 38, .98);
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, .6);
  z-index: 60;
}

.userMenuHeader {
  padding: 4px 8px 10px;
}

.userMenuHeader strong,
.userMenuHeader small {
  display: block;
}

.userMenuHeader strong {
  font-size: 14px;
}

.userMenuHeader small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.userMenuAction {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 10px;
}

.userMenuAction:hover {
  background: rgba(255, 255, 255, .06);
}

.chatItem {
  grid-template-columns: minmax(0, 1fr) auto;
}

.chatActions {
  display: flex;
}

.composerDock {
  inset: auto 0 52px 220px !important;
}

.composerPanel {
  position: relative;
  width: min(620px, 100%);
  max-width: 620px;
  margin: 0 auto;
  padding-top: 54px;
  overflow: visible;
}

.composerTopBar {
  position: absolute;
  top: 12px;
  left: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  z-index: 2;
}

.composerTopBar .choiceWrap {
  min-width: 120px;
}

.agentWelcome strong {
  color: transparent;
  position: relative;
}

.agentWelcome strong::before {
  content: "WingGo电商智能助手";
  color: var(--console-text);
  position: absolute;
  inset: 0;
}

.agentBriefField textarea::placeholder {
  color: rgba(218, 226, 253, .35);
}

.engineStatus {
  display: none;
}

.agentComposerBar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.topbar .brand span {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .composerDock {
    inset: auto 0 56px 220px !important;
  }
}

@media (max-width: 900px) {
  .mainNav,
  .userMenu {
    display: none !important;
  }
  .composerDock {
    inset: auto !important;
  }
}

.composerPanel {
  position: relative !important;
  width: min(620px, 100%) !important;
  max-width: 620px !important;
  min-height: 140px !important;
  margin: 0 auto !important;
  padding-top: 88px !important;
  overflow: visible !important;
}

.composerHeader {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.composerPanel.hasUploads .composerHeader {
  display: flex;
}

.composerPanel.hasUploads .composerInputRow {
  padding-top: 84px !important;
}

/* Final structural restore: left rail, main area, top account cluster, centered composer */
body {
  overflow: hidden !important;
}

.appShell {
  display: block !important;
  min-height: 100dvh !important;
  padding: 14px 18px 18px !important;
}

.topbar {
  width: 100% !important;
  max-width: 1380px !important;
  height: 58px !important;
  margin: 0 auto 12px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace {
  width: 100% !important;
  max-width: 1380px !important;
  height: calc(100dvh - 102px) !important;
  min-height: 620px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 14px !important;
}

.sideRail {
  display: block !important;
  width: auto !important;
  min-height: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 22px !important;
  background: var(--panelGlass) !important;
  box-shadow: var(--shadow) !important;
  overflow: auto !important;
}

.chatStage {
  position: relative !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: var(--panelGlass) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
}

.chatScroll {
  height: 100% !important;
  overflow-y: auto !important;
  padding: 48px 22px max(330px, 38vh) !important;
}

.ecomComposerDock {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 48px !important;
  z-index: 50 !important;
  padding: 0 26px !important;
  display: flex !important;
  justify-content: center !important;
  pointer-events: none !important;
}

.ecomComposerShell {
  width: 100% !important;
  max-width: 600px !important;
  min-height: 100px !important;
  margin: 0 !important;
  padding: 12px 18px 8px !important;
  pointer-events: auto !important;
}

@media (max-width: 900px) {
  body {
    overflow: auto !important;
  }

  .appShell {
    min-height: 100dvh !important;
  }

  .topbar {
    height: auto !important;
    min-height: 68px !important;
    margin: 0 auto 10px !important;
    padding: 12px 16px !important;
  }

  .workspace {
    height: auto !important;
    min-height: calc(100dvh - 92px) !important;
    display: block !important;
  }

  .sideRail {
    display: none !important;
  }

  .chatStage {
    min-height: calc(100dvh - 92px) !important;
  }

  .chatScroll {
    padding: 28px 16px 20px !important;
  }

  .ecomComposerDock {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    padding: 0 14px 14px !important;
  }

  .ecomComposerShell {
    max-width: none !important;
  }
}

.composerLeftTools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.composerPlusWrap {
  position: relative;
  flex: 0 0 auto;
}

.composerPlus {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.composerMenu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 150px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(10, 15, 28, .96);
  box-shadow: 0 20px 44px -28px rgba(0, 0, 0, .8);
}

.composerMenu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 10px;
  font-size: 12px;
}

.composerMenu button:hover {
  background: rgba(255, 255, 255, .06);
}

.composerSlash {
  margin-left: 4px;
  color: rgba(218, 226, 253, .36);
  font-size: 18px;
  line-height: 1;
}

.composerHeader .uploadPreviewList {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  width: auto;
  margin-left: auto;
}

.composerHeader .uploadPreviewList.hasPreview {
  display: flex;
}

.composerHeader .uploadPreviewItem {
  min-width: 0;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}

.composerHeader .uploadPreviewItem img {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
}

.composerHeader .uploadPreviewItem span {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink);
}

.composerHeader #uploadName {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  font-size: 12px;
}

.composerInputRow {
  min-height: 72px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px;
  padding: 22px 0 18px !important;
}

.primaryFields {
  position: relative;
  min-height: 72px;
}

.agentBriefField textarea {
  min-height: 34px;
  padding: 2px 170px 0 0;
  font-size: 13px;
}

.agentComposerBar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.agentComposerBar .choiceWrap {
  min-width: 0;
  position: relative;
}

.agentComposerBar .sendBtn {
  min-width: 96px;
  height: 34px;
  font-size: 0;
}

.choiceLabel {
  display: block;
  margin: 0 0 4px 4px;
  color: rgba(218, 226, 253, .46);
  font-size: 10px;
  font-weight: 700;
}

.choicePill {
  min-width: 88px;
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
  gap: 6px;
}

.choiceIcon {
  width: 18px;
  height: 18px;
  font-size: 11px;
}

.choicePopover {
  bottom: calc(100% + 10px);
  top: auto;
}

.choicePopover.platformPopover,
.choicePopover.languagePopover {
  left: 0;
  right: auto;
  min-width: 240px;
}

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

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

.agentComposerBar .sendBtn {
  min-width: 86px;
  padding: 0 16px;
}

.engineStatus {
  display: none;
}

/* True final full-width override. This must stay at EOF. */
@media (min-width: 901px) {
  html,
  body {
    width: 100% !important;
    overflow: hidden !important;
  }

  .appShell {
    width: 100vw !important;
    max-width: none !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .appShell::before {
    display: none !important;
  }

  .topbar {
    width: 100vw !important;
    max-width: none !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 0 !important;
    background: rgba(7, 11, 18, .78) !important;
    box-shadow: none !important;
    backdrop-filter: blur(18px) !important;
  }

  .workspace {
    width: 100vw !important;
    max-width: none !important;
    height: calc(100dvh - 64px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 252px minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .sideRail {
    display: flex !important;
    flex-direction: column !important;
    width: 252px !important;
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .sideFooter {
    margin-top: auto !important;
    padding-top: 18px !important;
  }

  .chatStage {
    width: 100% !important;
    min-width: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .chatScroll {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* Background polish matching the login/home page. Layout-safe: no sizing changes. */
body {
  background:
    radial-gradient(circle at 18% 18%, rgba(124, 58, 237, .28), transparent 34%),
    radial-gradient(circle at 82% 72%, rgba(6, 182, 212, .18), transparent 30%),
    linear-gradient(180deg, #0c1222, #070b16) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .44;
  background-image: radial-gradient(rgba(148, 163, 184, .38) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.appShell {
  position: relative !important;
  z-index: 1 !important;
}

/* Center welcome title accent. Keep at EOF. */
.agentWelcome strong::before {
  background: linear-gradient(135deg, #f4e9ff 0%, #c084fc 34%, #8b5cf6 68%, #6d28d9 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  text-shadow: 0 12px 38px rgba(139, 92, 246, .32);
}
/* Background enhancement deployed 2026-05-25. Layout-safe: color, texture and surface only. */
body {
  background:
    linear-gradient(118deg, rgba(37, 99, 235, .2) 0%, rgba(37, 99, 235, 0) 36%),
    linear-gradient(244deg, rgba(168, 85, 247, .22) 0%, rgba(168, 85, 247, 0) 38%),
    linear-gradient(180deg, #111a2d 0%, #090d19 46%, #070b14 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background:
    repeating-linear-gradient(0deg, rgba(148, 163, 184, .12) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, .1) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 42%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .72) 54%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .72) 54%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 64px 0 0;
  z-index: 0;
  pointer-events: none;
  opacity: .82;
  background:
    linear-gradient(126deg, transparent 0 12%, rgba(34, 211, 238, .15) 12% 20%, transparent 20% 42%, rgba(236, 72, 153, .1) 42% 51%, transparent 51% 100%),
    linear-gradient(72deg, rgba(245, 158, 11, .09) 0%, transparent 32%, rgba(20, 184, 166, .11) 68%, transparent 100%);
  mix-blend-mode: screen;
}

.topbar {
  background: rgba(7, 11, 18, .68) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06), 0 18px 55px rgba(0, 0, 0, .18) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.18) !important;
  backdrop-filter: blur(22px) saturate(1.18) !important;
}

.sideRail {
  background: linear-gradient(180deg, rgba(22, 27, 46, .9), rgba(10, 14, 28, .78)) !important;
  border-color: rgba(255, 255, 255, .1) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05), 18px 0 60px rgba(0, 0, 0, .16) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.14) !important;
  backdrop-filter: blur(20px) saturate(1.14) !important;
}

.chatStage {
  background: linear-gradient(180deg, rgba(15, 20, 38, .78), rgba(7, 10, 22, .64)) !important;
  border-color: rgba(255, 255, 255, .08) !important;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .05) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12) !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
}

.ecomComposerShell,
.messageBlock article,
.thinkingCard,
.agentQuestionCard {
  box-shadow: 0 26px 86px -48px rgba(0, 0, 0, .86), 0 0 0 1px rgba(255, 255, 255, .04) !important;
}
/* Composer upload preview fix deployed 2026-05-25.
   Keeps layout position unchanged, but lets the composer frame grow with previews. */
.ecomComposerShell {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 100px !important;
  height: auto !important;
  padding: 12px 18px 10px !important;
}

.ecomComposerShell.hasUploads {
  min-height: 164px !important;
  padding-top: 12px !important;
}

.ecomComposerHeader {
  position: static !important;
  display: none !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
}

.ecomComposerShell.hasUploads .ecomComposerHeader {
  display: block !important;
}

.ecomUploadPreviewList {
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  max-height: 86px !important;
  overflow-y: auto !important;
  padding: 0 2px 2px 0 !important;
}

.ecomUploadPreviewList .uploadPreviewItem {
  flex: 0 1 auto !important;
  max-width: 100% !important;
}

.ecomComposerInput {
  width: 100% !important;
  min-height: 116px !important;
  flex: 1 0 auto !important;
}

.ecomComposerShell.hasUploads .ecomComposerInput {
  min-height: 116px !important;
}

.ecomBriefField textarea {
  min-height: 54px !important;
}
/* Side footer alignment deployed 2026-05-25.
   Lift bottom-left buttons so they visually align with the center composer. */
@media (min-width: 901px) {
  .sideFooter {
    padding-bottom: 56px !important;
  }
}
