/* Worker PWA — capture-only shell. Big touch targets, minimal text, works
   one-handed in sunlight: high contrast, large buttons, no small controls. */

.worker-body { background: var(--paper-2); }

/* ---------- Auth ---------- */
#w-auth {
  position: fixed; inset: 0; background: var(--ink); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
#w-auth[hidden] { display: none; }
#w-auth .w-box {
  background: var(--paper); border-radius: 16px; padding: 28px 22px;
  width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.w-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.w-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--veld); flex-shrink: 0; }
.w-tag { color: var(--ink-soft); font-size: 14px; margin: 4px 0 16px; }

.w-name-list { display: flex; flex-direction: column; gap: 10px; }
.w-name-list button {
  font-family: var(--font-body); font-size: 17px; font-weight: 600; text-align: left;
  padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper-2); color: var(--ink); cursor: pointer;
}
.w-name-list button:active { background: var(--veld); color: #fff; }

.w-pin-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: -8px 0 18px; }
.w-pin-dots { display: flex; gap: 14px; justify-content: center; margin-bottom: 22px; }
.w-pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: transparent; }
.w-pin-dot.filled { background: var(--veld); border-color: var(--veld); }

.w-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.w-keypad button {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  padding: 20px 0; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper-2); color: var(--ink); cursor: pointer;
}
.w-keypad button:active { background: var(--veld); color: #fff; }
#w-pin-cancel, #w-pin-back { font-size: 18px; color: var(--ink-soft); }

.w-err { color: var(--red); font-size: 13.5px; min-height: 18px; margin: 12px 0 0; }

/* ---------- Shell ---------- */
#w-shell[hidden] { display: none; }
#w-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: var(--ink); color: #fff;
}
.w-farm { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.w-who { font-size: 12.5px; color: #c9d2da; margin-top: 2px; }
.w-logout-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.35); color: #fff;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; cursor: pointer;
}

#w-content { padding: 16px; max-width: 560px; margin: 0 auto; }

/* ---------- Home tiles ---------- */
.w-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.w-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; aspect-ratio: 1; border-radius: 16px; border: 1px solid var(--line);
  background: var(--paper); box-shadow: var(--shadow); cursor: pointer;
  font-family: var(--font-body); color: var(--ink);
}
.w-tile:active { background: var(--paper-2); }
.w-tile .w-tile-icon { font-size: 34px; }
.w-tile .w-tile-af { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.w-tile .w-tile-en { font-size: 12px; color: var(--ink-soft); }
.w-tile.w-tile-noodknop { background: #fbe9e9; border-color: #edb9b9; }
.w-tile.w-tile-noodknop .w-tile-icon { color: var(--red); }

/* ---------- Capture screens ---------- */
.w-screen-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.w-back-btn {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 20px; line-height: 1; cursor: pointer;
}
.w-screen-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.w-screen-sub { font-size: 13px; color: var(--ink-soft); margin: -12px 0 16px 0; }

.w-field { margin-bottom: 14px; }
.w-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.w-field input, .w-field select, .w-field textarea {
  width: 100%; font-size: 17px; padding: 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); font-family: var(--font-body);
}
.w-field textarea { resize: vertical; min-height: 90px; }

.w-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.w-picker button {
  font-size: 15px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer;
}
.w-picker button.w-picked { background: var(--veld); color: #fff; border-color: var(--veld); }

.w-submit-btn {
  width: 100%; font-family: var(--font-display); font-weight: 700; font-size: 18px;
  padding: 18px; border-radius: 12px; border: none; background: var(--veld); color: #fff;
  cursor: pointer; margin-top: 8px;
}
.w-submit-btn:disabled { opacity: 0.6; }

.w-confirm {
  text-align: center; padding: 40px 16px;
}
.w-confirm .w-confirm-icon { font-size: 56px; margin-bottom: 12px; }
.w-confirm .w-confirm-text { font-family: var(--font-display); font-weight: 700; font-size: 20px; }

.w-empty { text-align: center; color: var(--ink-soft); padding: 40px 16px; font-size: 14px; }

/* ---------- Emergency (bigger touch target than the manager app) ---------- */
.w-knoppie-btn {
  position: fixed; right: 16px; bottom: 16px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--red); color: #fff; border: none; font-size: 28px; box-shadow: 0 6px 20px rgba(178,59,59,0.4);
  z-index: 50;
}
#w-knoppie-modal[hidden] { display: none; }
#w-knoppie-modal .backdrop { position: fixed; inset: 0; background: rgba(19,32,47,0.6); z-index: 60; }
#w-knoppie-modal .box {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 61;
  width: 100%; max-width: 480px; background: var(--paper); border-radius: 20px 20px 0 0;
  padding: 22px; box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}
.w-slider-track {
  position: relative; height: 60px; border-radius: 30px; background: var(--paper-2);
  border: 1px solid var(--line); margin-top: 14px; overflow: hidden;
}
.w-slider-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 14px; }
.w-slider-thumb {
  position: absolute; top: 3px; left: 3px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: grab; touch-action: none;
}

@media (min-width: 620px) {
  .w-tiles { grid-template-columns: repeat(3, 1fr); }
}
