Files
翅膀喵 dbf162bf74 feat(admin-console): improve route and filter management (#10)
* fix(nuxt): pre-bundle the CommonJS deps of the markdown stack

`debug` and `extend` are imported by micromark and unified through
@elysola/ui. Served unbundled by the dev server they have no default
export, so the console page failed with a 500 in `nuxt dev`.

* docs(deployment): list the fragments and feishu link migrations

The manual `d1 execute` fallback stopped at 0008, and AGENTS.md named
0001..0010 although 0011 already exists.

* feat(storage): persist the per-group route order

Routes used to load in id order, so the order saved from the console
was lost on the next read. Migration 0012 adds `d1_routes.position`:
saving writes each route's index within its own group (saving one group
never shifts another), and routes load by `group_id, position, id`.

A database without the column keeps working: only a "no such column" /
"has no column named" error falls back to the legacy statements, and
nothing is cached, so a later migration is picked up on the next call.

* feat(console): add in-app destructive-action confirmation

Deleting a route or a group used `window.confirm`, which blocks the page
and ignores the console theme. A promise-based `useConfirm()` now drives
one <ConfirmDialog /> built on the reka-ui AlertDialog that
@elysola/ui ships; reka-ui is pre-bundled so dev keeps a single copy and
the dialog stacks with the Rc dialogs.

A request never outlives its asker: one made after the asking component
unmounted resolves false, and one still open when it unmounts is
cancelled.

* feat(console): confirm member and webhook removal

Removing a member, revoking an invite link and disabling a group's
webhook endpoint took effect on the first click. They now ask first;
disabling the webhook explains that senders still using the secret will
be rejected, and its button is styled as destructive.

* feat(console): confirm removing filled editor rows

Filter conditions and groups, delivery targets, saved fragments and forge
hosts vanished on a single click, taking whatever had been typed with
them. Rows holding content now ask first, while empty, never-filled
rows (`isBlankNode`: default operator, no path, no values, not negated)
are still removed directly.

* fix(i18n): remove duplicate button glyphs

"New Route", "New Group" and the group cards' "Open" link render a Plus
or ArrowRight icon next to their label, so the "+" and "→" baked into
the strings appeared twice.

* style(console): redesign route cards for narrow screens

The card was one flex row whose badges, filter chips, targets and five
hand-drawn icon buttons squeezed the route name on small screens. It is
now a grid driven by a container query: name and actions share the top
line, the filter summary (clamped to two lines) and targets follow, and
the tags wrap below; from 40rem the tags move up beside the title.

Targets of the same platform collapse into one tag with a count, long
ids truncate instead of widening the page, and the actions use lucide
icons with accessible labels.

* feat(console): reorder a group's routes by drag or keyboard

The per-card up/down arrows saved after every single step, so moving a
route five places took five writes. A Reorder mode on the group page now
swaps each card's switch for a drag handle: pointer drags (mouse and
touch) slide the neighbours out of the way and auto-scroll near the
viewport edges, Arrow Up/Down on a focused handle moves a card by one
and is announced to screen readers, and nothing is written until Save
order. Cancel or Escape (unless a dialog or list owns it) drops the
draft.

The cards move into a new RouteList component that owns the drag state.

* style(members): align member cards and invite actions

* style(group-editor): size forge and log target controls

Keep source hosts, platform selectors and remove actions aligned without stretching short controls across the dialog. Wrap component roots explicitly so their internal markup cannot break the grid.

* style(route-editor): group options and delivery target fields

Give each target labeled fields and a compact platform header, widen the filter workspace, and align fragment controls. Scroll failed validation into view when the footer is far from the affected section.

* feat(filters): add bilingual suggestions and value validation

Catalog forge events, actions, payload paths and known values with searchable English and Chinese descriptions. Match-value validation mirrors the server and only rejects inputs that cannot match.

* feat(filters): add searchable creatable value inputs

Build a theme-aligned combobox on the shared reka-ui primitives. Rank stored keys before bilingual descriptions, allow validated custom values, and preserve unconfirmed multi-value drafts instead of silently committing them.

* feat(filter-editor): integrate searchable condition inputs

Replace chip-only values with context-aware bilingual inputs and a compact condition grid. Preserve drafts across tree changes, block saves and tests until drafts are resolved, and keep keyword filters free of hidden operators.

* feat(filters): split pasted values without breaking regexes

Accept multiple values separated by commas or lines while retaining commas inside wrapped expressions and raw regex patterns. Pasting replaces the selected range and keeps rejected values as an explicit draft.

* fix(filters): adapt suggestions to the selected operator

Offer literal prefixes and suffixes for substring operators, escaped anchored patterns for regex, and numeric suggestions only for comparisons. Suggestion syntax must mean what the selected matcher actually reads.

* fix(filters): preserve regex meaning when changing operators

Swap wrapped and raw regex sources only when both compile identically after saving. Leave literal, glob, multiline and Unicode-sensitive comparisons unchanged rather than inventing non-equivalent conversions.

* a11y(filter-editor): label type and operator controls

Associate each fixed select with a stable per-condition label while keeping the compact visual layout unchanged.

* fix(editors): ignore accidental backdrop dismissal

Do not discard unsaved route or group edits when the user clicks outside the dialog. Preserve Escape, Cancel and explicit close, including popovers and confirmation dialogs stacked above the editor.

* feat(dispatch)!: scope stop and fallback to each group

A match in one group must not suppress delivery in another group. Track regular matches and stopped scopes independently, and document the routing-table boundary.

BREAKING CHANGE: stop and fallback no longer apply globally across
groups. Put mutually exclusive routes in the same group and define
fallback routes in each group that needs its own catch-all.

* fix(dispatch): honor stop on a matching fallback route

Once a fallback matches with stop enabled, skip later routes of the same group without affecting other groups. Cover multiple fallback routes in the group-isolation regression test.

* style(console): pin theme and language controls to the right

Separate utility controls from page actions so narrow screens retain a readable title column and right-aligned actions below. Wrap long headings without letting them push controls out of view.

* style(groups): place creation beside the aligned group count

Keep the new-group action inside the group list at every width and align the label and count on one baseline with a consistent type scale.

* style(groups): align card footers and keep role badges intact

Give long names two lines, show the current role in its own non-wrapping row, and anchor every card footer to the grid-row bottom regardless of optional source metadata.

* style(logs): prevent filter labels and metadata overflow

Keep filter labels on one line and allow long channel, thread and repository identifiers to wrap instead of widening the page.

* style(console): scale the sidebar and hide mobile tab tracks

Narrow the sidebar proportionally while retaining enough room for both locales. Keep mobile navigation swipeable without a visible horizontal scrollbar.

* feat(console): give each group its own routes URL

Resolve the selected group from /admin/groups/{groupId}, validate console paths, and use browser history for back navigation. Keep Groups active and let an active mobile-tab tap return to the list. Scope pending route loads to their group and retain the count beside long headings.

* feat(console): confirm leaving unsaved page work

Guard route changes when an editor or changed order draft is open. Cancel superseded questions and restore the shown history entry when repeated Back or Forward navigation is refused; only completed navigation resets page work.

* feat(console): confirm sign-out from desktop and mobile

Expose sign-out in the mobile topbar when the sidebar is hidden. Both entry points use the in-app confirmation before navigating to the server logout endpoint.

* fix(console): keep topbar tools clear of very narrow headings

Below 360px, place the full-width heading beneath the breadcrumb and utility row so the three top-right buttons cannot overlap it.

* feat(console): prioritize group titles over actions

Place New Route after Reorder in the group bar. Measure available space and remove the reorder label first, then the creation label, before truncating the group title; remeasure on resize, locale and font changes.

* fix(editors): focus the dialog without selecting its name field

Cancel the non-bubbling FocusScope mount event in the capture phase and focus the dialog itself. Keep keyboard navigation working without highlighting the name or opening the touch keyboard automatically.

* perf(console): preserve one instance across admin navigation

Use a fixed page key instead of remounting the whole console for each URL. Refresh each view when shown and isolate overview metrics and logs so page filters cannot leak into the dashboard.

* fix(console-data): discard superseded load responses

Only the latest request may update a list, its error or loading state. Invalidate pending group loads after a save so an older response cannot restore stale configuration during persistent-console navigation.

* fix(routes): serialize writes and reject unloaded route lists

Whole-list saves must start from loaded data and wait for other route writes. Lock switches and actions during saves, recheck deletion after confirmation, and rebuild saved ordering from the newest route objects.

* fix(editors): scope async results and fragment writes to sessions

A completed save or dry run must not close or overwrite a newer editor. Keep fragment state scoped by group, reject writes until the real list is ready, and retain in-flight fragment locks across navigation.

* fix(groups): serialize edits and isolate group detail panels

Prevent overlapping whole-list writes, avoid duplicate ids after rename, and discard delete confirmations prepared on a page that has since been left. Key member and webhook panels by group so local state cannot cross tenants.

* fix(console): omit the empty action row outside overview

Render the refresh-action container only where it has content so narrow layouts do not reserve a blank row after creation controls move into their page bars.

* perf(metrics): send all seven queries in one D1 batch

Avoid seven sequential network round trips and read totals, breakdowns and recent failures in one consistent transaction. Reuse the failed-send statement and row mapping while retaining group scoping.

* fix(admin-api): bypass browser cache locks for live requests

Use no-store on both client requests and admin responses. Personalized live data must not be reused, and one stalled same-URL cache entry must not block later log requests behind the browser cache lock.

* docs(routes): Clarify fallback hints and document group-scoped stop and fallback upgrade behavior
2026-10-17 21:13:20 +08:00

1682 lines
37 KiB
CSS

@import "tailwindcss";
/* Elysola UI-compatible RGB aliases for app-specific Tailwind utilities. */
@theme inline {
--font-ui: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
--radius-sm: 8px;
--radius: 12px;
--shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
--shadow-card-hover: 0 8px 24px -12px rgba(15, 23, 42, 0.25);
--shadow-accent-lg: 0 12px 28px -10px rgb(var(--wh-accent));
--shadow-modal: 0 12px 40px rgba(15, 23, 42, 0.25);
--animate-rise: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
--color-bg: rgb(var(--wh-bg));
--color-surface: rgb(var(--wh-surface));
--color-surface-2: rgb(var(--wh-surface-2));
--color-surface-3: rgb(var(--wh-surface-3));
--color-border: rgb(var(--wh-border));
--color-border-strong: rgb(var(--wh-border-strong));
--color-text: rgb(var(--wh-text));
--color-muted: rgb(var(--wh-muted));
--color-faint: rgb(var(--wh-faint));
--color-accent: rgb(var(--wh-accent));
--color-accent-strong: rgb(var(--wh-accent-strong));
--color-accent-dim: rgb(var(--wh-accent-dim));
--color-accent-text: rgb(var(--wh-accent-text));
--color-accent-border: rgb(var(--wh-accent-border));
--color-ok: rgb(var(--wh-ok));
--color-ok-dim: rgb(var(--wh-ok-dim));
--color-warn: rgb(var(--wh-warn));
--color-warn-dim: rgb(var(--wh-warn-dim));
--color-bad: rgb(var(--wh-bad));
--color-bad-dim: rgb(var(--wh-bad-dim));
--color-info: rgb(var(--wh-info));
--color-info-dim: rgb(var(--wh-info-dim));
--color-body-text: rgb(var(--wh-body-text));
--color-code-bg: rgb(var(--wh-code-bg));
}
@keyframes rise {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
:root {
color-scheme: light;
--wh-header-bg: rgba(255, 255, 255, 0.82);
--wh-scrim: rgba(15, 23, 42, 0.4);
--wh-knob: #ffffff;
--wh-dot: rgba(15, 23, 42, 0.05);
--wh-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
--wh-bg: 248 250 252;
--wh-surface: 255 255 255;
--wh-surface-2: 248 250 252;
--wh-surface-3: 241 245 249;
--wh-border: 226 232 240;
--wh-border-strong: 203 213 225;
--wh-text: 15 23 42;
--wh-muted: 71 85 105;
--wh-faint: 100 116 139;
--wh-accent: 37 99 235;
--wh-accent-strong: 29 78 216;
--wh-accent-dim: 239 246 255;
--wh-accent-text: 30 64 175;
--wh-accent-border: 191 219 254;
--wh-ok: 22 163 74;
--wh-ok-dim: 240 253 244;
--wh-warn: 217 119 6;
--wh-warn-dim: 255 251 235;
--wh-bad: 220 38 38;
--wh-bad-dim: 254 242 242;
--wh-info: 37 99 235;
--wh-info-dim: 239 246 255;
--wh-body-text: 48 54 61;
--wh-code-bg: 240 241 243;
}
:root.dark,
:root[data-theme="dark"] {
color-scheme: dark;
--wh-header-bg: rgba(15, 20, 28, 0.82);
--wh-scrim: rgba(2, 6, 12, 0.6);
--wh-knob: #dfe4ee;
--wh-dot: rgba(148, 163, 184, 0.08);
--wh-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
--wh-bg: 2 6 23;
--wh-surface: 15 23 42;
--wh-surface-2: 30 41 59;
--wh-surface-3: 51 65 85;
--wh-border: 51 65 85;
--wh-border-strong: 71 85 105;
--wh-text: 241 245 249;
--wh-muted: 148 163 184;
--wh-faint: 100 116 139;
--wh-accent: 96 165 250;
--wh-accent-strong: 147 197 253;
--wh-accent-dim: 30 58 138;
--wh-accent-text: 191 219 254;
--wh-accent-border: 30 64 175;
--wh-ok: 34 197 94;
--wh-ok-dim: 16 36 26;
--wh-warn: 251 191 36;
--wh-warn-dim: 42 36 16;
--wh-bad: 240 82 82;
--wh-bad-dim: 42 22 24;
--wh-info: 59 130 246;
--wh-info-dim: 23 37 84;
--wh-body-text: 195 202 214;
--wh-code-bg: 26 34 48;
}
@layer base {
html,
body {
height: 100%;
}
body {
@apply min-h-screen bg-bg text-text font-ui text-sm leading-[1.55] antialiased;
}
body::before {
content: "";
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
background-image: radial-gradient(var(--wh-dot) 1px, transparent 1px);
background-size: 22px 22px;
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 40%);
}
}
@layer components {
/* ---- Layout ---- */
.shell {
@apply relative z-[1] min-h-screen;
}
.header {
@apply sticky top-0 z-20 flex items-center justify-between gap-4 px-8 py-3.5 border-b border-border;
background: var(--wh-header-bg);
backdrop-filter: blur(12px);
}
.brand {
@apply flex items-center gap-3;
}
.brand-mark {
@apply grid place-items-center h-[38px] w-[38px] rounded-[10px] bg-accent text-white font-extrabold text-[15px] tracking-wide;
}
.brand h1 {
@apply text-lg font-extrabold tracking-tight;
}
.tagline {
@apply mt-px block text-[10px] font-semibold uppercase tracking-[2.5px] text-faint;
}
.main {
@apply relative z-[1] mx-auto max-w-[1040px] px-8 pb-24 pt-8 max-sm:px-4 max-sm:pb-20 max-sm:pt-5;
}
/* ---- Buttons ---- */
.btn {
@apply inline-flex cursor-pointer items-center justify-center gap-2 rounded-sm border border-border-strong bg-surface px-4 py-2 font-ui text-[13px] font-semibold text-text no-underline transition-[border-color,background,color,transform] duration-150;
}
.btn:hover {
@apply border-accent text-accent;
}
.btn:active {
@apply translate-y-px;
}
.btn:disabled {
@apply cursor-not-allowed opacity-50;
}
.btn-accent {
@apply border-accent bg-accent text-white;
}
.btn-accent:hover {
@apply border-accent-strong bg-accent-strong text-white;
}
.btn-ghost {
@apply border-transparent bg-transparent;
}
.btn-ghost:hover {
@apply border-transparent bg-surface-2 text-text;
}
.btn-sm {
@apply px-3 py-1.5 text-xs;
}
.btn-lg {
@apply px-6 py-3 text-sm;
}
/* ---- Cards ---- */
.card {
@apply animate-rise rounded border border-border bg-surface p-5 transition-[border-color,transform] duration-150;
}
.card:hover {
@apply border-border-strong;
}
.card.disabled {
@apply opacity-55;
}
.card-head {
@apply flex items-start justify-between gap-3.5;
}
.card-title {
@apply flex flex-wrap items-center gap-2.5;
}
.route-name {
@apply text-base font-bold tracking-tight;
}
.route-id {
@apply font-mono text-xs text-faint;
}
.badge {
@apply inline-block rounded-full bg-surface-2 px-2 py-0.5 text-[11px] font-semibold text-muted;
}
.badge.lang {
@apply bg-accent-dim text-accent-text;
}
.badge.fallback {
@apply bg-warn-dim text-warn;
}
.badge.stop {
@apply bg-bad-dim text-bad;
}
.card-actions {
@apply flex flex-shrink-0 gap-1.5;
}
/* ---- Route cards ---- */
.route-list {
@apply flex flex-col gap-2.5;
container-type: inline-size;
}
.route-card {
@apply block animate-rise rounded-xl border border-border bg-surface px-4 py-3 shadow-xs transition-all duration-150;
/* Only the entry delay keeps the hidden state: inline transforms (drag) must win afterwards. */
animation-fill-mode: backwards;
}
.route-card:hover {
@apply border-border-strong shadow-sm;
}
.route-card.disabled {
@apply opacity-60;
}
/* Mobile-first: title row with actions, then filters/targets, then the tags. */
.route-row {
@apply grid items-center gap-x-3 gap-y-2;
grid-template-columns: auto minmax(0, 1fr) auto;
grid-template-areas:
"lead title actions"
"body body body"
"tags tags tags";
}
.route-lead {
@apply flex items-center;
grid-area: lead;
}
.route-title {
@apply flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1;
grid-area: title;
}
.route-name {
@apply min-w-0 text-[15px] font-semibold tracking-tight text-text;
overflow-wrap: anywhere;
}
.route-id {
@apply rounded-md bg-surface-2 px-1.5 py-0.5 font-mono text-[11px] text-faint;
}
.route-position {
@apply grid h-5 min-w-5 place-items-center rounded-md bg-accent-dim px-1 font-mono text-[11px] font-semibold text-accent-text tabular-nums;
}
.route-tags {
@apply flex flex-wrap items-center justify-end gap-1.5;
grid-area: tags;
}
.route-actions {
@apply flex items-center gap-0.5;
grid-area: actions;
}
.route-body {
@apply min-w-0 space-y-2;
grid-area: body;
}
@container (min-width: 40rem) {
.route-row {
grid-template-columns: auto minmax(0, 1fr) auto auto;
grid-template-areas:
"lead title tags actions"
". body body body";
}
}
.route-summary {
@apply line-clamp-2 text-[12.5px] leading-relaxed text-muted;
overflow-wrap: anywhere;
}
.route-summary.is-empty {
@apply italic text-faint;
}
.route-badge {
@apply inline-flex items-center gap-1.5 rounded-full border border-border px-2.5 py-0.5 text-[11px] font-medium;
}
.route-badge-dot {
@apply inline-block h-1.5 w-1.5 rounded-full bg-current;
}
.route-badge-discord {
@apply border-accent/20 bg-accent-dim/30 text-accent-text;
}
.route-badge-telegram {
@apply border-info/20 bg-info-dim/30 text-info;
}
.route-badge-feishu {
@apply border-warn/20 bg-warn-dim/30 text-warn;
}
.route-badge-fallback {
@apply border-warn/30 bg-warn-dim/20 text-warn;
}
.route-badge-stop {
@apply border-bad/30 bg-bad-dim/20 text-bad;
}
.route-badge-role {
@apply border-accent/30 bg-accent-dim/20 text-accent-text;
}
.route-card-targets {
@apply flex flex-wrap items-center gap-2 text-xs;
}
.route-target-row {
@apply inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-md border border-border/80 bg-surface-2/60 px-2 py-0.5 text-xs;
}
.route-target-label {
@apply shrink-0 text-[10px] font-bold uppercase tracking-wider text-faint;
}
.route-target-id {
@apply min-w-0 truncate font-mono text-[11.5px] text-text;
}
/* ---- Route reordering ---- */
.route-handle {
@apply grid h-9 w-9 cursor-grab place-items-center rounded-lg text-muted transition-colors hover:bg-surface-2 hover:text-text;
touch-action: none;
}
.route-handle:disabled {
@apply cursor-not-allowed opacity-40 hover:bg-transparent;
}
.route-handle:focus-visible {
@apply outline-2 outline-offset-2 outline-accent;
}
.route-list.is-reordering .route-card {
@apply select-none;
}
.route-list.is-dragging .route-card {
transition: transform 180ms ease;
}
.route-list.is-dragging .route-handle {
@apply cursor-grabbing;
}
.route-list .route-card.is-dragged {
@apply relative z-10 border-accent shadow-lg;
transition: none;
}
.route-list .route-card.is-dragged.is-settling {
transition: transform 150ms ease;
}
.route-list.is-committing .route-card {
transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
.route-list.is-dragging .route-card,
.route-list .route-card.is-dragged.is-settling {
transition: none;
}
}
/* ---- Toggle switch ---- */
.switch {
@apply relative h-[22px] w-[38px] flex-shrink-0;
}
.switch input {
@apply h-0 w-0 opacity-0;
}
.switch .track {
@apply absolute inset-0 cursor-pointer rounded-full border border-border-strong bg-surface-3 transition-[background,border-color] duration-200;
}
.switch .track::after {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
border-radius: 50%;
background: var(--wh-knob);
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
transition: transform 0.18s;
}
.switch input:checked + .track {
@apply border-accent bg-accent;
}
.switch input:checked + .track::after {
transform: translateX(16px);
}
/* ---- Filter chips ---- */
.chips {
@apply mt-3.5 flex flex-wrap gap-2;
}
.chip {
@apply inline-flex items-center gap-1.5 rounded-full bg-surface-2 px-2.5 py-1 text-xs;
}
.chip .f-type {
@apply text-[10px] font-bold uppercase tracking-wider text-faint;
}
.chip .f-val {
@apply font-medium text-text;
}
.chip.exclude {
@apply bg-bad-dim;
}
.chip.exclude .f-type {
@apply text-bad;
}
/* ---- Targets / meta ---- */
.target {
@apply mt-3 flex flex-wrap gap-x-[18px] gap-y-2 text-xs text-muted;
}
.target b {
@apply mr-1 font-semibold tracking-wider text-faint;
}
.target code {
@apply rounded-[5px] bg-surface-2 px-1.5 py-px font-mono text-text;
}
.empty {
@apply py-[72px] text-center text-muted;
}
.empty p {
@apply mb-4;
}
/* ---- Login ---- */
.login {
@apply grid min-h-[62vh] place-items-center;
}
.login-card {
@apply max-w-[420px] rounded-2xl border border-border bg-surface px-[52px] py-12 text-center;
}
.login-card h2 {
@apply mb-2.5 text-[22px] font-extrabold tracking-tight;
}
.login-card p {
@apply mb-6 leading-relaxed text-muted;
}
.login-card code {
@apply rounded-[5px] bg-accent-dim px-1.5 py-px font-mono text-accent;
}
/* ---- Modal editors (RcDialog wrapper) ---- */
.editor-dialog {
display: flex !important;
flex-direction: column !important;
gap: 0 !important;
max-height: calc(100dvh - 2rem) !important;
overflow: hidden !important;
padding: 0 !important;
}
/* The dialog itself takes focus on open (useDialogFocus); its fields show the ring. */
.editor-dialog:focus {
outline: none;
}
.editor-dialog > div:first-child {
margin-bottom: 0 !important;
flex-shrink: 0 !important;
}
.editor-dialog > div:nth-child(2) {
flex: 1 1 0% !important;
min-height: 0 !important;
display: flex !important;
flex-direction: column !important;
padding: 0 !important;
}
.editor-dialog > div:nth-child(3) {
margin-top: 0 !important;
flex-shrink: 0 !important;
padding: 0 !important;
}
.editor-head {
@apply flex items-center justify-between gap-3 border-b border-border px-6 py-4;
background: var(--wh-header-bg);
backdrop-filter: blur(12px);
}
.editor-heading {
@apply flex min-w-0 flex-col gap-0.5;
}
.editor-eyebrow {
@apply text-[10px] font-bold uppercase tracking-[2px] text-accent;
}
.editor-head h2 {
@apply truncate text-base font-extrabold tracking-tight;
}
.editor-body {
@apply flex-1 overflow-y-auto px-6 py-5;
scrollbar-width: thin;
scrollbar-color: var(--wh-scrim) transparent;
}
.editor-section {
@apply mb-7;
}
.editor-section-title {
@apply mb-3.5 flex items-center gap-2.5 text-[10.5px] font-bold uppercase tracking-[1.5px] text-faint;
}
.editor-section-title::after {
content: "";
@apply h-px flex-1 bg-border;
}
.editor-foot {
@apply flex justify-end gap-2 border-t border-border bg-surface px-6 py-4;
box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, 0.18);
}
/* ---- Forms ---- */
.field {
@apply mb-4;
}
.field > label {
@apply mb-1.5 block text-[11px] font-bold uppercase tracking-[1.2px] text-faint;
}
.lbl-note {
@apply font-medium normal-case tracking-normal text-faint;
}
.hint {
@apply mt-1.5 text-[11px] text-faint;
}
.err {
@apply mt-2 min-h-4 text-xs text-bad;
}
.input {
@apply w-full rounded-sm border border-border-strong bg-surface px-3 py-2.5 font-ui text-[13.5px] text-text transition-[border-color,box-shadow] duration-150;
}
.input:focus {
@apply border-accent outline-none ring-[3px] ring-accent-dim;
}
.select {
@apply w-full cursor-pointer rounded-sm border border-border-strong bg-surface px-3 py-2.5 font-ui text-[13.5px] text-text outline-none;
}
.select:focus {
@apply border-accent ring-[3px] ring-accent-dim;
}
.row2 {
@apply grid grid-cols-2 gap-3 max-sm:grid-cols-1;
}
.inline {
@apply flex items-center gap-2;
}
.inline input[type="checkbox"] {
@apply h-4 w-4 accent-accent;
}
.inline span {
@apply text-[12.5px] font-medium text-muted;
}
.templates {
@apply flex flex-wrap gap-1.5;
}
.template-chip {
@apply cursor-pointer rounded-full border border-border-strong bg-surface-2 px-3 py-1 font-ui text-xs font-semibold text-muted transition-[border-color,color,background] duration-150;
}
.template-chip:hover {
@apply border-accent text-accent;
}
.template-chip.active {
@apply border-accent bg-accent-dim text-accent;
}
.filter-row {
@apply mb-2 grid grid-cols-[130px_1fr_auto_auto] items-center gap-2 rounded-sm border border-border bg-surface-2 p-2.5 max-sm:grid-cols-[100px_1fr_auto];
}
.filter-row select {
@apply w-full rounded border border-border-strong bg-surface px-2 py-1.5 font-ui text-[12.5px] font-medium text-text;
}
.filter-row input[type="text"] {
@apply w-full;
}
.option-list {
@apply mb-4 flex flex-col gap-3;
}
.option-row {
@apply flex flex-col items-start gap-1;
}
/* Indented to line up with the checkbox label text. */
.option-hint {
@apply m-0 pl-[1.625rem] text-[11.5px] leading-snug text-faint;
}
.ctl-md {
@apply w-full max-w-64;
}
.ctl-stack {
@apply mt-2 flex w-full max-w-md flex-col gap-2;
}
.target-card {
@apply mb-2 flex flex-col gap-2.5 rounded-lg border border-border bg-surface-2 p-3;
}
.target-card-head {
@apply flex items-center justify-between gap-2;
}
.target-platform {
@apply w-44 max-w-full;
}
.target-field {
@apply grid items-center gap-x-3 gap-y-1;
grid-template-columns: 7rem minmax(0, 28rem);
}
.target-field > label {
@apply text-xs font-semibold text-muted;
}
@media (max-width: 640px) {
.target-field {
grid-template-columns: minmax(0, 1fr);
}
}
.add-filter {
@apply mt-1 w-full justify-center;
}
.forge-source-row {
@apply mb-2 grid items-center gap-2 rounded-lg border border-border bg-surface-2 p-2.5;
grid-template-areas:
"host type del"
"name name name";
grid-template-columns: minmax(0, 1fr) 8rem auto;
}
.forge-source-row .f-host {
grid-area: host;
}
.forge-source-row .f-type {
grid-area: type;
}
.forge-source-row .f-del {
grid-area: del;
}
.forge-source-row .f-name {
grid-area: name;
}
/* ---- Filter combobox (FilterCombobox.vue; its popover is portaled, so not scoped) ---- */
.filter-combo {
position: relative;
width: 100%;
min-width: 0;
}
.filter-combo-anchor {
display: flex;
min-height: 2.25rem;
width: 100%;
align-items: center;
gap: 0.25rem;
border-radius: 0.5rem;
background: rgb(var(--wh-surface));
padding: 0 0.375rem 0 0.75rem;
box-shadow:
inset 0 0 0 1px rgb(var(--wh-border-strong)),
0 1px 2px rgb(0 0 0 / 0.05);
cursor: text;
transition: box-shadow 150ms ease;
}
.filter-combo-anchor:focus-within {
box-shadow: inset 0 0 0 2px rgb(var(--wh-accent));
}
.filter-combo-anchor.is-invalid {
box-shadow: inset 0 0 0 1px rgb(var(--wh-bad));
}
.filter-combo-anchor.is-invalid:focus-within {
box-shadow: inset 0 0 0 2px rgb(var(--wh-bad));
}
.filter-combo-anchor.is-multi {
flex-wrap: wrap;
padding: 0.25rem 0.375rem 0.25rem 0.375rem;
}
.filter-combo-chip {
display: inline-flex;
max-width: 100%;
align-items: center;
gap: 0.25rem;
border-radius: 0.375rem;
background: rgb(var(--wh-accent-dim));
padding: 0.125rem 0.25rem 0.125rem 0.5rem;
color: rgb(var(--wh-accent-text));
font-family: var(--font-mono);
font-size: 0.72rem;
font-weight: 500;
line-height: 1.25rem;
}
.filter-combo-chip.is-invalid {
background: rgb(var(--wh-bad-dim));
color: rgb(var(--wh-bad));
text-decoration: line-through;
text-decoration-color: rgb(var(--wh-bad) / 0.6);
}
.filter-combo-chip.is-invalid .filter-combo-chip-x {
color: rgb(var(--wh-bad));
}
.filter-combo-chip-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.filter-combo-chip-x {
display: grid;
flex: none;
width: 1.125rem;
height: 1.125rem;
place-items: center;
border-radius: 9999px;
color: rgb(var(--wh-accent));
cursor: pointer;
}
.filter-combo-chip-x:hover {
background: rgb(var(--wh-accent) / 0.15);
}
.filter-combo-chip-x:focus-visible {
outline: 2px solid rgb(var(--wh-accent));
outline-offset: 1px;
}
.filter-combo-input {
min-width: 4rem;
flex: 1 1 4rem;
border: 0;
background: transparent;
padding: 0.375rem 0;
color: rgb(var(--wh-text));
font-size: 0.8125rem;
outline: none;
}
.filter-combo-anchor.is-multi .filter-combo-input {
padding-left: 0.375rem;
}
.filter-combo-input.is-mono {
font-family: var(--font-mono);
font-size: 0.78rem;
}
.filter-combo-input::placeholder {
color: rgb(var(--wh-faint));
}
.filter-combo-trigger {
display: grid;
flex: none;
width: 1.5rem;
height: 1.5rem;
place-items: center;
border-radius: 0.375rem;
color: rgb(var(--wh-faint));
}
.filter-combo-trigger:hover {
color: rgb(var(--wh-text));
}
.filter-combo-error {
margin: 0.3rem 0 0;
color: rgb(var(--wh-bad));
font-size: 0.72rem;
}
.filter-combo-pending {
margin: 0.3rem 0 0;
color: rgb(var(--wh-warn));
font-size: 0.72rem;
}
.filter-combo-content {
z-index: 55;
width: max(var(--reka-combobox-trigger-width), 17rem);
max-width: calc(100vw - 1rem);
overflow: hidden;
border-radius: 0.5rem;
background: rgb(var(--wh-surface));
box-shadow:
inset 0 0 0 1px rgb(var(--wh-border)),
0 4px 6px -1px rgb(0 0 0 / 0.1),
0 2px 4px -2px rgb(0 0 0 / 0.1);
color: rgb(var(--wh-text));
}
.filter-combo-content[data-state="open"] {
animation: filter-combo-in 120ms ease-out;
}
@keyframes filter-combo-in {
from {
opacity: 0;
transform: translateY(-2px);
}
}
.filter-combo-viewport {
max-height: min(18rem, var(--reka-combobox-content-available-height, 18rem));
overflow-y: auto;
padding: 0.25rem;
overscroll-behavior: contain;
}
.filter-combo-group {
padding: 0.5rem 0.625rem 0.25rem;
color: rgb(var(--wh-faint));
font-size: 0.65rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.filter-combo-item {
position: relative;
display: flex;
min-height: 2rem;
align-items: center;
gap: 0.75rem;
border-radius: 0.375rem;
padding: 0.375rem 2rem 0.375rem 0.625rem;
font-size: 0.8125rem;
outline: none;
cursor: pointer;
user-select: none;
}
.filter-combo-item[data-highlighted] {
background: rgb(var(--wh-surface-3));
}
.filter-combo-item-value {
flex: none;
font-family: var(--font-mono);
font-size: 0.78rem;
}
.filter-combo-item-hint {
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
color: rgb(var(--wh-muted));
font-size: 0.75rem;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}
.filter-combo-item-check {
position: absolute;
right: 0.5rem;
display: grid;
place-items: center;
color: rgb(var(--wh-accent));
}
.filter-combo-item.is-create {
color: rgb(var(--wh-accent));
font-weight: 600;
}
.filter-combo-item-create {
min-width: 0;
overflow-wrap: anywhere;
}
.filter-combo-note {
margin: 0;
padding: 0.75rem 0.625rem;
color: rgb(var(--wh-faint));
font-size: 0.75rem;
text-align: center;
}
.filter-combo-note.is-error {
color: rgb(var(--wh-bad));
text-align: left;
}
@media (pointer: coarse) {
.filter-combo-item {
min-height: 2.5rem;
}
}
@media (prefers-reduced-motion: reduce) {
.filter-combo-content[data-state="open"] {
animation: none;
}
}
/* ---- Filter tree editor ---- */
.node-editor {
container-type: inline-size;
}
.node-nested {
@apply ml-3 border-l border-border pl-2.5;
}
@container (max-width: 26rem) {
.node-nested {
@apply ml-1 pl-1.5;
}
}
/*
* A condition: type · path · operator on one line with the NOT toggle and
* delete pinned top-right, values below. Narrow containers stack the fields
* under the type. Field filters add a path, keyword filters have no
* operator, and `exists` has no values.
*/
.leaf-row {
@apply grid items-start gap-2 rounded-lg border border-border bg-surface p-2.5;
grid-template-columns: minmax(0, 1fr) auto;
grid-template-areas:
"type actions"
"op op"
"values values";
}
.leaf-row.is-field {
grid-template-areas:
"type actions"
"path path"
"op op"
"values values";
}
.leaf-row.is-keyword {
grid-template-areas:
"type actions"
"values values";
}
.leaf-row.no-values {
grid-template-areas:
"type actions"
"op op";
}
.leaf-row.is-field.no-values {
grid-template-areas:
"type actions"
"path path"
"op op";
}
@container (min-width: 34rem) {
.leaf-row {
grid-template-columns: 9.5rem 9.5rem minmax(0, 1fr) auto;
grid-template-areas:
"type op . actions"
"values values values values";
}
.leaf-row.is-field {
grid-template-columns: 9.5rem minmax(0, 1fr) 9.5rem auto;
grid-template-areas:
"type path op actions"
"values values values values";
}
.leaf-row.is-keyword {
grid-template-columns: 9.5rem minmax(0, 1fr) auto;
grid-template-areas:
"type . actions"
"values values values";
}
.leaf-row.no-values {
grid-template-areas: "type op . actions";
}
.leaf-row.is-field.no-values {
grid-template-areas: "type path op actions";
}
}
.leaf-row.is-negated {
@apply border-bad/40;
}
.leaf-type {
@apply min-w-0;
grid-area: type;
}
.leaf-path {
@apply min-w-0;
grid-area: path;
}
.leaf-op {
@apply min-w-0;
grid-area: op;
}
.leaf-values {
@apply min-w-0;
grid-area: values;
}
.leaf-actions {
@apply flex items-center gap-1 justify-self-end;
grid-area: actions;
}
.node-group {
@apply flex flex-col gap-2 rounded-lg border border-border bg-surface-2 p-2.5;
}
.node-group-head {
@apply flex flex-wrap items-center gap-2;
}
.node-kind > * {
@apply whitespace-nowrap;
}
.node-not-label {
@apply inline-flex items-center rounded-md bg-bad-dim px-2.5 py-1 text-xs font-semibold text-bad;
}
.node-children {
@apply flex flex-col gap-2;
}
.node-empty {
@apply py-1 text-[12px] italic text-muted;
}
.node-add {
@apply flex flex-wrap items-center gap-1;
}
.test-event {
@apply max-w-sm;
}
.test-payload {
@apply font-mono text-[12px];
}
.test-result {
@apply mt-1 flex flex-col gap-1.5 rounded-sm border border-border bg-surface-2 p-2.5;
}
.test-result.ok {
@apply border-ok;
}
.test-badge {
@apply inline-flex w-fit items-center rounded-full bg-bad px-2 py-0.5 text-[11px] font-semibold text-white;
}
.test-result.ok .test-badge {
@apply bg-ok;
}
.test-explanation {
@apply font-mono text-[12px] text-muted;
}
.fragments-presets {
@apply mb-2 flex flex-col gap-1.5;
}
.fragments-list {
@apply mb-2 flex flex-col gap-1.5;
}
.fragment-row {
@apply flex items-center gap-2 rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-1.5;
}
.fragment-name {
@apply min-w-0 flex-1 truncate text-[13px] font-medium text-text;
}
.fragment-action {
@apply shrink-0 px-2 py-1 text-[12px];
}
.fragment-save {
@apply flex max-w-lg items-center gap-2;
}
.fragment-save-input {
@apply min-w-0 flex-1;
}
.log-block {
@apply max-h-72 overflow-auto whitespace-pre-wrap break-all rounded-sm border border-border bg-surface-2 p-2.5 font-mono text-[12px] leading-relaxed text-text;
}
/* ---- Toasts ---- */
.toasts {
@apply pointer-events-none fixed bottom-7 left-1/2 z-[60] flex -translate-x-1/2 flex-col items-center gap-2;
}
.toast {
@apply pointer-events-auto cursor-pointer rounded-full bg-text px-[18px] py-2.5 text-[13px] font-semibold text-white;
}
.toast.ok {
@apply bg-ok;
}
.toast.bad {
@apply bg-bad;
}
/* ---- Tabs ---- */
.tabs {
@apply mb-5 inline-flex gap-0.5 rounded-[10px] border border-border bg-surface-2 p-1;
}
.tab {
@apply cursor-pointer rounded-[7px] border-none bg-transparent px-4 py-1.5 font-ui text-[13px] font-semibold text-muted transition-[background,color] duration-150;
}
.tab:hover {
@apply text-text;
}
.tab.active {
@apply bg-surface text-accent shadow-[0_1px_3px_rgba(15,23,42,0.08)];
}
/* ---- Toolbar / KPIs ---- */
.toolbar {
@apply mb-[18px] flex items-center justify-between;
}
.crumbs {
@apply flex items-center gap-3;
}
.kpi-label {
@apply text-[11px] font-bold uppercase tracking-[1.5px] text-faint;
}
.kpi {
@apply ml-2 text-2xl font-extrabold tracking-tight text-accent;
}
.status {
@apply flex items-center gap-2 text-xs font-medium text-muted;
}
.dot {
@apply h-2 w-2 rounded-full bg-border-strong;
}
.dot.ok {
@apply bg-ok;
}
.dot.bad {
@apply bg-bad;
}
/* ---- Logs / audit ---- */
.log-toolbar {
@apply mb-3.5 flex flex-wrap items-center justify-between gap-3;
}
.log-filters {
@apply flex min-w-0 items-center gap-1.5;
}
/* Never squeezed into a column of single characters on narrow screens. */
.filter-label {
@apply shrink-0 whitespace-nowrap text-[11px] font-bold uppercase tracking-wider text-muted;
}
.filter-select {
@apply cursor-pointer rounded border border-border bg-surface px-2 py-1 text-[13px] text-text outline-none;
}
.filter-select:focus {
@apply border-accent;
}
.log-list {
@apply flex flex-col gap-2.5;
}
.log-entry {
@apply rounded border border-border border-l-[3px] border-l-ok bg-surface p-4 transition-colors duration-150;
}
.log-entry:hover {
@apply border-border-strong;
}
.log-entry.fail {
@apply border-l-bad;
}
.log-entry.clickable {
@apply cursor-pointer;
}
.log-head {
@apply flex flex-wrap items-center gap-2.5;
}
.log-route {
@apply text-sm font-bold tracking-tight;
}
.log-event {
@apply rounded-full bg-accent-dim px-2.5 py-0.5 text-[11px] font-bold uppercase tracking-wide text-accent;
}
.log-time {
@apply ml-auto text-xs font-medium text-faint;
}
.log-meta {
@apply mt-2 flex flex-wrap gap-x-[18px] gap-y-1 text-xs text-muted;
}
.log-meta b {
@apply mr-1 font-semibold tracking-wider text-faint;
}
/* Long ids (channel/thread, repo) wrap instead of widening the page. */
.log-meta span {
@apply min-w-0 [overflow-wrap:anywhere];
}
.log-meta code {
@apply rounded-[5px] bg-surface-2 px-1.5 py-px font-mono text-text;
}
.log-error {
@apply mt-2 rounded-sm bg-bad-dim px-2.5 py-2 text-xs font-medium break-all text-bad;
}
.empty-log {
@apply py-14 text-center text-faint;
}
.log-status {
@apply rounded-full px-2.5 py-0.5 text-[11px] font-bold tracking-wide;
}
.log-status.ok {
@apply bg-ok-dim text-ok;
}
.log-status.bad {
@apply bg-bad-dim text-bad;
}
.log-detail {
@apply max-h-[82vh] w-[calc(100vw-48px)] max-w-[720px] overflow-y-auto rounded border border-border bg-surface p-[22px] shadow-modal;
}
.modal-overlay {
@apply fixed inset-0 z-[60] flex items-center justify-center p-6 backdrop-blur-[2px];
background: var(--wh-scrim);
}
.detail-head {
@apply mb-3.5 flex items-center justify-between;
}
.detail-head h3 {
@apply text-[15px] tracking-wide;
}
.detail-grid {
@apply grid grid-cols-[minmax(120px,30%)_1fr] gap-x-4 gap-y-1.5 text-[13px];
}
.detail-grid dt {
@apply pt-1.5 text-[11px] font-semibold tracking-wide text-faint;
}
.detail-grid dd {
@apply break-all pt-1.5 text-text;
}
.detail-grid code {
@apply rounded-[5px] bg-surface-2 px-1.5 py-0.5 font-mono text-xs;
}
.detail-grid dd code {
@apply whitespace-pre-wrap;
}
/* ---- Members / invites ---- */
/* RcCard (padding="md") already pads the body; no second padding here. */
.members-panel {
@apply mt-7 rounded border border-border bg-surface;
}
.panel-head {
@apply mb-3 flex flex-wrap items-baseline gap-2.5;
}
.panel-head h3 {
@apply text-sm tracking-wide;
}
.members-panel h4 {
@apply my-3.5 mb-2 text-xs;
}
/* Members flow as compact cards: name, role and remove on one line. */
.member-grid {
@apply m-0 mb-3.5 grid list-none gap-2.5 p-0;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.member-card {
@apply grid items-center gap-2 rounded-lg border border-border bg-surface-2 py-1.5 pl-3.5 pr-1.5;
grid-template-columns: minmax(0, 1fr) auto auto;
}
.member-name {
@apply truncate text-[15px] font-semibold tracking-tight text-text;
}
.member-role {
@apply flex w-32 shrink-0 justify-end;
}
.invite-row {
@apply flex flex-wrap items-center gap-x-2.5 gap-y-1.5 rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-1.5;
}
.invite-actions {
@apply ml-auto flex items-center gap-1;
}
.role-pill {
@apply rounded-full px-2.5 py-0.5 text-[11px] font-bold uppercase tracking-wide;
}
.role-pill.owner {
@apply bg-accent-dim text-accent;
}
.role-pill.admin {
@apply bg-ok-dim text-ok;
}
.role-pill.viewer {
@apply border border-border bg-surface text-faint;
}
.member-add,
.invite-create {
@apply flex flex-wrap items-center gap-2;
}
.member-add-login {
@apply min-w-0 max-w-xs;
flex: 1 1 14rem;
}
.invite-box {
@apply mt-3.5 border-t border-dashed border-border pt-1.5;
}
.invite-list {
@apply m-2.5 mb-0 flex list-none flex-col gap-2 p-0;
}
.invite-token {
@apply font-mono text-xs text-muted;
}
.invite-exp {
@apply text-xs text-faint;
}
/* ---- Legal pages ---- */
.legal-body h2 {
@apply mb-2 mt-7 text-[17px] font-bold;
}
.legal-body p,
.legal-body li {
@apply text-[15px] text-body-text;
}
.legal-body a {
@apply text-accent;
}
.legal-body ul {
@apply pl-5;
}
.legal-body code {
@apply rounded-[6px] border border-border bg-code-bg px-1.5 py-px font-mono text-[13px];
}
/* ---- Webhook panel ---- */
.webhook-panel .wh-row {
@apply mb-2 flex flex-wrap items-center gap-2.5;
}
.webhook-panel .wh-label {
@apply min-w-[52px] text-[11px] font-bold uppercase tracking-wider text-muted;
}
.webhook-panel .wh-value {
@apply min-w-[180px] flex-1 rounded-sm border border-border bg-surface-2 px-2.5 py-1.5 text-[12.5px] break-all;
}
.webhook-panel .wh-actions {
@apply mt-1.5 flex gap-2;
}
.webhook-panel .wh-usage {
@apply mt-3.5;
}
.webhook-panel .wh-usage summary {
@apply cursor-pointer text-xs text-muted;
}
.webhook-panel .wh-code {
@apply mt-2.5 overflow-x-auto rounded-sm border border-border bg-surface-2 p-3 text-[11.5px] leading-relaxed text-muted;
}
/* ---- Metrics / stats ---- */
.metric-kpis {
@apply mb-6 grid grid-cols-2 gap-3 max-md:grid-cols-1 sm:grid-cols-3;
}
.metric-kpi {
@apply rounded-sm border border-border bg-surface p-4;
}
.metric-kpi-value {
@apply block text-2xl font-extrabold tracking-tight tabular-nums;
}
.metric-kpi-label {
@apply mt-1 block text-[11px] font-bold uppercase tracking-[1.2px] text-faint;
}
.metric-kpi.accent .metric-kpi-value {
@apply text-accent;
}
.metric-kpi.ok .metric-kpi-value {
@apply text-ok;
}
.metric-kpi.bad {
@apply border-bad/30 bg-bad/5;
}
.metric-kpi.bad .metric-kpi-value {
@apply text-bad;
}
.metric-kpi.warn .metric-kpi-value {
@apply text-warn;
}
.metric-kpi.info .metric-kpi-value {
@apply text-info;
}
.metric-block {
@apply mb-4 rounded border border-border bg-surface p-5;
}
.metric-block-title {
@apply m-0 text-[11px] font-bold uppercase tracking-[1.2px] text-faint;
}
.metric-block-head {
@apply mb-3 flex items-center justify-between gap-2;
}
.metric-block-head .metric-block-title {
@apply mb-0;
}
.metric-sort-toggle {
@apply rounded px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider text-faint transition-colors;
}
.metric-sort-toggle:hover {
@apply bg-surface-3 text-text;
}
.metric-row {
@apply flex items-center gap-3 border-t border-border py-2.5 first:border-t-0 max-sm:flex-wrap;
}
.metric-key {
@apply w-[110px] shrink-0 truncate font-mono text-[12.5px] text-text;
}
.metric-total {
@apply w-12 shrink-0 text-right text-xs font-semibold tabular-nums text-muted;
}
.metric-bar {
@apply flex h-5 flex-1 overflow-hidden rounded bg-surface-3;
}
.metric-fill {
@apply flex items-center justify-center text-[11px] font-bold tabular-nums leading-none text-white/90;
min-width: 0;
transition: flex 0.3s;
}
.metric-fill.ok {
@apply bg-ok;
}
.metric-fill.bad {
@apply bg-bad;
}
.metric-status-row {
@apply flex flex-wrap gap-1.5;
}
.metric-status {
@apply rounded-full px-2.5 py-0.5 text-[11px] font-bold tabular-nums tracking-wide;
}
.metric-status.ok {
@apply bg-ok-dim text-ok;
}
.metric-status.bad {
@apply bg-bad-dim text-bad;
}
}
/* ---- Vue transition glue (lifecycle classes) ---- */
.toast-enter-active,
.toast-leave-active {
transition:
opacity 0.22s,
transform 0.22s;
}
.toast-enter-from,
.toast-leave-to {
opacity: 0;
transform: translateY(12px);
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.2s;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}