:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #050607;
  --bg-deep: #020304;
  --surface: #0b0d10;
  --surface-2: #101318;
  --surface-3: #151920;
  --surface-glass: rgba(11, 13, 16, 0.82);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f7f8fb;
  --text-soft: #d6d9e2;
  --muted: #8d94a7;
  --faint: #5d6474;
  --violet: #8b5cf6;
  --violet-bright: #a78bfa;
  --cyan: #22d3ee;
  --cyan-bright: #67e8f9;
  --green: #42f59e;
  --green-bright: #86efac;
  --amber: #f8bd58;
  --danger: #fb7185;
  --sidebar-width: 268px;
  --topbar-height: 76px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 22px 64px rgba(0, 0, 0, 0.28);
  --shadow-deep: 0 32px 100px rgba(0, 0, 0, 0.48);
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% -10%, rgba(139, 92, 246, 0.13), transparent 32%),
    radial-gradient(circle at 25% 0%, rgba(34, 211, 238, 0.055), transparent 28%),
    var(--bg);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  color: #fff;
  background: rgba(139, 92, 246, 0.52);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  --sidebar-current-width: var(--sidebar-width);
  min-height: 100vh;
}

.app-shell--compact {
  --sidebar-current-width: 86px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-current-width);
  min-height: 100vh;
  padding: 22px 16px 18px;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.06), transparent 18%),
    rgba(6, 7, 9, 0.97);
  border-right: 1px solid var(--border);
  box-shadow: 14px 0 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px);
  transition: width var(--transition), transform var(--transition);
}

.sidebar__top {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar__close {
  display: none !important;
}

.brand-mark {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand-mark__symbol {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.34);
  border-radius: 13px;
  background:
    radial-gradient(circle at 68% 20%, rgba(34, 211, 238, 0.22), transparent 32%),
    linear-gradient(145deg, rgba(139, 92, 246, 0.26), rgba(13, 15, 20, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 30px rgba(139, 92, 246, 0.12);
}

.brand-mark__symbol::after {
  position: absolute;
  inset: -30%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: rotate(32deg) translateX(-80%);
  animation: logo-sheen 7s ease-in-out infinite;
}

.brand-mark__symbol svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #f9f8ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.brand-mark__symbol svg circle {
  fill: var(--cyan);
  stroke: rgba(34, 211, 238, 0.25);
}

.brand-mark__text {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.brand-mark__text strong {
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0.16em;
}

.brand-mark__text small {
  color: var(--violet-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.sidebar-create {
  display: flex;
  width: 100%;
  height: 46px;
  margin: 26px 0 20px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(108, 58, 216, 0.9));
  box-shadow:
    0 12px 30px rgba(101, 57, 199, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 720;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.sidebar-create:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 16px 38px rgba(101, 57, 199, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sidebar-create svg {
  width: 17px;
  height: 17px;
}

.sidebar-create--compact {
  width: 48px;
  margin-right: auto;
  margin-left: auto;
}

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

.sidebar-nav__item {
  position: relative;
  display: flex;
  min-height: 46px;
  padding: 0 13px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #9299aa;
  font-size: 13px;
  font-weight: 620;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.sidebar-nav__item::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -1px;
  width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--violet-bright);
  box-shadow: 0 0 16px var(--violet);
  content: "";
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity var(--transition), transform var(--transition);
}

.sidebar-nav__item:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(2px);
}

.sidebar-nav__item--active {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.16);
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0.035));
}

.sidebar-nav__item--active::before {
  opacity: 1;
  transform: scaleY(1);
}

.sidebar-nav__item > svg:first-child {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke-width: 1.8;
}

.sidebar-nav__chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  opacity: 0.25;
}

.app-shell--compact .sidebar-nav__item {
  width: 52px;
  padding: 0;
  margin-inline: auto;
  justify-content: center;
}

.app-shell--compact .sidebar-nav__item:hover {
  transform: none;
}

.app-shell--compact .brand-mark__text,
.app-shell--compact .sidebar-create span,
.app-shell--compact .sidebar-nav__item span,
.app-shell--compact .sidebar-nav__chevron,
.app-shell--compact .sidebar-safety div,
.app-shell--compact .sidebar-version {
  display: none;
}

.sidebar__footer {
  display: flex;
  padding-top: 18px;
  margin-top: auto;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--border);
}

.sidebar-safety {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.sidebar-safety__orb {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(66, 245, 158, 0.22);
  border-radius: 11px;
  background: rgba(66, 245, 158, 0.06);
}

.sidebar-safety__orb::before,
.sidebar-safety__orb::after {
  position: absolute;
  border-radius: 999px;
  content: "";
}

.sidebar-safety__orb::before {
  inset: 10px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(66, 245, 158, 0.62);
}

.sidebar-safety__orb::after {
  inset: 6px;
  border: 1px solid rgba(66, 245, 158, 0.2);
}

.sidebar-safety div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.sidebar-safety strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-safety span:not(.sidebar-safety__orb) {
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-version {
  color: #4f5665;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.app-main {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-current-width);
  transition: margin-left var(--transition);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: var(--topbar-height);
  padding: 0 30px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 6, 7, 0.82);
  backdrop-filter: blur(24px) saturate(130%);
}

.topbar__title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.topbar__title > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.topbar__title strong {
  overflow: hidden;
  color: #e8eaf0;
  font-size: 14px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__kicker {
  color: #626979;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.18em;
}

.topbar__menu {
  display: none !important;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.topbar__status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-link {
  display: inline-flex;
  border-radius: 999px;
}

.status-pill {
  display: inline-flex;
  min-height: 29px;
  padding: 0 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-pill__dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.status-pill--violet {
  color: #bca7ff;
  border-color: rgba(139, 92, 246, 0.22);
  background: rgba(139, 92, 246, 0.08);
}

.status-pill--cyan {
  color: var(--cyan-bright);
  border-color: rgba(34, 211, 238, 0.22);
  background: rgba(34, 211, 238, 0.07);
}

.status-pill--green {
  color: var(--green-bright);
  border-color: rgba(66, 245, 158, 0.24);
  background: rgba(66, 245, 158, 0.07);
}

.status-pill--warning {
  color: #f5c879;
  border-color: rgba(248, 189, 88, 0.22);
  background: rgba(248, 189, 88, 0.07);
}

.status-pill__dot--pulse {
  animation: status-pulse 1.2s ease-in-out infinite;
}

.safety-strip {
  position: sticky;
  top: var(--topbar-height);
  z-index: 24;
  display: flex;
  min-height: 34px;
  padding: 6px 30px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(248, 189, 88, 0.11);
  background: rgba(17, 14, 9, 0.9);
  backdrop-filter: blur(18px);
}

.safety-strip > span {
  display: inline-flex;
  min-height: 19px;
  padding: 0 7px;
  align-items: center;
  border: 1px solid rgba(248, 189, 88, 0.2);
  border-radius: 5px;
  color: #f5c879;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.safety-strip p {
  margin: 0;
  color: #888174;
  font-size: 10px;
  line-height: 1.45;
}

.content-area {
  width: min(100%, 1540px);
  padding: 34px 34px 72px;
  margin: 0 auto;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: page-enter 420ms var(--transition) both;
}

.page-header {
  display: flex;
  min-height: 96px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-header__copy {
  max-width: 760px;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--violet-bright);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.page-header h1,
.agent-detail-hero h1,
.not-found-panel h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 740;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.page-header p {
  max-width: 700px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition), opacity var(--transition);
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 1.9;
}

.button--primary {
  border-color: rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, #8b5cf6, #6f3fd2);
  box-shadow:
    0 13px 32px rgba(105, 58, 204, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
}

.button--primary:hover:not(:disabled) {
  box-shadow:
    0 18px 40px rgba(105, 58, 204, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.button--secondary {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.052);
  color: var(--text-soft);
}

.button--secondary:hover:not(:disabled) {
  border-color: rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.07);
}

.button--ghost {
  border-color: var(--border);
  background: transparent;
  color: #aeb4c2;
}

.button--ghost:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.button--danger {
  border-color: rgba(251, 113, 133, 0.23);
  background: rgba(251, 113, 133, 0.08);
  color: #fda4af;
}

.button--danger:hover:not(:disabled) {
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.13);
}

.button--full {
  width: 100%;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 38%),
    rgba(10, 12, 15, 0.86);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel__header--bordered {
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.panel__header h2 {
  margin: 0;
  color: #ebedf3;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.panel__header .eyebrow {
  margin-bottom: 6px;
}

.panel__header-icon {
  width: 19px;
  height: 19px;
  color: #626979;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9fa6b7;
  font-size: 11px;
  font-weight: 680;
  transition: color var(--transition), gap var(--transition);
}

.text-link:hover {
  gap: 9px;
  color: var(--cyan-bright);
}

.text-link svg {
  width: 14px;
  height: 14px;
}

/* Dashboard */
.command-hero {
  position: relative;
  display: grid;
  min-height: 390px;
  padding: clamp(28px, 4vw, 50px);
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  align-items: center;
  gap: 36px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.17);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 15%, rgba(34, 211, 238, 0.11), transparent 27%),
    radial-gradient(circle at 62% 100%, rgba(139, 92, 246, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(16, 18, 24, 0.96), rgba(7, 8, 11, 0.98));
  box-shadow:
    0 35px 100px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.command-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, 0.018) 48% 48.4%, transparent 48.4%),
    radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.12), transparent 24%);
}

.command-hero::after {
  position: absolute;
  right: -110px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 999px;
  box-shadow:
    0 0 0 36px rgba(139, 92, 246, 0.025),
    0 0 0 76px rgba(34, 211, 238, 0.018);
  content: "";
}

.command-hero__content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.command-hero__badge {
  display: inline-flex;
  min-height: 27px;
  padding: 0 10px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.075);
  color: #bba5ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 780;
  letter-spacing: 0.12em;
}

.command-hero__badge svg {
  width: 13px;
  height: 13px;
}

.command-hero h2 {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(31px, 3.4vw, 50px);
  font-weight: 735;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.command-hero__content > p {
  max-width: 610px;
  margin: 19px 0 0;
  color: #969daf;
  font-size: 14px;
  line-height: 1.72;
}

.command-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.command-visual {
  position: relative;
  z-index: 2;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 47%, rgba(139, 92, 246, 0.11), transparent 28%),
    rgba(4, 5, 7, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 70px rgba(0, 0, 0, 0.3);
}

.command-visual__grid {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.036) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.036) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.command-node {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: rgba(13, 15, 19, 0.9);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
}

.command-node--center {
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  padding: 14px;
  flex-direction: column;
  justify-content: center;
  border-color: rgba(139, 92, 246, 0.31);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 10px rgba(139, 92, 246, 0.035),
    0 0 54px rgba(139, 92, 246, 0.18),
    inset 0 0 30px rgba(139, 92, 246, 0.09);
}

.command-node--center::before,
.command-node--center::after {
  position: absolute;
  border-radius: 999px;
  content: "";
}

.command-node--center::before {
  inset: -27px;
  border: 1px dashed rgba(139, 92, 246, 0.14);
  animation: orbit-spin 28s linear infinite;
}

.command-node--center::after {
  top: -30px;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 15px var(--cyan);
  transform: translateX(-50%);
}

.command-node--center > span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.34);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.36), rgba(34, 211, 238, 0.08));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.command-node--center strong {
  font-size: 9px;
  font-weight: 790;
  letter-spacing: 0.12em;
}

.command-node--center small {
  margin-top: 4px;
  color: #737b8d;
  font-size: 8px;
}

.command-node--agent {
  min-height: 42px;
  padding: 7px 10px 7px 7px;
  gap: 8px;
  border-radius: 12px;
  color: #bcc1cd;
  font-size: 9px;
  font-weight: 680;
}

.command-node--agent-1 {
  top: 20px;
  left: 22px;
}

.command-node--agent-2 {
  top: 29px;
  right: 21px;
}

.command-node--agent-3 {
  right: 28px;
  bottom: 25px;
}

.command-node--agent-4 {
  bottom: 29px;
  left: 22px;
}

.command-line {
  position: absolute;
  z-index: 2;
  display: block;
  width: 32%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.38), transparent);
  transform-origin: center;
}

.command-line::after {
  position: absolute;
  top: -2px;
  left: 25%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  content: "";
  animation: line-particle 3.6s linear infinite;
}

.command-line--1 {
  top: 31%;
  left: 20%;
  transform: rotate(28deg);
}

.command-line--2 {
  top: 32%;
  right: 20%;
  transform: rotate(-26deg);
}

.command-line--3 {
  right: 20%;
  bottom: 30%;
  transform: rotate(27deg);
}

.command-line--4 {
  bottom: 30%;
  left: 20%;
  transform: rotate(-28deg);
}

.command-line--2::after,
.command-line--4::after {
  animation-delay: -1.8s;
}

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

.metric-card {
  position: relative;
  min-height: 150px;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 12, 15, 0.82);
  box-shadow: var(--shadow-card);
}

.metric-card::after {
  position: absolute;
  top: -45px;
  right: -35px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  content: "";
  opacity: 0.12;
  filter: blur(20px);
}

.metric-card--violet::after {
  background: var(--violet);
}

.metric-card--cyan::after {
  background: var(--cyan);
}

.metric-card--green::after {
  background: var(--green);
}

.metric-card--neutral::after {
  background: #718096;
}

.metric-card__icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.metric-card__icon svg {
  width: 16px;
  height: 16px;
}

.metric-card--violet .metric-card__icon {
  color: var(--violet-bright);
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.07);
}

.metric-card--cyan .metric-card__icon {
  color: var(--cyan-bright);
  border-color: rgba(34, 211, 238, 0.2);
  background: rgba(34, 211, 238, 0.06);
}

.metric-card--green .metric-card__icon {
  color: var(--green-bright);
  border-color: rgba(66, 245, 158, 0.2);
  background: rgba(66, 245, 158, 0.06);
}

.metric-card > span {
  display: block;
  color: #777f91;
  font-size: 10px;
  font-weight: 650;
}

.metric-card > strong {
  display: block;
  margin-top: 4px;
  font-size: 29px;
  font-weight: 720;
  letter-spacing: -0.04em;
}

.metric-card > small {
  display: block;
  margin-top: 4px;
  color: #686f7f;
  font-size: 9px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 16px;
}

.panel--agents,
.panel--queue {
  padding: 22px;
}

.agent-row-list {
  display: flex;
  margin-top: 16px;
  flex-direction: column;
}

.agent-row {
  display: grid;
  min-height: 69px;
  padding: 12px 5px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  transition: background var(--transition), padding var(--transition);
}

.agent-row:first-child {
  border-top: 0;
}

.agent-row:hover {
  padding-right: 10px;
  padding-left: 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.agent-row__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.agent-row__copy strong {
  overflow: hidden;
  color: #e5e7ed;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-row__copy span {
  overflow: hidden;
  color: #747c8e;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-row__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7d8494;
  font-size: 9px;
  font-weight: 620;
  white-space: nowrap;
}

.state-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(248, 189, 88, 0.5);
}

.agent-row__arrow {
  width: 14px;
  height: 14px;
  color: #4e5565;
  transition: color var(--transition), transform var(--transition);
}

.agent-row:hover .agent-row__arrow {
  color: var(--cyan);
  transform: translateX(2px);
}

.agent-visual {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.agent-visual--small {
  width: 35px;
  height: 35px;
  border-radius: 11px;
}

.agent-visual--medium {
  width: 46px;
  height: 46px;
}

.agent-visual--large {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.agent-visual svg {
  width: 45%;
  height: 45%;
  stroke-width: 1.8;
}

.agent-visual--violet {
  color: #c2afff;
  border-color: rgba(139, 92, 246, 0.25);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.17), rgba(139, 92, 246, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px rgba(139, 92, 246, 0.07);
}

.agent-visual--cyan {
  color: var(--cyan-bright);
  border-color: rgba(34, 211, 238, 0.23);
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.15), rgba(34, 211, 238, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px rgba(34, 211, 238, 0.06);
}

.agent-visual--green {
  color: var(--green-bright);
  border-color: rgba(66, 245, 158, 0.22);
  background: linear-gradient(145deg, rgba(66, 245, 158, 0.13), rgba(66, 245, 158, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px rgba(66, 245, 158, 0.05);
}

.agent-visual--amber {
  color: #f7ce88;
  border-color: rgba(248, 189, 88, 0.22);
  background: linear-gradient(145deg, rgba(248, 189, 88, 0.13), rgba(248, 189, 88, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px rgba(248, 189, 88, 0.05);
}

.empty-runtime {
  display: flex;
  min-height: 278px;
  padding: 20px 6px 3px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.empty-runtime__graphic {
  position: relative;
  width: 96px;
  height: 76px;
  margin-bottom: 13px;
}

.empty-runtime__graphic::before,
.empty-runtime__graphic::after {
  position: absolute;
  content: "";
}

.empty-runtime__graphic::before {
  inset: 8px 18px;
  border: 1px dashed rgba(139, 92, 246, 0.2);
  border-radius: 18px;
}

.empty-runtime__graphic::after {
  top: 50%;
  left: 50%;
  width: 2px;
  height: 54px;
  background: linear-gradient(transparent, rgba(139, 92, 246, 0.28), transparent);
  transform: translate(-50%, -50%) rotate(50deg);
}

.empty-runtime__graphic span {
  position: absolute;
  z-index: 2;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  background: #11131a;
}

.empty-runtime__graphic span:nth-child(1) {
  top: 7px;
  left: 17px;
}

.empty-runtime__graphic span:nth-child(2) {
  top: 33px;
  right: 15px;
  border-color: rgba(34, 211, 238, 0.3);
}

.empty-runtime__graphic span:nth-child(3) {
  bottom: 4px;
  left: 35px;
  border-color: rgba(66, 245, 158, 0.26);
}

.empty-runtime h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 680;
}

.empty-runtime p {
  max-width: 280px;
  margin: 8px 0 18px;
  color: #747c8d;
  font-size: 10px;
  line-height: 1.65;
}

.truth-panel {
  display: grid;
  padding: 24px;
  grid-template-columns: auto minmax(190px, 0.68fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(66, 245, 158, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 50%, rgba(66, 245, 158, 0.07), transparent 30%),
    rgba(10, 13, 14, 0.82);
  box-shadow: var(--shadow-card);
}

.truth-panel__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(66, 245, 158, 0.2);
  border-radius: 14px;
  background: rgba(66, 245, 158, 0.06);
  color: var(--green-bright);
}

.truth-panel__icon svg {
  width: 21px;
  height: 21px;
}

.truth-panel h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.35;
}

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

.truth-panel__items > div {
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.truth-panel__items strong,
.truth-panel__items span {
  display: block;
}

.truth-panel__items strong {
  color: #dfe2e9;
  font-size: 10px;
  font-weight: 700;
}

.truth-panel__items span {
  margin-top: 6px;
  color: #737b8a;
  font-size: 9px;
  line-height: 1.5;
}

/* Agent directory */
.directory-toolbar {
  display: grid;
  min-height: 62px;
  padding: 9px;
  grid-template-columns: minmax(260px, 1fr) minmax(210px, auto) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 12, 15, 0.74);
  box-shadow: var(--shadow-card);
}

.search-field,
.select-field--toolbar {
  display: flex;
  height: 43px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.search-field {
  padding: 0 13px;
}

.search-field:focus-within,
.select-field--toolbar:focus-within {
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.035);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.055);
}

.search-field svg,
.select-field--toolbar svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #626a7b;
}

.search-field input,
.select-field--toolbar select {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dfe2e8;
  font-size: 11px;
}

.search-field input::placeholder {
  color: #5f6676;
}

.search-field input::-webkit-search-cancel-button {
  filter: invert(0.8);
}

.select-field--toolbar {
  padding: 0 11px;
}

.select-field--toolbar select {
  min-width: 190px;
  cursor: pointer;
}

.directory-toolbar__count {
  display: flex;
  min-width: 82px;
  height: 43px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-left: 1px solid var(--border);
}

.directory-toolbar__count strong {
  font-size: 14px;
  font-weight: 730;
}

.directory-toolbar__count span {
  color: #72798a;
  font-size: 9px;
}

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

.agent-card {
  position: relative;
  display: flex;
  min-height: 312px;
  padding: 19px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), transparent 43%),
    rgba(10, 12, 15, 0.88);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.agent-card::before {
  position: absolute;
  top: -120px;
  right: -110px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(139, 92, 246, 0.08);
  border-radius: 999px;
  box-shadow: 0 0 0 28px rgba(139, 92, 246, 0.018);
  content: "";
}

.agent-card:hover {
  border-color: rgba(139, 92, 246, 0.22);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.4), 0 0 36px rgba(139, 92, 246, 0.045);
  transform: translateY(-4px);
}

.agent-card__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agent-card__status {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(248, 189, 88, 0.18);
  border-radius: 999px;
  background: rgba(248, 189, 88, 0.055);
  color: #cbb079;
  font-size: 8px;
  font-weight: 700;
}

.agent-card__status > span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(248, 189, 88, 0.4);
}

.agent-card__copy {
  position: relative;
  z-index: 2;
  margin-top: 20px;
}

.agent-card__copy h3 {
  margin: 0;
  color: #eef0f5;
  font-size: 18px;
  font-weight: 690;
  letter-spacing: -0.025em;
}

.agent-card__role {
  margin: 5px 0 0;
  color: #80889a;
  font-size: 10px;
  font-weight: 600;
}

.agent-card__objective {
  display: -webkit-box;
  min-height: 61px;
  margin: 14px 0 0;
  overflow: hidden;
  color: #818899;
  font-size: 10px;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.agent-card__capabilities {
  position: relative;
  z-index: 2;
  display: flex;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-card__capabilities span,
.create-preview__chips span {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: #878e9e;
  font-size: 8px;
  font-weight: 600;
}

.agent-card__footer {
  position: relative;
  z-index: 2;
  display: flex;
  padding-top: 14px;
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.agent-card__runtime {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #606878;
  font-size: 8px;
}

.agent-card__runtime svg {
  width: 13px;
  height: 13px;
}

.agent-card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b7a5f7;
  font-size: 9px;
  font-weight: 700;
  transition: color var(--transition), gap var(--transition);
}

.agent-card__link:hover {
  gap: 8px;
  color: var(--cyan-bright);
}

.agent-card__link svg {
  width: 13px;
  height: 13px;
}

.empty-search {
  display: flex;
  min-height: 330px;
  padding: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.012);
  text-align: center;
}

.empty-search > svg {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  color: #596172;
}

.empty-search h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 680;
}

.empty-search p {
  margin: 9px 0 19px;
  color: #7a8293;
  font-size: 11px;
}

/* Forms */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.65fr);
  align-items: start;
  gap: 18px;
}

.agent-form,
.connection-form {
  padding: 26px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-section__heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.form-section__heading > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.065);
  color: #ad95fa;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
}

.form-section__heading h2 {
  margin: 1px 0 0;
  font-size: 16px;
  font-weight: 690;
}

.form-section__heading p {
  margin: 5px 0 0;
  color: #777f90;
  font-size: 9px;
  line-height: 1.55;
}

.form-divider {
  height: 1px;
  margin: 25px 0;
  background: var(--border);
}

.field-grid {
  display: grid;
  gap: 13px;
}

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

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.form-field > span {
  color: #c6cad4;
  font-size: 10px;
  font-weight: 680;
}

.form-field input,
.form-field textarea,
.form-field select,
.input-with-icon,
.select-with-icon {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: #e6e8ed;
  outline: 0;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-field > input,
.form-field > select {
  height: 45px;
  padding: 0 13px;
}

.form-field textarea {
  min-height: 94px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.6;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #555d6d;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.input-with-icon:focus-within,
.select-with-icon:focus-within {
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.025);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.05);
}

.form-field small {
  min-height: 13px;
  color: #626a7b;
  font-size: 8px;
  line-height: 1.45;
}

.form-field--error input,
.form-field--error textarea,
.form-field--error .input-with-icon {
  border-color: rgba(251, 113, 133, 0.4);
}

.form-field--error small,
.field-error {
  color: #fb9aaa;
}

.field-error {
  margin: 8px 0 0;
  font-size: 9px;
}

.input-with-icon,
.select-with-icon {
  display: flex;
  height: 45px;
  padding: 0 12px;
  align-items: center;
  gap: 9px;
}

.input-with-icon > svg,
.select-with-icon > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #626a7b;
}

.input-with-icon input,
.select-with-icon select {
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.select-with-icon select {
  cursor: pointer;
}

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

.capability-option {
  display: flex;
  min-height: 76px;
  padding: 13px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.capability-option:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.capability-option--selected {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.07);
}

.capability-option__check {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.capability-option--selected .capability-option__check {
  border-color: rgba(139, 92, 246, 0.5);
  background: var(--violet);
  color: white;
}

.capability-option__check svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.capability-option > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.capability-option strong {
  color: #d9dce4;
  font-size: 10px;
  font-weight: 670;
}

.capability-option small {
  color: #6f7788;
  font-size: 8px;
  line-height: 1.45;
}

.accent-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.accent-option {
  display: inline-flex;
  min-height: 38px;
  padding: 0 12px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  color: #858d9e;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.accent-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.accent-option > span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 8px currentColor;
}

.accent-option--violet > span {
  background: var(--violet);
  color: var(--violet);
}

.accent-option--cyan > span {
  background: var(--cyan);
  color: var(--cyan);
}

.accent-option--green > span {
  background: var(--green);
  color: var(--green);
}

.accent-option--amber > span {
  background: var(--amber);
  color: var(--amber);
}

.accent-option--selected {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.07);
  color: #d7d9e1;
}

.agent-form__footer {
  display: flex;
  padding-top: 22px;
  margin-top: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.agent-form__footer > div:first-child {
  display: flex;
  max-width: 360px;
  align-items: center;
  gap: 8px;
  color: #737b8d;
  font-size: 9px;
  line-height: 1.45;
}

.agent-form__footer > div:first-child svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #9a84e6;
}

.agent-form__actions {
  display: flex;
  gap: 8px;
}

.create-preview {
  position: sticky;
  top: 138px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.create-preview__card {
  position: relative;
  display: flex;
  min-height: 388px;
  padding: 25px;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
}

.create-preview__card::before {
  position: absolute;
  top: -90px;
  right: -80px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.11);
  content: "";
  filter: blur(40px);
}

.create-preview__card > * {
  position: relative;
  z-index: 2;
}

.create-preview__card .agent-visual {
  margin-top: 18px;
}

.create-preview__card h2 {
  margin: 18px 0 0;
  font-size: 22px;
  font-weight: 710;
  letter-spacing: -0.035em;
}

.create-preview__card > div:nth-of-type(1) p {
  margin: 5px 0 0;
  color: #7e8697;
  font-size: 10px;
}

.create-preview__status {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  margin-top: 16px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(248, 189, 88, 0.18);
  border-radius: 999px;
  color: #c7a86d;
  font-size: 8px;
}

.create-preview__status > span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--amber);
}

.create-preview__objective {
  min-height: 60px;
  margin: 18px 0 0;
  color: #858d9e;
  font-size: 10px;
  line-height: 1.62;
}

.create-preview__chips {
  display: flex;
  margin-top: 15px;
  flex-wrap: wrap;
  gap: 6px;
}

.safety-card {
  display: flex;
  padding: 18px;
  align-items: flex-start;
  gap: 12px;
  border-color: rgba(66, 245, 158, 0.13);
}

.safety-card > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: var(--green-bright);
}

.safety-card h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 690;
}

.safety-card p {
  margin: 6px 0 0;
  color: #747c8c;
  font-size: 9px;
  line-height: 1.55;
}

/* Agent details */
.details-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #646c7d;
  font-size: 9px;
}

.details-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.details-breadcrumb a:hover {
  color: var(--cyan-bright);
}

.details-breadcrumb svg {
  width: 13px;
  height: 13px;
}

.agent-detail-hero {
  position: relative;
  display: flex;
  min-height: 178px;
  padding: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 50%, rgba(139, 92, 246, 0.1), transparent 26%),
    linear-gradient(135deg, rgba(16, 18, 23, 0.95), rgba(8, 9, 12, 0.98));
  box-shadow: var(--shadow-deep);
}

.agent-detail-hero::before {
  position: absolute;
  right: -65px;
  bottom: -125px;
  width: 300px;
  height: 300px;
  border: 1px solid currentColor;
  border-radius: 999px;
  box-shadow: 0 0 0 28px currentColor, 0 0 0 60px currentColor;
  content: "";
  opacity: 0.025;
}

.agent-detail-hero--violet {
  color: var(--violet-bright);
  border-color: rgba(139, 92, 246, 0.2);
}

.agent-detail-hero--cyan {
  color: var(--cyan-bright);
  border-color: rgba(34, 211, 238, 0.18);
}

.agent-detail-hero--green {
  color: var(--green-bright);
  border-color: rgba(66, 245, 158, 0.17);
}

.agent-detail-hero--amber {
  color: #f8d89f;
  border-color: rgba(248, 189, 88, 0.17);
}

.agent-detail-hero__identity {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.agent-detail-hero__identity > div:last-child {
  min-width: 0;
}

.agent-detail-hero__labels {
  display: flex;
  margin-bottom: 11px;
  flex-wrap: wrap;
  gap: 7px;
}

.agent-detail-hero__labels span {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #8f96a7;
  font-size: 8px;
  font-weight: 650;
}

.agent-detail-hero h1 {
  color: #f4f5f8;
  font-size: clamp(29px, 3vw, 43px);
}

.agent-detail-hero__identity p {
  margin: 8px 0 0;
  color: #81899a;
  font-size: 12px;
}

.agent-detail-hero__actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

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

.detail-status-grid article {
  display: flex;
  min-height: 80px;
  padding: 15px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(10, 12, 15, 0.78);
  box-shadow: var(--shadow-card);
}

.detail-status-grid__icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.detail-status-grid__icon svg {
  width: 16px;
  height: 16px;
}

.detail-status-grid__icon--warning {
  color: #f5c97c;
  border-color: rgba(248, 189, 88, 0.19);
  background: rgba(248, 189, 88, 0.055);
}

.detail-status-grid__icon--violet {
  color: var(--violet-bright);
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
}

.detail-status-grid__icon--cyan {
  color: var(--cyan-bright);
  border-color: rgba(34, 211, 238, 0.19);
  background: rgba(34, 211, 238, 0.055);
}

.detail-status-grid__icon--green {
  color: var(--green-bright);
  border-color: rgba(66, 245, 158, 0.19);
  background: rgba(66, 245, 158, 0.055);
}

.detail-status-grid article > div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.detail-status-grid small {
  color: #646c7d;
  font-size: 8px;
}

.detail-status-grid strong {
  overflow: hidden;
  color: #d8dbe3;
  font-size: 10px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.58fr);
  align-items: start;
  gap: 16px;
}

.details-main-panel {
  min-height: 460px;
  padding: 22px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}

.tabs__item {
  position: relative;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #747c8e;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.tabs__item::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--violet-bright);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity var(--transition), transform var(--transition);
}

.tabs__item:hover {
  color: #c7cbd4;
}

.tabs__item--active {
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.055));
}

.tabs__item--active::after {
  opacity: 1;
  transform: scaleX(1);
}

.detail-tab-content {
  animation: tab-enter 260ms ease-out both;
}

.detail-section {
  padding: 28px 2px;
  border-top: 1px solid var(--border);
}

.detail-section:first-child {
  border-top: 0;
}

.detail-section h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 690;
  letter-spacing: -0.025em;
}

.detail-copy-large {
  max-width: 790px;
  margin: 15px 0 0;
  color: #a0a6b4;
  font-size: 13px;
  line-height: 1.75;
}

.capability-list {
  display: flex;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.capability-list span {
  display: inline-flex;
  min-height: 35px;
  padding: 0 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(139, 92, 246, 0.17);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.045);
  color: #b8accf;
  font-size: 9px;
  font-weight: 620;
}

.capability-list svg {
  width: 13px;
  height: 13px;
  color: var(--green-bright);
}

.detail-footnote {
  margin: 15px 0 0;
  color: #626a7b;
  font-size: 9px;
  line-height: 1.6;
}

.instruction-block {
  min-height: 190px;
  padding: 18px;
  margin-top: 16px;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    rgba(3, 4, 6, 0.55);
  background-size: 100% 25px;
  color: #aeb4c1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.75;
}

.runtime-state-card {
  display: flex;
  padding: 28px 4px;
  align-items: flex-start;
  gap: 15px;
}

.runtime-state-card > svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  margin-top: 2px;
  color: var(--cyan-bright);
}

.runtime-state-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 690;
}

.runtime-state-card p {
  max-width: 750px;
  margin: 12px 0 18px;
  color: #858d9e;
  font-size: 11px;
  line-height: 1.68;
}

.runtime-definition-list,
.configuration-card dl,
.settings-definition-list,
.connection-result__meta {
  margin: 0;
}

.runtime-definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.runtime-definition-list > div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.runtime-definition-list dt,
.configuration-card dt,
.settings-definition-list dt,
.connection-result__meta dt {
  color: #626a7b;
  font-size: 8px;
}

.runtime-definition-list dd,
.configuration-card dd,
.settings-definition-list dd,
.connection-result__meta dd {
  margin: 5px 0 0;
  color: #c6cad4;
  font-size: 9px;
  line-height: 1.5;
}

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

.configuration-card,
.danger-card {
  padding: 20px;
}

.configuration-card h2,
.danger-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
}

.configuration-card dl {
  margin-top: 16px;
}

.configuration-card dl > div {
  display: grid;
  padding: 11px 0;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--border);
}

.configuration-card dd {
  overflow-wrap: anywhere;
  text-align: right;
}

.danger-card {
  border-color: rgba(251, 113, 133, 0.12);
}

.danger-card p {
  margin: 9px 0 17px;
  color: #767e8f;
  font-size: 9px;
  line-height: 1.58;
}

.not-found-panel {
  display: flex;
  min-height: 500px;
  padding: 50px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.not-found-panel > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  color: var(--violet-bright);
}

.not-found-panel p {
  max-width: 500px;
  margin: 14px 0 22px;
  color: #7c8495;
  font-size: 11px;
  line-height: 1.6;
}

/* Settings */
.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.settings-panel {
  padding: 22px;
}

.settings-panel--wide {
  grid-column: 1 / -1;
}

.setting-row {
  display: grid;
  min-height: 86px;
  padding: 15px 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border-top: 1px solid var(--border);
}

.panel__header--bordered + .setting-row {
  border-top: 0;
}

.setting-row__icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 11px;
  background: rgba(139, 92, 246, 0.05);
  color: #ad96f6;
}

.setting-row__icon svg {
  width: 16px;
  height: 16px;
}

.setting-row__copy strong {
  display: block;
  color: #dfe2e9;
  font-size: 10px;
  font-weight: 680;
}

.setting-row__copy p {
  max-width: 520px;
  margin: 5px 0 0;
  color: #71798a;
  font-size: 8px;
  line-height: 1.55;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #171a20;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #737b8c;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
  transition: left var(--transition), background var(--transition), transform var(--transition);
}

.switch--on {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.1);
}

.switch--on span {
  left: 21px;
  background: #fff;
}

.settings-definition-list > div {
  display: grid;
  min-height: 52px;
  padding: 12px 2px;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border);
}

.settings-definition-list > div:first-child {
  border-top: 0;
}

.settings-definition-list dd {
  text-align: right;
}

.inline-state {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 680;
}

.inline-state--violet {
  color: #bca7ff;
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
}

.inline-state--warning {
  color: #efc476;
  border-color: rgba(248, 189, 88, 0.18);
  background: rgba(248, 189, 88, 0.055);
}

.reset-workspace {
  display: flex;
  min-height: 112px;
  padding-top: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.reset-workspace strong {
  display: block;
  font-size: 12px;
  font-weight: 680;
}

.reset-workspace p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #727a8b;
  font-size: 9px;
  line-height: 1.6;
}

/* Backend connection */
.backend-truth-banner {
  display: flex;
  min-height: 82px;
  padding: 18px 20px;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(66, 245, 158, 0.15);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(66, 245, 158, 0.055), transparent 42%),
    rgba(9, 12, 12, 0.82);
  box-shadow: var(--shadow-card);
}

.backend-truth-banner > svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  color: var(--green-bright);
}

.backend-truth-banner strong {
  display: block;
  font-size: 11px;
  font-weight: 690;
}

.backend-truth-banner p {
  max-width: 850px;
  margin: 5px 0 0;
  color: #767e8f;
  font-size: 9px;
  line-height: 1.55;
}

.backend-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.62fr);
  align-items: start;
  gap: 16px;
}

.connection-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.connection-form .panel__header {
  margin-bottom: 4px;
}

.endpoint-preview {
  display: flex;
  min-height: 65px;
  padding: 12px 14px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(34, 211, 238, 0.13);
  border-radius: 11px;
  background: rgba(34, 211, 238, 0.03);
}

.endpoint-preview span,
.response-preview span {
  color: #687182;
  font-size: 8px;
  font-weight: 680;
}

.endpoint-preview code,
.response-preview code {
  overflow-wrap: anywhere;
  color: #9fdfe8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.5;
}

.connection-form__actions {
  display: flex;
  padding-top: 18px;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--border);
}

.backend-sidebar {
  position: sticky;
  top: 138px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.connection-result {
  position: relative;
  min-height: 310px;
  padding: 23px;
  overflow: hidden;
}

.connection-result::before {
  position: absolute;
  top: -80px;
  right: -75px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  content: "";
  opacity: 0.09;
  filter: blur(35px);
}

.connection-result--connected {
  border-color: rgba(66, 245, 158, 0.22);
}

.connection-result--connected::before {
  background: var(--green);
}

.connection-result--failed {
  border-color: rgba(251, 113, 133, 0.2);
}

.connection-result--failed::before {
  background: var(--danger);
}

.connection-result--testing {
  border-color: rgba(34, 211, 238, 0.22);
}

.connection-result--testing::before {
  background: var(--cyan);
}

.connection-result__icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: #7c8496;
}

.connection-result__icon svg {
  width: 21px;
  height: 21px;
}

.connection-result--connected .connection-result__icon {
  color: var(--green-bright);
  border-color: rgba(66, 245, 158, 0.22);
  background: rgba(66, 245, 158, 0.06);
}

.connection-result--failed .connection-result__icon {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.23);
  background: rgba(251, 113, 133, 0.06);
}

.connection-result--testing .connection-result__icon {
  color: var(--cyan-bright);
  border-color: rgba(34, 211, 238, 0.22);
  background: rgba(34, 211, 238, 0.06);
}

.connection-result h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.connection-result > p {
  position: relative;
  z-index: 2;
  margin: 10px 0 0;
  color: #7d8596;
  font-size: 9px;
  line-height: 1.6;
}

.connection-result__meta {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

.connection-result__meta > div {
  display: grid;
  padding: 9px 0;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.connection-result__meta dd {
  overflow-wrap: anywhere;
  text-align: right;
}

.response-preview {
  position: relative;
  z-index: 2;
  display: flex;
  max-height: 132px;
  padding: 11px;
  margin-top: 13px;
  overflow: auto;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(2, 3, 4, 0.5);
}

.backend-contract {
  padding: 20px;
}

.backend-contract h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 680;
}

.backend-contract ul {
  display: flex;
  padding: 0;
  margin: 15px 0 0;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.backend-contract li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #7c8495;
  font-size: 8px;
  line-height: 1.5;
}

.backend-contract li svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--green-bright);
}

.backend-contract li:last-child svg {
  color: #f5c97c;
}

.execution-warning {
  display: flex;
  padding: 17px;
  align-items: flex-start;
  gap: 11px;
  border-color: rgba(248, 189, 88, 0.12);
}

.execution-warning > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: #eac078;
}

.execution-warning h3 {
  margin: 0;
  font-size: 10px;
  font-weight: 680;
}

.execution-warning p {
  margin: 5px 0 0;
  color: #747c8e;
  font-size: 8px;
  line-height: 1.55;
}

/* Modal and notifications */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.66);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(5px);
  transition: opacity var(--transition);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  animation: modal-fade 170ms ease-out both;
}

.runtime-dialog {
  display: grid;
  width: min(100%, 590px);
  padding: 26px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(139, 92, 246, 0.11), transparent 35%),
    #0b0d11;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65), 0 0 50px rgba(139, 92, 246, 0.07);
  animation: dialog-enter 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.runtime-dialog__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.075);
  color: var(--violet-bright);
}

.runtime-dialog__icon svg {
  width: 21px;
  height: 21px;
}

.runtime-dialog__copy h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 710;
  letter-spacing: -0.035em;
}

.runtime-dialog__copy > p {
  margin: 12px 0 0;
  color: #8a92a3;
  font-size: 10px;
  line-height: 1.65;
}

.runtime-dialog__copy > p strong {
  color: #daddE5;
  font-weight: 670;
}

.runtime-dialog__note {
  padding: 12px;
  margin-top: 15px;
  border: 1px solid rgba(248, 189, 88, 0.14);
  border-radius: 10px;
  background: rgba(248, 189, 88, 0.035);
  color: #8c8374;
  font-size: 9px;
  line-height: 1.55;
}

.runtime-dialog__actions {
  display: flex;
  padding-top: 18px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  width: min(390px, calc(100vw - 36px));
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  min-height: 70px;
  padding: 13px 40px 13px 17px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(13, 15, 19, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  animation: toast-enter 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.toast__indicator {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 999px;
  background: #8a92a3;
  box-shadow: 0 0 10px currentColor;
}

.toast--success .toast__indicator {
  background: var(--green);
  color: var(--green);
}

.toast--danger .toast__indicator {
  background: var(--danger);
  color: var(--danger);
}

.toast strong {
  display: block;
  color: #e1e4eb;
  font-size: 10px;
  font-weight: 690;
}

.toast p {
  margin: 5px 0 0;
  color: #7d8596;
  font-size: 8px;
  line-height: 1.5;
}

.toast__close {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 25px;
  height: 25px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #626a7a;
  cursor: pointer;
}

.toast__close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.toast__close svg {
  width: 13px;
  height: 13px;
}

.spin {
  animation: spin 0.9s linear infinite;
}

/* Motion */
@keyframes logo-sheen {
  0%, 68%, 100% { transform: rotate(32deg) translateX(-90%); }
  78% { transform: rotate(32deg) translateX(90%); }
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tab-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes line-particle {
  0% { left: 5%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 95%; opacity: 0; }
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-enter {
  from { opacity: 0; transform: translateX(18px) scale(0.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1320px) {
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-hero {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.85fr);
  }

  .truth-panel {
    grid-template-columns: auto minmax(170px, 0.6fr) minmax(0, 1.45fr);
  }
}

@media (max-width: 1120px) {
  .content-area {
    padding-right: 24px;
    padding-left: 24px;
  }

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

  .command-visual {
    min-height: 325px;
  }

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

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

  .truth-panel {
    grid-template-columns: auto 1fr;
  }

  .truth-panel__items {
    grid-column: 1 / -1;
  }

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

  .form-layout,
  .backend-layout {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.55fr);
  }
}

@media (max-width: 960px) {
  .app-shell,
  .app-shell--compact {
    --sidebar-current-width: 0px;
  }

  .sidebar {
    width: 276px;
    transform: translateX(-102%);
  }

  .sidebar--open {
    transform: translateX(0);
  }

  .sidebar__close,
  .topbar__menu {
    display: inline-grid !important;
  }

  .sidebar-backdrop {
    display: block;
  }

  .sidebar-backdrop--visible {
    opacity: 1;
    pointer-events: auto;
  }

  .app-shell--compact .brand-mark__text,
  .app-shell--compact .sidebar-create span,
  .app-shell--compact .sidebar-nav__item span,
  .app-shell--compact .sidebar-nav__chevron,
  .app-shell--compact .sidebar-safety div,
  .app-shell--compact .sidebar-version {
    display: initial;
  }

  .app-shell--compact .sidebar-create {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .app-shell--compact .sidebar-nav__item {
    width: auto;
    padding: 0 13px;
    margin-inline: 0;
    justify-content: flex-start;
  }

  .app-shell--compact .sidebar-nav__chevron {
    display: block;
  }

  .app-shell--compact .sidebar-safety div {
    display: flex;
  }

  .app-shell--compact .sidebar-version {
    display: inline;
  }

  .details-layout,
  .form-layout,
  .backend-layout {
    grid-template-columns: 1fr;
  }

  .create-preview,
  .backend-sidebar {
    position: static;
  }

  .create-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.55fr);
  }

  .create-preview__card {
    min-height: 310px;
  }

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

  .connection-result {
    grid-row: span 2;
  }

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

@media (max-width: 760px) {
  :root {
    --topbar-height: 70px;
  }

  .topbar {
    min-height: 70px;
    padding: 0 16px;
  }

  .topbar__kicker {
    display: none;
  }

  .topbar__status {
    gap: 5px;
  }

  .status-pill {
    min-height: 26px;
    padding: 0 8px;
    gap: 5px;
    font-size: 8px;
  }

  .safety-strip {
    padding: 6px 16px;
  }

  .safety-strip p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .content-area {
    padding: 25px 16px 58px;
  }

  .page-stack {
    gap: 18px;
  }

  .page-header {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .page-header__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .page-header__actions .button {
    flex: 1 1 auto;
  }

  .command-hero {
    min-height: auto;
    padding: 25px;
    gap: 28px;
  }

  .command-visual {
    min-height: 300px;
  }

  .metric-grid,
  .detail-status-grid,
  .settings-layout,
  .truth-panel__items,
  .runtime-definition-list,
  .backend-sidebar,
  .details-sidebar,
  .create-preview {
    grid-template-columns: 1fr;
  }

  .settings-panel--wide {
    grid-column: auto;
  }

  .truth-panel {
    grid-template-columns: auto 1fr;
  }

  .truth-panel__items {
    grid-column: 1 / -1;
  }

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

  .directory-toolbar__count {
    min-height: 36px;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .select-field--toolbar select {
    min-width: 0;
  }

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

  .agent-card {
    min-height: 290px;
  }

  .field-grid--two,
  .capability-selector {
    grid-template-columns: 1fr;
  }

  .agent-form,
  .connection-form {
    padding: 20px;
  }

  .agent-form__footer,
  .reset-workspace {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-form__actions,
  .connection-form__actions {
    width: 100%;
  }

  .agent-form__actions .button,
  .connection-form__actions .button {
    flex: 1 1 0;
  }

  .agent-detail-hero {
    padding: 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .agent-detail-hero__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .agent-detail-hero__actions .button {
    flex: 1 1 auto;
  }

  .connection-result {
    grid-row: auto;
  }
}

@media (max-width: 520px) {
  .topbar__title strong {
    max-width: 86px;
    font-size: 11px;
  }

  .topbar__status .status-pill--violet {
    padding: 0 7px;
  }

  .safety-strip p {
    font-size: 9px;
  }

  .page-header h1,
  .agent-detail-hero h1,
  .not-found-panel h1 {
    font-size: 29px;
  }

  .command-hero {
    padding: 21px;
  }

  .command-hero h2 {
    font-size: 31px;
  }

  .command-hero__actions,
  .page-header__actions,
  .agent-detail-hero__actions {
    flex-direction: column;
  }

  .command-hero__actions .button,
  .page-header__actions .button,
  .agent-detail-hero__actions .button {
    width: 100%;
  }

  .command-visual {
    min-height: 280px;
  }

  .command-node--agent {
    padding-right: 7px;
  }

  .command-node--agent > span:last-child {
    display: none;
  }

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

  .metric-card {
    min-height: 132px;
  }

  .agent-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .agent-row__state {
    display: none;
  }

  .truth-panel {
    padding: 20px;
    grid-template-columns: 1fr;
  }

  .truth-panel__icon {
    width: 40px;
    height: 40px;
  }

  .truth-panel__items {
    grid-column: auto;
  }

  .agent-form,
  .connection-form,
  .details-main-panel,
  .settings-panel {
    padding: 17px;
  }

  .agent-form__actions,
  .connection-form__actions,
  .runtime-dialog__actions {
    flex-direction: column-reverse;
  }

  .agent-form__actions .button,
  .connection-form__actions .button,
  .runtime-dialog__actions .button {
    width: 100%;
  }

  .agent-detail-hero__identity {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .tabs {
    overflow-x: auto;
  }

  .tabs__item {
    flex: 1 0 auto;
  }

  .configuration-card dl > div,
  .settings-definition-list > div {
    grid-template-columns: 1fr;
  }

  .configuration-card dd,
  .settings-definition-list dd {
    text-align: left;
  }

  .runtime-dialog {
    padding: 20px;
    grid-template-columns: 1fr;
  }

  .runtime-dialog__actions {
    grid-column: auto;
  }

  .toast-stack {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}

html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

html[data-reduce-motion="true"] .page-stack,
html[data-reduce-motion="true"] .tab-panel,
html[data-reduce-motion="true"] .modal-layer,
html[data-reduce-motion="true"] .runtime-dialog,
html[data-reduce-motion="true"] .toast {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .page-stack,
  .tab-panel,
  .modal-layer,
  .runtime-dialog,
  .toast {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}


/* Supabase authentication frontend */
.auth-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(139, 92, 246, 0.18), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.11), transparent 30%),
    radial-gradient(circle at 70% 88%, rgba(66, 245, 158, 0.08), transparent 32%),
    var(--bg-deep);
}

.auth-shell::before,
.auth-shell::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

.auth-shell::before {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.auth-shell::after {
  border: 1px solid rgba(139, 92, 246, 0.06);
  background: linear-gradient(135deg, transparent, rgba(139, 92, 246, 0.028), transparent);
}

.auth-header {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 82px;
  padding: 24px clamp(18px, 4vw, 54px) 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-main {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(1180px, calc(100vw - 36px));
  min-height: calc(100vh - 104px);
  margin: 0 auto;
  padding: 30px 0 56px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

.auth-visual-panel {
  display: grid;
  position: relative;
  min-height: 580px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  align-content: end;
  gap: 26px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(10, 12, 15, 0.66);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(18px);
}

.auth-visual-panel::before {
  position: absolute;
  inset: -10% -4% auto auto;
  width: 360px;
  height: 360px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.24), transparent 68%);
  filter: blur(4px);
}

.auth-visual-panel h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.auth-visual-panel p {
  max-width: 580px;
  margin: 16px 0 0;
  color: #a9b0c0;
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.7;
}

.auth-orbit {
  position: absolute;
  inset: 60px 54px auto auto;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  color: #fff;
}

.auth-orbit span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(34, 211, 238, 0.14));
  box-shadow: 0 0 54px rgba(139, 92, 246, 0.26);
  font-size: 30px;
  font-weight: 820;
}

.auth-orbit i {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 50%;
}

.auth-orbit i:nth-child(2) {
  transform: rotate(54deg) scaleX(0.48);
  border-color: rgba(34, 211, 238, 0.25);
}

.auth-orbit i:nth-child(3) {
  transform: rotate(-28deg) scaleX(0.68);
  border-color: rgba(66, 245, 158, 0.22);
}

.auth-truth-list {
  display: grid;
  padding: 0;
  margin: 0;
  gap: 12px;
  list-style: none;
}

.auth-truth-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c8ceda;
  font-size: 13px;
}

.auth-truth-list svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--green);
}

.auth-card-wrap {
  min-width: 0;
}

.auth-card {
  width: min(100%, 472px);
  padding: clamp(22px, 3vw, 34px);
  margin-left: auto;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%),
    rgba(8, 10, 13, 0.88);
  box-shadow: var(--shadow-deep);
}

.auth-card__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.auth-card__header h1 {
  margin: 5px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.auth-card__header p {
  margin: 0;
  color: #96a0b4;
  font-size: 13px;
  line-height: 1.6;
}

.auth-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.09);
  color: var(--violet-bright);
}

.auth-card__icon svg {
  width: 22px;
  height: 22px;
}

.auth-card .form-field {
  margin-bottom: 14px;
}

.auth-card .input-with-icon,
.auth-card .form-field > input {
  height: 52px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.036);
}

.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #12151b inset;
  transition: background-color 9999s ease-in-out 0s;
}

.password-input-wrap {
  padding-right: 8px;
}

.password-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #8b93a7;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 18px;
  color: #a8afc1;
  font-size: 12px;
}

.auth-row a,
.auth-switch a {
  color: var(--cyan-bright);
}

.remember-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.remember-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--violet);
}

.auth-submit {
  width: 100%;
  height: 50px;
  justify-content: center;
  margin-top: 4px;
}

.auth-switch {
  margin: 22px 0 0;
  color: #9ba3b5;
  font-size: 13px;
  text-align: center;
}

.auth-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
  margin: 0 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd1dd;
}

.auth-notice svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.auth-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 13px;
}

.auth-notice p,
.auth-notice ul {
  margin: 0;
  color: #9da6b8;
  font-size: 11px;
  line-height: 1.55;
}

.auth-notice ul {
  padding-left: 18px;
  margin-top: 8px;
}

.auth-notice--warning {
  border-color: rgba(248, 189, 88, 0.24);
  background: rgba(248, 189, 88, 0.075);
}

.auth-notice--warning svg {
  color: var(--amber);
}

.auth-notice--info {
  border-color: rgba(34, 211, 238, 0.18);
  background: rgba(34, 211, 238, 0.06);
}

.auth-notice--info svg {
  color: var(--cyan);
}

.auth-feedback {
  min-height: 0;
  margin: 0 0 14px;
  color: #aeb6c8;
  font-size: 12px;
  line-height: 1.55;
}

.auth-feedback:empty {
  display: none;
}

.auth-feedback--success {
  padding: 12px 13px;
  border: 1px solid rgba(66, 245, 158, 0.22);
  border-radius: 14px;
  background: rgba(66, 245, 158, 0.07);
  color: #a7f3d0;
}

.auth-feedback--danger {
  padding: 12px 13px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 14px;
  background: rgba(251, 113, 133, 0.075);
  color: #fecdd3;
}

.auth-message-card {
  display: block;
}

.account-status .status-pill {
  max-width: min(230px, 26vw);
}

.account-status .status-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-logout {
  flex: 0 0 auto;
}

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

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

.summary-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.summary-card span {
  display: block;
  margin-bottom: 7px;
  color: #7f889a;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f1f4f9;
  font-size: 13px;
  line-height: 1.45;
}

.account-panel .auth-notice {
  margin-top: 16px;
  margin-bottom: 0;
}

@media (max-width: 1050px) {
  .auth-main {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .auth-visual-panel {
    min-height: 360px;
  }

  .auth-card {
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 720px) {
  .auth-header {
    min-height: auto;
    padding: 18px 16px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-header .topbar__status {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .auth-main {
    width: calc(100vw - 24px);
    padding: 18px 0 36px;
    gap: 16px;
  }

  .auth-visual-panel {
    min-height: 260px;
    padding: 22px;
    border-radius: 24px;
  }

  .auth-visual-panel h1 {
    font-size: clamp(32px, 13vw, 48px);
  }

  .auth-orbit {
    width: 116px;
    height: 116px;
    inset: 18px 20px auto auto;
    opacity: 0.66;
  }

  .auth-orbit span {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 21px;
  }

  .auth-truth-list li {
    font-size: 12px;
  }

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

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

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

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

  .account-status,
  .topbar-logout {
    display: none;
  }
}
