:root {
  --ink-900: #111827;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #94a3b8;
  --sky-500: #0f4aa6;
  --sky-400: #1d63c3;
  --teal-500: #0f9a94;
  --sand-100: #f5f9ff;
  --sand-200: #e9f1fe;
  --line: #c8d6ef;
  --line-strong: #a9bfdf;
  --ok: #166534;
  --warn: #9a3412;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --shadow-soft: 0 10px 24px rgba(17, 36, 74, 0.08);
  --shadow-panel: 0 20px 42px rgba(17, 41, 84, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 10% 20%, #c3dcff 0%, transparent 42%),
    radial-gradient(circle at 90% 0%, #d1ece4 0%, transparent 32%),
    linear-gradient(148deg, #eef5ff 0%, #eaf6f3 100%);
  overflow-x: hidden;
  line-height: 1.45;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.36;
  pointer-events: none;
}

.ambient-a {
  width: 300px;
  height: 300px;
  background: #5b8fdf;
  left: -100px;
  top: 60px;
}

.ambient-b {
  width: 420px;
  height: 420px;
  background: #6eb9aa;
  right: -180px;
  bottom: -80px;
}

.shell {
  width: min(980px, 94vw);
  margin: 18px auto 34px;
  display: grid;
  gap: 16px;
}

body.density-compact {
  font-size: 15px;
}

body.density-compact .shell {
  gap: 12px;
}

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

.status-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d3dff1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-family: "Space Grotesk", sans-serif;
}

.brand-logo {
  width: 340px;
  height: 240px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.kicker {
  margin: 0;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--ink-500);
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.85rem;
}

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

.task-context-bar {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #b8ccef;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 247, 255, 0.95) 100%);
  box-shadow: 0 14px 30px rgba(17, 41, 84, 0.14);
  backdrop-filter: blur(8px);
}

.task-context-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.task-context-main strong {
  color: #11396f;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-context-actions {
  flex-shrink: 0;
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--surface-strong);
  backdrop-filter: blur(8px);
  border: 1px solid #cedbf0;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 14px 30px rgba(17, 41, 84, 0.12);
}

body.density-compact .panel {
  padding: 14px;
  border-radius: 12px;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sky-500), var(--teal-500));
  opacity: 0.72;
}

.panel h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.06rem;
  color: #0f2f67;
}

body.density-compact .panel h2 {
  font-size: 1rem;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dbe5f5;
}

.panel-head .muted {
  max-width: 62ch;
}

body.density-compact .panel-head {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.muted {
  color: var(--ink-700);
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.5;
}

body.density-compact .muted {
  font-size: 0.84rem;
}

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

body.density-compact .form-stack {
  gap: 8px;
}

.auth-modal-wrap {
  display: grid;
  justify-items: center;
}

.auth-modal {
  width: min(760px, 100%);
  padding: 24px;
  border-color: #9fb8e7;
  box-shadow: 0 26px 54px rgba(16, 41, 84, 0.22);
  background:
    linear-gradient(174deg, #ffffff 0%, #eaf2ff 100%);
}

.auth-brand {
  display: grid;
  justify-items: center;
  margin-top: 2px;
  margin-bottom: 2px;
}

.auth-modal h2 {
  color: #0f2f67;
  margin-bottom: 8px;
}

.auth-fields {
  margin-top: 14px;
  grid-template-columns: 1fr;
}

.auth-hint {
  margin-top: 10px;
  margin-bottom: 8px;
}

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

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

.auth-tab {
  border: 1px solid #9fb8e7;
  border-radius: 10px;
  padding: 10px 10px;
  background: #f4f8ff;
  color: #1e3a68;
  font-weight: 700;
}

.auth-tab.is-active {
  border-color: #0f4aa6;
  background: linear-gradient(135deg, #0f4aa6, #1d63c3);
  color: #fff;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
  font-weight: 700;
  color: #2858a4;
}

.trust-points {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.trust-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #f3f7ff;
}

.trust-points span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #93c5fd;
  box-shadow: 0 0 0 5px rgba(147, 197, 253, 0.2);
}

.auth-card {
  border-color: #cad9f1;
}

.auth-grid button {
  align-self: end;
}

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

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  color: var(--ink-700);
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 12px;
  background: #fdfefe;
  color: var(--ink-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 1px 1px rgba(15, 41, 84, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-300);
}

body.density-compact textarea,
body.density-compact input,
body.density-compact select {
  padding: 8px 10px;
  border-radius: 8px;
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid rgba(29, 99, 195, 0.18);
  outline-offset: 1px;
  border-color: var(--sky-400);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 99, 195, 0.12);
}

button {
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f4aa6 0%, #1558bb 100%);
  color: #fff;
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.015em;
  text-transform: none;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 8px 16px rgba(15, 74, 166, 0.22);
}

body.density-compact button {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.86rem;
}

button.secondary {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #1a3159;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
}

button:hover:not([disabled]) {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 10px 20px rgba(15, 74, 166, 0.24);
}

button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.quickstart,
.launchpad {
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
}

.quickstart-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #1c365f;
  font-size: 0.92rem;
  line-height: 1.45;
}

.quickstart-list strong {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #123d7f;
}

.launchpad-checklist {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.launchpad-check {
  border: 1px solid #d3e2f6;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.launchpad-check strong {
  font-size: 0.85rem;
  color: #193861;
}

.launchpad-check span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.launchpad-check.ready {
  border-color: #9fd7b4;
  background: #ecfdf3;
}

.launchpad-check.ready span {
  color: #166534;
}

.launchpad-check.pending {
  border-color: #f1b5a4;
  background: #fff4ef;
}

.launchpad-check.pending span {
  color: #9a3412;
}

.controls button {
  min-width: 138px;
}

.advanced-block {
  border: 1px solid #d7e3f5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
}

.advanced-block > summary {
  cursor: pointer;
  font-weight: 700;
  color: #1c3b69;
  list-style: none;
}

.advanced-block > summary::-webkit-details-marker {
  display: none;
}

.advanced-block > summary::after {
  content: "Show";
  margin-left: 8px;
  font-weight: 600;
  color: #325f9e;
  font-size: 0.8rem;
}

.advanced-block[open] > summary::after {
  content: "Hide";
}

.advanced-block[open] {
  padding-bottom: 10px;
}

.advanced-block label,
.advanced-block .adapter-controls {
  margin-top: 8px;
}

.adapter-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #f7faff;
}

.adapter-controls select {
  width: 150px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-700);
}

.task-meta {
  margin-top: 12px;
  border: 1px solid #d0deef;
  border-radius: 10px;
  padding: 11px 12px;
  background: #f7fbff;
  color: var(--ink-700);
  font-size: 0.9rem;
  line-height: 1.4;
}

body.density-compact .task-meta {
  margin-top: 8px;
  padding: 8px 10px;
}

.approval-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 1.4fr auto;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dce7f5;
  border-radius: 12px;
  background: #f8fbff;
}

body.density-compact .approval-row {
  gap: 7px;
  padding: 8px;
}

.timeline {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

body.density-compact .timeline,
body.density-compact .task-list {
  gap: 6px;
  margin-top: 8px;
}

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

.desktop-clients-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.desktop-setup-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.desktop-readiness-banner {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d4e1f4;
  background: #f7fbff;
  font-size: 0.88rem;
  font-weight: 600;
}

.desktop-readiness-banner.is-ready {
  border-color: #9fd7b4;
  background: #ecfdf3;
  color: #166534;
}

.desktop-readiness-banner.is-failed {
  border-color: #f1b5a4;
  background: #fff4ef;
  color: #9a3412;
}

.desktop-status-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  font-size: 0.86rem;
}

.setup-guidance {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  background: #f9fbff;
}

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

.download-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #b9cceb;
  background: #fff;
  color: #123d7f;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
}

.download-link:hover {
  border-color: #7fa7de;
  background: #f2f7ff;
}

.desktop-link-status,
.desktop-next-action {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d6e3f5;
  background: #fff;
  color: #1f3b65;
  font-size: 0.86rem;
}

.desktop-link-status.linked {
  border-color: #9fd7b4;
  background: #ecfdf3;
  color: #166534;
}

.desktop-link-status.pending {
  border-color: #f1b5a4;
  background: #fff4ef;
  color: #9a3412;
}

.desktop-client-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.connector-readiness-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.desktop-client-item {
  border: 1px solid #d5e2f3;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 9px 10px;
}

.execution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.execution-timeline-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mfa-action-hint {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 3px solid #7fa7de;
  background: #f6faff;
  border-radius: 8px;
}

.mfa-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(220px, 1fr) minmax(170px, auto) minmax(120px, auto);
  gap: 10px;
  align-items: center;
}

.mfa-row input {
  min-width: 0;
}

.mfa-secrets {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  background: #f9fbff;
}

.mfa-qr-wrap {
  margin-top: 12px;
  justify-items: start;
  gap: 8px;
}

.mfa-qr-wrap .muted {
  margin-bottom: 0;
}

.mfa-qr-image {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px;
}

.task-row {
  display: grid;
  text-align: left;
  border: 1px solid #d3e0f2;
  border-radius: 10px;
  padding: 11px 12px;
  gap: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink-900);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.task-row:hover {
  border-color: #afc5e6;
  box-shadow: 0 12px 22px rgba(15, 41, 84, 0.12);
  transform: translateY(-1px);
}

body.density-compact .task-row,
body.density-compact .item {
  padding: 8px 9px;
  border-radius: 8px;
}

.task-row-title {
  font-weight: 700;
  line-height: 1.25;
}

.task-row-meta {
  font-size: 0.8rem;
  color: var(--ink-700);
}

body.density-compact .task-row-meta {
  font-size: 0.75rem;
}

.empty {
  color: var(--ink-700);
}

.item {
  border: 1px solid #d5e2f3;
  border-radius: 12px;
  padding: 11px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.item:hover {
  border-color: #b5c9e8;
  box-shadow: 0 12px 20px rgba(15, 41, 84, 0.1);
}

.item strong {
  display: block;
  margin-bottom: 6px;
  color: #1d345c;
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--sand-200);
  color: var(--ink-700);
  margin-right: 6px;
}

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

.info {
  color: #155e75;
}

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

.artifact-content {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  font-size: 0.84rem;
}

.item-error {
  border-color: #f1b5a4;
  background: #fff4ef;
  box-shadow: 0 8px 18px rgba(154, 52, 18, 0.12);
}

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 10px;
  z-index: 1000;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-width: 240px;
  max-width: min(420px, 90vw);
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink-900);
  box-shadow: 0 10px 22px rgba(31, 31, 29, 0.16);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-icon {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid currentColor;
  padding: 3px 7px;
}

.toast-text {
  line-height: 1.3;
  font-size: 0.9rem;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: #9fd7b4;
  background: #ecfdf3;
}

.toast-error {
  border-color: #f1b5a4;
  background: #fff4ef;
}

.toast-info {
  border-color: #abd8e1;
  background: #edfafd;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.rise {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.5s ease forwards;
  animation-delay: var(--delay, 0ms);
}

.panel-ping {
  animation: panelPing 0.85s ease;
}

@keyframes panelPing {
  0% {
    box-shadow: 0 12px 30px rgba(23, 55, 107, 0.12), 0 0 0 0 rgba(15, 74, 166, 0.28);
  }
  100% {
    box-shadow: 0 12px 30px rgba(23, 55, 107, 0.12), 0 0 0 14px rgba(15, 74, 166, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    justify-content: flex-end;
  }

  .brand-logo {
    width: 176px;
    height: 176px;
  }

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

  .task-context-bar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .task-context-main strong {
    white-space: normal;
  }

  .task-context-actions {
    width: 100%;
  }

  .task-context-actions button {
    flex: 1 1 160px;
  }

  .approval-row {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .mfa-row,
  .mfa-secrets,
  .desktop-clients-grid,
  .launchpad-checklist,
  .execution-grid,
  .execution-timeline-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-head .muted {
    max-width: 100%;
  }

  .panel {
    padding: 16px;
  }

  .status-group {
    width: 100%;
    justify-content: flex-end;
  }

  .task-row,
  .item {
    padding: 10px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .mfa-qr-image {
    width: min(220px, 70vw);
    height: min(220px, 70vw);
  }
}
