﻿:root {
      --bg: #f6f8fb;
      --panel: #ffffff;
      --ink: #172033;
      --muted: #64748b;
      --line: #d8dee9;
      --blue: #2563eb;
      --blue-soft: #eff6ff;
      --indigo: #4f46e5;
      --purple-soft: #f5f3ff;
      --green: #16a34a;
      --green-soft: #f0fdf4;
      --amber: #d97706;
      --amber-soft: #fff7ed;
      --red: #dc2626;
      --red-soft: #fef2f2;
      --nav: #172033;
    }

    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
      color: var(--ink);
      background: var(--bg);
      min-height: 100vh;
    }
    button { font: inherit; }
    .layout-shell {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 232px minmax(0, 1fr);
      transition: grid-template-columns .18s ease;
    }
    .layout-shell.sidebar-collapsed {
      grid-template-columns: 72px minmax(0, 1fr);
    }
    .content-shell {
      min-width: 0;
      min-height: 100vh;
      display: grid;
      grid-template-rows: auto 1fr auto;
    }
    .global-topbar {
      min-height: 56px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      padding: 10px 18px;
      border-bottom: 1px solid var(--line);
      background: white;
      z-index: 20;
    }
    .global-brand {
      font-size: 16px;
      font-weight: 800;
      color: var(--ink);
      letter-spacing: 0;
    }
    .sidebar {
      background: var(--nav);
      color: #cbd5e1;
      padding: 16px 12px;
      height: 100vh;
      overflow: auto;
    }
    .sidebar-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 30px;
      gap: 8px;
      align-items: start;
      margin-bottom: 18px;
    }
    .brand {
      color: white;
      font-weight: 700;
      font-size: 17px;
      letter-spacing: .02em;
      line-height: 1.35;
    }
    .sidebar-toggle {
      width: 30px;
      height: 30px;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 8px;
      background: rgba(255,255,255,.08);
      color: white;
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
    }
    .layout-shell.sidebar-collapsed .sidebar {
      padding-left: 10px;
      padding-right: 10px;
    }
    .layout-shell.sidebar-collapsed .sidebar-head {
      grid-template-columns: 1fr;
    }
    .layout-shell.sidebar-collapsed .brand,
    .layout-shell.sidebar-collapsed .nav-group,
    .layout-shell.sidebar-collapsed .nav-item {
      font-size: 0;
    }
    .layout-shell.sidebar-collapsed .brand {
      display: none;
    }
    .layout-shell.sidebar-collapsed .nav-item {
      justify-content: center;
      padding: 10px;
    }
    .layout-shell.sidebar-collapsed .nav-item.nav-sub {
      padding-left: 10px;
    }
    .layout-shell.sidebar-collapsed .nav-icon {
      margin: 0;
    }
    .layout-shell.sidebar-collapsed .sidebar-toggle {
      transform: rotate(180deg);
    }
    .nav-group {
      margin: 18px 0 8px;
      padding: 0 11px;
      color: #94a3b8;
      font-size: 12px;
      font-weight: 700;
    }
    .nav-item {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 11px;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: #cbd5e1;
      text-align: left;
      cursor: pointer;
      margin-bottom: 6px;
    }
    .nav-item.active { color: white; background: #2b3852; }
    .nav-item.nav-sub {
      padding-left: 22px;
      font-size: 14px;
    }
    .nav-icon {
      width: 18px;
      height: 18px;
      background: currentColor;
      opacity: .9;
      flex: 0 0 auto;
      -webkit-mask: var(--icon) center / contain no-repeat;
      mask: var(--icon) center / contain no-repeat;
    }
    .icon-workbench { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='14' rx='2'/%3E%3Cpath d='M8 20h8M12 18v2'/%3E%3C/svg%3E"); }
    .icon-tasks { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Cpath d='m4 6 1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2'/%3E%3C/svg%3E"); }
    .icon-knowledge { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3Cpath d='M9 7h7M9 11h6'/%3E%3C/svg%3E"); }
    .icon-connectors { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='7' ry='3'/%3E%3Cpath d='M5 5v6c0 1.7 3.1 3 7 3s7-1.3 7-3V5'/%3E%3Cpath d='M5 11v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6'/%3E%3C/svg%3E"); }
    .icon-tools { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5 5L4 17v3h3l5.7-5.7a4 4 0 0 0 5-5l-2.4 2.4-2.8-2.8z'/%3E%3C/svg%3E"); }
    .icon-agents { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='7' width='12' height='11' rx='3'/%3E%3Cpath d='M12 7V4M9 12h.01M15 12h.01M10 16h4M5 13H3M21 13h-2'/%3E%3C/svg%3E"); }
    .sidebar-note {
      margin-top: 24px;
      border-top: 1px solid rgba(255,255,255,.12);
      padding-top: 16px;
      font-size: 12px;
      line-height: 1.7;
      color: #94a3b8;
    }
    .main {
      min-width: 0;
      padding: 0 24px 24px;
      overflow: auto;
    }
    .topbar {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 18px;
    }
    .screen-subtitle {
      color: var(--muted);
      font-size: 12px;
      font-weight: 400;
      margin-top: 3px;
    }
    h1 {
      margin: 0;
      font-size: 26px;
      line-height: 1.18;
      letter-spacing: 0;
    }
    .subtitle {
      margin: 8px 0 0;
      color: var(--muted);
      line-height: 1.6;
      font-size: 14px;
    }
    .controls {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }
    .btn {
      border: 1px solid var(--line);
      background: white;
      color: var(--ink);
      border-radius: 8px;
      padding: 9px 12px;
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    .btn.primary {
      border-color: var(--blue);
      background: var(--blue);
      color: white;
    }
    .btn:hover { border-color: #94a3b8; }
    .btn.primary:hover { border-color: #1d4ed8; background: #1d4ed8; }
    .icon-btn {
      width: 30px;
      height: 30px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      color: #475569;
      display: inline-grid;
      place-items: center;
      cursor: pointer;
      font-weight: 700;
      line-height: 1;
    }
    .icon-btn:hover {
      border-color: #94a3b8;
      background: #f8fafc;
    }
    .step-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 8px;
    }
    .step {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px 8px;
      background: #f8fafc;
      min-height: 70px;
      font-size: 12px;
      line-height: 1.35;
    }
    .step strong { display: block; font-size: 13px; margin-bottom: 5px; }
    .step.done { background: var(--green-soft); border-color: #86efac; }
    .step.active { background: var(--blue-soft); border-color: #60a5fa; box-shadow: inset 0 0 0 1px #60a5fa; }
    .step.pending { color: var(--muted); }
    .content-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }
    .screen {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
    }
    .screen-head, .panel-head {
      padding: 13px 16px;
      border-bottom: 1px solid var(--line);
      background: #fbfdff;
      font-weight: 700;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }
    .top-user-area {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .notification-btn {
      position: relative;
      width: 34px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      cursor: pointer;
    }
    .notification-btn::before {
      content: "";
      display: block;
      width: 18px;
      height: 18px;
      margin: 7px auto;
      background: #475569;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 7h18s-3 0-3-7'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E") center / contain no-repeat;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 7h18s-3 0-3-7'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E") center / contain no-repeat;
    }
    .bell-mark {
      position: absolute;
      top: -6px;
      right: -6px;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 999px;
      background: var(--red);
      color: white;
      display: grid;
      place-items: center;
      font-size: 11px;
      line-height: 1;
      border: 2px solid white;
    }
    .login-user {
      display: grid;
      grid-template-columns: 34px minmax(92px, auto);
      gap: 8px;
      align-items: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      padding: 5px 9px 5px 5px;
      font-size: 12px;
    }
    .user-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--blue-soft);
      color: var(--blue);
      display: grid;
      place-items: center;
      font-weight: 800;
    }
    .login-user strong,
    .login-user span {
      display: block;
      line-height: 1.3;
    }
    .login-user span {
      color: var(--muted);
      font-weight: 400;
    }
    .breadcrumb-bar {
      padding: 10px 0;
      margin: 0;
      border-bottom: 0;
      background: transparent;
      color: #475569;
      font-size: 12px;
    }
    .breadcrumb-bar span {
      color: var(--muted);
    }
    .global-footer {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      padding: 10px 18px;
      border-top: 1px solid var(--line);
      background: white;
      color: var(--muted);
      font-size: 12px;
    }
    .screen-body { min-height: 560px; padding: 18px; }
    .page-title {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 14px;
    }
    .page-title h2 {
      margin: 0;
      font-size: 20px;
      letter-spacing: 0;
    }
    .panel-body { padding: 14px; }
    .pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border-radius: 999px;
      padding: 4px 9px;
      font-size: 12px;
      border: 1px solid var(--line);
      color: var(--muted);
      background: white;
      white-space: nowrap;
    }
    .pill.green { color: #15803d; border-color: #86efac; background: var(--green-soft); }
    .pill.blue { color: #1d4ed8; border-color: #93c5fd; background: var(--blue-soft); }
    .pill.amber { color: #b45309; border-color: #fdba74; background: var(--amber-soft); }
    .cards {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      padding: 14px;
    }
    .stat-card span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 8px;
    }
    .stat-card strong { font-size: 22px; }
    .agent-card, .summary-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 14px;
      background: white;
    }
    .agent-card.highlight { border: 2px dashed #60a5fa; background: var(--blue-soft); }
    .agent-card.published { border-color: #86efac; background: var(--green-soft); }
    .agent-list-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }
    .agent-card-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .agent-summary-card {
      display: grid;
      gap: 8px;
      min-height: 206px;
      align-content: start;
    }
    .agent-meta {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
    }
    .agent-owner-meta,
    .task-agent-meta {
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }
    .task-agent-meta {
      border: 1px solid #dbe3ef;
      border-radius: 8px;
      background: #f8fafc;
      padding: 8px;
    }
    .task-agent-card {
      min-height: 278px;
    }
    .task-agent-actions .btn {
      min-width: 0;
      padding-left: 8px;
      padding-right: 8px;
    }
    .agent-center-tabs {
      display: inline-flex;
      gap: 4px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f8fafc;
      margin-bottom: 12px;
    }
    .agent-center-tab {
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: #475569;
      cursor: pointer;
      font: inherit;
      font-weight: 700;
      padding: 7px 14px;
      min-width: 108px;
    }
    .agent-center-tab.active {
      background: white;
      color: var(--blue);
      box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
    }
    .card-actions {
      display: flex;
      gap: 8px;
      margin-top: auto;
    }
    .card-actions .btn { flex: 1; }
    .card-title { font-weight: 700; margin-bottom: 8px; }
    .muted { color: var(--muted); }
    .mcp-service-card-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
    }
    .mcp-service-tabs {
      display: inline-flex;
      gap: 4px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f8fafc;
      margin-bottom: 12px;
    }
    .mcp-service-tab {
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: #475569;
      cursor: pointer;
      font: inherit;
      font-weight: 700;
      padding: 7px 14px;
      min-width: 92px;
    }
    .mcp-service-tab.active {
      background: white;
      color: var(--blue);
      box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
    }
    .mcp-service-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      padding: 14px;
      min-height: 220px;
      display: grid;
      gap: 8px;
      align-content: start;
    }
    .mcp-service-card.published {
      border-color: #86efac;
      background: var(--green-soft);
    }
    .mcp-service-card.controlled {
      border-color: #fbbf24;
      background: #fffbeb;
    }
    .mcp-service-card.generated {
      border-color: #93c5fd;
      background: #f0f9ff;
    }
    .mcp-service-meta {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
    }
    .mcp-api-preview {
      display: grid;
      gap: 6px;
      margin-top: 2px;
    }
    .mcp-api-preview span {
      border: 1px solid #dbe3ef;
      border-radius: 6px;
      background: rgba(255,255,255,.72);
      padding: 6px 8px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
      color: #334155;
      overflow-wrap: anywhere;
    }
    .form-grid {
      display: grid;
      grid-template-columns: 1.2fr .8fr;
      gap: 14px;
    }
    .field-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-top: 12px;
    }
    .field-grid.one { grid-template-columns: 1fr; }
    .field, .blueprint-row {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px 12px;
      background: #fff;
      min-height: 44px;
    }
    .textarea {
      margin-top: 10px;
      min-height: 110px;
      line-height: 1.7;
    }
    .control-label {
      display: block;
      font-size: 12px;
      font-weight: 700;
      color: #475569;
      margin-bottom: 6px;
    }
    .control, .textarea-control, .select-control {
      width: 100%;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: white;
      color: var(--ink);
      padding: 9px 10px;
      outline: none;
      font: inherit;
      font-size: 13px;
    }
    .control:focus, .textarea-control:focus, .select-control:focus {
      border-color: #60a5fa;
      box-shadow: 0 0 0 3px rgba(96, 165, 250, .22);
    }
    .textarea-control {
      min-height: 132px;
      resize: vertical;
      line-height: 1.65;
    }
    .check-row {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 9px 0;
      border-bottom: 1px solid #eef2f7;
      font-size: 13px;
      line-height: 1.5;
    }
    .check-row:last-child { border-bottom: 0; }
    .check-row input {
      margin-top: 3px;
      width: 16px;
      height: 16px;
      accent-color: var(--blue);
      flex: 0 0 auto;
    }
    .wizard-tabs {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 6px;
      margin-bottom: 14px;
    }
    .wizard-tab {
      border-radius: 7px;
      padding: 8px 6px;
      background: #eef2ff;
      border: 1px solid #c7d2fe;
      font-size: 12px;
      line-height: 1.25;
      text-align: center;
      cursor: pointer;
      min-width: 0;
      white-space: nowrap;
    }
    .wizard-tab .muted {
      display: block;
      font-size: 11px;
      margin-top: 2px;
      white-space: nowrap;
    }
    .wizard-tab.active { background: #dbeafe; border-color: #60a5fa; color: #1d4ed8; }
    .wizard-page { display: none; }
    .wizard-page.active { display: block; }
    .mini-section {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      padding: 14px;
      margin-bottom: 12px;
    }
    .mini-section.soft-blue { background: var(--blue-soft); border-color: #bfdbfe; }
    .mini-section.soft-green { background: var(--green-soft); border-color: #bbf7d0; }
    .mini-section.soft-amber { background: var(--amber-soft); border-color: #fed7aa; }
    .mini-title {
      font-weight: 700;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .matrix {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
    }
    .data-range-matrix {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .data-range-item {
      align-items: flex-start;
      min-height: 78px;
    }
    .source-tag {
      display: inline-flex;
      align-items: center;
      margin-left: 8px;
      padding: 2px 6px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      vertical-align: middle;
    }
    .source-custom { background: #e0f2fe; color: #0369a1; }
    .source-database { background: #dcfce7; color: #166534; }
    .source-api { background: #ffedd5; color: #9a3412; }
    .source-knowledge { background: #ede9fe; color: #6d28d9; }
    .mcp-service-toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: end;
      margin-top: 12px;
    }
    .mcp-service-layout {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }
    .mcp-service-list {
      display: grid;
      gap: 8px;
      align-content: start;
    }
    .mcp-service-item {
      border: 1px solid #dbe3ef;
      border-radius: 8px;
      background: #f8fafc;
      padding: 10px;
      text-align: left;
      cursor: pointer;
      color: var(--ink);
      font: inherit;
      width: 100%;
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }
    .mcp-service-item strong,
    .mcp-service-item span:not(.mcp-service-arrow) {
      display: block;
    }
    .mcp-service-item span:not(.mcp-service-arrow) {
      color: var(--muted);
      font-size: 12px;
    }
    .mcp-service-arrow {
      width: 18px;
      height: 18px;
      display: grid;
      place-items: center;
      color: #64748b;
      font-size: 18px;
      line-height: 1;
      transition: transform .16s ease;
    }
    .mcp-service-row.expanded .mcp-service-arrow { transform: rotate(90deg); }
    .mcp-service-item.active {
      background: var(--blue-soft);
      border-color: #60a5fa;
      box-shadow: inset 3px 0 0 var(--blue);
    }
    .mcp-tool-panel {
      display: none;
      margin: 8px 0 2px 26px;
      border: 1px solid #dbe3ef;
      border-radius: 8px;
      background: white;
      padding: 10px 12px;
    }
    .mcp-service-row.expanded .mcp-tool-panel { display: block; }
    .data-source-menu .mini-title {
      margin-bottom: 6px;
    }
    .data-source-toolbar {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) minmax(220px, 280px) auto;
      gap: 10px;
      align-items: end;
      margin-top: 14px;
      margin-bottom: 12px;
    }
    .data-source-list {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: white;
    }
    .data-source-row {
      display: grid;
      grid-template-columns: minmax(180px, 1.3fr) 150px 90px 110px 80px;
      gap: 10px;
      align-items: center;
      padding: 11px 12px;
      border-bottom: 1px solid #eef2f7;
      font-size: 13px;
    }
    .data-source-row:last-child { border-bottom: 0; }
    .data-source-head {
      background: #f8fafc;
      color: #64748b;
      font-size: 12px;
      font-weight: 700;
    }
    .data-source-manager {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-top: 12px;
    }
    .data-source-manager.hidden {
      display: none;
    }
    .data-source-panel {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbfdff;
      padding: 12px;
      margin-top: 12px;
    }
    .data-source-create-fields {
      display: none;
      margin-top: 10px;
    }
    .data-source-create-fields.active {
      display: block;
    }
    .common-source-fields {
      margin-bottom: 12px;
    }
    .create-workflow-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
      gap: 12px;
      align-items: stretch;
    }
    .workflow-main,
    .workflow-aside {
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: white;
      padding: 12px;
      min-width: 0;
    }
    .workflow-aside {
      background: #f8fafc;
    }
    .schema-table {
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      overflow: hidden;
      margin-top: 10px;
      background: white;
    }
    .schema-row {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      padding: 9px 10px;
      border-bottom: 1px solid #eef2f7;
      font-size: 12px;
    }
    .schema-row:last-child { border-bottom: 0; }
    .schema-head {
      background: #f8fafc;
      color: #64748b;
      font-weight: 700;
    }
    .connector-object-config {
      padding-top: 10px;
    }
    .connector-object-row {
      grid-template-columns: 54px minmax(150px, 1.2fr) 90px minmax(140px, 1fr) 64px 110px;
      align-items: center;
    }
    .connector-object-row input[type="text"],
    .connector-object-row select {
      width: 100%;
      border: 1px solid #dbe3ef;
      border-radius: 6px;
      padding: 6px 8px;
      font: inherit;
      font-size: 12px;
      background: white;
    }
    .preview-box {
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: white;
      padding: 10px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
      line-height: 1.7;
      color: #334155;
      margin-bottom: 10px;
      word-break: break-word;
    }
    .status-stack {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
    }
    .upload-zone {
      margin-top: 10px;
      border: 1px dashed #94a3b8;
      border-radius: 8px;
      background: #f8fafc;
      min-height: 84px;
      display: grid;
      place-items: center;
      color: #64748b;
      font-size: 13px;
      text-align: center;
      padding: 12px;
    }
    .knowledge-list-section {
      margin-top: 14px;
    }
    .knowledge-modal-shell {
      width: min(980px, 94vw);
      height: min(680px, 90vh);
      max-height: 90vh;
    }
    .knowledge-wizard {
      display: grid;
      grid-template-columns: 190px minmax(0, 1fr);
      gap: 14px;
      padding: 14px;
      min-height: 0;
      height: 100%;
      overflow: hidden;
    }
    .knowledge-wizard-page { display: none; }
    .knowledge-wizard-page.active { display: block; }
    .knowledge-manage-body {
      padding: 14px;
      overflow: auto;
      min-height: 0;
    }
    .connector-modal-shell {
      width: min(1120px, 95vw);
      height: min(700px, 90vh);
      max-height: 90vh;
    }
    .mcp-service-modal-shell {
      width: min(1180px, 95vw);
      height: min(760px, 92vh);
      max-height: 92vh;
    }
    .task-schedule-modal-shell {
      width: min(1040px, 94vw);
      height: min(680px, 90vh);
      max-height: 90vh;
    }
    .scheduled-task-modal-shell {
      width: min(1120px, 95vw);
      height: min(760px, 92vh);
      max-height: 92vh;
    }
    .connector-modal-body {
      padding: 14px;
      overflow: auto;
      min-height: 0;
    }
    .mcp-service-modal-body {
      padding: 14px;
      overflow: auto;
      min-height: 0;
    }
    .task-schedule-body {
      padding: 14px;
      overflow: auto;
      min-height: 0;
      display: grid;
      gap: 14px;
    }
    .scheduled-task-detail-body {
      padding: 14px;
      overflow: auto;
      min-height: 0;
      display: grid;
      gap: 14px;
      background: #f8fafc;
    }
    .scheduled-detail-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
      gap: 14px;
      align-items: stretch;
    }
    .schedule-param-table .schema-row {
      grid-template-columns: 96px minmax(120px, .8fr) minmax(200px, 1.2fr);
    }
    .schedule-log-list {
      display: grid;
      gap: 8px;
    }
    .schedule-log-row {
      display: grid;
      grid-template-columns: 72px minmax(96px, .6fr) minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid #e2e8f0;
      border-left: 3px solid #94a3b8;
      border-radius: 8px;
      background: white;
      font-size: 12px;
    }
    .schedule-log-row strong {
      font-size: 13px;
      color: var(--ink);
    }
    .schedule-log-row em {
      color: var(--muted);
      font-style: normal;
      line-height: 1.5;
    }
    .schedule-log-row.done {
      border-left-color: var(--green);
      background: var(--green-soft);
    }
    .schedule-log-row.active {
      border-left-color: var(--blue);
      background: var(--blue-soft);
    }
    .schedule-output-grid {
      display: grid;
      gap: 10px;
    }
    .task-schedule-preview {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbfdff;
      padding: 12px;
    }
    .schedule-preview-row {
      grid-template-columns: 54px minmax(180px, 1fr) 120px minmax(180px, 1fr);
    }
    .smart-create-panel {
      margin-top: 14px;
      border: 1px solid #bfdbfe;
      border-radius: 8px;
      background: #f0f9ff;
      padding: 12px;
    }
    .smart-create-grid {
      display: grid;
      grid-template-columns: minmax(420px, 1fr) minmax(360px, .9fr);
      gap: 12px;
      align-items: start;
    }
    .smart-source-panel,
    .smart-prompt-panel {
      display: grid;
      gap: 12px;
      min-width: 0;
    }
    .smart-object-table {
      background: white;
    }
    .smart-object-row {
      grid-template-columns: 54px minmax(150px, 1.1fr) 70px minmax(120px, 1fr) minmax(110px, .9fr);
    }
    .smart-prompt-input {
      min-height: 130px;
      line-height: 1.7;
    }
    .smart-generate-preview {
      border: 1px solid #dbe3ef;
      border-radius: 8px;
      background: white;
      padding: 10px;
      display: grid;
      gap: 8px;
    }
    .smart-generate-preview .blueprint-row {
      display: grid;
      gap: 4px;
      background: #f8fafc;
    }
    .mcp-api-section {
      margin-top: 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbfdff;
      padding: 12px;
    }
    .mcp-api-tool-list {
      display: grid;
      gap: 10px;
    }
    .smart-api-empty {
      border: 1px dashed #93c5fd;
      border-radius: 8px;
      background: #f8fbff;
      padding: 18px;
      display: grid;
      gap: 8px;
      color: #475569;
    }
    .smart-api-empty strong {
      color: #1d4ed8;
    }
    .mcp-api-tool-card {
      border: 1px solid #dbe3ef;
      border-radius: 8px;
      background: white;
      padding: 12px;
      display: grid;
      gap: 10px;
    }
    .mcp-api-tool-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
    }
    .api-config-grid {
      display: grid;
      grid-template-columns: minmax(220px, 1.5fr) 120px minmax(160px, 1fr) 110px;
      gap: 10px;
    }
    .api-config-field {
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: #f8fafc;
      padding: 8px;
    }
    .api-config-field label {
      display: block;
      color: #64748b;
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .api-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }
    .api-detail-box {
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: #fbfdff;
      padding: 10px;
      min-width: 0;
    }
    .api-detail-box .mini-title {
      margin-bottom: 8px;
    }
    .api-param-grid {
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      overflow: hidden;
      background: white;
    }
    .api-param-row {
      display: grid;
      grid-template-columns: minmax(120px, .9fr) 90px 70px minmax(180px, 1.5fr);
      gap: 8px;
      padding: 8px 10px;
      border-bottom: 1px solid #eef2f7;
      font-size: 12px;
      align-items: center;
    }
    .api-header-row {
      grid-template-columns: minmax(110px, .9fr) minmax(160px, 1.2fr) 58px minmax(120px, 1fr);
    }
    .api-request-row {
      grid-template-columns: minmax(100px, .9fr) 70px 80px 58px minmax(140px, 1.3fr);
    }
    .api-response-row {
      grid-template-columns: minmax(110px, .9fr) 90px minmax(180px, 1.5fr);
    }
    .api-param-row:last-child { border-bottom: 0; }
    .api-param-head {
      background: #f8fafc;
      color: #64748b;
      font-weight: 700;
    }
    .api-example {
      min-height: 118px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
      line-height: 1.6;
      resize: vertical;
    }
    .connector-credential-panel,
    .connector-param-panel {
      margin-top: 12px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: #fbfdff;
      padding: 12px;
    }
    .connector-param-panel { display: none; }
    .connector-param-panel.active { display: block; }
    .agent-access-policy {
      margin-top: 12px;
      background: #fffbeb;
      border-color: #fde68a;
    }
    .data-source-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 12px;
      flex-wrap: wrap;
    }
    .list-row {
      display: grid;
      grid-template-columns: 1fr 110px 100px;
      gap: 8px;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid #eef2f7;
      font-size: 13px;
    }
    .list-row:last-child { border-bottom: 0; }
    .table {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: white;
    }
    .table-row {
      display: grid;
      grid-template-columns: minmax(190px, 1.4fr) minmax(110px, .8fr) minmax(110px, .8fr) minmax(100px, .7fr) 80px;
      gap: 10px;
      align-items: center;
      padding: 11px 12px;
      border-bottom: 1px solid #eef2f7;
      font-size: 13px;
    }
    .table-row:last-child { border-bottom: 0; }
    .table-head {
      background: #f8fafc;
      color: #64748b;
      font-weight: 700;
      font-size: 12px;
    }
    .table-row.active-row {
      background: var(--blue-soft);
      box-shadow: inset 3px 0 0 var(--blue);
    }
    .connector-table .table-row {
      grid-template-columns: minmax(190px, 1.2fr) 130px 130px 100px 80px;
    }
    .system-list-section {
      margin-top: 14px;
    }
    .user-table .table-row {
      grid-template-columns: minmax(120px, 1fr) minmax(120px, .9fr) minmax(110px, .8fr) 80px 110px minmax(150px, 1fr) 78px;
    }
    .role-card {
      min-height: 210px;
      display: grid;
      gap: 8px;
    }
    .role-meta {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
      border: 1px solid #dbe3ef;
      border-radius: 8px;
      background: #f8fafc;
      padding: 8px;
    }
    .user-agent-modal-shell {
      width: min(900px, 94vw);
      height: min(560px, 86vh);
      max-height: 86vh;
    }
    .user-agent-detail-body {
      padding: 14px;
      overflow: auto;
      min-height: 0;
    }
    .user-agent-detail-table .table-row {
      grid-template-columns: minmax(200px, 1.3fr) 120px 100px 90px minmax(150px, 1fr);
    }
    .schema-box {
      border: 1px solid #c7d2fe;
      border-radius: 8px;
      background: #f8fafc;
      padding: 12px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
      line-height: 1.7;
      color: #334155;
    }
    .blueprint {
      background: var(--purple-soft);
      border: 1px solid #c4b5fd;
      border-radius: 8px;
      padding: 14px;
    }
    .blueprint-row { margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
    .chat-layout {
      display: grid;
      grid-template-columns: minmax(360px, .92fr) minmax(420px, 1.08fr);
      gap: 14px;
      min-height: 560px;
    }
    .workbench-layout {
      display: grid;
      grid-template-columns: 250px minmax(380px, 1fr) 300px;
      gap: 14px;
      min-height: 640px;
    }
    .project-list,
    .artifact-panel {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      padding: 12px;
      min-width: 0;
    }
    .project-node {
      width: 100%;
      border: 1px solid transparent;
      border-radius: 8px;
      margin-bottom: 8px;
      padding: 4px;
    }
    .project-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 6px;
      align-items: center;
    }
    .project-select {
      border: 0;
      background: transparent;
      text-align: left;
      padding: 7px 6px;
      cursor: pointer;
      color: inherit;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
      border-radius: 7px;
    }
    .project-select:hover {
      background: #f8fafc;
    }
    .project-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
    }
    .project-rename-input {
      min-width: 0;
      width: 100%;
      border: 1px solid #93c5fd;
      border-radius: 6px;
      padding: 5px 6px;
      font: inherit;
      font-size: 13px;
      outline: none;
      background: white;
    }
    .tree-caret {
      color: var(--muted);
      font-size: 11px;
      flex: 0 0 auto;
    }
    .project-actions {
      display: flex;
      gap: 4px;
    }
    .project-actions .icon-btn {
      width: 26px;
      height: 26px;
      font-size: 12px;
    }
    .project-node.active {
      border-color: #60a5fa;
      background: var(--blue-soft);
    }
    .thread-list {
      margin: 3px 0 2px 22px;
      border-left: 1px solid #dbe3ef;
      padding-left: 8px;
    }
    .thread-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 24px;
      gap: 4px;
      align-items: center;
      border-radius: 7px;
      margin-bottom: 2px;
    }
    .thread-row.active {
      background: white;
    }
    .thread-item {
      width: 100%;
      border: 0;
      border-radius: 7px;
      background: transparent;
      color: #475569;
      cursor: pointer;
      display: block;
      font: inherit;
      font-size: 12px;
      line-height: 1.35;
      padding: 6px 8px;
      text-align: left;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .thread-row .icon-btn {
      width: 22px;
      height: 22px;
      font-size: 11px;
      opacity: .55;
      border-color: transparent;
      background: transparent;
    }
    .thread-row:hover .icon-btn,
    .thread-row.active .icon-btn {
      opacity: 1;
      border-color: #dbe3ef;
      background: white;
    }
    .thread-item:hover {
      background: #f1f5f9;
      color: var(--ink);
    }
    .thread-item.active {
      background: white;
      color: #1d4ed8;
      box-shadow: inset 2px 0 0 var(--blue);
    }
    .artifact-item {
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr);
      gap: 9px;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #eef2f7;
      font-size: 13px;
    }
    .artifact-item:last-child { border-bottom: 0; }
    .artifact-item strong,
    .artifact-item span {
      display: block;
    }
    .artifact-item strong {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 500;
    }
    .artifact-item span {
      color: var(--muted);
      margin-top: 4px;
    }
    .file-icon {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      border: 1px solid #cbd5e1;
      background: white;
      font-size: 13px;
      color: #334155;
    }
    .file-image { color: #2563eb; background: var(--blue-soft); }
    .file-doc { color: #7c3aed; background: var(--purple-soft); }
    .file-link { color: #111827; background: white; }
    .split-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 340px;
      gap: 14px;
      align-items: start;
      margin-top: 14px;
    }
    .task-layout {
      display: block;
    }
    .task-stat-grid {
      margin-bottom: 14px;
    }
    .task-table .table-row {
      grid-template-columns: minmax(180px, 1.35fr) minmax(130px, .9fr) 100px 90px minmax(130px, .9fr) minmax(110px, .8fr) 80px;
    }
    .scheduled-task-table .table-row {
      grid-template-columns: minmax(150px, .95fr) minmax(180px, 1.1fr) minmax(150px, 1fr) 90px minmax(130px, .9fr) minmax(110px, .75fr) minmax(130px, .9fr) 76px;
    }
    .wizard-shell {
      margin-top: 14px;
    }
    .agent-modal-shell {
      width: min(1440px, 96vw);
      height: min(820px, 94vh);
      max-height: 94vh;
    }
    .agent-detail-modal {
      background: white;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 24px 72px rgba(15, 23, 42, .28);
      height: 100%;
      display: grid;
      grid-template-rows: auto 1fr;
    }
    .agent-detail-modal .wizard-shell {
      margin-top: 0;
      padding: 14px;
      min-height: 0;
    }
    .agent-modal-grid {
      display: grid;
      grid-template-columns: 190px minmax(520px, 1fr) 300px;
      gap: 14px;
      align-items: stretch;
      height: 100%;
      min-height: 0;
      overflow: hidden;
    }
    .agent-step-rail {
      display: grid;
      gap: 8px;
      align-content: start;
    }
    .agent-step-rail .wizard-tab {
      text-align: left;
      min-height: 58px;
    }
    .agent-step-panel {
      min-height: 0;
      height: 100%;
      overflow: auto;
    }
    .agent-blueprint-panel {
      position: sticky;
      top: 0;
      min-height: 0;
      height: 100%;
      overflow: auto;
    }
    .chat {
      background: white;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr auto;
      min-height: 560px;
    }
    .chat-toolbar {
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      background: #fbfdff;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }
    .chat-messages {
      padding: 16px;
      overflow: auto;
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    }
    .chat-bubble {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      gap: 10px;
      margin-bottom: 14px;
      align-items: start;
    }
    .chat-bubble.user { grid-template-columns: minmax(0, 1fr) 34px; }
    .avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 12px;
      font-weight: 700;
      background: #e2e8f0;
      color: #334155;
    }
    .avatar.user { background: var(--blue); color: white; }
    .message-card {
      border: 1px solid var(--line);
      background: white;
      border-radius: 12px;
      padding: 11px 13px;
      line-height: 1.65;
      font-size: 14px;
      box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    .message-list {
      margin: 8px 0 0;
      padding-left: 18px;
      color: var(--ink);
    }
    .message-list li { margin: 3px 0; }
    .rich-table {
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      overflow: hidden;
      margin-top: 10px;
      background: white;
      color: var(--ink);
    }
    .rich-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      padding: 8px 10px;
      border-bottom: 1px solid #eef2f7;
      font-size: 12px;
    }
    .rich-row:last-child { border-bottom: 0; }
    .rich-head {
      background: #f8fafc;
      color: #64748b;
      font-weight: 700;
    }
    .mini-chart {
      margin-top: 10px;
      display: grid;
      gap: 7px;
      color: var(--ink);
    }
    .bar {
      display: grid;
      grid-template-columns: 74px minmax(0, 1fr) 34px;
      gap: 8px;
      align-items: center;
      font-size: 12px;
    }
    .bar::before {
      content: "";
      grid-column: 2;
      height: 10px;
      border-radius: 999px;
      background: linear-gradient(90deg, #60a5fa var(--bar), #e2e8f0 var(--bar));
    }
    .bar span { grid-column: 1; grid-row: 1; color: #475569; }
    .bar strong { grid-column: 3; grid-row: 1; text-align: right; }
    .download-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 10px;
    }
    .download-card {
      border: 1px solid #dbe3ef;
      border-radius: 8px;
      background: #f8fafc;
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      padding: 8px;
      text-align: left;
      cursor: pointer;
      font: inherit;
      color: var(--ink);
    }
    .download-card strong,
    .download-card span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .download-card span {
      color: var(--muted);
      font-size: 12px;
      margin-top: 2px;
    }
    .chat-bubble.user .message-card {
      background: var(--blue);
      border-color: var(--blue);
      color: white;
    }
    .message-meta {
      margin-top: 6px;
      color: var(--muted);
      font-size: 12px;
    }
    .chat-bubble.user .message-meta { color: rgba(255,255,255,.75); }
    .chat-composer {
      border-top: 1px solid var(--line);
      padding: 12px;
      background: white;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: end;
    }
    .composer-input {
      min-height: 44px;
      max-height: 120px;
      resize: vertical;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      padding: 10px 11px;
      font: inherit;
      line-height: 1.5;
      outline: none;
    }
    .composer-input:focus {
      border-color: #60a5fa;
      box-shadow: 0 0 0 3px rgba(96, 165, 250, .2);
    }
    .bubble {
      max-width: 78%;
      padding: 11px 13px;
      border-radius: 12px;
      margin-bottom: 12px;
      line-height: 1.6;
      font-size: 14px;
    }
    .bubble.user { margin-left: auto; color: white; background: var(--blue); }
    .bubble.ai { background: #f1f5f9; }
    .result-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin-top: 14px;
    }
    .trace-item {
      border-left: 3px solid #cbd5e1;
      padding: 10px 10px 10px 12px;
      margin-bottom: 8px;
      background: #f8fafc;
      border-radius: 0 8px 8px 0;
      font-size: 13px;
      line-height: 1.55;
    }
    .trace-item.done { border-left-color: var(--green); }
    .trace-item.active { border-left-color: var(--blue); background: var(--blue-soft); }
    .trace-item.warn { border-left-color: var(--amber); background: var(--amber-soft); }
    .workflow-panel {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      background: white;
      min-height: 560px;
      display: grid;
      grid-template-rows: auto 1fr;
    }
    .modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: grid;
      place-items: center;
      padding: 28px;
      background: rgba(15, 23, 42, .46);
    }
    .modal-overlay.hidden { display: none; }
    .modal-shell {
      width: min(1180px, 96vw);
      max-height: 92vh;
      display: grid;
    }
    .modal-workflow-panel {
      min-height: min(720px, 86vh);
      box-shadow: 0 24px 72px rgba(15, 23, 42, .28);
    }
    .modal-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .canvas-viewport {
      position: relative;
      overflow: auto;
      background:
        linear-gradient(#eef2f7 1px, transparent 1px),
        linear-gradient(90deg, #eef2f7 1px, transparent 1px),
        #f8fafc;
      background-size: 24px 24px;
      padding: 16px;
    }
    .workflow-canvas {
      position: relative;
      width: 760px;
      height: 520px;
      margin: 0 auto;
    }
    .workflow-edge-layer {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      overflow: visible;
    }
    .workflow-edge {
      stroke: #94a3b8;
      stroke-width: 2;
      fill: none;
      marker-end: url(#workflowArrow);
    }
    .workflow-edge.active { stroke: var(--blue); }
    .workflow-edge.done { stroke: var(--green); }
    .workflow-edge.warn { stroke: var(--amber); }
    .workflow-node {
      position: absolute;
      width: 150px;
      min-height: 74px;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: white;
      padding: 10px;
      box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
      font-size: 12px;
      line-height: 1.45;
    }
    .workflow-node strong { display: block; font-size: 13px; margin-bottom: 4px; }
    .workflow-node.done { border-color: #86efac; background: var(--green-soft); }
    .workflow-node.active { border-color: #60a5fa; background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(96,165,250,.18); }
    .workflow-node.warn { border-color: #fdba74; background: var(--amber-soft); }
    .workflow-node.wait { color: #64748b; background: #f8fafc; }
    .parallel-lane {
      position: absolute;
      left: 184px;
      top: 164px;
      width: 382px;
      height: 184px;
      border: 1px dashed #94a3b8;
      border-radius: 12px;
      background: rgba(255,255,255,.55);
      pointer-events: none;
    }
    .parallel-lane-label {
      position: absolute;
      left: 198px;
      top: 150px;
      background: #f8fafc;
      color: #475569;
      font-size: 12px;
      padding: 2px 8px;
      border-radius: 999px;
      border: 1px solid #cbd5e1;
      z-index: 2;
    }
    .tech {
      margin-top: 12px;
      border-radius: 8px;
      background: #111827;
      color: #cbd5e1;
      padding: 12px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
      line-height: 1.8;
      display: none;
    }
    .tech.open { display: block; }
    .callout {
      border-left: 4px solid var(--indigo);
      background: #eef2ff;
      border-radius: 8px;
      padding: 12px 14px;
      line-height: 1.65;
      margin-top: 14px;
    }
    .timeline-note {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.7;
      margin-top: 12px;
    }
    .hidden { display: none !important; }

    @media (max-width: 1100px) {
      .layout-shell { grid-template-columns: 1fr; }
      .sidebar { position: relative; height: auto; }
      .content-grid, .chat-layout, .form-grid, .workbench-layout, .split-layout, .task-layout { grid-template-columns: 1fr; }
      .step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .cards, .cards.four, .result-grid { grid-template-columns: 1fr; }
      .topbar { flex-direction: column; }
      .controls { justify-content: flex-start; }
    }
