/* shift-kit UI. Prefix ws-sk-. Builds on site.css (ws-btn, ws-field, ws-result, ws-note, ws-table, ws-error). */
#sk-app { display: block; margin: 16px 0 24px; max-width: 100%; }
.ws-sk-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws-sk-shared { background: #eef6ff; border: 1px solid #9ec5f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ws-sk-shared[hidden], .ws-sk-notice[hidden] { display: none; }
.ws-sk-sharedbtns { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ws-sk-notice { background: #fff6e0; border: 1px solid #e6c36a; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
.ws-sk-flash { min-height: 0; margin: 0 0 8px; color: #14532d; font-size: 14px; }
.ws-sk-flash:empty { display: none; }
.ws-sk-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid #d5dbe3; margin-bottom: 14px; }
.ws-sk-tab { appearance: none; border: 1px solid transparent; border-bottom: 0; background: transparent; padding: 10px 14px; min-height: 44px; font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px 8px 0 0; color: #334155; }
.ws-sk-tab[aria-selected="true"] { background: #fff; border-color: #d5dbe3; color: #0f3d7a; margin-bottom: -2px; border-bottom: 2px solid #fff; }
.ws-sk-tab:focus-visible, .ws-sk-chip:focus-visible, .ws-sk-add:focus-visible, .ws-sk-mv:focus-visible, .ws-sk-mini:focus-visible, summary:focus-visible { outline: 3px solid #1d6fd8; outline-offset: 2px; }
.ws-sk-title { font-size: 1.15rem; margin: 0 0 10px; }
.ws-sk-title-sub { font-weight: 400; font-size: .95rem; color: #475569; }
.ws-sk-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.ws-sk-inline { margin: 0; }
.ws-sk-range { font-weight: 600; margin: 0 4px; }
.ws-sk-tablewrap { max-width: 100%; overflow-x: auto; }
.ws-sk-grid, .ws-sk-tc, .ws-sk-ot { border-collapse: collapse; width: 100%; background: #fff; }
.ws-sk-grid th, .ws-sk-grid td, .ws-sk-tc th, .ws-sk-tc td, .ws-sk-ot th, .ws-sk-ot td { border: 1px solid #d5dbe3; padding: 6px 8px; text-align: left; vertical-align: top; }
.ws-sk-grid thead th, .ws-sk-tc thead th, .ws-sk-ot thead th { background: #f1f5f9; }
.ws-sk-dh { text-align: center !important; min-width: 96px; }
.ws-sk-dh.is-sun, .ws-sk-tcd.is-sun { color: #b91c1c; }
.ws-sk-dh.is-sat, .ws-sk-tcd.is-sat { color: #1d4ed8; }
.ws-sk-dh.is-off { background: #fde8e8 !important; }
.ws-sk-dt { display: block; font-size: 11px; font-weight: 600; color: #b91c1c; }
.ws-sk-name { white-space: nowrap; }
.ws-sk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.ws-sk-cell { position: relative; min-height: 56px; cursor: pointer; }
.ws-sk-cell.is-off { background: #fff5f5; }
.ws-sk-cell.is-over { outline: 2px dashed #1d6fd8; outline-offset: -2px; background: #eaf3ff; }
.ws-sk-cell.is-target { outline: 1px dashed #94a3b8; outline-offset: -2px; }
.ws-sk-shift { display: flex; align-items: center; gap: 4px; border-left: 4px solid #475569; background: #f8fafc; border-radius: 4px; padding: 2px 4px; margin-bottom: 4px; font-size: 13px; cursor: grab; }
.ws-sk-shift.is-conflict { background: #fee2e2; outline: 2px solid #dc2626; }
.ws-sk-shift.is-moving { outline: 2px solid #1d6fd8; }
.ws-sk-shift.is-dragging { opacity: .5; }
.ws-sk-chip { flex: 1; cursor: pointer; display: inline-flex; flex-direction: column; min-height: 24px; justify-content: center; }
.ws-sk-brk { font-size: 11px; color: #64748b; }
.ws-sk-conf { color: #b91c1c; font-weight: 700; font-size: 12px; }
.ws-sk-mv, .ws-sk-mini { appearance: none; border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; font: inherit; font-size: 12px; padding: 3px 8px; min-height: 28px; cursor: pointer; }
.ws-sk-add { appearance: none; border: 1px dashed #94a3b8; background: transparent; color: #475569; border-radius: 6px; min-width: 32px; min-height: 28px; cursor: pointer; font: inherit; }
.ws-sk-sum { font-variant-numeric: tabular-nums; font-weight: 600; }
.ws-sk-movebar { background: #eaf3ff; border: 1px solid #9ec5f0; border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
.ws-sk-warn { color: #b91c1c; margin: 10px 0 4px; }
.ws-sk-list { margin: 4px 0 10px 1.2em; padding: 0; }
.ws-sk-hint { font-size: 13px; color: #475569; margin: 6px 0; }
.ws-sk-details { margin: 12px 0; border: 1px solid #d5dbe3; border-radius: 8px; padding: 8px 12px; background: #fff; }
.ws-sk-details > summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.ws-sk-dtgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.ws-sk-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; margin-bottom: 10px; }
.ws-sk-empty { background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 8px; padding: 18px; text-align: center; }
.ws-sk-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0; }
.ws-sk-dl dt { color: #475569; }
.ws-sk-dl dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.ws-sk-h3 { font-size: 1rem; margin: 14px 0 6px; }
.ws-sk-sec { margin: 14px 0; }
.ws-sk-amt { text-align: right !important; font-variant-numeric: tabular-nums; }
.ws-sk-check { display: flex; gap: 8px; align-items: center; margin: 8px 0; min-height: 32px; }
.ws-sk-disclaimer { font-weight: 600; }
.ws-sk-pay { margin-top: 12px; }
.ws-sk-payline strong { font-size: 1.15rem; }
.ws-sk-filebtn { position: relative; cursor: pointer; display: inline-flex; align-items: center; }
.ws-sk-filebtn:focus-within { outline: 3px solid #1d6fd8; outline-offset: 2px; }
.ws-sk-dlg { border: 1px solid #94a3b8; border-radius: 12px; padding: 16px; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.ws-sk-dlg::backdrop { background: rgba(15, 23, 42, .5); }
.ws-sk-dlg-h { margin: 0 0 10px; font-size: 1.1rem; }
.ws-sk-colors { border: 0; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ws-sk-colors legend { padding: 0; margin-bottom: 6px; }
.ws-sk-sw { position: relative; display: inline-block; }
.ws-sk-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ws-sk-swatch { display: block; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #94a3b8; }
.ws-sk-sw input:checked + .ws-sk-swatch { box-shadow: 0 0 0 3px #0f172a; }
.ws-sk-sw input:focus-visible + .ws-sk-swatch { outline: 3px solid #1d6fd8; outline-offset: 2px; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  #sk-app { margin-left: 0; margin-right: 0; }
  .ws-sk-tab { padding: 10px 10px; flex: 1 1 auto; text-align: center; }
  .ws-sk-tablewrap { overflow-x: visible; }
  .ws-sk-tablewrap:has(> .ws-sk-tc) { overflow-x: auto; }
  .ws-sk-grid, .ws-sk-grid tbody, .ws-sk-grid tfoot, .ws-sk-grid tr, .ws-sk-grid th, .ws-sk-grid td { display: block; width: 100%; box-sizing: border-box; }
  .ws-sk-grid thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ws-sk-grid tr { border: 1px solid #d5dbe3; border-radius: 8px; margin-bottom: 12px; background: #fff; overflow: hidden; }
  .ws-sk-grid th, .ws-sk-grid td { border: 0; border-bottom: 1px solid #eef1f5; }
  .ws-sk-grid td.ws-sk-cell, .ws-sk-grid td.ws-sk-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .ws-sk-grid td[data-label]::before { content: attr(data-label); flex: 0 0 64px; font-size: 12px; color: #64748b; }
  .ws-sk-grid td.ws-sk-cell .ws-sk-shift { flex: 1 1 140px; margin: 0; }
  .ws-sk-grid td.ws-sk-cell:not(:has(.ws-sk-shift)):not(.is-target) .ws-sk-add { margin-left: auto; }
  .ws-sk-mv, .ws-sk-add, .ws-sk-mini { min-height: 40px; min-width: 44px; }
  .ws-sk-chip { min-height: 36px; }
  .ws-sk-cell.is-target { min-height: 44px; }
  .ws-sk-tc th, .ws-sk-tc td { padding: 6px 4px; font-size: 13px; }
  .ws-sk-ot, .ws-sk-ot tbody, .ws-sk-ot tfoot, .ws-sk-ot tr, .ws-sk-ot th, .ws-sk-ot td { display: block; width: 100%; box-sizing: border-box; }
  .ws-sk-ot thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ws-sk-ot tr { border: 1px solid #d5dbe3; border-radius: 8px; margin-bottom: 8px; }
  .ws-sk-ot th, .ws-sk-ot td { border: 0; padding: 4px 8px; }
  .ws-sk-amt { text-align: left !important; }
  .ws-sk-toolbar { gap: 6px; }
  .ws-sk-toolbar .ws-field { flex: 1 1 100%; }
  .ws-sk-dl { grid-template-columns: 1fr auto; }
  .ws-sk-shared { flex-direction: column; align-items: flex-start; }
  .ws-sk-sharedbtns { margin-left: 0; }
  #sk-share-url { width: 100%; box-sizing: border-box; }
}

/* ---------- print: only the schedule / timecard, A4 landscape ---------- */
@page { size: A4 landscape; margin: 10mm; }
@media print {
  body * { visibility: hidden; }
  #sk-app, #sk-app * { visibility: visible; }
  #sk-app { position: absolute; left: 0; top: 0; width: 100%; margin: 0; }
  .ws-sk-noprint, .ws-sk-tabs, .ws-sk-dlg, .ws-sk-details, .ws-sk-sources, .ws-sk-hint { display: none !important; }
  .ws-sk-panel[hidden] { display: none !important; }
  .ws-sk-title { font-size: 14pt; color: #000; }
  .ws-sk-tablewrap { overflow: visible; }
  .ws-sk-grid, .ws-sk-tc, .ws-sk-ot { font-size: 9pt; page-break-inside: auto; }
  .ws-sk-grid tr, .ws-sk-tc tr { page-break-inside: avoid; }
  .ws-sk-grid th, .ws-sk-grid td, .ws-sk-tc th, .ws-sk-tc td { border: 1px solid #000; padding: 3px 5px; color: #000; background: #fff !important; }
  .ws-sk-shift { background: #fff; outline: 0; border-left-width: 4px; cursor: default; }
  .ws-sk-shift.is-conflict { outline: 0; }
  .ws-sk-dh { min-width: 0; }
}

/* ---------- blank template (hidden on screen, shown only when printing a blank sheet) ---------- */
.ws-sk-blank { display: none; }
.ws-sk-optcheck { display: block; margin: 8px 0; }
.ws-sk-fhint { display: block; font-size: 12px; color: #64748b; font-weight: 400; }
.ws-sk-check-sec { margin-top: 14px; }
#sk-template .ws-sk-toolbar { margin-top: 8px; }
.ws-sk-blankhead, .ws-sk-signs p { display: flex; gap: 10px; align-items: flex-end; margin: 10px 0; }
.ws-sk-line { flex: 1; border-bottom: 1px solid #000; min-height: 1.2em; }
.ws-sk-line-short { flex: 0 0 25%; }
.ws-sk-blanktable { border-collapse: collapse; width: 100%; }
.ws-sk-blanktable th, .ws-sk-blanktable td { border: 1px solid #000; padding: 3px 6px; }
.ws-sk-blankrow th, .ws-sk-blankrow td { height: 9mm; }
.ws-sk-blanknote { width: 30%; }
@media print {
  body.sk-print-blank #sk-app > *:not(#sk-blank) { display: none !important; }
  body.sk-print-blank #sk-blank { display: block !important; }
  body.sk-print-blank .ws-sk-blank .ws-sk-grid, body.sk-print-blank .ws-sk-blank .ws-sk-tc { font-size: 10pt; }
  body.sk-print-blank .ws-sk-blankrow th, body.sk-print-blank .ws-sk-blankrow td { height: 8mm; }
  body.sk-print-blank .ws-sk-blank .ws-sk-hint { display: none !important; }
  .ws-sk-blank .ws-sk-blanktable th, .ws-sk-blank .ws-sk-blanktable td { border: 1px solid #000; background: #fff !important; color: #000; }
}

