/* Presentation only, scoped to the database-backed Stitching floor. */
.stitching-cloud .stitching-page { max-width:none; }
.stitching-cloud .panel { box-shadow:0 3px 16px #173d2f05; border-color:#dfe7e2; border-radius:18px; }
.stitching-cloud [hidden] { display:none!important; }
.stitching-cloud .section-heading { padding:24px; }
.stitching-cloud .section-heading h2 { font-size:23px; margin:3px 0 7px; }
.stitching-cloud .section-heading p { font-size:13px; line-height:1.6; }
.stitching-cloud .section-kicker { color:#59796b; font-size:10px; letter-spacing:.12em; }
.stitching-cloud .stitching-summary { gap:8px; }
.stitching-cloud .stitching-summary-card { min-height:86px; padding:14px; grid-template-columns:1fr; gap:0; box-shadow:none; border-radius:12px; }
.stitching-cloud .stitching-summary-card > span { display:none; }
.stitching-cloud .stitching-summary-card small { font-size:11px; color:#61776e; }
.stitching-cloud .stitching-summary-card strong { font-size:24px; margin:4px 0 0; }
.stitching-cloud .stitching-summary-card p { display:none; }
.stitching-cloud .stitching-summary-card.kharcha strong { font-size:19px; }
.stitching-floor-nav { display:flex; flex-wrap:wrap; gap:6px; padding:6px; margin:20px 0; border:1px solid #dce6e0; border-radius:13px; background:#eaf0ec; }
.stitching-floor-nav button { flex:1 1 auto; min-height:44px; padding:10px 15px; border:0; border-radius:9px; background:transparent; color:#566e61; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.stitching-floor-nav button[aria-pressed=true] { color:#174e3d; background:#fff; box-shadow:0 2px 6px #123c2212; }
.stitching-floor-nav button:hover { color:#174e3d; background:#ffffffb0; }
.stitching-cloud .stitching-lot-tools { padding:0 24px 22px; grid-template-columns:minmax(200px,1fr) minmax(220px,2fr); }
.stitching-cloud .production-cloud-search { font-size:12px; gap:7px; }
.stitching-cloud .production-cloud-search input,.stitching-cloud .production-cloud-search select { min-height:44px; border-color:#d5e1da; }
.stitching-cloud .stitching-lots-grid { padding:0 24px 24px; gap:20px; align-items:start; overflow:visible; }
.stitching-cloud .accepted-lot-card { padding:20px; background:#fff; border:1px solid var(--lot-accent-soft,#dbe4de); border-top:3px solid var(--lot-accent-soft,#9abda9); border-radius:13px; }
.stitching-cloud .accepted-lot-card > header { gap:10px; }
.floor-lot-number { font-size:12px; font-weight:800; letter-spacing:.055em; color:#47725d; }
.stitching-cloud .accepted-lot-card h3 { font-size:19px; line-height:1.35; margin:5px 0; }
.floor-lot-style { margin:0; color:#76837c; font-size:11px; line-height:1.5; }
.stitching-cloud .state-chip { font-size:10px; padding:5px 8px; }
.stitching-cloud .production-cloud-quantities { gap:0; border:1px solid #e4eae6; border-radius:9px; overflow:hidden; margin:18px 0 12px; }
.stitching-cloud .production-cloud-quantities > div { border-radius:0; background:#f8faf8; padding:10px; border-right:1px solid #e4eae6; }
.stitching-cloud .production-cloud-quantities > div:last-child { border-right:0; }
.stitching-cloud .production-cloud-quantities small { font-size:10px; color:#728279; }
.stitching-cloud .production-cloud-quantities strong { font-size:14px; margin-top:4px; }
.stitching-cloud .stitching-lot-timers { gap:8px; margin:0 0 18px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.stitching-cloud .stitching-stage-time { padding:9px 11px; border-radius:8px; gap:3px; }
.stitching-cloud .stitching-stage-time > span { font-size:11px; }
.stitching-cloud .stitching-stage-time > strong { font-size:14px; }
.stitching-cloud .stitching-stage-time > small { font-size:10px; }
.floor-section-label { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:4px; }
.floor-section-label strong,.floor-accessories h4 { color:#365b47; font-size:12px; font-weight:700; }
.floor-section-label > span { color:#728579; font-size:11px; }
.stitching-cloud .production-cloud-fabrics { gap:8px; margin:8px 0; }
.stitching-cloud .production-cloud-fabrics .tracking-fabric { padding:9px 11px; border-radius:8px; background:#fbfcfb; }
.stitching-cloud .tracking-fabric-heading > strong { font-size:12px; flex:1 1 130px; }
.stitching-cloud .tracking-fabric-heading > span { margin:0; font-size:10px; }
.stitching-cloud .tracking-fabric .stitching-lot-track { margin:8px 0 6px; height:5px; }
.stitching-cloud .tracking-fabric-state { gap:3px 8px; font-size:10px; }
.stitching-cloud .tracking-fabric-state > strong { font-size:11px; font-weight:600; }
.stitching-cloud .tracking-fabric-state > span { font-size:10px; margin:0; }
.stitching-cloud .handoff-origin { font-size:10px; margin-top:3px; }
.stitching-cloud .tracking-fabric-note { font-size:10px; }
.stitching-cloud .tracking-message { background:transparent; padding:0; margin:9px 0 4px; font-size:11px; color:#637c6e; line-height:1.5; }
.stitching-cloud .tracking-release { font-size:11px; margin:4px 0 0; color:#486653; font-weight:600; }
.floor-accessories { margin:16px 0 0; padding-top:12px; border-top:1px solid #e5ebe7; min-width:0; }
.floor-accessories h4 { margin:0 0 8px; }
.stitching-cloud .floor-accessories .accessory-availability { margin:0; }
.stitching-cloud .floor-accessories .accessory-availability-lines { gap:7px; }
.stitching-cloud .floor-accessories .accessory-availability-line { padding:9px 10px; border:0; border-left:3px solid #d5e8dc; border-radius:5px; background:#f6faf7; }
.stitching-cloud .floor-accessories .accessory-availability-line.short { background:#fffbf2; border-left-color:#d7a655; }
.stitching-cloud .floor-accessories .accessory-availability-line.unknown { border-left-color:#a7b8c2; background:#f4f7fa; }
.stitching-cloud .floor-accessories .accessory-availability-line > strong { font-size:11px; }
.stitching-cloud .floor-accessories .accessory-stock-numbers { display:flex; gap:2px 12px; margin-top:5px; font-size:11px; line-height:1.5; }
.stitching-cloud .floor-accessories .accessory-shortage-text { width:100%; font-size:10px; }
.stitching-cloud .floor-accessories .accessory-stock-status { margin:6px 0 0; justify-content:space-between; font-size:9px!important; }
.stitching-cloud .floor-accessories .accessory-stock-status button { padding:5px 7px; font-size:10px; }
.floor-lot-footer { margin-top:16px; padding-top:13px; border-top:1px solid #e5ebe7; }
.stitching-cloud .floor-lot-footer .tracking-accepted { margin:0; color:#728379; font-size:10px; }
.floor-lot-footer > small { display:block; color:#718075; font-size:10px; margin-top:5px; }
.stitching-cloud .floor-lot-footer .production-cloud-actions { margin-top:10px; }
.stitching-cloud .production-cloud-actions button { min-height:38px; padding:8px 14px; background:#fff; border-color:#d5e2d9; font-size:12px; }
.stitching-cloud .production-cloud-actions [data-assign-job],.stitching-cloud .production-cloud-actions [data-assignment-action=receive],.stitching-cloud .production-cloud-actions [data-assignment-action=complete] { background:#227965; border-color:#227965; color:#fff; font-weight:650; }
.stitching-cloud .stitching-workspace { display:flex; flex-direction:column; gap:18px; }
.stitching-cloud .stitching-workspace > * { width:100%; min-width:0; }
.stitching-cloud .assignment-table-wrap { display:none; }
.stitching-cloud #assignment-mobile-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:18px; padding:22px 24px; }
.floor-worker-card { border:1px solid #dce6df; border-radius:12px; padding:18px; background:#fff; min-width:0; }
.floor-worker-card > header { display:flex; align-items:center; gap:10px; }
.floor-worker-number { min-width:42px; height:42px; padding:0 7px; display:grid; place-items:center; background:#edf5f0; border-radius:11px; color:#3d745a; font-size:13px; font-weight:800; }
.floor-worker-card header > div { flex:1; min-width:0; }
.floor-worker-card h3 { font-size:16px; margin:0 0 5px; overflow-wrap:anywhere; }
.floor-worker-card header p { font-size:11px; color:#718477; margin:0; }
.floor-worker-product { font-size:12px; line-height:1.5; margin:14px 0 10px; color:#3a5847; overflow-wrap:anywhere; }
.floor-worker-product > span { color:#75857b; font-size:11px; }
.floor-worker-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-radius:8px; background:#f6f9f6; padding:12px 0; }
.floor-worker-counts > div { padding:0 12px; border-right:1px solid #e1e8e2; }
.floor-worker-counts > div:last-child { border-right:0; }
.floor-worker-counts small { display:block; color:#6f8174; font-size:10px; }
.floor-worker-counts strong { display:block; font-size:20px; color:#28523b; margin-top:4px; }
.floor-worker-counts strong > span { font-size:10px; color:#7b8e7f; font-weight:500; }
.floor-worker-exceptions,.floor-size-note { color:#728275; font-size:10px; margin:10px 0 0; line-height:1.6; }
.floor-worker-card footer { margin-top:12px; padding-top:12px; border-top:1px solid #e4ebe5; }
.floor-worker-dates { font-size:10px; color:#7d8c80; line-height:1.6; margin:0; }
.floor-worker-issues { margin:10px 0 0; color:#506e5a; font-size:12px; }
.assignment-dated-issues { display:grid; gap:12px; margin:16px 0; }
.assignment-dated-issue { padding:16px; border:1px solid #dce6df; border-radius:10px; background:#f8fbf9; min-width:0; }
.assignment-dated-issue header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.stitching-cloud .assignment-dated-issue p { margin:7px 0; font-size:12px; overflow-wrap:anywhere; }
.assignment-group-detail .floor-worker-counts { margin:18px 0; }
.stitching-cloud .register-tools { padding:0 24px 20px; flex-wrap:wrap; }
.stitching-cloud .status-tabs { flex-wrap:wrap; background:#f2f6f3; gap:3px; padding:4px; }
.stitching-cloud .status-tabs button { min-height:35px; padding:8px 10px; font-size:11px; }
.stitching-cloud .status-tabs button.active { color:#216a51; }
.stitching-cloud .search-field { min-height:42px; width:100%; flex:1 1 240px; padding:0 12px; }
.stitching-cloud .search-field input { font-size:13px; }
.stitching-cloud .register-heading-actions { display:flex; flex-wrap:wrap; }
.stitching-cloud .register-heading-actions button { width:auto; padding:10px 12px; }
.stitching-cloud #production-worker-filter { margin:16px 24px 0; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; font-size:12px; }
.floor-workload-disclosure { border:1px solid #dce6df; border-radius:12px; background:#fff; }
.floor-workload-disclosure > summary { list-style:none; cursor:pointer; padding:18px 22px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.floor-workload-disclosure > summary::-webkit-details-marker { display:none; }
.floor-workload-disclosure > summary strong { display:block; font-size:15px; }
.floor-workload-disclosure > summary small { display:block; font-size:12px; margin-top:5px; color:#738478; }
.stitching-cloud .floor-workload-disclosure .workload-panel { border:0; box-shadow:none; }
.floor-workload-disclosure .section-heading { display:none; }
.stitching-cloud .workload-list { max-height:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:0 20px 20px; }
.stitching-cloud .workload-list .production-cloud-card { background:#fafcf9; border-color:#e0e9e0; margin:0; }
.stitching-cloud .exception-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:0 24px 24px; }
.stitching-cloud .finishing-grid { padding:0 24px 24px; gap:24px; }
.stitching-cloud .production-cloud-footer { padding:16px 24px; }
.stitching-cloud .production-cloud-toolbar { margin:0; font-size:11px; }
.stitching-cloud .production-cloud-pager { margin-top:14px; }
.stitching-cloud .production-cloud-card { margin-bottom:10px; }
.stitching-cloud .stitching-modal { border-radius:18px; max-height:92vh; }
.stitching-cloud .modal-header { padding:24px; }
.stitching-cloud .modal-header h2 { font-size:23px; line-height:1.35; }
.stitching-cloud .modal-header p { margin-top:6px; font-size:13px; line-height:1.5; }
.stitching-cloud .modal-actions { position:sticky; bottom:0; z-index:5; background:#fff; padding:16px 0; box-shadow:0 -8px 16px #fff; }
.stitching-cloud .modal-actions button { min-height:44px; }
.stitching-cloud .modal-actions .save-action { background:#227965; border-color:#227965; }
.stitching-cloud .assignment-batch-row { border-color:#dbe5dd; background:#fafcf9; }
.stitching-cloud .production-cloud-detail h3 { font-size:17px; }
.stitching-cloud button:focus-visible,.stitching-cloud summary:focus-visible,.stitching-cloud a:focus-visible,.stitching-cloud input:focus-visible,.stitching-cloud select:focus-visible,.stitching-cloud textarea:focus-visible { outline:3px solid #68a28c; outline-offset:3px; }
@media(max-width:1100px) {
  .stitching-cloud .stitching-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stitching-cloud .workload-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:900px) {
  .stitching-cloud #register .search-field { flex:0 0 auto; min-height:44px; }
}
@media(max-width:600px) {
  .stitching-floor-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:14px 0; }
  .stitching-floor-nav button { padding:9px 5px; font-size:12px; }
  .stitching-floor-nav button:last-child { grid-column:1/-1; }
  .stitching-cloud .stitching-summary-card { min-height:74px; padding:10px; }
  .stitching-cloud .stitching-summary-card strong { font-size:21px; }
  .stitching-cloud .stitching-summary-card small { font-size:10px; }
  .stitching-cloud .stitching-summary-card.kharcha strong { font-size:16px; }
  .stitching-cloud .section-heading { padding:20px 16px; }
  .stitching-cloud .section-heading h2 { font-size:21px; }
  .stitching-cloud .section-heading p { font-size:12px; }
  .stitching-cloud .stitching-lot-tools { grid-template-columns:1fr; padding:0 16px 18px; }
  .stitching-cloud .stitching-lots-grid,.stitching-cloud #assignment-mobile-list { padding:0 12px 16px; gap:14px; }
  .stitching-cloud .accepted-lot-card,.floor-worker-card { padding:14px; }
  .stitching-cloud .accepted-lot-card h3 { font-size:18px; }
  .stitching-cloud .accepted-lot-card > header { flex-wrap:wrap; }
  .stitching-cloud .accepted-lot-card .production-cloud-quantities { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stitching-cloud .production-cloud-quantities > div { border-bottom:1px solid #e4eae6; }
  .stitching-cloud .stitching-stage-time { padding:8px; }
  .stitching-cloud .stitching-stage-time > strong { font-size:12px; }
  .stitching-cloud .stitching-stage-time > span { font-size:10px; }
  .stitching-cloud .stitching-stage-time > small { font-size:9px; }
  .floor-worker-card header { flex-wrap:wrap; }
  .floor-worker-card header .state-chip { margin-left:52px; }
  .floor-worker-counts > div { padding:0 9px; }
  .stitching-cloud .register-tools { padding:0 16px 18px; }
  .stitching-cloud .register-heading-actions { margin-top:12px; }
  .stitching-cloud .production-cloud-footer { padding:16px; }
  .stitching-cloud .workload-list,.stitching-cloud .exception-list,.stitching-cloud .finishing-grid { grid-template-columns:1fr; padding:0 16px 16px; }
  .stitching-cloud .modal-header { padding:20px 16px; }
  .stitching-cloud .modal-header h2 { font-size:20px; }
  .stitching-cloud .stitching-modal { border-radius:18px 18px 0 0; }
  .stitching-cloud .production-cloud-detail { padding:22px 16px; }
}
.floor-worker-report{background:#fff7e7;color:#815b19;border:1px solid #f0dfb1;border-radius:9px;padding:10px 12px;font-size:12px;line-height:1.6}.receipt-worker-report{background:#f1f7f2;border:1px solid #d9e6db;border-radius:12px;padding:16px;margin:16px 0 22px}.receipt-worker-report h3{font-size:15px;margin:0 0 9px}.receipt-worker-report p{font-size:12px;line-height:1.7;color:#597465;margin:5px 0}.receipt-worker-report>div{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;padding:7px 0;border-top:1px solid #dfe9df;font-size:12px}.receipt-worker-report small{display:block;font-size:11px;line-height:1.6;color:#708277}

/* Both registers use the same device-width column count. */
.stitching-cloud #handoff-card-list,.stitching-cloud #assignment-mobile-list {
  grid-template-columns:minmax(0,1fr);
  gap:14px;
}
@media(min-width:768px) {
  .stitching-cloud #handoff-card-list,.stitching-cloud #assignment-mobile-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(min-width:1200px) {
  .stitching-cloud #handoff-card-list,.stitching-cloud #assignment-mobile-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(min-width:1920px) {
  .stitching-cloud #handoff-card-list,.stitching-cloud #assignment-mobile-list { grid-template-columns:repeat(6,minmax(0,1fr)); }
}
.stitching-cloud .accepted-lot-card,.stitching-cloud .floor-worker-card {
  container-type:inline-size;
  container-name:stitching-card;
  overflow-wrap:anywhere;
}
/* Keep quantities, timers and controls legible inside narrower three/four/six-column cards. */
@container stitching-card (max-width:360px) {
  .accepted-lot-card > header,.floor-worker-card > header { flex-wrap:wrap; }
  .floor-worker-card header .state-chip { margin-left:0; }
  .accepted-lot-card .production-cloud-quantities { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .accepted-lot-card .production-cloud-quantities > div { border-bottom:1px solid #e4eae6; }
  .accepted-lot-card .production-cloud-quantities > div:nth-child(2n) { border-right:0; }
  .accepted-lot-card .stitching-lot-timers { grid-template-columns:minmax(0,1fr); }
  .floor-worker-card .floor-worker-counts { grid-template-columns:minmax(0,1fr); padding:6px 0; }
  .floor-worker-card .floor-worker-counts > div { display:flex; align-items:center; justify-content:space-between; gap:8px; border-right:0; padding:6px 10px; }
  .floor-worker-card .floor-worker-counts strong { margin:0; font-size:18px; }
  .production-cloud-actions button { max-width:100%; }
}
/* Released garments and assignment balances, independent of fabric counts. */
.lot-allocation { margin: 14px 0; min-width: 0; }
.lot-allocation h4 { margin: 0 0 8px; font-size: 13px; }
.lot-allocation-counts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin: 0; }
.lot-allocation-counts > div { padding: 8px; background: #f0f5f4; border: 1px solid #dce6e2; border-radius: 8px; min-width: 0; }
.lot-allocation-counts dt { font-size: 11px; line-height: 1.4; }
.lot-allocation-counts dd { margin: 4px 0 0; font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.lot-allocation-counts .needs-assignment { background: #fff0ef; border-color: #eab0aa; color: #9e2620; }
.lot-colour-allocations { display: grid; gap: 10px; margin-top: 12px; }
.lot-colour-allocation > strong { display: block; margin-bottom: 6px; font-size: 12px; overflow-wrap: anywhere; }
.lot-allocation-note { margin: 4px 0; color: var(--muted); font-size: 12px; }
