    /* =============================================
       CSS Variables / Theme
       ============================================= */
    :root {
      /* Backgrounds — warm obsidian */
      --bg-primary: #0a0a0b;
      --bg-secondary: rgba(15, 17, 28, 0.85);
      --bg-tertiary: rgba(22, 25, 42, 0.75);
      --bg-card: rgba(19, 19, 22, 0.85);
      --bg-card-hover: rgba(28, 32, 55, 0.7);
      --bg-input: rgba(10, 12, 22, 0.8);

      /* Glass surfaces */
      --glass-bg: rgba(16, 18, 32, 0.55);
      --glass-border: rgba(255, 245, 225, 0.07);
      --glass-blur: 20px;
      --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);

      /* Borders — warm luminous edges */
      --border-color: rgba(255, 245, 225, 0.07);
      --border-light: rgba(255, 245, 225, 0.14);
      --border-glow: rgba(212, 165, 116, 0.4);

      /* Text — higher contrast hierarchy */
      --text-primary: #f8f7f2;
      --text-secondary: #a8a39a;
      --text-muted: #5a564f;

      /* Warm accent — brass/copper */
      --accent: #d4a574;
      --accent-light: #e6c89a;
      --accent-dim: rgba(212, 165, 116, 0.14);
      --teal: #7dd3c0;

      /* Legacy accent colors preserved for existing components */
      --indigo: #d4a574;
      --indigo-dark: #c4955f;
      --indigo-light: #e6c89a;
      --emerald: #a3e635;
      --emerald-dark: #059669;
      --amber: #fbbf24;
      --amber-dark: #d97706;
      --rose: #f43f5e;
      --rose-dark: #e11d48;
      --purple: #ef4444;
      --cyan: #7dd3c0;
      --green: #a3e635;
      --red: #f87171;

      /* Enhanced shadows with warm bleed */
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 0 1px rgba(212,165,116,0.05);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.5), 0 0 4px rgba(212,165,116,0.08);
      --shadow-lg: 0 8px 32px rgba(0,0,0,0.6), 0 0 8px rgba(212,165,116,0.1);
      --shadow-glow: 0 0 20px rgba(212, 165, 116, 0.15);

      /* Radii — slightly larger for smoother feel */
      --radius-sm: 8px;
      --radius-md: 14px;
      --radius-lg: 20px;

      /* Font stacks */
      --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
      --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
      --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

      --transition-fast: 150ms ease;
      --transition-normal: 280ms cubic-bezier(0.4, 0, 0.2, 1);
      --transition-slow: 450ms cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    body {
      font-family: var(--font-body);
      background: var(--bg-primary);
      background-image:
        radial-gradient(ellipse 1200px 800px at 50% -10%, rgba(212,165,116,0.06), transparent 60%),
        radial-gradient(ellipse 900px 700px at 80% 100%, rgba(125,211,192,0.04), transparent 60%);
      background-attachment: fixed;
      color: var(--text-primary);
      line-height: 1.6;
      overflow-x: hidden;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      font-feature-settings: "ss01", "cv11";
      font-variant-numeric: tabular-nums;
    }

    a { color: var(--indigo-light); text-decoration: none; }
    a:hover { text-decoration: underline; }

    button {
      cursor: pointer;
      border: none;
      font-family: inherit;
      font-size: 0.875rem;
      transition: all var(--transition-fast);
    }

    input, textarea, select {
      font-family: inherit;
      font-size: 0.875rem;
      background: var(--bg-input);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-sm);
      padding: 0.5rem 0.75rem;
      transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
      outline: none;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    input:focus, textarea:focus, select:focus {
      border-color: var(--indigo);
      box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
    }

    /* =============================================
       Scrollbar
       ============================================= */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.25); }

    /* =============================================
       Top Bar
       ============================================= */
    .topbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.35rem 1rem;
      background: rgba(8,9,13,0.92);
      border-bottom: 1px solid var(--border-color);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      box-shadow: 0 1px 0 rgba(255,245,225,0.03);
    }
    /* Spacer below fixed topbar — all views need top margin */
    .view {
      margin-top: var(--topbar-h, 42px);
    }

    .topbar-brand {
      font-family: var(--font-display);
      font-size: 1rem;
      font-weight: 500;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      position: relative;
      gap: 0.5rem;
      white-space: nowrap;
      letter-spacing: -0.02em;
      font-variation-settings: "opsz" 144, "SOFT" 30;
    }

    .topbar-brand svg {
      width: 18px; height: 18px;
      fill: var(--accent);
      filter: drop-shadow(0 0 6px rgba(212,165,116,0.4));
    }

    .topbar-yellow-dot {
      position: absolute;
      top: -4px;
      right: -4px;
      width: 10px;
      height: 10px;
      background: #fbbf24;
      border-radius: 50%;
      border: 2px solid var(--bg-primary);
      box-shadow: 0 0 8px rgba(251, 191, 36, 0.6), 0 0 12px rgba(251, 191, 36, 0.3);
    }

    .topbar-search {
      flex: 1;
      max-width: 400px;
      position: relative;
    }

    .topbar-search input {
      width: 100%;
      padding: 0.5rem 0.75rem 0.5rem 2.25rem;
      border-radius: 10px;
      background: rgba(10, 12, 22, 0.6);
      border: 1px solid var(--glass-border);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .topbar-search svg {
      position: absolute;
      left: 0.65rem;
      top: 50%;
      transform: translateY(-50%);
      width: 16px; height: 16px;
      fill: var(--text-muted);
      pointer-events: none;
    }

    .topbar-actions {
      margin-left: auto;
      display: flex;
      gap: 0.75rem;
      align-items: center;
    }

    .notif-bell {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 34px; height: 34px;
      border-radius: 50%;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      color: var(--text-muted);
      cursor: pointer;
      transition: all var(--transition-fast);
      flex-shrink: 0;
      position: relative;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    .notif-bell:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); border-color: var(--border-light); }
    .notif-bell.active { color: var(--amber); border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 0 12px rgba(245,158,11,0.2); }
    .notif-bell.active::after {
      content: '';
      position: absolute;
      top: 4px; right: 4px;
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--emerald);
      border: 2px solid #08090d;
      box-shadow: 0 0 6px var(--emerald);
    }
    @keyframes bellRing {
      0%, 100% { transform: rotate(0); }
      15% { transform: rotate(14deg); }
      30% { transform: rotate(-14deg); }
      45% { transform: rotate(8deg); }
      60% { transform: rotate(-8deg); }
      75% { transform: rotate(3deg); }
    }
    .notif-bell.active svg { animation: bellRing 1s ease 1; }
    @media (max-width: 480px) { .notif-bell { width: 30px; height: 30px; } }
    .desk-notif-dropdown{position:absolute;top:calc(100% + 8px);right:0;width:380px;max-height:480px;background:var(--glass-bg);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid var(--glass-border);border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,0.5);z-index:1000;display:none;overflow:hidden;}
    .desk-notif-dropdown.open{display:block;animation:fadeSlideIn 200ms ease;}
    @keyframes fadeSlideIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
    .desk-notif-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 10px;border-bottom:1px solid var(--glass-border);}
    .desk-notif-head h4{font-size:0.85rem;font-weight:600;color:var(--text-primary);margin:0;}
    .desk-notif-head .desk-notif-status{font-size:0.6rem;padding:3px 8px;border-radius:6px;font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}
    .desk-notif-head .desk-notif-status.on{color:var(--emerald);background:rgba(52,211,153,0.1);}
    .desk-notif-head .desk-notif-status.off{color:var(--text-muted);background:rgba(255,255,255,0.05);}
    .desk-notif-list{overflow-y:auto;max-height:400px;padding:8px;}
    .desk-notif-item{padding:10px 12px;border-radius:8px;cursor:pointer;transition:background 0.15s;border-bottom:1px solid rgba(255,255,255,0.03);}
    .desk-notif-item:hover{background:rgba(255,255,255,0.04);}
    .desk-notif-item.expanded .desk-notif-body{display:block;}
    .desk-notif-item-head{display:flex;align-items:center;gap:8px;}
    .desk-notif-item-icon{font-size:0.85rem;flex-shrink:0;}
    .desk-notif-item-title{font-size:0.75rem;font-weight:500;color:var(--text-primary);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    .desk-notif-item-badge{font-size:0.55rem;padding:2px 6px;border-radius:4px;background:rgba(255,255,255,0.06);color:var(--text-muted);}
    .desk-notif-item-time{font-size:0.6rem;color:var(--text-muted);flex-shrink:0;}
    .desk-notif-body{display:none;font-size:0.7rem;color:var(--text-secondary);padding:6px 0 2px 26px;line-height:1.5;}
    .desk-notif-empty{text-align:center;padding:30px;color:var(--text-muted);font-size:0.75rem;}
    .desk-notif-overlay{position:fixed;inset:0;z-index:999;display:none;}
    .desk-notif-overlay.open{display:block;}

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.5rem 1rem;
      border-radius: var(--radius-sm);
      font-weight: 500;
      transition: all var(--transition-fast);
    }

    .btn svg { width: 16px; height: 16px; fill: currentColor; }

    .btn-primary {
      background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
      color: white;
      border: 1px solid rgba(255,255,255,0.1);
    }
    .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 16px rgba(124,58,237,0.4), var(--shadow-glow);
    }

    .btn-new-project-modern {
      display: inline-flex;
      align-items: center;
      gap: 0;
      padding: 0.3rem 0.7rem;
      font-size: 0.72rem;
      font-weight: 600;
      border-radius: 20px;
      background: rgba(99, 102, 241, 0.12);
      color: var(--indigo, #f87171);
      border: 1px solid rgba(99, 102, 241, 0.25);
      letter-spacing: 0.02em;
      text-transform: uppercase;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    .btn-new-project-modern:hover {
      background: rgba(99, 102, 241, 0.22);
      border-color: rgba(99, 102, 241, 0.4);
      transform: none;
    }

    .btn-secondary {
      background: var(--glass-bg);
      color: var(--text-secondary);
      border: 1px solid var(--glass-border);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    .btn-secondary:hover {
      background: var(--bg-card-hover);
      color: var(--text-primary);
      border-color: var(--border-glow);
    }

    .btn-danger {
      background: linear-gradient(135deg, var(--rose), var(--rose-dark));
      color: white;
      border: 1px solid rgba(255,255,255,0.1);
    }
    .btn-danger:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 16px rgba(244,63,94,0.4);
    }

    .btn-ghost {
      background: transparent;
      color: var(--text-secondary);
      padding: 0.4rem;
      border-radius: var(--radius-sm);
    }
    .btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

    .btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }

    /* =============================================
       Views / Page Transitions
       ============================================= */
    .view {
      display: none;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity var(--transition-normal), transform var(--transition-normal);
    }

    .view.active {
      display: block;
    }

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

    /* =============================================
       Homescreen — Project Grid
       ============================================= */
    .home-container {
      padding: 1.5rem 2rem;
      max-width: 1600px;
      margin: 0 auto;
    }

    .section-title {
      font-family: var(--font-body);
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--text-muted);
      margin-bottom: 0.75rem;
    }

    .project-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 0.6rem;
    }

    .hidden-projects-toggle {
      display: flex; align-items: center; gap: 0.4rem;
      padding: 0.35rem 0.5rem; cursor: pointer; border-radius: var(--radius-sm);
      font-size: 0.72rem; color: var(--text-muted); transition: background 0.15s;
      user-select: none;
    }
    .hidden-projects-toggle:hover { background: var(--glass-bg); color: var(--text-secondary); }
    .hidden-projects-grid .project-tile { opacity: 0.6; }
    .hidden-projects-grid .project-tile:hover { opacity: 1; }

    .hub-settings-row {
      display: flex; align-items: center; gap: 0.6rem;
      padding: 0.45rem 0.6rem; border-radius: var(--radius-sm);
      background: var(--glass-bg); border: 1px solid var(--glass-border);
    }
    .hub-settings-row:hover { border-color: var(--indigo); }
    .hub-settings-row .project-dot {
      width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    }
    .hub-settings-row .project-label { flex: 1; font-size: 0.78rem; color: var(--text-primary); }
    .hub-settings-row .project-path { font-size: 0.65rem; color: var(--text-muted); }
    .hub-settings-toggle {
      position: relative; width: 36px; height: 20px; border-radius: 10px;
      background: var(--bg-tertiary); border: 1px solid var(--border-color);
      cursor: pointer; transition: background 0.2s; flex-shrink: 0;
    }
    .hub-settings-toggle::after {
      content: ''; position: absolute; top: 2px; left: 2px;
      width: 14px; height: 14px; border-radius: 50%;
      background: var(--text-muted); transition: all 0.2s;
    }
    .hub-settings-toggle.active { background: var(--indigo); border-color: var(--indigo); }
    .hub-settings-toggle.active::after { left: 18px; background: #fff; }

    .project-tile {
      position: relative;
      background: linear-gradient(160deg, rgba(19,19,22,0.9), rgba(14,14,16,0.85));
      border: 1px solid var(--border-color);
      border-radius: 14px;
      padding: 0.75rem 0.85rem 0.75rem 1rem;
      cursor: pointer;
      transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
      overflow: hidden;
      animation: fadeSlideIn 0.3s ease both;
    }

    .project-tile::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: var(--tile-color, var(--accent));
      border-radius: 14px 0 0 14px;
    }

    .project-tile:hover {
      transform: translateY(-2px);
      border-color: var(--border-light);
      box-shadow: 0 12px 40px -12px rgba(0,0,0,0.4);
    }

    @keyframes fadeSlideIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .project-tile:nth-child(1) { animation-delay: 0s; }
    .project-tile:nth-child(2) { animation-delay: 0.05s; }
    .project-tile:nth-child(3) { animation-delay: 0.05s; }
    .project-tile:nth-child(4) { animation-delay: 0.1s; }
    .project-tile:nth-child(5) { animation-delay: 0.15s; }
    .project-tile:nth-child(6) { animation-delay: 0.2s; }
    .project-tile:nth-child(7) { animation-delay: 0.25s; }
    .project-tile:nth-child(8) { animation-delay: 0.3s; }
    .project-tile:nth-child(9) { animation-delay: 0.35s; }

    .tile-preview {
      display: none;
    }

    .tile-header {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      margin-bottom: 0.3rem;
    }

    .tile-icon-wrap {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      border-radius: 10px;
      overflow: hidden;
      background: color-mix(in srgb, var(--tile-color, var(--indigo)) 15%, transparent);
      box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .project-tile:hover .tile-icon-wrap {
      transform: scale(1.08);
      box-shadow: 0 4px 14px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
    }
    .tile-icon-wrap svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .tile-name {
      font-family: var(--font-body);
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text-primary);
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      letter-spacing: -0.01em;
    }

    .tile-icons {
      display: flex;
      gap: 0.15rem;
      flex-shrink: 0;
      margin-left: auto;
    }

    .tile-icon {
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      background: transparent;
      color: var(--text-muted);
      transition: all var(--transition-fast);
      padding: 0;
      border: none;
      cursor: pointer;
    }

    .tile-icon:hover {
      background: rgba(255,255,255,0.08);
    }

    .tile-icon svg { width: 11px; height: 11px; fill: currentColor; }
    .tile-icon.active-lock { color: var(--rose); }
    .project-tile.is-locked { opacity: 0.55; pointer-events: auto; }
    .project-tile.is-locked::after { content: ''; }
    .project-tile.is-locked .tile-icon:not(.active-lock) { display: none; }
    .tile-icon.active-pin { color: var(--amber); }
    .tile-icon.active-session { color: var(--emerald); }

    .tile-desc {
      font-family: var(--font-body);
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-bottom: 0.25rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .tile-meta {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-family: var(--font-mono);
      font-size: 0.62rem;
      color: var(--text-muted);
    }

    .tile-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.15rem;
      font-size: 0.65rem;
    }

    .tile-badge svg { width: 9px; height: 9px; fill: currentColor; }

    /* Roadmap Progress in Project Tile */
    .tile-roadmap-progress {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-top: 0.4rem;
      padding-top: 0.4rem;
      border-top: 1px solid rgba(139,92,246,0.1);
    }

    .tile-roadmap-bar-container {
      flex: 1;
      height: 4px;
      background: rgba(255,255,255,0.06);
      border-radius: 2px;
      overflow: hidden;
      position: relative;
    }

    .tile-roadmap-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #ef4444 0%, #dc2626 50%, #3b82f6 100%);
      border-radius: 2px;
      transition: width 0.3s ease;
      box-shadow: 0 0 8px rgba(139,92,246,0.4);
    }

    .tile-roadmap-pct {
      font-size: 0.65rem;
      color: var(--text-muted);
      font-weight: 500;
      min-width: 28px;
      text-align: right;
    }

    .tile-roadmap-phases {
      display: flex;
      gap: 2px;
      align-items: center;
      margin-left: 0.3rem;
    }

    .tile-roadmap-phase {
      width: 3px;
      height: 8px;
      border-radius: 1px;
      background: rgba(139,92,246,0.2);
      transition: all 0.2s;
    }

    .tile-roadmap-phase.completed {
      background: rgba(16,185,129,0.6);
      height: 10px;
    }

    .tile-roadmap-phase.in-progress {
      background: rgba(245,158,11,0.8);
      height: 10px;
      box-shadow: 0 0 4px rgba(245,158,11,0.5);
    }

    .tile-roadmap-phases:hover .tile-roadmap-phase {
      height: 12px;
    }

    .roadmap-phase-tasks {
      max-height: 2000px;
      overflow: hidden;
      transition: max-height 0.3s ease;
    }
    .roadmap-phase-tasks.collapsed {
      max-height: 0;
      border-top: none !important;
    }

    /* Session dot */
    .session-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--emerald);
      box-shadow: 0 0 8px var(--emerald), 0 0 16px rgba(16,185,129,0.3);
      animation: pulse-dot 2s ease-in-out infinite;
    }
    .session-dot.detached {
      background: var(--amber);
      box-shadow: 0 0 6px var(--amber);
      animation: none;
    }
    .session-dot.idle {
      background: var(--text-muted);
      box-shadow: none;
      animation: none;
    }

    @keyframes pulse-dot {
      0%, 100% { box-shadow: 0 0 4px var(--emerald); }
      50% { box-shadow: 0 0 10px var(--emerald); }
    }

    /* =============================================
       Staging & Deploy Badges
       ============================================= */
    .staging-badge { background: var(--amber); color: #000; font-size: 0.65rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; margin-left: 6px; vertical-align: middle; box-shadow: 0 0 8px rgba(245,158,11,0.3); }
    .production-badge { background: var(--emerald); color: #000; font-size: 0.65rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; margin-left: 6px; vertical-align: middle; box-shadow: 0 0 8px rgba(16,185,129,0.3); }
    .staging-bar, .production-bar { padding: 8px 16px; border-radius: var(--radius-md); margin-bottom: 12px; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .staging-bar { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); border-left: 3px solid var(--amber); }
    .production-bar { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); border-left: 3px solid var(--emerald); }
    .btn-deploy { background: var(--emerald); color: #000; border: none; padding: 4px 12px; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.8rem; }
    .btn-deploy:hover { filter: brightness(1.1); }
    .btn-deploy.btn-amber { background: var(--amber); }
    .btn-deploy.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-secondary); }
    .btn-deploy.btn-outline:hover { border-color: var(--text-primary); color: var(--text-primary); }
    .deploy-diff-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .deploy-diff-content { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 1.5rem; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); box-shadow: var(--shadow-lg); }
    .deploy-diff-content h3 { margin-bottom: 12px; color: var(--text-primary); }
    .deploy-diff-file { padding: 4px 0; font-size: 0.8rem; font-family: monospace; color: var(--text-secondary); }
    .deploy-diff-file.delete { color: var(--rose); }
    .deploy-diff-file.update { color: var(--emerald); }

    /* =============================================
       Autonomous Work Scheduler (homescreen)
       ============================================= */
    /* Blocker Queue Panel */
    .blockers-panel { margin-bottom: 12px; border: 1px solid rgba(245,158,11,0.25); border-radius: var(--radius-md); overflow: hidden; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .blockers-header { padding: 10px 12px; background: rgba(245,158,11,0.08); display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--amber); }
    .blockers-header:hover { background: rgba(245,158,11,0.15); }
    .blocker-card { padding: 10px 12px; border-top: 1px solid var(--border-color); display: flex; gap: 10px; align-items: flex-start; }
    .blocker-icon { width: 24px; text-align: center; flex-shrink: 0; font-size: 1rem; }
    .blocker-info { flex: 1; min-width: 0; }
    .blocker-title { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); line-height: 1.3; }
    .blocker-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; word-break: break-word; }
    .blocker-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .blocker-tag { background: rgba(245,158,11,0.2); color: var(--amber); padding: 2px 7px; border-radius: 4px; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; }
    .blocker-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
    .blocker-actions button { font-size: 0.75rem; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
    .blocker-actions button:hover { border-color: var(--text-muted); color: var(--text-primary); }
    .blocker-actions .btn-resolve { border-color: var(--emerald); color: var(--emerald); }
    .blocker-actions .btn-resolve:hover { background: rgba(16,185,129,0.15); }
    .blocker-actions .btn-dismiss { border-color: var(--text-muted); }
    .blocker-actions .btn-ask-emma { border-color: var(--indigo); color: var(--indigo-light); }
    .blocker-actions .btn-ask-emma:hover { background: rgba(99,102,241,0.15); }
    .blocker-badge { background: var(--amber); color: #000; font-size: 0.6rem; padding: 1px 5px; border-radius: 8px; font-weight: 700; line-height: 1.4; }
    .verify-dots { display: inline-flex; gap: 4px; margin-left: 6px; }
    .verify-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
    .verify-dot.pass { background: var(--emerald); }
    .verify-dot.fail { background: var(--rose); }
    .verify-dot.partial { background: var(--amber); }
    .verify-dot.na { background: var(--text-muted); opacity: 0.4; }

    /* autopilot-section removed — UI moved to autopilot panel */

    .autopilot-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.6rem;
    }

    .autopilot-header .section-title {
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .autopilot-icon {
      font-size: 1rem;
      animation: none;
    }

    .autopilot-section.active .autopilot-icon {
      animation: spin 3s linear infinite;
    }

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

    .autopilot-controls {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .toggle-switch {
      position: relative;
      display: inline-block;
      width: 36px;
      height: 20px;
      cursor: pointer;
    }

    .toggle-switch input { opacity: 0; width: 0; height: 0; }

    .toggle-slider {
      position: absolute;
      inset: 0;
      background: rgba(22, 25, 42, 0.8);
      border-radius: 10px;
      transition: background 0.2s, box-shadow 0.2s;
      border: 1px solid var(--glass-border);
    }

    .toggle-slider::before {
      content: '';
      position: absolute;
      width: 16px;
      height: 16px;
      left: 2px;
      bottom: 2px;
      background: var(--text-muted);
      border-radius: 50%;
      transition: transform 0.2s, background 0.2s;
    }

    .toggle-switch input:checked + .toggle-slider {
      background: var(--emerald);
      box-shadow: 0 0 10px rgba(16,185,129,0.3);
      border-color: rgba(16,185,129,0.4);
    }

    .toggle-switch input:checked + .toggle-slider::before {
      transform: translateX(16px);
      background: white;
    }

    .autopilot-status {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-bottom: 0.75rem;
    }

    .autopilot-status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--text-muted);
      flex-shrink: 0;
    }

    .autopilot-status-dot.active {
      background: var(--emerald);
      box-shadow: 0 0 6px var(--emerald);
      animation: pulse 2s ease-in-out infinite;
    }

    .autopilot-status-dot.working {
      background: var(--amber);
      box-shadow: 0 0 6px var(--amber);
      animation: pulse 1s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }
    @keyframes reviewPulse {
      0%, 100% { box-shadow: 0 0 8px rgba(212,165,116,0.15); }
      50% { box-shadow: 0 0 18px rgba(212,165,116,0.4), 0 0 4px rgba(212,165,116,0.2); }
    }

    .autopilot-projects {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      margin-bottom: 0.75rem;
    }

    .autopilot-project {
      display: flex;
      flex-direction: column;
      padding: 0.5rem 0.65rem;
      background: var(--bg-primary);
      border-radius: var(--radius-sm);
      font-size: 0.8rem;
      transition: opacity 0.2s;
    }

    .autopilot-project-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
    }

    .autopilot-project.inactive {
      opacity: 0.45;
    }

    .autopilot-timeline {
      width: 100%;
      margin-top: 0.5rem;
      padding-top: 0.4rem;
      border-top: 1px solid var(--border-color);
    }

    .autopilot-timeline-bar {
      display: flex;
      height: 8px;
      border-radius: 4px;
      overflow: hidden;
      background: var(--bg-tertiary);
      gap: 1px;
    }

    .autopilot-timeline-segment {
      height: 100%;
      transition: width 0.3s ease, opacity 0.2s;
      position: relative;
    }

    .autopilot-timeline-segment.completed {
      background: #10b981;
      border-radius: 2px;
    }

    .autopilot-timeline-segment.in_progress {
      background: #f59e0b;
      animation: pulse-segment 1.5s ease-in-out infinite;
      border-radius: 2px;
      box-shadow: 0 0 6px rgba(245,158,11,0.3);
    }

    .autopilot-timeline-segment.pending {
      background: rgba(22, 25, 42, 0.5);
      border: 1px solid var(--glass-border);
      border-radius: 2px;
    }

    @keyframes pulse-segment {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    .autopilot-timeline-labels {
      display: flex;
      justify-content: space-between;
      margin-top: 4px;
      font-size: 0.62rem;
      color: var(--text-muted);
    }

    .autopilot-timeline-current {
      font-size: 0.68rem;
      color: var(--text-secondary);
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .autopilot-timeline-current .phase-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #f59e0b;
      flex-shrink: 0;
    }

    .autopilot-project-info {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex: 1;
      min-width: 0;
    }

    .autopilot-project-color {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .autopilot-project-name {
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .autopilot-project-progress {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-shrink: 0;
    }

    .autopilot-progress-bar {
      width: 60px;
      height: 4px;
      background: var(--bg-tertiary);
      border-radius: 2px;
      overflow: hidden;
    }

    .autopilot-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--indigo), var(--purple));
      border-radius: 2px;
      transition: width 0.3s ease;
      box-shadow: 0 0 6px rgba(124,58,237,0.3);
    }

    .autopilot-progress-pct {
      font-size: 0.7rem;
      color: var(--text-muted);
      min-width: 28px;
      text-align: right;
    }

    .autopilot-project-toggle {
      margin-left: 0.5rem;
    }

    .autopilot-project-toggle .toggle-switch {
      width: 28px;
      height: 16px;
    }

    .autopilot-project-toggle .toggle-slider::before {
      width: 12px;
      height: 12px;
    }

    .autopilot-project-toggle .toggle-switch input:checked + .toggle-slider::before {
      transform: translateX(12px);
    }

    .autopilot-schedule {
      padding-top: 0.5rem;
      border-top: 1px solid var(--border-color);
    }

    .autopilot-meta {
      display: flex;
      justify-content: space-between;
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .autopilot-briefing {
      margin-top: 0.75rem;
      padding-top: 0.5rem;
      border-top: 1px solid var(--border-color);
    }

    .autopilot-briefing-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.75rem;
      color: var(--text-muted);
      cursor: pointer;
      user-select: none;
    }

    .autopilot-briefing-header:hover {
      color: var(--text-primary);
    }

    .autopilot-briefing-date {
      font-size: 0.7rem;
      color: var(--indigo);
    }

    .autopilot-briefing-content {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
      font-size: 0.75rem;
      line-height: 1.5;
      color: var(--text-secondary);
    }

    .autopilot-briefing-content.open {
      max-height: 500px;
      margin-top: 0.5rem;
      padding-top: 0.5rem;
    }

    .autopilot-working-label {
      font-size: 0.7rem;
      color: var(--amber);
      font-weight: 500;
      margin-left: 0.5rem;
    }

    /* =============================================
       Autopilot Panel (sidebar) + Topbar Button
       ============================================= */
    .autopilot-toggle-btn {
      display: flex; align-items: center; gap: 6px;
      background: rgba(16,185,129,0.12); color: #10b981;
      border: 1px solid rgba(16,185,129,0.25); border-radius: 999px;
      padding: 5px 12px; font-size: 0.78rem; font-weight: 600;
      cursor: pointer; transition: all 0.2s; position: relative;
    }
    .autopilot-toggle-btn:hover { background: rgba(16,185,129,0.22); border-color: rgba(16,185,129,0.4); }
    .autopilot-toggle-btn.active { background: rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.45); box-shadow: 0 0 12px rgba(16,185,129,0.15); }
    .autopilot-toggle-btn svg { width: 16px; height: 16px; }
    .autopilot-toggle-btn .autopilot-topbar-label { }
    @media (max-width: 680px) { .autopilot-toggle-btn .autopilot-topbar-label { display: none; } }

    .autopilot-topbar-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: #6b7280; /* gray — off */
      transition: background 0.3s;
    }
    .autopilot-topbar-dot.enabled { background: #10b981; }
    .autopilot-topbar-dot.working { background: #f59e0b; animation: ap-dot-pulse 1.2s ease-in-out infinite; }
    @keyframes ap-dot-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(1.4)} }

    .autopilot-toggle-btn.autopilot-working { animation: ap-btn-glow 2s ease-in-out infinite; }
    @keyframes ap-btn-glow { 0%,100%{box-shadow:0 0 8px rgba(245,158,11,0.15)} 50%{box-shadow:0 0 18px rgba(245,158,11,0.35)} }

    .autopilot-panel {
      position: fixed; top: 0; right: 0; bottom: 0; width: 440px;
      background: rgba(12,12,20,0.92);
      border-left: 1px solid rgba(16,185,129,0.15);
      backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
      z-index: 899; display: flex; flex-direction: column;
      transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
      box-shadow: -4px 0 24px rgba(0,0,0,0.4);
    }
    .autopilot-panel.collapsed { transform: translateX(100%); pointer-events: none; }
    @media (max-width: 520px) { .autopilot-panel { width: 100%; } }

    .autopilot-panel-header {
      display: flex; align-items: center; gap: 10px;
      padding: 14px 16px; border-bottom: 1px solid rgba(16,185,129,0.12);
      flex-shrink: 0;
    }
    .autopilot-panel-header .ap-header-icon {
      width: 32px; height: 32px; border-radius: 8px;
      background: rgba(16,185,129,0.15); display: flex; align-items: center; justify-content: center;
      color: #10b981; flex-shrink: 0;
    }
    .autopilot-panel-header .ap-header-icon svg { width: 18px; height: 18px; }
    .autopilot-panel-header .ap-header-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
    .autopilot-panel-header .ap-header-status { font-size: 0.7rem; color: var(--text-muted); margin-left: 2px; }
    .autopilot-panel-header .ap-header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
    .autopilot-panel-header .ap-header-actions button {
      background: none; border: 1px solid rgba(255,255,255,0.08); color: var(--text-secondary);
      border-radius: 6px; padding: 5px 8px; cursor: pointer; display: flex; align-items: center; gap: 4px;
      font-size: 0.72rem; transition: all 0.15s;
    }
    .autopilot-panel-header .ap-header-actions button:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
    .autopilot-panel-header .ap-header-actions button svg { width: 14px; height: 14px; }

    .autopilot-panel-body {
      flex: 1; overflow-y: auto; padding: 12px 16px;
      scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent;
    }

    .ap-section {
      background: rgba(20,20,30,0.6); border: 1px solid rgba(255,255,255,0.06);
      border-radius: 10px; padding: 12px; margin-bottom: 12px;
    }
    .ap-section-title {
      font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
    }

    .ap-active-session {
      border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.06);
      position: relative; overflow: hidden;
    }
    .ap-active-session::before {
      content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
      background: linear-gradient(90deg, transparent, rgba(16,185,129,0.06), transparent);
      animation: ap-shimmer 2.5s ease-in-out infinite;
    }
    @keyframes ap-shimmer { 0%{left:-100%} 100%{left:200%} }
    .ap-session-project { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .ap-session-project .color-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .ap-session-project .project-name { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
    .ap-session-elapsed { font-size: 0.72rem; color: #10b981; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }
    .ap-session-task { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 4px; }
    .ap-session-action { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono, monospace); }

    .ap-history-item {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
      font-size: 0.75rem;
    }
    .ap-history-item:last-child { border-bottom: none; }
    .ap-history-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
    .ap-history-dot.success { background: #10b981; }
    .ap-history-dot.error { background: #ef4444; }
    .ap-history-dot.partial { background: #f59e0b; }
    .ap-history-name { color: var(--text-primary); font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ap-history-duration { color: var(--text-muted); font-variant-numeric: tabular-nums; }
    .ap-history-time { color: var(--text-muted); font-size: 0.68rem; }

    .ap-config-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 6px 0; font-size: 0.78rem;
    }
    .ap-config-row .ap-config-label { color: var(--text-secondary); }
    .ap-config-row .ap-config-value { color: var(--text-primary); font-weight: 500; }

    /* =============================================
       Automation Hub (homescreen)
       ============================================= */
    .automation-hub-section {
      margin-top: 1.5rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--border-color);
    }
    .automation-hub-section .ah-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 10px;
    }
    .automation-hub-section .ah-card {
      background: rgba(20,20,30,0.8);
      border: 1px solid rgba(139,92,246,0.15);
      border-radius: 8px;
      padding: 10px 12px;
      transition: border-color 0.2s;
    }
    .automation-hub-section .ah-card:hover { border-color: rgba(139,92,246,0.35); }
    .automation-hub-section .ah-card-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }
    .automation-hub-section .ah-card-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .automation-hub-section .ah-card-name { font-size: 13px; font-weight: 600; color: #e4e4e7; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .automation-hub-section .ah-card-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
    .automation-hub-section .ah-badge-running { background: rgba(34,197,94,0.12); color: #22c55e; }
    .automation-hub-section .ah-badge-blocked { background: rgba(239,68,68,0.12); color: #ef4444; }
    .automation-hub-section .ah-badge-idle { background: rgba(107,114,128,0.12); color: #6b7280; }
    .automation-hub-section .ah-badge-completed { background: rgba(139,92,246,0.12); color: #ef4444; }
    .automation-hub-section .ah-badge-locked { background: rgba(249,115,22,0.12); color: #f97316; }
    .automation-hub-section .ah-badge-paused { background: rgba(245,158,11,0.12); color: #f59e0b; }
    .automation-hub-section .ah-badge-planning { background: rgba(59,130,246,0.12); color: #3b82f6; }
    .automation-hub-section .ah-progress { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; margin-bottom: 8px; overflow: hidden; }
    .automation-hub-section .ah-progress-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }
    .automation-hub-section .ah-progress-label { font-size: 10px; color: #71717a; margin-bottom: 8px; }
    .automation-hub-section .ah-toggles { display: flex; align-items: center; gap: 12px; }
    .automation-hub-section .ah-toggle-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #a1a1aa; }
    .automation-hub-section .ah-toggle-row .toggle-switch { width: 32px; height: 18px; }
    .automation-hub-section .ah-toggle-row .toggle-slider::before { width: 14px; height: 14px; }
    .automation-hub-section .ah-toggle-row .toggle-switch input:checked + .toggle-slider::before { transform: translateX(14px); }

    /* Persistent Roadmap Progress in Automation Hub */
    .ah-roadmap-bar {
      background: rgba(20,20,30,0.8);
      border: 1px solid rgba(139,92,246,0.15);
      border-radius: 8px;
      padding: 10px 12px;
      margin-bottom: 12px;
      transition: border-color 0.2s;
    }

    .ah-roadmap-bar:hover { border-color: rgba(139,92,246,0.35); }

    .ah-roadmap-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      font-size: 13px;
      font-weight: 600;
      color: #e4e4e7;
    }

    .ah-roadmap-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      background: #6b7280;
    }

    .ah-roadmap-title {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .ah-roadmap-status-badge {
      font-size: 10px;
      padding: 2px 8px;
      border-radius: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      background: rgba(139,92,246,0.12);
      color: #ef4444;
    }

    .ah-roadmap-progress {
      height: 6px;
      background: rgba(255,255,255,0.06);
      border-radius: 3px;
      margin-bottom: 8px;
      overflow: hidden;
      position: relative;
    }

    .ah-roadmap-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #ef4444 0%, #dc2626 50%, #3b82f6 100%);
      border-radius: 3px;
      transition: width 0.3s ease;
      box-shadow: 0 0 8px rgba(139,92,246,0.4);
    }

    .ah-roadmap-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 10px;
      color: #71717a;
      margin-bottom: 8px;
    }

    .ah-roadmap-phases {
      display: flex;
      gap: 3px;
      align-items: center;
    }

    .ah-roadmap-phase {
      flex: 1;
      height: 4px;
      border-radius: 2px;
      background: rgba(139,92,246,0.2);
      transition: all 0.2s;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }

    .ah-roadmap-phase:hover {
      height: 6px;
      background: rgba(139,92,246,0.4);
    }

    .ah-roadmap-phase.completed {
      background: rgba(16,185,129,0.6);
    }

    .ah-roadmap-phase.completed:hover {
      background: rgba(16,185,129,0.8);
      box-shadow: 0 0 4px rgba(16,185,129,0.5);
    }

    .ah-roadmap-phase.in-progress {
      background: rgba(245,158,11,0.8);
      box-shadow: 0 0 4px rgba(245,158,11,0.5);
    }

    .ah-roadmap-phase.pending {
      background: rgba(139,92,246,0.2);
    }

    .ah-roadmap-phase-tooltip {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0,0,0,0.9);
      color: #fff;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 9px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s;
      margin-bottom: 4px;
      z-index: 10;
    }

    .ah-roadmap-phase:hover .ah-roadmap-phase-tooltip {
      opacity: 1;
    }

    .ah-roadmap-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 10px;
      color: #a1a1aa;
    }

    .ah-roadmap-expand-btn {
      background: none;
      border: none;
      color: #ef4444;
      cursor: pointer;
      padding: 2px 6px;
      font-size: 10px;
      font-weight: 600;
      transition: color 0.2s;
    }

    .ah-roadmap-expand-btn:hover {
      color: #f87171;
    }

    /* =============================================
       Dashboard Notes (homescreen)
       ============================================= */
    .dashboard-notes-section {
      margin-top: 2rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--border-color);
    }

    .notes-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.75rem;
    }

    .notes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 0.75rem;
    }

    .sticky-note {
      position: relative;
      padding: 0.85rem 1rem 0.7rem 1rem;
      border-radius: 10px;
      min-height: 72px;
      font-size: 0.82rem;
      line-height: 1.55;
      color: var(--text-primary);
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
      word-break: break-word;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .sticky-note::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      border-radius: 10px 10px 0 0;
    }

    .sticky-note.note-color-yellow::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
    .sticky-note.note-color-green::before { background: linear-gradient(90deg, #34d399, #10b981); }
    .sticky-note.note-color-blue::before { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
    .sticky-note.note-color-pink::before { background: linear-gradient(90deg, #f472b6, #ec4899); }
    .sticky-note.note-color-purple::before { background: linear-gradient(90deg, #f87171, #ef4444); }

    .sticky-note:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0,0,0,0.25);
      border-color: rgba(255,255,255,0.12);
    }

    .sticky-note .note-text {
      flex: 1;
      white-space: pre-wrap;
      padding-top: 0.15rem;
    }

    .sticky-note .note-meta {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      margin-top: 0.5rem;
      padding-top: 0.4rem;
      border-top: 1px solid rgba(255,255,255,0.06);
      font-size: 0.68rem;
      color: var(--text-muted);
    }

    .sticky-note .note-meta .note-color-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .note-color-yellow .note-color-dot { background: #fbbf24; }
    .note-color-green .note-color-dot { background: #34d399; }
    .note-color-blue .note-color-dot { background: #60a5fa; }
    .note-color-pink .note-color-dot { background: #f472b6; }
    .note-color-purple .note-color-dot { background: #f87171; }

    .note-actions {
      position: absolute;
      top: 0.5rem;
      right: 0.5rem;
      display: flex;
      gap: 0.2rem;
      opacity: 0;
      transition: opacity 0.15s ease;
    }

    .sticky-note:hover .note-actions { opacity: 1; }

    .note-actions button {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.08);
      color: var(--text-muted);
      border: 1px solid rgba(255,255,255,0.06);
      transition: all 0.15s ease;
    }
    .note-actions button:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }
    .note-actions button svg { width: 12px; height: 12px; fill: currentColor; }

    .note-pin-indicator {
      position: absolute;
      top: 7px;
      left: 10px;
      display: flex;
      align-items: center;
      gap: 0.2rem;
      font-size: 0.58rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--amber);
      opacity: 0.7;
    }
    .note-pin-indicator svg {
      width: 9px;
      height: 9px;
      fill: currentColor;
    }

    /* =============================================
       Project Detail View
       ============================================= */
    .detail-container {
      display: flex;
      flex-direction: column;
      height: calc(100vh - var(--topbar-h, 42px));
      height: calc(100dvh - var(--topbar-h, 42px));
    }

    .detail-header {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.35rem 1rem;
      background: var(--glass-bg);
      border-bottom: 1px solid var(--glass-border);
      flex-shrink: 0;
      backdrop-filter: blur(var(--glass-blur));
      -webkit-backdrop-filter: blur(var(--glass-blur));
    }

    .back-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--glass-bg);
      color: var(--text-secondary);
      border: 1px solid var(--glass-border);
      flex-shrink: 0;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      transition: all var(--transition-fast);
    }
    .back-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); box-shadow: var(--shadow-glow); border-color: var(--border-glow); }
    .back-btn svg { width: 14px; height: 14px; fill: currentColor; }

    .detail-title-group {
      flex: 1;
      min-width: 0;
    }

    .detail-project-name {
      font-size: 0.9rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .detail-project-name .color-dot {
      width: 12px; height: 12px;
      border-radius: 50%;
      flex-shrink: 0;
      box-shadow: 0 0 8px currentColor;
    }

    .detail-project-desc {
      font-size: 0.75rem;
      color: var(--text-secondary);
      cursor: pointer;
    }
    .detail-project-desc:hover { color: var(--text-primary); }

    .detail-actions {
      display: flex;
      gap: 0.5rem;
      align-items: center;
      flex-shrink: 0;
    }

    /* =============================================
       Project Dashboard Tile Grid (Mini OS)
       ============================================= */
    .project-dashboard {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1rem;
      padding: 1.5rem;
      overflow-y: auto;
      flex: 1;
    }

    .app-tile {
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius-lg);
      cursor: pointer;
      transition: all var(--transition-normal);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-height: 200px;
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      position: relative;
    }

    .app-tile::after {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--glass-shine);
      pointer-events: none;
      border-radius: inherit;
    }

    .app-tile:hover {
      transform: translateY(-4px);
      border-color: var(--border-glow);
      box-shadow: var(--shadow-lg), var(--shadow-glow);
      background: var(--bg-card-hover);
    }

    .app-tile:active {
      transform: translateY(-1px);
    }

    .app-tile.tile-wide {
      grid-column: span 2;
    }

    .app-tile.tile-full {
      grid-column: 1 / -1;
    }

    .app-tile-bar {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 0.85rem 1rem;
      border-bottom: 1px solid var(--glass-border);
      flex-shrink: 0;
      position: relative;
      z-index: 1;
    }

    .app-tile-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
      box-shadow: 0 0 6px currentColor;
    }

    .app-tile-bar-title {
      font-size: 0.825rem;
      font-weight: 600;
      color: var(--text-primary);
      flex: 1;
    }

    .app-tile-bar-badge {
      font-size: 0.68rem;
      color: var(--text-muted);
      padding: 0.15rem 0.5rem;
      background: rgba(255,255,255,0.05);
      border-radius: 10px;
    }

    .app-tile-body {
      flex: 1;
      padding: 0.85rem 1rem;
      overflow: hidden;
      position: relative;
    }

    .app-tile-body-text {
      font-size: 0.78rem;
      color: var(--text-secondary);
      line-height: 1.5;
    }

    .app-tile-list-item {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.2rem 0;
      font-size: 0.75rem;
      color: var(--text-secondary);
    }

    .app-tile-list-item svg {
      width: 12px;
      height: 12px;
      flex-shrink: 0;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      opacity: 0.5;
    }

    .app-tile-list-item.is-dir svg {
      stroke: var(--amber);
      opacity: 0.8;
    }

    /* Preview tile iframe */
    .app-tile.tile-preview .app-tile-body {
      padding: 0;
    }

    .preview-frame {
      width: 250%;
      height: 250%;
      border: none;
      background: var(--bg-primary);
      pointer-events: none;
      transform: scale(0.4);
      transform-origin: top left;
    }

    .app-tile.tile-preview:hover .preview-frame {
      opacity: 0.9;
    }

    /* QR code overlay on preview tile */
    .preview-qr-overlay {
      position: absolute;
      bottom: 8px;
      right: 8px;
      background: #fff;
      border-radius: 8px;
      padding: 6px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.4);
      z-index: 5;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
      line-height: 0;
    }
    .preview-qr-overlay:hover {
      transform: scale(1.08);
      box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    }
    .preview-qr-overlay svg {
      display: block;
    }
    /* Expanded QR modal */
    .qr-modal-backdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9000;
      display: flex; align-items: center; justify-content: center;
      backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    }
    .qr-modal {
      background: #fff; border-radius: 16px; padding: 28px; text-align: center;
      max-width: 340px; width: 90vw; position: relative;
    }
    .qr-modal h3 { margin: 0 0 4px; font-size: 1rem; color: #111; font-weight: 600; }
    .qr-modal .qr-url { font-size: 0.72rem; color: #666; word-break: break-all; margin-bottom: 14px; }
    .qr-modal .qr-svg-container { display: flex; justify-content: center; }
    .qr-modal .qr-svg-container svg { width: 220px; height: 220px; }
    .qr-modal .qr-close {
      position: absolute; top: 10px; right: 14px; background: none; border: none;
      font-size: 1.4rem; color: #999; cursor: pointer; line-height: 1;
    }
    .qr-modal .qr-close:hover { color: #333; }

    .preview-no-url {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      color: var(--text-muted);
      font-size: 0.8rem;
      flex-direction: column;
      gap: 0.5rem;
    }

    .preview-no-url svg {
      width: 32px;
      height: 32px;
      opacity: 0.3;
    }

    /* Info tile stats grid */
    .info-tile-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.25rem 1rem;
    }

    .info-tile-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.75rem;
      padding: 0.2rem 0;
    }

    .info-tile-label {
      color: var(--text-muted);
    }

    .info-tile-value {
      color: var(--text-primary);
      font-weight: 500;
    }

    /* App expanded view */
    .app-expanded {
      display: none;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
    }

    .app-expanded.active {
      display: flex;
    }

    .app-expanded-bar {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.25rem 1rem;
      background: var(--glass-bg);
      border-bottom: 1px solid var(--glass-border);
      flex-shrink: 0;
      backdrop-filter: blur(var(--glass-blur));
      -webkit-backdrop-filter: blur(var(--glass-blur));
    }

    .app-expanded-bar .back-btn {
      width: 30px;
      height: 30px;
    }

    .app-expanded-bar .back-btn svg {
      width: 16px;
      height: 16px;
    }

    .app-expanded-title {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .app-expanded-title .app-tile-dot {
      width: 8px;
      height: 8px;
    }

    .app-expanded-content {
      flex: 1;
      overflow: hidden;
      position: relative;
    }

    .app-panel {
      display: none;
      position: absolute;
      inset: 0;
      overflow-y: auto;
      padding: 1.25rem 1.5rem;
    }

    .app-panel.active {
      display: block;
    }


    .app-panel.panel-terminal {
      padding: 0;
      overflow: hidden;
    }

    .app-panel.panel-preview {
      padding: 0;
    }

    .app-panel.panel-preview iframe {
      width: 100%;
      height: 100%;
      border: none;
      background: white;
      display: block;
    }

    @media (max-width: 900px) {
      .project-dashboard {
        grid-template-columns: 1fr 1fr;
      }
      .app-tile.tile-wide {
        grid-column: span 1;
      }
    }

    @media (max-width: 600px) {
      .project-dashboard {
        grid-template-columns: 1fr;
      }
    }

    /* =============================================
       Files Tab
       ============================================= */
    .file-breadcrumb {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      margin-bottom: 1rem;
      font-size: 0.825rem;
    }

    .file-breadcrumb span {
      color: var(--text-muted);
    }

    .file-breadcrumb a {
      color: var(--indigo-light);
      cursor: pointer;
    }
    .file-breadcrumb a:hover { text-decoration: underline; }

    .file-list {
      width: 100%;
      border: 1px solid var(--glass-border);
      border-radius: var(--radius-md);
      overflow: hidden;
      background: var(--glass-bg);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .file-row {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.6rem 1rem;
      border-bottom: 1px solid var(--border-color);
      font-size: 0.85rem;
      transition: background var(--transition-fast);
    }

    .file-row:last-child { border-bottom: none; }
    .file-row:hover { background: rgba(255,255,255,0.03); border-left: 2px solid var(--indigo); }
    .file-row.is-dir { cursor: pointer; }
    .file-row.is-dir:hover { background: rgba(99,102,241,0.05); border-left: 2px solid var(--amber); }

    .file-icon { width: 18px; height: 18px; flex-shrink: 0; fill: var(--text-muted); }
    .file-row.is-dir .file-icon { fill: var(--amber); }

    .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .file-size { color: var(--text-muted); font-size: 0.775rem; min-width: 60px; text-align: right; }
    .file-modified { color: var(--text-muted); font-size: 0.775rem; min-width: 140px; text-align: right; }

    /* =============================================
       Explorer Tile Grid
       ============================================= */
    .explorer-toolbar {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 1rem;
      flex-wrap: wrap;
    }

    .explorer-toolbar .file-breadcrumb {
      flex: 1;
      min-width: 0;
      margin-bottom: 0;
    }

    .explorer-actions {
      display: flex;
      gap: 0.5rem;
      flex-shrink: 0;
    }

    .explorer-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 0.85rem;
      animation: explorerFadeIn 0.25s ease;
    }

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

    .explorer-tile {
      position: relative;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius-md);
      padding: 1rem;
      cursor: pointer;
      transition: all var(--transition-normal);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .explorer-tile::after {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--glass-shine);
      pointer-events: none;
      border-radius: inherit;
    }

    .explorer-tile:hover {
      transform: translateY(-3px);
      border-color: var(--border-glow);
      box-shadow: var(--shadow-md), var(--shadow-glow);
      background: var(--bg-card-hover);
    }

    .explorer-tile:active {
      transform: translateY(0);
    }

    .explorer-tile-header {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
      margin-bottom: 0.5rem;
    }

    .explorer-rename-btn {
      opacity: 0;
      background: rgba(255,255,255,0.08);
      border: none;
      color: var(--text-secondary);
      padding: 0.3rem;
      border-radius: 4px;
      cursor: pointer;
      transition: opacity var(--transition-fast), background var(--transition-fast);
      flex-shrink: 0;
      margin-top: 2px;
    }

    .explorer-tile:hover .explorer-rename-btn { opacity: 1; }
    .explorer-rename-btn:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }

    .explorer-tile-icon {
      width: 38px;
      height: 38px;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      position: relative;
    }

    .explorer-tile-icon svg {
      width: 20px;
      height: 20px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
    }

    .explorer-tile.is-folder .explorer-tile-icon {
      background: rgba(245, 158, 11, 0.12);
      color: var(--amber);
      transition: box-shadow var(--transition-fast);
    }

    .explorer-tile.is-folder:hover .explorer-tile-icon {
      box-shadow: 0 0 12px rgba(245,158,11,0.3);
    }

    .explorer-tile.is-file .explorer-tile-icon {
      background: rgba(99, 102, 241, 0.1);
      color: var(--indigo-light);
      transition: box-shadow var(--transition-fast);
    }

    .explorer-tile.is-file:hover .explorer-tile-icon {
      box-shadow: 0 0 12px rgba(99,102,241,0.3);
    }

    .explorer-tile.is-file.ext-ts .explorer-tile-icon,
    .explorer-tile.is-file.ext-tsx .explorer-tile-icon {
      background: rgba(6, 182, 212, 0.1);
      color: var(--cyan);
    }

    .explorer-tile.is-file.ext-json .explorer-tile-icon {
      background: rgba(245, 158, 11, 0.1);
      color: var(--amber);
    }

    .explorer-tile.is-file.ext-md .explorer-tile-icon {
      background: rgba(168, 85, 247, 0.1);
      color: var(--purple);
    }

    .explorer-tile.is-file.ext-env .explorer-tile-icon,
    .explorer-tile.is-file.ext-lock .explorer-tile-icon {
      background: rgba(244, 63, 94, 0.08);
      color: var(--rose);
    }

    .explorer-tile-info {
      flex: 1;
      min-width: 0;
    }

    .explorer-tile-name {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      line-height: 1.3;
    }

    .explorer-tile-meta {
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-top: 0.15rem;
      display: flex;
      gap: 0.5rem;
    }

    .explorer-tile-peek {
      border-top: 1px solid var(--border-color);
      padding-top: 0.5rem;
      margin-top: 0.5rem;
      flex: 1;
    }

    .explorer-peek-item {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.12rem 0;
      font-size: 0.72rem;
      color: var(--text-secondary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .explorer-peek-item svg {
      width: 11px;
      height: 11px;
      flex-shrink: 0;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      opacity: 0.5;
    }

    .explorer-peek-item.is-dir svg {
      stroke: var(--amber);
      opacity: 0.7;
    }

    .explorer-peek-more {
      font-size: 0.68rem;
      color: var(--text-muted);
      font-style: italic;
      padding-top: 0.15rem;
    }

    .explorer-tile-file-preview {
      font-size: 0.72rem;
      color: var(--text-secondary);
      margin-top: 0.35rem;
      font-family: 'Fira Code', monospace;
      line-height: 1.35;
      max-height: 3.2em;
      overflow: hidden;
      opacity: 0.7;
    }

    /* Back-to-parent tile */
    .explorer-tile.back-tile {
      border-style: dashed;
      align-items: center;
      justify-content: center;
      flex-direction: row;
      gap: 0.5rem;
      padding: 0.75rem 1rem;
      min-height: 0;
    }

    .explorer-tile.back-tile:hover {
      border-color: var(--indigo);
      background: rgba(99, 102, 241, 0.05);
    }

    .explorer-tile.back-tile .explorer-tile-icon {
      width: 28px;
      height: 28px;
      background: rgba(99, 102, 241, 0.1);
      color: var(--indigo-light);
    }

    .explorer-tile.back-tile .explorer-tile-icon svg {
      width: 16px;
      height: 16px;
    }

    .explorer-tile.back-tile span {
      font-size: 0.825rem;
      color: var(--text-secondary);
      font-weight: 500;
    }

    /* File viewer modal */
    .file-viewer-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      z-index: 600;
      align-items: stretch;
      justify-content: center;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      padding: 2rem;
    }
    .file-viewer-backdrop.open { display: flex; }

    .file-viewer {
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius-lg);
      display: flex;
      flex-direction: column;
      width: 100%;
      max-width: 900px;
      overflow: hidden;
      animation: modal-enter 0.2s ease;
      backdrop-filter: blur(var(--glass-blur));
      -webkit-backdrop-filter: blur(var(--glass-blur));
      box-shadow: var(--shadow-lg), 0 0 30px rgba(139,92,246,0.1);
    }

    .file-viewer-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.75rem 1.25rem;
      border-bottom: 1px solid var(--border-color);
      flex-shrink: 0;
    }

    .file-viewer-name {
      font-size: 0.9rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .file-viewer-name span {
      font-weight: 400;
      color: var(--text-muted);
      font-size: 0.8rem;
    }

    .file-viewer-body {
      flex: 1;
      overflow: auto;
    }

    .file-viewer-code {
      margin: 0;
      padding: 1rem;
      font-family: 'Fira Code', 'JetBrains Mono', Menlo, Monaco, 'Courier New', monospace;
      font-size: 0.8rem;
      line-height: 1.6;
      color: var(--text-primary);
      background: #050510;
      background-image: radial-gradient(ellipse at 50% 50%, rgba(124,58,237,0.03) 0%, transparent 70%);
      white-space: pre;
      tab-size: 4;
      overflow-x: auto;
      min-height: 100%;
    }

    .file-viewer-line {
      display: flex;
    }

    .file-viewer-lineno {
      user-select: none;
      width: 50px;
      flex-shrink: 0;
      text-align: right;
      padding-right: 1rem;
      color: var(--text-muted);
      opacity: 0.5;
    }

    .file-viewer-linetext {
      flex: 1;
      min-width: 0;
    }

    .file-viewer-truncated {
      padding: 0.5rem 1rem;
      font-size: 0.8rem;
      color: var(--amber);
      background: rgba(245,158,11,0.06);
      border-top: 1px solid var(--border-color);
      text-align: center;
    }

    .file-viewer-error {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 3rem;
      color: var(--text-muted);
      font-size: 0.9rem;
    }

