    /* ──────────────────────────────────────────────────────────── */
    /*  Design tokens                                               */
    /* ──────────────────────────────────────────────────────────── */
    :root {
      --bg: #070b12;
      --bg-2: #0d1220;
      --card: #111827;
      --card-2: #1a2236;
      --border: rgba(0, 229, 255, .10);
      --border-hover: rgba(0, 229, 255, .28);
      --cyan: #00e5ff;
      --cyan-dim: rgba(0, 229, 255, .12);
      --purple: #7c3aed;
      --purple-dim: rgba(124, 58, 237, .14);
      --green: #10b981;
      --green-dim: rgba(16, 185, 129, .12);
      --amber: #f59e0b;
      --red: #ef4444;
      --text: #e2e8f0;
      --text-muted: #64748b;
      --text-dim: #94a3b8;
      --font: 'Inter', sans-serif;
      --mono: 'JetBrains Mono', monospace;
      --radius: 14px;
      --sidebar-w: 220px;
      --scrollbar-size: 2.67px;
      --scrollbar-thumb: rgba(0, 229, 255, .28);
      --scrollbar-thumb-hover: rgba(0, 229, 255, .45);
      --transition: .2s cubic-bezier(.4, 0, .2, 1);
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Reset & base                                                */
    /* ──────────────────────────────────────────────────────────── */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      overflow: hidden;
    }

    /* Background grid */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image:
        linear-gradient(rgba(0, 229, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, .025) 1px, transparent 1px);
      background-size: 40px 40px;
      pointer-events: none;
      z-index: 0;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Sidebar                                                     */
    /* ──────────────────────────────────────────────────────────── */
    .sidebar {
      width: var(--sidebar-w);
      min-height: 100vh;
      background: var(--bg-2);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      padding: 0;
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      z-index: 100;
      flex-shrink: 0;
    }

    .sidebar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 18px 20px;
      border-bottom: 1px solid var(--border);
    }

    .sidebar-brand .logo-icon {
      font-size: 32px;
      line-height: 1;
      filter: drop-shadow(0 0 12px rgba(0, 229, 255, .7));
    }

    .sidebar-brand .logo-text {
      font-size: 18px;
      font-weight: 700;
      background: linear-gradient(135deg, var(--cyan), #a78bfa);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: -.2px;
    }

    .logo-img {
      width: 48px;
      height: 48px;
      object-fit: contain;
      border-radius: 6px;
    }

    .sidebar-nav {
      flex: 1;
      padding: 16px 12px 60px 12px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      overflow-y: auto;
      min-height: 0;
    }

    .nav-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      border: none;
      background: transparent;
      color: var(--text-muted);
      font-size: 13.5px;
      font-weight: 500;
      font-family: var(--font);
      cursor: pointer;
      transition: var(--transition);
      text-align: left;
      width: 100%;
    }

    .nav-btn .nav-icon {
      font-size: 16px;
      width: 20px;
      text-align: center;
    }

    .nav-btn:hover {
      background: var(--cyan-dim);
      color: var(--cyan);
    }

    .nav-btn.active {
      background: var(--cyan-dim);
      color: var(--cyan);
      border: 1px solid rgba(0, 229, 255, .2);
    }

    .sidebar-footer {
      padding: 16px;
      border-top: 1px solid var(--border);
    }

    .health-dot {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--text-muted);
    }

    .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 6px var(--green);
      animation: pulse-dot 2s infinite;
    }

    .dot.dead {
      background: var(--red);
      box-shadow: 0 0 6px var(--red);
      animation: none;
    }

    @keyframes pulse-dot {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: .4;
      }
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Main                                                        */
    /* ──────────────────────────────────────────────────────────── */
    .main {
      margin-left: var(--sidebar-w);
      flex: 1;
      height: 100vh;
      overflow-x: auto;
      overflow-y: auto;
      position: relative;
      z-index: 1;
    }

    .topbar {
      position: sticky;
      top: 0;
      background: rgba(7, 11, 18, .8);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
      padding: 14px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 50;
    }

    .topbar-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .server-time {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--text-muted);
    }

    .refresh-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 7px 14px;
      border-radius: 8px;
      border: 1px solid var(--border-hover);
      background: var(--cyan-dim);
      color: var(--cyan);
      font-size: 12px;
      font-weight: 600;
      font-family: var(--font);
      cursor: pointer;
      transition: var(--transition);
    }

    .refresh-btn:hover {
      background: rgba(0, 229, 255, .22);
    }

    .refresh-btn.spinning .icon {
      display: inline-block;
      animation: spin .6s linear infinite;
    }

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

    .content {
      padding: 28px;
      padding-bottom: 120px;
      display: flex;
      flex-direction: column;
      gap: 28px;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Views                                                       */
    /* ──────────────────────────────────────────────────────────── */
    .view {
      display: none;
    }

    .view.active {
      display: contents;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Stats hero bar                                              */
    /* ──────────────────────────────────────────────────────────── */
    .stats-bar {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }

    .stat-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px 22px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
    }

    .stat-card.cyan::before {
      background: linear-gradient(90deg, var(--cyan), transparent);
    }

    .stat-card.green::before {
      background: linear-gradient(90deg, var(--green), transparent);
    }

    .stat-card.purple::before {
      background: linear-gradient(90deg, var(--purple), transparent);
    }

    .stat-card.amber::before {
      background: linear-gradient(90deg, var(--amber), transparent);
    }

    .usage-badge {
      transition: all 0.3s ease;
      cursor: pointer;
      user-select: none;
    }

    .usage-badge:hover {
      border-color: var(--cyan);
      box-shadow: 0 0 10px var(--cyan-dim);
    }

    .agent-usage-card {
      transition: transform 0.2s ease, border-color 0.2s ease;
    }

    .agent-usage-card:hover {
      transform: translateY(-2px);
      border-color: var(--cyan) !important;
    }

    .stat-card:hover {
      border-color: var(--border-hover);
      transform: translateY(-2px);
    }

    .stat-label {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .stat-value {
      font-size: 32px;
      font-weight: 700;
      line-height: 1;
    }

    .stat-value.cyan {
      color: var(--cyan);
      text-shadow: 0 0 20px rgba(0, 229, 255, .4);
    }

    .stat-value.green {
      color: var(--green);
      text-shadow: 0 0 20px rgba(16, 185, 129, .4);
    }

    .stat-value.purple {
      color: var(--purple);
      text-shadow: 0 0 20px rgba(124, 58, 237, .4);
    }

    .stat-value.amber {
      color: var(--amber);
      text-shadow: 0 0 20px rgba(245, 158, 11, .4);
    }

    .stat-sub {
      font-size: 12px;
      color: var(--text-muted);
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Section header                                              */
    /* ──────────────────────────────────────────────────────────── */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .section-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .section-title .icon {
      font-size: 16px;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Milestone cards                                             */
    /* ──────────────────────────────────────────────────────────── */
    .milestones-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
    }

    .milestone-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px;
      transition: var(--transition);
      cursor: default;
    }

    .milestone-card:hover {
      border-color: var(--border-hover);
      background: var(--card-2);
      box-shadow: 0 8px 32px rgba(0, 229, 255, .06);
    }

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

    .milestone-name {
      font-size: 13.5px;
      font-weight: 600;
      color: var(--text);
      line-height: 1.4;
    }

    .status-badge {
      font-size: 11px;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 20px;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .status-badge.completed {
      background: var(--green-dim);
      color: var(--green);
      border: 1px solid rgba(16, 185, 129, .25);
    }

    .status-badge.in-progress {
      background: var(--cyan-dim);
      color: var(--cyan);
      border: 1px solid rgba(0, 229, 255, .25);
    }

    .status-badge.pending {
      background: rgba(100, 116, 139, .1);
      color: var(--text-muted);
      border: 1px solid rgba(100, 116, 139, .2);
    }

    .progress-wrap {
      margin-bottom: 16px;
    }

    .progress-meta {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 6px;
    }

    .progress-bar-bg {
      height: 5px;
      background: rgba(255, 255, 255, .06);
      border-radius: 99px;
      overflow: hidden;
    }

    .progress-bar-fill {
      height: 100%;
      border-radius: 99px;
      background: linear-gradient(90deg, var(--cyan), var(--purple));
      box-shadow: 0 0 10px rgba(0, 229, 255, .5);
      transition: width .8s cubic-bezier(.4, 0, .2, 1);
    }

    .progress-bar-fill.full {
      background: linear-gradient(90deg, var(--green), #34d399);
      box-shadow: 0 0 10px rgba(16, 185, 129, .5);
    }

    .task-list {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .task-item {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      font-size: 12.5px;
      color: var(--text-dim);
      line-height: 1.4;
      padding: 2px 0;
    }

    .task-item.done {
      color: var(--text-muted);
    }

    .task-check {
      flex-shrink: 0;
      width: 16px;
      height: 16px;
      border-radius: 4px;
      border: 1.5px solid var(--border-hover);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 1px;
    }

    .task-check.done {
      background: var(--green);
      border-color: var(--green);
    }

    .task-check.done::after {
      content: '✓';
      font-size: 9px;
      color: #000;
      font-weight: 700;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Memory / Soul / Heartbeat views — markdown viewer           */
    /* ──────────────────────────────────────────────────────────── */
    .md-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 28px;
    }

    .md-content {
      font-family: var(--mono);
      font-size: 13px;
      line-height: 1.75;
      color: var(--text-dim);
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 68vh;
      overflow-y: auto;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Vault view                                                  */
    /* ──────────────────────────────────────────────────────────── */
    .vault-hero {
      background: linear-gradient(135deg, rgba(8, 145, 178, 0.1), rgba(7, 11, 18, 1));
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 30px;
      margin-bottom: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .vault-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 16px;
    }

    .vault-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      transition: var(--transition);
    }

    .vault-card:hover {
      border-color: var(--cyan);
    }

    .vault-key {
      font-family: var(--mono);
      font-size: 13px;
      color: var(--text);
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;
    }

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

    .vault-btn {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text-muted);
      padding: 6px;
      border-radius: 6px;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .vault-btn:hover {
      border-color: var(--red);
      color: var(--red);
      background: rgba(239, 68, 68, 0.1);
    }

    .vault-btn.edit:hover {
      border-color: var(--cyan);
      color: var(--cyan);
      background: var(--cyan-dim);
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Skills view                                                 */
    /* ──────────────────────────────────────────────────────────── */
    .skills-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 16px;
    }

    .skill-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .skill-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--purple), transparent);
    }

    .skill-card:hover {
      border-color: rgba(124, 58, 237, .35);
      box-shadow: 0 8px 32px rgba(124, 58, 237, .1);
    }

    .skill-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .skill-name .tag {
      font-size: 10px;
      padding: 2px 7px;
      border-radius: 4px;
      background: var(--purple-dim);
      color: #a78bfa;
      border: 1px solid rgba(124, 58, 237, .25);
      font-weight: 600;
    }

    .skill-preview {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--text-muted);
      line-height: 1.6;
      max-height: 100px;
      overflow: hidden;
      position: relative;
    }

    .skill-preview::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 30px;
      background: linear-gradient(transparent, var(--card));
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Heartbeat view                                              */
    /* ──────────────────────────────────────────────────────────── */
    .heartbeat-header {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 20px 24px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      margin-bottom: 16px;
    }

    .pulse-icon {
      font-size: 32px;
      animation: heartbeat-pulse 1.5s cubic-bezier(.4, 0, .2, 1) infinite;
    }

    @keyframes heartbeat-pulse {

      0%,
      100% {
        transform: scale(1);
      }

      14% {
        transform: scale(1.2);
      }

      28% {
        transform: scale(1);
      }

      42% {
        transform: scale(1.15);
      }

      56% {
        transform: scale(1);
      }
    }

    .pulse-info h3 {
      font-size: 15px;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .pulse-info p {
      font-size: 12px;
      color: var(--text-muted);
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Loading skeleton                                            */
    /* ──────────────────────────────────────────────────────────── */
    .skeleton {
      background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 8px;
    }

    @keyframes shimmer {
      0% {
        background-position: 200% 0;
      }

      100% {
        background-position: -200% 0;
      }
    }

    .skel-bar {
      height: 16px;
      margin: 8px 0;
    }

    .skel-tall {
      height: 120px;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Toast                                                       */
    /* ──────────────────────────────────────────────────────────── */
    .toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 999;
    }

    .toast {
      background: var(--card-2);
      border: 1px solid var(--border-hover);
      border-radius: 10px;
      padding: 12px 16px;
      font-size: 13px;
      color: var(--text);
      box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
      display: flex;
      align-items: center;
      gap: 8px;
      animation: toast-in .3s cubic-bezier(.4, 0, .2, 1);
    }

    @keyframes toast-in {
      from {
        transform: translateY(12px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .toast.out {
      animation: toast-out .3s forwards;
    }

    @keyframes toast-out {
      to {
        transform: translateY(12px);
        opacity: 0;
      }
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Scrollbar                                                   */
    /* ──────────────────────────────────────────────────────────── */
    * {
      scrollbar-color: var(--scrollbar-thumb) transparent;
      scrollbar-width: thin;
    }

    ::-webkit-scrollbar {
      width: var(--scrollbar-size);
      height: var(--scrollbar-size);
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: var(--scrollbar-thumb);
      border-radius: 99px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--scrollbar-thumb-hover);
    }

    ::-webkit-scrollbar-corner {
      background: transparent;
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Responsive                                                  */
    /* ──────────────────────────────────────────────────────────── */
    /* ──────────────────────────────────────────────────────────── */
    /*  Project Workspaces                                          */
    /* ──────────────────────────────────────────────────────────── */
    .projects-header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }

    .create-btn {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 9px 18px;
      border-radius: 9px;
      border: 1px solid rgba(16, 185, 129, .3);
      background: var(--green-dim);
      color: var(--green);
      font-size: 13px;
      font-weight: 600;
      font-family: var(--font);
      cursor: pointer;
      transition: var(--transition);
    }

    .create-btn:hover {
      background: rgba(16, 185, 129, .22);
      border-color: var(--green);
    }

    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 16px;
    }

    .project-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px;
      transition: var(--transition);
      position: relative;
      overflow: hidden;
      cursor: default;
    }

    .project-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--cyan), var(--purple));
    }

    .project-card.is-active::before {
      background: linear-gradient(90deg, var(--green), #34d399);
    }

    .project-card:hover {
      border-color: var(--border-hover);
      box-shadow: 0 8px 32px rgba(0, 229, 255, .06);
    }

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

    .project-card-name {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
    }

    .project-card-desc {
      font-size: 12.5px;
      color: var(--text-muted);
      margin-bottom: 14px;
      line-height: 1.5;
    }

    .project-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 16px;
    }

    .meta-tag {
      font-size: 10.5px;
      padding: 3px 9px;
      border-radius: 5px;
      background: var(--bg-2);
      color: var(--text-muted);
      border: 1px solid var(--border);
      font-family: var(--mono);
    }

    .meta-tag.network {
      color: var(--purple);
      border-color: rgba(124, 58, 237, .2);
      background: var(--purple-dim);
    }

    .meta-tag.active-tag {
      color: var(--green);
      border-color: rgba(16, 185, 129, .2);
      background: var(--green-dim);
    }

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

    .proj-btn {
      flex: 1;
      padding: 7px 0;
      border-radius: 7px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 600;
      font-family: var(--font);
      cursor: pointer;
      transition: var(--transition);
    }

    .proj-btn:hover {
      border-color: var(--cyan);
      color: var(--cyan);
      background: var(--cyan-dim);
    }

    .proj-btn.activate {
      color: var(--green);
      border-color: rgba(16, 185, 129, .25);
    }

    .proj-btn.activate:hover {
      background: var(--green-dim);
      border-color: var(--green);
    }

    .proj-btn.danger:hover {
      border-color: var(--red);
      color: var(--red);
      background: rgba(239, 68, 68, .1);
    }

    /* ─── Create project modal ─── */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .7);
      backdrop-filter: blur(6px);
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity .2s;
    }

    .modal-overlay.open {
      opacity: 1;
      pointer-events: all;
    }

    .modal {
      background: var(--card);
      border: 1px solid var(--border-hover);
      border-radius: 18px;
      padding: 32px;
      width: 480px;
      max-width: 95vw;
      box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
      transform: scale(.96);
      transition: transform .2s;
    }

    .modal-overlay.open .modal {
      transform: scale(1);
    }

    .modal-title {
      font-size: 17px;
      font-weight: 700;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .field {
      margin-bottom: 16px;
    }

    .field label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .5px;
      margin-bottom: 7px;
    }

    .field input,
    .field textarea,
    .field select {
      width: 100%;
      background: var(--bg-2);
      border: 1px solid var(--border-hover);
      border-radius: 9px;
      padding: 11px 14px;
      color: var(--text);
      font-size: 14px;
      font-family: var(--font);
      outline: none;
      transition: var(--transition);
      resize: vertical;
    }

    .field input:focus,
    .field textarea:focus,
    .field select:focus {
      border-color: var(--cyan);
      box-shadow: 0 0 0 3px rgba(0, 229, 255, .1);
    }

    .create-agent-modal {
      width: min(1380px, 97vw);
      max-width: 97vw;
      padding: 20px;
    }

    .create-agent-layout {
      display: grid;
      grid-template-columns: minmax(560px, 1.15fr) minmax(420px, 1fr);
      gap: 16px;
      align-items: stretch;
    }

    .create-agent-left,
    .create-agent-right {
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgba(6, 12, 24, 0.82);
      padding: 14px;
      min-height: 560px;
    }

    .create-agent-hierarchy-image {
      border: 1px solid var(--border);
      border-radius: 10px;
      background: radial-gradient(circle at 22% 16%, rgba(0, 229, 255, 0.08), rgba(18, 28, 48, 0.64));
      padding: 10px;
      min-height: 500px;
      max-height: 75vh;
      overflow: auto;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .create-agent-tier-title {
      font-size: 11px;
      font-weight: 700;
      color: var(--cyan);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-bottom: 6px;
    }

    .create-agent-tier-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 10px;
      margin-bottom: 4px;
    }

    .create-agent-tier-card {
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(13, 17, 23, 0.82);
      padding: 11px;
      cursor: pointer;
      transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    }

    .create-agent-tier-card:hover {
      border-color: var(--cyan);
      box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.1);
      transform: translateY(-1px);
    }

    .create-agent-tier-card.selected {
      border-color: var(--cyan);
      box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.22);
      background: rgba(0, 229, 255, 0.08);
    }

    .create-agent-tier-card.disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }

    .create-agent-tier-card.disabled:hover {
      border-color: var(--border);
      box-shadow: none;
      transform: none;
    }

    .create-agent-tier-name {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-main);
      margin-bottom: 6px;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      line-height: 1.3;
      word-break: break-word;
    }

    .create-agent-tier-meta {
      font-size: 12px;
      color: var(--text-dim);
      margin-bottom: 4px;
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      line-height: 1.32;
      word-break: break-word;
    }

    .create-agent-tier-model {
      font-size: 12px;
      color: var(--text-muted);
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      line-height: 1.32;
      word-break: break-word;
    }

    .modal-actions {
      display: flex;
      gap: 10px;
      margin-top: 24px;
    }

    .modal-btn {
      flex: 1;
      padding: 11px;
      border-radius: 9px;
      font-size: 14px;
      font-weight: 600;
      font-family: var(--font);
      cursor: pointer;
      transition: var(--transition);
      border: none;
    }

    .modal-btn.primary {
      background: var(--cyan);
      color: #000;
    }

    .modal-btn.primary:hover {
      background: #33ecff;
    }

    .modal-btn.cancel {
      background: var(--bg-2);
      color: var(--text-muted);
      border: 1px solid var(--border);
    }

    .modal-btn.cancel:hover {
      color: var(--text);
      border-color: var(--border-hover);
    }

    /* ──────────────────────────────────────────────────────────── */
    /*  Responsive                                                  */
    /* ──────────────────────────────────────────────────────────── */
    @media (max-width: 900px) {
      .create-agent-layout {
        grid-template-columns: 1fr;
      }

      .create-agent-left,
      .create-agent-right {
        min-height: 0;
      }

      .create-agent-hierarchy-image {
        min-height: 260px;
        max-height: 38vh;
      }

      .stats-bar {
        grid-template-columns: repeat(2, 1fr);
      }

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

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

    @media (max-width: 600px) {
      :root {
        --sidebar-w: 60px;
      }

      .nav-btn span.label {
        display: none;
      }

      .sidebar-brand .logo-text {
        display: none;
      }

      .stats-bar {
        grid-template-columns: 1fr 1fr;
      }
    }
    /* Onboarding Overlay */
    #onboarding-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(10, 10, 14, 0.95);
      backdrop-filter: blur(20px);
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-base);
    }
    .onboarding-card {
      background: var(--bg-1);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 40px;
      width: 500px;
      max-width: 90vw;
      box-shadow: 0 20px 40px rgba(0,0,0,0.5);
      position: relative;
    }
    .onboarding-step { display: none; }
    .onboarding-step.active { display: block; animation: fadeIn 0.3s ease; }
    .onboarding-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
    .onboarding-desc { color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
    .onboarding-options { display: grid; gap: 12px; margin-bottom: 24px; }
    .ob-option {
      background: var(--bg-2);
      border: 1px solid var(--border-subtle);
      padding: 16px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .ob-option:hover { border-color: var(--brand); background: rgba(0,229,255,0.05); }
    .ob-option.selected { border-color: var(--brand); background: rgba(0,229,255,0.1); }
    .ob-option-title { font-weight: 600; margin-bottom: 4px; display: block; }
    .ob-option-desc { font-size: 13px; color: var(--text-muted); }
    .ob-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
    .ob-btn {
      padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; border: none;
    }
    .ob-btn.primary { background: var(--brand); color: #fff; }
    .ob-btn.secondary { background: var(--bg-2); color: var(--text-base); border: 1px solid var(--border-subtle); }

    /* ──────────────────────────────────────────────────────────── */
    /*  Task Board filter buttons                                   */
    /* ──────────────────────────────────────────────────────────── */
    .tb-filter-btn {
      padding: 6px 14px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 600;
      font-family: var(--font);
      cursor: pointer;
      transition: all 0.2s;
    }
    .tb-filter-btn:hover {
      border-color: var(--cyan);
      color: var(--cyan);
      background: rgba(0, 229, 255, 0.06);
    }
    .tb-filter-btn.active {
      border-color: var(--cyan);
      color: #000;
      background: var(--cyan);
    }
    .modal-content {
      background: var(--card);
      border: 1px solid var(--border-hover);
      border-radius: 18px;
      padding: 32px;
      max-width: 95vw;
      box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
    }
    .modal-btn.outline {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text-muted);
    }
    .modal-btn.outline:hover {
      border-color: var(--cyan);
      color: var(--cyan);
    }
