#v-dw{max-width:1100px;margin:auto}.dw-head,.dw-form-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.dw-head{margin-bottom:16px}.dw-head h2{margin:0 0 5px}.dw-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:14px 0}.dw-entry,.dw-form{background:#fff;border:1px solid #d7e0ec;border-radius:14px;padding:16px}.dw-entry{display:grid;gap:10px}.dw-status{display:inline-block;border-radius:22px;padding:5px 10px;font-size:11px;font-weight:750;width:max-content;background:#f1f5f9;color:#334155}.dw-status.pending{background:#fef3c7;color:#92400e}.dw-status.signed{background:#dcfce7;color:#166534}.dw-form h3{margin:14px 0 12px;color:#143967}.dw-form h4{margin:20px 0 7px}.dw-form label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#34445c}.dw-form input,.dw-form select,.dw-form textarea{width:100%;background:#fff;padding:10px;border-radius:8px;border:1px solid #cad6e5;color:#10243f;font-size:16px}.dw-form textarea{min-height:90px}.dw-form>.dw-two,.dw-form>label{margin-bottom:14px}.dw-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.dw-overflow{overflow:auto;margin:9px 0}.dw-table{width:100%;border-collapse:collapse;min-width:720px}.dw-table th,.dw-table td{border:1px solid #e2e8f0;padding:5px;font-size:12px}.dw-table th{background:#eaf2ff;color:#143967}.dw-table td:first-child{min-width:155px}.dw-table input[type=number]{min-width:47px;width:55px;text-align:center;padding:8px 3px;font-size:14px}.dw-table input:not([type=number]){min-width:110px;padding:8px;font-size:14px}.dw-table select{font-size:14px;min-width:65px}.dw-table .dw-total{font-weight:bold;text-align:center}.dw-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.dw-toggle{display:flex!important;flex-direction:row;align-items:center;gap:8px}.dw-toggle input{width:auto}.dw-modal{position:fixed;inset:0;z-index:99999;background:#06152bbf;display:flex;align-items:center;justify-content:center;padding:16px}.dw-sign-box{width:min(720px,100%);padding:18px;border-radius:14px;background:white;display:grid;gap:12px}.dw-sign-box label{display:grid;gap:5px;font-weight:700}.dw-sign-box input{padding:10px;border:1px solid #b4c4d8;border-radius:8px;font-size:16px}.dw-sign-box canvas{width:100%;touch-action:none;border:2px dashed #94a3b8;background:#fff;border-radius:10px}.dw-sign-box .actions{justify-content:flex-end}@media(max-width:650px){.dw-two{grid-template-columns:1fr}.dw-head .actions{width:100%}.dw-head .actions button{flex:1}.dw-form{padding:12px}.dw-actions .btn{flex:1 1 40%}}
/* DW layout polish – visual only, no changes to app logic */
#v-dw{--dw-blue:#0c4d92;--dw-navy:#08366e}
#v-dw .dw-form{border-radius:12px;border:1px solid #c8d8e9;box-shadow:0 5px 20px rgba(12,48,95,.06);background:#fff}
#v-dw .dw-form-top{background:linear-gradient(115deg,#08366e,#0d5cab);color:#fff;border-radius:9px;padding:15px 18px;margin-bottom:16px}
#v-dw .dw-form-top h3{color:#fff;margin:0;font-size:19px;letter-spacing:.15px}
#v-dw .dw-form-top .dw-status{font-weight:750}
#v-dw .dw-form>h3{margin:24px 0 11px;background:linear-gradient(100deg,#08366e,#0c4d92);color:#fff;padding:9px 12px;border-radius:6px;font-size:14px}
#v-dw .dw-form>h4{color:#08366e;border-bottom:2px solid #d7e6f6;padding-bottom:7px}
#v-dw .dw-form label{color:#123b67}
#v-dw .dw-form input:focus,#v-dw .dw-form textarea:focus,#v-dw .dw-form select:focus{border-color:#0c5fae;outline:2px solid #d7eaff;outline-offset:0}
#v-dw .dw-overflow{border:1px solid #c8d8e9;border-radius:8px;overflow:auto;background:#fff}
#v-dw .dw-table{margin:0}
#v-dw .dw-table th{background:#d7e8fa;border-color:#c4d6e8;color:#08366e;font-weight:750;padding:10px 7px}
#v-dw .dw-table td{border-color:#d6e2ef;padding:7px 6px}
#v-dw .dw-table tbody tr:nth-child(even){background:#f4f9ff}
#v-dw .dw-table .dw-total{color:#08366e;background:#e2effc;font-weight:800}
#v-dw .dw-actions{padding-top:13px;border-top:1px solid #d9e6f3}
#v-dw .dw-entry{border-color:#c5d8ec;box-shadow:0 3px 10px rgba(11,49,90,.035)}
@media(max-width:650px){#v-dw .dw-form-top{padding:12px 13px}#v-dw .dw-form-top h3{font-size:17px}#v-dw .dw-form>h3{font-size:13px}#v-dw .dw-table th{padding:8px 5px}#v-dw .dw-actions .btn{min-height:42px}}

/* Mobile compact labour entry: keep weekdays closer together and minimise sideways scrolling. */
@media(max-width:650px){
 #v-dw .dw-overflow{max-width:100%;-webkit-overflow-scrolling:touch}
 #v-dw .dw-labour-table{min-width:0;width:max-content;table-layout:fixed}
 #v-dw .dw-labour-table th,#v-dw .dw-labour-table td{padding:3px 2px;font-size:10px;white-space:nowrap}
 #v-dw .dw-labour-table th{font-size:10px;line-height:1.1}
 #v-dw .dw-labour-table td:first-child{min-width:0;width:104px;position:sticky;left:0;z-index:1;background:#fff}
 #v-dw .dw-labour-table th:first-child{position:sticky;left:0;z-index:2;background:#d7e8fa;min-width:0;width:104px}
 #v-dw .dw-labour-table input:not([type=number]){min-width:0;width:98px;padding:5px 3px;font-size:12px}
 #v-dw .dw-labour-table input[type=number]{min-width:0;width:32px;padding:5px 1px;font-size:12px;text-align:center;border-radius:5px}
 #v-dw .dw-labour-table .dw-total{min-width:29px;font-size:11px}
 #v-dw .dw-labour-table button.danger{min-width:24px;padding:3px 5px}
 #v-dw .dw-labour-table th:nth-child(n+2):nth-child(-n+8){width:34px;max-width:34px;white-space:normal}
}

/* V1.2: Materials uses the same compact, bordered entry style as Labour on phones. */
#v-dw .dw-materials-table{table-layout:fixed;min-width:0;width:100%}
#v-dw .dw-materials-table th,#v-dw .dw-materials-table td{overflow:hidden;min-width:0}
#v-dw .dw-materials-table th:nth-child(1){width:49%}
#v-dw .dw-materials-table th:nth-child(2){width:23%}
#v-dw .dw-materials-table th:nth-child(3){width:20%}
#v-dw .dw-materials-table th:nth-child(4){width:8%}
#v-dw .dw-materials-table td:first-child{min-width:0}
#v-dw .dw-materials-table input:not([type=number]),
#v-dw .dw-materials-table select{width:100%;min-width:0;box-sizing:border-box}
@media(max-width:650px){
 #v-dw .dw-materials-table th,#v-dw .dw-materials-table td{font-size:11px;padding:4px 3px;white-space:normal}
 #v-dw .dw-materials-table th{line-height:1.15;overflow-wrap:anywhere}
 #v-dw .dw-materials-table input:not([type=number]),
 #v-dw .dw-materials-table select{font-size:12px;padding:6px 3px;min-width:0}
 #v-dw .dw-materials-table th:nth-child(1){width:45%}
 #v-dw .dw-materials-table th:nth-child(2){width:24%}
 #v-dw .dw-materials-table th:nth-child(3){width:21%}
 #v-dw .dw-materials-table th:nth-child(4){width:10%}
 #v-dw .dw-materials-table button.danger{min-width:0;padding:5px 3px;width:100%;font-size:13px}
}

/* V1.3: DW History remains visible in the module header on mobile. */
@media(max-width:650px){#v-dw .dw-head .actions{display:flex;flex-wrap:wrap;gap:8px}#v-dw .dw-head .actions button{flex:1 1 auto;min-height:44px}}

/* V1.3.1 – iPhone Safari date field stays within the single-column mobile form. */
#v-dw .dw-form, #v-dw .dw-two, #v-dw .dw-two > label { min-width:0; max-width:100%; box-sizing:border-box; }
#v-dw .dw-form input, #v-dw .dw-form select, #v-dw .dw-form textarea { box-sizing:border-box; min-width:0; max-width:100%; }
#v-dw input#dw-week { display:block; width:100%; max-width:100%; min-width:0; box-sizing:border-box; -webkit-appearance:auto; appearance:auto; }
@media(max-width:650px){
 #v-dw .dw-two { grid-template-columns:minmax(0,1fr); }
 #v-dw .dw-two > label { width:100%; min-width:0; }
 #v-dw input#dw-week { width:100%; min-width:0; max-width:100%; font-size:16px; }
}

/* V1.3.2 – iOS Safari: stop native date-control intrinsic width from
   escaping the mobile form; leave an interior safety margin. */
@media (max-width:650px) {
  #v-dw .dw-form .dw-two,
  #v-dw .dw-form .dw-two > label { min-width:0 !important; width:100%; max-width:100%; box-sizing:border-box; }
  #v-dw .dw-form label:has(> #dw-week) { min-width:0; overflow:hidden; }
  #v-dw .dw-form input[type="date"]#dw-week {
    display:block !important;
    width:calc(100% - 12px) !important;
    min-width:0 !important;
    max-width:calc(100% - 12px) !important;
    margin-right:12px !important;
    box-sizing:border-box !important;
    padding-left:12px;
    padding-right:12px;
    font-size:16px;
  }
}

/* V1.3.3: Native iOS date picker in a bounded visual wrapper.
   The actual date input is transparent and fills the hit target.
   This avoids intrinsic date formatting width overflow on iPhone Safari. */
#v-dw .dw-form .dw-date-control {
  position:relative !important;display:flex !important;align-items:center;justify-content:center;
  width:100% !important;max-width:100% !important;min-width:0 !important;
  height:52px;box-sizing:border-box !important;overflow:hidden !important;
  border:1px solid #cad6e5;border-radius:10px;
  background:linear-gradient(#fff,#f3f6fa);color:#10243f;
}
#v-dw .dw-form .dw-date-display {
  display:block;min-width:0;max-width:100%;padding:0 28px;box-sizing:border-box;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  text-align:center;font-size:16px;font-weight:700;pointer-events:none;
}
#v-dw .dw-form .dw-date-control input[type=date]#dw-week {
  position:absolute !important;inset:0 !important;display:block !important;
  width:100% !important;height:100% !important;max-width:none !important;min-width:0 !important;
  padding:0 !important;margin:0 !important;border:0 !important;outline:0 !important;
  opacity:0 !important;box-sizing:border-box !important;cursor:pointer;
  z-index:1;-webkit-appearance:none;appearance:none;
}
#v-dw .dw-form .dw-date-control:focus-within {outline:2px solid #0c5fae;outline-offset:1px}
@media(max-width:650px) {
 #v-dw .dw-form .dw-date-control {height:48px}
 #v-dw .dw-form .dw-two > label {width:100%;min-width:0;max-width:100%;}
}
