/* analyst-tab.css -- the Production Line pane. Leans on the cg-admin component classes
   (.metric, .seg, .card, .empty, .section-label, table.tbl, .pill, .btn-primary,
   .btn-danger, .field) so its typography is identical to the rest of the admin, and
   adds only the flow-chip data-viz the admin has no equivalent for. All fonts are the
   admin's: EB Garamond (display), DM Sans (body, inherited), DM Mono (.mono / code). */

 .al-cockpit .al-wrap { animation: al-fade .4s ease both; }
@keyframes al-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes al-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* sub-nav: the admin .seg, plus a count badge */
 .al-cockpit .al-subnav { margin-bottom: 18px; }
 .al-cockpit .seg .al-ct { margin-left: 7px; font-size: 11px; min-width: 16px; height: 16px; padding: 0 5px; border-radius: 8px; background: var(--gold); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; }
 .al-cockpit .seg button.on .al-ct { background: rgba(255,255,255,.22); }
 .al-cockpit .al-call .v { color: var(--gold); }   /* gold "awaiting you" metric value */

 .al-cockpit .al-view[hidden] { display: none; }

/* ---- flow chips (board + legend): the cockpit signature, in the admin palette ---- */
 .al-cockpit .al-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
 .al-cockpit .al-fchip { font-size: 12px; padding: 4px 11px; border-radius: 20px; white-space: nowrap; border: 1px solid transparent; }
 .al-cockpit .al-fgate { font-weight: 600; font-family: 'DM Mono', ui-monospace, monospace; font-size: 11.5px; }
 .al-cockpit .al-arrow { color: var(--line-2); }
 .al-cockpit .ph-completed { background: #e7efe0; color: #3f5230; }
 .al-cockpit .ph-running { background: #e7ecef; color: #3c4a55; }
 .al-cockpit .ph-pending { background: #efe9dd; color: #9b9384; }
 .al-cockpit .ph-failed { background: #f3e0db; color: #8a3325; }
 .al-cockpit .gt-approved { background: #e7efe0; color: #3f5230; }
 .al-cockpit .gt-pending { background: #f3e7cb; color: #7a5a13; border-color: #e3cf9e; }
 .al-cockpit .gt-revise { background: #f4e6d2; color: #9a4d00; }
 .al-cockpit .gt-send_back { background: #f3e0db; color: #8a3325; }
 .al-cockpit .gt-auto_pass { background: #eef0ea; color: #5a7d61; }
 .al-cockpit .gt-notify_only { background: #eef0f6; color: #5a6175; }
 .al-cockpit .gt-none { background: #f3efe6; color: #b1a78f; }

/* ---- queue gate cards ---- */
 .al-cockpit .al-queue { display: flex; flex-direction: column; gap: 14px; }
 .al-cockpit .al-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; animation: al-rise .35s ease both; }
 .al-cockpit .al-card:nth-child(2) { animation-delay: .04s; }  .al-cockpit .al-card:nth-child(3) { animation-delay: .08s; }
 .al-cockpit .al-card:nth-child(4) { animation-delay: .12s; }  .al-cockpit .al-card:nth-child(5) { animation-delay: .16s; }
 .al-cockpit .al-card-top { display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
 .al-cockpit .al-gate-badge { width: 38px; height: 38px; flex: none; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-family: 'EB Garamond', Georgia, serif; font-size: 20px; background: #f3e7cb; color: #7a5a13; border: 1px solid #e3cf9e; }
 .al-cockpit .al-card-id { min-width: 0; flex: 1; }
 .al-cockpit .al-card-id .ed { font-family: 'EB Garamond', Georgia, serif; font-size: 18px; line-height: 1.2; }
 .al-cockpit .al-card-id .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
 .al-cockpit .al-card-id .meta .prod { text-transform: capitalize; color: var(--ink); font-weight: 500; }
 .al-cockpit .al-wait { font-size: 11.5px; color: #7a5a13; background: #f3e7cb; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
 .al-cockpit .al-card-body { padding: 16px 18px; }
 .al-cockpit .al-artifact { max-height: 300px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0 0 14px; white-space: pre-wrap; font-family: 'DM Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.55; color: #43403a; }
 .al-cockpit .al-artifact.al-missing { color: var(--muted); font-style: italic; font-family: inherit; white-space: normal; }
 .al-cockpit .al-trunc { font-size: 12px; color: var(--muted); margin: -8px 0 14px; }
 .al-cockpit .al-comment { width: 100%; min-height: 60px; margin-bottom: 10px; }
 .al-cockpit .al-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
 .al-cockpit .al-from { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-left: auto; }
 .al-cockpit .al-from select { width: auto; padding: 6px 9px; font-size: 12.5px; }

/* ---- board run cards ---- */
 .al-cockpit .al-runs { display: flex; flex-direction: column; gap: 12px; }
 .al-cockpit .al-run { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px 18px; animation: al-rise .35s ease both; }
 .al-cockpit .al-run.is-blocked { border-color: #e3cf9e; background: #fefcf6; }
 .al-cockpit .al-run-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 11px; }
 .al-cockpit .al-run-title .ed { font-family: 'EB Garamond', Georgia, serif; font-size: 17px; }
 .al-cockpit .al-run-title .prod { text-transform: capitalize; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
 .al-cockpit .al-run-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 9px; }
 .al-cockpit .al-status { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 20px; }
 .al-cockpit .al-status.b-block { background: #f3e7cb; color: #7a5a13; }
 .al-cockpit .al-status.b-run { background: #e7ecef; color: #3c4a55; }
 .al-cockpit .al-status.b-done { background: #e7efe0; color: #3f5230; }
 .al-cockpit .al-gatecmt { font-size: 12px; color: #7a5a13; margin-top: 8px; }
 .al-cockpit .al-detoggle { background: none; border: 0; color: var(--gold); font-size: 12.5px; cursor: pointer; font-family: inherit; padding: 9px 0 0; }
 .al-cockpit .al-rundetail { margin-top: 11px; padding-top: 4px; border-top: 1px solid var(--line); }
 .al-cockpit .al-rundetail[hidden] { display: none; }

/* ---- board legend ---- */
 .al-cockpit .al-legend { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 13px 16px; margin-bottom: 16px; font-size: 12.5px; display: flex; gap: 26px; flex-wrap: wrap; }
 .al-cockpit .al-legend .lh { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 7px; }
 .al-cockpit .al-legend .lrow { display: flex; gap: 6px; flex-wrap: wrap; }
 .al-cockpit .al-legend .mono { font-family: 'DM Mono', ui-monospace, monospace; }

/* ---- case file (Task 8) ---- */
 .al-cockpit .al-casewrap { animation: al-fade .4s ease both; }
 .al-cockpit .al-case-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
 .al-cockpit .al-case-title { font-size: 23px; }
 .al-cockpit .al-timeline { margin-bottom: 18px; }
 .al-cockpit .al-signals { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
 .al-cockpit .al-status.b-cancel { background: #efe9dd; color: #7c766a; }
 .al-cockpit .al-run.is-cancelled { opacity: .55; }

/* ---- rendered artifacts + diff (Task 9) ---- */
 .al-cockpit .al-art { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 10px; background: var(--white); }
 .al-cockpit .al-art summary { cursor: pointer; font-family: 'EB Garamond', Georgia, serif; font-size: 16px; }
 .al-cockpit .al-rendered { font-size: 13.5px; line-height: 1.6; margin-top: 10px; }
 .al-cockpit .al-rendered h3, .al-cockpit .al-rendered h4, .al-cockpit .al-rendered h5 { font-family: 'EB Garamond', Georgia, serif; margin: 14px 0 6px; }
 .al-cockpit .al-rendered ul { margin: 6px 0 6px 18px; }  .al-cockpit .al-rendered code { font-family: 'DM Mono', monospace; font-size: 12px; background: var(--paper); padding: 1px 5px; border-radius: 4px; }
 .al-cockpit .al-rendered pre { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; overflow: auto; }
 .al-cockpit .al-cmp { background: none; border: 0; color: var(--gold); font-size: 12px; cursor: pointer; font-family: inherit; padding: 4px 0; }
 .al-cockpit .al-diff { font-family: 'DM Mono', monospace; font-size: 12px; line-height: 1.5; border: 1px solid var(--line); border-radius: var(--r); overflow: auto; max-height: 360px; margin-top: 8px; }
 .al-cockpit .al-diff .dl { padding: 0 10px; white-space: pre-wrap; }
 .al-cockpit .al-diff .add { background: #e7efe0; color: #2f5230; }  .al-cockpit .al-diff .del { background: #f3e0db; color: #8a3325; }

/* ---- Desk view (Task 10) ---- */
 .al-cockpit .al-desk { display: flex; flex-direction: column; gap: 10px; }
 .al-cockpit .al-agent { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 13px 18px; }
 .al-cockpit .al-agent.is-active { border-color: #cdd6ce; background: #fbfdfb; }
 .al-cockpit .al-agent-name { font-family: 'EB Garamond', Georgia, serif; font-size: 17px; margin-right: 8px; }
 .al-cockpit .al-agent-state { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink); flex-wrap: wrap; justify-content: flex-end; }
 .al-cockpit .al-status.b-idle { background: #efe9dd; color: #9b9384; }

/* ---- active-phase ETAs (Task 11) ---- */
 .al-cockpit .al-eta { font-size: 12px; color: #3c4a55; }
 .al-cockpit .al-runeta { margin-top: 8px; }

/* ---- Cancel action + Hide declutter (Task 12) ---- */
 .al-cockpit .al-cancelform { margin-top: 8px; }
 .al-cockpit .al-cancelreason { width: 100%; padding: 6px 9px; font-size: 12px; border: 1px solid var(--line-2); border-radius: var(--r); }
 .al-cockpit .al-boardbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
 .al-cockpit .al-hide { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; font-family: inherit; }
 .al-cockpit .al-hide:hover { color: var(--danger); }
 .al-cockpit .al-run.is-hidden { opacity: .5; }
