/* Perspectivas (/targets): targets_screen.dart and its widgets.
   Prefix tgt-. Numbers are Flutter's (logical px, drawn at the shell's 90%). */

.page.tgt-host { inset: 0; padding: 16px var(--gutter) 20px; display: flex; flex-direction: column; overflow: hidden; }
.tgt { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tgt-flex { flex: 1; }
.tgt-muted2 { color: var(--text-2); }

/* ── top bar actions: the forecast pill and the read-only chip ───────────── */
.tgt-acts { display: flex; align-items: center; gap: 8px; }
.tgt-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  font-size: 11px; font-weight: 500; color: var(--text-2);
}
.tgt-pill:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.tgt-pill-ic { color: var(--primary); }
.tgt-pill-x { color: var(--muted); }

/* ── the toolbar (_buildTopBar) ──────────────────────────────────────────── */
.tgt-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex: none; min-height: 36px; }
.tgt-bar .tgt-chip + .tgt-chip { margin-left: -2px; }
.tgt-tabs { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--hover); border: 1px solid var(--border); }
.tgt-tabs button { padding: 7px 12px; border-radius: 6px; border: 1px solid transparent; font-size: 12px; font-weight: 600; line-height: 1.43; color: var(--text-2); }
.tgt-tabs button.is-on { background: var(--card); border-color: var(--border); color: var(--text); }
.tgt-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.tgt-chip.is-neutral { background: var(--surface-light); border: 1px solid var(--border); }
.tgt-chip.is-neutral .ic { color: var(--muted); }
.tgt-chip.is-accent { background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.tgt-chip.is-accent .ic { color: var(--primary); }

/* OutlinedButton.icon / ElevatedButton.icon / TextButton.icon (app_theme.dart) */
.tgt-obtn, .tgt-ebtn, .tgt-tbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 20px 0 16px;
  border-radius: 8px; font-size: 14px; font-weight: 500; letter-spacing: .1px; white-space: nowrap; cursor: pointer;
  transition: background-color 80ms linear;
}
.tgt-obtn { border: 1px solid var(--border); color: var(--text); }
.tgt-obtn:hover { background: var(--hover); }
.tgt-obtn .ic { color: var(--text-2); }
.tgt-ebtn { background: var(--primary); color: #fff; }
.tgt-ebtn:hover { background: color-mix(in srgb, var(--primary) 92%, #000); }
.tgt-ebtn[disabled] { opacity: .6; pointer-events: none; }
.tgt-tbtn { height: 36px; padding: 0 16px; border-radius: 20px; color: var(--primary); }
.tgt-tbtn .ic { margin-left: -4px; }
.tgt-tbtn:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.tgt-tbtn.is-danger { color: var(--error); }
.tgt-obtn.is-wide, .tgt-ebtn.is-wide { width: 100%; }
.tgt-busy { display: none; }
.tgt-ebtn.htmx-request .tgt-idle, form.htmx-request .tgt-ebtn .tgt-idle { display: none; }
.tgt-ebtn.htmx-request .tgt-busy, form.htmx-request .tgt-ebtn .tgt-busy { display: inline-flex; }
.tgt-idle, .tgt-busy { align-items: center; gap: 8px; }
.tgt-idle { display: inline-flex; }
.tgt-spin { display: inline-block; width: 28px; height: 28px; border-radius: 50%; border: 2.4px solid var(--primary); border-right-color: transparent; animation: tgtspin 900ms linear infinite; flex: none; }
.tgt-spin.is-14 { width: 14px; height: 14px; border-width: 2px; border-color: #fff; border-right-color: transparent; }
@keyframes tgtspin { to { transform: rotate(360deg); } }
.tgt-ib { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--text-2); flex: none; }
.tgt-ib:hover { background: var(--hover); }
.tgt-ib.is-danger { color: var(--error); }

/* ── Resumen (targets_overview.py): strip, comparison, breakdown ────────── */
.tgt-ov { flex: 1; min-height: 0; overflow: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 12px; }
.tgt-shimmer { border-radius: 12px; min-height: 200px; }
.tgt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--tc, #7C3AED); }
.tgt-dot.is-10 { width: 10px; height: 10px; }
.tgt-dot.is-12 { width: 12px; height: 12px; }

.tgt-strip { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.tgt-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px 18px; min-width: 0; }
.tgt-tile + .tgt-tile { border-left: 1px solid var(--border); }
.tgt-tile-k { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .3px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgt-tile b { font-size: 19px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgt-tile b .tgt-gap-v { width: auto; font-size: 17px; margin-left: 4px; }
.tgt-tile.is-model b { color: #2F6BFF; }
.tgt-tile small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tgt-cmp { flex: none; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 20px 4px; }
.tgt-crow {
  display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1fr) minmax(220px, 1.4fr) minmax(200px, 1.3fr);
  align-items: center; column-gap: 24px; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.tgt-crow.is-head { padding: 0 0 6px; border-top: 0; font-size: 11px; font-weight: 600; letter-spacing: .3px; color: var(--muted); }
.tgt-crow.is-head .is-r { text-align: right; }
.tgt-crow.is-head .is-c { text-align: center; }
.tgt-crow.is-model { border-top-color: var(--border); background: linear-gradient(90deg, color-mix(in srgb, #2F6BFF 5%, transparent), transparent 60%); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.tgt-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tgt-who b { font-size: 14px; font-weight: 700; }
.tgt-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgt-info { color: var(--muted); display: inline-flex; cursor: help; }
.tgt-numcol { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.tgt-big { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tgt-crow.is-model .tgt-big { color: #2F6BFF; }
.tgt-cov { font-size: 11.5px; color: var(--muted); text-align: right; }
.tgt-gap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tgt-gap-track { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--surface-light); }
.tgt-gap-mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: #2F6BFF; opacity: .55; }
.tgt-gap-fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.tgt-gap-fill.is-near { background: #1FA971; }
.tgt-gap-fill.is-mid { background: #F59E0B; }
.tgt-gap-fill.is-far { background: #EF4444; }
.tgt-gap-v { flex: none; width: 64px; text-align: right; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tgt-gap-v.is-near { color: var(--success); }
.tgt-gap-v.is-mid { color: #B45309; }
.tgt-gap-v.is-far { color: var(--error); }
.tgt-gap-v.is-ref { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.tgt-trk { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.tgt-trk.is-known { color: var(--text-2); }
.tgt-rnote { grid-column: 1 / -1; margin: 6px 0 0 18px; display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.tgt-rnote .ic { color: var(--muted); flex: none; transform: translateY(2px); }
.tgt-rnote span { font-style: italic; }
.tgt-rnote small { flex: none; font-size: 11.5px; color: var(--muted); }
.tgt-cempty { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); padding: 18px 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tgt-cempty b { font-size: 14px; }
.tgt-cempty p { margin: 0; max-width: 640px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.tgt-cempty .tgt-ebtn { margin-top: 6px; }

.tgt-lower { flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.tgt-lower.has-side { grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); }
.tgt-brk { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 20px 10px; min-width: 0; overflow-x: auto; }
.tgt-brk header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.tgt-brk header b { font-size: 14px; }
.tgt-brk header span { font-size: 12px; color: var(--muted); }
.tgt-brk table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tgt-brk th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tgt-brk td { padding: 7px 8px; border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent); white-space: nowrap; }
.tgt-brk tr:last-child td { border-bottom: 0; }
.tgt-brk .is-r { text-align: right; }
.tgt-brk th:first-child, .tgt-brk td:first-child { padding-left: 0; font-weight: 600; }
.tgt-pill-gap { display: inline-block; min-width: 54px; padding: 2px 8px; border-radius: 999px; font-weight: 700; text-align: center; }
.tgt-pill-gap.is-near { color: var(--success); background: color-mix(in srgb, #1FA971 12%, transparent); }
.tgt-pill-gap.is-mid { color: #B45309; background: color-mix(in srgb, #F59E0B 15%, transparent); }
.tgt-pill-gap.is-far { color: var(--error); background: color-mix(in srgb, #EF4444 12%, transparent); }
.tgt-nil { display: inline-block; min-width: 54px; text-align: center; font-size: 15px; line-height: 1; color: var(--muted); opacity: .6; }
.tgt-brk .tgt-muted { margin: 6px 0 0; }

.tgt-silent { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 18px; background: var(--card); border: 1px dashed var(--border); border-radius: 12px; }
.tgt-silent-t { display: flex; flex-direction: column; gap: 2px; }
.tgt-silent-t b { font-size: 13.5px; }
.tgt-silent-t span { font-size: 12px; color: var(--muted); }
.tgt-silent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tgt-silent-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--surface-light); border: 1px solid var(--border); font-size: 12.5px; flex-wrap: wrap; }
.tgt-silent-chip b { font-weight: 600; }
.tgt-silent-chip small { font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) {
  .tgt-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tgt-tile:nth-child(3) { border-left: 0; }
  .tgt-tile:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .tgt-crow { grid-template-columns: minmax(120px, 1fr) minmax(110px, 1fr) minmax(160px, 1.3fr); }
  .tgt-crow > :nth-child(4) { grid-column: 1 / -1; padding-top: 6px; }
  .tgt-crow.is-head > :nth-child(4) { display: none; }
  .tgt-lower.has-side { grid-template-columns: minmax(0, 1fr); }
}

/* The Unidades / Facturación toggle and the sample-prices chip. */
.tgt-unit button[disabled] { opacity: .45; cursor: not-allowed; }
.tgt-chip.is-warn { background: color-mix(in srgb, var(--warning) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); color: var(--warning); }

/* ── Cargar números: the chart card ──────────────────────────────────────── */
.tgt-chartcard { flex: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: clip; margin-bottom: 16px; }
.tgt-chart-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 0 16px; }
.tgt-chart-h > b { font-size: 14px; font-weight: 700; }
.tgt-back { font-size: 11px; color: var(--primary); cursor: pointer; }
.tgt-mode { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--hover); border: 1px solid var(--border); }
.tgt-mode button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 6px; border: 1px solid transparent; font-size: 11px; color: var(--text-2); transition: background-color 150ms; }
.tgt-mode button .ic { color: var(--muted); }
.tgt-mode button.is-on { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 600; }
.tgt-mode button.is-on .ic { color: var(--text); }
.tgt-chart-b { height: 200px; position: relative; }
.tgt-chart-msg { height: 100%; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.tgt-line-plot { position: absolute; inset: 8px 4px 4px; }

/* TargetBarChart: the gutter (legend + y axis) is the grid's label and
   horizon columns, so each group stands over its period's column. */
.tgt-bars { display: flex; height: 100%; padding: 8px 0 4px; }
.tgt-gut { width: var(--gutter); flex: none; display: flex; padding-bottom: 22px; }
.tgt-legend { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; }
.tgt-legend span { display: flex; align-items: center; gap: 6px; padding: 2.5px 0; font-size: 10.5px; color: var(--text-2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center; min-width: 110px; }
.tgt-legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.tgt-yax { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 0 8px 0 6px; font-size: 9px; line-height: 1; color: var(--muted); }
.tgt-yax span { transform: translateY(0); }
.tgt-plot { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tgt-area { flex: 1; position: relative; display: flex; }
.tgt-gl { position: absolute; left: 0; right: 0; height: 0; border-top: .5px solid var(--border); }
.tgt-grp { flex: 1; display: flex; justify-content: center; align-items: flex-end; gap: 2px; position: relative; z-index: 1; }
.tgt-rod { width: 6px; border-radius: 2px; position: relative; }
.tgt-xax { height: 22px; display: flex; flex: none; }
.tgt-xax span { flex: 1; text-align: center; padding-top: 4px; font-size: 9px; color: var(--muted); white-space: nowrap; }

/* ── TargetLevelsGrid ────────────────────────────────────────────────────── */
.tgt-grid {
  flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow-x: clip;
  display: grid; grid-template-columns: 261px 87px repeat(var(--n), minmax(0, 1fr)) 34px; align-content: start;
}
.tgt-row { display: contents; }
.tgt-row > div { border-bottom: .5px solid var(--border); height: 28px; display: flex; align-items: center; min-width: 0; }
.tgt-row > .tgt-l { border-right: 1px solid var(--border); padding: 0 8px 0 calc(36px + var(--depth, 0) * 16px); gap: 6px; }
.tgt-row > .tgt-h { border-right: 1px solid var(--border); justify-content: center; }
.tgt-row > .tgt-p { justify-content: center; }
.tgt-row > .tgt-n { justify-content: center; border-left: 1px solid var(--border); overflow: visible; }
/* A line's note (targets_notes.py): an icon, and a small form under it. */
.tgt-note { position: relative; display: flex; }
.tgt-nbtn { display: grid; place-items: center; width: 26px; height: 22px; border-radius: 5px; color: var(--muted); opacity: .55; }
.tgt-nbtn:hover { opacity: 1; background: var(--hover); }
.tgt-nbtn.is-on { color: var(--tc, var(--primary)); opacity: 1; }
.tgt-nbtn.is-ro { cursor: help; }
.tgt-npop {
  position: absolute; right: -4px; top: calc(100% + 6px); z-index: 20; width: 300px; display: flex; flex-direction: column; gap: 6px;
  padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}
.tgt-npop b { font-size: 13px; }
.tgt-npop small { font-size: 11px; color: var(--muted); }
.tgt-npop textarea { width: 100%; resize: vertical; min-height: 76px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-light); font: inherit; font-size: 12.5px; line-height: 1.45; color: var(--text); outline: none; }
.tgt-npop textarea:focus { border-color: var(--primary); }
.tgt-npop-acts { display: flex; justify-content: flex-end; gap: 6px; }
.tgt-npop .tgt-tbtn { height: 30px; }
.tgt-npop .tgt-ebtn { height: 30px; padding: 0 16px; }
.tgt-row.is-head > div { height: 34px; position: sticky; top: 0; z-index: 3; background: var(--card); }
.tgt-row.is-head .tgt-h b { font-size: 10px; font-weight: 700; color: var(--text); }
.tgt-plabel { font-size: 10px; font-weight: 600; color: var(--text-2); }
.tgt-row.is-scope > div { height: 34px; }
.tgt-row.is-scope.d1 > div, .tgt-row.is-scope.d2 > div { border-top: 1px solid var(--border); }
.tgt-row.is-scope.d0 > div, .tgt-row.is-scope.d1 > div { background: var(--hover); }
.tgt-row.is-scope > .tgt-l { padding: 0 8px 0 calc(8px + var(--depth, 0) * 16px); gap: 0; cursor: pointer; }
.tgt-row.is-scope > .tgt-l:hover { background-image: linear-gradient(var(--hover), var(--hover)); }
.tgt-row.is-scope.is-focus > .tgt-l { background: var(--selected); }
.tgt-chev, .tgt-chev-pad { width: 16px; height: 16px; flex: none; color: var(--muted); display: grid; place-items: center; }
.tgt-scope { flex: 1; min-width: 0; margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgt-row.d0 .tgt-scope { font-weight: 700; }
.tgt-row.is-focus .tgt-scope, .tgt-focus-ic { color: #2F6BFF; }
.tgt-row.is-fc .tgt-sub, .tgt-row.is-fc > .tgt-p, .tgt-row.is-fc > .tgt-h { color: #2F6BFF; font-size: 11px; }
.tgt-row.is-fc > .tgt-p { font-weight: 600; }
.tgt-row.is-fc > .tgt-h b { font-weight: 700; }
.tgt-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgt-row.is-team > div { background: var(--tbg); }
.tgt-row.is-team > .tgt-h { background: var(--tbg2); }
.tgt-row.is-team .tgt-dot { background: var(--tc); }
.tgt-team { flex: 1; min-width: 0; font-size: 11px; font-weight: 600; color: var(--tc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgt-lock { color: var(--muted); }
.tgt-ro { font-size: 11px; font-weight: 500; color: var(--tc); }
/* _TargetCell: plain text until clicked, a gap tint when it has a forecast */
.tgt-c {
  align-self: stretch; flex: 1; margin: 2px; border-radius: 2px; display: grid; place-items: center; min-width: 0;
  font-size: 11px; font-weight: 600; color: var(--tc); background: transparent;
}
.tgt-c.has-gap { color: var(--gc); background: var(--gbg); }
.tgt-c:hover { background-image: linear-gradient(rgba(var(--tint-rgb), .04), rgba(var(--tint-rgb), .04)); }
.tgt-in {
  align-self: stretch; flex: 1; margin: 2px; min-width: 0; border-radius: 2px; border: 1px solid var(--tc); background: var(--gbg, transparent);
  text-align: center; font-size: 11px; font-weight: 600; color: var(--gc, var(--tc)); outline: none; padding: 2px; letter-spacing: .25px;
}
.tgt-row.is-more > div { height: 28px; }
.tgt-row.is-more .tgt-sub { font-style: italic; }

.tgt-gridmsg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: var(--muted); text-align: center; }
.tgt-gridmsg p { width: 380px; margin: 12px 0 0; font-size: 12px; color: var(--text-2); }
.tgt-gridmsg .tgt-obtn { margin-top: 14px; }

/* ── ForecastPicker ──────────────────────────────────────────────────────── */
.tgt-picker-wrap { flex: 1; min-height: 0; display: grid; place-items: center; }
.tgt-picker {
  width: 560px; max-width: 100%; max-height: 640px; display: flex; flex-direction: column; padding: 22px 24px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 24px var(--shadow);
}
.tgt-picker-h { display: flex; align-items: center; gap: 8px; }
.tgt-picker-h b { flex: 1; font-size: 18px; font-weight: 700; letter-spacing: -.15px; line-height: 1.3; }
.tgt-picker-h .tgt-ib { color: var(--muted); }
.tgt-picker-sub { margin: 4px 0 16px; font-size: 12px; line-height: 1.4; color: var(--text-2); }
.tgt-picker-list { overflow: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.tgt-job {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-light) 30%, transparent);
}
.tgt-job.is-ready { background: color-mix(in srgb, var(--surface-light) 60%, transparent); cursor: pointer; }
.tgt-job.is-ready:hover { background-image: linear-gradient(var(--hover), var(--hover)); }
.tgt-job-st { width: 28px; display: grid; place-items: center; color: var(--muted); flex: none; }
.tgt-job-st.is-completed { color: var(--success); }
.tgt-job-st.is-failed, .tgt-job-st.is-cancelled { color: var(--error); }
.tgt-job-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tgt-job-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.tgt-job-name b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgt-job-name code { font-size: 10px; font-family: monospace; color: var(--muted); letter-spacing: 0; }
.tgt-job-txt small { font-size: 11px; color: var(--muted); }
.tgt-job-chip { padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; color: var(--muted); border: 1px solid color-mix(in srgb, currentColor 40%, transparent); background: color-mix(in srgb, currentColor 12%, transparent); }
.tgt-job-chip.is-completed { color: var(--success); }
.tgt-job-chip.is-running { color: var(--primary); }
.tgt-job-chip.is-failed, .tgt-job-chip.is-cancelled { color: var(--error); }
.tgt-job-go { color: var(--muted); }
.tgt-picker-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px; color: var(--muted); }
.tgt-picker-empty b { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.tgt-picker-empty small { font-size: 11px; color: var(--text-2); }

/* ── dialogs (showDialog: a 54% scrim, a 150ms fade) ─────────────────────── */
.tgt-dlg { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 24px 40px; }
.tgt-dlg.is-stacked { z-index: calc(var(--z-modal) + 2); }
.tgt-dlg-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .54); opacity: 0; transition: opacity 150ms linear; }
.tgt-dlg-box {
  position: relative; width: var(--w, 520px); max-width: 100%; max-height: calc(100dvh / var(--zoom) - 48px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14);
  opacity: 0; transform: scale(.98); transition: opacity 150ms linear, transform 150ms var(--ease-out-cubic);
}
.tgt-dlg.is-open .tgt-dlg-scrim, .tgt-dlg.is-open .tgt-dlg-box { opacity: 1; transform: none; }
.tgt-teams { --w: 520px; padding: 20px; max-height: min(620px, calc(100dvh / var(--zoom) - 48px)); }
.tgt-dlg-h { display: flex; align-items: center; gap: 8px; }
.tgt-dlg-h b { flex: 1; font-size: 16px; font-weight: 700; }
.tgt-dlg-d { margin: 4px 0 14px; font-size: 12px; color: var(--muted); }
.tgt-team-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 0; }
.tgt-team-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-light); border: 1px solid var(--border); }
.tgt-team-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tgt-team-txt b { font-size: 13px; font-weight: 600; }
.tgt-team-txt small { font-size: 11px; color: var(--muted); }
.tgt-team-empty { margin: 0; padding: 24px 0; text-align: center; font-size: 13px; color: var(--muted); }
.tgt-dlg-foot { margin-top: 12px; }
.tgt-dlg-foot .tgt-tbtn { padding: 0 12px; }
.tgt-editor { --w: 460px; padding: 20px; max-height: min(560px, calc(100dvh / var(--zoom) - 48px)); }
.tgt-dlg-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.tgt-field { position: relative; display: block; }
.tgt-field input {
  width: 100%; height: 40px; padding: 8px 12px 0; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-light);
  font-size: 14px; outline: none;
}
.tgt-field input:focus { border: 2px solid var(--primary); padding-left: 11px; }
.tgt-field span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-2); pointer-events: none; transition: all 120ms var(--ease-out-cubic); }
.tgt-field input:focus + span, .tgt-field input:not(:placeholder-shown) + span { top: 0; transform: translateY(-50%) scale(.75); transform-origin: left center; background: var(--surface); padding: 0 4px; left: 8px; }
.tgt-field input:focus + span { color: var(--primary); }
.tgt-lbl { margin: 14px 0 6px; font-size: 12px; color: var(--text-2); }
.tgt-lbl + .tgt-members { margin-top: 0; }
.tgt-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
.tgt-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; }
.tgt-sw.is-on { border-color: var(--text); }
.tgt-members { overflow: auto; min-height: 0; flex: 1; }
.tgt-member { display: flex; align-items: center; gap: 16px; min-height: 48px; cursor: pointer; }
.tgt-member input { position: absolute; opacity: 0; pointer-events: none; }
.tgt-box { width: 18px; height: 18px; margin: 0 3px; border-radius: 2px; border: 1.5px solid var(--muted); display: grid; place-items: center; color: transparent; flex: none; }
.tgt-member input:checked + .tgt-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.tgt-member-t { display: flex; flex-direction: column; }
.tgt-member-t span { font-size: 13px; }
.tgt-member-t small { font-size: 11px; color: var(--muted); }
.tgt-muted { font-size: 12px; color: var(--muted); }
.tgt-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.tgt-editor .tgt-ebtn { padding: 0 24px; }
.tgt-upload { --w: 420px; padding: 20px; border-radius: 12px; }
.tgt-ucard { margin: 4px; padding: 16px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.tgt-ucard-h { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.tgt-ucard-h b { font-size: 14px; font-weight: 600; color: var(--text); }
.tgt-ucard p { margin: 6px 0 12px; font-size: 11px; color: var(--muted); }
.tgt-ucard .tgt-obtn { margin-bottom: 8px; }
.tgt-ucard .tgt-obtn .ic { color: inherit; }
.tgt-alert { --w: auto; min-width: 280px; max-width: 560px; padding: 24px; border-radius: 12px; }
.tgt-alert-t { font-size: 24px; font-weight: 400; line-height: 1.33; margin-bottom: 16px; }
.tgt-alert-b { font-size: 14px; color: var(--text-2); overflow: auto; max-width: 480px; }
.tgt-alert-b p { margin: 0 0 4px; }
.tgt-warnline { font-size: 12px; }
.tgt-alert .tgt-dlg-acts { margin-top: 24px; }

/* ── SnackBar (the Scaffold's, so it spans the content, not the sidebar) ─── */
.tgt-toasts { position: absolute; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; flex-direction: column; pointer-events: none; }
.tgt-snack {
  pointer-events: auto; min-height: 48px; display: flex; align-items: center; padding: 14px 16px; font-size: 14px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12);
  animation: tgtsnackin 250ms var(--ease-out-cubic) both;
}
.tgt-snack.is-out { animation: tgtsnackout 200ms linear both; }
@keyframes tgtsnackin { from { transform: translateY(100%); } }
@keyframes tgtsnackout { to { opacity: 0; } }

/* ── the loading frame (_buildShimmer) ───────────────────────────────────── */
.tgt-sk { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.tgt-sk-row { display: flex; align-items: center; gap: 10px; }

/* Flutter draws w600/w700 by emboldening the one Regular file with a
   hairline; Chrome's synthetic bold is a full step heavier. Weight 400 plus
   a stroke reads like the capture (htmx-ui.md, "Flutter's w600 is lighter"). */
.tgt-tabs button, .tgt-scope, .tgt-tile b, .tgt-team, .tgt-c, .tgt-in, .tgt-plabel, .tgt-row.is-head .tgt-h b,
.tgt-row.is-fc > .tgt-p, .tgt-row.is-fc > .tgt-h b, .tgt-chart-h > b, .tgt-mode button.is-on,
.tgt-dlg-h b, .tgt-team-txt b, .tgt-dlg-title, .tgt-ucard-h b, .tgt-picker-h b, .tgt-job-name b, .tgt-job-chip {
  font-weight: 400; -webkit-text-stroke: .3px currentColor;
}
.tgt-c[hidden] { display: none; }
