:root {
  --bg: #11121b;
  --panel: rgba(28, 31, 43, 0.68);
  --panel-soft: rgba(28, 31, 43, 0.42);
  --line: rgba(255, 255, 255, 0.115);
  --text: #f4f7fb;
  --muted: #9aa6b8;
  --good: #5ee2b5;
  --warn: #f5b544;
  --bad: #f26d6d;
  --blue: #7dd3fc;
  --violet: #a78bfa;
  --pink: #f472b6;
  --gold: #fbbf24;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse 48% 62% at 10% 6%, rgba(139, 92, 246, 0.24), rgba(139, 92, 246, 0.08) 38%, rgba(17, 18, 27, 0) 70%),
    radial-gradient(ellipse 36% 48% at 92% 54%, rgba(125, 211, 252, 0.18), rgba(125, 211, 252, 0.06) 36%, rgba(17, 18, 27, 0) 72%),
    linear-gradient(180deg, #11121b 0%, #151927 48%, #10121a 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(154, 166, 184, 0.22) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.28;
  mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0.45));
}

a { color: inherit; }

.shell {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 72px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  margin-bottom: 22px;
  padding: 14px 0;
  backdrop-filter: blur(24px);
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-lockup {
  position: relative;
  min-width: 230px;
  padding-left: 66px;
}

.brand-logo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(244, 114, 182, 0.24));
}

.status-light {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(94, 226, 181, 0.36), 0 0 18px rgba(94, 226, 181, 0.72);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 226, 181, 0.36), 0 0 18px rgba(94, 226, 181, 0.72); }
  70% { box-shadow: 0 0 0 11px rgba(94, 226, 181, 0), 0 0 22px rgba(94, 226, 181, 0.82); }
  100% { box-shadow: 0 0 0 0 rgba(94, 226, 181, 0), 0 0 18px rgba(94, 226, 181, 0.72); }
}

.mc-view {
  display: revert;
}

body[data-view="overview"] .mc-view:not([data-view="overview"]),
body[data-view="agents"] .mc-view:not([data-view="agents"]),
body[data-view="chat"] .mc-view:not([data-view="chat"]),
body[data-view="tasks"] .mc-view:not([data-view="tasks"]),
body[data-view="automations"] .mc-view:not([data-view="automations"]),
body[data-view="results"] .mc-view:not([data-view="results"]),
body[data-view="builder"] .mc-view:not([data-view="builder"]),
body[data-view="settings"] .mc-view:not([data-view="settings"]) {
  display: none !important;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 940px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(28, 31, 43, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 18px 48px rgba(0, 0, 0, 0.22);
}

nav a,
.nav-tab {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 13px;
  background: transparent;
  min-height: 36px;
}

.nav-tab {
  font: inherit;
  cursor: pointer;
}

.nav-tab:hover,
.nav-tab:focus,
.nav-tab.active {
  color: #11121b;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.cockpit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin: 8px 0 26px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 0%, rgba(167, 139, 250, 0.13), transparent 34%),
    radial-gradient(circle at 92% 28%, rgba(125, 211, 252, 0.1), transparent 28%),
    var(--panel-soft);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(28px) saturate(150%);
}

.cockpit-hero h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: 0;
}

.cockpit-hero p {
  max-width: 760px;
}

.hero-chat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 860px;
  margin-top: 22px;
}

.hero-chat textarea {
  width: 100%;
  min-height: 58px;
  max-height: 140px;
  resize: vertical;
  padding: 14px 16px;
  color: var(--text);
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 16px;
  background: rgba(12, 16, 25, 0.62);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.hero-chat textarea:focus {
  outline: none;
  border-color: rgba(94, 226, 181, 0.62);
  box-shadow: 0 0 0 4px rgba(94, 226, 181, 0.08);
}

.hero-chat button {
  min-width: 116px;
  min-height: 58px;
  color: #10121a;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #86efac, #67e8f9);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hero-chat button:hover,
.hero-chat button:focus-visible {
  filter: brightness(1.05);
  outline: none;
}

.hero-chat-status {
  margin-top: 9px;
  font-size: 14px;
}

.hero-chat-response {
  max-width: 860px;
  margin-top: 12px;
  padding: 14px 16px;
  white-space: pre-wrap;
  border: 1px solid rgba(94, 226, 181, 0.28);
  border-radius: 16px;
  background: rgba(37, 52, 61, 0.58);
  color: var(--text);
}

.cockpit-status {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 230px;
  padding: 14px 16px 14px 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.cockpit-status .status-light {
  left: 16px;
  top: 18px;
}

.cockpit-status strong,
.cockpit-status span {
  display: block;
}

.cockpit-status span {
  color: var(--muted);
  font-size: 13px;
}

.mission-home {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.mission-home-rail,
.mission-home-main {
  min-width: 0;
}

.mission-home-rail {
  display: grid;
  gap: 14px;
}

.mission-home-card,
.mission-workforce-card,
.phase-agent-panel,
.phase-main-button,
.phase-main-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(28, 31, 43, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.mission-home-card,
.phase-main-button {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 78px;
  padding: 18px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mission-home-card:hover,
.mission-home-card:focus-visible,
.phase-main-button:hover,
.phase-main-button:focus-visible,
.phase-agent-card:hover,
.phase-agent-card:focus-visible {
  border-color: rgba(94, 226, 181, 0.58);
  background: rgba(37, 52, 61, 0.82);
  outline: none;
}

.mission-home-card strong,
.phase-main-button strong {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.12;
}

.mission-home-card span,
.phase-main-button span,
.phase-main-block li {
  color: var(--muted);
}

.mission-chat-card {
  min-height: 104px;
  border-color: rgba(45, 212, 191, 0.42);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.28), rgba(56, 189, 248, 0.12)),
    rgba(28, 31, 43, 0.78);
}

.complete-card {
  border-color: rgba(216, 180, 254, 0.32);
  background:
    linear-gradient(135deg, rgba(216, 180, 254, 0.2), rgba(28, 31, 43, 0.72)),
    rgba(28, 31, 43, 0.72);
}

.approval-card {
  border-color: rgba(251, 191, 36, 0.36);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(28, 31, 43, 0.72)),
    rgba(28, 31, 43, 0.72);
}

.builder-card {
  border-color: rgba(56, 189, 248, 0.42);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(28, 31, 43, 0.72)),
    rgba(28, 31, 43, 0.72);
}

.mission-workforce-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(74, 222, 128, 0.22), rgba(28, 31, 43, 0.72)),
    rgba(28, 31, 43, 0.72);
}

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

.phase-agent-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: var(--text);
  background: rgba(94, 226, 181, 0.16);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.phase-agent-card strong {
  font-size: 20px;
}

.phase-agent-card span,
.phase-agent-card small {
  color: var(--muted);
}

.phase-agent-card.selected {
  color: #11121b;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(134, 239, 172, 0.9);
}

.phase-agent-card.selected span,
.phase-agent-card.selected small {
  color: rgba(17, 18, 27, 0.72);
}

.phase-agent-panel {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(74, 222, 128, 0.18), rgba(28, 31, 43, 0.76)),
    rgba(28, 31, 43, 0.78);
}

.phase-agent-title,
.phase-agent-chat {
  min-height: 84px;
  text-align: center;
  align-items: center;
  justify-items: center;
  background: rgba(134, 239, 172, 0.18);
}

.phase-main-block {
  min-height: 220px;
  padding: 20px 24px;
  background: rgba(134, 239, 172, 0.18);
}

.phase-main-block ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.phase-main-block li + li {
  margin-top: 6px;
}

.phase-main-button {
  min-height: 76px;
  text-align: center;
  align-items: center;
  justify-items: center;
  background: rgba(134, 239, 172, 0.16);
}

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

.dashboard-grid {
  grid-template-columns: 1.4fr 1fr 1.15fr 0.9fr;
  margin-bottom: 18px;
}

.metrics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.operating-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.home-work-grid {
  grid-template-columns: 1.05fr 1fr 0.95fr;
  margin-bottom: 22px;
}

.brain-console {
  min-height: 300px;
  border-top: 2px solid var(--good);
  background:
    radial-gradient(circle at 8% 10%, rgba(94, 226, 181, 0.13), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(244, 114, 182, 0.09), transparent 32%),
    var(--panel);
}

.home-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.home-stack-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.home-stack-card strong,
.home-stack-card span,
.home-stack-card small {
  display: block;
}

.home-stack-card strong {
  margin-bottom: 4px;
}

.home-stack-card small {
  margin-top: 8px;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.alerts-section {
  margin-bottom: 36px;
}

.agent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.workforce-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.two-col {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 36px;
}

#inbox {
  margin-bottom: 36px;
}

#chat,
#settings {
  margin-bottom: 36px;
}

.mission-chat-console {
  display: grid;
  gap: 14px;
}

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

.chat-control-grid label,
.chat-composer {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.chat-control-grid select,
.chat-composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.chat-composer textarea {
  resize: vertical;
  line-height: 1.45;
}

.chat-control-grid select:focus,
.chat-composer textarea:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.58);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.08);
}

.chat-dropzone {
  display: grid;
  gap: 12px;
  border: 1px dashed rgba(125, 211, 252, 0.32);
  border-radius: 14px;
  padding: 14px;
  background: rgba(125, 211, 252, 0.035);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.chat-dropzone.dragging,
.chat-dropzone:focus-visible {
  outline: none;
  border-color: rgba(94, 226, 181, 0.72);
  background: rgba(94, 226, 181, 0.08);
}

.chat-dropzone-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.chat-dropzone-copy p,
.chat-dropzone-copy strong,
.chat-dropzone-copy span {
  margin: 0;
}

.chat-dropzone-copy > div {
  display: grid;
  gap: 4px;
}

.chat-attachments,
.chat-attachment-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 420px));
  align-items: start;
  gap: 10px;
}

.chat-attachment-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.chat-attachment-card.image-landscape {
  grid-column: 1 / -1;
  max-width: min(100%, 720px);
}

.chat-attachment-preview,
.generated-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: visible;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.chat-attachment-preview {
  min-height: 220px;
  max-height: none;
  padding: 12px;
  border-radius: 9px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.055) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.055) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.055) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.055) 75%),
    rgba(255, 255, 255, 0.06);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.chat-attachment-card.image-landscape .chat-attachment-preview {
  min-height: 260px;
}

.chat-attachment-card.image-portrait .chat-attachment-preview {
  min-height: 320px;
}

.chat-attachment-card img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  border-radius: 9px;
}

.chat-attachment-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-attachment-card strong,
.chat-attachment-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-card span {
  color: var(--muted);
  font-size: 12px;
}

.chat-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-attachment-actions a,
.chat-attachment-actions button {
  flex: 1 1 130px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(94, 226, 181, 0.24);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  background: rgba(94, 226, 181, 0.12);
}

.chat-mode-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(94, 226, 181, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(94, 226, 181, 0.045);
}

.chat-mode-panel h3,
.chat-mode-panel p {
  margin: 0;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  flex: 0 0 auto;
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.segmented-control button.active {
  background: rgba(94, 226, 181, 0.16);
  color: var(--text);
}

.chat-context-card,
.handoff-preview {
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(125, 211, 252, 0.045);
}

.mission-chat-thread-shell {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 16px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(125, 211, 252, 0.08), rgba(94, 226, 181, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.chat-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.chat-thread-head h3 {
  margin: 2px 0 0;
}

.mission-chat-thread {
  display: grid;
  gap: 18px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.chat-exchange {
  display: grid;
  gap: 10px;
}

.chat-bubble {
  display: grid;
  gap: 8px;
  max-width: min(820px, 92%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.chat-bubble.user {
  justify-self: end;
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.105);
}

.chat-bubble.assistant {
  justify-self: start;
  border-color: rgba(94, 226, 181, 0.32);
  background: rgba(94, 226, 181, 0.075);
}

.chat-bubble.error {
  border-color: rgba(245, 181, 68, 0.42);
  background: rgba(245, 181, 68, 0.09);
}

.chat-bubble-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.chat-bubble-body {
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.45;
}

.chat-empty-state {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.chat-context-card h3,
.chat-context-card p {
  margin: 0;
}

.handoff-preview summary,
.mission-chat-history summary,
.relay-command-card summary,
.mission-chat-advanced summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.handoff-preview[open] summary,
.mission-chat-history[open] summary,
.relay-command-card[open] summary,
.mission-chat-advanced[open] summary {
  margin-bottom: 12px;
}

.mission-chat-advanced {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.advanced-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
}

.handoff-preview pre {
  max-height: 260px;
  margin: 8px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.relay-command-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(94, 226, 181, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(94, 226, 181, 0.045);
}

.relay-command-card h3,
.relay-command-card p {
  margin: 0;
}

.relay-command-card pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.relay-command-card button {
  justify-self: start;
}

.chat-placeholder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.chat-placeholder h3,
.chat-placeholder p {
  margin: 0;
}

#agent-detail {
  margin-bottom: 36px;
}

#add-agent {
  margin-bottom: 36px;
}

#provisioning {
  margin-bottom: 36px;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.agent-builder {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.builder-form {
  display: grid;
  gap: 12px;
}

.builder-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.builder-form input,
.builder-form select,
.builder-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
}

.builder-form input,
.builder-form select {
  min-height: 42px;
}

.builder-form textarea {
  min-height: 220px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.builder-form input:focus,
.builder-form select:focus,
.builder-form textarea:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.6);
}

.memory-editor {
  display: grid;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.compact-head {
  margin-bottom: 0;
}

.compact-head h3 {
  margin: 0;
  font-size: 18px;
}

.builder-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.builder-preview h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.builder-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.builder-review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

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

.builder-review-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.builder-review-card strong {
  overflow-wrap: anywhere;
}

.builder-review-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.builder-review-columns h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.builder-review-note {
  margin-top: 14px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(125, 211, 252, 0.07);
}

button {
  min-height: 38px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(94, 226, 181, 0.12);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  white-space: normal;
}

button:hover,
button:focus {
  border-color: rgba(94, 226, 181, 0.5);
  outline: none;
}

.drafts-panel {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.draft-row:hover,
.draft-row:focus,
.draft-row.selected {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(125, 211, 252, 0.08);
  outline: none;
}

.draft-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.draft-row-actions button {
  min-height: 32px;
}

.draft-row-actions [data-open-draft] {
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.3);
}

.draft-row-actions [data-delete-draft] {
  background: rgba(242, 109, 109, 0.08);
}

.draft-detail {
  margin-top: 16px;
}

.empty-detail,
.draft-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.empty-detail h3,
.draft-detail-card h3 {
  margin: 0;
  font-size: 24px;
}

.draft-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.draft-summary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.draft-summary-grid span,
.draft-summary-grid strong {
  display: block;
}

.draft-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.draft-tools span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.setup-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.035);
}

.setup-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.setup-status-head h4 {
  margin: 0;
  font-size: 18px;
}

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

.setup-step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.setup-step strong,
.setup-step span {
  display: block;
  overflow-wrap: anywhere;
}

.setup-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  margin-top: 3px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.setup-step.done {
  border-color: rgba(94, 226, 181, 0.3);
}

.setup-step.done strong {
  color: var(--good);
}

.setup-step.done .setup-dot {
  border-color: rgba(94, 226, 181, 0.6);
  background: var(--good);
}

.setup-step.current {
  border-color: rgba(245, 181, 68, 0.38);
  background: rgba(245, 181, 68, 0.08);
}

.setup-step.current strong {
  color: var(--warn);
}

.setup-step.current .setup-dot {
  border-color: rgba(245, 181, 68, 0.75);
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(245, 181, 68, 0.12);
}

.setup-step.todo strong {
  color: var(--muted);
}

.live-test-panel {
  border: 1px solid rgba(94, 226, 181, 0.28);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: rgba(94, 226, 181, 0.055);
}

.live-test-panel h4,
.live-test-panel p {
  margin: 0;
}

.live-test-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.live-test-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.live-test-row > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.live-test-row strong,
.live-test-row p {
  display: block;
  overflow-wrap: anywhere;
}

.live-test-row.done {
  border-color: rgba(94, 226, 181, 0.3);
}

.live-test-row.done > span {
  border-color: rgba(94, 226, 181, 0.44);
  color: var(--good);
  background: rgba(94, 226, 181, 0.12);
}

.live-test-row.current,
.live-test-row.active {
  border-color: rgba(245, 181, 68, 0.36);
  background: rgba(245, 181, 68, 0.075);
}

.live-test-row.current strong,
.live-test-row.active strong {
  color: var(--warn);
}

.live-test-row.current > span,
.live-test-row.active > span {
  border-color: rgba(245, 181, 68, 0.5);
  color: var(--warn);
  background: rgba(245, 181, 68, 0.12);
}

.compact-next-action {
  margin: 12px 0 0;
}

.checklist-row.done {
  border-color: rgba(94, 226, 181, 0.24);
}

.checklist-row.done strong {
  color: var(--good);
}

.checklist-row.todo {
  border-color: rgba(245, 181, 68, 0.28);
}

.checklist-row.todo strong {
  color: var(--warn);
}

.provision-preview {
  margin-top: 16px;
}

.provision-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.provision-card.ready {
  border-color: rgba(94, 226, 181, 0.36);
}

.provision-card.blocked {
  border-color: rgba(245, 181, 68, 0.3);
}

.provision-card h3 {
  margin: 0;
  font-size: 24px;
}

.provision-row code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.provision-row.ready strong {
  color: var(--good);
}

.provision-row.blocked strong {
  color: var(--warn);
}

.queue-row.ready {
  border-color: rgba(94, 226, 181, 0.3);
}

.queue-row.blocked {
  border-color: rgba(245, 181, 68, 0.3);
}

.queue-row.warn,
.queue-row.current {
  border-color: rgba(245, 181, 68, 0.34);
}

.queue-row.done {
  border-color: rgba(94, 226, 181, 0.38);
}

.queue-row {
  cursor: pointer;
}

.queue-row:hover,
.queue-row:focus,
.queue-row.selected {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(125, 211, 252, 0.08);
  outline: none;
}

.queue-steps {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.queue-steps code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.queue-row button {
  min-height: 32px;
  background: rgba(242, 109, 109, 0.08);
}

.queue-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.queue-group + .queue-group {
  margin-top: 12px;
}

.queue-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queue-group-head h4 {
  margin: 0;
  font-size: 17px;
}

.request-detail {
  margin-top: 16px;
}

.request-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.request-detail-card h3 {
  margin: 0;
  font-size: 24px;
}

.generated-files {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.generated-files details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.generated-files summary {
  cursor: pointer;
  padding: 12px;
  color: var(--text);
  font-weight: 700;
}

.generated-files pre {
  margin: 0;
  padding: 0 12px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.script-path {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(94, 226, 181, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(94, 226, 181, 0.08);
}

.script-path code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.script-path span {
  display: block;
}

.operator-runbook {
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 8px;
  padding: 14px;
  margin-top: 16px;
  background: rgba(125, 211, 252, 0.07);
}

.operator-runbook h4 {
  margin: 0;
  font-size: 18px;
}

.operator-next-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: rgba(125, 211, 252, 0.08);
}

.operator-next-action h4,
.operator-next-action p {
  margin: 0;
}

.operator-next-action.warn {
  border-color: rgba(245, 181, 68, 0.38);
  background: rgba(245, 181, 68, 0.1);
}

.operator-next-action.warn h4 {
  color: var(--warn);
}

.operator-next-action.ready {
  border-color: rgba(94, 226, 181, 0.36);
  background: rgba(94, 226, 181, 0.08);
}

.operator-next-action.ready h4 {
  color: var(--good);
}

.profile-confirmation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.035);
}

.profile-confirmation h4,
.profile-confirmation p {
  margin: 0;
}

.profile-confirmation.found {
  border-color: rgba(94, 226, 181, 0.36);
  background: rgba(94, 226, 181, 0.08);
}

.profile-confirmation.found h4 {
  color: var(--good);
}

.profile-confirmation.pending {
  border-color: rgba(245, 181, 68, 0.28);
  background: rgba(245, 181, 68, 0.07);
}

.profile-confirmation.pending h4 {
  color: var(--warn);
}

.profile-resolution {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 8px;
  padding: 14px;
  margin: -6px 0 16px;
  background: rgba(125, 211, 252, 0.06);
}

.profile-resolution h4,
.profile-resolution p {
  margin: 0;
}

.profile-resolution.warn {
  border-color: rgba(245, 181, 68, 0.36);
  background: rgba(245, 181, 68, 0.08);
}

.profile-resolution.warn h4 {
  color: var(--warn);
}

.profile-resolution.ready {
  border-color: rgba(94, 226, 181, 0.34);
  background: rgba(94, 226, 181, 0.08);
}

.profile-resolution.ready h4 {
  color: var(--good);
}

.agent-handoff {
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  background: rgba(167, 139, 250, 0.065);
}

.agent-handoff h4 {
  margin: 0;
  font-size: 18px;
}

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

.handoff-item {
  display: grid;
  gap: 5px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.handoff-item strong,
.handoff-item span {
  overflow-wrap: anywhere;
}

.handoff-item.done {
  border-color: rgba(94, 226, 181, 0.32);
}

.handoff-item.done strong {
  color: var(--good);
}

.handoff-item.current {
  border-color: rgba(245, 181, 68, 0.34);
  background: rgba(245, 181, 68, 0.07);
}

.handoff-item.current strong {
  color: var(--warn);
}

.compact-actions {
  margin-top: 12px;
}

button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  opacity: 0.7;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(28px) saturate(150%);
  padding: 22px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow: hidden;
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 32%),
    radial-gradient(circle at 84% 0%, rgba(125, 211, 252, 0.055), transparent 30%);
  opacity: 0.8;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel h2,
.section-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
}

.muted { color: var(--muted); }

.section-head {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px 4px 14px;
}

.status-panel {
  border-top: 2px solid var(--good);
}

.status-panel h2 {
  color: var(--good);
}

.latest-panel {
  border-top: 2px solid var(--blue);
}

.sync-health-card {
  border-top: 2px solid var(--violet);
}

.agent-card {
  border-top: 3px solid var(--agent-color, var(--blue));
  cursor: pointer;
  min-height: 300px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.agent-card:hover,
.agent-card:focus {
  border-color: rgba(125, 211, 252, 0.48);
  outline: none;
  transform: translateY(-2px);
}

.agent-card.selected {
  border-color: var(--agent-color, var(--blue));
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--agent-color, var(--blue)) 14%, transparent), transparent 40%),
    var(--panel);
}

.agent-card h3 {
  margin: 0 0 8px;
  font-size: 34px;
}

.compact-agent-card {
  min-height: 250px;
}

.compact-agent-card h3 {
  font-size: 28px;
}

.compact-agent-card .agent-setup-mini {
  margin-top: 12px;
}

.metric {
  min-height: 132px;
  border-top: 2px solid rgba(125, 211, 252, 0.42);
}

.metric strong {
  display: block;
  font-size: 42px;
  line-height: 1;
  color: var(--blue);
}

.launch-console {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(94, 226, 181, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.035);
}

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

.launch-console-head h3,
.launch-next h4 {
  margin: 0;
}

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

.launch-metric {
  display: grid;
  gap: 4px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.launch-metric span,
.launch-metric small {
  color: var(--muted);
}

.launch-metric strong {
  font-size: 34px;
  line-height: 1;
  color: var(--blue);
}

.launch-metric.ready strong {
  color: var(--good);
}

.launch-metric.warn strong {
  color: var(--warn);
}

.launch-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(125, 211, 252, 0.055);
}

.launch-next.warn {
  border-color: rgba(245, 181, 68, 0.36);
  background: rgba(245, 181, 68, 0.075);
}

.launch-next.ready,
.launch-next.done {
  border-color: rgba(94, 226, 181, 0.34);
  background: rgba(94, 226, 181, 0.07);
}

.connection-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.connection-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.connection-row strong,
.connection-row span {
  overflow-wrap: anywhere;
}

.connection-row.warn {
  border-color: rgba(245, 181, 68, 0.34);
  background: rgba(245, 181, 68, 0.06);
}

.connection-row.current {
  border-color: rgba(125, 211, 252, 0.3);
  background: rgba(125, 211, 252, 0.055);
}

.connection-row.ready {
  border-color: rgba(94, 226, 181, 0.3);
  background: rgba(94, 226, 181, 0.055);
}

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

.connection-badges span {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
}

.connection-next {
  justify-self: end;
}

.sync-health-card strong {
  font-size: 24px;
  line-height: 1.12;
}

.sync-health-card strong.fresh {
  color: var(--good);
}

.sync-health-card strong.stale,
.sync-health-card strong.missing,
.sync-health-card strong.unknown {
  color: var(--warn);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.review-row {
  cursor: pointer;
}

.review-row:hover,
.review-row:focus,
.review-row.selected {
  border-color: rgba(94, 226, 181, 0.48);
  background: rgba(94, 226, 181, 0.075);
  outline: none;
}

.review-row-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.review-row-assets small {
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(94, 226, 181, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(94, 226, 181, 0.08);
  font-size: 11px;
}

.review-detail-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.review-detail-card h3 {
  margin: 0;
  font-size: 26px;
}

.review-note,
.review-body,
.social-caption-panel,
.image-ideas-panel,
.generated-images-panel,
.sources-panel,
.notes-panel,
.actions-panel,
.attached-chat {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(245, 181, 68, 0.32);
  border-radius: 16px;
  padding: 14px;
  background: rgba(245, 181, 68, 0.06);
}

.review-section {
  min-width: 0;
}

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

.result-metadata span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
}

.result-metadata strong {
  color: var(--text);
}

.readiness-strip span {
  border-color: rgba(94, 226, 181, 0.25);
  background: rgba(94, 226, 181, 0.075);
}

.review-note strong,
.review-note span {
  display: block;
}

.review-body {
  max-height: 520px;
  overflow: auto;
  border-color: rgba(94, 226, 181, 0.28);
  background: rgba(94, 226, 181, 0.045);
}

.review-body pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.social-caption-panel {
  border-color: rgba(94, 226, 181, 0.26);
  background: rgba(94, 226, 181, 0.04);
}

.social-caption-panel pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.social-caption-panel button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(94, 226, 181, 0.24);
  background: rgba(94, 226, 181, 0.11);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.attached-chat {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.055);
}

.image-ideas-panel {
  border-color: rgba(167, 139, 250, 0.32);
  background: rgba(167, 139, 250, 0.06);
}

.image-ideas-panel.inline-panel {
  margin-top: 10px;
  border-color: rgba(167, 139, 250, 0.22);
  background: rgba(255, 255, 255, 0.035);
}

.generated-images-panel {
  border-color: rgba(94, 226, 181, 0.32);
  background: rgba(94, 226, 181, 0.055);
}

.sources-panel {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.045);
}

.notes-panel {
  border-color: rgba(245, 181, 68, 0.28);
  background: rgba(245, 181, 68, 0.045);
}

.notes-panel textarea,
.attached-chat textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 10, 18, 0.35);
  color: var(--text);
  padding: 12px;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.notes-panel textarea:focus,
.attached-chat textarea:focus {
  outline: none;
  border-color: rgba(245, 181, 68, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 181, 68, 0.08);
}

.actions-panel {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.025);
}

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

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

.generated-image-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.generated-image-card:hover,
.generated-image-card:focus {
  border-color: rgba(94, 226, 181, 0.52);
  outline: none;
}

.generated-image-preview {
  height: clamp(220px, 32vw, 420px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.generated-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
}

.generated-image-card strong,
.generated-image-card small {
  display: block;
}

.generated-image-card small {
  color: var(--muted);
  font-size: 12px;
}

.image-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.image-file-actions a,
.image-file-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(94, 226, 181, 0.24);
  background: rgba(94, 226, 181, 0.11);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.image-file-actions .danger-lite {
  border-color: rgba(251, 113, 133, 0.32);
  background: rgba(251, 113, 133, 0.12);
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-list a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.source-list a:hover,
.source-list a:focus {
  border-color: rgba(125, 211, 252, 0.48);
  outline: none;
}

.source-list span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.image-idea-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.image-idea-card strong,
.image-idea-card span {
  display: block;
}

.image-idea-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.chat-notes {
  display: grid;
  gap: 8px;
}

.agent-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.agent-detail {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.agent-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.agent-fields span,
.agent-field {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.agent-fields strong,
.agent-field span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.agent-field strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.detail-agent-fields {
  margin-top: 16px;
}

.agent-workroom {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.agent-detail-actions {
  margin: 16px 0 18px;
}

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

.workroom-metric,
.workroom-latest {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.workroom-metric {
  display: grid;
  gap: 4px;
}

.workroom-metric strong {
  font-size: 28px;
  line-height: 1;
}

.workroom-metric small {
  color: var(--muted);
  line-height: 1.35;
}

.workroom-latest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.workroom-latest strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.olgivy-lanes {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(94, 226, 181, 0.18);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(94, 226, 181, 0.07), rgba(56, 189, 248, 0.04));
}

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

.olgivy-lane-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.olgivy-lane-card.is-actionable {
  border-color: rgba(94, 226, 181, 0.28);
}

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

.lane-card-head h4 {
  margin: 4px 0 0;
}

.lane-purpose {
  margin: 0;
}

.lane-latest {
  display: grid;
  gap: 5px;
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.lane-latest strong {
  line-height: 1.25;
}

.lane-latest small {
  color: var(--muted);
  line-height: 1.35;
}

.lane-actions {
  align-self: end;
}

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

.workspace-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.workspace-block h4 {
  margin: 4px 0 12px;
}

.workroom-review-list {
  display: grid;
  gap: 10px;
}

.workroom-review-card {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid rgba(245, 181, 68, 0.28);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  background: rgba(245, 181, 68, 0.06);
  text-align: left;
}

.workroom-review-card:hover,
.workroom-review-card:focus {
  border-color: rgba(245, 181, 68, 0.52);
  outline: none;
}

.workroom-review-card span,
.workroom-review-card small {
  color: var(--muted);
}

.workroom-result-package {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(94, 226, 181, 0.26);
  border-radius: 12px;
  padding: 14px;
  background: rgba(94, 226, 181, 0.06);
}

.workroom-result-package button {
  justify-self: start;
}

.agent-setup-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.agent-setup-mini strong,
.agent-setup-mini span {
  display: block;
  overflow-wrap: anywhere;
}

.agent-setup-mini strong {
  margin-bottom: 3px;
}

.agent-setup-mini span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
}

.agent-setup-mini.done {
  border-color: rgba(94, 226, 181, 0.32);
  background: rgba(94, 226, 181, 0.07);
}

.agent-setup-mini.done strong {
  color: var(--good);
}

.agent-setup-mini.current {
  border-color: rgba(245, 181, 68, 0.34);
  background: rgba(245, 181, 68, 0.07);
}

.agent-setup-mini.current strong {
  color: var(--warn);
}

.card-action {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.28);
  color: var(--text);
}

.agent-card.selected .card-action {
  background: rgba(94, 226, 181, 0.14);
  border-color: rgba(94, 226, 181, 0.34);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--good);
}

.status.active-now::before {
  box-shadow: 0 0 0 4px rgba(94, 226, 181, 0.12);
}

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

.list-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.042);
}

.list-row strong {
  display: block;
  margin-bottom: 4px;
}

.dense-list {
  gap: 8px;
}

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

.current-row {
  border-color: rgba(94, 226, 181, 0.5);
  background: rgba(94, 226, 181, 0.08);
}

.rich-row strong,
.rich-row span {
  overflow-wrap: anywhere;
}

.row-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 130px;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text);
  background: rgba(94, 226, 181, 0.08);
  font-size: 12px;
  white-space: nowrap;
}

.pill.success {
  border-color: rgba(94, 226, 181, 0.35);
  background: rgba(94, 226, 181, 0.13);
}

.pill.warning {
  border-color: rgba(245, 181, 68, 0.45);
  background: rgba(245, 181, 68, 0.11);
}

.latest-panel h2 {
  overflow-wrap: anywhere;
}

.alert-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
}

.alert-row strong,
.alert-row span {
  display: block;
}

.alert-row strong {
  margin-bottom: 4px;
}

.alert-row.warning {
  border-color: rgba(245, 181, 68, 0.4);
  background: rgba(245, 181, 68, 0.1);
}

.alert-row.info {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.08);
}

@media (max-width: 860px) {
  .topbar,
  .dashboard-grid,
  .mission-home,
  .agent-grid,
  .workforce-grid,
  .operating-grid,
  .home-work-grid,
  .two-col,
  .metrics-grid,
  .detail-grid,
  .agent-builder,
  .builder-review-grid,
  .builder-review-columns,
  .draft-summary-grid,
  .review-layout,
  .setup-track,
  .launch-console-grid,
  .image-idea-grid,
  .generated-image-grid,
  .chat-control-grid,
  .advanced-grid,
  .workroom-grid {
    grid-template-columns: 1fr;
  }

  .olgivy-lane-grid {
    grid-template-columns: 1fr;
  }

  .chat-mode-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
  }

  .topbar { display: grid; }
  nav { justify-content: flex-start; }
  .topbar h1 { font-size: 38px; }
  .hero-chat {
    grid-template-columns: 1fr;
  }
  .hero-chat button {
    width: 100%;
  }
  .phase-agent-grid {
    grid-template-columns: 1fr;
  }
  .panel-head,
  .rich-row,
  .draft-row,
  .profile-confirmation,
  .operator-next-action,
  .profile-resolution,
  .launch-console-head,
  .launch-next,
  .connection-row,
  .handoff-grid,
  .agent-setup-mini,
  .workroom-latest {
    grid-template-columns: 1fr;
  }
  .panel-head { display: grid; }
  .connection-next { justify-self: start; }
  .row-meta {
    justify-items: start;
    min-width: 0;
  }
}
