/* Cases and ticketing, Version C "Bento". Rendered inside Operations, so every rule is scoped by its own
   .cases-, .case- or .new- class, never by data-station. Compact density comes from #app[data-density="compact"].
   Views: the board by stage, the case detail, the new ticket form. */

/* ---------- Shared ---------- */
.cases-headline { display: flex; flex-direction: column; gap: 8px; }
.cases-headline .page-header { padding-top: 0; }
.cases-crumbs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cases-back, .cases-parent {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 14px 0 10px;
  border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow-float);
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  transition: color var(--t), transform var(--t);
}
.cases-back:hover { color: var(--avid-blue-strong); text-decoration: none; transform: translateX(-2px); }
.cases-parent { padding: 0 14px; color: var(--avid-blue-ink); background: var(--avid-blue-tint); box-shadow: none; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cases-parent:hover { text-decoration: none; background: #D6ECF8; }

/* Working surfaces do not lift on hover; only the cards inside them do. */
.cases-board-tile:hover, .case-strip-tile:hover, .case-fields-tile:hover, .case-actions:hover,
.case-items-tile:hover, .case-tasks-tile:hover, .case-history-tile:hover, .cases-counts:hover, .cases-filters:hover,
.new-templates-tile:hover, .new-form-tile:hover, .new-flow:hover, .new-checklist:hover { transform: none; }

/* ---------- 1. Board: counts and filters ---------- */
.cases-counts { min-height: 0; }
.cases-counts { justify-content: center; }
.cases-count-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: -6px -8px; }
.cases-count-row .bignum, .cases-count-row a.bignum.is-drill {
  margin: 0;
  padding: 6px 8px 8px; border-radius: 12px; color: var(--ink);
  text-align: left; transition: background var(--t);
}
.cases-count-row .bignum:hover { text-decoration: none; background: var(--mist); }
.cases-count-row .bignum .tile-label { margin-bottom: 2px; white-space: nowrap; }
.cases-count-row .big { font-size: 34px; line-height: 1.1; }
.cases-count-row .big-sub { margin-top: 2px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.cases-count-row a.bignum:nth-child(2) .big { color: var(--bad-ink); }
.cases-count-btn { cursor: pointer; justify-content: flex-start; align-self: stretch; }
.cases-count-btn.is-active { background: var(--deep-ink); color: #fff; }
.cases-count-btn.is-active:hover { background: var(--deep-ink-2); }
.cases-count-btn.is-active .tile-label, .cases-count-btn.is-active .big-sub { color: var(--on-dark-2); }

.cases-filters { min-height: 0; gap: 8px; }
.cases-filters .tile-head { margin-bottom: 0; }
.cases-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cases-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px; border-radius: var(--radius-pill);
  background: var(--mist); color: var(--ink-2);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  transition: background var(--t), color var(--t);
}
.cases-chip:hover { background: var(--surface-3); color: var(--ink); }
.cases-chip.is-active { background: var(--deep-ink); color: #fff; }
.cases-chip-n { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.cases-chip.is-active .cases-chip-n { color: var(--on-dark-2); }

.cases-owners { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.cases-owners-label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.cases-owner {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px 0 2px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  transition: background var(--t), color var(--t), box-shadow var(--t);
}
.cases-owner .avatar { width: 24px; height: 24px; font-size: 10px; }
.cases-owner.is-all { padding: 0 12px; background: var(--mist); }
.cases-owner:hover { background: var(--mist); color: var(--ink); }
.cases-owner.is-active { background: var(--avid-blue-tint); color: var(--avid-blue-ink); box-shadow: inset 0 0 0 1.5px var(--avid-blue); }
.cases-owner.is-all.is-active { background: var(--deep-ink); color: #fff; box-shadow: none; }

/* ---------- 1. Board: columns and cards ---------- */
.cases-board-tile { min-height: 0; background: var(--surface); }
.cases-board { display: grid; gap: 0; }
.cases-col { min-width: 0; padding: 12px 10px 12px; border-left: 1px solid var(--line); }
.cases-col:first-child { border-left: 0; padding-left: 14px; }
.cases-col:last-child { padding-right: 14px; }
.cases-col-head { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 2px 10px; }
.cases-col-title { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); }
.cases-col-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--mist); font-size: 11px; font-weight: 700; color: var(--ink-2);
}
.cases-col-n { flex: none; }
.cases-col-note { flex: 1; min-width: 0; text-align: right; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cases-col-body { display: flex; flex-direction: column; gap: 5px; }
.cases-col-empty { padding: 14px 4px; font-size: 12px; color: var(--ink-3); }

.case-card {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px 6px 12px; border-radius: 12px;
  background: var(--mist); color: var(--ink);
  transition: background var(--t), box-shadow var(--t), transform var(--t);
}
.case-card::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
  background: transparent;
}
.case-card:hover { text-decoration: none; background: var(--surface); box-shadow: 0 6px 18px rgba(16, 32, 48, 0.12); transform: translateY(-1px); }
.case-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--avid-blue); }
.case-card.is-stuck::before { background: var(--bad); }
.case-card.is-high:not(.is-stuck)::before { background: var(--avid-blue); }

.case-card-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.case-card-who { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-card-top .entity-tag { flex: none; transform: scale(0.9); }
.case-card-days {
  flex: none; font-size: 11px; font-weight: 700; color: var(--ink-2);
  padding: 1px 7px; border-radius: var(--radius-pill); background: var(--surface);
}
.case-card:hover .case-card-days { background: var(--mist); }
.case-card-days.is-stuck { background: var(--bad-tint); color: var(--bad-ink); }
.case-card-title { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.case-card-progress { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--good-ink); }
.case-card-progress .progress { flex: 1; height: 4px; }
.case-card-foot { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.case-card-foot > :first-child { flex: 1; }
.case-card-wait {
  min-width: 0; display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--warn-ink);
}
.case-card-wait svg { flex: none; }
.case-card-wait span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-card-kind {
  min-width: 0; display: block;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.case-card-foot .avatar { width: 22px; height: 22px; font-size: 10px; flex: none; }
.case-mark {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%;
  flex: none; height: 18px; padding: 0 7px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.case-mark svg { flex: none; }
.case-mark.is-bad { background: var(--bad-tint); color: var(--bad-ink); }
.case-mark.is-warn { background: var(--warn-tint); color: var(--warn-ink); }

/* ---------- 2. Case detail ---------- */
.case-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.case-due { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: var(--shadow-hair); }
.case-due.is-bad { color: var(--bad-ink); }
.case-due.is-warn { color: var(--warn-ink); }
.case-due.is-neutral { color: var(--ink-2); }

/* Stage strip */
.case-strip-tile { min-height: 0; }
.case-strip { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.case-step {
  position: relative; min-width: 0;
  display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; row-gap: 4px; align-items: center;
  padding: 10px 12px; border-radius: var(--radius); background: var(--mist);
}
.case-step-mark {
  grid-row: 1 / span 3; align-self: start;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink-3); font-size: 12px; font-weight: 700;
}
.case-step-label { font-size: 13px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-step-owner { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.case-step-owner .avatar { width: 22px; height: 22px; font-size: 10px; flex: none; }
.case-step-owner span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-step-when { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.case-step.is-done .case-step-mark { background: var(--good); color: #fff; }
.case-step.is-done .case-step-label { color: var(--ink-2); }
.case-step.is-next { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.case-step.is-next .case-step-label { color: var(--ink-2); }
.case-step.is-current { background: var(--blue-gradient); color: #fff; box-shadow: 0 10px 24px rgba(0, 119, 179, 0.28); }
.case-step.is-current .case-step-mark { background: #fff; color: var(--avid-blue-strong); }
.case-step.is-current .case-step-owner, .case-step.is-current .case-step-when { color: rgba(255, 255, 255, 0.88); }
.case-step.is-current .case-step-owner .avatar { box-shadow: 0 0 0 1.5px #fff; }
.case-step.is-current.is-over .case-step-when::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #FFB4AA; vertical-align: 1px; }

/* Fields */
.case-fields-tile { min-height: 0; }
.case-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.case-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.case-field-label {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3);
}
.case-req {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: none;
  padding: 1px 7px; border-radius: var(--radius-pill); background: var(--mist); color: var(--ink-3);
}
.case-req.is-missing { background: var(--bad-tint); color: var(--bad-ink); }
.case-input { width: 100%; height: 36px; padding: 0 12px; font-size: 13px; color: var(--ink); text-overflow: ellipsis; }
select.case-input { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236A7680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.case-input.is-invalid { background-color: var(--bad-tint); box-shadow: inset 0 0 0 1px rgba(194, 73, 62, 0.45); }
.case-input.is-invalid::placeholder { color: var(--bad-ink); opacity: 0.75; }
.case-field.is-flagged .case-input { box-shadow: inset 0 0 0 2px var(--bad); }
.case-returned {
  margin-top: 14px; display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 12px; background: var(--warn-tint); color: var(--warn-ink);
  font-size: 13px; line-height: 1.45;
}
.case-returned svg { flex: none; margin-top: 1px; }

/* Actions, the Deep Ink tile */
.case-actions { min-height: 0; gap: 14px; }
.case-now .tile-label { margin-bottom: 8px; }
.case-now-who { display: flex; align-items: center; gap: 12px; }
.case-now-who .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
.case-now-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.case-now-meta { margin-top: 2px; font-size: 12px; color: var(--on-dark-2); }
.case-now-wait {
  margin-top: 10px; display: flex; align-items: flex-start; gap: 6px;
  padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.08);
  font-size: 12px; line-height: 1.4; color: var(--on-dark-2);
}
.case-now-wait svg { flex: none; margin-top: 1px; color: #F3C46B; }
.case-advance { display: flex; flex-direction: column; gap: 8px; }
.case-advance :is(.btn-light, .btn-primary) { height: 46px; font-size: 14px; }
.case-advance :is(.btn-light, .btn-primary):disabled { opacity: 1; background: rgba(255, 255, 255, 0.14); color: var(--on-dark-3); box-shadow: none; }
.case-advance-why { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.4; color: #F3C46B; font-weight: 600; }
.case-advance-why svg { flex: none; margin-top: 1px; }
.case-advance-next { font-size: 12px; color: var(--on-dark-3); text-align: center; }
.case-msg { padding: 8px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.case-msg.is-bad { background: rgba(194, 73, 62, 0.22); color: #FFD3CD; }
.case-secondary { display: flex; flex-wrap: wrap; gap: 2px 14px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.case-secondary .btn-text { font-size: 13px; color: rgba(255, 255, 255, 0.9); }
.case-secondary .btn-text svg { width: 15px; height: 15px; }
.case-secondary .btn:disabled { opacity: 0.4; }
.case-actions-note { font-size: 13px; color: var(--on-dark-2); line-height: 1.5; }

.case-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.07); }
.case-panel-title { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--on-dark-3); }
.case-panel .input { background: rgba(255, 255, 255, 0.95); color: var(--ink); }
.case-textarea { width: 100%; height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; font-size: 13px; }
.case-panel-err { font-size: 12px; font-weight: 600; color: #FFD3CD; }
.case-panel-err:empty { display: none; }
.case-panel-actions { display: flex; align-items: center; gap: 10px; }
.case-panel-actions .btn-text { color: rgba(255, 255, 255, 0.85); }
.case-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-height: 196px; overflow: auto; }
.case-person {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 6px 8px; border-radius: 10px; text-align: left;
  color: #fff; font-size: 13px; font-weight: 600;
  transition: background var(--t);
}
.case-person:hover { background: rgba(255, 255, 255, 0.1); }
.case-person small { display: block; font-size: 11px; font-weight: 500; color: var(--on-dark-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-person > span:last-child { min-width: 0; }
.case-person.is-match:not(.is-current) { background: rgba(255, 255, 255, 0.05); }
.case-person.is-current { opacity: 0.5; cursor: default; }
.case-wait-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.case-wait-chip {
  height: 30px; padding: 0 12px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 12px; font-weight: 600;
  transition: background var(--t), color var(--t);
}
.case-wait-chip:hover { background: rgba(255, 255, 255, 0.18); }
.case-wait-chip.is-active { background: #fff; color: var(--deep-ink); }
/* The same chips on a white tile, for the new ticket form */
.case-wait-chip.is-light { background: var(--mist); color: var(--ink-2); }
.case-wait-chip.is-light:hover { background: var(--surface-3); }
.case-wait-chip.is-light.is-active { background: var(--deep-ink); color: #fff; }

/* Project items */
.case-items-tile { min-height: 0; }
.case-items-bar { margin: -4px 0 10px; }
.case-items-bar .progress { height: 6px; }
.case-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.case-item {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 92px 104px; align-items: center; gap: 10px;
  min-height: 36px; padding: 4px 6px; border-bottom: 1px solid var(--line); color: var(--ink);
  font-size: 13px;
}
.case-item:hover { text-decoration: none; background: var(--mist); border-radius: var(--radius-sm); }
.case-item.is-locked:hover { background: transparent; }
.case-item-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-item.is-done .case-item-title { color: var(--ink-3); font-weight: 500; }
.case-item.is-locked .case-item-title { color: var(--ink-3); font-style: normal; }
.case-item-stage { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.case-item-owner { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.case-item-owner .avatar { width: 22px; height: 22px; font-size: 10px; flex: none; }
.case-item-due { text-align: right; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.case-item-due.is-bad { color: var(--bad-ink); }
.case-item-due.is-warn { color: var(--warn-ink); }

/* Linked tasks */
.case-tasks-tile, .case-history-tile { min-height: 0; }
.case-tasks { display: flex; flex-direction: column; }
.case-task {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 24px; align-items: center; gap: 10px;
  min-height: 38px; padding: 4px 6px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px;
}
.case-task:last-child { border-bottom: 0; }
.case-task:hover { text-decoration: none; background: var(--mist); border-radius: var(--radius-sm); }
.case-task-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-task.is-done .case-task-title { color: var(--ink-3); font-weight: 500; }
.case-task-meta { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.case-task .avatar { width: 24px; height: 24px; font-size: 10px; }

/* History */
.case-history-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--avid-blue-strong); }
.case-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 260px; overflow: auto; }
.case-history-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid #E3EAF1; font-size: 13px; line-height: 1.4; }
.case-history-row:last-child { border-bottom: 0; }
.case-history-when { font-size: 12px; color: var(--ink-3); font-weight: 600; padding-top: 1px; white-space: nowrap; }
.case-history-what { color: var(--ink-2); }
.case-history-what strong { color: var(--ink); font-weight: 700; }
.case-history-row.is-live .case-history-when::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--good); vertical-align: 1px; }

/* Grid placement for the detail: fields (8) beside actions (4); items, tasks and history below. */
.case-fields-tile { grid-column: span 8; }
.case-actions { grid-column: span 4; }

/* ---------- 3. New ticket ---------- */
.new-templates-tile { min-height: 0; }
.new-templates { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.new-template {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 10px 12px; border-radius: 12px; background: var(--mist); text-align: left;
  transition: background var(--t), box-shadow var(--t), color var(--t);
}
.new-template:hover { background: var(--surface-3); }
.new-template.is-active { background: var(--blue-gradient); color: #fff; box-shadow: 0 10px 24px rgba(0, 119, 179, 0.28); }
.new-template-label { font-size: 13px; font-weight: 700; line-height: 1.25; }
.new-template-meta { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.new-template.is-active .new-template-meta { color: rgba(255, 255, 255, 0.85); }

.new-form-tile { min-height: 0; }
.new-form { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.new-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; align-content: start; }
.new-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.new-field-err { font-size: 12px; font-weight: 600; color: var(--bad-ink); line-height: 1.35; }
.new-field-hint { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.new-submit {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.new-summary { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.new-summary.is-error { color: var(--bad-ink); font-weight: 700; }
.new-submit .btn-lg { height: 46px; }

.new-side { display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; }
.new-flow { min-height: 0; }
.new-flow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.new-flow-step { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.new-flow-step:not(:last-child)::after {
  content: ""; position: absolute; left: 11px; top: 30px; bottom: -6px; width: 2px; background: rgba(255, 255, 255, 0.14);
}
.new-flow-n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 11px; font-weight: 700;
}
.new-flow-step:first-child .new-flow-n { background: var(--avid-blue); }
.new-flow-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.new-flow-label { font-size: 13px; font-weight: 700; }
.new-flow-owner { font-size: 12px; color: var(--on-dark-3); }
.new-flow-guide { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #8FD3F5; }
.new-checklist { min-height: 0; }
.new-check-list { margin: 0; padding-left: 18px; list-style: decimal; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.new-check-list li::marker { color: var(--ink-3); font-weight: 700; font-size: 11px; }
.new-recur { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--avid-blue-ink); }

/* ---------- Narrower screens ---------- */
@media (max-width: 1360px) {
  .new-templates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .case-items { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  /* On a phone the four columns keep a readable width and scroll inside the board tile. */
  .cases-board-tile { overflow-x: auto; overscroll-behavior-x: contain; }
  .cases-board { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 272px; }
}
@media (max-width: 1100px) {
  .cases-counts, .cases-filters { grid-column: 1 / -1; }
  .case-fields-tile, .case-actions { grid-column: 1 / -1; }
  .case-strip { grid-auto-flow: column; overflow-x: auto; }
}

/* Quiet empty line for small tiles */
.cases-quiet { display: flex; align-items: flex-start; gap: 8px; padding: 6px 2px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.cases-quiet svg { flex: none; margin-top: 1px; }
.cases-count-row .tile-label { height: 28px; margin: 0 !important; }
.cases-count-btn .tile-label { margin-bottom: 2px; }

/* PII vault: account fields hold the last four only */
.case-vault {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: none; background: var(--mist); color: var(--ink-3);
}
