/* The partner portal (static/partner.html): PP1 (plan-partneri-2026-11, S3).

   On the Bonasea administrative design kit (static/admin-kit/bonasea-admin.css, loaded before this file): its tokens,
   its shell (.admin-header, .admin-shell, .admin-sidebar, .admin-nav, .admin-main), panels, fields and buttons at the
   kit's own sizes - the portal is for partners on a phone as much as at a desk, so every target keeps its 44 px. This
   file names no colour of its own, only the kit's variables, and its classes are .pp-*. No style attribute anywhere:
   the portal's host has no 'unsafe-inline' in style-src (deploy/Caddyfile); the HTML `hidden` attribute hides. */

[hidden] { display: none !important; }

/* ---------- the gate: sign-in, the invitation, the terms - one card in the middle ---------- */
.pp-gate {
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 100vh; padding: clamp(16px, 8vh, 96px) 16px 32px;
}
.pp-card {
  display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 420px;
  padding: 28px 24px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
}
.pp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-card-top img { width: auto; height: 30px; }
.pp-overline {
  color: var(--ink-faint); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.pp-step h1 { font-size: 1.5rem; }
.pp-block { width: 100%; }
.pp-err:empty { display: none; }
.pp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.5; cursor: pointer; }
.pp-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink-body); }

/* the language picker: small beside the logo, a full target all the same */
.pp-lang-wrap { display: inline-flex; flex: none; }
.pp-lang {
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--hairline-strong); border-radius: var(--r-pill);
  background: var(--surface-quiet); color: var(--ink-body); font-size: 0.875rem; cursor: pointer;
}

/* ---------- the application ---------- */
.pp-app { min-height: 100vh; }
.pp-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pp-brand img { width: auto; height: 28px; }
.pp-env {
  min-width: 0; padding-left: 14px; border-left: 1px solid var(--hairline-strong);
  color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pp-user { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.pp-who {
  max-width: 260px; color: var(--ink-muted); font-size: 0.875rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pp-btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.pp-soon { max-width: 72ch; }

.pp-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: var(--r-pill);
  background: var(--ink-body); color: var(--sand); font-size: 0.9375rem; box-shadow: var(--shadow-float);
}

/* a phone: the partner's name under the logo row, the user's line shorter */
@media (max-width: 600px) {
  .pp-card { padding: 22px 18px; }
  .pp-top { align-items: flex-start; }
  .pp-brand { flex-wrap: wrap; gap: 8px; }
  .pp-env { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .pp-who { max-width: 150px; }
}

/* ---------- PP2 (plan-partneri-2026-11, S6): the six screens (static/partner-*.js) ----------
   Mobile first: one column of panels and cards, the tiles two a row on a phone; every button keeps the kit's 44 px. The
   charts and QR codes are SVG with presentation attributes, coloured here by class (no style attribute anywhere). */
.pp-screen { min-width: 0; }
.pp-break { overflow-wrap: anywhere; }
.pp-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-muted); font-weight: 600; }

.pp-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-seg-btn {
  min-height: 44px; padding: 8px 16px; border: 1px solid var(--hairline-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-body); font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.pp-seg-btn[aria-pressed='true'] { background: var(--ink-body); border-color: var(--ink-body); color: var(--sand); }

.pp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pp-tiles--one { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
@media (min-width: 720px) { .pp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pp-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } .pp-tiles--one { grid-template-columns: minmax(0, 1fr); } }
.pp-tile {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-md);
}
.pp-tile-value { color: var(--ink); font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.pp-tile-label { color: var(--ink-body); font-size: 0.875rem; font-weight: 600; }
.pp-tile-hint { color: var(--ink-muted); font-size: 0.8125rem; line-height: 1.4; }

.pp-chart { margin: 0; }
.pp-bars { display: block; width: 100%; height: 140px; }
.pp-bar { fill: var(--water-vivid); }
.pp-bar--zero { fill: var(--water-pale); }
.pp-bars-axis { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--ink-muted); font-size: 0.75rem; }

.pp-todo { display: flex; flex-direction: column; gap: 4px; padding: 0; list-style: none; }
.pp-todo a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-body); font-weight: 600; }

.pp-link-box { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.pp-qr-wrap { flex: none; padding: 8px; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-sm); line-height: 0; }
.pp-qr { display: block; max-width: 100%; height: auto; }
.pp-url { color: var(--water-mid); font-weight: 600; overflow-wrap: anywhere; }

.pp-items { display: flex; flex-direction: column; gap: 12px; }
.pp-item {
  display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; background: var(--surface-quiet);
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
}
.pp-item h3 { font-size: 1rem; overflow-wrap: anywhere; }
.pp-item--row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.pp-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.pp-inline .field { flex: 1 1 220px; }
.pp-narrow { max-width: 320px; }
.pp-short { max-width: 120px; text-transform: uppercase; }
.pp-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; letter-spacing: 0.04em; }

.pp-modes { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; }
.pp-modes legend { margin-bottom: 4px; color: var(--ink-body); font-size: 0.8125rem; font-weight: 600; }
.pp-modes .pp-check { min-height: 44px; align-items: center; }
.pp-modes input[type='radio'] { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink-body); }

.pp-sum { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 6px 24px; margin: 0; }
.pp-sum dt { color: var(--ink-muted); }
.pp-sum dd { margin: 0; color: var(--ink); font-weight: 600; }

.pp-result-list { display: flex; flex-direction: column; gap: 6px; padding: 0; list-style: none; }
.pp-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pp-invite { padding-top: 16px; border-top: 1px solid var(--hairline); }
.pp-invite h3 { font-size: 1rem; }

/* the vouchers' cards to print (static/voucher-cards.js): built at the end of the body for the print alone */
@media screen { .pp-print { display: none; } }
@media print {
  body > :not(.pp-print) { display: none !important; }
}

/* PP2 (plan-partneri-2026-11, int): the voucher cards of static/voucher-cards.js, the same rules as the console's (static/admin.css) */
/* static/voucher-cards.js - a licence pack's vouchers as cards to cut out. On screen a grid of cards as wide as the
   page allows; printed (the browser's own print, decision 17), eight on an A4 page - two columns by four rows of
   105 x 74 mm, no margin, a hairline to cut along - and nothing of the page around the sheet: every element that is
   neither the sheet, inside it nor one of its ancestors is not printed, the ancestors lose their frame. The portal
   carries this block verbatim (static/partner.css). The kit's tokens only. */
.vc-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 12px 0 0; }
.vc-card { display: flex; flex-direction: column; gap: 1.5mm; box-sizing: border-box; padding: 4mm 5mm;
  border: 1px dashed var(--hairline-strong); border-radius: 6px; background: var(--surface); color: var(--ink);
  font-family: var(--font-sans); break-inside: avoid; page-break-inside: avoid; }
.vc-card p { margin: 0; }
.vc-top { display: flex; align-items: center; gap: 2mm; }
.vc-icon { display: block; width: 7mm; height: 7mm; }
.vc-brand { font-family: var(--font-sans); font-size: 11pt; font-weight: 700; letter-spacing: 0.04em; }
.vc-title { font-size: 9pt; color: var(--ink-body); }
.vc-plan { font-size: 16pt; font-weight: 700; line-height: 1.1; }
.vc-len { font-size: 10pt; font-weight: 600; color: var(--ink-muted); }
.vc-body { display: flex; gap: 4mm; align-items: center; }
.vc-qr { flex: none; width: 30mm; height: 30mm; }
.vc-qr svg { display: block; width: 100%; height: 100%; }
.vc-text { min-width: 0; }
.vc-scan, .vc-label { font-size: 7.5pt; color: var(--ink-muted); }
.vc-site { font-size: 9pt; font-weight: 600; margin-bottom: 2mm; }
.vc-short { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13pt; font-weight: 700;
  letter-spacing: 0.06em; white-space: nowrap; }
.vc-valid { font-size: 7.5pt; color: var(--ink-body); }
.vc-from { font-size: 8pt; font-weight: 600; }
@page vc-a4 { size: A4; margin: 0; }
@media print {
  body:has(.vc-sheet) *:not(:has(.vc-sheet)):not(.vc-sheet):not(.vc-sheet *) { display: none !important; }
  body:has(.vc-sheet), body:has(.vc-sheet) *:has(.vc-sheet) { display: block !important; position: static !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; width: auto !important; max-width: none !important;
    height: auto !important; min-height: 0 !important; overflow: visible !important; background: var(--surface) !important;
    box-shadow: none !important; transform: none !important; }
  .vc-sheet { page: vc-a4; display: grid; grid-template-columns: repeat(2, 105mm); grid-auto-rows: 74mm; gap: 0;
    width: 210mm; margin: 0; }
  .vc-card { width: 105mm; height: 74mm; justify-content: center; border-radius: 0;
    border: 0.2mm dashed var(--hairline-strong); overflow: hidden; }
}
