/* ============================================================
   VENDORED — DO NOT EDIT BY HAND.
   Source of truth: @blunox/tokens (blunox-shared, tokens.css).
   Copied into blunox-auth at build time by the vendor-tokens make
   target so the hosted login/signup pages share the React consoles'
   brand tokens without importing React. Until @blunox/tokens is
   published this is a PLACEHOLDER copied from blunox-data/shared/ui/src;
   it WILL BE REPLACED by the real package export. Edit the source in
   blunox-shared and re-run the vendor-tokens make target, never this file.
   ============================================================ */

/* ============================================================
   Signature surfaces (console.html §7.5): the agent-build split-pane
   and the live-activity feed / lag heatmap. Ported from the prototype
   agent-build.html + realtime-monitor patterns, re-pointed at tokens.
   ============================================================ */

/* ---- agent-build split-pane ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; height: calc(100vh - var(--topbar-h)); }
.chat { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--card); min-width: 0; }
.chat-hd { display: flex; align-items: center; gap: 11px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.chat-hd .av { width: 30px; height: 30px; border-radius: 8px; background: var(--ac); position: relative; flex-shrink: 0; }
.chat-hd .av::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--card); opacity: .9; }
.chat-hd h3 { font-size: 15px; font-weight: 700; }
.chat-hd .sub { font-size: 11px; color: var(--ink3); }
.chat-hd .kl { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ac-deep); border: 1px solid var(--ac-soft); background: var(--ac-soft); border-radius: 20px; padding: 5px 11px; }
.stream { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 92%; }
.msg.user { align-self: flex-end; background: var(--paper2); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 10px 14px; font-size: 14px; }
.msg.bot { align-self: flex-start; font-size: 14.5px; color: var(--ink); line-height: 1.6; }
.msg.bot p { margin-bottom: 9px; }
.actions-log { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 4px; }
.actions-log .alh { display: flex; align-items: center; gap: 8px; padding: 9px 13px; background: var(--paper); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.actions-log .alh .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); }
.actions-log .alh .chev { margin-left: auto; font-family: var(--font-mono); color: var(--ink3); font-size: 11px; }
.actions-log .alb { padding: 4px 13px 10px; display: flex; flex-direction: column; gap: 6px; }
.actions-log .step { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink2); display: flex; gap: 8px; align-items: baseline; }
.actions-log .step .k { color: var(--ac-deep); }
.actions-log .step.think { color: var(--ink3); font-style: italic; font-family: inherit; }
.datatable { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 6px 0 4px; }
.datatable table { width: 100%; border-collapse: collapse; font-size: 12px; }
.datatable th { text-align: left; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); font-weight: 500; padding: 8px 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.datatable td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--ink2); }
.datatable td .warn { color: var(--status-warn-fg); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.chips button { font-size: 12.5px; font-weight: 600; font-family: inherit; background: var(--card); border: 1px solid var(--ac); color: var(--ac-deep); border-radius: 9px; padding: 8px 13px; cursor: pointer; transition: .12s; }
.chips button:hover { background: var(--ac-soft); }
.perm { border: 1px solid var(--ac); background: linear-gradient(180deg, var(--ac-soft), var(--card)); border-radius: 14px; padding: 15px 16px; margin-top: 4px; }
.perm .ph { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; }
.perm .ph .ic { width: 20px; height: 20px; border-radius: 50%; background: var(--ac); flex-shrink: 0; }
.perm p { font-size: 13px; color: var(--ink2); margin: 8px 0 12px; }
.perm code { font-family: var(--font-mono); background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 11.5px; }
.perm .pbtns { display: flex; gap: 8px; }
.perm .pbtns button { font-family: inherit; font-size: 12.5px; font-weight: 600; border-radius: 8px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--line2); background: var(--card); }
.perm .pbtns .acc { background: var(--ac); color: var(--on-ac); border-color: var(--ac); }
.perm .pbtns .acs { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.typing { display: flex; gap: 4px; padding: 6px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); opacity: .4; animation: blx-tp 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blx-tp { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.composer2 { border-top: 1px solid var(--line); padding: 14px 18px; background: var(--card); }
.composer2 .box { border: 1px solid var(--line2); border-radius: 12px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; }
.composer2 input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 14px; background: transparent; color: var(--ink); }
.composer2 .send { width: 30px; height: 30px; border-radius: 8px; background: var(--ac); border: none; cursor: pointer; color: var(--on-ac); }
.composer2 .opts { display: flex; align-items: center; gap: 14px; margin-top: 9px; font-size: 11.5px; color: var(--ink3); }

.canvas { display: flex; flex-direction: column; background: var(--paper2); min-width: 0; }
.cv-hd { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--card); }
.cv-hd .fn { font-family: var(--font-mono); font-size: 12px; color: var(--ink2); }
.cv-hd .vbadge { font-family: var(--font-mono); font-size: 10.5px; padding: 4px 9px; border-radius: 20px; }
.cv-hd .vbadge.req { background: var(--status-review-bg); color: var(--status-review-fg); }
.cv-hd .vbadge.ok { background: var(--status-ok-bg); color: var(--status-ok-fg); }
.cv-hd .rgt { margin-left: auto; display: flex; gap: 8px; }
.cv-hd .rgt .b { font-size: 12px; font-weight: 600; border: 1px solid var(--line2); border-radius: 8px; padding: 7px 13px; background: var(--card); cursor: pointer; }
.cv-hd .rgt .b.run { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cv-stage { flex: 1; position: relative; overflow: hidden; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.node { position: absolute; width: 150px; background: var(--card); border: 1px solid var(--line2); border-radius: 11px; padding: 11px 12px; box-shadow: 0 4px 14px -8px rgba(40, 30, 10, .3); opacity: 0; transform: scale(.9); transition: .35s; }
.node.show { opacity: 1; transform: scale(1); }
.node .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--ac-soft); border: 1px solid var(--ac); margin-bottom: 8px; position: relative; }
.node .ic::after { content: ""; position: absolute; inset: 7px; border-radius: 3px; background: var(--ac); }
.node .nm { font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; }
.node .ty { font-family: var(--font-mono); font-size: 9.5px; color: var(--ink3); margin-top: 2px; }
.node .check { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; background: var(--status-ok-fg); border: 2px solid var(--card); display: none; }
.node.done .check { display: block; }
svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
svg.wires path { stroke: var(--line2); stroke-width: 2; fill: none; stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset .5s; }
svg.wires path.show { stroke-dashoffset: 0; }
.cv-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink3); gap: 10px; text-align: center; padding: 30px; }
.cv-empty .ec { width: 50px; height: 50px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); position: relative; }
.cv-empty .ec::after { content: ""; position: absolute; inset: 14px; border-radius: 6px; background: var(--ac-soft); border: 1px solid var(--ac); }
.cv-empty p { font-size: 13px; max-width: 30ch; }

/* ---- live activity feed + lag heatmap ---- */
.livefeed { display: flex; flex-direction: column; gap: 10px; }
.livefeed .lf-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); animation: blx-slidein .3s ease; }
.livefeed .lf-row .t { font-size: 13px; color: var(--ink); font-weight: 600; }
.livefeed .lf-row .m { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink3); }
@keyframes blx-slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.livedot { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ac-deep); }
.livedot i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); display: block; animation: blx-pulse 1.6s infinite; }
@keyframes blx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.heatmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.heatcell { border-radius: 10px; padding: 12px 10px; border: 1px solid var(--line); background: var(--card); }
.heatcell .hk { font-family: var(--font-mono); font-size: 10px; color: var(--ink3); }
.heatcell .hv { font-size: 18px; font-weight: 800; margin-top: 4px; }
.heatcell.hot { border-color: var(--status-warn-fg); }
.heatcell.warm { border-color: var(--status-review-fg); }

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; height: auto; }
  .canvas { min-height: 440px; }
  .cv-stage { min-height: 380px; }
}
