:root {
  --bg: #05070d;
  --panel: #101b2a;
  --panel-soft: #162438;
  --panel-elevated: #1b2c45;
  --line: rgba(155, 210, 226, 0.12);
  --text: #eef5ff;
  --muted: #95a8c2;
  --mint: #79e6d0;
  --sky: #89b9ff;
  --violet: #7d6cff;
  --amber: #f8c56f;
  --rose: #ff9dc3;
  --lime: #abf59f;
  --danger: #ff8d8d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SUIT Variable", "Pretendard Variable", "Avenir Next",
    "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(121, 230, 208, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(125, 108, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #03050a 0%, #08111d 42%, #060d17 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.2;
  pointer-events: none;
}

body::before {
  top: 80px;
  left: -110px;
  width: 260px;
  height: 260px;
  background: rgba(121, 230, 208, 0.22);
}

body::after {
  right: -120px;
  bottom: 60px;
  width: 280px;
  height: 280px;
  background: rgba(125, 108, 255, 0.18);
}

.app-shell {
  width: min(1540px, calc(100vw - 32px));
  margin: 16px auto;
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 18px;
}

.sidebar,
.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 27, 42, 0.98), rgba(10, 17, 28, 0.96));
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  padding: 18px 14px;
  border-radius: 34px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.brand-block {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px 0 18px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), #b9acff);
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
}

.brand-copy {
  text-align: center;
}

.brand-copy strong,
.section-heading h2,
.topbar h1 {
  display: block;
}

.brand-copy strong {
  font-size: 0.94rem;
}

.brand-copy span,
.field-label,
.metric-card p,
.topbar-subtitle,
.live-meta,
.stack-item p,
.timeline-body,
.check-item p,
.result-empty p {
  color: var(--muted);
}

.brand-copy span {
  font-size: 0.72rem;
}

.sidebar-nav {
  display: grid;
  align-content: start;
}

.sidebar-tab-list {
  display: grid;
  gap: 12px;
}

.sidebar-tab {
  width: 100%;
  padding: 12px 8px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 8px;
  font: inherit;
}

.sidebar-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-tab.is-active {
  background: linear-gradient(180deg, rgba(125, 108, 255, 0.26), rgba(121, 230, 208, 0.16));
  border-color: rgba(137, 185, 255, 0.22);
}

.sidebar-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.1rem;
  font-weight: 800;
}

.sidebar-tab.is-active .sidebar-icon {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-label {
  font-size: 0.74rem;
  line-height: 1.2;
}

.sidebar-footer {
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-footer span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.sidebar-footer strong {
  font-size: 0.84rem;
  letter-spacing: 0.12em;
}

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

.workspace.is-results-only .dashboard-grid {
  grid-template-columns: 1fr;
}

.workspace.is-results-only .result-panel {
  min-height: calc(100vh - 220px);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(121, 230, 208, 0.06), transparent 30%),
    linear-gradient(315deg, rgba(125, 108, 255, 0.08), transparent 36%);
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.04;
}

.topbar-subtitle {
  max-width: 58ch;
  margin: 12px 0 0;
  line-height: 1.65;
}

.topbar-actions,
.field-actions,
.metric-card,
.live-header,
.stack-item,
.timeline-topline,
.result-toolbar,
.result-summary,
.mission-grid {
  display: flex;
  gap: 12px;
}

.topbar-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: end;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.solid-button {
  color: #071421;
  background: linear-gradient(135deg, var(--mint), #c8fff5);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  font-weight: 700;
}

.pill-strong {
  color: #071421;
  background: var(--mint);
}

.mission-grid {
  align-items: stretch;
}

.mission-editor {
  flex: 1.2;
  min-width: 0;
}

.mission-briefing {
  flex: 0.9;
  min-width: 320px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.mission-input {
  width: 100%;
  min-height: 160px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  resize: vertical;
  font: inherit;
  line-height: 1.65;
}

.mission-input:focus {
  outline: 2px solid rgba(121, 230, 208, 0.35);
  outline-offset: 2px;
}

.speech-bubble {
  width: 100%;
  padding: 18px;
  border-radius: 22px 22px 10px 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.speech-bubble span,
.metric-card span,
.live-card-label,
.stack-item span,
.result-card span,
.result-section-label,
.check-item strong {
  display: block;
  margin-bottom: 8px;
}

.speech-bubble span,
.metric-card span,
.live-card-label,
.stack-item span,
.result-card span,
.result-section-label {
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.speech-bubble strong {
  line-height: 1.6;
}

.etti-figure {
  width: min(280px, 100%);
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.28));
}

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

.metric-card {
  flex-direction: column;
  align-items: start;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr);
  gap: 18px;
}

.section-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.live-card-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.live-card {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(27, 44, 69, 0.88), rgba(17, 29, 47, 0.88));
  text-align: left;
}

.live-card:hover {
  border-color: rgba(121, 230, 208, 0.22);
}

.live-card.idle {
  opacity: 0.82;
}

.live-card.working {
  box-shadow: inset 0 0 0 1px rgba(248, 197, 111, 0.18);
}

.live-card.ready {
  box-shadow: inset 0 0 0 1px rgba(121, 230, 208, 0.2);
}

.live-card.blocked {
  box-shadow: inset 0 0 0 1px rgba(255, 141, 141, 0.18);
}

.live-header {
  align-items: start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.live-title {
  display: flex;
  gap: 12px;
}

.live-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #06131f;
  font-weight: 800;
}

.live-title strong,
.result-card strong,
.stack-item strong,
.timeline-title,
.check-item strong {
  display: block;
}

.live-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.live-status.idle {
  background: rgba(255, 255, 255, 0.08);
}

.live-status.working {
  background: rgba(248, 197, 111, 0.16);
  color: var(--amber);
}

.live-status.ready {
  background: rgba(121, 230, 208, 0.18);
  color: var(--mint);
}

.live-status.blocked {
  background: rgba(255, 157, 195, 0.18);
  color: var(--rose);
}

.progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  margin: 14px 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--mint));
}

.live-meta {
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.88rem;
}

.result-panel {
  min-width: 0;
}

.result-content,
.stack-list,
.review-checklist {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.result-empty,
.result-card,
.stack-item,
.pipeline-step,
.check-item,
.timeline-item {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.result-empty,
.result-card,
.stack-item,
.pipeline-step,
.check-item {
  padding: 16px;
}

.result-toolbar,
.result-summary,
.timeline-topline {
  align-items: center;
  justify-content: space-between;
}

.result-summary {
  margin-bottom: 12px;
}

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

.artifact-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
}

.artifact-table th,
.artifact-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.artifact-table th {
  background: rgba(255, 255, 255, 0.06);
}

.artifact-list {
  margin: 0;
  padding-left: 18px;
}

.artifact-list li + li {
  margin-top: 6px;
}

.stack-item {
  display: flex;
  flex-direction: column;
}

.blocker-card {
  gap: 10px;
}

.blocker-prompt-label {
  margin: 4px 0 0;
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blocker-prompt {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.followup-history {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.followup-entry {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.followup-entry span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.followup-entry p {
  margin: 6px 0 0;
  color: var(--text);
  line-height: 1.55;
}

.followup-box {
  margin-top: 4px;
}

.followup-input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 7, 13, 0.42);
  color: var(--text);
  font: inherit;
}

.stack-item.empty {
  opacity: 0.82;
}

.pipeline-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.pipeline-step.active {
  box-shadow: inset 0 0 0 1px rgba(121, 230, 208, 0.22);
}

.pipeline-step.complete {
  box-shadow: inset 0 0 0 1px rgba(137, 185, 255, 0.16);
}

.step-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), #b7acff);
  font-weight: 800;
}

.timeline-list {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 16px;
}

.timeline-time {
  color: var(--muted);
  font-size: 0.84rem;
}

.timeline-body {
  margin: 0;
  line-height: 1.6;
}

.check-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--mint);
}

.check-item.is-done strong,
.review-card.is-done strong {
  color: var(--mint);
}

.live-card.is-ready,
.job-card.is-ready {
  border-color: rgba(171, 245, 159, 0.24);
}

.live-card.is-live,
.job-card.is-live {
  border-color: rgba(137, 185, 255, 0.22);
}

.live-card.is-blocked,
.job-card.is-blocked,
.review-card {
  border-color: rgba(255, 157, 195, 0.18);
}

.live-card {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

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

.live-card-top strong,
.job-card-top strong,
.summary-card strong,
.mini-stat-card strong,
.file-card strong,
.review-card strong {
  display: block;
}

.live-card-top p,
.job-card-top p,
.job-result,
.job-prompt,
.job-meta,
.job-preview,
.live-note {
  margin: 8px 0 0;
}

.live-badge {
  flex: none;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: var(--muted);
}

.progress-track {
  margin-top: 16px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--sky));
}

.live-note {
  line-height: 1.55;
  min-height: 44px;
}

.live-meta-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.pipeline-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.pipeline-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pipeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.pipeline-step.done .pipeline-dot {
  background: var(--mint);
}

.pipeline-step.working .pipeline-dot {
  background: var(--sky);
}

.pipeline-step p,
.review-card p,
.file-card p,
.summary-card span,
.mini-stat-card span,
.job-meta {
  color: var(--muted);
}

.summary-card-grid,
.mini-stat-grid,
.file-list,
.review-summary {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

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

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

.summary-card,
.mini-stat-card,
.file-card,
.review-card,
.action-box,
.job-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.summary-card,
.mini-stat-card,
.file-card,
.review-card {
  padding: 16px;
}

.summary-card strong,
.mini-stat-card strong {
  margin-top: 8px;
  font-size: 1.5rem;
}

.action-box {
  position: relative;
  z-index: 1;
  padding: 18px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading.compact h3 {
  margin: 0;
  font-size: 1.1rem;
}

.task-input,
.job-preview {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 7, 13, 0.42);
  color: var(--text);
  font: inherit;
}

.task-input {
  min-height: 128px;
  resize: vertical;
  padding: 14px 16px;
}

.job-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.job-card {
  padding: 18px;
}

.job-prompt {
  font-weight: 600;
  line-height: 1.55;
}

.job-result {
  line-height: 1.6;
}

.attachment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(137, 185, 255, 0.2);
  background: rgba(137, 185, 255, 0.1);
  color: var(--text);
  text-decoration: none;
}

.attachment-chip:hover {
  background: rgba(137, 185, 255, 0.18);
}

.job-preview {
  margin-top: 14px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.55;
  overflow: auto;
}

.result-empty {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 20px;
}

.report-list {
  display: grid;
  gap: 12px;
}

.report-row,
.report-spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.report-row {
  color: var(--text);
  text-decoration: none;
}

.report-row:hover {
  border-color: rgba(121, 230, 208, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.report-row strong,
.report-spotlight strong {
  display: block;
}

.report-row span,
.report-spotlight p {
  margin: 8px 0 0;
  color: var(--muted);
}

.report-spotlight {
  align-items: flex-start;
  flex-direction: column;
}

.report-frame-wrap {
  width: 100%;
  min-height: 860px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 7, 13, 0.42);
}

.report-frame {
  width: 100%;
  min-height: 860px;
  border: 0;
  background: white;
}

.result-section-block,
.ops-item {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.result-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.result-section-head strong {
  font-size: 1rem;
}

.ops-list {
  display: grid;
  gap: 12px;
}

.ops-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ops-item strong {
  display: block;
  font-size: 1.1rem;
}

.ops-item p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .brand-copy,
  .sidebar-label {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .live-board {
    grid-row: auto;
  }

  .summary-card-grid,
  .mini-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100vw - 20px, 1540px);
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto auto;
    gap: 16px;
  }

  .sidebar-tab-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .sidebar-tab {
    padding: 10px 6px;
  }

  .brand-copy,
  .sidebar-label {
    display: block;
  }

  .mission-grid,
  .topbar,
  .topbar-actions {
    flex-direction: column;
  }

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

  .summary-card-grid,
  .mini-stat-grid,
  .file-list,
  .review-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar-tab-list,
  .metrics-grid,
  .live-card-grid {
    grid-template-columns: 1fr;
  }

  .workspace .card,
  .sidebar {
    border-radius: 24px;
  }

  .topbar h1 {
    font-size: 2.2rem;
  }

  .mission-briefing {
    min-width: 0;
  }

  .field-actions button,
  .topbar-actions button {
    width: 100%;
  }
}

:root {
  --bg: #0b1020;
  --panel: #121a2b;
  --panel-soft: #182235;
  --panel-elevated: #1f2c43;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f7fb;
  --muted: #8d9ab0;
  --mint: #69e0c8;
  --sky: #7ba8ff;
  --violet: #7b86ff;
  --amber: #f3b95f;
  --rose: #ff9ba5;
  --lime: #4dd78a;
  --danger: #ff7e7e;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(105, 224, 200, 0.12), transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(123, 134, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #0a0f1d 0%, #0d1424 48%, #0b111d 100%);
}

.app-shell {
  width: min(1600px, calc(100vw - 32px));
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 20px;
}

.sidebar {
  padding: 18px;
  border-radius: 28px;
}

.brand-block {
  justify-items: start;
  gap: 14px;
  padding-bottom: 24px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7ba8ff, #69e0c8);
  color: #08111b;
}

.brand-copy {
  text-align: left;
}

.brand-copy strong {
  font-size: 1rem;
  line-height: 1.3;
}

.brand-copy span {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.sidebar-tab-list {
  gap: 18px;
}

.sidebar-group {
  display: grid;
  gap: 8px;
}

.sidebar-group-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-tab {
  padding: 10px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.sidebar-tab.is-active {
  background: linear-gradient(180deg, rgba(123, 168, 255, 0.16), rgba(105, 224, 200, 0.08));
  border-color: rgba(123, 168, 255, 0.24);
}

.sidebar-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: 0 0 auto;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-copy {
  display: grid;
  min-width: 0;
}

.sidebar-label {
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
}

.sidebar-description {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.sidebar-footer {
  text-align: left;
}

.workspace {
  gap: 20px;
}

.card {
  padding: 20px;
  border-radius: 24px;
}

.topbar {
  align-items: center;
  padding: 22px 24px;
}

.topbar-copy {
  min-width: 0;
}

.topbar-product-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.product-badge,
.product-context {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-badge {
  background: rgba(123, 168, 255, 0.14);
  color: #cfe0ff;
  border: 1px solid rgba(123, 168, 255, 0.22);
}

.product-context {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.topbar h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.topbar-subtitle {
  max-width: 72ch;
  margin-top: 10px;
  font-size: 0.95rem;
}

.topbar-actions {
  align-items: center;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.topbar-sync {
  display: grid;
  gap: 2px;
}

.topbar-sync span {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.topbar-sync strong {
  font-size: 0.84rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-chip-live,
.status-chip-info {
  color: #d7e7ff;
  background: rgba(123, 168, 255, 0.14);
  border-color: rgba(123, 168, 255, 0.24);
}

.status-chip-success {
  color: #dfffea;
  background: rgba(77, 215, 138, 0.14);
  border-color: rgba(77, 215, 138, 0.24);
}

.status-chip-warning {
  color: #fff2d5;
  background: rgba(243, 185, 95, 0.16);
  border-color: rgba(243, 185, 95, 0.28);
}

.status-chip-danger {
  color: #ffd8d8;
  background: rgba(255, 126, 126, 0.14);
  border-color: rgba(255, 126, 126, 0.24);
}

.status-chip-muted {
  color: #d0d6e2;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.metrics-grid {
  grid-template-columns: 2.1fr 1fr 1fr 1fr;
  gap: 16px;
}

.status-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: stretch;
  padding: 18px 20px;
}

.status-bar-main {
  display: grid;
  align-items: center;
}

#statusBarTitle {
  display: block;
  font-size: 1.14rem;
  line-height: 1.4;
}

.status-bar-text {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-bar-side {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status-inline-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-inline-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-inline-card strong {
  font-size: 1.1rem;
}

.metric-card {
  display: grid;
  gap: 10px;
}

.metric-card > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  line-height: 1.05;
}

.metric-card-primary {
  background: linear-gradient(180deg, rgba(22, 33, 52, 0.98), rgba(16, 24, 39, 0.96));
}

.metric-card:last-child {
  border-color: rgba(243, 185, 95, 0.24);
  background:
    linear-gradient(180deg, rgba(243, 185, 95, 0.08), rgba(255, 255, 255, 0.02)),
    #121a2b;
}

.metric-head,
.metric-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-foot {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
  display: grid;
  gap: 20px;
}

.live-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.live-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    #121a2b;
  display: grid;
  gap: 14px;
}

.live-card.is-blocked {
  border-color: rgba(243, 185, 95, 0.28);
  background:
    linear-gradient(180deg, rgba(243, 185, 95, 0.08), rgba(255, 255, 255, 0.02)),
    #121a2b;
}

.live-card.is-live {
  border-color: rgba(123, 168, 255, 0.24);
}

.live-card.is-ready {
  opacity: 0.95;
}

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

.live-card-identity {
  display: grid;
  gap: 4px;
}

.live-card-agent {
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-card-top strong {
  font-size: 1rem;
  line-height: 1.35;
}

.live-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

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

.live-card-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky), var(--mint));
}

.live-progress-value,
.live-meta-row {
  color: var(--muted);
  font-size: 0.8rem;
}

.live-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.mission-card {
  min-height: 0;
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.mission-briefing {
  min-width: 0;
  display: grid;
  gap: 16px;
}

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

.mission-flow-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.mission-flow-item.is-active {
  border-color: rgba(105, 224, 200, 0.28);
  background: rgba(105, 224, 200, 0.08);
}

.mission-flow-item span {
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.mission-flow-item strong {
  font-size: 0.9rem;
}

.mission-flow-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.speech-bubble {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.speech-bubble span {
  display: block;
  margin-bottom: 8px;
  color: var(--mint);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.speech-bubble strong {
  line-height: 1.6;
}

.etti-figure {
  width: min(220px, 100%);
  justify-self: center;
  opacity: 0.94;
}

.mission-editor {
  display: grid;
  gap: 12px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mission-input,
.task-input,
.followup-input {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mission-input {
  min-height: 176px;
  padding: 16px;
}

.pipeline-content {
  display: grid;
  gap: 12px;
}

.pipeline-list {
  display: grid;
  gap: 12px;
}

.pipeline-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pipeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pipeline-dot {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.3);
  color: #08111b;
  font-size: 0.76rem;
  font-weight: 800;
}

.pipeline-item.is-live .pipeline-dot,
.pipeline-item.is-info .pipeline-dot {
  background: var(--sky);
  box-shadow: 0 0 0 6px rgba(123, 168, 255, 0.12);
}

.pipeline-item.is-success .pipeline-dot {
  background: var(--lime);
  box-shadow: 0 0 0 6px rgba(77, 215, 138, 0.12);
}

.pipeline-item.is-warning .pipeline-dot {
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(243, 185, 95, 0.12);
}

.pipeline-item.is-muted .pipeline-dot {
  background: rgba(255, 255, 255, 0.28);
}

.pipeline-body {
  display: grid;
  gap: 4px;
}

.pipeline-body strong {
  font-size: 0.94rem;
}

.pipeline-body p,
.pipeline-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.result-panel {
  min-height: 420px;
}

.result-section-block {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.ops-summary-block {
  padding: 16px;
}

.ops-summary-list {
  display: grid;
  gap: 10px;
}

.ops-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.ops-summary-row span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-summary-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.ops-summary-row strong {
  font-size: 1.1rem;
}

.job-list {
  display: grid;
  gap: 16px;
}

.job-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.job-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.job-card-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.job-result {
  margin: 0 0 12px;
  line-height: 1.6;
}

.attachment-chip {
  background: rgba(123, 168, 255, 0.1);
  border: 1px solid rgba(123, 168, 255, 0.18);
}

.result-empty {
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.workspace.is-results-only .dashboard-stage {
  display: block;
}

.workspace.is-results-only .result-panel {
  min-height: calc(100vh - 220px);
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .metrics-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }

  .status-bar {
    grid-template-columns: 1fr;
  }

  .dashboard-stage {
    grid-template-columns: 1fr;
  }

  .dashboard-side-column {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

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

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

  .brand-copy,
  .sidebar-description {
    display: block;
  }

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

  .topbar,
  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .metrics-grid,
  .dashboard-side-column,
  .live-card-grid {
    grid-template-columns: 1fr;
  }

  .status-bar-side,
  .mission-flow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 16px, 1600px);
  }

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

  .card,
  .sidebar {
    border-radius: 20px;
  }

  .topbar h1 {
    font-size: 2rem;
  }

  .metric-card strong {
    font-size: 1.8rem;
  }
}

.sales-report-shell {
  position: relative;
  z-index: 1;
}

.sales-report-shell .report-frame-wrap {
  width: 100%;
  min-height: calc(100vh - 220px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.sales-report-shell .report-frame {
  width: 100%;
  min-height: calc(100vh - 220px);
  border: 0;
  background: #ffffff;
}

.workspace[data-tab="sales"].is-results-only .result-panel {
  min-height: calc(100vh - 140px);
}

.workspace[data-tab="sales"].is-results-only .result-content {
  gap: 0;
}

@media (max-width: 980px) {
  body {
    padding-bottom: 92px;
  }

  .app-shell {
    width: min(100vw - 16px, 1600px);
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sidebar {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    top: auto;
    z-index: 40;
    height: auto;
    padding: 8px;
    border-radius: 22px;
    grid-template-rows: 1fr;
    background: rgba(11, 16, 32, 0.92);
    backdrop-filter: blur(18px);
  }

  .brand-block,
  .sidebar-footer,
  .sidebar-group-title,
  .sidebar-description {
    display: none;
  }

  .sidebar-nav,
  .sidebar-tab-list {
    display: grid;
  }

  .sidebar-tab-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  .sidebar-group {
    display: contents;
  }

  .sidebar-tab {
    padding: 8px 4px;
    border-radius: 16px;
    gap: 6px;
    justify-items: center;
  }

  .sidebar-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .sidebar-copy {
    justify-items: center;
  }

  .sidebar-label {
    font-size: 0.68rem;
    text-align: center;
    line-height: 1.2;
  }

  .topbar,
  .topbar-actions,
  .status-bar,
  .status-bar-side,
  .metrics-grid,
  .dashboard-stage,
  .dashboard-side-column,
  .live-card-grid,
  .mission-flow {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
  }

  .topbar {
    padding: 18px;
  }

  .topbar h1 {
    font-size: 2rem;
  }

  .topbar-meta {
    justify-content: space-between;
  }

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

  .metric-card-primary {
    grid-column: 1 / -1;
  }

  .dashboard-stage {
    display: grid;
    gap: 16px;
  }

  .dashboard-side-column {
    order: -1;
    display: grid;
    gap: 16px;
  }

  .mission-grid {
    gap: 14px;
  }

  .mission-input {
    min-height: 132px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .section-heading h2 {
    font-size: 1.24rem;
  }

  .live-card {
    gap: 12px;
    padding: 16px;
  }

  .live-card-title {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .live-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-panel {
    min-height: auto;
  }

  .workspace.is-results-only .result-panel {
    min-height: calc(100vh - 160px);
  }

  .workspace[data-tab="sales"].is-results-only .result-panel {
    min-height: calc(100vh - 140px);
  }

  .sales-report-shell .report-frame-wrap,
  .sales-report-shell .report-frame {
    min-height: calc(100svh - 190px);
    border-radius: 16px;
  }
}

@media (max-width: 760px) {
  .card {
    padding: 16px;
    border-radius: 20px;
  }

  .workspace {
    gap: 14px;
  }

  .topbar-product-line {
    margin-bottom: 8px;
  }

  .topbar-subtitle {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .status-inline-card {
    padding: 12px;
  }

  .metric-card strong {
    font-size: 1.7rem;
  }

  .field-actions,
  .topbar-actions {
    gap: 10px;
  }

  .field-actions button,
  .topbar-actions button {
    width: 100%;
  }

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

  .sidebar-tab {
    min-height: 58px;
  }

  .sidebar-label {
    font-size: 0.65rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .report-frame-wrap,
  .report-frame,
  .sales-report-shell .report-frame-wrap,
  .sales-report-shell .report-frame {
    min-height: calc(100svh - 170px);
  }
}
