
/* ====================================================================
   CUSTOM DARK DATE PICKER (all <input type="date"> fields)
   --------------------------------------------------------------------
   Same approach already used for the <select> dropdowns and the time
   pickers: the browser's native date calendar popup is painted by the
   OS and flashed a WHITE panel (the big white block) before — or instead
   of — turning dark on some devices, because `color-scheme:dark` is not
   honoured for the calendar there. We hide the native input (kept in the
   DOM so its .value still drives every save / edit / validation path, and
   its inline oninput handlers such as poCalc()/tcCalc() still fire) and
   show this fully-styled dark calendar instead. No OS popup -> no white
   block. The value stays in the native YYYY-MM-DD format. UI only — no
   behaviour / feature / logic change.
   ==================================================================== */
.dpk-panel{position:absolute;top:calc(100% + 4px);left:0;width:268px;max-width:calc(100vw - 32px);z-index:70;background:#131322;border:1px solid #2a3850;border-radius:10px;display:none;padding:10px;box-shadow:0 12px 32px rgba(0,0,0,0.55)}
.dpk-panel.open{display:block}
.dpk-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:6px}
.dpk-title{font-family:'Rubik',sans-serif;font-size:13px;font-weight:700;color:#e2e8f0;letter-spacing:.02em;flex:1;text-align:center;user-select:none}
.dpk-nav{width:28px;height:28px;flex-shrink:0;border-radius:7px;border:1px solid #252539;background:#0a0a12;color:#a0a0b0;font-size:15px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;font-family:'Rubik',sans-serif;-webkit-tap-highlight-color:transparent;padding:0}
.dpk-nav:hover{border-color:#7C5CFC;color:#7C5CFC;background:#1a1a2e}
.dpk-weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:4px}
.dpk-wd{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.02em;color:#7c7c94;text-align:center;padding:4px 0;font-family:'JetBrains Mono',monospace}
.dpk-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.dpk-day{min-height:30px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;border-radius:7px;font-size:12px;font-family:'JetBrains Mono',monospace;font-feature-settings:"zero" 1,"tnum" 1;font-variant-numeric:slashed-zero tabular-nums;color:#e2e8f0;cursor:pointer;border:1px solid transparent;transition:background .12s,border-color .12s,color .12s;-webkit-tap-highlight-color:transparent;user-select:none}
.dpk-day:hover{background:#1a1a2e;border-color:#2a3850}
.dpk-day.dpk-other{color:#3a3a52}
.dpk-day.dpk-today{border-color:#5B21B6}
.dpk-day.dpk-sel{background:#7C5CFC;color:#0a0a12;font-weight:800;border-color:#7C5CFC}
.dpk-day.dpk-sel:hover{background:#9B7BFF;border-color:#9B7BFF}
.dpk-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid #252539}
.dpk-today-btn{background:#1a1a2e;border:1px solid #5B21B6;color:#A78BFA;font-size:11px;font-weight:700;font-family:'Rubik',sans-serif;padding:5px 12px;border-radius:7px;cursor:pointer;transition:all .15s;-webkit-tap-highlight-color:transparent}
.dpk-today-btn:hover{background:#131322;border-color:#7C5CFC;color:#C4B5FD}
.dpk-ok-btn{background:#7C5CFC;border:none;color:#0a0a12;font-size:11px;font-weight:800;font-family:'Rubik',sans-serif;letter-spacing:.04em;padding:6px 18px;border-radius:7px;cursor:pointer;transition:background .15s;-webkit-tap-highlight-color:transparent}
.dpk-ok-btn:hover{background:#9B7BFF}
/* Month / year jump: the header title is clickable -> month grid -> year grid. */
.dpk-title-btn{cursor:pointer;border:1px solid transparent;border-radius:7px;padding:4px 6px;transition:background .15s,border-color .15s,color .15s;-webkit-tap-highlight-color:transparent}
.dpk-title-btn:hover{background:#1a1a2e;border-color:#2a3850;color:#C4B5FD}
.dpk-title-btn:focus-visible{outline:none;border-color:#7C5CFC;color:#C4B5FD}
.dpk-caret{font-size:9px;color:#7C5CFC;margin-left:5px;vertical-align:middle}
.dpk-mgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:2px 0}
.dpk-cell{min-height:38px;display:flex;align-items:center;justify-content:center;border-radius:7px;font-family:'Rubik',sans-serif;font-size:12px;font-weight:600;color:#e2e8f0;background:#0a0a12;border:1px solid #252539;cursor:pointer;transition:background .12s,border-color .12s,color .12s;-webkit-tap-highlight-color:transparent;user-select:none}
.dpk-cell:hover{background:#1a1a2e;border-color:#7C5CFC;color:#C4B5FD}
.dpk-cell.dpk-cell-now{border-color:#5B21B6}
.dpk-cell.dpk-cell-sel{background:#7C5CFC;color:#0a0a12;font-weight:800;border-color:#7C5CFC}
.dpk-cell.dpk-cell-sel:hover{background:#9B7BFF;border-color:#9B7BFF;color:#0a0a12}
.dpk-ygrid .dpk-cell{font-family:'JetBrains Mono',monospace;font-feature-settings:"zero" 1,"tnum" 1;font-variant-numeric:slashed-zero tabular-nums}
