:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --line: #dce4ef;
  --brand: #1166d8;
  --brand-deep: #0b3b87;
  --accent: #00a6a6;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(20, 38, 72, 0.12);
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #0d0d0d;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.is-hidden {
  display: none;
}

.access-screen {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  overflow: hidden;
  padding: 32px clamp(22px, 5vw, 72px);
  background: #0d0d0d;
  isolation: isolate;
}

.access-screen.is-hidden {
  display: none;
}

.access-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 650px);
  padding-top: 42px;
  color: #fff;
}

.access-video,
.access-video-scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.access-video {
  object-fit: cover;
  object-position: 68% center;
  background: #0d0d0d;
  filter: grayscale(1) brightness(0.68) contrast(1.08);
}

.access-video-scrim {
  z-index: 1;
  background: rgba(0, 0, 0, 0.68);
}

.access-nav {
  position: fixed;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(22px, 5vw, 72px);
  color: #fff;
}

.access-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.access-brand img {
  width: 30px;
  height: 38px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.access-brand i {
  color: #7dd3fc;
  font-size: 22px;
  font-style: normal;
}

.access-nav-links,
.access-nav-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(14px, 1.7vw, 19px);
}

.access-nav-links b {
  color: rgba(255, 255, 255, 0.48);
}

.access-nav-note {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.access-menu-toggle,
.access-mobile-menu {
  display: none;
}

.access-intro,
.access-typewriter {
  margin: 0;
  max-width: 680px;
  font-size: clamp(20px, 3.2vw, 34px);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: 0;
}

.access-intro {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
  user-select: none;
}

.access-typewriter {
  min-height: 2.7em;
  color: #fff;
}

#access-title {
  display: none;
}

.access-typewriter::after {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 5px;
  background: currentColor;
  content: "";
  vertical-align: -0.08em;
  animation: access-cursor 1s step-end infinite;
}

.access-typewriter.is-complete::after {
  display: none;
}

@keyframes access-cursor {
  50% { opacity: 0; }
}

.access-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 28px;
  opacity: 0;
  transform: translateY(10px);
  animation: access-tags-enter 0.45s ease 0.55s forwards;
}

@keyframes access-tags-enter {
  to { opacity: 1; transform: translateY(0); }
}

.access-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  font-size: 24px;
  font-weight: 800;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  font-size: 19px;
  flex: 0 0 auto;
}

.brand-mark.company-mark {
  width: 58px;
  height: 80px;
  background: #fff;
  border: 0;
}

.brand-mark.small.company-mark {
  width: 34px;
  height: 48px;
}

.company-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  margin: 22px 0 6px;
  color: var(--brand-deep);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name.compact {
  margin: 0;
}

.brand-subtitle,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.value-prop {
  margin: 18px 0 32px;
  color: #43546d;
  font-size: 16px;
  line-height: 1.75;
}

.access-form {
  width: min(100%, 530px);
}

#access-form > :not(.auth-content) {
  display: none;
}

.auth-content {
  display: grid;
  gap: 9px;
}

.auth-tabs {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.2);
}

.auth-tab {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.auth-tab.is-active {
  color: #111;
  background: #fff;
}

.auth-content > input,
.registration-fields input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.auth-content > input::placeholder,
.registration-fields input::placeholder { color: rgba(255, 255, 255, 0.62); }
.auth-content > input:focus,
.registration-fields input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16); }
.auth-content label { margin: 3px 0 -2px; }
.registration-fields { display: grid; gap: 9px; }
.registration-fields.is-hidden { display: none; }
.auth-content .access-row button { width: 100%; min-height: 50px; }

.access-form label,
.composer label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.access-row,
.composer-row {
  display: flex;
  gap: 10px;
}

.access-row input,
.agent-select select,
.composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.access-row input {
  min-width: 0;
  height: 54px;
  padding: 0 17px;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.access-row input::placeholder { color: rgba(255, 255, 255, 0.68); }

.access-row input:focus,
.agent-select select:focus,
.composer textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(17, 102, 216, 0.13);
}

.access-row button,
.new-session,
.composer button {
  min-height: 44px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.access-row button {
  min-height: 54px;
  padding: 0 22px;
  color: #0e1d37;
  background: #fff;
}

.access-row button:hover { background: #dff5ff; }

.access-form label { color: rgba(255, 255, 255, 0.9); }

.form-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: #fecaca;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .access-screen {
    align-items: flex-end;
    padding: 24px 22px 52px;
  }

  .access-nav {
    padding: 18px 22px;
  }

  .access-brand {
    gap: 8px;
    font-size: 19px;
  }

  .access-brand img {
    width: 26px;
    height: 34px;
  }

  .access-nav-links,
  .access-nav-note {
    display: none;
  }

  .access-menu-toggle {
    display: grid;
    gap: 5px;
    width: 42px;
    height: 42px;
    place-content: center;
    padding: 0;
    color: #fff;
    background: transparent;
  }

  .access-menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    background: currentColor;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .access-menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .access-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .access-menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .access-mobile-menu {
    position: fixed;
    z-index: 4;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 32px 22px;
    color: #fff;
    background: rgba(5, 14, 30, 0.94);
    font-size: 30px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  .access-mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .access-panel {
    width: 100%;
    padding-top: 0;
  }

  .access-intro,
  .access-typewriter {
    font-size: clamp(21px, 6.5vw, 29px);
  }

  .access-intro { margin-bottom: 17px; }
  .access-tags { margin: 18px 0 22px; }
  .access-tags span { min-height: 31px; font-size: 13px; }
}

@media (max-width: 440px) {
  .access-row { flex-direction: column; }
  .access-row button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .access-typewriter::after,
  .access-tags { animation: none; }
  .access-tags { opacity: 1; transform: none; }
}

.workbench-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 16px;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.workbench-screen.is-hidden {
  display: none;
}

.workbench-video,
.workbench-video-scrim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.workbench-video {
  z-index: 0;
  object-fit: cover;
  object-position: 68% center;
  background: #0a1322;
  filter: grayscale(1) brightness(0.58) contrast(1.12);
}

.workbench-video-scrim {
  z-index: 1;
  background: rgba(0, 0, 0, 0.38);
}

.workbench-screen > .sidebar,
.workbench-screen > .chat-panel {
  position: relative;
  z-index: 2;
}

.sidebar,
.chat-panel,
.inspector {
  min-width: 0;
  border: 1px solid rgba(220, 228, 239, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(20, 38, 72, 0.08);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.new-session {
  width: 100%;
}

.session-list {
  display: grid;
  gap: 6px;
}

.account-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #5a5a5a;
  border-radius: 50%;
  color: #ededed;
  background: #2b2b2b;
  font-size: 14px;
  font-weight: 800;
}

.account-details {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-details strong {
  color: #ededed;
  font-size: 13px;
}

.account-details span {
  color: #959595;
  font-size: 11px;
}

.logout-button {
  margin-left: auto;
  padding: 7px 8px;
  border-radius: 6px;
  color: #bdbdbd;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.password-button {
  padding: 7px 8px;
  border-radius: 6px;
  color: #bdbdbd;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.password-button:hover,
.password-button:focus-visible {
  color: #fff;
  background: #333;
}

.password-dialog {
  width: min(calc(100vw - 32px), 400px);
  padding: 0;
  border: 1px solid #474747;
  border-radius: 10px;
  color: #f0f0f0;
  background: #202020;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

.password-dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.password-form { display: grid; gap: 10px; padding: 22px; }
.password-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.password-dialog-heading p { margin: 0 0 3px; color: #9e9e9e; font-size: 12px; font-weight: 700; }
.password-dialog-heading h2 { margin: 0; color: #fff; font-size: 20px; }
.dialog-close { width: 30px; height: 30px; border-radius: 6px; color: #bbb; background: transparent; font-size: 24px; line-height: 1; }
.dialog-close:hover { color: #fff; background: #343434; }
.password-form label { color: #d5d5d5; font-size: 13px; font-weight: 700; }
.password-form input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #494949; border-radius: 7px; color: #fff; background: #292929; outline: none; }
.password-form input:focus { border-color: #aaa; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.password-hint { margin: -2px 0 0; color: #a5a5a5; font-size: 12px; }
.password-form .form-message { min-height: 18px; margin: 0; color: #f1f1f1; }
.password-submit { min-height: 42px; margin-top: 2px; border-radius: 7px; color: #111; background: #ededed; font-weight: 800; }
.password-submit:hover { background: #fff; }

.logout-button:hover,
.logout-button:focus-visible {
  color: #fff;
  background: #333;
}

.session-row {
  position: relative;
  display: block;
}

.session-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 6px 38px 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.session-item span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-item small {
  color: var(--muted);
  font-size: 13px;
}

.session-item.active,
.session-item:hover {
  border-color: rgba(17, 102, 216, 0.18);
  background: #eef6ff;
}

.session-menu-trigger {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.session-row:hover .session-menu-trigger,
.session-row:focus-within .session-menu-trigger {
  opacity: 1;
}

.session-menu-trigger:hover,
.session-menu-trigger:focus-visible {
  border-color: rgba(17, 102, 216, 0.2);
  color: var(--brand-deep);
  background: #eef6ff;
  transform: translateY(-50%) scale(1.04);
}

.session-menu {
  position: absolute;
  z-index: 10;
  top: 42px;
  right: 0;
  display: grid;
  min-width: 132px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 38, 72, 0.16);
}

.session-menu-action {
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.session-menu-action:hover,
.session-menu-action:focus-visible {
  background: #eef6ff;
}

.session-menu-action.danger {
  color: #b62d35;
}

.session-menu-action.danger:hover,
.session-menu-action.danger:focus-visible {
  background: #fff1f2;
}

.chat-panel {
  display: grid;
  min-height: calc(100vh - 32px);
  grid-template-rows: auto minmax(280px, 1fr) auto;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.agent-select {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.agent-select select {
  height: 42px;
  padding: 0 12px;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  overflow: auto;
  background:
    linear-gradient(rgba(248, 250, 252, 0.74), rgba(248, 250, 252, 0.74)),
    linear-gradient(120deg, rgba(0, 166, 166, 0.08), transparent 52%);
}

.message {
  max-width: min(76%, 720px);
  padding: 13px 15px;
  border-radius: 8px;
  line-height: 1.65;
}

.message p {
  margin: 0;
}

.message-content {
  display: grid;
  gap: 10px;
}

.message-content > :first-child {
  margin-top: 0;
}

.message-content > :last-child {
  margin-bottom: 0;
}

.message-content h3 {
  margin: 10px 0 2px;
  color: var(--brand-deep);
  font-size: 16px;
  line-height: 1.45;
}

.message-content p {
  margin: 0;
}

.message-content ol,
.message-content ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.35em;
}

.message-content li {
  padding-left: 3px;
}

.markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
}

.markdown-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

.markdown-table-wrap th,
.markdown-table-wrap td {
  min-width: 112px;
  padding: 9px 11px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

.markdown-table-wrap th {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.markdown-table-wrap tr:last-child td { border-bottom: 0; }
.markdown-table-wrap th:last-child,
.markdown-table-wrap td:last-child { border-right: 0; }

.message-content strong {
  color: #123565;
}

.generated-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.generated-image-gallery figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid #424242;
  border-radius: 8px;
  background: #171717;
}

.generated-image-gallery img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  background: #262626;
}

.generated-image-gallery figcaption {
  display: flex;
  gap: 14px;
  padding: 9px 11px;
}

.generated-image-gallery a {
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.generated-image-gallery a:hover { text-decoration: underline; }

.message p.is-revealing,
.message-content.is-revealing {
  animation: reply-appear 0.28s ease-out;
}

.thinking-message {
  min-width: 206px;
  border-style: dashed;
}

.thinking-label {
  margin: 0;
  color: #ffffff;
  white-space: nowrap;
}

@keyframes reply-appear {
  from {
    opacity: 0.2;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.assistant {
  align-self: flex-start;
  border: 1px solid var(--line);
  background: #fff;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.export-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #505050;
  border-radius: 6px;
  color: #dedede;
  background: #292929;
  font-size: 12px;
  font-weight: 700;
}

.export-actions button:hover,
.export-actions button:focus-visible {
  border-color: #888;
  color: #151515;
  background: #f1f1f1;
}

.export-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.message.user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
}

.composer {
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer textarea {
  height: 44px;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 10px 12px;
  line-height: 1.55;
}

.composer textarea::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.attachment-chip {
  display: flex;
  align-items: center;
  width: min(100%, 980px);
  gap: 8px;
  margin: 0 auto 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  color: #d9d9d9;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.attachment-chip.is-hidden { display: none; }

.attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button,
.composer .attachment-button {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #d5d5d5;
  background: transparent;
  box-shadow: none;
}

.composer .image-generator-button {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #d5d5d5;
  background: transparent;
  box-shadow: none;
  font-size: 18px;
}

.composer .image-generator-button:hover,
.composer .image-generator-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.image-dialog {
  width: min(calc(100vw - 32px), 560px);
  padding: 0;
  border: 1px solid #474747;
  border-radius: 8px;
  color: #f2f2f2;
  background: #1c1c1c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.image-dialog::backdrop { background: rgba(0, 0, 0, 0.64); }

.image-dialog-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.image-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.image-dialog-heading p {
  margin: 0 0 4px;
  color: #a3a3a3;
  font-size: 12px;
  font-weight: 800;
}

.image-dialog-heading h2 { margin: 0; font-size: 22px; }

.image-dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #454545;
  border-radius: 6px;
  color: #e8e8e8;
  background: transparent;
  font-size: 23px;
  line-height: 1;
}

.image-dialog label,
.image-size-fieldset legend {
  color: #d9d9d9;
  font-size: 13px;
  font-weight: 800;
}

.image-dialog textarea {
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border: 1px solid #494949;
  border-radius: 7px;
  color: #f5f5f5;
  background: #252525;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.image-dialog textarea:focus { outline: 2px solid #8d8d8d; outline-offset: 1px; }
.image-dialog textarea::placeholder { color: #939393; }

.image-size-fieldset { display: flex; flex-direction: column; align-items: flex-start; margin: 0; padding: 0; border: 0; }
.image-size-fieldset legend { display: block; margin: 0 0 16px; padding: 0; }
.image-size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.image-size-options label { position: relative; cursor: pointer; }
.image-size-options input { position: absolute; opacity: 0; pointer-events: none; }
.image-size-options span {
  display: block;
  min-width: 76px;
  padding: 9px 12px;
  border: 1px solid #484848;
  border-radius: 6px;
  color: #cacaca;
  background: #242424;
  text-align: center;
}
.image-size-options input:checked + span { border-color: #f0f0f0; color: #171717; background: #f0f0f0; }
.image-dialog-message { min-height: 18px; margin: -5px 0 0; color: #d4d4d4; font-size: 13px; }
.image-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.image-dialog-actions button { min-height: 40px; padding: 0 16px; border-radius: 7px; font-weight: 800; }
.image-dialog-cancel { border: 1px solid #4a4a4a; color: #efefef; background: transparent; }
.image-dialog-submit { border: 1px solid #f2f2f2; color: #171717; background: #f2f2f2; }
.image-dialog-submit:disabled { opacity: 0.55; }

.attachment-chip button { margin-left: auto; font-size: 20px; }
.composer .attachment-button { font-size: 17px; }
.attachment-chip button:hover,
.composer .attachment-button:hover { color: #fff; background: rgba(255, 255, 255, 0.11); }

.composer .attachment-chip button {
  display: grid;
  position: relative;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  align-self: center;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: transparent !important;
  background: transparent !important;
  font-size: 19px;
  line-height: 1;
}

.composer .attachment-chip button:hover {
  background: rgba(255, 255, 255, 0.11) !important;
}

.composer .attachment-chip button::before,
.composer .attachment-chip button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: #c8c8c8;
  content: "";
}

.composer .attachment-chip button::before { transform: translate(-50%, -50%) rotate(45deg); }
.composer .attachment-chip button::after { transform: translate(-50%, -50%) rotate(-45deg); }

.composer .attachment-button {
  position: relative;
  color: transparent !important;
  background: transparent !important;
}

.composer .attachment-button::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 15px;
  border: 1.5px solid #bdbdbd;
  border-radius: 6px;
  content: "";
  transform: translate(-50%, -50%) rotate(42deg);
}

.composer .attachment-button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 10px;
  border: 1.5px solid #bdbdbd;
  border-radius: 4px;
  content: "";
  transform: translate(-50%, -50%) rotate(42deg);
}

.composer button {
  align-self: stretch;
  padding: 0 22px;
}

.composer label {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 44px;
  margin: 0;
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.composer button.is-stop {
  display: grid;
  position: relative;
  width: 46px;
  min-width: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid #3d3d3d;
  border-radius: 50%;
  color: transparent;
  background: #242424;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.composer button.is-stop::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 10px;
  height: 10px;
  margin: 0;
  border-radius: 2px;
  background: #f5f5f5;
  content: "";
  transform: translate(-50%, -50%);
}

.inspector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.prompt-section,
.contact-card {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.contact-card {
  border-bottom: 0;
}

.prompt-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.prompt-actions button {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-soft);
  font-weight: 700;
  text-align: left;
}

.prompt-actions button:hover {
  border-color: rgba(0, 166, 166, 0.42);
  background: #effafa;
}

.contact-card p:not(.eyebrow) {
  margin: 12px 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.7;
}

.contact-card a {
  color: var(--brand-deep);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* Fixed application workspace: only the conversation column scrolls. */
@media (min-width: 761px) {
  html,
  body,
  .app-shell {
    height: 100%;
    min-height: 0;
  }

  body {
    overflow: hidden;
    background: #f7f8fa;
  }

  .workbench-screen {
    position: fixed;
    inset: 0;
    display: block;
    width: auto;
    max-width: none;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    background: #f7f8fa;
  }

  .sidebar,
  .chat-panel,
  .inspector {
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .workbench-screen > .sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    box-sizing: border-box;
    width: 252px;
    z-index: 3;
    overflow: auto;
    border-right: 1px solid #e7e9ee;
    background: #ffffff;
  }

  .workbench-screen > .chat-panel {
    position: absolute;
    inset: 0 0 0 252px;
    width: auto;
    z-index: 2;
    height: 100dvh;
    min-height: 0;
    background: #ffffff;
  }

  .chat-header {
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.94);
  }

  .message-list {
    min-height: 0;
    padding: 32px clamp(24px, 5vw, 76px);
    background: #fafbfc;
  }

  .message {
    max-width: min(82%, 780px);
    border-radius: 12px;
  }

  .message.assistant {
    border-color: #e6e9ef;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  }

  .message.user {
    background: #145ecc;
  }

  .composer {
    padding: 7px clamp(24px, 5vw, 76px) 8px;
    background: #ffffff;
  }

  .composer-row {
    align-items: center;
    padding: 4px 6px;
    border: 1px solid #dfe4ea;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
  }

  .composer textarea {
    height: 42px;
    min-height: 42px;
    border: 0;
    box-shadow: none;
  }

  .composer textarea:focus {
    border: 0;
    box-shadow: none;
  }

  .composer button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 9px;
  }

  .composer button.is-stop {
    width: 46px;
    min-width: 46px;
    border-radius: 50%;
  }

  .composer label { height: 42px; color: #a6a6a6; }

  .inspector {
    overflow: auto;
    border-left: 1px solid #e7e9ee;
    background: #ffffff;
  }

  .new-session {
    min-height: 46px;
    background: #172033;
  }

  .session-item.active,
  .session-item:hover {
    border-color: transparent;
    background: #edf4ff;
  }
}

@media (max-width: 1080px) {
  .workbench-screen {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .inspector {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .prompt-section,
  .contact-card {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .access-row,
  .composer-row,
  .chat-header {
    flex-direction: column;
    align-items: stretch;
  }

  .access-row button,
  .composer button {
    width: 100%;
  }

  .composer button.is-stop {
    width: 46px;
    align-self: flex-end;
  }

  .workbench-screen {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar,
  .inspector {
    padding: 14px;
  }

  .session-list {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: 72vh;
  }

  .message-list {
    padding: 16px;
  }

  .message {
    max-width: 100%;
  }

  .inspector {
    display: flex;
  }
}

/* The workspace keeps the cinematic entry's confidence, with an operational surface for repeat work. */
.welcome-scene {
  display: grid;
  align-content: center;
  gap: 14px;
  width: min(100%, 760px);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(28px, 7vh, 84px) 0;
}

.welcome-eyebrow,
.welcome-footer {
  margin: 0;
  color: #a3a3a3;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.welcome-scene h3 {
  margin: 0;
  color: #f5f5f5;
  font-size: clamp(30px, 4vw, 49px);
  line-height: 1.13;
  letter-spacing: 0;
}

.welcome-description {
  max-width: 520px;
  margin: 0 0 10px;
  color: #a3a3a3;
  font-size: 17px;
  line-height: 1.7;
}

.welcome-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 640px;
  margin-top: 8px;
}

.welcome-action {
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  color: #ebebeb;
  background: #202020;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.welcome-action:hover,
.welcome-action:focus-visible {
  border-color: #8f8f8f;
  color: #111;
  background: #ededed;
  transform: translateY(-2px);
}

.welcome-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #a3a3a3;
  font-size: 12px;
}

.welcome-footer::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12a06a;
  content: "";
}

@media (min-width: 761px) {
  .workbench-screen { background: transparent; }

  .sidebar {
    background: rgba(15, 15, 15, 0.9);
    border-right-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
  }

  .sidebar .sidebar-brand { width: 100%; gap: 8px; justify-content: space-between; }
  .sidebar .sidebar-brand > .company-mark { order: 2; }
  .sidebar .sidebar-brand > div:last-child { order: 1; }
  .sidebar .brand-name.compact { color: #fff; font-size: 14px; }
  .sidebar .brand-subtitle { color: #9b9b9b; font-size: 11px; }
  .sidebar .brand-mark.company-mark {
    width: 28px;
    height: 39px;
    background: transparent;
  }
  .sidebar .company-mark img { filter: none; }

  .sidebar .new-session {
    color: #151515;
    background: #ededed;
  }

  .sidebar .new-session:hover { background: #fff; }
  .sidebar .session-item { color: #e8e8e8; }
  .sidebar .session-item small { color: #979797; }
  .sidebar .session-item.active,
  .sidebar .session-item:hover { background: #292929; }
  .sidebar .session-menu-trigger { color: #b8b8b8; }
  .sidebar .session-menu-trigger:hover,
  .sidebar .session-menu-trigger:focus-visible { color: #fff; background: #333; }
  .sidebar .session-menu {
    border-color: #454545;
    background: #242424;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  }
  .sidebar .session-menu-action { color: #ebebeb; }
  .sidebar .session-menu-action:hover,
  .sidebar .session-menu-action:focus-visible { background: #363636; }

  .chat-panel {
    background: rgba(19, 19, 19, 0.62);
    backdrop-filter: blur(4px);
  }
  .chat-header {
    min-height: 94px;
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 20, 0.78);
    backdrop-filter: blur(5px);
  }
  .chat-header .eyebrow { color: #a3a3a3; }
  .chat-header h2 { color: #fff; font-size: 25px; }
  .agent-select { color: #bfbfbf; }
  .agent-select select {
    border-color: #424242;
    color: #f1f1f1;
    background: #222;
  }

  .message-list { background: rgba(15, 15, 15, 0.5); }
  .message.assistant {
    border-color: #3a3a3a;
    color: #ededed;
    background: rgba(32, 32, 32, 0.9);
    box-shadow: none;
  }
  .message-content h3,
  .message-content strong { color: #fff; }
  .composer {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 20, 0.86);
    backdrop-filter: blur(5px);
  }
  .composer > label,
  .composer-row {
    width: min(100%, 980px);
    margin-right: auto;
    margin-left: auto;
  }
  .composer label { color: #bfbfbf; }
  .composer-row {
    border-color: #414141;
    background: rgba(34, 34, 34, 0.92);
    box-shadow: none;
  }
  .composer textarea,
  .composer textarea:focus {
    color: #f5f9ff;
    background: transparent;
  }
  .composer textarea::placeholder { color: #888; }
  .composer button { color: #111; background: #ededed; }
  .composer button.is-stop {
    display: grid;
    width: 46px;
    min-width: 46px;
    place-items: center;
    padding: 0;
    border: 1px solid #3d3d3d;
    border-radius: 50%;
    color: transparent;
    background: #242424;
  }
  .composer button.is-stop .send-button-label { display: none; }
  .composer button.is-stop::after {
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #f5f5f5;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 760px) {
  .workbench-screen { background: transparent; }
  .sidebar,
  .chat-panel { background: rgba(18, 18, 18, 0.82); backdrop-filter: blur(5px); }
  .chat-header { border-bottom-color: rgba(255, 255, 255, 0.1); }
  .chat-header h2 { color: #fff; }
  .chat-header .eyebrow,
  .agent-select { color: #b8b8b8; }
  .agent-select select { border-color: #424242; color: #fff; background: #222; }
  .message-list { background: rgba(15, 15, 15, 0.5); }
  .composer { border-top-color: #414141; background: rgba(20, 20, 20, 0.9); }
  .composer label { color: #bfbfbf; }
  .composer-row { border-color: #414141; background: #222; }
  .composer textarea { color: #f5f9ff; background: transparent; }
  .message.assistant { border-color: #2a3f61; color: #eaf1fb; background: #162640; }
  .message-content h3,
  .message-content strong { color: #fff; }
  .welcome-scene { padding: 26px 2px; }
  .welcome-actions { grid-template-columns: 1fr; }
  .welcome-description { font-size: 15px; }
}

/* Composer tools keep frequent actions explicit without cluttering normal conversation. */
.composer-row {
  display: grid;
  gap: 7px;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 8px 10px 7px;
  border: 1px solid #414141;
  border-radius: 12px;
  background: rgba(34, 34, 34, 0.92);
}

.composer-row > textarea {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
}

.composer-row > textarea:focus { box-shadow: none; }

.composer-footer {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-tools {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}

.composer-tools::-webkit-scrollbar { display: none; }

.composer .composer-tool {
  display: inline-flex;
  width: auto;
  min-width: max-content;
  height: 29px;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  align-self: center;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  color: #bdbdbd;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.composer .composer-tool:hover,
.composer .composer-tool:focus-visible {
  color: #fff;
  background: #333;
}

.composer .composer-tool .tool-icon {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #e8e8e8;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.composer .composer-tool.attachment-button {
  color: #bdbdbd !important;
  background: transparent !important;
}

.composer .composer-tool.attachment-button::before,
.composer .composer-tool.attachment-button::after { display: none; }

.composer .composer-tool.image-generator-button {
  width: auto;
  min-width: max-content;
  height: 29px;
  min-height: 29px;
  color: #bdbdbd;
  background: transparent;
  font-size: 12px;
}

.composer .composer-tool.voice-button .tool-icon {
  color: #ef7f58;
  font-size: 15px;
}

.composer .composer-tool.voice-button.is-recording {
  color: #fff;
  background: #c95236;
  animation: voice-recording-pulse 1.15s ease-in-out infinite;
}

.composer .composer-tool.voice-button.is-recording .tool-icon { color: #fff; }

@keyframes voice-recording-pulse {
  50% { box-shadow: 0 0 0 5px rgba(201, 82, 54, 0.2); }
}

.composer .composer-tool.document-tool .tool-icon {
  width: 16px;
  height: 16px;
  border: 1px solid #777;
  border-radius: 3px;
  color: #d8d8d8;
  font-size: 10px;
}

.composer-footer #send-button {
  width: auto;
  min-width: 70px;
  height: 32px;
  min-height: 32px;
  align-self: center;
  padding: 0 14px;
}

.composer-footer #send-button.is-stop { align-self: center; }

.image-dialog-panel { gap: 22px; padding: 26px; }
.image-dialog-heading { margin-bottom: 2px; }
.image-size-fieldset { gap: 0; }
.image-size-fieldset legend { margin-bottom: 18px; }
.image-size-options { gap: 12px; }
.image-size-options span { min-width: 92px; padding: 11px 16px; }

.composer .document-tool.is-selected {
  border-color: #f2f2f2;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.generated-image-notice {
  margin: 0;
  padding: 9px 11px 0;
  color: #a9a9a9;
  font-size: 12px;
  line-height: 1.55;
}

.generated-image-gallery figcaption { padding-top: 8px; }
.generated-image-gallery figcaption button,
.generated-image-gallery figcaption a {
  padding: 0;
  border: 0;
  color: #efefef;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.image-preview-dialog {
  width: min(calc(100vw - 32px), 1200px);
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid #4a4a4a;
  border-radius: 9px;
  background: #171717;
}

.image-preview-dialog::backdrop { background: rgba(0, 0, 0, 0.78); }
.image-preview-panel { display: grid; max-height: calc(100vh - 32px); }
.image-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #383838;
}
.image-preview-header p { margin: 0; color: #ececec; font-size: 13px; font-weight: 800; }
.image-preview-header button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid #484848;
  border-radius: 6px;
  color: #f0f0f0;
  background: #252525;
  font-size: 21px;
}
.image-preview-panel img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 100px);
  margin: 0 auto;
  object-fit: contain;
}

@media (max-width: 760px) {
  .composer { padding: 7px 10px; }
  .composer-row { border-radius: 10px; }
  .composer-tools { gap: 1px; }
  .composer .composer-tool { padding: 0 6px; }
  .composer .composer-tool span:last-child { font-size: 11px; }
  .image-dialog-panel { padding: 20px; }
}

/* Keep the same fixed desktop workbench when a desktop browser window is narrow. */
.workbench-screen:not(.is-hidden) {
  position: fixed;
  inset: 0;
  display: block;
  width: auto;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.workbench-screen:not(.is-hidden) > .sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  box-sizing: border-box;
  width: 252px;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  color: #e8e8e8 !important;
  background: rgba(15, 15, 15, 0.96) !important;
  box-shadow: none;
  backdrop-filter: blur(5px);
}

.workbench-screen:not(.is-hidden) > .chat-panel {
  position: absolute;
  inset: 0 0 0 252px;
  z-index: 2;
  width: auto;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgba(19, 19, 19, 0.9) !important;
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.workbench-screen:not(.is-hidden) > .sidebar .sidebar-brand { width: 100%; gap: 8px; justify-content: space-between; }
.workbench-screen:not(.is-hidden) > .sidebar .sidebar-brand > .company-mark { order: 2; }
.workbench-screen:not(.is-hidden) > .sidebar .sidebar-brand > div:last-child { order: 1; }
.workbench-screen:not(.is-hidden) > .sidebar .brand-name.compact { color: #fff; font-size: 14px; }
.workbench-screen:not(.is-hidden) > .sidebar .brand-subtitle { color: #9b9b9b; font-size: 11px; }
.workbench-screen:not(.is-hidden) > .sidebar .brand-mark.company-mark { width: 28px; height: 39px; background: transparent; }
.workbench-screen:not(.is-hidden) > .sidebar .company-mark img { filter: none; }
.workbench-screen:not(.is-hidden) > .sidebar,
.workbench-screen:not(.is-hidden) > .sidebar * { max-width: 100%; }
.workbench-screen:not(.is-hidden) > .sidebar {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-x: none;
}
.workbench-screen:not(.is-hidden) > .sidebar .session-list {
  width: 100%;
  min-width: 0;
  overflow: visible;
}
.workbench-screen:not(.is-hidden) > .sidebar .session-row {
  width: 100%;
  min-width: 0;
}
.workbench-screen:not(.is-hidden) > .sidebar .session-item {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  padding: 8px 42px 8px 12px;
  text-align: left;
}
.workbench-screen:not(.is-hidden) > .sidebar .session-item span {
  display: block;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workbench-screen:not(.is-hidden) > .sidebar .session-menu-trigger {
  right: 8px;
  left: auto;
  z-index: 2;
}
.workbench-screen:not(.is-hidden) > .sidebar .account-panel { min-width: 0; overflow: hidden; }
.workbench-screen:not(.is-hidden) > .sidebar .new-session { color: #151515; background: #ededed; }
.workbench-screen:not(.is-hidden) > .sidebar .new-session:hover { background: #fff; }
.workbench-screen:not(.is-hidden) > .sidebar .session-item { color: #e8e8e8; }
.workbench-screen:not(.is-hidden) > .sidebar .session-item small { color: #979797; }
.workbench-screen:not(.is-hidden) > .sidebar .session-item.active,
.workbench-screen:not(.is-hidden) > .sidebar .session-item:hover { background: #292929; }
.workbench-screen:not(.is-hidden) > .sidebar .session-menu-trigger { color: #b8b8b8; }
.workbench-screen:not(.is-hidden) > .sidebar .session-menu-trigger:hover,
.workbench-screen:not(.is-hidden) > .sidebar .session-menu-trigger:focus-visible { color: #fff; background: #333; }
.workbench-screen:not(.is-hidden) > .sidebar .session-menu { border-color: #454545; background: #242424; }
.workbench-screen:not(.is-hidden) > .sidebar .session-menu-action { color: #ebebeb; }
.workbench-screen:not(.is-hidden) > .sidebar .session-menu-action:hover,
.workbench-screen:not(.is-hidden) > .sidebar .session-menu-action:focus-visible { background: #363636; }

.workbench-screen:not(.is-hidden) > .chat-panel .chat-header { min-height: 94px; padding: 16px 28px; border-bottom-color: rgba(255, 255, 255, 0.1); background: rgba(20, 20, 20, 0.78); backdrop-filter: blur(5px); }
.workbench-screen:not(.is-hidden) > .chat-panel .chat-header .eyebrow { color: #a3a3a3; }
.workbench-screen:not(.is-hidden) > .chat-panel .chat-header h2 { color: #fff; font-size: 25px; }
.workbench-screen:not(.is-hidden) > .chat-panel .agent-select { color: #bfbfbf; }
.workbench-screen:not(.is-hidden) > .chat-panel .agent-select select { border-color: #424242; color: #f1f1f1; background: #222; }
.workbench-screen:not(.is-hidden) > .chat-panel .message-list { min-height: 0; padding: 32px clamp(24px, 5vw, 76px); background: rgba(15, 15, 15, 0.5); }
.workbench-screen:not(.is-hidden) > .chat-panel .message { max-width: min(82%, 780px); border-radius: 12px; }
.workbench-screen:not(.is-hidden) > .chat-panel .message.assistant { border-color: #3a3a3a; color: #ededed; background: rgba(32, 32, 32, 0.9); box-shadow: none; }
.workbench-screen:not(.is-hidden) > .chat-panel .message.user { background: #145ecc; }
.workbench-screen:not(.is-hidden) > .chat-panel .message-content h3,
.workbench-screen:not(.is-hidden) > .chat-panel .message-content strong { color: #fff; }
.workbench-screen:not(.is-hidden) > .chat-panel .composer { padding: 7px clamp(24px, 5vw, 76px) 8px; border-top-color: rgba(255, 255, 255, 0.1); background: rgba(20, 20, 20, 0.86); }
.workbench-screen:not(.is-hidden) > .chat-panel .welcome-state { color: #f4f4f4; }
.workbench-screen:not(.is-hidden) > .chat-panel .welcome-state p,
.workbench-screen:not(.is-hidden) > .chat-panel .welcome-state small { color: #a8a8a8; }
.workbench-screen:not(.is-hidden) > .chat-panel .composer-shell,
.workbench-screen:not(.is-hidden) > .chat-panel .composer-input { color: #efefef; background-color: #202020; }
.workbench-screen:not(.is-hidden) > .chat-panel .composer-input::placeholder { color: #8e8e8e; }
.workbench-screen:not(.is-hidden) > .chat-panel .composer.is-dragging-file .composer-shell {
  outline: 2px dashed rgba(255, 255, 255, 0.7);
  outline-offset: -5px;
  background: #292929;
}

/* Mobile workbench: one chat column, with conversations in an on-demand drawer. */
.mobile-session-toggle { display: none; }
.mobile-sidebar-close { display: none; }

@media (max-width: 760px) {
  html, body { width: 100%; min-width: 0; overflow-x: hidden; }

  .workbench-screen:not(.is-hidden) {
    min-width: 0;
    height: 100dvh;
    min-height: 100dvh;
  }

  .workbench-screen:not(.is-hidden) > .chat-panel {
    inset: 0;
    width: 100%;
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .workbench-screen:not(.is-hidden) > .sidebar {
    inset: 0 auto 0 0;
    z-index: 6;
    width: min(88vw, 340px);
    padding: calc(16px + env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
    border-right-color: #3a3a3a;
    box-shadow: 20px 0 42px rgba(0, 0, 0, 0.42);
    transform: translateX(-104%);
    transition: transform 200ms ease;
  }

  .workbench-screen:not(.is-hidden).is-sidebar-open > .sidebar { transform: translateX(0); }
  .workbench-screen:not(.is-hidden)::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 5;
    display: none;
    background: rgba(0, 0, 0, 0.48);
  }
  .workbench-screen:not(.is-hidden).is-sidebar-open::after { display: block; }

  .workbench-screen:not(.is-hidden) > .chat-panel .chat-header {
    min-height: 68px;
    padding: calc(11px + env(safe-area-inset-top)) 14px 11px;
    gap: 10px;
    flex-direction: row;
    align-items: center;
  }

  .mobile-session-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #4a4a4a;
    border-radius: 7px;
    color: #f2f2f2;
    background: #282828;
    font-size: 12px;
    font-weight: 800;
    width: auto;
  }

  .workbench-screen:not(.is-hidden) > .chat-panel .chat-header h2 { font-size: 19px; }
  .workbench-screen:not(.is-hidden) > .chat-panel .chat-header .eyebrow { margin-bottom: 2px; font-size: 11px; }
  .workbench-screen:not(.is-hidden) > .chat-panel .agent-select { min-width: 0; margin-left: auto; }
  .workbench-screen:not(.is-hidden) > .chat-panel .agent-select > span { display: none; }
  .workbench-screen:not(.is-hidden) > .chat-panel .agent-select select { width: 106px; height: 34px; padding: 0 7px; font-size: 12px; }

  .workbench-screen:not(.is-hidden) > .chat-panel .message-list {
    gap: 10px;
    padding: 22px 14px;
    overscroll-behavior: contain;
  }
  .workbench-screen:not(.is-hidden) > .chat-panel .message { max-width: 91%; padding: 11px 12px; font-size: 14px; }

  .workbench-screen:not(.is-hidden) > .chat-panel .composer {
    padding: 7px 10px max(8px, env(safe-area-inset-bottom));
  }
  .workbench-screen:not(.is-hidden) > .chat-panel .composer-row { min-width: 0; }
  .workbench-screen:not(.is-hidden) > .chat-panel .composer textarea { min-height: 54px; padding: 11px 12px; font-size: 16px; }
  .composer .composer-tools { max-width: calc(100vw - 104px); overflow-x: auto; }
  .composer .composer-tool { flex: 0 0 auto; }
  .composer-footer #send-button { min-width: 54px; padding: 0 10px; }

  .workbench-screen:not(.is-hidden) > .sidebar .sidebar-brand { padding: 2px 2px 4px; }
  .mobile-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid #484848;
    border-radius: 6px;
    color: #d7d7d7;
    background: #272727;
    font-size: 12px;
    font-weight: 700;
  }
  .workbench-screen:not(.is-hidden) > .sidebar .sidebar-brand > .mobile-sidebar-close { order: 3; }
  .workbench-screen:not(.is-hidden) > .sidebar .new-session { min-height: 44px; }
  .workbench-screen:not(.is-hidden) > .sidebar .session-item { min-height: 44px; }
}
