/* WorkDZ · javne strani (prijava, zahteva za dostop, pozabljeno geslo, novo geslo, sprememba gesla)
   Samostojna stran /prijava.html na beta.css (žetoni, svetla/temna tema, pisave).
   Kartica, besedila in gradniki so preneseni iz beta/s-prijava.js (predogled v aplikaciji). */

/* ---------- ogrodje strani ---------- */
.pv-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pv-top { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: max(14px, env(safe-area-inset-top, 0px)) 16px 0; }
.pv-center { flex: 1 0 auto; display: flex; justify-content: center; align-items: flex-start; padding: clamp(12px, 7vh, 64px) 16px 36px; }
.pv-card { position: relative; width: 100%; max-width: 408px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-2); padding: 30px 32px 26px; overflow-wrap: anywhere; }
.pv-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 0 16px max(20px, env(safe-area-inset-bottom, 0px)); font-size: var(--t-12); color: var(--faint); }
.pv-foot a { color: var(--muted); text-decoration: none; }
.pv-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pv-noscript { margin: 0; color: var(--ink-2); }

/* ---------- kartica ---------- */
.pv-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.pv-id { display: flex; align-items: center; flex: none; }
.pv-logo { width: 44px; height: 44px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px var(--line-2); }
.pv-who { width: 44px; height: 44px; margin-left: -12px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); color: var(--muted); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-2); animation: pv-in .28s cubic-bezier(.3,.7,.2,1); }
.pv-who img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes pv-in { from { transform: translateX(-10px) scale(.85); opacity: 0; } }
.pv-brand b { display: block; font: 600 16px/1.15 var(--f-ui); letter-spacing: -.01em; }
.pv-brand .s { display: block; font-size: var(--t-12); color: var(--muted); margin-top: 2px; }
.pv-card h1 { font: 500 30px/1.1 var(--f-display); font-variation-settings: "opsz" 48; letter-spacing: -.015em; margin: 0; text-wrap: balance; overflow-wrap: normal; }
.pv-card h1:focus { outline: none; }
.pv-lede { margin: 6px 0 0; color: var(--muted); text-wrap: pretty; }
.pv-mode { display: flex; width: 100%; margin-top: 18px; }
.pv-mode button { flex: 1; min-width: 0; justify-content: center; height: 34px; font-size: 13px; }
.pv-body { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.pv-big { width: 100%; justify-content: center; height: 44px; font-size: var(--t-14); }
.pv-hint { margin: 0; font-size: var(--t-12); color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.pv-hint .i { color: var(--faint); margin-top: 1px; }
.pv-card .input { height: 42px; }
.pv-pw { position: relative; }
.pv-pw .input { padding-right: 48px; }
.pv-pw .ibtn { position: absolute; right: 1px; top: 1px; width: 42px; height: 40px; border-radius: 0 var(--r-m) var(--r-m) 0; color: var(--muted); }
.pv-pw .ibtn:hover { background: none; border-color: transparent; color: var(--ink); }
.pv-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 13px; }
.pv-link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.pv-link:hover { text-decoration-color: var(--ink); }
.pv-linkbtn { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; }
.pv-linkbtn:hover { text-decoration-color: var(--ink); }
.pv-alt { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }

/* opozorila */
.pv-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-m); font-size: 13px; line-height: 1.45; }
.pv-alert .i { flex: none; margin-top: 1px; }
.pv-alert b { display: block; font-weight: 600; }
.pv-alert .tx { display: block; color: var(--ink-2); margin-top: 2px; }
.pv-alert.late { background: var(--late-bg); } .pv-alert.late > .i, .pv-alert.late b { color: var(--late); }
.pv-alert.wait { background: var(--wait-bg); } .pv-alert.wait > .i, .pv-alert.wait b { color: var(--wait); }
.pv-alert.info { background: var(--info-bg); } .pv-alert.info > .i, .pv-alert.info b { color: var(--info); }
.pv-alert.ok { background: var(--ok-bg); } .pv-alert.ok > .i, .pv-alert.ok b { color: var(--ok); }
.pv-msg:empty { display: none; }
.pv-ferr { display: flex; gap: 6px; align-items: flex-start; font-size: var(--t-12); color: var(--late); font-weight: 500; }
.pv-ferr .i { flex: none; margin-top: 1px; }
.pv-ferr:empty { display: none; }
.pv-flab { font-size: var(--t-12); font-weight: 600; color: var(--ink-2); }
.field > label .faint { font-weight: 400; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--late); }
.pv-note { margin: 0; min-height: 1.45em; font-size: var(--t-12); color: var(--muted); text-align: center; }

/* gumb med pošiljanjem */
.btn[aria-busy="true"] { opacity: .8; cursor: progress; }
.pv-spin { width: 15px; height: 15px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pv-spin .7s linear infinite; }
@keyframes pv-spin { to { transform: rotate(360deg); } }

/* nalaganje (sprememba gesla) */
.pv-skel { display: flex; flex-direction: column; gap: 14px; }
.pv-skel .skel { height: 42px; border-radius: var(--r-m); }
.pv-skel .skel.sm { height: 12px; width: 38%; }

/* ---------- fotografija v zahtevi za dostop ---------- */
.pv-photo { display: flex; align-items: center; gap: 14px; }
.pv-ph { position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; cursor: pointer; background: var(--surface-2); border: 1.5px dashed var(--line-2); color: var(--muted); }
.pv-ph:hover { border-color: var(--ink-2); color: var(--ink); }
.pv-ph.has { border: 1px solid var(--line); }
.pv-ph.err { border-color: var(--late); color: var(--late); background: var(--late-bg); }
.pv-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-phtx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-phb { gap: 6px; }
.pv-hp { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }

/* ---------- moč gesla ---------- */
.pv-str { margin-top: 8px; }
.pv-meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.pv-meter i { height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.pv-meter[data-s="1"] i:nth-child(1) { background: var(--late); }
.pv-meter[data-s="2"] i:nth-child(-n+2) { background: var(--wait); }
.pv-meter[data-s="3"] i:nth-child(-n+3) { background: var(--ok); }
.pv-meter[data-s="4"] i { background: var(--ok); }
.pv-strw { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: var(--t-12); font-weight: 600; }
.pv-strw .n { font-weight: 400; color: var(--faint); }
.pv-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 12px; font-size: var(--t-12); color: var(--muted); }
.pv-rules li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pv-rules li .i { color: var(--faint); }
.pv-rules li.ok { color: var(--ink); } .pv-rules li.ok .i { color: var(--ok); }
.pv-rules li.full { grid-column: 1 / -1; }
.pv-rules li.cap { color: var(--faint); margin-top: 2px; }
.pv-match { min-height: 18px; font-size: var(--t-12); font-weight: 500; }
.pv-match span { display: inline-flex; gap: 6px; align-items: center; }
.pv-t-ok { color: var(--ok); } .pv-t-late { color: var(--late); } .pv-t-wait { color: var(--wait); } .pv-t-faint { color: var(--faint); }

/* ---------- potrditev ---------- */
.pv-done .ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); margin-bottom: 14px; }
.pv-done .ic.info { background: var(--info-bg); color: var(--info); }
.pv-done .acts { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }

/* ---------- pogovorna okna (pomoč, urejanje fotografije) ---------- */
.pv-dlg { width: min(420px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); overflow: hidden; }
.pv-dlg[open] { display: flex; flex-direction: column; }
.pv-dlg::backdrop { background: var(--scrim, rgba(21, 22, 26, .4)); }
.pv-dlg .dh { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.pv-dlg .dh h2 { flex: 1; min-width: 0; margin: 0; font: 500 var(--t-20)/1.2 var(--f-display); }
.pv-dlg .db { padding: 18px 20px; overflow-y: auto; min-height: 0; }
.pv-dlg .df { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); }
.pv-dlg .kv dd { overflow-wrap: anywhere; }
.pv-help-faq { display: grid; gap: 12px; }
.pv-help-faq b { display: block; font-weight: 600; }
.pv-help-faq span { color: var(--muted); font-size: 13px; }

.pv-crop { position: relative; width: 280px; max-width: 100%; aspect-ratio: 1 / 1; margin: 0 auto; overflow: hidden; border-radius: var(--r-m); background: var(--surface-2); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.pv-crop.drag { cursor: grabbing; }
.pv-crop img { position: absolute; left: 50%; top: 50%; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; opacity: 0; }
.pv-crop.on img { opacity: 1; }
.pv-crop .mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 400px var(--scrim); outline: 2px solid var(--surface); outline-offset: -1px; pointer-events: none; }
.pv-zoom { display: flex; align-items: center; gap: 10px; width: 280px; max-width: 100%; margin: 16px auto 0; color: var(--muted); }
.pv-zoom input { flex: 1; min-width: 0; accent-color: var(--ink); }
.pv-crop-hint { text-align: center; margin: 12px auto 0; max-width: 34ch; }
.pv-crop-err:not(:empty) { margin-top: 12px; }

/* ---------- ozki zasloni, dotik ---------- */
@media (max-width: 480px) {
  .pv-card { padding: 24px 20px 20px; }
  .pv-card h1 { font-size: 26px; }
  .pv-brand { margin-bottom: 18px; }
}
@media (max-width: 380px) {
  .pv-center { padding-left: 12px; padding-right: 12px; }
  .pv-card { padding: 22px 16px 18px; }
  .pv-dlg { width: calc(100vw - 24px); }
  .pv-dlg .db { padding: 16px; }
  .pv-dlg .df { padding: 12px 16px; }
}
/* iOS ne povečuje strani ob fokusu, če ima polje vsaj 16 px */
@media (max-width: 720px), (pointer: coarse) {
  .pv-card .input, .pv-card .textarea { font-size: 16px; }
  .pv-mode button { height: 38px; }
}
