/* GelGun Mailer admin: layout and components modelled on Bloomreach Engagement (dark side menu, white work area,
   dense tables, KPI cards, scenario canvas), in GelGun colours (navy menu, orange primary button). */
:root {
  --ink: #0e1823;
  --text2: #384356;
  --muted: #72819a;
  --line: #e1e8f5;
  --line2: #c9d6f0;
  --bg: #ffffff;
  --page: #f6f8fc;
  --canvas: #fafcff;
  --soft: #fbfdff;
  --nav: #04345c;
  --nav2: #032a4b;
  --nav-text: #c9d6f0;
  --primary: #f97316;
  --primary-hover: #ea650b;
  --link: #0089c7;
  --sel: #0b8fc9;
  --green: #00c586;
  --green-bg: #c5ffec;
  --green-line: #46ffc4;
  --red: #f24165;
  --purple: #8873ff;
  --purple-bg: #e7e3ff;
  --purple-line: #c0b5ff;
  --orange: #ffa200;
  --orange-bg: #ffecd0;
  --orange-line: #ffc766;
  --warn-bg: #fff1e5;
  --info-bg: #e8f5fd;
  --radius: 4px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* --- shell --------------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--nav); color: var(--nav-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 18px 18px; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .01em; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand img { width: 30px; height: auto; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--nav-text); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; padding: 8px 0; }
.nav a { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px 0 18px; color: var(--nav-text); font-size: 15px; border-left: 3px solid transparent; }
.nav a:hover { background: var(--nav2); text-decoration: none; color: #fff; }
.nav a.on { color: #fff; border-left-color: var(--primary); background: var(--nav2); font-weight: 600; }
.nav a.on svg { color: var(--primary); }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: 8px 16px; }
.side-foot { margin-top: auto; padding: 14px 18px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot .dot { margin-right: 6px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.mobilebar { display: none; }

/* --- page header ----------------------------------------------------------------------------------- */
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 32px 0; flex-wrap: wrap; }
.head h1 { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.head h1 .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head .crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.head .crumb a { color: var(--muted); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 24px; padding: 0 32px; border-bottom: 1px solid var(--line); margin-top: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 0 10px; font-weight: 600; color: var(--text2); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--primary); }
.subtabs { display: flex; gap: 4px; padding: 12px 32px 0; }
.body { padding: 20px 32px 40px; }
.body.flush { padding: 0; }

/* --- buttons and inputs ---------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line2); background: var(--soft); color: var(--text2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #9fb0cf; background: #fff; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.icon { width: 34px; padding: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 0 12px; height: 32px; font-size: 13px; font-weight: 600; color: var(--text2); cursor: pointer; border-right: 1px solid var(--line2); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--sel); color: #fff; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { height: 36px; border: 1px solid var(--line2); border-radius: var(--radius); padding: 0 10px; background: #fff; width: 100%; }
textarea.input { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.linkbtn { border: 0; background: none; padding: 0; font-size: 12px; font-weight: 600; color: var(--primary); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.field label .linkbtn { margin-left: 8px; }
.input:focus { outline: 2px solid #9ad8f5; outline-offset: -1px; border-color: var(--sel); }
.input:disabled { background: #f3f6fb; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.form-rows { max-width: 820px; }
.form-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.form-row > .lbl { font-size: 13px; color: var(--ink); padding-top: 8px; }
.grid2f { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* --- status dots, badges, banners ---------------------------------------------------------------- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.live, .dot.approved { background: var(--green); }
.dot.sending { background: var(--green); box-shadow: 0 0 0 3px rgba(0,197,134,.25); }
.dot.draft { border: 2px solid #9aa7bd; background: transparent; }
.dot.sent { background: #9aa7bd; }
.dot.stopped { background: var(--red); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; background: #eef2f9; color: var(--text2); white-space: nowrap; }
.badge.live, .badge.approved { background: #dcfaf0; color: #00865b; }
.badge.draft { background: #eef2f9; color: var(--text2); }
.badge.warn { background: var(--warn-bg); color: #b4580b; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--info-bg); color: var(--text2); font-size: 13px; margin-bottom: 16px; }
.banner.warn { background: var(--warn-bg); }
.banner.ok { background: #e3fbf3; }
.banner.bad { background: #fde8ec; border: 1px solid #f5b5c2; align-items: center; }
.banner.bad > div { flex: 1; }
.banner .btn { flex: none; }
.banner b { color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* --- tables ---------------------------------------------------------------------------------------- */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .input { max-width: 280px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { height: 40px; padding: 0 14px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f5f9ff; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.name { font-weight: 600; }
.sub { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.namecell { display: flex; align-items: center; gap: 12px; min-width: 240px; }

/* --- KPI cards and charts ---------------------------------------------------------------------- */
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-h h2 { font-size: 20px; font-weight: 600; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; display: flex; flex-direction: column; min-height: 150px; }
.kpi h3 { font-size: 16px; font-weight: 600; margin: 0; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .v { font-size: 26px; font-weight: 600; margin-top: auto; padding-top: 12px; font-variant-numeric: tabular-nums; }
.kpi .f { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi .f { gap: 8px; }
.kpi .f b { color: var(--ink); font-size: 12px; letter-spacing: 0; white-space: nowrap; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 240px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.funnel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(90px, 1fr); gap: 10px; align-items: end; height: 220px; padding-top: 10px; }
.funnel .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; position: relative; }
.funnel .bar { background: #0098fd; border-radius: 2px 2px 0 0; min-height: 2px; }
.funnel .val { font-weight: 600; font-size: 13px; margin-bottom: 4px; text-align: center; }
.funnel .lab { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
.funnel .pill { position: absolute; top: 40%; right: -14px; transform: translateX(50%); background: #232b39; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px 3px 6px; border-radius: 3px; z-index: 1; clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.tooltip { position: fixed; pointer-events: none; background: #232b39; color: #fff; font-size: 12px; padding: 6px 8px; border-radius: 3px; z-index: 50; white-space: nowrap; }

/* --- scenario canvas ------------------------------------------------------------------------------ */
.canvas-wrap { position: relative; height: calc(100vh - 150px); min-height: 460px; background-color: var(--canvas);
  background-image: radial-gradient(circle, var(--line2) 1px, transparent 1.2px); background-size: 12px 12px; overflow: hidden; border-top: 1px solid var(--line); touch-action: none; cursor: grab; }
.canvas-wrap.dragging { cursor: grabbing; }
.canvas-wrap svg.flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.node { cursor: pointer; }
.node .shape { stroke-width: 2; }
.node.trigger .shape { fill: var(--green-bg); stroke: var(--green-line); }
.node.trigger .ico { color: var(--green); }
.node.operator .shape { fill: var(--purple-bg); stroke: var(--purple-line); }
.node.operator .ico { color: var(--purple); }
.node.action .shape { fill: var(--orange-bg); stroke: var(--orange-line); }
.node.action .ico { color: var(--orange); }
.node:hover .shape { filter: drop-shadow(0 2px 6px rgba(14,24,35,.18)); }
.node.sel .shape { fill: var(--sel); stroke: var(--sel); }
.node.sel .ico { color: #fff; }
.node .k { font-size: 14px; fill: #5b6b7f; }
.node .n { font-size: 16px; fill: #232b39; font-weight: 500; }
.edge { fill: none; stroke: #8695b2; stroke-width: 1.5; }
.edge.yes { stroke: var(--green); }
.edge.no { stroke: var(--red); }
.edge-label { font-size: 14px; font-weight: 700; }
.conn { fill: var(--line2); stroke: var(--canvas); stroke-width: 2; }
.conn.yes { fill: var(--green); }
.conn.no { fill: var(--red); }
.count { font-size: 13px; font-weight: 700; fill: #fff; }
.note-box { font-size: 13px; fill: var(--text2); }
.canvas-tools { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; box-shadow: 0 2px 8px rgba(14,24,35,.06); }
.canvas-tools .z { min-width: 46px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text2); }
.canvas-side { position: absolute; left: 16px; top: 16px; width: 270px; max-height: calc(100% - 32px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 8px rgba(14,24,35,.06); }
.canvas-side h4 { margin: 0; padding: 12px 14px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.canvas-side .it { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.canvas-side .it:hover { background: #f5f9ff; }
.canvas-side .it:last-child { border-bottom: 0; }
.canvas-side .sq { width: 18px; height: 18px; border-radius: 3px; background: var(--orange-bg); border: 1.5px solid var(--orange-line); flex: none; margin-top: 1px; }
.canvas-side .info { padding: 10px 14px; font-size: 12px; color: var(--muted); background: var(--info-bg); }
.legend-nodes { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend-nodes span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid; }
.legend-nodes .lt::before { background: var(--green-bg); border-color: var(--green-line); }
.legend-nodes .lo::before { background: var(--purple-bg); border-color: var(--purple-line); }
.legend-nodes .la::before { background: var(--orange-bg); border-color: var(--orange-line); }

/* --- modal, drawer, toast ---------------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(14,24,35,.45); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 20px; }
.modal { background: #fff; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.25); width: min(840px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.wide { width: min(1320px, 100%); height: calc(100vh - 40px); }
.modal.narrow { width: min(560px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; }
.modal-h h2 { margin: 0; font-size: 20px; font-weight: 600; }
.modal-b { padding: 6px 22px 18px; overflow: auto; flex: 1; min-height: 0; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; box-shadow: -6px 0 24px rgba(0,0,0,.15); z-index: 45; display: flex; flex-direction: column; }
.drawer .modal-b { padding-top: 0; }
.ver { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #232b39; color: #fff; padding: 10px 16px; border-radius: var(--radius); z-index: 60; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast.err { background: var(--red); }

/* --- email editor ------------------------------------------------------------------------------- */
.editor { display: grid; grid-template-columns: minmax(360px, 460px) minmax(0, 1fr); height: calc(100vh - 150px); min-height: 520px; border-top: 1px solid var(--line); }
.editor .blocks { overflow: auto; padding: 18px 20px 40px; border-right: 1px solid var(--line); background: #fff; }
.editor .pv { background: #eef3f6; display: flex; flex-direction: column; min-width: 0; }
.pv-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.pv-frame { flex: 1; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 18px 12px; min-height: 0; }
.editor > * { min-height: 0; }
.pv-frame iframe { border: 0; background: #fff; width: 680px; max-width: 100%; height: 100%; min-height: 600px; box-shadow: 0 2px 12px rgba(14,24,35,.08); }
.pv-frame.mobile iframe { width: 375px; }
.pv-msg { margin: auto; color: var(--muted); text-align: center; max-width: 360px; }
.blk { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; background: #fff; }
.blk > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; font-weight: 600; }
.blk > summary::-webkit-details-marker { display: none; }
.blk > summary .tag { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--muted); }
.blk .in { padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.blk .bi { width: 26px; height: 26px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; background: #eef2f9; color: var(--text2); flex: none; }
.blk .bi svg { width: 15px; height: 15px; }
.list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: start; }
.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.heroes button { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; text-align: left; font-size: 11px; color: var(--muted); }
.heroes button img { width: 100%; display: block; border-radius: 3px; aspect-ratio: 1200 / 960; object-fit: cover; object-position: top; }
.heroes button.on { border-color: var(--sel); }
.picker { border: 1px solid var(--line2); border-radius: var(--radius); max-height: 260px; overflow: auto; }
.picker .p { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.picker .p:last-child { border-bottom: 0; }
.picker .p:hover { background: #f5f9ff; }
.picker .p img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 3px; }
.picker .p.na { opacity: .5; }
.chosen { display: flex; flex-direction: column; gap: 6px; }
.chosen .c { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; }
.chosen .c img { width: 36px; height: 36px; object-fit: contain; }

/* --- login ---------------------------------------------------------------------------------------- */
.login { max-width: 400px; margin: 12vh auto; padding: 28px; border: 1px solid var(--line); border-radius: 8px; }
.login h1 { font-size: 22px; margin: 0 0 6px; }
.login form { display: flex; gap: 8px; margin-top: 18px; }

/* --- phones ---------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 6px 0 24px rgba(0,0,0,.25); }
  .mobilebar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--nav); color: #fff; position: sticky; top: 0; z-index: 20; font-weight: 600; }
  .mobilebar button { background: none; border: 0; color: #fff; padding: 4px; }
  .head, .tabs, .subtabs { padding-left: 16px; padding-right: 16px; }
  .body { padding: 16px 16px 32px; }
  .editor { grid-template-columns: 1fr; height: auto; }
  .editor .blocks { border-right: 0; border-bottom: 1px solid var(--line); }
  .pv-frame iframe { min-height: 640px; }
  .form-row { grid-template-columns: 1fr; gap: 6px; }
  .grid2 { grid-template-columns: 1fr; }
  .canvas-side { display: none; }
  .canvas-wrap { height: 70vh; }
}

/* --- menus, node toolbar, misc (added with the scenario canvas) ------------------------------- */
.popmenu { position: fixed; z-index: 55; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(14,24,35,.14); padding: 4px 0; min-width: 200px; }
.popmenu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 14px; text-align: left; cursor: pointer; font-size: 14px; color: var(--ink); }
.popmenu button:hover { background: #f5f9ff; }
.popmenu button.danger { color: var(--red); }
.popmenu button:disabled { opacity: .45; cursor: not-allowed; }
.node-bar { position: absolute; background: #04345c; border-radius: var(--radius); padding: 2px; display: flex; gap: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.node-bar button { background: none; border: 0; color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; cursor: pointer; border-radius: 3px; }
.node-bar button:hover { background: rgba(255,255,255,.12); }
.badge.sending { background: #dcfaf0; color: #00865b; }
.badge.sent { background: #eef2f9; color: var(--text2); }
.badge .dot { width: 8px; height: 8px; }
.badge .dot.draft { border-width: 1.5px; }
.head h1 .badge { font-size: 12px; }
.blk > summary .tag input { margin: 0 4px 0 0; vertical-align: -2px; }
.canvas-side .it .name { display: flex; gap: 6px; align-items: center; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: #f3f6fb; padding: 1px 5px; border-radius: 3px; }
.node:focus { outline: none; }
.node:focus-visible .shape { stroke: var(--sel); stroke-width: 3; }
.pv-frame iframe[hidden] { display: none; }
.canvas-hint { position: absolute; right: 16px; top: 12px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.85); padding: 4px 8px; border-radius: 3px; }
td.nowrap, th.nowrap { white-space: nowrap; }
.tab-banner { margin: 12px 32px 0; }
@media (max-width: 900px) { .tab-banner { margin: 12px 16px 0; } .canvas-hint { display: none; } }
.crumb .dirty { color: var(--primary); font-weight: 600; }

/* review round 1 */
.kpi.main { border-color: #b8d4f5; background: #f7fbff; }
.kpi h3 .help { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #e1e8f5; color: var(--text2); font-size: 11px; font-weight: 700; cursor: help; vertical-align: 2px; margin-left: 4px; }
.kpi h3 .help:focus { outline: 2px solid var(--sel); }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #f6f8fc; font-size: 14px; cursor: pointer; }
.check-row input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.facts { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.facts li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts li > b:first-child { flex: 0 0 120px; font-weight: 600; color: var(--muted); }
.canvas-side .side-h { display: flex; justify-content: space-between; align-items: center; }
.canvas-side .side-h button { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 10px 14px; }
.canvas-side .side-h button:hover { color: var(--ink); }
.side-open { position: absolute; left: 16px; top: 16px; z-index: 2; }
.canvas-more { position: absolute; right: 16px; top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text2); cursor: pointer; box-shadow: 0 2px 8px rgba(14,24,35,.06); }
.canvas-more:hover { color: var(--ink); }
.locked-note { font-size: 13px; color: var(--muted); align-self: center; margin-right: 4px; }
.next-run { margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.facts .bad { color: #c2193d; }
.card.brake-off { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
