/* Round 56 (owner): the admin "pen" feedback widget. Loaded on every page; the button itself
   renders ONLY once a verified admin PIN sits in localStorage on this device -- nothing here is
   visible to a worker or a customer who has never unlocked it. */
.pk-pen-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 99990;
  width: 52px; height: 52px; border-radius: 50%;
  background: #1a1a2e; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: 0 4px 14px rgba(0,0,0,.35);
  cursor: pointer; line-height: 1;
}
.pk-pen-btn:active { transform: scale(0.94); }
.pk-pen-overlay {
  position: fixed; inset: 0; z-index: 99991;
  background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.pk-pen-overlay.pk-pen-center { align-items: center; padding: 16px; }
.pk-pen-sheet {
  background: #fff; width: 100%; max-width: 480px;
  border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto;
  padding: 16px; box-sizing: border-box; font: 15px/1.4 -apple-system, system-ui, sans-serif; color: #1a1a1a;
}
.pk-pen-center .pk-pen-sheet { border-radius: 14px; max-height: 90vh; }
.pk-pen-sheet h2 { margin: 0 0 10px; font-size: 18px; }
.pk-pen-sheet h3 { margin: 14px 0 6px; font-size: 14px; color: #555; }
.pk-pen-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pk-pen-btn2 {
  flex: 1 1 auto; min-width: 100px; padding: 12px 10px; border-radius: 10px; border: 1px solid #ddd;
  background: #f7f7f9; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center;
}
.pk-pen-btn2.pk-pen-primary { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.pk-pen-btn2.pk-pen-danger { background: #fdeaea; color: #a32020; border-color: #f3c6c6; }
.pk-pen-btn2:disabled { opacity: .45; cursor: default; }
.pk-pen-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 22px; color: #999; cursor: pointer; }
.pk-pen-textarea { width: 100%; min-height: 70px; border: 1px solid #ddd; border-radius: 10px; padding: 10px; font: inherit; box-sizing: border-box; resize: vertical; }
.pk-pen-pinput { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 10px; font-size: 18px; letter-spacing: 3px; text-align: center; box-sizing: border-box; }
.pk-pen-preview-wrap { position: relative; width: 100%; background: #111; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.pk-pen-preview-wrap canvas, .pk-pen-preview-wrap img, .pk-pen-preview-wrap video { width: 100%; display: block; touch-action: none; }
.pk-pen-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: #a32020; text-align: center; margin: 8px 0; font-size: 15px; }
.pk-pen-muted { color: #888; font-size: 12.5px; margin: 4px 0 10px; }
.pk-pen-media-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.pk-pen-media-chip { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #eee; }
.pk-pen-media-chip img, .pk-pen-media-chip video { width: 100%; height: 100%; object-fit: cover; }
.pk-pen-media-chip .pk-pen-chip-x { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 13px; line-height: 1; cursor: pointer; }
.pk-pen-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #1a1a1a; color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; z-index: 99995; }

/* ---- Queue tab (admin app.js reuses these classes) ---- */
.pk-queue-filters { display: flex; gap: 8px; margin: 10px 0 14px; }
.pk-queue-filters a { padding: 6px 14px; border-radius: 16px; border: 1px solid #ddd; font-size: 13px; text-decoration: none; color: #333; }
.pk-queue-filters a.on { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.pk-queue-card { border: 1px solid #e3e3e3; border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fff; }
.pk-queue-top { display: flex; gap: 10px; }
.pk-queue-thumb { width: 64px; height: 64px; border-radius: 8px; background: #eee; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 24px; color: #777; cursor: pointer; }
.pk-queue-thumb img, .pk-queue-thumb video { width: 100%; height: 100%; object-fit: cover; }
.pk-queue-body { flex: 1; min-width: 0; }
.pk-queue-text { white-space: pre-wrap; word-break: break-word; margin: 0 0 4px; }
.pk-queue-meta { font-size: 12px; color: #888; }
.pk-queue-meta a { color: #888; }
.pk-status-pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.pk-status-New { background: #e8f0fe; color: #1a56db; }
.pk-status-Seen { background: #eee; color: #555; }
.pk-status-In.progress, .pk-status-In-progress { background: #fff3b0; color: #7a6400; }
.pk-status-Live { background: #d9f7e3; color: #136a3a; }
.pk-status-Question.for.you, .pk-status-Question-for-you { background: #ffd9ad; color: #8a3b00; }
.pk-status-Wont.do, .pk-status-Wont-do { background: #f0f0f0; color: #999; text-decoration: line-through; }
.pk-queue-history { font-size: 11.5px; color: #999; margin-top: 4px; }
.pk-queue-thread { margin-top: 10px; border-top: 1px dashed #e3e3e3; padding-top: 8px; }
.pk-queue-msg { padding: 6px 10px; border-radius: 10px; margin-bottom: 6px; font-size: 13.5px; max-width: 85%; }
.pk-queue-msg.owner { background: #e8f0fe; margin-left: auto; }
.pk-queue-msg.tab { background: #f1f1f1; }
.pk-queue-msg-meta { font-size: 10.5px; color: #999; margin-top: 2px; }
.pk-queue-reply-row { display: flex; gap: 6px; margin-top: 8px; }
.pk-queue-reply-row input { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.pk-queue-status-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pk-queue-status-row button { padding: 5px 10px; border-radius: 8px; border: 1px solid #ddd; background: #fafafa; font-size: 12px; cursor: pointer; }

.pk-pen-rec-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 99996; background: #1a1a1a; color: #fff; padding: 8px 14px; border-radius: 20px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.pk-pen-rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #e8322a; animation: pkPenPulse 1s infinite; }
@keyframes pkPenPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.pk-pen-rec-banner button { background: #fff; color: #1a1a1a; border: none; border-radius: 12px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }

/* Round 62: in-sheet voice recording, attached voice chip, in-sheet errors */
.pk-pen-err { background: #fdeaea; color: #8a1c1c; border: 1px solid #f3c6c6; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 4px 0 10px; line-height: 1.45; }
.pk-pen-err-detail { color: #a05656; font-size: 12px; margin-top: 4px; }
.pk-pen-recrow { display: flex; align-items: center; gap: 10px; background: #fff4f3; border: 1px solid #f3c6c6; border-radius: 10px; padding: 8px 10px; margin: 0 0 6px; }
.pk-pen-recrow-t { font-variant-numeric: tabular-nums; font-weight: 700; color: #a32020; min-width: 38px; }
.pk-pen-level { flex: 1; height: 8px; background: #f0dede; border-radius: 4px; overflow: hidden; }
.pk-pen-level span { display: block; height: 100%; width: 0; background: #e8322a; transition: width .1s; }
.pk-pen-btn2.pk-pen-stop { flex: 0 0 auto; min-width: 84px; padding: 8px 10px; }
.pk-pen-voice-chip { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; background: #eef6f0; border: 1px solid #bfe3cb; border-radius: 22px; padding: 6px 8px 6px 6px; }
.pk-pen-voice-play { width: 32px; height: 32px; border-radius: 50%; border: none; background: #1a1a2e; color: #fff; font-size: 12px; cursor: pointer; flex: none; }
.pk-pen-voice-label { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.pk-pen-voice-ok { color: #136a3a; font-size: 12.5px; font-weight: 700; }
.pk-pen-chip-x.pk-pen-voice-x { position: static; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 14px; line-height: 1; cursor: pointer; flex: none; }
