/* Team flow (Package C): the stage chip, the stage dialog, the pipeline board, the units & workflow settings and the owner
   line on question cards. Builds on .tw-dialog (team-workflow.css); logical properties for RTL. */
.tf-chip{cursor:pointer;font:inherit;color:inherit;text-align:start}
.tf-chip .ic{color:#a78bfa}
.tf-chip.tf-waiting{border-color:rgba(243,210,122,.55)}
.tf-chip.tf-waiting .meta{color:#F3D27A}
.tf-dialog.tf-wide{width:min(1080px,calc(100vw - 24px))}
.tf-steps{list-style:none;margin:14px 0;padding:0;display:grid;gap:8px}
.tf-step{display:flex;align-items:center;gap:12px;width:100%;padding:10px 14px;border:1px solid #2e3b4e;border-radius:12px;background:#151e2c;color:#e4eaf1;font:inherit;text-align:start;cursor:pointer}
.tf-step small{margin-inline-start:auto;color:#9daabc;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45%}
.tf-step.cur{border-color:#2dd4bf;background:#0f2a2a;cursor:default;opacity:1}
.tf-step.sel{border-color:#a78bfa;background:#1d1a33}
.tf-step:disabled:not(.cur){cursor:default;opacity:.7}
.tf-sname{min-width:0;overflow-wrap:anywhere}
.tf-n{flex:0 0 auto;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#26344b;color:#bfcde0;font-size:12px}
.tf-step.cur .tf-n{background:#2dd4bf;color:#04201d}
.tf-pending{padding:12px 14px;margin:12px 0;border:1px solid rgba(243,210,122,.45);border-radius:12px;background:#2a2412}
.tf-pending p{margin:0 0 8px;line-height:1.5}
.tf-foot{margin-top:6px}
.tf-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;align-items:start}
.tf-col{min-width:0;padding:10px;border:1px solid #2e3b4e;border-radius:12px;background:#121a27}
.tf-col h3{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px;font-size:14px}
.tf-col h3 span:first-child{min-width:0;overflow-wrap:anywhere}
.tf-count{font-size:12px;padding:2px 8px;border-radius:20px;background:#26344b;color:#bfcde0}
.tf-card{display:grid;gap:4px;width:100%;margin-bottom:8px;padding:10px 12px;border:1px solid #344c58;border-radius:10px;background:#172131;color:#e4eaf1;font:inherit;text-align:start;cursor:pointer}
.tf-card b{font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.tf-card small{color:#9daabc;font-size:12px}
.tf-card:hover{border-color:#2dd4bf}
.tf-badge{justify-self:start;font-size:11px;padding:3px 8px;border-radius:20px;background:#443a20;color:#e7cd87}
.tf-empty{margin:0;color:#7d8aa0;font-size:12px}
.tf-tabs{display:flex;gap:6px;margin:12px 0 14px;border-bottom:1px solid #2e3b4e}
.tf-tab{min-height:44px;padding:8px 14px;border:0;border-bottom:2px solid transparent;background:none;color:#9daabc;font:inherit;cursor:pointer}
.tf-tab[aria-selected=true]{color:#e4eaf1;border-bottom-color:#2dd4bf}
.tf-unit{margin-bottom:10px;padding:4px 14px;border:1px solid #2e3b4e;border-radius:12px;background:#151e2c}
.tf-unit summary{gap:10px;flex-wrap:wrap}
.tf-unit summary b{color:#e4eaf1}
.tf-unit summary small{color:#9daabc;font-size:12px}
.tf-dialog form.tf-form{grid-template-columns:1fr 1fr}
.tf-members{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 14px;margin:0;padding:10px 12px;border:1px solid #2e3b4e;border-radius:10px;min-width:0}
.tf-members legend{color:#bdc8d7;font-size:13px;padding:0 4px}
.tf-dialog label.tf-check{display:flex;align-items:center;gap:8px;min-height:44px}
.tf-dialog .tf-check input{width:18px;height:18px;min-height:0}
.tf-check small{color:#9daabc}
.tf-form .tw-actions{grid-column:1/-1}
.tf-danger{color:#ffaca8!important;border-color:#6b3434!important}
.tf-dialog form.tf-add{grid-template-columns:1fr auto;align-items:end}
.tf-stagelist{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
.tf-stage{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;border:1px solid #2e3b4e;border-radius:12px;background:#151e2c}
.tf-dialog .tf-grow{flex:1 1 180px;min-width:0}
.tf-tools{display:flex;gap:4px}
.tf-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tf-owner{display:block;margin-top:8px;font-size:12px;color:#a78bfa}
@media(max-width:540px){
  .tf-board{grid-template-columns:1fr}
  .tf-dialog form.tf-form,.tf-dialog form.tf-add{grid-template-columns:1fr}
  .tf-step small{max-width:40%}
  .tf-tools{margin-inline-start:auto}
}
.tw-tools{display:flex;gap:8px;flex-wrap:wrap}
.ti-scope{display:flex;gap:6px;flex-wrap:wrap}
.ti-scope-btn[aria-pressed=true]{border-color:#2dd4bf;color:#8ce0d3}
.ti-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.pl-owner{grid-column:1/-1;display:flex;align-items:center;gap:8px;font-size:12px;color:#9daabc}
.pl-owner select{min-height:32px;max-width:100%;padding:4px 8px;background:#0c1420;color:#e4eaf1;border:1px solid #41516a;border-radius:8px;font:inherit}
.tf-area{margin-inline-start:22px;border-style:dashed}
.tf-area-tag{font-size:11px;padding:2px 8px;border-radius:20px;background:#1d1a33;color:#c4b5fd}
.tf-order{margin-block:4px 12px;color:#bdc8d7;font-size:13px}
.tf-choice{margin-block:12px;padding:12px 14px;border:1px solid #2e3b4e;border-radius:12px;background:#151e2c}
.tf-choice h3{margin:0 0 6px;font-size:15px;display:flex;align-items:center;gap:8px}
.tf-free{font-size:11px;padding:2px 8px;border-radius:20px;background:#1c423c;color:#97e0c8}
.tf-linkrow{display:flex;gap:8px;margin-block:8px}
.tf-linkrow input{flex:1;min-width:0}
.tf-dialog label.tf-paste{margin-block:8px}
.tf-dialog textarea{box-sizing:border-box;width:100%;min-width:0;padding:9px 12px;background:#0c1420;color:#e4eaf1;border:1px solid #41516a;border-radius:9px;font:inherit}
.tf-shlist{list-style:none;margin:12px 0;padding:0;display:grid;gap:8px}
.tf-sh{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border:1px solid #2e3b4e;border-radius:10px;background:#151e2c;min-width:0}
.tf-sh div{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.tf-sh small{color:#9daabc;font-size:12px}
.tf-dialog label.tf-ext[hidden]{display:none}
.tf-new{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-inline-start:8px;padding:0 5px;border-radius:9px;background:#a78bfa;color:#120c25;font-size:11px;font-weight:700}
.td-deleted{color:#7d8aa0;font-style:italic}
@media(max-width:540px){.tf-area{margin-inline-start:10px}.tf-linkrow{flex-direction:column}}
/* Package J: unit fields and order */
.tf-unit summary .tf-unit-alt{color:#bdc8d7;font-size:13px}
.tf-unit summary .tf-unit-desc{flex-basis:100%;color:#9daabc;font-size:12px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}
.tf-unit-move{margin-inline-start:auto;display:inline-flex;gap:4px}
.tf-dialog form.tf-form .tf-wide-field{grid-column:1/-1}
.tf-dialog form.tf-form textarea{box-sizing:border-box;width:100%;min-width:0;padding:9px 12px;background:#0c1420;color:#e4eaf1;border:1px solid #41516a;border-radius:9px;font:inherit;resize:vertical;min-height:56px}
/* light-theme:begin — generated by tools/light-theme.mjs from the rules above; do not edit by hand (hand-tuned light rules go after the end marker) */
html[data-theme="light"] .tf-chip .ic{color:#25038b}
html[data-theme="light"] .tf-chip.tf-waiting{border-color:rgba(243,210,122,.55)}
html[data-theme="light"] .tf-chip.tf-waiting .meta{color:#906b09}
html[data-theme="light"] .tf-step{border:1px solid #dfe2e7;background:#edf0f3;color:#171e26}
html[data-theme="light"] .tf-step small{color:#4f5a6b}
html[data-theme="light"] .tf-step.cur{border-color:#2dd4bf;background:#eff6f6}
html[data-theme="light"] .tf-step.sel{border-color:#a78bfa;background:#ebeaf1}
html[data-theme="light"] .tf-n{background:#e1e4eb;color:#2a374a}
html[data-theme="light"] .tf-step.cur .tf-n{background:#2dd4bf;color:#04201d}
html[data-theme="light"] .tf-pending{border:1px solid rgba(243,210,122,.45);background:#f5f3ee}
html[data-theme="light"] .tf-col{border:1px solid #dfe2e7;background:#eff2f5}
html[data-theme="light"] .tf-count{background:#e1e4eb;color:#2a374a}
html[data-theme="light"] .tf-card{border:1px solid #dbe1e4;background:#ebeef2;color:#171e26}
html[data-theme="light"] .tf-card small{color:#4f5a6b}
html[data-theme="light"] .tf-card:hover{border-color:#2dd4bf}
html[data-theme="light"] .tf-badge{background:#edebe4;color:#826517}
html[data-theme="light"] .tf-empty{color:#5e6878}
html[data-theme="light"] .tf-tabs{border-bottom:1px solid #dfe2e7}
html[data-theme="light"] .tf-tab{color:#4f5a6b}
html[data-theme="light"] .tf-tab[aria-selected=true]{color:#171e26;border-bottom-color:#2dd4bf}
html[data-theme="light"] .tf-unit{border:1px solid #dfe2e7;background:#edf0f3}
html[data-theme="light"] .tf-unit summary b{color:#171e26}
html[data-theme="light"] .tf-unit summary small{color:#4f5a6b}
html[data-theme="light"] .tf-members{border:1px solid #dfe2e7}
html[data-theme="light"] .tf-members legend{color:#333d4c}
html[data-theme="light"] .tf-check small{color:#4f5a6b}
html[data-theme="light"] .tf-danger{color:#7a0600 !important;border-color:#e3d4d4 !important}
html[data-theme="light"] .tf-stage{border:1px solid #dfe2e7;background:#edf0f3}
html[data-theme="light"] .tf-owner{color:#25038b}
html[data-theme="light"] .ti-scope-btn[aria-pressed=true]{border-color:#2dd4bf;color:#218576}
html[data-theme="light"] .pl-owner{color:#4f5a6b}
html[data-theme="light"] .pl-owner select{background:#f2f5f8;color:#171e26;border:1px solid #d3d7de}
html[data-theme="light"] .tf-area-tag{background:#ebeaf1;color:#1a007a}
html[data-theme="light"] .tf-order{color:#333d4c}
html[data-theme="light"] .tf-choice{border:1px solid #dfe2e7;background:#edf0f3}
html[data-theme="light"] .tf-free{background:#e5efed;color:#21785b}
html[data-theme="light"] .tf-dialog textarea{background:#f2f5f8;color:#171e26;border:1px solid #d3d7de}
html[data-theme="light"] .tf-sh{border:1px solid #dfe2e7;background:#edf0f3}
html[data-theme="light"] .tf-sh small{color:#4f5a6b}
html[data-theme="light"] .tf-new{background:#a78bfa;color:#120c25}
html[data-theme="light"] .td-deleted{color:#5e6878}
html[data-theme="light"] .tf-unit summary .tf-unit-alt{color:#333d4c}
html[data-theme="light"] .tf-unit summary .tf-unit-desc{color:#4f5a6b}
html[data-theme="light"] .tf-dialog form.tf-form textarea{background:#f2f5f8;color:#171e26;border:1px solid #d3d7de}
/* light-theme:end */
