:root {
  --bg: #f6f0e7;
  --bg-2: #efe5d5;
  --panel: rgba(255, 250, 243, 0.88);
  --panel-strong: #fffaf4;
  --ink: #1c2328;
  --muted: #67727d;
  --line: rgba(28, 35, 40, 0.08);
  --accent: #156f63;
  --accent-2: #d85f39;
  --assistant: #fffdf9;
  --user: #153f57;
  --user-ink: #f5fafb;
  --shadow: 0 24px 60px rgba(36, 34, 27, 0.12);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(21, 111, 99, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(216, 95, 57, 0.16), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--ink);
}

body {
  min-height: 100vh;
}

button,
textarea,
select {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
}

.page-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  gap: 18px;
  padding: 18px;
}

.sidebar,
.chat-panel,
.composer-card,
.settings-card,
.brand-card {
  backdrop-filter: blur(14px);
}

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

.brand-card,
.settings-card,
.chat-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
}

.brand-card h1 {
  margin: 0;
  font-size: 1.3rem;
}

.brand-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.ghost-button.subtle {
  opacity: 0.85;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}

.conversation-item {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: 180ms ease;
}

.conversation-item:hover,
.conversation-item.active {
  transform: translateY(-1px);
  border-color: rgba(21, 111, 99, 0.22);
  background: rgba(255, 255, 255, 0.88);
}

.conversation-name {
  font-weight: 600;
}

.conversation-time {
  color: var(--muted);
  font-size: 0.85rem;
}

.settings-card {
  margin-top: auto;
  padding: 16px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.system-prompt-panel {
  border: 1px solid rgba(21, 111, 99, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.42);
  padding: 10px;
}

.system-prompt-panel summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 8px;
}

.settings-card textarea,
.settings-card select,
.composer-card textarea {
  width: 100%;
  border: 1px solid rgba(28, 35, 40, 0.1);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--ink);
  resize: vertical;
}

.status-line {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.4;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 23, 28, 0.38);
  backdrop-filter: blur(10px);
}

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

.model-config-panel,
.capability-panel {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.capability-panel {
  width: min(1040px, 100%);
}

.model-config-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.model-config-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.model-config-current {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.model-config-form {
  padding: 20px 24px 24px;
}

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

.config-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.config-field.wide {
  grid-column: 1 / -1;
}

.config-field input,
.config-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(28, 35, 40, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 10px 12px;
}

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

.fallback-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.fallback-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid rgba(21, 111, 99, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  padding: 8px 11px;
  font-size: 0.86rem;
}

.fallback-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locked-model-note {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(21, 111, 99, 0.14);
  border-radius: 16px;
  background: rgba(21, 111, 99, 0.07);
  color: var(--accent);
  font-size: 0.88rem;
  line-height: 1.5;
}

.config-status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.config-status.success {
  color: var(--accent);
}

.config-status.error {
  color: #b5462b;
}

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

.capability-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 8px 12px;
  white-space: nowrap;
  font-weight: 700;
}

.capability-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.capability-content {
  padding: 20px 24px 24px;
}

.capability-view {
  display: none;
}

.capability-view.active {
  display: block;
}

.capability-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.capability-toolbar h3 {
  margin: 0;
  font-size: 1.05rem;
}

.capability-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.market-search,
.range-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
  color: var(--muted);
  font-size: 0.82rem;
}

.market-search input {
  min-height: 40px;
  border: 1px solid rgba(28, 35, 40, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 9px 11px;
}

.template-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) auto auto minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: end;
  width: min(100%, 980px);
}

.template-search,
.range-control {
  min-width: 0;
}

.filter-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(21, 111, 99, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.filter-toggle input {
  accent-color: var(--accent);
}

.range-control span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.range-control strong {
  color: var(--accent);
}

.range-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.skill-grid,
.template-grid,
.permission-grid,
.health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.plaza-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.plaza-nav-btn {
  border: 1px solid rgba(21, 111, 99, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 800;
}

.plaza-nav-btn.active {
  background: rgba(21, 111, 99, 0.12);
  color: var(--accent);
  border-color: rgba(21, 111, 99, 0.24);
}

.plaza-status {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.mcp-note {
  margin: -4px 0 14px;
  border: 1px solid rgba(216, 95, 57, 0.16);
  border-radius: 16px;
  background: rgba(216, 95, 57, 0.07);
  color: #7c432e;
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.55;
}

.mcp-note.connected {
  border-color: rgba(21, 111, 99, 0.2);
  background: rgba(21, 111, 99, 0.08);
  color: #155f55;
}

.skill-card,
.template-card,
.permission-card,
.health-card,
.capability-empty {
  border: 1px solid rgba(28, 35, 40, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  padding: 14px;
}

.capability-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

.skill-card.enabled {
  border-color: rgba(21, 111, 99, 0.28);
  background: rgba(21, 111, 99, 0.06);
}

.mcp-card {
  background: linear-gradient(180deg, rgba(21, 111, 99, 0.035), rgba(255, 255, 255, 0.66));
}

.skill-card-head,
.template-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.skill-kicker,
.template-source,
.template-difficulty,
.health-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.skill-card h4,
.template-card h4,
.permission-card h4,
.health-card h4 {
  margin: 3px 0 0;
  font-size: 0.98rem;
}

.skill-card p,
.template-card p,
.health-card p {
  margin: 10px 0 0;
  color: #3f4a52;
  line-height: 1.55;
  font-size: 0.88rem;
}

.skill-action {
  border: 1px solid rgba(21, 111, 99, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  cursor: pointer;
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.skill-action:disabled {
  opacity: 0.72;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.skill-tags span,
.skill-tags .tag-button,
.template-badge {
  border: 0;
  border-radius: 999px;
  background: rgba(21, 111, 99, 0.09);
  color: var(--accent);
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.skill-tags .tag-button {
  cursor: pointer;
  font-family: inherit;
}

.skill-tags .tag-button:hover {
  filter: brightness(0.96);
  text-decoration: underline;
}

.skill-tags .mcp-required-tag {
  border: 1px solid rgba(216, 95, 57, 0.2);
  background: rgba(216, 95, 57, 0.09);
  color: #8a3e25;
}

.skill-tags .mcp-ready-tag {
  border: 1px solid rgba(21, 111, 99, 0.22);
  background: rgba(21, 111, 99, 0.11);
  color: var(--accent);
}

.skill-tags .mcp-not-ready-tag {
  border: 1px solid rgba(180, 130, 60, 0.22);
  background: rgba(180, 130, 60, 0.1);
  color: #8a5b16;
}

.install-required-mcps-btn {
  margin-top: 10px;
}

.permission-details {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.permission-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.permission-details ul,
.permission-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.65;
}

.template-card {
  display: flex;
  flex-direction: column;
}

.template-card.new-post {
  border-color: rgba(216, 95, 57, 0.26);
  background: linear-gradient(180deg, rgba(216, 95, 57, 0.06), rgba(255, 255, 255, 0.66));
}

.template-industry {
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(28, 35, 40, 0.06);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 800;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.template-card .send-button {
  align-self: flex-start;
}

.template-source {
  margin-top: 10px;
}

.template-difficulty {
  flex: 0 0 auto;
  text-align: right;
}

.health-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
}

.health-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--muted);
}

.health-card.ok .health-dot {
  background: var(--accent);
}

.health-card.error .health-dot {
  background: #b5462b;
}

.health-card.pending .health-dot {
  background: #d49b2a;
}

.job-ledger-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.job-card {
  border: 1px solid rgba(28, 35, 40, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.job-card.running {
  border-color: rgba(21, 111, 99, 0.28);
}

.job-card.failed {
  border-color: rgba(181, 70, 43, 0.3);
}

.job-card-head,
.job-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.job-card h4 {
  margin: 3px 0 0;
  font-size: 0.98rem;
  word-break: break-all;
}

.job-kicker,
.job-meta-row,
.job-safety-note,
.job-timeline em {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.job-meta-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.job-meta-row span {
  border-radius: 999px;
  background: rgba(28, 35, 40, 0.055);
  padding: 5px 8px;
}

.job-ready {
  color: var(--accent);
  background: rgba(21, 111, 99, 0.08) !important;
}

.job-missing {
  color: #b5462b;
  background: rgba(181, 70, 43, 0.08) !important;
}

.risk-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(21, 111, 99, 0.08);
  color: var(--accent);
}

.risk-badge.medium {
  background: rgba(212, 155, 42, 0.12);
  color: #966713;
}

.risk-badge.high {
  background: rgba(181, 70, 43, 0.12);
  color: #b5462b;
}

.job-details,
.agent-trace-panel {
  margin-top: 12px;
  border: 1px solid rgba(28, 35, 40, 0.08);
  border-radius: 14px;
  background: rgba(250, 247, 240, 0.72);
  overflow: hidden;
}

.job-details summary,
.agent-trace-panel summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
}

.job-timeline {
  margin: 0;
  padding: 0 12px 12px 32px;
  color: #334048;
  line-height: 1.6;
  font-size: 0.86rem;
}

.job-safety-note,
.agent-trace-body {
  border-top: 1px solid rgba(28, 35, 40, 0.07);
  padding: 10px 12px 12px;
}

.agent-tool-traces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.agent-tool-traces span {
  border-radius: 999px;
  background: rgba(21, 111, 99, 0.08);
  color: var(--accent);
  padding: 5px 8px;
  font-size: 0.78rem;
}

.chat-panel {
  border-radius: 28px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: calc(100vh - 36px);
  overflow: hidden;
}

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

.chat-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.chat-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.header-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(21, 111, 99, 0.1);
  color: var(--accent);
  font-weight: 600;
}

.message-list {
  padding: 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  margin: auto;
  max-width: 520px;
  text-align: center;
  padding: 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(21, 111, 99, 0.18);
}

.empty-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.empty-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.message-card {
  max-width: min(820px, 88%);
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--assistant);
  box-shadow: 0 10px 24px rgba(24, 22, 18, 0.05);
}

.message-card.user {
  align-self: flex-end;
  background: var(--user);
  color: var(--user-ink);
  border-color: transparent;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.message-card.user .message-meta {
  color: rgba(245, 250, 251, 0.72);
}

.copy-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.message-body {
  line-height: 1.7;
  word-break: break-word;
}

.message-body code {
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
  font-size: 0.92em;
  background: rgba(21, 111, 99, 0.1);
  padding: 2px 6px;
  border-radius: 8px;
}

.message-body pre {
  overflow: auto;
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 16px;
  background: #16252f;
  color: #eef6f7;
}

.message-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.reasoning-panel {
  margin-top: 12px;
  border: 1px solid rgba(21, 111, 99, 0.14);
  border-radius: 16px;
  background: rgba(21, 111, 99, 0.055);
  overflow: hidden;
}

.reasoning-summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  user-select: none;
}

.reasoning-body {
  padding: 0 12px 12px;
  color: #334048;
  line-height: 1.6;
  font-size: 0.92rem;
  word-break: break-word;
}

.reasoning-note {
  border-top: 1px solid rgba(21, 111, 99, 0.12);
  padding: 9px 12px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.usage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.usage-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(28, 35, 40, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #4d5962;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.attachment-only-copy {
  color: var(--muted);
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.attachment-list.pending {
  margin-top: 0;
}

.attachment-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(21, 111, 99, 0.14);
  background: rgba(255, 255, 255, 0.76);
}

.message-card.user .attachment-chip {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
}

.attachment-thumb,
.attachment-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: 0 0 42px;
}

.attachment-thumb {
  object-fit: cover;
}

.attachment-badge {
  display: grid;
  place-items: center;
  background: rgba(21, 111, 99, 0.12);
  color: var(--accent);
  font-weight: 700;
}

.message-card.user .attachment-badge {
  background: rgba(255, 255, 255, 0.14);
  color: var(--user-ink);
}

.attachment-meta {
  min-width: 0;
}

.attachment-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.message-card.user .attachment-note {
  color: rgba(245, 250, 251, 0.72);
}

.attachment-remove {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  cursor: pointer;
  padding: 0 0 0 4px;
}

.composer-card {
  margin: 0 18px 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  box-shadow: 0 18px 50px rgba(26, 23, 19, 0.12);
}

.composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.attach-button {
  flex: 0 0 auto;
}

.attach-button:disabled {
  opacity: 0.6;
}

.composer-attachments {
  margin-bottom: 8px;
}

.composer-card textarea {
  border: 0;
  background: transparent;
  resize: none;
  max-height: 220px;
  outline: none;
  padding: 6px 2px 12px;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-hint {
  color: var(--muted);
  font-size: 0.84rem;
}

.send-button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), #0f5a50);
  color: white;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
}

.send-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.live-job-panel {
  display: grid;
  gap: 12px;
}

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

.live-job-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.live-job-head h4 {
  margin: 3px 0 4px;
  font-size: 1rem;
  color: #1f2a31;
}

.live-job-head p {
  margin: 0;
  color: #4d5962;
  line-height: 1.55;
}

.live-orb {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(135deg, var(--accent), #48b5a5);
  box-shadow: 0 0 0 0 rgba(21, 111, 99, 0.28);
  animation: live-orb-pulse 1.45s infinite ease-out;
}

.live-job-meter,
.live-job-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-job-meter span {
  position: relative;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(28, 35, 40, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
}

.live-job-meter span.done {
  background: rgba(21, 111, 99, 0.1);
  color: var(--accent);
}

.live-job-meter span.current {
  background: var(--accent);
  color: white;
}

.live-job-facts span {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(28, 35, 40, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: #4d5962;
  font-size: 0.78rem;
}

.live-job-insight {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(21, 111, 99, 0.06);
  color: #334048;
  line-height: 1.55;
  font-size: 0.88rem;
}

.live-job-insight.warn {
  background: rgba(183, 107, 22, 0.1);
  color: #7a4d16;
}

.live-job-details {
  border: 1px solid rgba(21, 111, 99, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
}

.live-job-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.live-job-details .job-timeline {
  padding: 0 14px 12px 32px;
}

.live-cancel-btn {
  justify-self: start;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.pending-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 24px;
}

.pending-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.2s infinite ease-in-out;
}

.pending-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.pending-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes live-orb-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(21, 111, 99, 0.28);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(21, 111, 99, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(21, 111, 99, 0);
  }
}

@media (max-width: 920px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

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

  .message-card {
    max-width: 100%;
  }

  .composer-tools,
  .composer-footer,
  .config-actions,
  .capability-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .config-grid,
  .skill-grid,
  .template-grid,
  .permission-grid,
  .health-grid {
    grid-template-columns: 1fr;
  }

  .market-search {
    min-width: 0;
  }

  .template-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }
}
