/* v3-staff.css: WEB-STAFF-PUBLIC (SPEC-V3 §2.6) — join page, join QR, waiting-for-approval page, login additions
   (bare layout, public.css --pb-* tokens) and the staff subscription page (app layout, pages.css --w-* tokens).
   Tokens only (no raw colours; the only literals are white/black alphas on top of the gradient hero, like pages.css). */

/* ===================================================================== 1. sign-in additions */
.v3-si-reason { line-height: 20px; }
.v3-si-reason span { overflow-wrap: anywhere; }
.v3-si-join { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: -4px 0 0; font: 400 13.5px/18px var(--pb-font); color: var(--pb-text-3); text-align: left; }
.v3-si-join svg { flex: none; width: 18px; height: 18px; color: var(--pb-text-3); }

/* ===================================================================== 2. join page (/join/{code}) */
.v3-jn-head { display: flex; flex-direction: column; align-items: flex-start; }
.v3-jn-head h1 { margin-top: 12px !important; overflow-wrap: anywhere; }
.v3-jn-head p b { color: var(--pb-text); font-weight: 600; overflow-wrap: anywhere; }
.v3-jn-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px 0 9px; border-radius: 999px; background: var(--pb-accent-soft); color: var(--pb-accent-text); font: 600 12.5px/16px var(--pb-font); }
.v3-jn-badge svg { width: 16px; height: 16px; }
.v3-jn-hint { margin: 0; padding-left: 4px; font: 400 13px/18px var(--pb-font); color: var(--pb-text-3); }
.v3-jn-foot { margin: 2px 0 0; text-align: center; font: 400 14.5px/20px var(--pb-font); color: var(--pb-text-2); }
.pb .v3-jn-foot a, .pb .v3-jn-foot a:visited { color: var(--pb-accent-text); font-weight: 600; text-decoration: none; border-radius: 6px; }
.pb .v3-jn-foot a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--pb-accent-text); }
.au-err[hidden] { display: none; }
/* honeypot: out of sight and out of the tab order, but still a real field (display:none is skipped by some bots) */
.v3-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.v3-jn-bad .er-art { color: var(--pb-text-3); }

/* ===================================================================== 3. join QR (/join/{code}/qr) */
.v3-qr { width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.v3-qr h1 { margin: 14px 0 0; font: 700 24px/30px var(--pb-font); letter-spacing: -.018em; color: var(--pb-text); text-wrap: balance; overflow-wrap: anywhere; }
.v3-qr-sub { margin: 8px 0 0; max-width: 340px; font: 400 15px/22px var(--pb-font); color: var(--pb-text-2); }
.v3-qr-box { position: relative; display: grid; place-items: center; width: min(300px, 100%); aspect-ratio: 1; margin-top: 22px; padding: 14px; border-radius: var(--pb-r-xl); background: var(--pb-surface); border: 1px solid var(--pb-border); box-shadow: var(--pb-shadow-2); }
.v3-qr-box svg { display: block; width: 100%; height: 100%; border-radius: 10px; }
.v3-qr-box.is-drawn { background: #fff; }
.v3-qr-box.is-fallback { aspect-ratio: auto; min-height: 120px; padding: 22px 18px; background: var(--pb-accent-softer); border-color: var(--pb-accent-soft); }
.v3-qr-big { font: 700 20px/28px var(--pb-font); letter-spacing: -.01em; color: var(--pb-accent-text); overflow-wrap: anywhere; word-break: break-all; }
.v3-qr-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--pb-accent-soft); border-top-color: var(--pb-accent); animation: v3-spin .8s linear infinite; }
.v3-qr-url { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 18px; padding: 8px 8px 8px 14px; border-radius: var(--pb-r-md); background: var(--pb-sunken); border: 1px solid var(--pb-border); text-align: left; }
.v3-qr-link { flex: 1; min-width: 0; font: 500 14px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--pb-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-qr-url .pb-btn { flex: none; }
.v3-qr-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 18px; }
.v3-qr-note { min-height: 18px; margin: 10px 0 0; font: 400 13px/18px var(--pb-font); color: var(--pb-text-3); }
@media (min-width: 480px) {
  .v3-qr-actions { flex-direction: row; justify-content: center; }
  .v3-qr-actions .pb-btn { flex: 1; }
}

/* ===================================================================== 4. waiting for approval (/staff/pending) */
.v3-pd-state { display: flex; flex-direction: column; align-items: center; width: 100%; }
.v3-pd-state[hidden] { display: none; }
.v3-pd-chip { gap: 8px; }
.v3-pd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pb-accent); box-shadow: 0 0 0 0 var(--pb-accent-soft); animation: v3-pulse 2s var(--pb-ease, ease-out) infinite; }
.v3-pd-art .v3-pd-hand { transform-box: view-box; transform-origin: 134px 90px; animation: v3-tick 10s linear infinite; }
.v3-pd-actions .pb-btn-primary { position: relative; }
.v3-pd-status { min-height: 20px; margin-top: 14px !important; font-size: 13.5px !important; line-height: 19px !important; color: var(--pb-text-3) !important; }
.v3-pd-badge { display: grid; place-items: center; width: 76px; height: 76px; margin: 6px 0 4px; border-radius: 26px; }
.v3-pd-badge svg { width: 40px; height: 40px; }
.v3-pd-badge--ok { background: var(--pb-success-tint); color: var(--pb-success-text); }
.v3-pd-badge--no { background: var(--pb-danger-tint); color: var(--pb-danger-text); }
.v3-pd-reason { padding: 10px 14px; border-radius: var(--pb-r-md); background: var(--pb-sunken); color: var(--pb-text) !important; overflow-wrap: anywhere; }
.v3-pd-state h1:focus { outline: none; }

@keyframes v3-spin { to { transform: rotate(360deg); } }
@keyframes v3-pulse { 0% { box-shadow: 0 0 0 0 var(--pb-accent-soft); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes v3-tick { to { transform: rotate(360deg); } }

/* ===================================================================== 5. staff subscription page (/staff/subscription) */
.v3-sub .v3s-hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap;
  min-height: 168px; padding: 26px 28px; border-radius: var(--w-r-xl);
  background: var(--w-hero); color: var(--w-on-hero); box-shadow: 0 22px 48px -18px rgba(27, 25, 48, .45), var(--w-sh-2);
}
.v3-sub .v3s-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-color: var(--w-on-hero); opacity: .07; -webkit-mask-image: var(--w-doodle); mask-image: var(--w-doodle); -webkit-mask-size: 232px 232px; mask-size: 232px 232px; }
.v3-sub .v3s-hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; right: -14%; top: -70%; width: 64%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--w-hero-glow) 0%, transparent 64%); }
.v3-sub .v3s-hero-skel { flex: 1 1 100%; }
.v3-sub .v3s-hero-skel .pg-skel { background: linear-gradient(100deg, rgba(255, 255, 255, .1) 30%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, .1) 70%); background-size: 300% 100%; }
.v3-sub .v3s-hero-main { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.v3-sub .v3s-hero-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); font-size: 13px; font-weight: 600; color: var(--w-on-hero); }
.v3-sub .v3s-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--w-on-hero-2); }
.v3-sub .v3s-hero--active .v3s-hero-dot { background: var(--w-hero-up); box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.v3-sub .v3s-hero--grace .v3s-hero-dot { background: var(--w-warning); box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.v3-sub .v3s-hero--expired .v3s-hero-dot { background: var(--w-hero-down); box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.v3-sub .v3s-hero-title { margin: 12px 0 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.022em; color: var(--w-on-hero); overflow-wrap: anywhere; text-wrap: balance; }
.v3-sub .v3s-hero-text { margin: 8px 0 0; max-width: 56ch; font-size: 15px; line-height: 22px; color: var(--w-on-hero-2); }
.v3-sub .v3s-hero-chip { display: inline-flex; align-items: center; min-height: 30px; margin-top: 14px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); font-size: 13px; font-weight: 600; color: var(--w-on-hero); }
.v3-sub .v3s-hero-chip + .v3s-hero-chip { margin-top: 8px; }
.v3-sub .v3s-hero-chip--wait { background: rgba(255, 255, 255, .2); }
.v3-sub .v3s-hero-fig { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 132px; min-height: 112px; padding: 14px 18px; border-radius: 22px; background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); text-align: center; }
.v3-sub .v3s-hero-num { font-size: 46px; line-height: 50px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--w-on-hero); }
.v3-sub .v3s-hero-fig.is-price .v3s-hero-num { font-size: 28px; line-height: 34px; letter-spacing: -.02em; }
.v3-sub .v3s-hero-lbl { margin-top: 2px; font-size: 13px; line-height: 17px; font-weight: 500; color: var(--w-on-hero-2); }
/* feature off / load error: a calm surface card instead of the gradient */
.v3-sub .v3s-hero--off, .v3-sub .v3s-hero--error { min-height: 0; background: var(--w-surface); color: var(--w-text); border: 1px solid var(--w-border); box-shadow: var(--w-sh-1); }
.v3-sub .v3s-hero--off::before, .v3-sub .v3s-hero--off::after, .v3-sub .v3s-hero--error::before, .v3-sub .v3s-hero--error::after { display: none; }
.v3-sub .v3s-hero--off .v3s-hero-pill { background: var(--w-sunken); border-color: transparent; color: var(--w-text-2); }
.v3-sub .v3s-hero--off .v3s-hero-title { color: var(--w-text); font-size: 24px; line-height: 30px; }
.v3-sub .v3s-hero--off .v3s-hero-text { color: var(--w-text-2); }
.v3-sub .v3s-hero--error .pg-errorbox { flex: 1 1 100%; }

.v3-sub .v3s-live { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--w-r-card); background: var(--w-success-tint); color: var(--w-success-text); font-weight: 600; animation: v3-rise var(--w-base) var(--w-ease) both; }
.v3-sub .v3s-live[hidden] { display: none; }
.v3-sub .v3s-live-ico { display: inline-flex; flex: none; }
.v3-sub .v3s-live-text { flex: 1 1 200px; min-width: 0; }

.v3-sub .v3s-main, .v3-sub .v3s-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.v3-sub .v3s-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 14px; }
.v3-sub .v3s-price:empty { display: none; }
.v3-sub .v3s-price-num { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.024em; font-variant-numeric: tabular-nums; color: var(--w-text); }
.v3-sub .v3s-price-per { font-size: 15px; color: var(--w-text-2); }
.v3-sub .v3s-instr { padding: 14px 16px; border-radius: var(--w-r-md); background: var(--w-accent-softer); border: 1px solid var(--w-accent-soft); color: var(--w-text); font-size: 15.5px; line-height: 23px; white-space: pre-wrap; overflow-wrap: anywhere; }
.v3-sub .v3s-instr.is-empty { background: var(--w-sunken); border-color: transparent; color: var(--w-text-2); }
.v3-sub .v3s-instr a { color: var(--w-accent-text); font-weight: 600; }
.v3-sub .pg-card-head .pg-h2 { margin: 0; }

.v3-sub .v3s-pending { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding: 16px; border-radius: var(--w-r-md); background: var(--w-warning-tint); color: var(--w-warning-text); }
.v3-sub .v3s-pending[hidden] { display: none; }
.v3-sub .v3s-pending-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--w-surface); color: var(--w-warning-text); }
.v3-sub .v3s-pending-text { flex: 1 1 200px; min-width: 0; }
.v3-sub .v3s-pending-title { font-weight: 600; font-size: 15.5px; line-height: 21px; color: var(--w-text); }
.v3-sub .v3s-pending-sub { margin-top: 2px; font-size: 14px; line-height: 19px; color: var(--w-text-2); }
.v3-sub .v3s-pending-note { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--w-surface); color: var(--w-text); font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.v3-sub .v3s-pending .btn { align-self: center; min-height: 44px; }

.v3-sub .v3s-form { margin-top: 8px; }
.v3-sub .v3s-form-lead { margin: 0 0 14px; }
.v3-sub .pg-counter.is-over { color: var(--w-danger-text); }
.v3-sub .pg-fieldrow .pg-err { flex: 1; margin-top: 0; }
.v3-sub .pg-fieldrow .pg-counter { margin-left: auto; }
.v3-sub .v3s-drop { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; padding: 12px 16px; border: 1.5px dashed var(--w-accent); border-radius: var(--w-r-md); background: var(--w-accent-softer); color: var(--w-accent-text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color var(--w-fast) var(--w-ease); }
.v3-sub .v3s-drop:hover { background: var(--w-accent-soft); }
.v3-sub .v3s-drop[hidden] { display: none; }
.v3-sub .v3s-drop.is-busy { opacity: .7; cursor: progress; }
.v3-sub .v3s-preview { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--w-r-md); border: 1px solid var(--w-border); background: var(--w-surface); }
.v3-sub .v3s-preview[hidden] { display: none; }
.v3-sub .v3s-preview img { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--w-sunken); }
.v3-sub .v3s-preview-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 19px; }
.v3-sub .v3s-preview-name { font-weight: 600; color: var(--w-text); }
.v3-sub .v3s-preview .pg-iconbtn { width: 44px; height: 44px; }

.v3-sub .v3s-hist-list { display: flex; flex-direction: column; }
.v3-sub .v3s-entry { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--w-divider); animation: v3-rise var(--w-base) var(--w-ease) both; }
.v3-sub .v3s-entry:first-child { border-top: 0; padding-top: 4px; }
.v3-sub .v3s-entry-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--w-accent-soft); color: var(--w-accent-text); }
.v3-sub .v3s-entry-ico--manual_extend { background: var(--w-success-tint); color: var(--w-success-text); }
.v3-sub .v3s-entry-ico--manual_end { background: var(--w-danger-tint); color: var(--w-danger-text); }
.v3-sub .v3s-entry-body { flex: 1; min-width: 0; }
.v3-sub .v3s-entry-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.v3-sub .v3s-entry-title { font-weight: 600; font-size: 15px; line-height: 20px; color: var(--w-text); }
.v3-sub .v3s-entry-meta, .v3-sub .v3s-entry-period { margin-top: 3px; font-size: 13.5px; line-height: 18px; color: var(--w-text-2); font-variant-numeric: tabular-nums; }
.v3-sub .v3s-entry-note { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--w-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.v3-sub .v3s-entry-note--owner { color: var(--w-text-2); }
.v3-sub .v3s-entry-proof { flex: none; width: 52px; height: 52px; padding: 0; border: 1px solid var(--w-border); border-radius: 12px; overflow: hidden; background: var(--w-sunken); cursor: zoom-in; }
.v3-sub .v3s-entry-proof img { display: block; width: 100%; height: 100%; object-fit: cover; }
.v3-sub .v3s-hist .pg-empty { padding: 8px 0 4px; }

@keyframes v3-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .v3-sub .v3s-hero { padding: 22px 20px; gap: 16px; }
  .v3-sub .v3s-hero-title { font-size: 24px; line-height: 30px; }
  .v3-sub .v3s-hero-fig { flex: 1 1 100%; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 10px; min-height: 0; padding: 12px 16px; }
  .v3-sub .v3s-hero-num { font-size: 34px; line-height: 38px; }
  .v3-sub .v3s-hero-fig.is-price .v3s-hero-num { font-size: 24px; line-height: 30px; }
  .v3-sub .v3s-pending .btn { width: 100%; }
}

/* ===================================================================== 6. motion + print */
@media (prefers-reduced-motion: reduce) {
  .v3-pd-dot, .v3-pd-art .v3-pd-hand, .v3-qr-spin { animation: none; }
  .v3-sub .v3s-live, .v3-sub .v3s-entry { animation: none; }
  .v3-sub .v3s-hero-skel .pg-skel { animation-duration: 0s; }
}

@media print {
  .sh-hero, .sh-foot, .sh-grab, .skip, .v3-qr-actions, .v3-qr-note, .v3-qr-url .pb-btn { display: none !important; }
  .sh, .sh-sheet { min-height: 0 !important; background: #fff !important; box-shadow: none !important; border: 0 !important; margin: 0 !important; padding: 0 !important; }
  .sh::before, .sh::after { display: none !important; }
  .v3-qr { max-width: none; padding-top: 24px; }
  .v3-qr h1, .v3-qr-sub, .v3-qr-link, .v3-jn-badge { color: #000 !important; }
  .v3-qr-box { width: 92mm; padding: 0; border: 0; box-shadow: none; background: #fff; }
  .v3-qr-url { justify-content: center; border: 0; background: none; }
  .v3-qr-link { white-space: normal; overflow: visible; text-align: center; font-size: 15px; }
}
/* REVIEW-WEB: the Copy button of "How to pay" is a primary action on phones (tap target >= 40px) */
.v3-sub #v3s-copy { min-height: 40px; }
