/* A vertical production sequence inside the existing theme system. */
.production-flow {
  container: production-flow / inline-size;
  display:flex;
  flex:1;
  flex-direction:column;
  gap:10px;
  width:100%;
  min-width:0;
  min-height:0;
  max-width:100%;
  overflow:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  padding:2px 5px 12px 2px;
}
.production-flow .pf-phase {
  flex:none;
  min-width:0;
  border:1px solid var(--steel);
  border-radius:10px;
  background:var(--bg2);
  overflow:hidden;
}
.production-flow .pf-phase-heading { margin:0; font:inherit; }
.production-flow .pf-phase-toggle {
  display:grid;
  grid-template-columns:8px minmax(0,1fr) auto 16px;
  align-items:center;
  gap:11px;
  width:100%;
  min-width:0;
  min-height:52px;
  padding:13px 16px;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--txt-hi);
  text-align:left;
  font:inherit;
  cursor:pointer;
}
.production-flow .pf-phase-toggle:hover { background:var(--bg3,var(--bg)); }
.production-flow .pf-phase-dot { width:8px; height:8px; border-radius:50%; background:var(--flow-phase); }
.production-flow .pf-phase-title { min-width:0; font-size:14px; font-weight:650; overflow-wrap:anywhere; }
.production-flow .pf-phase-count { min-width:21px; color:var(--txt-lo); font-size:12px; font-variant-numeric:tabular-nums; text-align:center; }
.production-flow .pf-phase-chevron { color:var(--txt-lo); transition:transform .15s ease; }
.production-flow .is-open > .pf-phase-heading .pf-phase-chevron { transform:rotate(90deg); }
.production-flow .is-open > .pf-phase-heading { border-bottom:1px solid var(--steel); }
.production-flow .pf-phase-content[hidden] { display:none; }
.production-flow .pf-card-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  min-width:0;
  padding:12px;
}
.production-flow .pf-card-grid:empty { display:none; }
.production-flow .pf-card {
  display:flex;
  flex-direction:column;
  min-width:0;
  margin:0;
  border:1px solid var(--steel-hi,var(--steel));
  border-left:2px solid var(--flow-phase);
  border-radius:7px;
  background:var(--bg);
  overflow:hidden;
}
.production-flow .pf-card[draggable=true] { cursor:grab; }
.production-flow .pf-card:focus-within { border-color:var(--gold); }
.production-flow .pf-card-open {
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  width:100%;
  min-width:0;
  min-height:130px;
  padding:13px 14px 12px;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--txt);
  text-align:left;
  font:inherit;
  cursor:pointer;
}
.production-flow .pf-card-open:hover { background:var(--bg2); }
.production-flow .pf-card-title {
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  overflow-wrap:anywhere;
  color:var(--txt-hi);
  font-size:14px;
  line-height:1.45;
  font-weight:650;
}
.production-flow .pf-card-client { color:var(--txt-lo); font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.production-flow .pf-card-origin { color:var(--gold); font-size:11px; overflow-wrap:anywhere; }
.production-flow .pf-card-action { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:1.5; }
.production-flow .pf-card-facts { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; margin-top:auto; padding-top:4px; }
.production-flow .pf-card-date { color:var(--txt-lo); font-size:11px; line-height:1.5; }
.production-flow .pf-card-budget { color:var(--txt-hi); font-size:13px; line-height:1.5; font-weight:600; white-space:nowrap; }
.production-flow .pf-card-footnote { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:5px 12px; color:var(--txt-lo); font-size:10px; line-height:1.5; }
.production-flow .pf-card-team { min-width:0; overflow-wrap:anywhere; }
.production-flow .pf-card-controls { display:flex; align-items:center; gap:10px; min-width:0; padding:8px 12px; border-top:1px solid var(--steel); color:var(--txt-lo); font-size:10px; }
.production-flow .pf-card-controls > span { flex:none; }
.production-flow .pf-card-controls select { flex:1; min-width:0; max-width:100%; min-height:30px!important; margin:0; padding:4px 7px!important; font-size:11px!important; }
.production-flow .pf-phase-empty { margin:0; padding:18px 16px; color:var(--txt-lo); font-size:12px; line-height:1.5; }
.production-flow .pf-show-all { display:block; width:calc(100% - 24px); min-height:35px; margin:0 12px 12px; font-size:12px; }
.production-flow button:focus-visible,.production-flow select:focus-visible { outline:2px solid var(--gold); outline-offset:-3px; }
.production-flow button:disabled,.production-flow select:disabled { cursor:default; }
@container production-flow (max-width:560px) {
  .production-flow .pf-card-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:600px) {
  .production-flow { padding-right:2px; }
  .production-flow .pf-phase-toggle { min-height:49px; padding:12px; gap:9px; }
  .production-flow .pf-card-grid { grid-template-columns:minmax(0,1fr); padding:9px; gap:9px; }
  .production-flow .pf-card-open { min-height:0; padding:12px; }
}
@media(prefers-reduced-motion:reduce) {
  .production-flow .pf-phase-chevron { transition:none; }
}
