/* ═══════════════════════════════════════════════════════════════
   SCHEDULES / TRIGGERS
   ═══════════════════════════════════════════════════════════════ */

/* ── TYPE BADGES ───────────────────────────────────────── */
.sch-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  padding: 2px 6px;
  border: 1px solid var(--b2);
  background: transparent;
  border-radius: var(--r-chip);
  color: var(--t2);
  text-transform: uppercase;
  white-space: nowrap;
}
/* trigger type is a category: told apart by line style, not hue */
.sch-type.cron     { color: var(--t1); border-color: var(--b3); }
.sch-type.webhook  { color: var(--t1); border-color: var(--b3); border-style: dashed; }
.sch-type.event    { color: var(--t1); border-color: var(--t3); border-style: dotted; }

/* ── TABLE ─────────────────────────────────────────────── */
.sch-tbl td { padding: 12px 14px; vertical-align: middle; }
/* paused rows step back by text tone, not opacity (keeps text above the alpha floor) */
.sch-tbl .sch-row.off td,
.sch-tbl .sch-row.off .sch-name { color: var(--t3); }
.sch-tbl .sch-row.off .sch-name { text-decoration: line-through; }

/* status dots: ok = mint, warn = hold, off = outline; no glow, no blink */
.sch-pip {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
  margin-top: 6px;
  flex-shrink: 0;
}
.sch-pip.warn    { background: var(--hold); }
.sch-pip.off     { background: transparent; border: 1px solid var(--t3); }
.sch-pip.pending {
  background: transparent;
  border: 1.5px dashed var(--t3);
  width: 8px; height: 8px;
  border-radius: 50%;
}

.sch-name {
  font-weight: 600;
  color: var(--t1);
  font-size: 13px;
  margin-bottom: 2px;
}
.sch-meta {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.04em;
}

/* ── TOGGLE SWITCH (v3 .sw) ────────────────────────────── */
.sch-toggle {
  width: 32px;
  height: 16px;
  background: color-mix(in srgb, var(--t1) 4%, transparent);
  border: 1px solid var(--b3);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.3s;
}
.sch-toggle.on {
  background: var(--t1);
  border-color: var(--t1);
  box-shadow: var(--glow);
}
.sch-toggle-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--t1) 72%, transparent);
  transition: transform 0.3s var(--ease), background 0.2s;
}
.sch-toggle.on .sch-toggle-knob {
  transform: translateX(16px);
  background: var(--bg);
}

/* ── UPCOMING QUEUE ────────────────────────────────────── */
.upc-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--b1);
  align-items: flex-start;
}
.upc-row:last-child { border-bottom: 0; }
.upc-row.warn { background: color-mix(in oklch, var(--hold) 6%, transparent); }
.upc-row.warn::before {
  /* visual marker handled below */
}
.upc-time {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.upc-time-rel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t1);
}
.upc-row.warn .upc-time-rel { color: var(--hold); }
.upc-time-abs {
  font-size: 9px;
  letter-spacing: 0.06em;
}
.upc-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.upc-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  line-height: 1.3;
}
.upc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.upc-type {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border: 1px solid var(--b3);
  border-radius: var(--r-chip);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.upc-type.cron    { color: var(--t1); }
.upc-type.webhook { color: var(--t1); border-style: dashed; }
.upc-type.event   { color: var(--t1); border-color: var(--t3); border-style: dotted; }

/* ── HEALTH BARS ──────────────────────────────────────── */
.health-row {
  display: grid;
  grid-template-columns: 1.6fr 2fr 110px;
  gap: 14px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--b1);
}
.health-row:last-child { border-bottom: 0; }
.health-name {
  font-size: 12px;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.health-name span.sch-type {
  flex-shrink: 0;
}
.health-bar {
  height: 8px;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--r-chip);
  display: flex;
  overflow: hidden;
}
/* the ok share is a quantity (shell .load-fill); only the failures carry a state */
.health-ok   { background: color-mix(in srgb, var(--t1) 72%, transparent); }
.health-fail { background: var(--fail); }
.health-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  font-size: 11px;
}
.health-stats .num { font-weight: 700; }
.health-fail-tag {
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--fail);
  background: var(--fail-wash);
  outline: 1px solid color-mix(in oklch, var(--fail) 35%, transparent);
  outline-offset: -1px;
  border-radius: var(--r-chip);
  padding: 1px 4px;
  margin-left: 4px;
}
.health-ok-tag {
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--mint);
  margin-left: 4px;
}
