/* QR-Tracker – Ergänzungen zu Pico.css */
/* gleiche Spezifität wie Pico (hell + dunkel), steht später -> gewinnt */
:root:not([data-theme]), :root:not([data-theme=dark]), [data-theme=light], [data-theme=dark] {
  --pico-primary: #2e8b57;
  --pico-primary-background: #2e8b57;
  --pico-primary-border: #2e8b57;
  --pico-primary-hover: #25744a;
  --pico-primary-hover-background: #25744a;
  --pico-primary-focus: rgba(46, 139, 87, .35);
  --pico-font-size: 106%;
}
[x-cloak] { display: none !important; }
.center { text-align: center; }
.muted { color: var(--pico-muted-color); }
.error { color: var(--pico-del-color); margin-top: .75rem; }
.big-emoji { font-size: 4rem; line-height: 1; display: block; }
button.small { padding: .4rem .8rem; font-size: .85rem; width: auto; margin: 0; }

/* ================= Scan ================= */
.scan { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 12vh !important; align-items: center;
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom)); }
.scan section { width: 100%; max-width: 420px; animation: pop .5s cubic-bezier(.16, 1, .3, 1) both; }
.scan .big-emoji { font-size: 5.5rem; margin-bottom: .5rem; }
.scan h1 { margin-bottom: .4rem; }
.status { margin-bottom: 2rem; }
.status.due { color: #d9822b; font-weight: 600; }
.status.ok { color: var(--pico-primary); }
.action {
  width: 13rem; height: 13rem; border-radius: 50%; margin: 0 auto; padding: 1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  font-size: 1.35rem; font-weight: 700; box-shadow: 0 14px 40px rgba(46, 139, 87, .35);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), background .35s, box-shadow .35s;
}
.action:active { transform: scale(.94); }
.action-icon { font-size: 3rem; line-height: 1; }
.action.done { background: #1f7a49; border-color: #1f7a49; animation: pulse .6s ease; opacity: 1; }
.mine { margin-top: 2rem; text-align: left; }
.mine h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pico-muted-color); margin-bottom: .4rem; }
.mine ul { list-style: none; padding: 0; margin: 0; }
.mine li { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .55rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color); }
.mine li.fresh { animation: slidein .5s cubic-bezier(.16, 1, .3, 1) both; }
.mine-check { color: var(--pico-primary); font-weight: 700; }
.mine-text { flex: 1; }
.undo { width: auto; margin: 0; padding: .3rem .7rem; font-size: .82rem; background: transparent;
  color: var(--pico-del-color); border: 1px solid var(--pico-del-color); white-space: nowrap; }
.mine .hint { font-size: .8rem; color: var(--pico-muted-color); margin-top: .5rem; }
@keyframes slidein { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.manage-link { margin-top: 3rem; font-size: .85rem; color: var(--pico-muted-color); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { transform: scale(.92); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ================= Verwaltung ================= */
main.container { max-width: 640px; padding-top: max(1rem, env(safe-area-inset-top)); padding-bottom: 3rem; }
.login { max-width: 340px; margin: 14vh auto 0; text-align: center; }
.login .big-emoji { margin-bottom: .5rem; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.bar h1 { margin: 0; font-size: 1.6rem; }

.empty { text-align: center; color: var(--pico-muted-color); margin: 3rem 0; }
.empty button { width: auto; margin-top: .5rem; }

.things { list-style: none; padding: 0; margin: 0; }
.things li { list-style: none; display: flex; align-items: center; gap: .9rem; padding: .75rem .25rem;
  border-bottom: 1px solid var(--pico-muted-border-color); cursor: pointer; }
.thing-emoji { font-size: 2rem; width: 2.5rem; text-align: center; }
.thing-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.thing-text small { font-size: .82rem; }
small.due, p.due { color: #d9822b; font-weight: 600; }
small.ok, p.ok { color: var(--pico-primary); }
small.muted, p.muted { color: var(--pico-muted-color); }
.quick { width: 2.8rem; height: 2.8rem; border-radius: 50%; padding: 0; margin: 0; font-size: 1.2rem; flex: 0 0 auto; }
.logout { margin-top: 2rem; }

.detail-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.detail-head h2 { margin: 0; }
.detail-head p { margin: .2rem 0 0; font-size: .9rem; }
.log-now { width: 100%; margin-bottom: 1.2rem; }
.qr-card { text-align: center; }
.qr { width: min(70vw, 260px); margin: 0 auto; background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-hint { font-size: .85rem; color: var(--pico-muted-color); margin: .75rem 0; }
.qr-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

.history { list-style: none; padding: 0; }
.history li { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .45rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color); }
.history .when { flex: 0 0 auto; }
.history small { flex: 1; }
button.icon { background: none; border: none; color: var(--pico-muted-color); width: auto; padding: .2rem .5rem; margin: 0; }
.danger-zone { margin-top: 2rem; }
.danger-zone button { width: 100%; margin-bottom: .5rem; }
.danger { color: var(--pico-del-color) !important; border-color: var(--pico-del-color) !important; }

/* Formular */
dialog article { width: min(94vw, 500px); }
.picks { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.pick { width: 2.6rem; height: 2.6rem; padding: 0; margin: 0; font-size: 1.3rem; background: var(--pico-form-element-background-color);
  border: 1px solid var(--pico-form-element-border-color); color: inherit; }
.pick.text { width: auto; padding: 0 .75rem; font-size: .9rem; }
.pick.on { border-color: var(--pico-primary); box-shadow: 0 0 0 2px var(--pico-primary-focus); }
.emoji-input { width: 4rem !important; margin: 0 !important; text-align: center; height: 2.6rem; padding: 0 !important; }
.dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.dialog-actions button { width: auto; margin: 0; }

/* Druck: nur das Etikett */
.print-label { display: none; }
@media print {
  @page { margin: 12mm; }
  body * { visibility: hidden !important; }
  .print-label, .print-label * { visibility: visible !important; }
  .print-label { display: block; position: absolute; left: 0; top: 0; width: 60mm; text-align: center; color: #000; }
  .print-label .qr { width: 60mm; padding: 0; border-radius: 0; }
  .print-name { font: 600 14pt system-ui, sans-serif; margin-top: 2mm; }
  .print-hint { font: 10pt system-ui, sans-serif; color: #444; }
}
