/* admin area styles (prefix .adm-): owned by the admin builder. Colour only for status and charts. */

.adm-ai { gap: 4px; }
.adm-h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.adm-sec { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: hsl(var(--muted-foreground)); margin-bottom: 6px; }
.adm-ul { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.adm-err { color: hsl(var(--destructive)); max-width: 260px; }
.grow { flex: 1; min-width: 0; }

/* layout */
.adm-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.adm-split-left { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.adm-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; }
.adm-filters .field { margin-bottom: 12px; }
.adm-row-sel td { background: hsl(var(--muted) / 0.7); }

/* key/value grid */
.adm-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 13px; align-items: center; }
.adm-kv > span:nth-child(odd) { white-space: nowrap; }
.adm-hash { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.adm-kv .mono { font-size: 12px; word-break: break-all; }

/* pipeline stepper */
.adm-pipe { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.adm-pipe-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid hsl(var(--border)); font-size: 13px; }
.adm-pipe-item:last-child { border-bottom: 0; }
.adm-pipe-ico { display: inline-flex; color: hsl(var(--muted-foreground)); flex: none; }
.adm-pipe-item.running .adm-pipe-ico { color: hsl(var(--info)); }
.adm-pipe-item.done .adm-pipe-ico { color: hsl(var(--success)); }
.adm-pipe-item.pending { opacity: .6; }
.adm-pipe-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.adm-pipe-name { font-weight: 500; }
.adm-pipe-fig { color: hsl(var(--muted-foreground)); white-space: nowrap; text-align: right; }

/* log pane */
.adm-log { background: hsl(240 10% 5%); color: hsl(240 5% 84%); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 10px 12px; height: 320px; overflow-y: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.adm-ll { display: flex; gap: 8px; }
.adm-ll .t { color: hsl(240 4% 52%); flex: none; }
.adm-ll .ag { color: hsl(0 0% 98%); flex: none; min-width: 84px; font-weight: 600; }
.adm-ll .m { word-break: break-word; min-width: 0; }
.adm-tot { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; margin-top: 10px; }

/* outputs */
.adm-mods { display: flex; flex-direction: column; gap: 10px; }
.adm-mod { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; }
.adm-mod-n { width: 32px; height: 32px; border: 1px solid hsl(var(--border)); border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; background: hsl(var(--muted)); }
.adm-vids { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.adm-vid { display: flex; gap: 12px; padding: 10px; border: 1px solid hsl(var(--border)); border-radius: var(--radius); }
.adm-vid.out { opacity: .65; }
.adm-thumb { position: relative; width: 112px; aspect-ratio: 16 / 9; background: hsl(240 6% 12%); color: hsl(0 0% 98%); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex: none; align-self: flex-start; }
.adm-thumb .icon { width: 22px; height: 22px; opacity: .85; }
.adm-dur { position: absolute; right: 4px; bottom: 4px; background: rgb(0 0 0 / .75); color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 3px; }
.adm-vid-body { min-width: 0; font-size: 13px; }
.adm-vid-title { font-weight: 500; line-height: 1.3; }
.adm-lesson { font-size: 14px; line-height: 1.6; max-width: 70ch; }
.adm-lesson h4 { margin-bottom: 6px; }
.adm-lesson p { margin-bottom: 8px; }
.adm-cite { font-size: 11px; color: hsl(var(--muted-foreground)); border: 1px solid hsl(var(--border)); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.adm-pre { margin: 0; background: hsl(var(--muted)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 10px; font-size: 11px; line-height: 1.5; max-height: 280px; overflow: auto; white-space: pre-wrap; }
.adm-svgwrap { border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--background)); padding: 8px; }
.adm-svg { width: 100%; height: auto; display: block; }
.adm-svg text { font-family: inherit; fill: hsl(var(--foreground)); }
.adm-svg-title { font-size: 15px; font-weight: 600; }
.adm-svg-step { font-size: 11px; fill: hsl(var(--muted-foreground)) !important; }
.adm-svg-node { fill: hsl(var(--muted)); stroke: hsl(var(--border)); stroke-width: 1.5; }
.adm-svg-node.hi { fill: hsl(var(--primary)); stroke: hsl(var(--primary)); }
.adm-svg-label { font-size: 11.5px; font-weight: 500; }
.adm-svg-label.hi { fill: hsl(var(--primary-foreground)) !important; }
.adm-svg-arrow { stroke: hsl(var(--muted-foreground)); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.adm-q { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.adm-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-opts li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; border: 1px solid transparent; }
.adm-opts li.ok { border-color: hsl(var(--success) / .4); background: hsl(var(--success) / .08); }
.adm-opts li.ok .icon { color: hsl(var(--success)); width: 14px; height: 14px; }
.adm-opt-gap { width: 14px; flex: none; }
.adm-overlap { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 24px; align-items: center; }

/* review */
.adm-flow { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.adm-flow-node { padding: 3px 10px; border-radius: 999px; border: 1px solid hsl(var(--border)); font-size: 12px; color: hsl(var(--muted-foreground)); }
.adm-flow-node.cur { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); font-weight: 600; }
.adm-flow-arrow { display: inline-flex; color: hsl(var(--muted-foreground)); }
.adm-flow-arrow .icon { width: 14px; height: 14px; }
.adm-checks { display: flex; flex-direction: column; border: 1px solid hsl(var(--border)); border-radius: var(--radius); }
.adm-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid hsl(var(--border)); cursor: pointer; font-size: 14px; }
.adm-check:last-child { border-bottom: 0; }
.adm-check > span { display: flex; flex-direction: column; gap: 2px; }
.adm-check input { margin-top: 2px; }
.adm-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-q-item { align-items: flex-start; }
.adm-q-item.sel { background: hsl(var(--muted)); box-shadow: inset 0 0 0 1px hsl(var(--ring) / .35); }
.adm-q-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 14px; }

/* costs */
.adm-ringrow { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.adm-spark { width: 100%; overflow: hidden; }
.adm-spark svg { width: 100%; height: auto; }

/* tenants */
.adm-grp { border: 1px solid hsl(var(--border)); border-radius: var(--radius); margin-bottom: 8px; background: hsl(var(--card)); }
.adm-grp > summary { cursor: pointer; padding: 8px 12px; font-size: 13px; display: flex; align-items: center; gap: 8px; list-style: none; }
.adm-grp > summary::-webkit-details-marker { display: none; }
.adm-setrows { border-top: 1px solid hsl(var(--border)); }
.adm-setrow { display: flex; justify-content: space-between; gap: 16px; padding: 6px 12px; border-bottom: 1px solid hsl(var(--border) / .6); flex-wrap: wrap; }
.adm-setrow:last-child { border-bottom: 0; }
.adm-ref { display: inline-flex; align-items: center; gap: 4px; color: hsl(var(--muted-foreground)); word-break: break-all; }
.adm-ref .icon { width: 12px; height: 12px; }
.adm-sw { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid hsl(var(--border)); flex: none; }
.adm-brand { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.adm-logo { width: 56px; height: 56px; border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--muted)); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: none; }
.adm-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.adm-phase { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

@media (max-width: 960px) {
  .adm-split, .adm-split-even, .adm-split-left, .adm-overlap { grid-template-columns: minmax(0, 1fr); }
  .adm-vids { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .adm-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .adm-kv > span:nth-child(even) { margin-bottom: 8px; }
  .adm-vid { flex-direction: column; }
  .adm-thumb { width: 100%; }
}
