/* ════════════════════════════════════════════════════════════════════
   workspace-routines.css — pure liquid glass throughout

   Every surface is frosted glass on the page's animated colored orbs:
     • cards          → translucent panels with blur + soft inset highlight
     • dialogs        → frosted modals on a frosted backdrop
     • tabs / pills   → glass chips with subtle borders
     • status dots    → soft glowing color spots (no flat fills)
     • timeline dots  → tiny glass beads

   Naming: every class is .rt-* (Routines) to keep the surface isolated
   from the rest of Workspace. Layout primitives reuse .ws-btn from
   workspace.css (already pure-glass) so buttons match across the app.
   ════════════════════════════════════════════════════════════════════ */

/* ─── Section head-action row (shared with Agents/Reminders) ────── */
.ws-section__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ─── Loading / spinner ─────────────────────────────────────────── */
.rt-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 28px 22px;
  font: 500 13px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.70);
}
.rt-spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.78);
  animation: rt-spin 700ms linear infinite;
}
@keyframes rt-spin { to { transform: rotate(360deg) } }

/* ─── Hero / empty-state ────────────────────────────────────────── */
.rt-hero {
  display: flex; flex-direction: column; gap: 20px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px) saturate(170%);
  -webkit-backdrop-filter: blur(40px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 30px 80px rgba(0, 0, 0, 0.30);
}
.rt-hero__head { max-width: 720px; }
.rt-hero__eyebrow {
  font: 600 10.5px/1 ui-sans-serif, system-ui;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.rt-hero__title {
  font: 600 28px/1.18 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  margin: 8px 0 6px;
}
.rt-hero__sub {
  font: 400 14px/1.55 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.66);
  max-width: 620px;
  margin: 0;
}
.rt-hero__cta {
  display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap;
}

/* ─── Template gallery ──────────────────────────────────────────── */
.rt-template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.rt-template-tile {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
  text-align: left; cursor: pointer;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: inherit;
  transition: transform 180ms cubic-bezier(.2,.7,.2,1),
              border-color 180ms ease,
              background 180ms ease;
}
.rt-template-tile:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.18);
}
.rt-template-tile__head {
  display: flex; align-items: center; justify-content: space-between;
}
.rt-template-tile__icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font: 600 14px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.88);
}
.rt-template-tile__cat {
  font: 500 10px/1 ui-sans-serif, system-ui;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.50);
  padding: 4px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}
.rt-template-tile__title {
  font: 600 14px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-template-tile__sub {
  font: 400 12px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.62);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.rt-template-tile__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 6px;
}
.rt-template-tile__sched {
  font: 500 11px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
}
.rt-template-tile__chips { display: flex; gap: 4px; }

/* ─── Filter tabs ───────────────────────────────────────────────── */
.rt-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rt-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  font: 500 12.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.rt-tab:hover { color: rgba(255, 255, 255, 0.88); background: rgba(255, 255, 255, 0.04); }
.rt-tab.rt-is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.98);
}
.rt-tab__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.10);
  font: 600 10.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.88);
}

/* ─── Vacation toggle (head action) ─────────────────────────────── */
.rt-vacation-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  font: 500 12.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  cursor: pointer;
}
.rt-vacation-toggle:hover { border-color: rgba(255, 255, 255, 0.20); }
.rt-vacation-toggle.rt-is-on {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
  color: rgba(254, 215, 170, 0.96);
}
.rt-vacation-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(120, 220, 150, 0.95), rgba(60, 160, 110, 0.85));
  box-shadow: 0 0 10px rgba(120, 220, 150, 0.55);
}
.rt-vacation-toggle.rt-is-on .rt-vacation-dot {
  background: radial-gradient(circle at 35% 30%, rgba(255, 200, 120, 0.95), rgba(220, 140, 60, 0.85));
  box-shadow: 0 0 12px rgba(255, 200, 120, 0.55);
}
.rt-awaiting-chip {
  display: inline-flex; align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font: 600 11px/1 ui-sans-serif, system-ui;
  color: rgba(254, 215, 170, 0.96);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.30);
  margin-right: 4px;
}

/* ─── Vacation banner (full-width when on) ──────────────────────── */
.rt-vacation-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: rgba(245, 158, 11, 0.08);
  backdrop-filter: blur(34px) saturate(170%);
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  border: 1px solid rgba(245, 158, 11, 0.24);
}
.rt-vacation-banner__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.16);
  color: rgba(254, 215, 170, 0.96);
  font: 700 18px/1 ui-sans-serif, system-ui;
}
.rt-vacation-banner__body { flex: 1; }
.rt-vacation-banner__title {
  font: 600 13.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(254, 240, 200, 0.96);
}
.rt-vacation-banner__sub {
  font: 400 12.5px/1.5 ui-sans-serif, system-ui;
  color: rgba(254, 240, 200, 0.72);
  margin-top: 3px;
}

/* ─── Intelligence strip (agent-suggested routines) ─────────────── */
.rt-intel-strip {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 14px;
}
.rt-intel-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(140, 110, 255, 0.06);
  backdrop-filter: blur(32px) saturate(170%);
  -webkit-backdrop-filter: blur(32px) saturate(170%);
  border: 1px solid rgba(170, 140, 255, 0.18);
}
.rt-intel-card__spark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(170, 140, 255, 0.16);
  color: rgba(220, 200, 255, 0.96);
  font: 600 16px/1 ui-sans-serif, system-ui;
}
.rt-intel-card__body { flex: 1; }
.rt-intel-card__title {
  font: 600 13.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-intel-card__sub {
  font: 400 12.5px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.66);
  margin-top: 3px;
}
.rt-intel-card__actions { display: flex; gap: 6px; }

/* ─── Routine card grid ─────────────────────────────────────────── */
.rt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.rt-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(34px) saturate(170%);
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 20px 50px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.2,.7,.2,1),
              border-color 180ms ease,
              background 180ms ease;
}
.rt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}
.rt-card__head {
  display: flex; align-items: center; justify-content: space-between;
}
.rt-card__status { display: flex; align-items: center; gap: 8px; }
.rt-card__status-text {
  font: 500 11px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.70);
}
.rt-card__tier {
  font: 600 10px/1 ui-sans-serif, system-ui;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.60);
}
.rt-card__title {
  font: 600 15px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  margin: 0;
}
.rt-card__sched {
  display: flex; align-items: center; gap: 7px;
  font: 500 12px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.68);
}
.rt-card__sched-icon { opacity: 0.7; }
.rt-card__peek {
  display: flex; align-items: center; gap: 8px;
  padding-top: 4px;
}
.rt-card__peek-label {
  font: 500 10.5px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}
.rt-card__peek-status {
  font: 600 11.5px/1 ui-sans-serif, system-ui;
}
.rt-card__peek-time {
  font: 400 11px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
  margin-left: auto;
}
.rt-card__cost { margin-top: auto; }
.rt-card__actions {
  display: flex; gap: 6px;
  padding-top: 4px;
}
.rt-btn-sm { font-size: 12px !important; padding: 6px 10px !important; }
.rt-btn-lg { font-size: 14px !important; padding: 10px 18px !important; }

/* ─── Connector ribbon ──────────────────────────────────────────── */
.rt-ribbon {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.rt-ribbon--empty {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.45);
  padding: 6px 0;
}
.rt-ribbon__chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 600 10.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.88);
}
.rt-ribbon__more {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 7px;
  font: 600 10.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.04);
}

/* ─── Status dots (the soul of the surface) ─────────────────────── */
.rt-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.rt-dot--ok {
  background: radial-gradient(circle at 35% 30%, rgba(110, 220, 150, 0.95), rgba(60, 170, 110, 0.85));
  box-shadow: 0 0 9px rgba(110, 220, 150, 0.50);
}
.rt-dot--warn {
  background: radial-gradient(circle at 35% 30%, rgba(255, 200, 110, 0.95), rgba(220, 150, 50, 0.85));
  box-shadow: 0 0 9px rgba(255, 200, 110, 0.50);
}
.rt-dot--err {
  background: radial-gradient(circle at 35% 30%, rgba(255, 130, 130, 0.95), rgba(220, 70, 70, 0.85));
  box-shadow: 0 0 9px rgba(255, 130, 130, 0.50);
}
.rt-dot--idle {
  background: radial-gradient(circle at 35% 30%, rgba(200, 200, 210, 0.55), rgba(140, 140, 150, 0.55));
  box-shadow: 0 0 6px rgba(200, 200, 210, 0.20);
}

.rt-status-success { color: rgba(150, 220, 170, 0.92); }
.rt-status-failed,
.rt-status-cancelled { color: rgba(255, 150, 150, 0.92); }
.rt-status-awaiting_approval,
.rt-status-partial { color: rgba(255, 210, 130, 0.92); }
.rt-status-running { color: rgba(180, 200, 255, 0.92); }

/* ─── Cost bar ──────────────────────────────────────────────────── */
.rt-cost-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.rt-cost-bar--lg { height: 6px; }
.rt-cost-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(110, 220, 150, 0.75), rgba(180, 200, 255, 0.75));
  border-radius: 999px;
  transition: width 280ms ease;
}
.rt-cost-bar__label {
  font: 500 10.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.50);
  margin-top: 5px;
  text-align: right;
}

/* ─── Empty-mini card ───────────────────────────────────────────── */
.rt-empty-card {
  padding: 38px 24px;
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rt-empty-card__icon {
  font: 400 28px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.40);
  margin-bottom: 8px;
}
.rt-empty-card__title {
  font: 600 14px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.92);
}
.rt-empty-card__sub {
  font: 400 12px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}
.rt-empty-sub {
  font: 400 12.5px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
  padding: 14px 0;
}

/* ─── Detail drawer ─────────────────────────────────────────────── */
/* Backdrop = fully transparent, no blur. The platform's popup-stack
   manager hides .ws-page entirely via body.sj-popup-open, so only the
   animated theme background is visible behind the drawer. */
.rt-drawer-backdrop {
  position: fixed; inset: 0; z-index: 8500;
  display: flex; justify-content: flex-end;
  background: transparent;
  opacity: 0;
  transition: opacity 220ms cubic-bezier(.2,.7,.2,1);
}
.rt-drawer-backdrop--open { opacity: 1; }
.rt-drawer {
  width: min(560px, 100vw);
  height: 100vh;
  overflow-y: auto;
  padding: 22px 22px 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    -40px 0 80px rgba(0, 0, 0, 0.40);
  transform: translateX(20px);
  transition: transform 240ms cubic-bezier(.2,.7,.2,1);
}
.rt-drawer-backdrop--open .rt-drawer { transform: translateX(0); }

.rt-drawer__head { margin-bottom: 14px; }
.rt-drawer__head-top {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px;
}
.rt-drawer__status {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.72);
}
.rt-drawer__tier {
  font: 600 10px/1 ui-sans-serif, system-ui;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.60);
  margin-right: auto;
}
.rt-drawer__close {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
  font: 400 20px/1 ui-sans-serif, system-ui;
  cursor: pointer;
}
.rt-drawer__close:hover { background: rgba(255, 255, 255, 0.10); }
.rt-drawer__title {
  font: 600 22px/1.2 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.98);
  margin: 0;
  padding: 4px 6px;
  border-radius: 8px;
  outline: none;
}
.rt-drawer__title:hover { background: rgba(255, 255, 255, 0.03); }
.rt-drawer__title:focus { background: rgba(255, 255, 255, 0.06); }
.rt-drawer__sched {
  display: flex; align-items: center; gap: 8px;
  font: 500 12.5px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 6px;
  flex-wrap: wrap;
}
.rt-drawer__next {
  padding: 3px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11.5px;
}

.rt-drawer__sect {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.rt-drawer__sect:first-of-type { border-top: 0; }
.rt-drawer__sect h3 {
  font: 600 11.5px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 10px;
}
.rt-drawer__sect-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.rt-drawer__sect-head h3 { margin: 0; }
.rt-link {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(180, 200, 255, 0.90);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.rt-link:hover { background: rgba(180, 200, 255, 0.10); }
.rt-drawer__plan {
  font: 400 13.5px/1.55 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
}
.rt-drawer__pills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rt-pill {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.84);
}
.rt-pill--mode {
  background: rgba(120, 160, 255, 0.10);
  border-color: rgba(120, 160, 255, 0.24);
  color: rgba(200, 220, 255, 0.94);
}
.rt-drawer__budget-row {
  display: flex; justify-content: space-between; align-items: center;
  font: 500 12px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 8px;
}
.rt-drawer__success {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(150, 220, 170, 0.88);
}

/* ─── Run timeline ──────────────────────────────────────────────── */
.rt-timeline {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 4px;
  border-radius: 8px;
}
.rt-timeline--empty {
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font: 500 12px/1 ui-sans-serif, system-ui;
}
.rt-timeline__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 140ms ease;
}
.rt-timeline__dot:hover { transform: scale(1.35); }
.rt-tl-success {
  background: radial-gradient(circle at 35% 30%, rgba(110, 220, 150, 0.95), rgba(60, 170, 110, 0.85));
  box-shadow: 0 0 8px rgba(110, 220, 150, 0.40);
}
.rt-tl-failed,
.rt-tl-cancelled {
  background: radial-gradient(circle at 35% 30%, rgba(255, 130, 130, 0.95), rgba(220, 70, 70, 0.85));
  box-shadow: 0 0 8px rgba(255, 130, 130, 0.40);
}
.rt-tl-partial,
.rt-tl-awaiting_approval {
  background: radial-gradient(circle at 35% 30%, rgba(255, 200, 110, 0.95), rgba(220, 150, 50, 0.85));
  box-shadow: 0 0 8px rgba(255, 200, 110, 0.40);
}
.rt-tl-running {
  background: radial-gradient(circle at 35% 30%, rgba(180, 200, 255, 0.95), rgba(120, 140, 220, 0.85));
  box-shadow: 0 0 8px rgba(180, 200, 255, 0.50);
  animation: rt-pulse 1.4s ease-in-out infinite;
}
@keyframes rt-pulse { 50% { transform: scale(1.18); opacity: 0.85; } }

.rt-history-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.rt-history-row {
  display: grid;
  grid-template-columns: 12px 90px 90px 80px 1fr;
  gap: 10px; align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font: 400 12px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.72);
  transition: background 140ms ease;
}
.rt-history-row:hover { background: rgba(255, 255, 255, 0.04); }
.rt-history-row__status { font-weight: 600; }
.rt-history-row__time   { color: rgba(255, 255, 255, 0.55); }
.rt-history-row__cost   { color: rgba(255, 255, 255, 0.55); }
.rt-history-row__peek   {
  color: rgba(255, 255, 255, 0.65);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Drawer footer ─────────────────────────────────────────────── */
.rt-drawer__foot {
  display: flex; gap: 8px; align-items: center;
  padding: 16px 0 0;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.rt-drawer__foot-spacer { flex: 1; }

/* ─── Dialog primitive (pure glass) ─────────────────────────────── */
/* Fully transparent, no blur — the body.sj-popup-open rule hides
   .ws-page so only the theme background shows behind. */
.rt-dlg-backdrop {
  position: fixed; inset: 0; z-index: 9500;
  display: grid; place-items: center;
  background: transparent;
  opacity: 0;
  transition: opacity 200ms cubic-bezier(.2,.7,.2,1);
}
.rt-dlg-backdrop--open { opacity: 1; }
.rt-dlg {
  width: min(640px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  display: flex; flex-direction: column;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 40px 100px rgba(0, 0, 0, 0.40);
  transform: translateY(8px) scale(0.985);
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}
.rt-dlg-backdrop--open .rt-dlg { transform: translateY(0) scale(1); }
.rt-dlg--narrow  { width: min(440px, calc(100vw - 48px)); }
.rt-dlg--templates,
.rt-dlg--run-detail { width: min(780px, calc(100vw - 36px)); }

.rt-dlg__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.rt-dlg__eyebrow {
  font: 600 10.5px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}
.rt-dlg__title {
  font: 600 18px/1.25 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  margin: 6px 0 4px;
}
.rt-dlg__sub {
  font: 400 12.5px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
}
.rt-dlg__msg {
  font: 400 13.5px/1.55 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.78);
  margin: 4px 0;
}
.rt-dlg__close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
  font: 400 22px/1 ui-sans-serif, system-ui;
  cursor: pointer;
  flex-shrink: 0;
}
.rt-dlg__close:hover { background: rgba(255, 255, 255, 0.10); }

.rt-dlg__body {
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
}
.rt-dlg__foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── Form fields (used in dialogs) ─────────────────────────────── */
.rt-field { display: flex; flex-direction: column; gap: 6px; }
.rt-field__lab {
  font: 600 11px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: rgba(255, 255, 255, 0.55);
}
.rt-field__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 400 13.5px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}
.rt-field__input:focus {
  border-color: rgba(180, 200, 255, 0.40);
  background: rgba(255, 255, 255, 0.07);
}
.rt-field__input--lg { min-height: 90px; resize: vertical; line-height: 1.55; }
.rt-field__hint {
  font: 400 11.5px/1.45 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.50);
}
.rt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) { .rt-grid-2 { grid-template-columns: 1fr; } }

/* ─── Live preview (parsed plan) ────────────────────────────────── */
.rt-preview {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(180, 200, 255, 0.04);
  border: 1px solid rgba(180, 200, 255, 0.14);
}
.rt-preview__placeholder,
.rt-preview__err {
  font: 400 12.5px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.50);
}
.rt-preview__err { color: rgba(255, 150, 150, 0.85); }
.rt-preview__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.rt-preview__name {
  font: 600 13.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-preview__tier {
  font: 600 10px/1 ui-sans-serif, system-ui;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(180, 200, 255, 0.10);
  color: rgba(200, 220, 255, 0.92);
}
.rt-preview__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 6px 0;
  font: 400 12.5px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.74);
}
.rt-preview__lab { color: rgba(255, 255, 255, 0.50); }

/* ─── Multi-stage builder ───────────────────────────────────────── */
.rt-dlg--builder { width: min(820px, calc(100vw - 36px)); }

.rt-dlg-backdrop--stacked { z-index: 9700; }
.rt-dlg--stage { width: min(620px, calc(100vw - 36px)); }

.rt-stages-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.rt-stages-head__count {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rt-stages-stack {
  display: flex; flex-direction: column; gap: 0;
  margin-bottom: 10px;
}

.rt-stage-card {
  display: flex; flex-direction: column;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 220ms ease;
}
.rt-stage-card:hover {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.07);
}
.rt-stage-card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rt-stage-card__order {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font: 600 12px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  flex-shrink: 0;
}
.rt-stage-card__name {
  flex: 1; min-width: 0;
  font: 600 13.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rt-stage-card__agent {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.86);
}
.rt-stage-card__agent-icon { font: 600 12px/1 ui-sans-serif, system-ui; }
.rt-stage-card__cost {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 8px;
}
.rt-stage-card__actions {
  display: inline-flex; gap: 4px;
}
.rt-stage-card__icon-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
  font: 500 12px/1 ui-sans-serif, system-ui;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.rt-stage-card__icon-btn:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.20); }
.rt-stage-card__icon-btn--danger:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.40);
  color: rgba(254, 200, 200, 0.96);
}
.rt-stage-card__body {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.rt-stage-card__instruction {
  font: 400 12.5px/1.55 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.78);
}
.rt-stage-card__meta {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rt-stage-card__chip {
  font: 500 10.5px/1 ui-sans-serif, system-ui;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.72);
}
.rt-stage-card__chip--time {
  background: rgba(255, 200, 110, 0.10);
  border-color: rgba(255, 200, 110, 0.24);
  color: rgba(255, 220, 170, 0.96);
}

.rt-stage-arrow {
  text-align: center;
  font: 400 14px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.40);
  padding: 6px 0;
}

.rt-add-stage {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.78);
  font: 500 12.5px/1 ui-sans-serif, system-ui;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.rt-add-stage:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.30);
  color: rgba(255, 255, 255, 0.96);
}
.rt-add-stage__plus {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font: 500 14px/1 ui-sans-serif, system-ui;
}

/* ─── Brand profile picker ──────────────────────────────────────── */
.rt-brand-picker { position: relative; }
.rt-picker-row--create {
  background: rgba(180, 200, 255, 0.06);
  border: 1px dashed rgba(180, 200, 255, 0.30) !important;
  color: rgba(200, 220, 255, 0.96);
}
.rt-picker-row--create .rt-picker-row__icon {
  background: rgba(180, 200, 255, 0.14);
  color: rgba(200, 220, 255, 0.96);
}

/* ─── Cost summary card ────────────────────────────────────────── */
.rt-cost-summary {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(110, 220, 150, 0.05);
  border: 1px solid rgba(110, 220, 150, 0.20);
}
.rt-cost-summary__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.rt-cost-summary__label {
  font: 600 11.5px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: rgba(180, 240, 200, 0.86);
}
.rt-cost-summary__value {
  font: 600 14px/1 ui-sans-serif, system-ui;
  color: rgba(220, 250, 230, 0.98);
}
.rt-cost-summary__breakdown {
  display: flex; flex-direction: column; gap: 3px;
  font: 400 11.5px/1.4 ui-sans-serif, system-ui;
  color: rgba(180, 220, 200, 0.74);
}
.rt-cost-summary__row {}
.rt-cost-summary__row--orch {
  padding-top: 4px;
  margin-top: 4px;
  border-top: 1px dashed rgba(110, 220, 150, 0.20);
  color: rgba(200, 230, 215, 0.80);
}

/* ─── Detail-drawer additions (brand strip, stages list) ───────── */
.rt-drawer__brand-strip {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(180, 200, 255, 0.06);
  border: 1px solid rgba(180, 200, 255, 0.22);
  border-top: 1px solid rgba(180, 200, 255, 0.22);
}
.rt-drawer__brand-icon {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(180, 200, 255, 0.14);
  color: rgba(200, 220, 255, 0.96);
  font: 600 12px/1 ui-sans-serif, system-ui;
}
.rt-drawer__brand-name {
  font: 600 12.5px/1 ui-sans-serif, system-ui;
  color: rgba(200, 220, 255, 0.96);
}

.rt-drawer__stages {
  display: flex; flex-direction: column; gap: 0;
}
.rt-drawer__stage {
  display: flex; gap: 10px;
  padding: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rt-drawer__stage-order {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font: 600 11px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  flex-shrink: 0;
}
.rt-drawer__stage-body { flex: 1; min-width: 0; }
.rt-drawer__stage-name {
  font: 600 12.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-drawer__stage-instr {
  font: 400 11.5px/1.55 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.70);
  margin-top: 4px;
}
.rt-drawer__stage-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
  font: 500 10.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
}
.rt-drawer__stage-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rt-drawer__stage-arrow {
  text-align: center;
  font: 400 12px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.40);
  padding: 4px 0;
}

/* ─── Plan-preview graph ────────────────────────────────────────── */
.rt-plan-graph {
  display: flex; flex-direction: column;
  padding: 8px 0;
}
.rt-plan-node {
  display: flex; gap: 12px;
  padding: 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.rt-plan-node__order {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(180, 200, 255, 0.14);
  border: 1px solid rgba(180, 200, 255, 0.30);
  color: rgba(200, 220, 255, 0.96);
  font: 600 12px/1 ui-sans-serif, system-ui;
  flex-shrink: 0;
}
.rt-plan-node__body { flex: 1; }
.rt-plan-node__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.rt-plan-node__name {
  font: 600 13.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-plan-node__agent {
  font: 500 11.5px/1 ui-sans-serif, system-ui;
  color: rgba(180, 200, 255, 0.86);
}
.rt-plan-node__instr {
  font: 400 12px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.70);
}
.rt-plan-node__meta {
  display: flex; gap: 8px;
  margin-top: 6px;
  font: 500 10.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
}
.rt-plan-arrow {
  text-align: center;
  font: 400 18px/1 ui-sans-serif, system-ui;
  color: rgba(180, 200, 255, 0.55);
  padding: 8px 0;
}

/* Card brand badge (in list view) */
.rt-card__brand {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(180, 200, 255, 0.08);
  border: 1px solid rgba(180, 200, 255, 0.18);
  font: 500 11px/1 ui-sans-serif, system-ui;
  color: rgba(200, 220, 255, 0.92);
  align-self: flex-start;
}
.rt-card__tier--multi {
  background: rgba(110, 220, 150, 0.10);
  border-color: rgba(110, 220, 150, 0.24);
  color: rgba(180, 240, 200, 0.96);
}

/* ─── Delivery channel checkboxes ───────────────────────────────── */
.rt-delivery-checks {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.rt-delivery-check {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 500 12.5px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  user-select: none;
  transition: background 140ms ease, border-color 140ms ease,
              color 140ms ease, box-shadow 220ms ease;
}
.rt-delivery-check:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.96);
}
.rt-delivery-check input {
  position: absolute; opacity: 0; pointer-events: none;
}
.rt-delivery-check__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 140ms ease, box-shadow 220ms ease;
}
.rt-delivery-check:has(input:checked) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.36);
  color: rgba(255, 255, 255, 1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0 18px rgba(255, 255, 255, 0.18);
}
.rt-delivery-check:has(input:checked) .rt-delivery-check__dot {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.98), rgba(220, 230, 255, 0.85));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
}

/* ─── Time picker (hour : min  AM/PM | cadence) ─────────────────── */
.rt-time-row {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.rt-time-pill {
  width: auto !important;
  min-width: 64px;
  padding: 10px 12px !important;
  font-variant-numeric: tabular-nums;
}
.rt-time-colon {
  font: 600 16px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
  padding: 0 2px;
}
.rt-time-cadence {
  flex: 1;
  min-width: 160px;
}

/* ─── Custom dropdown pickers (agent + connectors) ──────────────── */
.rt-agent-picker,
.rt-conn-picker {
  position: relative;
}
.rt-picker-trigger {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 400 13px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.rt-picker-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}
.rt-picker-trigger__icon {
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  font: 600 12px/1 ui-sans-serif, system-ui;
  flex-shrink: 0;
}
.rt-picker-trigger__name {
  font: 600 13px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  flex-shrink: 0;
}
.rt-picker-trigger__sub {
  flex: 1; min-width: 0;
  font: 400 11.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rt-picker-trigger__caret {
  color: rgba(255, 255, 255, 0.55);
  font: 400 10px/1 ui-sans-serif, system-ui;
  flex-shrink: 0;
}

.rt-picker-menu {
  margin-top: 6px;
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}
.rt-picker-menu--conn { max-height: 360px; }
.rt-picker-search-wrap { padding: 4px; }
.rt-picker-search {
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.96);
  font: 400 12.5px/1.3 ui-sans-serif, system-ui;
  outline: none;
}
.rt-picker-search:focus {
  border-color: rgba(180, 200, 255, 0.40);
  background: rgba(255, 255, 255, 0.08);
}
.rt-picker-grant-all {
  width: calc(100% - 8px);
  margin: 6px 4px;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(180, 200, 255, 0.08);
  border: 1px solid rgba(180, 200, 255, 0.20);
  color: rgba(200, 220, 255, 0.96);
  font: 600 12px/1 ui-sans-serif, system-ui;
  text-align: center;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.rt-picker-grant-all:hover {
  background: rgba(180, 200, 255, 0.14);
  border-color: rgba(180, 200, 255, 0.34);
}
.rt-picker-list {
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px;
}

.rt-picker-row {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.rt-picker-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}
.rt-picker-row.is-on {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset,
              0 0 12px rgba(255, 255, 255, 0.10);
}
.rt-picker-row__icon {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font: 600 13px/1 ui-sans-serif, system-ui;
  flex-shrink: 0;
}
.rt-picker-row__body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.rt-picker-row__name {
  font: 600 13px/1.25 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-picker-row__sub {
  font: 400 11.5px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.58);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rt-picker-row__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
  transition: background 140ms ease, box-shadow 220ms ease;
}
.rt-picker-row.is-on .rt-picker-row__dot {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.98), rgba(220, 230, 255, 0.85));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
}

/* Connector empty-state inside the picker */
.rt-conn-empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 16px 18px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rt-conn-empty__title {
  font: 600 13.5px/1.35 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-conn-empty__sub {
  font: 400 12.5px/1.55 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 2px;
}
.rt-picker-empty {
  padding: 14px 16px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font: 400 12.5px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.62);
}

/* ─── Template-dialog category headers ──────────────────────────── */
.rt-tpl-section { padding: 8px 0 18px; }
.rt-tpl-section__head {
  font: 600 11.5px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 10px;
}

/* ─── Run detail ────────────────────────────────────────────────── */
.rt-run-sect { padding: 10px 0; }
.rt-run-sect h4 {
  font: 600 11.5px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 8px;
}
.rt-run-output {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 400 13.5px/1.55 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.86);
  white-space: pre-wrap;
}
.rt-run-err {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 100, 100, 0.06);
  border: 1px solid rgba(255, 100, 100, 0.18);
  font: 500 12.5px/1.5 ui-monospace, monospace;
  color: rgba(255, 200, 200, 0.96);
}
.rt-run-steps { display: flex; flex-direction: column; gap: 8px; }
.rt-run-step {
  display: flex; gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rt-run-step__num {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font: 600 11px/1 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.78);
  flex-shrink: 0;
}
.rt-run-step__body { flex: 1; }
.rt-run-step__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 3px;
}
.rt-run-step__title {
  font: 600 12.5px/1.3 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
}
.rt-run-step__status {
  font: 600 10.5px/1 ui-sans-serif, system-ui;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.rt-run-step__sum {
  font: 400 12px/1.5 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.66);
}

/* ─── Toast ─────────────────────────────────────────────────────── */
.rt-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 14px);
  z-index: 11000;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(38px) saturate(180%);
  -webkit-backdrop-filter: blur(38px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font: 500 13px/1.4 ui-sans-serif, system-ui;
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 240ms ease, transform 240ms cubic-bezier(.2,.7,.2,1);
}
.rt-toast--in { opacity: 1; transform: translate(-50%, 0); }
.rt-toast--err {
  background: rgba(255, 100, 100, 0.12);
  border-color: rgba(255, 130, 130, 0.30);
  color: rgba(255, 220, 220, 0.96);
}

/* ─── Danger button (consistent with ws-btn--danger) ────────────── */
.ws-btn--danger {
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.40);
  color: rgba(254, 226, 226, 0.96);
}
.ws-btn--danger:hover {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.55);
}
