    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    /* Modern scrollbar styling */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: var(--bg, #080c14);
    }
    ::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.08);
      border-radius: 99px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent, #4f8ef7);
    }

    :root {
      --bg:      #080c14;
      --bg2:     #0e1420;
      --bg3:     #141c2e;
      --surface: rgba(255,255,255,0.04);
      --border:  rgba(255,255,255,0.07);
      --accent:  #4f8ef7;    /* Q blue */
      --linda:   #a855f7;    /* Linda purple */
      --eva:     #f97316;    /* Eva orange */
      --green:   #10b981;
      --yellow:  #f59e0b;
      --red:     #ef4444;
      --orange:  #f97316;
      --text:    #e2e8f0;
      --muted:   #8494a7;
      --mono:    'JetBrains Mono', monospace;
      --pixel:   'Press Start 2P', monospace;
      --sans:    'Inter', sans-serif;
      --radius:  14px;
      --glow:    0 0 0 1px rgba(79,142,247,0.15), 0 8px 32px rgba(0,0,0,0.4);
    }

    html { font-family: var(--sans); background: var(--bg); color: var(--text); font-size: 14px; }
    body { min-height: 100vh; }

    /* ── Header ──────────────────────────────────── */
    header {
      position: sticky; top: 0; z-index: 100;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 28px; height: 58px;
      background: rgba(8,12,20,0.97);
      border-bottom: 1px solid var(--border);
      backdrop-filter: blur(12px);
    }
    .logo { display: flex; align-items: center; gap: 10px; }
    .logo-dot {
      width: 10px; height: 10px; border-radius: 50%;
      background: var(--green); box-shadow: 0 0 10px var(--green);
      animation: pulse 2s ease-in-out infinite;
    }
    @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(0.8)} }
    .logo-text { font-weight: 700; font-size: 15px; color: #fff; }
    .logo-sub  { font-size: 11px; color: var(--muted); margin-left: 4px; }
    .header-right { display: flex; align-items: center; gap: 12px; }
    #clock { font-family: var(--mono); font-size: 12px; color: var(--muted); }
    .badge {
      padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600;
      background: rgba(16,185,129,.15); color: var(--green);
      border: 1px solid rgba(16,185,129,.25);
    }
    .refresh-btn {
      display: flex; align-items: center; gap: 6px;
      padding: 6px 14px; border-radius: 8px;
      background: var(--surface); border: 1px solid var(--border);
      color: var(--muted); cursor: pointer; font-size: 12px;
      transition: all .2s;
    }
    .refresh-btn:hover { color: var(--text); border-color: var(--accent); background: rgba(79,142,247,.08); }

    /* ── Ticker ──────────────────────────────────── */
    .ticker-wrap {
      overflow: hidden; background: var(--bg2);
      border: 1px solid var(--border); border-radius: 8px;
      padding: 8px 12px; margin-bottom: 24px;
    }
    .ticker { display: flex; white-space: nowrap; animation: ticker-slide 10s linear infinite; width: max-content; }
    .ticker:hover { animation-play-state: paused; }
    .ticker-item { display: inline-flex; align-items: center; margin-right: 40px; font-family: var(--mono); font-size: 13px; font-weight: 700; }
    .ticker-symbol { color: var(--accent); margin-right: 6px; }
    .ticker-price  { color: #fff; margin-right: 8px; }
    .ticker-change.up   { color: var(--green); }
    .ticker-change.down { color: var(--red); }
    @keyframes ticker-slide { 0%{transform:translate3d(0,0,0)} 100%{transform:translate3d(-50%,0,0)} }

    /* ── Layout ──────────────────────────────────── */
    main { max-width: 1440px; margin: 0 auto; padding: 24px 24px; }
    .section-title {
      font-size: 11px; font-weight: 600; letter-spacing: 1.2px;
      text-transform: uppercase; color: var(--muted);
      margin-bottom: 14px; margin-top: 28px;
      display: flex; align-items: center; gap: 8px;
    }
    .section-title::after { content:''; flex:1; height:1px; background: var(--border); }
    .section-title:first-of-type { margin-top: 0; }

    /* ── Cards ───────────────────────────────────── */
    .card {
      background: rgba(14, 20, 32, 0.6);
      backdrop-filter: blur(12px) saturate(130%);
      -webkit-backdrop-filter: blur(12px) saturate(130%);
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
      border-radius: var(--radius); padding: 20px;
      transition: transform .2s, box-shadow .2s;
    }
    .card:hover { transform: translateY(-2px); box-shadow: var(--glow); }
    .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
    .card-title  { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
    .card-badge  {
      font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
      background: rgba(79,142,247,.12); color: var(--accent); border: 1px solid rgba(79,142,247,.2);
    }
    .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 14px; }

    /* ── Tabs ────────────────────────────────────── */
    .tabs-nav { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 8px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .tabs-nav::-webkit-scrollbar { display: none; }
    .tab-btn {
      background: none; border: none; color: var(--muted); font-size: 13px; font-family: var(--sans);
      font-weight: 600; cursor: pointer; padding: 8px 16px; border-radius: 8px;
      transition: all 0.2s; display: flex; align-items: center; gap: 6px; position: relative;
    }
    .tab-btn:hover  { color: var(--text); background: rgba(255,255,255,0.03); }
    .tab-btn.active { color: var(--accent); background: rgba(79,142,247,0.1); }
    .tab-btn.active::after { content:''; position:absolute; bottom:-9px; left:0; right:0; height:2px; background:var(--accent); }
    .tab-content { display:none; }
    .tab-content.active { display:block; }

    /* ════════════════════════════════════════════════════
       DUNGEON CRAWLER ROOM
       ════════════════════════════════════════════════════ */
    /* ════════════════════════════════════════════════════
       LIVE OPERATIONS CONSOLE
       ════════════════════════════════════════════════════ */
    .console-wrap {
      width: 100%;
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }
    .console-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--border);
      padding-bottom: 12px;
      margin-bottom: 16px;
    }
    .console-title {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 700;
      font-size: 13px;
      letter-spacing: 0.5px;
      color: #fff;
    }
    .console-dot {
      width: 8px;
      height: 8px;
      background: var(--green);
      border-radius: 50%;
      box-shadow: 0 0 10px var(--green);
      animation: status-pulse 1.5s infinite;
    }
    @keyframes status-pulse {
      0%, 100% { opacity: 0.4; }
      50% { opacity: 1; }
    }
    .console-badge {
      background: rgba(79, 142, 247, 0.1);
      border: 1px solid rgba(79, 142, 247, 0.3);
      color: var(--accent);
      font-family: var(--pixel), monospace;
      font-size: 9px;
      padding: 4px 10px;
      border-radius: 12px;
      text-transform: uppercase;
    }
    .console-grid {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 16px;
      margin-bottom: 16px;
    }
    @media (max-width: 768px) {
      .console-grid {
        grid-template-columns: 1fr;
      }
    }
    .console-card {
      background: rgba(10, 15, 28, 0.5);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 10px;
      padding: 16px;
      transition: border-color 0.3s, box-shadow 0.3s;
    }
    .q-card {
      border-left: 3px solid var(--accent);
    }
    .q-card.active-working {
      box-shadow: 0 0 15px rgba(79, 142, 247, 0.15);
      border-color: var(--accent);
    }
    .linda-card {
      border-left: 3px solid var(--linda);
    }
    .linda-card.active-working {
      box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
      border-color: var(--linda);
    }
    .eva-card {
      border-left: 3px solid var(--eva);
    }
    .eva-card.active-working {
      box-shadow: 0 0 15px rgba(249, 115, 22, 0.15);
      border-color: var(--eva);
    }
    .card-agent-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }
    .agent-avatar {
      font-size: 26px;
    }
    .agent-role {
      font-weight: 700;
      font-size: 13px;
      color: #fff;
    }
    .agent-status {
      font-size: 11px;
      color: var(--muted);
      margin-top: 2px;
      font-family: monospace;
    }
    .agent-detail-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 11px;
      color: #b4c6ef;
    }
    .detail-item {
      padding: 6px 10px;
      background: rgba(255,255,255,0.02);
      border-radius: 6px;
      border: 1px solid rgba(255, 255, 255, 0.03);
    }
    .dialogue-console {
      background: rgba(5, 8, 16, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      padding: 14px;
      font-family: monospace;
    }
    .console-label {
      font-size: 9px;
      color: var(--muted);
      letter-spacing: 1px;
      margin-bottom: 8px;
      font-weight: bold;
    }
    .dialogue-log {
      max-height: 120px;
      overflow-y: auto;
      font-size: 11px;
      line-height: 1.5;
      display: flex;
      flex-direction: column;
      gap: 4px;
      scrollbar-width: thin;
    }
    .dialogue-row {
      padding: 2px 0;
      word-break: break-word;
    }
    .dialogue-row.q {
      color: #7bb1ff;
    }
    .dialogue-row.linda {
      color: #d19eff;
    }
    .dialogue-row.system {
      color: #8c9ba5;
    }

    /* Confetti */
    .confetti-piece {
      position: absolute; width: 6px; height: 6px;
      border-radius: 1px; opacity: 0;
      animation: confetti-fall 1.5s ease-in forwards;
    }
    @keyframes confetti-fall {
      0%   { opacity:1; transform: translateY(0) rotate(0deg); }
      100% { opacity:0; transform: translateY(200px) rotate(720deg); }
    }

    /* typing sparks */
    @keyframes spark { 0%,100%{opacity:0;transform:scale(0)} 50%{opacity:1;transform:scale(1)} }
    .spark {
      position: absolute; font-size: 10px; pointer-events: none;
      animation: spark 0.4s ease-in-out infinite;
    }

    /* bubble shield */
    #shield-bubble {
      position: absolute; border-radius: 50%;
      width: 140px; height: 140px;
      border: 3px solid rgba(168,85,247,0.6);
      background: rgba(168,85,247,0.05);
      left: 50%; top: 50%;
      transform: translate(-50%,-50%) scale(0);
      transition: transform 0.6s cubic-bezier(.34,1.56,.64,1);
      pointer-events: none; z-index: 5;
      box-shadow: 0 0 20px rgba(168,85,247,0.3);
    }
    #shield-bubble.active { transform: translate(-50%,-50%) scale(1); }

    /* ════════════════════════════════════════════════════
       SIGNAL BANTER BOX
       ════════════════════════════════════════════════════ */
    .banter-box {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 20px;
      margin-bottom: 14px;
    }
    .signal-direction {
      font-size: 32px; font-weight: 800; letter-spacing: 1px;
      text-transform: uppercase; line-height: 1;
    }
    .signal-buy    { color: var(--green); text-shadow: 0 0 20px rgba(16,185,129,0.4); }
    .signal-sell   { color: var(--red);   text-shadow: 0 0 20px rgba(239,68,68,0.4); }
    .signal-neutral { color: var(--yellow); }
    .banter-line {
      display: flex; gap: 10px; align-items: flex-start;
      padding: 10px; border-radius: 8px; margin-top: 10px;
      font-size: 13px; line-height: 1.5;
    }
    .banter-q     { background: rgba(79,142,247,0.08);  border-left: 3px solid var(--accent); }
    .banter-linda { background: rgba(168,85,247,0.08); border-left: 3px solid var(--linda); }
    .banter-eva   { background: rgba(249,115,22,0.08); border-left: 3px solid var(--eva); }
    .banter-avatar { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
    .banter-name   { font-weight: 700; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 2px; }
    .banter-q     .banter-name { color: var(--accent); }
    .banter-linda .banter-name { color: var(--linda); }
    .banter-eva   .banter-name { color: var(--eva); }

    /* ════════════════════════════════════════════════════
       MARKET DIALS
       ════════════════════════════════════════════════════ */
    .dials-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 14px; }
    .dial-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 16px 14px;
      text-align: center; transition: transform .2s;
    }
    .dial-card:hover { transform: translateY(-2px); }
    .dial-emoji  { font-size: 26px; margin-bottom: 6px; }
    .dial-label  { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
    .dial-value  { font-size: 18px; font-weight: 700; }
    .dial-sub    { font-size: 10px; color: var(--muted); margin-top: 3px; }
    .dial-bar    { height: 4px; border-radius: 99px; background: rgba(255,255,255,.06); margin-top: 8px; }
    .dial-fill   { height: 4px; border-radius: 99px; transition: width .8s ease; }

    /* ════════════════════════════════════════════════════
       CHAT WIDGET
       ════════════════════════════════════════════════════ */
    .chat-widget {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden;
      display: flex; flex-direction: column; height: 800px;
    }
    .chat-header {
      padding: 12px 16px; background: var(--bg3);
      border-bottom: 1px solid var(--border);
      font-size: 13px; font-weight: 600;
      display: flex; align-items: center; gap: 8px;
    }
    .chat-messages {
      flex: 1; overflow-y: auto; padding: 12px 14px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .chat-messages::-webkit-scrollbar { width: 3px; }
    .chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    .chat-msg { font-size: 12px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; max-width: 88%; }
    .chat-msg.user  { align-self: flex-start; background: rgba(79,142,247,0.4); border: 1px solid rgba(79,142,247,0.8); font-weight: 500; font-size: 0.95rem; }
    .chat-msg.q     { align-self: flex-start; background: rgba(79,142,247,0.08); border-left: 2px solid var(--accent); }
    .chat-msg.linda { align-self: flex-start; background: rgba(168,85,247,0.08); border-left: 2px solid var(--linda); }
    .chat-msg.eva   { align-self: flex-start; background: rgba(249,115,22,0.08); border-left: 2px solid var(--eva); }
    .chat-msg .msg-sender { font-size: 10px; font-weight: 700; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .5px; }
    .chat-msg.q     .msg-sender { color: var(--accent); }
    .chat-msg.linda .msg-sender { color: var(--linda); }
    .chat-msg.eva   .msg-sender { color: var(--eva); }
    .chat-input-row {
      display: flex; gap: 8px; padding: 10px 12px;
      border-top: 1px solid var(--border); background: var(--bg3);
    }
    .chat-input {
      flex: 1; background: var(--bg); border: 1px solid var(--border);
      border-radius: 8px; padding: 8px 12px; color: var(--text);
      font-family: var(--sans); font-size: 12px; outline: none;
      transition: border-color .2s;
    }
    .chat-input:focus { border-color: var(--accent); }
    .chat-send-btn {
      padding: 8px 14px; border-radius: 8px; border: none; cursor: pointer;
      background: linear-gradient(135deg, var(--accent), var(--linda));
      color: #fff; font-size: 12px; font-weight: 600; transition: opacity .2s;
    }
    .chat-send-btn:hover { opacity: 0.85; }
    .chat-limit { font-size: 9px; color: var(--muted); text-align: right; padding: 0 12px 6px; }

    /* ════════════════════════════════════════════════════
       ADMIN PANEL
       ════════════════════════════════════════════════════ */
    .admin-lock {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 20px; text-align: center;
    }
    .admin-unlock-form {
      display: flex; gap: 8px; justify-content: center; margin-top: 12px;
    }
    .admin-unlock-input {
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: 8px; padding: 8px 12px; color: var(--text);
      font-family: var(--sans); font-size: 13px; width: 200px; outline: none;
    }
    .admin-unlock-btn {
      padding: 8px 16px; border-radius: 8px; border: none;
      background: var(--accent); color: #fff; cursor: pointer;
      font-weight: 600; font-size: 13px; transition: opacity .2s;
    }
    .admin-unlock-btn:hover { opacity: 0.85; }
    .cmd-row {
      display: flex; align-items: center; justify-content: space-between;
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: 8px; padding: 9px 12px; cursor: pointer;
      transition: background 0.15s, border-color 0.15s; gap: 10px;
    }
    .cmd-row:hover { background: rgba(247,147,26,0.08); border-color: rgba(247,147,26,0.4); }
    .cmd-row.copied { background: rgba(34,197,94,0.12); border-color: #22c55e; }
    .cmd-row code {
      font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
      font-size: 11.5px; color: var(--accent); word-break: break-all; flex: 1;
    }
    .cmd-copy-btn {
      font-size: 10px; color: var(--muted); white-space: nowrap;
      flex-shrink: 0; padding: 2px 6px; border-radius: 4px;
      background: var(--bg2); border: 1px solid var(--border);
    }
    .cmd-row.copied .cmd-copy-btn { color: #22c55e; border-color: #22c55e; }
    .admin-panel-inner { display: none; }
    .admin-only { display: none !important; }
    .admin-toggle {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 0; border-bottom: 1px solid var(--border);
      font-size: 13px;
    }
    .admin-toggle:last-child { border-bottom: none; }
    .toggle-switch {
      width: 40px; height: 22px; border-radius: 99px;
      background: var(--bg3); border: 1px solid var(--border);
      cursor: pointer; position: relative; transition: background .2s;
    }
    .toggle-switch.on { background: var(--green); border-color: var(--green); }
    .toggle-switch::after {
      content:''; position: absolute; width: 16px; height: 16px;
      background: #fff; border-radius: 50%; top: 2px; left: 2px;
      transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
    .toggle-switch.on::after { left: 20px; }

    /* ── Stat grid (system tab) ─── */
    .stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; }
    .stat-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 18px 16px;
      position: relative; overflow: hidden; transition: transform .2s;
    }
    .stat-card:hover { transform: translateY(-2px); }
    .stat-card::before {
      content:''; position:absolute; top:0; left:0; right:0; height:2px;
      background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent)), transparent);
    }
    .stat-icon  { font-size: 20px; margin-bottom: 10px; }
    .stat-label { font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; margin-bottom: 4px; }
    .stat-value { font-size: 26px; font-weight: 700; color: #fff; line-height: 1; }
    .stat-unit  { font-size: 12px; color: var(--muted); margin-left: 2px; }
    .stat-sub   { font-size: 11px; color: var(--muted); margin-top: 4px; }
    .ring-wrap  { position: absolute; top: 14px; right: 14px; }
    svg.ring    { width: 38px; height: 38px; transform: rotate(-90deg); }
    .ring-bg    { fill:none; stroke:rgba(255,255,255,.06); stroke-width:4; }
    .ring-val   { fill:none; stroke-width:4; stroke-linecap:round; transition:stroke-dashoffset .6s ease; }
    .bar-wrap   { background:rgba(255,255,255,.06); border-radius:99px; height:4px; width:60px; }
    .bar-fill   { height:4px; border-radius:99px; transition:width .4s; }
    .bar-fill.cpu { background:var(--accent); }
    .bar-fill.mem { background:var(--linda); }

    /* Process table */
    .proc-table { width:100%; border-collapse:collapse; font-size:12px; }
    .proc-table th { color:var(--muted); font-weight:500; text-align:left; padding:6px 8px; border-bottom:1px solid var(--border); }
    .proc-table td { padding:7px 8px; border-bottom:1px solid rgba(255,255,255,.03); }
    .proc-table tr:hover td { background:rgba(255,255,255,.02); }
    .proc-name { font-family:var(--mono); color:#93c5fd; }
    .s-dot { width:7px; height:7px; border-radius:50%; display:inline-block; margin-right:6px; }
    .s-ok   { background:var(--green); box-shadow:0 0 5px var(--green); }
    .s-warn { background:var(--yellow); }
    .s-err  { background:var(--red); }
    .net-row { display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--border); }
    .net-row:last-child { border-bottom:none; }
    .net-label { font-size:12px; color:var(--muted); }
    .net-val   { font-family:var(--mono); font-size:12px; }
    .log-box {
      background:var(--bg3); border:1px solid var(--border);
      border-radius:8px; padding:12px; height:180px; overflow-y:auto;
      font-family:var(--mono); font-size:11px; line-height:1.7; color:#94a3b8;
      white-space:pre-wrap; word-break:break-all;
    }
    .log-box::-webkit-scrollbar { width:3px; }
    .log-box::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }

    /* Pipeline */
    .pipeline-btn {
      display:inline-flex; align-items:center; gap:8px;
      padding:10px 20px; border-radius:10px;
      background:linear-gradient(135deg,var(--linda),var(--accent));
      border:none; color:#fff; cursor:pointer; font-size:13px; font-weight:600;
      transition:opacity .2s, transform .1s;
    }
    .pipeline-btn:hover { opacity:.9; }
    .pipeline-btn:disabled { opacity:.5; cursor:not-allowed; }
    .pipeline-output {
      margin-top:12px; background:var(--bg3); border:1px solid var(--border);
      border-radius:8px; padding:12px; font-family:var(--mono);
      font-size:11px; color:#94a3b8; display:none;
    }
    .spinner {
      width:14px; height:14px; border:2px solid rgba(255,255,255,.3);
      border-top-color:#fff; border-radius:50%;
      animation:spin .6s linear infinite; display:none;
    }
    @keyframes spin { to{transform:rotate(360deg)} }

    /* Command buttons */
    .cmd-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:10px; margin-bottom:14px; }
    .cmd-btn {
      display:flex; flex-direction:column; align-items:center; gap:6px;
      padding:14px 8px; border-radius:10px;
      background:var(--bg3); border:1px solid var(--border);
      color:var(--text); cursor:pointer; font-family:var(--sans); font-size:12px;
      transition:all .2s;
    }
    .cmd-btn:hover { border-color:var(--accent); background:rgba(79,142,247,.08); color:var(--accent); }
    .cmd-btn span.icon { font-size:20px; }
    .cmd-output {
      background:var(--bg3); border:1px solid var(--border); border-radius:8px;
      padding:12px; min-height:60px; max-height:200px; overflow-y:auto;
      font-family:var(--mono); font-size:11px; color:#94a3b8; line-height:1.7;
      white-space:pre-wrap;
    }

    /* Performance table */
    .perf-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:14px; margin-bottom:20px; }

    /* Footer */
    footer { text-align:center; padding:28px 0 20px; font-size:11px; color:var(--muted); border-top:1px solid var(--border); margin-top:40px; }

    /* Technical Chart */
    .chart-card {
      margin-top: 15px;
      margin-bottom: 25px;
      display: flex;
      flex-direction: column;
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
    }
    .chart-card:hover {
      box-shadow: var(--glow);
    }
    .chart-container-wrapper {
      display: flex;
      flex-direction: column;
      gap: 12px;
      width: 100%;
    }
    .chart-pane {
      width: 100%;
      position: relative;
    }
    .chart-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
      font-size: 11px;
      margin-top: 10px;
      color: var(--muted);
      justify-content: center;
    }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    /* Heartbeat LED indicators */
    .heartbeats {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      margin-right: 12px;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--border);
      padding: 4px 10px;
      border-radius: 6px;
      height: 24px;
      font-size: 10px;
      font-weight: 600;
      color: var(--muted);
    }
    .hb-item {
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .hb-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--muted);
      transition: background 0.3s, box-shadow 0.3s;
    }
    .hb-latency {
      font-family: var(--mono);
      font-size: 9px;
      color: var(--muted);
      font-weight: normal;
    }
    .hb-ok .hb-dot {
      background: var(--green);
      box-shadow: 0 0 6px var(--green);
    }
    .hb-slow .hb-dot {
      background: var(--yellow);
      box-shadow: 0 0 6px var(--yellow);
    }
    .hb-err .hb-dot {
      background: var(--red);
      box-shadow: 0 0 6px var(--red);
    }

    /* Ollama Brainwave ECG */
    .ecg-container {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--border);
      padding: 4px 10px;
      border-radius: 6px;
      height: 24px;
      margin-right: 8px;
    }
    .ecg-label {
      font-size: 9px;
      font-weight: 700;
      color: var(--muted);
      letter-spacing: 0.05em;
    }
    .ecg-svg {
      width: 60px;
      height: 16px;
      overflow: hidden;
    }
    .ecg-path {
      stroke: var(--green);
      stroke-width: 1.5;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
      transition: stroke 0.5s, filter 0.5s;
    }
    @keyframes brainwave-scroll {
      0% { transform: translateX(0); }
      100% { transform: translateX(-60px); }
    }
    .ecg-active .ecg-path {
      animation: brainwave-scroll 1.2s linear infinite;
      stroke: #00e5ff;
      filter: drop-shadow(0 0 3px #00e5ff);
    }
    .ecg-idle .ecg-path {
      animation: brainwave-scroll 4.5s linear infinite;
      stroke: var(--green);
      opacity: 0.6;
    }

    /* Drawdown Gauge styling */
    .drawdown-gauge-container {
      box-sizing: border-box;
      transition: all 0.3s ease;
    }

    @media (max-width:768px) {
      .dials-grid { grid-template-columns:1fr 1fr; }
      .dungeon-wrap { height:200px; }
    }
    /* ── Pipeline Flow Map ── */
    .pipeline-flow-map {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 24px;
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--border);
      border-radius: 8px;
      margin-bottom: 20px;
      gap: 10px;
    }
    .flow-step {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      position: relative;
      flex: 1;
      text-align: center;
    }
    .flow-dot {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--muted);
      border: 3px solid var(--bg2);
      box-shadow: 0 0 0 1px var(--border);
      transition: all 0.3s ease;
    }
    .flow-label {
      font-size: 10px;
      font-family: var(--mono);
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      transition: all 0.3s ease;
      white-space: nowrap;
    }
    .flow-connector {
      height: 2px;
      background: var(--border);
      flex: 2;
      position: relative;
      transition: all 0.3s ease;
    }
    
    /* Flow Active states */
    .flow-step.active-fetcher .flow-dot {
      background: var(--accent);
      box-shadow: 0 0 12px var(--accent), 0 0 0 1px var(--accent);
    }
    .flow-step.active-fetcher .flow-label {
      color: var(--accent);
      text-shadow: 0 0 4px rgba(79,142,247,0.3);
    }
    
    .flow-step.active-eva .flow-dot {
      background: var(--eva);
      box-shadow: 0 0 12px var(--eva), 0 0 0 1px var(--eva);
    }
    .flow-step.active-eva .flow-label {
      color: var(--eva);
      text-shadow: 0 0 4px rgba(249,115,22,0.3);
    }
    
    .flow-step.active-q .flow-dot {
      background: var(--accent);
      box-shadow: 0 0 12px var(--accent), 0 0 0 1px var(--accent);
    }
    .flow-step.active-q .flow-label {
      color: var(--accent);
      text-shadow: 0 0 4px rgba(79,142,247,0.3);
    }
    
    .flow-step.active-linda .flow-dot {
      background: var(--linda);
      box-shadow: 0 0 12px var(--linda), 0 0 0 1px var(--linda);
    }
    .flow-step.active-linda .flow-label {
      color: var(--linda);
      text-shadow: 0 0 4px rgba(168,85,247,0.3);
    }
    
    .flow-step.active-broadcast .flow-dot {
      background: var(--green);
      box-shadow: 0 0 12px var(--green), 0 0 0 1px var(--green);
    }
    .flow-step.active-broadcast .flow-label {
      color: var(--green);
      text-shadow: 0 0 4px rgba(16,185,129,0.3);
    }
    
    @keyframes connector-flow {
      0% { background-position: 100% 0%; }
      100% { background-position: -100% 0%; }
    }
    .flow-connector.active {
      background: linear-gradient(90deg, var(--border) 0%, var(--accent) 50%, var(--border) 100%);
      background-size: 200% 100%;
      animation: connector-flow 1.5s linear infinite;
      box-shadow: 0 0 8px rgba(79, 142, 247, 0.4);
    }
    .flow-connector.active-eva {
      background: linear-gradient(90deg, var(--border) 0%, var(--eva) 50%, var(--border) 100%);
      background-size: 200% 100%;
      animation: connector-flow 1.5s linear infinite;
      box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
    }
    .flow-connector.active-linda {
      background: linear-gradient(90deg, var(--border) 0%, var(--linda) 50%, var(--border) 100%);
      background-size: 200% 100%;
      animation: connector-flow 1.5s linear infinite;
      box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
    }
    
    /* Dialogue console styling upgrades */
    .dialogue-row.eva {
      color: #ff9f55;
    }

/* Global Banner Styles */
.global-banner {
  background: var(--bg2);
  color: var(--fg);
  padding: 10px 16px;
  text-align: center;
  font-family: var(--sans);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 100;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.global-banner.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
}

.global-banner.error {
  background: rgba(239, 68, 68, 0.1);
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.global-banner.warning {
  background: rgba(245, 158, 11, 0.1);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.global-banner.success {
  background: rgba(16, 185, 129, 0.1);
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

/* Skeleton Loaders */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, rgba(255,255,255,0.08) 50%, var(--bg3) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
  border-radius: 4px;
  color: transparent !important;
}
}

/* ── Phase 3: Extracted Classes ──────────────── */
.backup-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.backup-panel-danger { background: rgba(239, 68, 68, 0.06); border: 1px solid rgba(239, 68, 68, 0.25); border-radius: 12px; padding: 16px 18px; }
.panel-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-header .icon { font-size: 18px; }
.panel-header .title { font-weight: 600; font-size: 13px; }
.panel-badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; margin-left: auto; }
.panel-badge.purple { color: #a855f7; background: rgba(168, 85, 247, 0.12); }
.panel-badge.green { color: #22c55e; background: rgba(34, 197, 94, 0.12); }
.panel-badge.red { color: var(--red); background: rgba(239, 68, 68, 0.12); }
.panel-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.panel-help { font-size: 11px; color: var(--muted); margin-top: 8px; }
.panel-select { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 8px; color: var(--text); font-size: 12px; outline: none; margin-bottom: 8px; }
.panel-btn { width: 100%; padding: 10px 14px; color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.panel-btn.primary { background: var(--linda); }
.panel-btn.danger { background: var(--red); }

/* SVG Icons */
.icon-svg { width: 24px; height: 24px; display: inline-block; }
.icon-svg-sm { width: 16px; height: 16px; display: inline-block; }
.stat-icon svg { width: 24px; height: 24px; }

/* Trading Desk Execution Stats */
.exec-stat-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 6px 0; }
.exec-stat-row:last-child { border-bottom: none; }
.exec-stat-label { color: var(--muted); }
.exec-stat-val { margin-left: auto; font-weight: 600; }
.exec-stat-val.mono { font-family: var(--mono); }

/* Dashboards */
.dash-col { display: flex; flex-direction: column; gap: 14px; }
.dash-stat-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.dash-stat-row:last-child { border-bottom: none; }
.dash-stat-label { font-size: 12px; color: var(--muted); }
.dash-stat-val { font-family: var(--mono); font-weight: 600; }
.dash-box { background: var(--bg3); border-radius: 8px; padding: 8px; }
.dash-box-label { font-size: 9px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.dash-box-val { font-size: 14px; font-weight: 700; }
.regime-box { background: rgba(249, 115, 22, 0.08); border: 1px solid rgba(249, 115, 22, 0.2); border-radius: 8px; padding: 12px; }
.shield-box { background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.2); border-radius: 8px; padding: 12px; position: relative; overflow: hidden; }


/* ── Phase 3 Utility Classes ──────────────── */
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.flex-1 { flex: 1 !important; }
.text-primary { color: var(--text) !important; }

/* Intelligence Dashboard Extracted Styles */
.intelligence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
.signal-direction-lg { font-size: 26px; }
.signal-time-sm { font-size: 11px; color: var(--muted); margin-top: 6px; }
.banter-q-nomargin { margin-top: 0; }
.banter-avatar-lg { font-size: 16px; }
.banter-name-sm { font-size: 10px; }
.banter-text-sm { font-size: 11px; }
.dash-box-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }

.dash-stat-label-bold { color: var(--text); font-weight: 600; }
.dash-stat-label-sub { font-size: 10px; color: var(--muted); font-weight: normal; }
.dash-stat-val-lg { font-size: 16px; }
.btn-wrapper { margin-top: auto; padding-top: 10px; text-align: center; }
.btn-outline { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 6px 12px; font-size: 11px; cursor: pointer; transition: background 0.2s; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.success-msg-sm { font-size: 10px; color: var(--green); margin-top: 4px; display: none; }

.regime-label { font-size: 10px; color: var(--eva); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.regime-status-lg { font-size: 16px; font-weight: 700; color: #fff; }
.macro-status-sm { margin-top: 6px; font-size: 11px; padding: 4px 6px; border-radius: 4px; display: none; }

.shield-bg-icon { position: absolute; right: -10px; top: -10px; font-size: 60px; opacity: 0.1; }
.shield-label { font-size: 10px; color: var(--linda); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.shield-status-lg { font-size: 14px; font-weight: 600; color: #fff; }
.shield-sub-sm { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Trading Desk Execution Stats */
.exec-stat-col { flex-direction: column; align-items: flex-start; }
.exec-stat-col-label { font-size: 11px; margin-bottom: 4px; }
.exec-stat-values { display: flex; justify-content: space-between; font-weight: 600; width: 100%; font-size: 11px; }


/* Backup / Restore extracted styles */
.mb-3 { margin-bottom: 12px; }
.panel-label-block { display: block; margin-bottom: 4px; }
.backup-options { display: flex; gap: 16px; margin-bottom: 12px; font-size: 12px; align-items: center; }
.backup-checkbox { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.backup-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.panel-select.flex-1.mb-0 { flex: 1; margin-bottom: 0; }
.panel-btn.danger.restore-btn { padding: 8px 14px; font-size: 11px; flex-shrink: 0; width: auto; }

/* Trading Desk extracted styles */
.stat-card.span-2 { grid-row: span 2; }
.exec-stat-row.col-start { flex-direction: column; align-items: flex-start; }
.exec-stat-label.mb-1 { font-size: 11px; margin-bottom: 4px; }
.pnl-row { display: flex; justify-content: space-between; font-weight: 600; width: 100%; font-size: 11px; }
.connection-status-val { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.utilization-label { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 4px; }
.utilization-track { width: 100%; height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.utilization-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.5s ease; }
.mb-4 { margin-bottom: 20px; }

/* Intelligence Dashboard extracted styles */
.dashboard-3-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 20px; }
.text-center { text-align: center; }
.signal-direction.signal-neutral.skeleton.lg { font-size: 26px; }
.signal-time.skeleton { font-size: 11px; color: var(--muted); margin-top: 6px; }
.mt-0 { margin-top: 0; }
.avatar-lg { font-size: 16px; }
.name-sm { font-size: 10px; }
.text-sm { font-size: 11px; }
.dash-box-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.dash-stat-label.bold { color: var(--text); font-weight: 600; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-xs.muted.normal { font-size: 10px; color: var(--muted); font-weight: normal; }
.reset-baseline-wrap { margin-top: auto; padding-top: 10px; text-align: center; }
.reset-baseline-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 6px 12px; font-size: 11px; cursor: pointer; transition: background 0.2s; }
.reset-baseline-msg { font-size: 10px; color: var(--green); margin-top: 4px; display: none; }
.regime-label { font-size: 10px; color: var(--eva); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.regime-val { font-size: 16px; font-weight: 700; color: #fff; }
.macro-status { margin-top: 6px; font-size: 11px; padding: 4px 6px; border-radius: 4px; display: none; }
.shield-bg-icon { position: absolute; right: -10px; top: -10px; font-size: 60px; opacity: 0.1; }
.shield-label { font-size: 10px; color: var(--linda); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.shield-val { font-size: 14px; font-weight: 600; color: #fff; }
.shield-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.icon-svg-sm.mr-1 { vertical-align: text-bottom; margin-right: 4px; }

/* ════════════════════════════════════════════════════
   NOTIFICATIONS
   ════════════════════════════════════════════════════ */
.notification-bell {
  position: relative;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.notification-bell:hover {
  background: rgba(255,255,255,0.1);
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 10px;
  box-shadow: 0 0 5px var(--red);
}
.notification-badge.hidden {
  display: none;
}
.notification-feed-panel {
  position: fixed;
  top: 65px;
  right: 28px;
  width: 340px;
  max-height: 400px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--glow);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, opacity 0.2s;
}
.notification-feed-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}
.notification-feed-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notification-feed-header h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.notification-feed-header .close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}
.notification-feed-header .close-btn:hover {
  color: white;
}
.notification-feed-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notification-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}
.notification-item-time {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
