/* === agent a4: SOP decisions (web/sop4.js) - follow-up decision + who owns what in the Lifecycle strip, safety documents
   per visit (job sheet, My day), Follow-up owner setting, Cleanup, Relay task buttons. Tokens only; dark mode follows them. === */

/* Follow-up work needed? - one quiet row in the strip */
.lc4-fu { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgb(var(--mod-rgb) / .05); box-shadow: inset 0 0 0 1px rgb(var(--mod-rgb) / .12); min-width: 0; }
.lc4-fu-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.lc4-fu-l { font-size: 13px; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.lc4-fu-by { font-size: 11.5px; color: var(--muted); }
.lc4-seg { display: inline-flex; padding: 2px; border-radius: var(--r-pill); background: rgb(16 22 43 / .06); }
.lc4-seg button { appearance: none; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 4px 14px; border-radius: var(--r-pill); cursor: pointer;
  transition: background-color .12s ease, color .12s ease, transform .1s ease; }
.lc4-seg button:active:not(:disabled) { transform: scale(.97); }
.lc4-seg button.on { background: var(--panel-solid, #fff); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.lc4-seg button:disabled { cursor: default; opacity: .75; }
.lc4-seg button:focus-visible { outline: 2px solid var(--mod); outline-offset: 1px; }
.lc4-fu-a { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.lc4-fu-a > span { min-width: 0; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lc4-fu-a small { color: var(--muted); }
.lc4-warn { color: var(--warn); display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lc4-warn a { color: inherit; font-weight: 650; }

/* who owns what - label and value, no badges */
.lc4-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.lc4-who-i { min-width: 0; }
.lc4-who dt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 2px; }
.lc4-who dd { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.lc4-who dd small { display: block; font-size: 11.5px; color: var(--muted); }
.lc4-who-i.unset dd { color: var(--warn); }
.lc-facts dd.lc4-unset { color: var(--warn); }

/* needs attention - never styled as a blocker */
.lc4-att { list-style: none; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.lc4-att li { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.lc4-att li span { min-width: 0; overflow-wrap: anywhere; }
.lc4-att .ico { flex: none; margin-top: 2px; }

/* safety documents for a visit */
.lc4-safe { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lc4-safe li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lc4-safe-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; appearance: none; border: 0; background: transparent; font: inherit; color: var(--ink);
  padding: 6px 6px; border-radius: 10px; cursor: pointer; transition: background-color .12s ease, transform .1s ease; }
.lc4-safe-t:hover:not(:disabled) { background: rgb(16 22 43 / .04); }
.lc4-safe-t:active:not(:disabled) { transform: scale(.985); }
.lc4-safe-t:disabled { cursor: default; }
.lc4-safe-t:focus-visible, .lc4-add:focus-visible { outline: 2px solid var(--mod, var(--sg-blue)); outline-offset: 1px; }
.lc4-box { flex: none; width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line-3); display: grid; place-items: center; color: #fff; background: transparent; }
.lc4-safe li.done .lc4-box { background: var(--good); box-shadow: none; }
.lc4-safe-l { min-width: 0; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.lc4-safe-l small { display: block; font-size: 11.5px; color: var(--muted); }
.lc4-safe li:not(.done) .lc4-safe-l small { color: var(--warn); }
.lc4-add { flex: none; appearance: none; border: 0; background: rgb(16 22 43 / .05); color: var(--icon); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: transform .1s ease; }
.lc4-add:active:not(:disabled) { transform: scale(.94); }
.lc4-ev { flex: none; font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 3px; text-decoration: none; padding: 3px 8px; border-radius: var(--r-pill); background: rgb(16 22 43 / .05); }
.lc4-due { color: var(--warn); font-size: 12px; }
.lc4-safe-w { margin: 6px 0 2px; }
.lc4-safe.big .lc4-safe-t { padding: 10px 8px; }
.lc4-safe.big .lc4-box { width: 24px; height: 24px; border-radius: 8px; }
.lc4-safe.big .lc4-safe-l { font-size: 15px; }
.lc4-safe.big .lc4-add { width: 42px; height: 42px; }
.lc4-skel { min-height: 54px; border-radius: 12px; background: linear-gradient(90deg, rgb(16 22 43 / .04), rgb(16 22 43 / .08), rgb(16 22 43 / .04)); background-size: 200% 100%; animation: lc4-sh 1.4s linear infinite; }
@keyframes lc4-sh { to { background-position: -200% 0; } }

/* Settings > Workflow: Follow-up owner */
.lc4-set { background: var(--panel); border-radius: var(--r-card, 22px); box-shadow: var(--glass-edge), var(--sh-1); padding: 14px 16px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.lc4-set-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lc4-set-h h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 6px; }
.lc4-set p { margin: 0; }
.lc4-pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); background: rgb(16 22 43 / .05); color: var(--ink-2); }
.lc4-pill.ok { background: var(--good-bg); color: var(--good); }
.lc4-pill.warn { background: var(--warn-bg); color: var(--warn); }
.lc4-set-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lc4-set-row select { min-width: 0; flex: 1 1 220px; max-width: 360px; }
.lc4-switch { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; cursor: pointer; }
.lc4-switch input { flex: none; width: auto; height: auto; margin: 3px 0 0; }
.lc4-switch > span { flex: 1; min-width: 0; }
.lc4-switch small { display: block; color: var(--muted); font-size: 12px; }

/* Settings > Cleanup */
.lc4-clean-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--panel); border-radius: 18px; box-shadow: var(--glass-edge), var(--sh-1); max-width: 980px; }
.lc4-clean-l li { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 11px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lc4-clean-l li:last-child { border-bottom: 0; }
.lc4-clean-m { min-width: 0; flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.lc4-clean-m a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.lc4-clean-m small { color: var(--muted); font-size: 12px; }
.lc4-clean-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc4-clean-a select { width: auto; max-width: 220px; }
.lc4-empty { display: inline-flex; align-items: center; gap: 6px; color: var(--good); }
.lc4-clean-tag { font-size: 11.5px; color: var(--muted); padding: 1px 8px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Relay task buttons */
.lc4-rl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 720px) {
  .lc4-who { grid-template-columns: minmax(0, 1fr); }
  .lc4-fu-a .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .lc4-seg button, .lc4-safe-t, .lc4-add { transition: none; }
  .lc4-seg button:active, .lc4-safe-t:active, .lc4-add:active { transform: none; }
  .lc4-skel { animation: none; }
}
@media (prefers-contrast: more) {
  .lc4-fu, .lc4-att { box-shadow: inset 0 0 0 1px currentColor; }
  .lc4-box { box-shadow: inset 0 0 0 2px var(--ink); }
}
