:root {
  --bg: #07111f;
  --bg-soft: #0b1628;
  --panel: rgba(13, 24, 42, 0.82);
  --panel-strong: #0f1b31;
  --card: rgba(18, 30, 52, 0.88);
  --card-soft: rgba(22, 36, 61, 0.72);
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.24);
  --text: #f8fbff;
  --text-soft: #b7c4d8;
  --text-dim: #7f91ab;
  --accent: #6ea8ff;
  --accent-strong: #3b82f6;
  --accent-soft: rgba(110, 168, 255, 0.14);
  --ok: #4ade80;
  --warn: #f59e0b;
  --bad: #f87171;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  overflow: auto;
}

body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 26%),
    radial-gradient(circle at right top, rgba(14, 165, 233, 0.1), transparent 22%),
    linear-gradient(180deg, #07111f 0%, #091321 45%, #0a1525 100%);
  overflow: auto;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

.layout {
  display: grid;
  grid-template-columns: 276px 1fr;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 28px 20px;
  background: rgba(8, 15, 28, 0.88);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-block h1,
.panel-header h2,
.card h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.brand-block h1 {
  font-size: 24px;
}

.brand-block p,
.panel-header p,
.muted,
.notice,
.nav a {
  color: var(--text-soft);
}

.brand-block p {
  margin: 10px 0 0;
  line-height: 1.65;
  font-size: 14px;
}

.premium-brand-block {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.16), rgba(59, 130, 246, 0.2));
  color: #dbeafe;
  border: 1px solid rgba(110, 168, 255, 0.18);
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.22);
  font-size: 18px;
}

.nav {
  display: grid;
  gap: 10px;
  margin: 28px 0;
}

.nav-group-label {
  margin: 10px 6px 2px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--text-dim);
}

.nav a,
.notice,
.panel,
.card {
  border-radius: 22px;
}

.nav a {
  text-decoration: none;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.nav a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
}

.nav a.active::before {
  background: #93c5fd;
  box-shadow: 0 0 0 6px rgba(147, 197, 253, 0.08);
}

.nav a:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav a.active {
  border-color: rgba(110, 168, 255, 0.28);
  background: linear-gradient(180deg, rgba(110, 168, 255, 0.18), rgba(59, 130, 246, 0.1));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.notice {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
}

.main {
  padding: 20px;
  display: grid;
  gap: 16px;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.chat-first-mode .main {
  align-content: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 24px;
}

.panel-header,
.card-head,
.inline-form,
.stats,
.search-form,
.action-row {
  display: flex;
  gap: 12px;
}

.panel-header,
.card-head {
  justify-content: space-between;
  align-items: start;
}

.panel-header p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.stats,
.grid,
.form-grid,
.list,
.chips,
.trace {
  margin-top: 18px;
}

.stats {
  flex-wrap: wrap;
}

.stat {
  min-width: 150px;
  padding: 16px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.stat strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
  color: #ffffff;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.form-grid textarea {
  min-height: 110px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.toggle-row input {
  width: auto;
  margin: 0;
}

input,
select,
textarea,
.button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

textarea {
  resize: vertical;
}

.button {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-color: rgba(110, 168, 255, 0.25);
}

.button:hover {
  filter: brightness(1.04);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.link-button {
  width: auto;
}

.list {
  display: grid;
  gap: 14px;
}

.card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
}

.badge {
  background: var(--accent-soft);
  color: #cfe2ff;
}

.badge.blocked {
  background: rgba(245, 158, 11, 0.14);
  color: #ffd27a;
}

.badge.closed {
  background: rgba(74, 222, 128, 0.14);
  color: #9cf5bd;
}

.chip {
  margin-right: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.inline-form {
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}

.inline-form > * {
  flex: 1 1 160px;
}

.search-form {
  margin-top: 16px;
  align-items: center;
}

.search-form input {
  flex: 1 1 auto;
}

.action-row {
  flex-wrap: wrap;
  margin-top: 14px;
}

.search-form .button {
  width: auto;
  min-width: 180px;
}

.result-grid {
  display: grid;
  gap: 8px;
}

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

.trace-item {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  line-height: 1.55;
}

.assignment-meta {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.assignment-meta.auto-assigned {
  border-color: rgba(110, 168, 255, 0.22);
  color: #d4e4ff;
}

.assignment-meta.manual-override {
  border-color: rgba(74, 222, 128, 0.22);
  color: #bcf5d0;
}

.compact .card {
  padding: 14px;
}

.trial-form {
  margin-top: 16px;
}

.trial-form textarea {
  grid-column: 1 / -1;
}

.status-ok {
  color: var(--ok);
}

.status-error {
  color: var(--bad);
}

.workspace-panel {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(10, 21, 37, 0.98));
  border-color: var(--line);
  box-shadow: none;
}

.chat-screen {
  min-height: 0;
  height: calc(100vh - 40px);
}

.chat-minimal-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.chat-minimal-topbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(8, 15, 28, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.chat-minimal-titlewrap h2,
.chat-minimal-titlewrap p {
  margin: 0;
}

.chat-minimal-titlewrap h2 {
  font-size: 20px;
  font-weight: 700;
  color: #f8fbff;
}

.chat-minimal-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-dim);
}

.chat-history-drawer,
.chat-context-drawer {
  position: absolute;
  top: 73px;
  bottom: 0;
  z-index: 10;
  width: 308px;
  padding: 20px;
  background: rgba(11, 22, 40, 0.96);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.5);
}

.chat-history-drawer {
  left: 0;
}

.chat-context-drawer {
  right: 0;
  border-right: 0;
  border-left: 1px solid var(--line);
}

.chat-history-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chat-minimal-stage {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.conversation-welcome {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 20px;
  padding: 48px 24px 20px;
  flex: 0 0 auto;
}

.conversation-welcome.minimal h3,
.conversation-welcome.minimal p {
  margin: 0;
}

.conversation-welcome.minimal h3 {
  font-size: 40px;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: #f8fbff;
  max-width: 820px;
}

.conversation-welcome.minimal p {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
}

.workspace-prompt-grid.minimal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: 14px;
  justify-content: center;
}

.prompt-card.minimal {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.16);
}

.prompt-card.minimal strong {
  font-size: 15px;
  color: #f8fbff;
}

.prompt-card.minimal:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.ghost-icon-button,
.ghost-action-button {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  cursor: pointer;
  border-radius: 12px;
  padding: 10px 12px;
}

.ghost-icon-button:hover,
.ghost-action-button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.ghost-action-button {
  padding-left: 14px;
  padding-right: 14px;
  font-weight: 600;
}

.conversation-thread {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 20px 22px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.15) 0%, rgba(9, 19, 33, 0.3) 100%);
}

.conversation-thread.minimal {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.conversation-form {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  padding: 10px 18px 16px;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.12), rgba(7, 17, 31, 0.92) 22%, rgba(7, 17, 31, 0.98) 100%);
}

.conversation-form.minimal {
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
}

.composer-shell {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 27, 49, 0.94);
  box-shadow: 0 16px 36px rgba(2, 8, 23, 0.3);
  padding: 10px 12px 12px;
}

.composer-shell.minimal {
  border-radius: 30px;
}

.chatgpt-composer {
  max-width: 920px;
  margin: 0 auto;
}

.composer-shell textarea {
  min-height: 28px;
  max-height: 120px;
  border: 0;
  padding: 10px 8px 8px;
  background: transparent;
  font-size: 15px;
  line-height: 1.6;
  color: #f8fbff;
}

.composer-shell textarea::placeholder {
  color: var(--text-dim);
}

.composer-shell textarea:focus {
  outline: none;
}

.composer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.composer-tool-left,
.composer-tool-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-status {
  font-size: 12px;
  color: var(--text-dim);
}

.send-pill-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.34);
}

.send-pill-button:hover {
  filter: brightness(1.05);
}

.composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 6px 10px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(110, 168, 255, 0.12);
  color: #d8e8ff;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid rgba(110, 168, 255, 0.18);
}

.attachment-remove {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-soft);
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.message-attachment {
  display: grid;
  gap: 5px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.message-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.message-row.operator {
  grid-template-columns: minmax(0, 1fr) 52px;
}

.message-row.operator .message-card {
  order: 1;
}

.message-row.operator .message-avatar {
  order: 2;
}

.message-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid var(--line);
  position: sticky;
  top: 16px;
}

.message-row.operator .message-avatar {
  background: rgba(59, 130, 246, 0.14);
  color: #dbeafe;
  border-color: rgba(59, 130, 246, 0.22);
}

.message-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px 24px 20px;
  background: rgba(15, 27, 49, 0.72);
  box-shadow: 0 20px 44px rgba(2, 8, 23, 0.22);
  max-width: 900px;
}

.message-card.operator {
  justify-self: end;
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.42), rgba(29, 78, 216, 0.28));
  border-color: rgba(110, 168, 255, 0.22);
}

.message-card.agent {
  background: rgba(15, 27, 49, 0.72);
  border-color: var(--line);
}

.message-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.message-identity h3,
.message-identity p {
  margin: 0;
}

.message-identity h3 {
  font-size: 15px;
  color: #f8fbff;
}

.message-identity p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

.message-summary {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(110, 168, 255, 0.12);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 600;
  max-width: 360px;
}

.message-body {
  margin: 16px 0 0;
  line-height: 1.85;
  font-size: 16px;
  color: #e6edf7;
}

.message-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.message-section-title {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
}

.message-list {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--text-soft);
  line-height: 1.7;
}

.message-block-grid {
  display: grid;
  gap: 12px;
}

.message-actions,
.resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.resource-list.compact {
  justify-content: flex-end;
  margin: 0;
}

.message-entity-block,
.message-resource-block,
.workspace-link-card,
.workspace-mini-item {
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: #f8fbff;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.03);
}

.message-entity-block:hover,
.message-resource-block:hover,
.workspace-link-card:hover,
.workspace-mini-item:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.message-entity-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-chip,
.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 10px 15px;
  text-decoration: none;
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}

.action-chip.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: rgba(110, 168, 255, 0.24);
  color: #ffffff;
}

.action-chip.secondary {
  background: rgba(255, 255, 255, 0.04);
}

.entity-type,
.entity-status {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.workspace-sidebar,
.conversation-list,
.workspace-link-list {
  display: grid;
  gap: 14px;
}

.workspace-sidecard {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.18);
}

.workspace-sidecard-head h3 {
  margin: 0 0 6px;
}

.workspace-sidecard-head p {
  margin: 0;
}

.conversation-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.conversation-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.conversation-item-top strong {
  font-size: 14px;
  color: #f8fbff;
}

.conversation-item-count {
  min-width: auto;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(110, 168, 255, 0.12);
  color: #dbeafe;
  font-size: 11px;
  font-weight: 700;
  padding: 0 10px;
}

.conversation-item-preview {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.conversation-item.active {
  border-color: rgba(110, 168, 255, 0.24);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: inset 0 0 0 1px rgba(110, 168, 255, 0.1);
}

.workspace-mini-list {
  display: grid;
  gap: 10px;
}

.workspace-mini-heading {
  margin: 2px 0 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.workspace-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-empty {
  padding: 42px 36px;
  border-radius: 28px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.workspace-empty h3,
.workspace-empty p {
  margin: 0;
}

.workspace-empty h3 {
  font-size: 24px;
}

.workspace-empty p {
  margin-top: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

#conversationWelcome[hidden] {
  display: none;
}

#conversationMessages {
  min-height: 0;
}

#conversationMessages .workspace-empty {
  max-width: 760px;
  margin: 0 auto;
}

.chat-context-sidebar .workspace-mini-item {
  background: rgba(255, 255, 255, 0.03);
}

.chat-history-sidebar .conversation-list {
  align-content: start;
}

.chat-history-sidebar .conversation-item {
  border-radius: 16px;
}

.chat-history-sidebar .conversation-item.active {
  box-shadow: inset 0 0 0 1px rgba(110, 168, 255, 0.18);
}

.chat-center-stage .conversation-thread {
  padding-top: 12px;
}

.chat-center-stage .message-card {
  max-width: 820px;
}

.chat-center-stage .message-row.operator .message-card {
  max-width: 760px;
}

.chat-context-sidebar,
.chat-history-sidebar {
  min-height: calc(100vh - 52px);
}

.chat-context-sidebar,
.chat-history-sidebar {
  overflow-y: auto;
}

.chat-center-stage .workspace-eyebrow {
  margin-bottom: 6px;
}

.chat-topbar .workspace-meta-pill {
  margin-top: 4px;
}

.premium-hub-panel {
  background: linear-gradient(180deg, rgba(15, 27, 49, 0.92), rgba(11, 22, 40, 0.94));
}

.premium-hub-grid {
  gap: 18px;
}

.premium-feature-card {
  min-height: 210px;
}

.premium-feature-card h3 {
  font-size: 22px;
}

.premium-feature-card p {
  line-height: 1.75;
}

.premium-panel-header h2 {
  font-size: 30px;
  letter-spacing: -0.03em;
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  html,
  body {
    overflow: auto;
    height: auto;
  }

  .main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .chat-screen,
  .chat-minimal-shell,
  .chat-minimal-stage {
    height: auto;
    min-height: calc(100vh - 20px);
    overflow: visible;
  }

  .form-grid,
  .grid.two,
  .grid.three,
  .workspace-prompt-grid.minimal {
    grid-template-columns: 1fr;
  }

  .chat-minimal-topbar,
  .composer-toolbar,
  .message-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .chat-history-drawer,
  .chat-context-drawer {
    width: min(100%, 320px);
  }

  .conversation-thread {
    flex: initial;
    min-height: 280px;
    max-height: none;
    padding-left: 14px;
    padding-right: 14px;
  }

  .conversation-form {
    position: sticky;
    bottom: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  .message-row,
  .message-row.operator {
    grid-template-columns: 1fr;
  }

  .message-row.operator .message-card,
  .message-row.operator .message-avatar {
    order: initial;
  }

  .message-avatar {
    position: static;
  }

  .search-form .button,
  .link-button,
  .ghost-action-button {
    width: 100%;
    min-width: 0;
  }
}
