/* v71 批量设置最低库存 dialog (shell reuses .fx-sheet) + restock tile stepper. */
.tt-sheet[open]{width:min(680px,calc(100vw - 32px))}
.tt-body{display:grid;gap:14px}
.tt-section{display:grid;gap:8px}
.tt-section h3{margin:0;font-size:14px;color:var(--deep,#273d35)}
.tt-modes .fx-choice{min-height:36px;font-size:13px}
.tt-pane[hidden]{display:none}
.tt-hint{margin:0;font-size:13px;color:var(--muted,#6b7a71)}
.tt-chips{display:flex;flex-wrap:wrap;gap:6px}
.tt-chip{min-height:34px;margin:0;padding:5px 14px;border:1.5px solid var(--line,#d9e4dc);border-radius:999px;background:var(--paper,#fff);color:var(--ink,#2f4339);font-size:14px;font-weight:600;cursor:pointer;box-shadow:none}
.tt-chip.is-on{border-color:var(--green,#537c65);background:var(--green,#537c65);color:#fff}
.tt-search{width:100%;min-height:38px;margin:0 0 8px;padding:6px 12px;border:1.5px solid var(--line,#d9e4dc);border-radius:10px;font-size:15px}
.tt-machines{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:6px;max-height:240px;overflow:auto;padding:2px}
.tt-machine{display:flex;align-items:center;gap:6px;min-height:40px;margin:0;padding:5px 8px;border:1.5px solid var(--line,#d9e4dc);border-radius:10px;background:var(--paper,#fff);color:var(--ink,#2f4339);font-size:13px;text-align:left;cursor:pointer;box-shadow:none}
.tt-machine img{width:24px;height:24px;object-fit:contain}
.tt-machine span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tt-machine.is-on{border-color:var(--green,#537c65);background:color-mix(in srgb,var(--green,#537c65) 12%,var(--paper,#fff));font-weight:700}
.tt-templates{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px}
.tt-template{display:grid;gap:3px;margin:0;padding:8px 10px;border:1.5px solid var(--line,#d9e4dc);border-radius:10px;background:var(--paper,#fff);color:var(--ink,#2f4339);text-align:left;cursor:pointer;box-shadow:none}
.tt-template strong{display:flex;justify-content:space-between;gap:6px;font-size:14px;color:var(--deep,#273d35)}
.tt-template small{font-size:11px;font-weight:600;color:var(--muted,#6b7a71)}
.tt-template span{font-size:12px;line-height:1.4;color:var(--muted,#6b7a71)}
.tt-template.is-on{border-color:var(--green,#537c65);background:color-mix(in srgb,var(--green,#537c65) 10%,var(--paper,#fff))}
.tt-options{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px}
.tt-options [hidden]{display:none}
.tt-qty{display:flex;gap:8px}
.tt-qty input{flex:1;min-width:0;min-height:42px;margin:0;padding:6px 12px;border:1.5px solid var(--line,#d9e4dc);border-radius:10px;font-size:18px;font-weight:700}
.tt-qty .secondary{white-space:nowrap}
#ttClear.is-on{border-color:#c0392b;background:#fde7e6;color:#c0392b}
#ttScope{width:100%;min-height:40px}
.tt-preview{margin:0;padding:8px 10px;border-radius:10px;background:var(--soft,#eaf1ec);font-size:13px;line-height:1.5;color:var(--ink,#2f4339)}

/* restock tile: the tile frame moves to <li> so the stepper can sit beside the open button */
.restock-row{position:relative;display:grid;border:1px solid var(--line,#e1e8e3);border-radius:9px;background:var(--paper,#fff);overflow:hidden}
.restock-row .rr-open{position:static;border:0;border-radius:0;background:transparent;padding-bottom:3px}
.restock-row:hover{border-color:var(--green,#537c65)}
.rr-step{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;align-items:center;gap:2px;padding:0 6px 7px 43px}
.rr-step button{min-height:24px;margin:0;padding:0;border:1px solid var(--line,#d9e4dc);border-radius:7px;background:var(--paper,#fff);color:var(--ink,#2f4339);font-size:15px;font-weight:800;line-height:1;cursor:pointer;box-shadow:none;font-variant-numeric:tabular-nums}
.rr-step [data-step-edit]{font-size:12px;font-weight:700;border-style:dashed}
.rr-step button:hover{border-color:var(--green,#537c65);color:var(--green,#537c65)}
.rr-step.is-pending [data-step-edit]{border-color:var(--green,#537c65);color:var(--green,#537c65)}
@media(max-width:700px){
 body.farm-ui dialog#targetDialog{inset:auto 0 0 0;width:100%!important;max-width:none!important;max-height:86dvh;margin:0;border-radius:20px 20px 0 0}
 .tt-modes{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .tt-machines{grid-template-columns:repeat(2,minmax(0,1fr));max-height:200px}
 .tt-templates{grid-template-columns:1fr}
 .rr-step{grid-template-columns:26px minmax(0,1fr) 26px;padding:0 5px 6px 32px}
 .rr-step button{min-height:24px;font-size:14px}
}
