/*
  PasaPrint: one stylesheet for every page: landing, login, dashboard, admin and the print page.

  TO RESTYLE THE SITE, EDIT SECTION 1 ONLY.
  Colours, fonts, the shadow and the chart colours are all defined there, once,
  for light mode and dark mode. Both pages follow the device setting automatically.

    1. Theme    colours, fonts, shadow, chart colours
    2. Base     rules shared by both pages
    3. Print page   (only applies to <html class="page-print">)
    4. App pages    (dashboard, admin, login: <html class="page-admin">)
    5. Landing page (only applies to <html class="page-landing">)
*/

/* ==================== 1. THEME ==================== */
:root {
  color-scheme: light dark;

  /* fonts */
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* colours */
  --bg: #e9b7a0;          /* page background */
  --card: #fff8f5;        /* cards, dialogs, app bar */
  --ink: #032f0c;         /* main text */
  --muted: #496052;       /* secondary text */
  --line: #d99e88;        /* borders and dividers */
  --accent: #032f0c;      /* primary buttons, selected tabs */
  --on-accent: #e9b7a0;   /* text on top of the accent colour */
  --soft: #f3d1c4;        /* hover and subtle fills */
  --ok: #285f3a;          /* success */
  --bad: #9f4435;         /* errors and delete */
  --warn-bg: #f7dfa8;     /* warning boxes */
  --warn-ink: #4a3500;

  /* spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* depth and overlays */
  --shadow: 0 1px 2px rgba(3,47,12,.08), 0 8px 24px rgba(3,47,12,.10);
  --backdrop: rgba(3, 20, 8, .55);

  /* chart series (checked for colour-blind safety on --card) */
  --s1: #2a78d6;          /* Loaded */
  --s2: #eb6834;          /* Print attempts */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #032f0c;
    --card: #073b13;
    --ink: #e9b7a0;
    --muted: #cfa99b;
    --line: #24512e;
    --accent: #e9b7a0;
    --on-accent: #032f0c;
    --soft: #10431b;
    --ok: #8fc49f;
    --bad: #ef9585;
    --warn-bg: #4a3b0c;
    --warn-ink: #f6dd9b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --s1: #3987e5;
    --s2: #d95926;
  }
}

/* ==================== 2. BASE (both pages) ==================== */
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ==================== 3. PRINT PAGE ==================== */
html.page-print main {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}
html.page-print .ticket {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}
html.page-print .stub {
  padding: 22px 22px 20px;
}
html.page-print .brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
html.page-print .brand > i {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--accent);
}
html.page-print h1 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0;
}
html.page-print .brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .92rem;
}
html.page-print #steps {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}
html.page-print #steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}
html.page-print #steps li::before {
  content: attr(data-n);
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .8rem;
  border: 2px solid var(--line);
}
html.page-print #steps li.current {
  background: var(--soft);
  color: var(--ink);
}
html.page-print #steps li.current::before {
  border-color: var(--accent);
  color: var(--accent);
}
html.page-print #steps li.done {
  color: var(--ink);
}
html.page-print #steps li.done::before {
  content: "\2713";
  background: var(--ok);
  border-color: var(--ok);
  color: var(--card);
}
html.page-print .perf {
  position: relative;
  margin: 0 20px;
  border-top: 2px dashed var(--line);
}
html.page-print .perf::before,
html.page-print .perf::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
}
html.page-print .perf::before {
  left: -33px;
}
html.page-print .perf::after {
  right: -33px;
}
html.page-print .stage {
  padding: 24px 22px 26px;
  min-height: 190px;
}
html.page-print .stage h2 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}
html.page-print .stage p {
  margin: 0 0 18px;
  color: var(--muted);
}
html.page-print .stage p.bad {
  color: var(--bad);
  font-weight: 600;
}
html.page-print button {
  font: inherit;
  font-weight: 600;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
html.page-print button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
html.page-print .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
html.page-print .actions .primary {
  flex: 1 1 160px;
}
html.page-print .field {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
html.page-print .field input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
html.page-print form button.primary {
  width: 100%;
}
html.page-print .bar {
  height: 8px;
  border-radius: 99px;
  background: var(--soft);
  overflow: hidden;
  margin-top: 4px;
}
html.page-print .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .25s;
}
html.page-print .bar.busy i {
  width: 35%;
  animation: slide 1.1s ease-in-out infinite alternate;
}
@keyframes slide {from { margin-left: 0; } to { margin-left: 65%; }}
@media (prefers-reduced-motion: reduce) {
  html.page-print .bar.busy i {
    animation: none;
    width: 100%;
  }
  html.page-print .bar i {
    transition: none;
  }
}
html.page-print #pages {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
html.page-print .sheet {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
html.page-print .sheet canvas,
html.page-print .sheet img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 4px;
}
html.page-print .cap {
  display: block;
  margin: 0 0 8px 2px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
}
html.page-print .stage p.docname {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
html.page-print .stage p.small {
  margin: 14px 0 0;
  font-size: .88rem;
}
html.page-print .stage p.alert {
  margin: 0 0 14px;
  color: var(--bad);
  font-weight: 600;
}
html.page-print .stage p.ok {
  color: var(--ok);
  font-weight: 600;
}
html.page-print button.ghost {
  width: 100%;
  margin-top: 10px;
}
@media (max-width: 460px) {
  html.page-print #steps li {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 8px 4px;
  }
}
@media print {
  @page {margin: 8mm;}
  html.page-print,
  html.page-print body {
    background: #fff;
  }
  html.page-print main> :not(#pages) {
    display: none !important;
  }
  html.page-print main {
    max-width: none;
    padding: 0;
  }
  html.page-print #pages {
    display: block;
    margin: 0;
  }
  html.page-print .sheet {
    border: 0;
    padding: 0;
    border-radius: 0;
    break-after: page;
    page-break-after: always;
  }
  html.page-print .sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  html.page-print .sheet img,
  html.page-print .sheet canvas {
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  html.page-print .cap {
    display: none;
  }
}

/* ==================== 4. ADMIN PAGE ==================== */
html.page-admin p {
  margin: 0;
}
html.page-admin .ic {
  width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* ---- buttons and fields ---- */
html.page-admin button,
html.page-admin .btn {
  font: inherit; font-weight: 600; min-height: 42px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
html.page-admin button.primary {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
html.page-admin button.danger {
  background: var(--bad); border-color: var(--bad); color: var(--card);
}
html.page-admin button.quiet {
  border-color: transparent; background: transparent;
}
html.page-admin button.sm {
  min-height: 36px; padding: 0 10px; font-size: .9rem;
}
html.page-admin button:disabled {
  opacity: .55; cursor: not-allowed;
}
/* Hover effects only on devices that really hover (mouse, trackpad). On a touch screen
   (iPad) the hover state sticks after a tap and made the selected tab look unselected. */
@media (hover: hover) {
  html.page-admin button:hover:not(:disabled),
  html.page-admin .btn:hover {
    background: var(--soft);
  }
  html.page-admin button.primary:hover:not(:disabled) {
    background: var(--accent); filter: brightness(1.12);
  }
  html.page-admin button.danger:hover:not(:disabled) {
    background: var(--bad); filter: brightness(1.08);
  }
  html.page-admin button.quiet:hover:not(:disabled) {
    background: var(--soft);
  }
  html.page-admin .sw:hover:not(:disabled) {
    background: var(--line);
  }
  html.page-admin .sw[aria-checked="true"]:hover:not(:disabled) {
    background: var(--ok);
  }
}
html.page-admin label {
  display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px;
}
html.page-admin input[type=text],
html.page-admin input[type=password],
html.page-admin input[type=search],
html.page-admin input[type=date] {
  width: 100%; min-height: 46px; padding: 0 14px; font: inherit; font-size: 1rem;
  border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
html.page-admin input[aria-invalid="true"] {
  border-color: var(--bad);
}
html.page-admin .hint {
  color: var(--muted); font-size: .88rem; margin-top: 6px;
}
html.page-admin .err {
  color: var(--bad); font-weight: 600; font-size: .9rem; margin-top: 6px;
}
html.page-admin .field {
  margin-bottom: 18px;
}
/* ---- centred screens (loading / login / setup) ---- */
html.page-admin .center {
  min-height: 100vh; display: grid; place-items: center; padding: 20px 16px;
}
html.page-admin .panel {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; box-shadow: var(--shadow);
}
html.page-admin .mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px;
}
html.page-admin .mark .ic {
  width: 22px; height: 22px;
}
html.page-admin .panel h1 {
  font-size: 1.35rem; line-height: 1.2; margin: 0 0 6px;
}
html.page-admin .panel .lead {
  color: var(--muted); margin-bottom: 20px;
}
html.page-admin .pwrow {
  display: flex; gap: 8px;
}
html.page-admin .pwrow input {
  flex: 1; min-width: 0;
}
html.page-admin .panel .primary {
  width: 100%; margin-top: 18px;
}
html.page-admin .varlist {
  list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px;
}
html.page-admin .varlist li {
  background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: .92rem;
}
html.page-admin code,
html.page-admin .mono {
  font-family: var(--font-mono);
}
/* ---- app bar ---- */
html.page-admin .appbar {
  position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line);
}
html.page-admin .appbar-in {
  max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px;
}
html.page-admin .brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; margin-right: auto;
}
html.page-admin .brand .mark {
  width: 34px; height: 34px; margin: 0; border-radius: 10px;
}
html.page-admin .brand .mark .ic {
  width: 18px; height: 18px;
}
html.page-admin .tag {
  font-size: .78rem; font-weight: 700; border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; color: var(--muted);
}
html.page-admin main {
  max-width: 980px; margin: 0 auto; padding: 24px 16px 40px;
}
html.page-admin .head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
html.page-admin .head h1 {
  font-size: 1.6rem; line-height: 1.15; margin: 0;
}
html.page-admin .welcome-head {
  margin: 6px 0 28px;
}
html.page-admin .welcome-head .eyebrow {
  margin: 0 0 4px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
html.page-admin .welcome-head h1 {
  margin: 0; font-size: clamp(1.8rem, 4vw, 2.25rem); line-height: 1.12;
}
html.page-admin .welcome-head > p:last-child {
  margin: 8px 0 0; color: var(--muted);
}
html.page-admin .section-title {
  margin: 0; font-size: 1.25rem; line-height: 1.2;
}
html.page-admin .admin-doc-toolbar {
  align-items: center;
}
html.page-admin #summary {
  color: var(--muted); margin-top: 2px;
}
/* ---- toolbar ---- */
html.page-admin .toolbar {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px;
}
html.page-admin .tabs {
  display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px;
}
html.page-admin .tab {
  min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-size: .92rem;
}
html.page-admin .tab[aria-pressed="true"]{
  background: var(--accent); color: var(--on-accent);
}
@media (hover: hover) { html.page-admin .tab[aria-pressed="true"]:hover:not(:disabled){
  background: var(--accent); color: var(--on-accent);
} }
html.page-admin .tab .n {
  opacity: .75; font-weight: 500; margin-left: 4px;
}
html.page-admin .searchbox {
  position: relative; flex: 1 1 220px; max-width: 320px;
}
html.page-admin .searchbox .ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none;
}
html.page-admin .searchbox input {
  padding-left: 38px; min-height: 42px; background: var(--card);
}
/* ---- document rows: print-job tickets with a perforated stub ---- */
html.page-admin #list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
}
html.page-admin .row {
  position: relative; overflow: visible; display: grid; grid-template-columns: 124px minmax(200px, 1fr) minmax(0, max-content); align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
html.page-admin .row::before,
html.page-admin .row::after {
  content: ""; position: absolute; left: 114px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
html.page-admin .row::before {
  top: -11px;
}
html.page-admin .row::after {
  bottom: -11px;
}
html.page-admin .stub {
  align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 8px; border-right: 2px dashed var(--line); font-size: .85rem; font-weight: 700;
}
html.page-admin .sw {
  min-height: 0; width: 46px; height: 26px; padding: 0; border-radius: 99px; position: relative; background: var(--line); border: 0;
}
html.page-admin .sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); transition: transform .15s;
}
html.page-admin .sw[aria-checked="true"] {
  background: var(--ok);
}
html.page-admin .sw[aria-checked="true"]::after {
  transform: translateX(20px);
}
html.page-admin .row.off .stub {
  color: var(--muted);
}
html.page-admin .main {
  padding: 14px 16px; min-width: 0;
}
html.page-admin .name {
  font-weight: 700; overflow-wrap: anywhere;
}
html.page-admin .row.off .name {
  color: var(--muted);
}
html.page-admin .meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--muted); font-size: .88rem; margin-top: 2px;
}
html.page-admin .fid {
  display: inline-flex; align-items: center; gap: 4px;
}
html.page-admin .fid .mono {
  font-size: .84rem;
}
html.page-admin .fid button {
  min-height: 28px; padding: 0 6px; border-radius: 8px;
}
html.page-admin .fid .ic {
  width: 15px; height: 15px;
}
html.page-admin .chip {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 600;
}
html.page-admin .chip.ok {
  color: var(--ok);
}
html.page-admin .chip.bad {
  color: var(--bad);
}
html.page-admin .chip .ic {
  width: 15px; height: 15px;
}
html.page-admin .acts {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; padding: 8px 10px; min-width: 0;
}
html.page-admin .acts button {
  min-height: 38px;
}
html.page-admin .acts .del {
  color: var(--bad);
}
html.page-admin .acts .primary-action {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
html.page-admin .more-menu {
  position: relative; flex: 0 0 auto;
}
/* Every card is its own layer. A card whose More menu is open must sit above the cards after it,
   otherwise the next card's More button shows through the open menu. */
html.page-admin .row.menu-open,
html.page-admin .row:has(.more-menu[open]) {
  z-index: 30;
}
html.page-admin .more-menu > summary {
  list-style: none;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  user-select: none;
}
html.page-admin .more-menu > summary::-webkit-details-marker {
  display: none;
}
html.page-admin .more-menu > summary .ic {
  width: 17px;
  height: 17px;
}
html.page-admin .more-items {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  min-width: 210px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
html.page-admin .more-items button {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  border: 0;
  border-radius: 8px;
}
html.page-admin .more-items .del {
  color: var(--bad);
}
@media (hover: hover) {
  html.page-admin .acts .primary-action:hover:not(:disabled) {
    background: var(--accent);
    filter: brightness(1.12);
  }
  html.page-admin .more-menu > summary:hover {
    background: var(--soft);
  }
}
/* ---- states ---- */
html.page-admin .empty {
  text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 40px 20px;
}
html.page-admin .empty .mark {
  margin: 0 auto 14px;
}
html.page-admin .empty h2 {
  font-size: 1.1rem; margin: 0 0 4px;
}
html.page-admin .empty p {
  color: var(--muted); margin-bottom: 16px;
}
html.page-admin .skel {
  height: 76px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); animation: pulse 1.3s ease-in-out infinite;
}
@keyframes pulse {50% { opacity: .55; }}
/* ---- dialogs ---- */
html.page-admin dialog {
  border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); padding: 0; width: min(480px, calc(100vw - 24px)); box-shadow: var(--shadow);
}
html.page-admin dialog::backdrop {
  background: var(--backdrop);
}
html.page-admin .dlg {
  padding: 22px;
}
html.page-admin .dlg h2 {
  font-size: 1.2rem; margin: 0 0 4px;
}
html.page-admin .dlg .lead {
  color: var(--muted); margin-bottom: 20px;
}
html.page-admin .dlg-foot {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px;
}
/* ---- toasts ---- */
html.page-admin #toasts {
  position: fixed; left: 0; right: 0; bottom: 16px; z-index: 20; display: grid; gap: 8px; justify-items: center; padding: 0 12px; pointer-events: none;
}
html.page-admin .toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; background: var(--accent); color: var(--on-accent);
  border-radius: 12px; padding: 10px 12px 10px 16px; box-shadow: var(--shadow); font-weight: 600;
}
html.page-admin .toast.bad {
  background: var(--bad); color: var(--card);
}
html.page-admin .toast.warn {
  background: var(--warn-bg); color: var(--warn-ink);
}
html.page-admin .toast button {
  min-height: 32px; padding: 0 10px; background: transparent; color: inherit; border-color: currentColor; font-size: .88rem;
}
html.page-admin .opt {
  font-weight: 500; color: var(--muted);
}
html.page-admin .hint.ok {
  color: var(--ok); font-weight: 600;
}
html.page-admin .hint.bad {
  color: var(--bad); font-weight: 600;
}
html.page-admin fieldset.field {
  border: 0; margin: 0 0 18px; padding: 0; min-width: 0;
}
html.page-admin fieldset.field legend {
  font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: 8px;
}
html.page-admin label.radio {
  display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 0 0 8px; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
html.page-admin label.radio:has(input:checked) {
  border-color: var(--accent); background: var(--soft);
}
html.page-admin label.radio:has(input:disabled) {
  opacity: .6; cursor: not-allowed;
}
html.page-admin label.radio input {
  margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--accent); flex: none;
}
html.page-admin label.radio b {
  display: block; font-size: .95rem;
}
html.page-admin label.radio small {
  display: block; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere;
}
html.page-admin .chip.plain {
  color: var(--muted);
}
/* ---- view switch ---- */
html.page-admin .viewtabs {
  margin-bottom: 18px;
}
html.page-admin .viewtabs .tab {
  min-height: 40px; padding: 0 16px;
}
/* ---- stats ---- */
html.page-admin .kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px;
}
html.page-admin .kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
html.page-admin .kpi .v {
  font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums;
}
html.page-admin .kpi .l {
  font-weight: 600; font-size: .92rem; margin-top: 4px;
}
html.page-admin .kpi .s {
  color: var(--muted); font-size: .82rem;
}
html.page-admin .card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px;
}
html.page-admin .card h2 {
  font-size: 1.05rem; line-height: 1.2; margin: 0;
}
html.page-admin .card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px;
}
html.page-admin .legend {
  display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .9rem;
}
html.page-admin .legend span {
  display: inline-flex; align-items: center; gap: 7px;
}
html.page-admin .legend i,
html.page-admin .tip i {
  display: inline-block; width: 16px; height: 4px; border-radius: 2px;
}
html.page-admin .plot {
  position: relative;
}
html.page-admin .plot svg {
  display: block; width: 100%; height: auto; touch-action: pan-y;
}
html.page-admin .plot text {
  fill: var(--muted); font-size: 11px; font-family: inherit;
}
html.page-admin .tip {
  position: absolute; top: 0; left: 0; pointer-events: none; background: var(--accent); color: var(--on-accent);
  border-radius: 10px; padding: 8px 10px; font-size: .85rem; box-shadow: var(--shadow); white-space: nowrap; z-index: 2;
}
html.page-admin .tip b {
  display: block; margin-bottom: 2px;
}
html.page-admin .tip div {
  display: flex; align-items: center; gap: 7px;
}
html.page-admin .tip em {
  font-style: normal; font-weight: 700; margin-left: auto; padding-left: 12px;
}
html.page-admin .nodata {
  color: var(--muted); text-align: center; padding: 36px 12px;
}
html.page-admin .scroll {
  overflow-x: auto; max-height: 340px; overflow-y: auto;
}
html.page-admin table.tbl {
  width: 100%; border-collapse: collapse; font-size: .92rem;
}
html.page-admin .tbl th,
html.page-admin .tbl td {
  text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
html.page-admin .tbl th:first-child,
html.page-admin .tbl td:first-child {
  text-align: left;
}
html.page-admin .tbl th {
  font-weight: 600; color: var(--muted); font-size: .85rem; position: sticky; top: 0; background: var(--card);
}
html.page-admin .tbl tr:last-child td {
  border-bottom: 0;
}
html.page-admin .tbl .dname {
  font-weight: 600; overflow-wrap: anywhere;
}
html.page-admin .tbl .tagoff {
  color: var(--muted); font-weight: 500; font-size: .82rem; margin-left: 6px;
}
/* admin Documents tab: show every row (the list page scrolls, not a small box), delete button */
html.page-admin .scroll.tall {
  max-height: none;
}
html.page-admin .tbl .rowact {
  text-align: right; white-space: nowrap;
}
html.page-admin .tbl .del {
  color: var(--bad); min-height: 36px;
}
/* Change Log tab: the "What Change" text is left-aligned and wraps; the other columns stay compact */
html.page-admin .tbl.cl th, html.page-admin .tbl.cl td { text-align: left; vertical-align: top; }
html.page-admin .tbl.cl th:last-child, html.page-admin .tbl.cl td:last-child { text-align: right; white-space: nowrap; }
html.page-admin .tbl.cl td.clwhat { min-width: 260px; overflow-wrap: anywhere; }
html.page-admin .tbl.cl td.dname { white-space: nowrap; }
/* Tablets (portrait and landscape): fit the table inside the card so Size (Megabytes) is visible without scrolling sideways */
@media (min-width: 681px) and (max-width: 1100px) {
  html.page-admin .tbl.cl th, html.page-admin .tbl.cl td { padding: 9px 7px; }
  html.page-admin .tbl.cl td.dname { white-space: normal; overflow-wrap: normal; word-break: normal; }
  html.page-admin .tbl.cl td.clwhat { min-width: 0; }
  html.page-admin .tbl.cl th:last-child, html.page-admin .tbl.cl td:last-child { white-space: normal; }
}
@media (max-width: 680px) {
  html.page-admin .tbl.stack.cl td.clwhat { display: block; text-align: left; min-width: 0; }
  html.page-admin .tbl.stack.cl td.clwhat::before { display: block; margin-bottom: 2px; }
  html.page-admin .tbl.stack.cl td:last-child { white-space: normal; }
}
html.page-admin .tbl .chip {
  white-space: nowrap;
}
@media (max-width: 680px) {
  html.page-admin .tbl.stack.docs td.rowact {
    justify-content: flex-end; padding-top: 8px;
  }
}
html.page-admin .attn {
  background: var(--warn-bg); color: var(--warn-ink); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px;
}
html.page-admin .attn h2 {
  font-size: 1rem; margin: 0 0 4px;
}
html.page-admin .attn ul {
  margin: 0; padding-left: 20px;
}
html.page-admin .note {
  color: var(--muted); font-size: .85rem; margin-top: 4px;
}
html.page-admin .rangebar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
/* ---- phones: rows become stacked tickets ---- */
@media (max-width: 680px) {
  html.page-admin .row {
    grid-template-columns: 1fr;
  }
  html.page-admin .row::before,
  html.page-admin .row::after {
    display: none;
  }
  html.page-admin .stub {
    flex-direction: row; justify-content: flex-start; padding: 10px 16px; border-right: 0; border-bottom: 2px dashed var(--line);
  }
  html.page-admin .acts {
    padding: 0 10px 10px; flex-wrap: wrap;
  }
  html.page-admin .appbar .label {
    display: none;
  }
  html.page-admin .head h1 {
    font-size: 1.4rem;
  }
  html.page-admin .searchbox {
    max-width: none; flex-basis: 100%; order: 3;
  }
  html.page-admin .tbl.stack thead {
    display: none;
  }
  html.page-admin .tbl.stack,
  html.page-admin .tbl.stack tbody,
  html.page-admin .tbl.stack tr,
  html.page-admin .tbl.stack td {
    display: block; width: 100%;
  }
  html.page-admin .tbl.stack tr {
    padding: 8px 0; border-bottom: 1px solid var(--line);
  }
  html.page-admin .tbl.stack tr:last-child {
    border-bottom: 0;
  }
  html.page-admin .tbl.stack td {
    border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right;
  }
  html.page-admin .tbl.stack td:first-child {
    display: block; text-align: left; padding-bottom: 4px;
  }
  html.page-admin .tbl.stack td[data-l]::before {
    content: attr(data-l); color: var(--muted); text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.page-admin .skel {
    animation: none;
  }
  html.page-admin .sw::after {
    transition: none;
  }
}
html.page-admin .btnrow {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
html.page-admin .dangertext {
  color: var(--bad);
}
html.page-admin .rangeform {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
}
html.page-admin .rangeform input[type=date] {
  width: auto; min-width: 160px;
}
html.page-admin .rangeform label {
  margin-bottom: 4px;
}
html.page-admin .rangeform .hint {
  flex-basis: 100%; margin: 0;
}

/* ---- 4b. extras for the dashboard, admin lists and login pages (still html.page-admin) ---- */
html.page-admin a.brand { color: inherit; text-decoration: none; }
html.page-admin .authbrand {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-weight: 700; color: var(--ink); text-decoration: none;
}
html.page-admin .authbrand .mark { margin: 0; width: 36px; height: 36px; }
html.page-admin .authlinks { margin: 16px 0 0; font-size: .92rem; color: var(--muted); }
html.page-admin .authlinks a { color: var(--ink); font-weight: 600; }
html.page-admin .btnlink {
  display: inline-block; padding: 10px 18px; border-radius: 12px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
}
html.page-admin .acctform { display: grid; gap: 12px; max-width: 420px; }
html.page-admin .acctform .primary { justify-self: start; }
html.page-admin .actlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
html.page-admin .actrow {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
}
html.page-admin .actwhat { font-weight: 600; }
html.page-admin .actwhen { color: var(--muted); font-size: .88rem; }
html.page-admin #userList { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
html.page-admin .sw:disabled { opacity: .45; cursor: not-allowed; }

/* ==================== 5. LANDING PAGE ==================== */
html.page-landing .lp-bar {
  max-width: 1040px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
html.page-landing .lp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
html.page-landing .mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent); color: var(--on-accent);
}
html.page-landing .ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.page-landing nav { display: flex; align-items: center; gap: 10px; }
html.page-landing .lp-link { color: var(--ink); font-weight: 600; text-decoration: none; padding: 8px 10px; }
html.page-landing .lp-btn {
  display: inline-block; padding: 10px 18px; border-radius: 12px; font-weight: 700; text-decoration: none;
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent);
}
html.page-landing .lp-btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
html.page-landing .lp-btn.big { padding: 14px 26px; font-size: 1.05rem; }
html.page-landing main { max-width: 1040px; margin: 0 auto; padding: 0 20px 40px; }
html.page-landing .lp-hero { padding: 48px 0 36px; max-width: 720px; }
html.page-landing .lp-eyebrow { margin: 0 0 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; color: var(--muted); }
html.page-landing h1 { margin: 0 0 16px; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.1; }
html.page-landing .lp-sub { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; }
html.page-landing .lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
html.page-landing .lp-note { margin-top: 18px; color: var(--ok); font-weight: 600; }
html.page-landing .lp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 20px 0 32px; }
html.page-landing .lp-step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
html.page-landing .lp-step span {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 800; margin-bottom: 10px;
}
html.page-landing .lp-step h2 { margin: 0 0 6px; font-size: 1.1rem; }
html.page-landing .lp-step p { margin: 0; color: var(--muted); }
html.page-landing .lp-honest { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
html.page-landing .lp-honest h2 { margin: 0 0 8px; font-size: 1.05rem; }
html.page-landing .lp-honest p { margin: 0 0 8px; }
html.page-landing .lp-honest a { color: var(--ink); font-weight: 600; }
@media (max-width: 460px) {
  html.page-landing .lp-link { display: none; }
}

/* ---- 5b. documentation pop-up on the landing page ---- */
html.page-landing nav .lp-docbtn { background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
html.page-landing .lp-auth { display: inline-flex; align-items: center; gap: 10px; }
html.page-landing .lp-doclink { margin: 16px 0 0; }
html.page-landing .lp-doclink button {
  background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
html.page-landing .lp-dialog {
  border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); padding: 0;
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow);
}
html.page-landing .lp-dialog[open] { display: flex; flex-direction: column; }
html.page-landing .lp-dialog::backdrop { background: var(--backdrop); }
html.page-landing .lp-dhead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line);
}
html.page-landing .lp-dhead h2 { margin: 0; font-size: 1.25rem; }
html.page-landing .lp-dclose {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); cursor: pointer; font-size: 1.1rem;
}
html.page-landing .lp-dbody { overflow-y: auto; padding: 8px 20px 24px; line-height: 1.55; }
html.page-landing .lp-dlead { font-size: 1.08rem; color: var(--muted); margin: 12px 0; }
html.page-landing .lp-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
html.page-landing .lp-toc a {
  padding: 6px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem;
}
html.page-landing .lp-dbody h3 { margin: 22px 0 6px; font-size: 1.1rem; scroll-margin-top: 8px; }
html.page-landing .lp-dbody p { margin: 0 0 10px; }
html.page-landing .lp-dbody ul, html.page-landing .lp-dbody ol { margin: 0 0 10px; padding-left: 22px; }
html.page-landing .lp-dbody li { margin-bottom: 5px; }
html.page-landing .lp-dbody details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: var(--soft); }
html.page-landing .lp-dbody summary { cursor: pointer; font-weight: 700; }
html.page-landing .lp-dbody details p { margin: 8px 0 0; color: var(--muted); }
/* v2.18.0: on phones the pop-up leaves a clear gap on every side (it used to fill the whole screen on an iPhone 15 Plus). */
@media (max-width: 680px) {
  html.page-landing .lp-dialog { width: calc(100vw - 40px); max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); margin: auto; }
  html.page-landing .lp-dhead { padding: 12px 16px; }
  html.page-landing .lp-dbody { padding: 4px 16px 20px; }
}
/* Tablets and larger: keep a clear gap above and below so the pop-up never touches the top or bottom of the page */
@media (min-width: 681px) {
  html.page-landing .lp-dialog { width: min(720px, calc(100vw - 96px)); max-height: calc(100vh - 128px); max-height: calc(100dvh - 128px); }
}

/* ---- 3b. operator page (/p/...): countdown and print instructions (html.page-pasa) ---- */
html.page-pasa .clock {
  margin: 14px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line);
  font-size: .95rem; display: inline-flex; gap: 6px; align-items: baseline;
}
html.page-pasa .clock b { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
html.page-pasa .instr {
  margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line);
}
html.page-pasa .instr h3 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .08em; color: var(--muted); }
html.page-pasa .instr dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
html.page-pasa .instr dt { color: var(--muted); }
html.page-pasa .instr dd { margin: 0; font-weight: 600; }
html.page-pasa .instr p.small { margin: 10px 0 0; }
html.page-pasa .instr:empty { display: none; }
html.page-pasa #steps,
html.page-pasa .perf {
  display: none;
}
html.page-pasa .stage {
  padding-top: 28px;
}
html.page-pasa .lead-copy {
  margin-bottom: 18px;
}
html.page-pasa .operator-doc {
  display: grid;
  gap: 3px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
html.page-pasa .operator-label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}
html.page-pasa .operator-doc .docname {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}
html.page-pasa .clock {
  margin-top: 16px;
  width: fit-content;
  font-weight: 600;
}
html.page-pasa .clock b {
  margin-left: 3px;
}
html.page-pasa .instr {
  margin: 0 0 18px;
  padding: 16px;
}
html.page-pasa .instr h3 {
  letter-spacing: normal;
  font-size: .95rem;
  color: var(--ink);
}
html.page-pasa .instr dl {
  gap: 6px 18px;
}
html.page-pasa .instr p.small {
  margin-top: 12px;
}
html.page-pasa #continueBtn {
  width: 100%;
}
@media (max-width: 460px) {
  html.page-pasa .stage {
    padding: 22px 16px 24px;
  }
  html.page-pasa .stub {
    padding: 18px 16px;
  }
  html.page-pasa .operator-doc,
  html.page-pasa .instr {
    padding: 14px;
  }
}

/* ---- 4c. sharing dialog on the dashboard (html.page-admin) ---- */
html.page-admin .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
html.page-admin .grid2 label { display: block; margin-bottom: 4px; font-size: .9rem; }
html.page-admin select, html.page-admin input[type=number] {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 10px; min-height: 42px;
}
html.page-admin .qrbox { width: min(240px, 70vw); margin: 12px auto 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; line-height: 0; }
html.page-admin .qrbox svg { width: 100%; height: auto; display: block; }
html.page-admin .pinbox { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
html.page-admin .pinbox b { font-size: 1.3rem; letter-spacing: .15em; margin: 0 8px; font-variant-numeric: tabular-nums; }
html.page-admin .shrow { display: grid; gap: 6px; justify-content: stretch; }
html.page-admin .shtop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
html.page-admin .shrow button { justify-self: start; }
@media (max-width: 460px) { html.page-admin .grid2 { grid-template-columns: 1fr; } }

/* ==================== SHARED FOOTER ==================== */
/* One footer for every page, so it looks the same everywhere. */
footer.site-footer {
  text-align: center; font-size: .85rem; line-height: 1.5; color: var(--muted); padding: 24px 16px 32px; margin: 0;
}
footer.site-footer p { margin: 2px 0; }
footer.site-footer a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
footer.site-footer a:focus-visible{ color: var(--ink); }
@media (hover: hover) { footer.site-footer a:hover{ color: var(--ink); } }
html.page-auth .center { min-height: calc(100vh - 88px); }

/* ==================== OWNER PREVIEW: BACK BUTTON ==================== */
html.page-print .previewbar { margin: 0 0 14px; }
html.page-print a.navbtn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 600; text-decoration: none;
}@media (hover: hover) { html.page-print a.navbtn:hover{ border-color: var(--accent); } }
html.page-print a.navbtn i { flex: none; font-size: 15px; line-height: 1; }

/* =====================================================================
   v2.5.0: loading states and sort controls
   Loading follows common modern practice: a calm ring spinner for whole-page waits, and skeleton
   placeholders shaped like the real rows for lists. Both wait ~150 ms before appearing, so a fast
   response never flashes. Motion is switched off for people who prefer reduced motion.
   Placeholders are built by /loaders.js. Colours come from the same tokens as the rest of the site.
   ===================================================================== */
.pp-splash {
  display: grid; justify-items: center; gap: 14px; color: var(--muted);
  opacity: 0; animation: pp-fade .25s ease-out .15s forwards;
}
.pp-splash p { margin: 0; font-size: .95rem; letter-spacing: .02em; }
.pp-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--soft); border-top-color: var(--accent);
  animation: pp-spin .8s linear infinite;
}
.pp-spinner.sm { width: 20px; height: 20px; border-width: 2.5px; }
.pp-stage-loading { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.pp-stage-loading h2 { margin: 0; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@keyframes pp-fade { to { opacity: 1; } }
@keyframes pp-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.pp-skel-list { display: grid; gap: 10px; opacity: 0; animation: pp-fade .2s ease-out .15s forwards; }
.pp-skel-row {
  display: grid; grid-template-columns: 124px minmax(0, 1fr) 140px; align-items: center; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; min-height: 84px;
}
.pp-skel-row .pp-skel-stub { display: grid; justify-items: center; gap: 8px; padding: 14px 0; border-right: 1px dashed var(--line); height: 100%; align-content: center; }
.pp-skel-row .pp-skel-main { display: grid; gap: 10px; padding: 14px 18px; }
.pp-skel-row .pp-skel-act { padding: 0 18px; }
.pp-sk {
  display: block; height: 12px; border-radius: 999px;
  background: linear-gradient(100deg, var(--soft) 35%, var(--card) 50%, var(--soft) 65%);
  background-size: 250% 100%; animation: pp-shimmer 1.5s ease-in-out infinite;
}
.pp-sk.knob { width: 38px; height: 22px; }
.pp-sk.tiny { width: 48px; height: 10px; }
.pp-sk.title { width: min(60%, 260px); height: 16px; border-radius: 8px; }
.pp-sk.chip { width: 74px; height: 20px; }
.pp-sk.btn { width: 100%; height: 36px; border-radius: 10px; }
.pp-skel-chips { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .pp-skel-row { grid-template-columns: 1fr; }
  .pp-skel-row .pp-skel-stub { border-right: 0; border-bottom: 1px dashed var(--line); grid-auto-flow: column; justify-content: start; padding: 12px 18px; }
  .pp-skel-row .pp-skel-act { padding: 0 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-spinner { animation-duration: 2.4s; }
  .pp-sk { animation: none; background: var(--soft); }
  .pp-splash, .pp-skel-list { animation-duration: .01s; }
}

/* sort control that sits beside the search box */
html.page-admin .sortbox { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
html.page-admin .sortbox label { color: var(--muted); font-size: .88rem; white-space: nowrap; }
html.page-admin .sortbox select { min-height: 42px; width: auto; max-width: 100%; padding-right: 30px; background-color: var(--card); }
html.page-admin .toolbar .tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; flex: 1 1 320px; justify-content: flex-end; }
html.page-admin .toolbar .tools .searchbox { flex: 1 1 200px; }
@media (max-width: 640px) {
  html.page-admin .toolbar .tools { flex-basis: 100%; justify-content: stretch; }
  html.page-admin .toolbar .tools .searchbox { flex-basis: 100%; order: 0; }
  html.page-admin .sortbox { flex: 1 1 100%; }
  html.page-admin .sortbox select { flex: 1; }
}

/* ---- search bar with built-in Sort By (public/searchsort.js) ---- */
html.page-admin .sortbox.enhanced { display: none; }
html.page-admin .searchbox.has-sort { flex: 1 1 320px; max-width: 460px; }
html.page-admin .searchbox.has-sort input { padding-right: 168px; }
html.page-admin .searchbox.has-sort:focus-within input,
html.page-admin .searchbox.sort-open input { border-color: var(--accent); }
html.page-admin .sortchip {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); min-height: 32px; max-width: 160px; padding: 0 8px 0 9px;
  display: inline-flex; align-items: center; gap: 6px; border-radius: 9px; background: var(--soft, var(--bg)); border: 1px solid var(--line);
  color: var(--ink); font-size: .82rem; font-weight: 600; cursor: pointer;
}
html.page-admin .sortchip .ic { width: 15px; height: 15px; position: static; transform: none; flex: 0 0 auto; color: var(--muted); pointer-events: none; }
html.page-admin .sortchip .chev { transition: transform .15s ease; }
html.page-admin .searchbox.sort-open .sortchip .chev { transform: rotate(180deg); }
html.page-admin .sortchip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.page-admin .sortpop {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(3, 47, 12, .22);
}
html.page-admin .sortpop[hidden] { display: none; }
html.page-admin .sortpop-head { padding: 6px 10px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
html.page-admin .sortopt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: .95rem; text-align: left; cursor: pointer;
}
html.page-admin .sortopt:focus-visible{ background: var(--soft, var(--bg)); }
@media (hover: hover) { html.page-admin .sortopt:hover{ background: var(--soft, var(--bg)); } }
html.page-admin .sortopt .tick { width: 17px; height: 17px; font-size: 14px; visibility: hidden; color: var(--accent); position: static; transform: none; flex: 0 0 auto; }
html.page-admin .sortopt.on { font-weight: 700; }
html.page-admin .sortopt.on .tick { visibility: visible; }
@media (max-width: 640px) {
  html.page-admin .searchbox.has-sort { max-width: none; flex-basis: 100%; }
  html.page-admin .searchbox.has-sort input { padding-right: 150px; }
}
@media (prefers-reduced-motion: reduce) { html.page-admin .sortchip .chev { transition: none; } }

/* ---- admin Data tab ---- */
html.page-admin .datalist { display: grid; gap: 8px; margin: 0 0 14px; }
html.page-admin .datarow {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
html.page-admin .datarow input { width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; accent-color: var(--accent); }
html.page-admin .datarow .datatext { flex: 1 1 auto; min-width: 0; }
html.page-admin .datarow .datatext span { color: var(--muted); }
html.page-admin .datarow em { font-style: normal; color: var(--muted); font-size: .88rem; white-space: nowrap; }
@media (max-width: 640px) {
  html.page-admin .datarow { display: grid; grid-template-columns: 20px 1fr; align-items: start; column-gap: 12px; row-gap: 2px; }
  html.page-admin .datarow input { margin-top: 2px; }
  html.page-admin .datarow em { grid-column: 2; padding-left: 0; }
}

/* admin has five sections now: on phones the switcher fills the width and shrinks, scrolling sideways only inside itself if it must */
@media (max-width: 640px) {
  html.page-admin .viewtabs { display: flex; width: 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  html.page-admin .viewtabs .tab { flex: 1 1 auto; padding: 0 8px; font-size: .88rem; white-space: nowrap; }
}

/* ==== C11b: card spacing and device sizes ====
   The ticket notches on a card stick out 11px above and below it. The gap between cards used to be 10px, so the
   notches of neighbouring cards ran into each other. The gap is now larger than both notches together. On phones the
   notches are hidden, so a smaller gap is enough. */
html.page-admin #list,
html.page-admin #userList { gap: 28px; margin-top: 14px; padding-bottom: 6px; }
html.page-admin #list > li,
html.page-admin #userList > li { margin: 0; }
@media (max-width: 680px) {
  html.page-admin #list,
  html.page-admin #userList { gap: 14px; margin-top: 8px; }
}
/* Tablets in portrait (about 681 to 900px): narrower stub, notches follow it, actions wrap under the text if they must */
@media (min-width: 681px) and (max-width: 900px) {
  html.page-admin .row { grid-template-columns: 104px minmax(0, 1fr) auto; }
  html.page-admin .row::before, html.page-admin .row::after { left: 94px; }
  html.page-admin .main { padding: 14px 14px; }
  html.page-admin .acts { padding: 8px 12px 8px 4px; }
  html.page-admin .acts .primary-action { padding: 0 12px; }
}
/* Fingers: comfortable tap size on touch screens (phones and tablets) */
@media (pointer: coarse) {
  html.page-admin .acts button,
  html.page-admin .more-menu > summary,
  html.page-admin .more-items button,
  html.page-admin .tab,
  html.page-admin .sortopt,
  html.page-admin .tbl .del { min-height: 44px; }
  html.page-admin .sortchip { min-height: 36px; }
  html.page-admin .fid button { min-height: 36px; min-width: 36px; }
}
/* Phones: the card's action buttons share the row evenly */
@media (max-width: 680px) {
  html.page-admin .acts { gap: 8px; }
  html.page-admin .acts .primary-action { flex: 1 1 60%; justify-content: center; }
  html.page-admin .acts .more-menu { flex: 0 0 auto; }
}
/* very long emails, names and file names wrap instead of pushing the card wider than the screen */
html.page-admin .meta > span, html.page-admin .name, html.page-admin .dname { overflow-wrap: anywhere; min-width: 0; }
html.page-admin .row, html.page-admin .main { min-width: 0; }

/* C11f: the sort control is an icon button (two sliders); the current sort name stays for screen readers and as a tooltip */
html.page-admin .sortchip { width: 36px; height: 36px; min-height: 36px; padding: 0; justify-content: center; max-width: none; }
html.page-admin .sortchip .ic { width: 18px; height: 18px; color: var(--ink); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.page-admin .searchbox.sort-open .sortchip { background: var(--accent); border-color: var(--accent); }
html.page-admin .searchbox.sort-open .sortchip .ic { color: var(--on-accent, #fff); }
html.page-admin .sortchip-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (pointer: coarse) { html.page-admin .sortchip { width: 44px; height: 44px; min-height: 44px; } }
/* phones: My Documents shows its icon, like Log out */
html.page-admin .appbar .btn .ic, html.page-admin .appbar button .ic { width: 20px; height: 20px; flex: 0 0 auto; }

/* C11g: icon buttons use the same soft tile as the PasaPrint mark, so the icons match the page colours */
html.page-admin .appbar .btn.quiet, html.page-admin .appbar #logoutBtn {
  background: var(--soft); border: 1px solid transparent; color: var(--accent); border-radius: 12px;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
html.page-admin .appbar .btn.quiet .ic, html.page-admin .appbar #logoutBtn .ic { color: var(--accent); stroke-width: 1.9; }
html.page-admin .appbar .btn.quiet:focus-visible,
html.page-admin .appbar #logoutBtn:focus-visible{ background: var(--accent); color: var(--on-accent); }
@media (hover: hover) { html.page-admin .appbar .btn.quiet:hover,
html.page-admin .appbar #logoutBtn:hover{ background: var(--accent); color: var(--on-accent); } }
html.page-admin .appbar .btn.quiet:focus-visible .ic,
html.page-admin .appbar #logoutBtn:focus-visible .ic{ color: var(--on-accent); }
@media (hover: hover) { html.page-admin .appbar .btn.quiet:hover .ic,
html.page-admin .appbar #logoutBtn:hover .ic{ color: var(--on-accent); } }
html.page-admin .appbar .btn.quiet:active, html.page-admin .appbar #logoutBtn:active { transform: scale(.96); }
@media (max-width: 680px) { html.page-admin .appbar .btn.quiet, html.page-admin .appbar #logoutBtn { width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; } }

/* the sort button sits inside the search card as a soft tile, matching the mark and the header buttons */
html.page-admin .searchbox.has-sort input { padding-right: 58px; }
html.page-admin .sortchip {
  right: 6px; width: 36px; height: 36px; min-height: 36px; border-radius: 10px; border: 1px solid transparent;
  background: var(--soft); color: var(--accent); transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
html.page-admin .sortchip .ic { width: 18px; height: 18px; color: var(--accent); stroke-width: 1.9; }@media (hover: hover) { html.page-admin .searchbox:not(.sort-open) .sortchip:hover{ background: var(--line); } }
html.page-admin .sortchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html.page-admin .sortchip:active { transform: translateY(-50%) scale(.95); }
html.page-admin .searchbox.sort-open .sortchip { background: var(--accent); border-color: var(--accent); }
html.page-admin .searchbox.sort-open .sortchip .ic { color: var(--on-accent); }
@media (pointer: coarse) { html.page-admin .sortchip { right: 5px; width: 44px; height: 44px; min-height: 44px; } html.page-admin .searchbox.has-sort input { padding-right: 62px; } }

/* C11h: real phones (iPhone 15, Honor 9i). The sort button always fits inside the search bar, and admin Documents are separate cards. */
html.page-admin .searchbox input { min-height: 46px; }
html.page-admin .searchbox.has-sort input { min-height: 46px; padding-right: 60px; }
html.page-admin .sortchip { width: 36px; height: 36px; min-height: 36px; right: 6px; top: 50%; margin: 0; box-sizing: border-box; flex: none; -webkit-appearance: none; appearance: none; line-height: 1; }
html.page-admin .sortchip svg { display: block; flex: none; }
@media (pointer: coarse) {
  html.page-admin .searchbox input, html.page-admin .searchbox.has-sort input { min-height: 50px; }
  html.page-admin .searchbox.has-sort input { padding-right: 64px; }
  html.page-admin .sortchip { width: 40px; height: 40px; min-height: 40px; right: 5px; }
}
html.page-admin .appbar .btn.quiet .ic, html.page-admin .appbar #logoutBtn .ic { display: block; flex: none; }
@media (max-width: 680px) {
  html.page-admin .appbar .btn.quiet, html.page-admin .appbar #logoutBtn { display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 0; }
  /* Documents tab: one card per document with space between, like the Users tab */
  html.page-admin .card:has(> #docsTable) { background: transparent; border: 0; box-shadow: none; padding: 0; }
  html.page-admin #docsTable { max-height: none; overflow: visible; }
  html.page-admin .tbl.stack.docs tbody { display: grid; gap: 14px; }
  html.page-admin .tbl.stack.docs tr {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 10px; box-shadow: var(--shadow);
  }
  html.page-admin .tbl.stack.docs tr:last-child { border-bottom: 1px solid var(--line); }
  html.page-admin .tbl.stack.docs td:first-child { font-size: 1.05rem; padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
  html.page-admin .tbl.stack.docs td { padding: 5px 0; min-width: 0; overflow-wrap: anywhere; }
  html.page-admin .tbl.stack.docs td.rowact { justify-content: stretch; padding-top: 10px; margin-top: 4px; border-top: 1px dashed var(--line); }
  html.page-admin .tbl.stack.docs td.rowact .del { width: 100%; justify-content: center; }
}

/* =====================================================================
   FONT AWESOME FREE ICONS (solid, served from /vendor/fontawesome-free-7.3.1)
   Every icon is <i class="ic fa-solid fa-NAME">. The boxes (width/height) are set by the rules above;
   these rules centre the glyph in its box and give it a matching size.
   ===================================================================== */
html.page-admin i.ic, html.page-landing i.ic {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-size: 16px; line-height: 1; font-style: normal; overflow: visible;
}
html.page-admin .mark i.ic, html.page-landing .mark i.ic { font-size: 20px; }
html.page-admin .brand .mark i.ic { font-size: 16px; }
html.page-admin .fid i.ic, html.page-admin .chip i.ic { font-size: 13px; }
html.page-admin .more-menu > summary i.ic { font-size: 15px; }
html.page-admin .searchbox i.ic { font-size: 15px; }
html.page-admin .sortchip i.ic { font-size: 16px; }
html.page-admin .appbar .btn i.ic, html.page-admin .appbar button i.ic { font-size: 17px; }


/* ---- v2.10.0: Filter + Sort menu inside the search bar ---- */
html.page-admin .sortchip-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 800; line-height: 18px; text-align: center; pointer-events: none;
}
html.page-admin .sortchip-badge[hidden] { display: none; }
html.page-admin .searchbox.sort-open .sortchip-badge { background: var(--on-accent); color: var(--accent); }
html.page-admin .sortpop { max-height: min(70vh, 520px); overflow-y: auto; }
html.page-admin .sortpop-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 0; font-size: .72rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink);
}
html.page-admin .sortpop-top + .sortpop-head { padding-top: 2px; }
html.page-admin .sortpop-clear {
  border: 0; background: none; color: var(--accent); font: inherit; font-size: .8rem; font-weight: 700; text-transform: none; letter-spacing: 0;
  text-decoration: underline; cursor: pointer; padding: 4px 6px; min-height: 32px;
}
html.page-admin .sortpop-clear[hidden] { display: none; }
html.page-admin .sortpop .sortpop-head:not(:first-child):not(.sortpop-top + .sortpop-head) { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 10px; }


/* ---- v2.11.0: Reset All dialog and danger zone ---- */
html.page-admin .card.danger-zone { border-color: var(--bad); }
html.page-admin .card.danger-zone .card-head h2 { color: var(--bad); }
html.page-admin #resetAllDialog .dlg { display: grid; gap: 6px; }
html.page-admin #resetAllDialog label { font-weight: 600; margin-top: 8px; }
html.page-admin #resetAllDialog .raack { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; margin-top: 4px; }
html.page-admin #resetAllDialog .raack input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
html.page-admin #resetAllDialog .dlg-foot { margin-top: 14px; }
html.page-admin #resetAllDialog button:disabled { opacity: .5; cursor: not-allowed; }

/* v2.12.0: landing sign-in buttons stay hidden until the sign-in check finishes, then fade in (no flash of Log In / Get Started). */
html.page-landing .lp-auth, html.page-landing .lp-cta { transition: opacity .35s ease, visibility .35s; }
html.page-landing.auth-pending .lp-auth, html.page-landing.auth-pending .lp-cta { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { html.page-landing .lp-auth, html.page-landing .lp-cta { transition: none; } }

/* v2.12.0: result screens on the sign-in pages (email confirmed, link expired, check your email). */
html.page-auth .statusbadge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--soft); color: var(--accent); animation: ppPop .35s ease both; }
html.page-auth .statusbadge[hidden] { display: none; }
html.page-auth .statusbadge .ic { width: 30px; height: 30px; font-size: 28px; line-height: 1; display: inline-block; text-align: center; }
html.page-auth .statusbadge.ok { background: color-mix(in srgb, var(--ok) 18%, var(--card)); color: var(--ok); }
html.page-auth .statusbadge.bad { background: color-mix(in srgb, var(--bad) 16%, var(--card)); color: var(--bad); }
html.page-auth .statusbadge.wait { animation: none; }
html.page-auth .panel:has(.statusbadge:not([hidden])) { text-align: center; }
html.page-auth .panel:has(.statusbadge:not([hidden])) .authbrand { justify-content: center; }
html.page-auth .authlinks.result { display: block; margin-top: 4px; }
html.page-auth a.btnlink { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 12px 16px; border-radius: 12px; text-decoration: none; font-weight: 600; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
html.page-auth a.btnlink .ic { width: 1em; height: 1em; color: inherit; font-size: 1rem; display: inline-block; flex: none; }@media (hover: hover) { html.page-auth a.btnlink:hover{ filter: brightness(1.08); } }
html.page-auth a.btnlink:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
@keyframes ppPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.page-auth .statusbadge { animation: none; } }

/* v2.14.0: Pasa end screens look like the "Email confirmed" page: status badge, centered text, no button, just a countdown to the home page. */
html.page-pasa .endview { text-align: center; }
html.page-pasa .endbadge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 16px; background: var(--soft); color: var(--accent); animation: ppPop .35s ease both; }
html.page-pasa .endbadge i { font-size: 28px; line-height: 1; }
html.page-pasa .endbadge.ok { background: color-mix(in srgb, var(--ok) 18%, var(--card)); color: var(--ok); }
html.page-pasa .endbadge.bad { background: color-mix(in srgb, var(--bad) 16%, var(--card)); color: var(--bad); }
html.page-pasa #leaveNote, html.page-pasa #unavailLeave { margin-top: 18px; }
html.page-pasa #leaveNote p.small, html.page-pasa #unavailLeave p.small { margin: 0; color: var(--muted); }
html.page-pasa .leave-sec { font-variant-numeric: tabular-nums; color: var(--ink); }
@keyframes ppPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.page-pasa .endbadge { animation: none; } }

/* v2.14.0: styled dropdown selectors (Color, Paper, Expires in, PIN and the plain Filter / Sort selects).
   The closed control is styled everywhere. Browsers that support appearance: base-select (recent Chrome and Edge) also get a styled list;
   others (Safari, iPad, phones) keep their own picker, which is the best experience on touch screens. */
html.page-admin select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23032f0c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
  padding: 9px 36px 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 500;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
@media (prefers-color-scheme: dark) {
  html.page-admin select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e9b7a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E");
  }
}@media (hover: hover) { html.page-admin select:hover:not(:disabled){ border-color: var(--accent); background-color: var(--soft); } }
html.page-admin select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
html.page-admin select:disabled { opacity: .55; cursor: not-allowed; }
html.page-admin select option { background: var(--card); color: var(--ink); }
html.page-admin select option:checked { background: var(--soft); font-weight: 600; }
@supports (appearance: base-select) {
  html.page-admin select, html.page-admin select::picker(select) { appearance: base-select; }
  html.page-admin select { background-image: none; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  html.page-admin select::picker-icon {
    content: ""; width: 9px; height: 9px; flex: none; margin-right: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg); transition: transform .2s ease;
  }
  html.page-admin select:open::picker-icon { transform: translateY(2px) rotate(-135deg); }
  html.page-admin select::picker(select) {
    margin-top: 6px; padding: 6px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow); max-height: min(320px, 60vh);
  }
  html.page-admin select option {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-weight: 500;
  }
  html.page-admin select option:focus-visible{ background: var(--soft); outline: none; }
@media (hover: hover) { html.page-admin select option:hover{ background: var(--soft); outline: none; } }
  html.page-admin select option:checked { background: var(--accent); color: var(--on-accent); font-weight: 600; }
  html.page-admin select option::checkmark { content: "\2713"; order: 1; margin-left: auto; font-weight: 700; }
}

/* v2.15.0: highlighted (selected) text uses the theme colours. Light: dark green with peach text. Dark: peach with dark green text.
   On buttons and badges that already use the accent colour, the pair is swapped so the highlight stays visible. */
::selection { background: var(--accent); color: var(--on-accent); text-shadow: none; }
::-moz-selection { background: var(--accent); color: var(--on-accent); text-shadow: none; }
button ::selection, button::selection, a.btnlink::selection, a.btnlink ::selection, .lp-btn::selection, .lp-btn ::selection, .primary::selection, .primary ::selection, .danger::selection {
  background: var(--on-accent); color: var(--accent);
}

/* v2.16.0: live password checklist (public/pwcheck.js) and login note. */
html.page-auth .authnote { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: .88rem; line-height: 1.4; }
html.page-auth .authnote[hidden] { display: none; }
html.page-auth .authnote i { margin-top: 2px; color: var(--ink); }
/* v2.16.0: Privacy Policy pop-up (opened from the footer on every page; built by public/footer.js). */
footer.site-footer p.pp-pol-link { margin-top: 6px; }
footer.site-footer p.pp-pol-link button {
  background: none; border: 0; padding: 4px 6px; font: inherit; font-weight: 600; color: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; border-radius: 6px;
}
footer.site-footer p.pp-pol-link button:focus-visible{ color: var(--ink); }
@media (hover: hover) { footer.site-footer p.pp-pol-link button:hover{ color: var(--ink); } }
dialog.pp-policy {
  border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); padding: 0;
  width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow); font-family: var(--font);
}
dialog.pp-policy[open] { display: flex; flex-direction: column; }
dialog.pp-policy::backdrop { background: var(--backdrop); }
@media (min-width: 681px) { dialog.pp-policy { width: min(720px, calc(100vw - 96px)); max-height: calc(100dvh - 128px); } }
/* v2.18.0: same phone spacing as the Documentation pop-up. */
@media (max-width: 680px) {
  dialog.pp-policy { width: calc(100vw - 40px); max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); margin: auto; }
  .pp-pol-head { padding: 12px 16px; }
  .pp-pol-body { padding: 4px 16px 16px; }
}
.pp-pol-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pp-pol-head h2 { margin: 0; font-size: 1.25rem; }
.pp-pol-body { overflow-y: auto; padding: 8px 20px 20px; line-height: 1.55; text-align: left; font-size: .96rem; }
.pp-pol-body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pp-pol-body h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.pp-pol-body p { margin: 0 0 10px; }
.pp-pol-body ul { margin: 0 0 10px; padding-left: 22px; }
.pp-pol-body li { margin-bottom: 6px; }
.pp-pol-body a { color: var(--ink); font-weight: 600; }
.pp-pol-updated { color: var(--muted); font-size: .85rem; margin-top: 12px !important; }
.pp-pol-lead { font-size: 1.04rem; color: var(--muted); }
.pp-pol-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
@media (max-width: 680px) { .pp-pol-foot { padding: 12px 16px 14px; } .pp-pol-ok { width: 100%; } }
.pp-pol-ok { min-height: 44px; padding: 0 22px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; }@media (hover: hover) { .pp-pol-ok:hover{ filter: brightness(1.08); } }

/* v2.17.0: the password checklist appears only while typing, lists only what is still missing, and celebrates when done. */
.pwcheck { display: grid; grid-template-rows: 0fr; margin: 0; transition: grid-template-rows .3s ease, margin .3s ease; --p: 0; }
.pwcheck[data-open="1"] { grid-template-rows: 1fr; margin: 10px 0 2px; }
.pwcheck .pwinner { overflow: hidden; min-height: 0; }
.pwcheck .pwhead { display: flex; align-items: center; gap: 12px; }
.pwcheck .pwtrack { flex: 1; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--line) 55%, transparent); overflow: hidden; }
.pwcheck .pwtrack i { display: block; height: 100%; width: calc(var(--p) * 1%); border-radius: 99px;
  background: color-mix(in srgb, var(--ok) calc(var(--p) * 1%), var(--bad)); transition: width .35s cubic-bezier(.3,.8,.3,1), background-color .35s ease; }
.pwcheck .pwlevel { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pwcheck .pwlevel i { font-size: .95rem; transition: color .3s ease, transform .3s ease; }
.pwcheck[data-done="1"] .pwlevel { color: var(--ok); }
.pwcheck[data-done="1"] .pwlevel i { color: var(--ok); animation: ppBeat .6s ease both; }
.pwcheck .pwrules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 8px; }
.pwcheck .pwrules li { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s ease, opacity .25s ease; }
.pwcheck .pwrules li[data-state="bad"], .pwcheck .pwrules li[data-state="ok"] { grid-template-rows: 1fr; opacity: 1; }
.pwcheck .pwrules li > .chip { overflow: hidden; min-height: 0; display: inline-flex; align-items: center; gap: 6px; }
.pwcheck .pwrules li[data-state="bad"] > .chip, .pwcheck .pwrules li[data-state="ok"] > .chip { margin-top: 8px; padding: 5px 11px; border-radius: 99px; font-size: .84rem; line-height: 1.2; border: 1px solid transparent; }
.pwcheck .pwrules li[data-state="bad"] > .chip { background: color-mix(in srgb, var(--bad) 13%, var(--card)); color: var(--ink); border-color: color-mix(in srgb, var(--bad) 35%, transparent); animation: ppChipIn .28s ease both; }
.pwcheck .pwrules li[data-state="bad"] > .chip i { color: var(--bad); }
.pwcheck .pwrules li[data-state="ok"] > .chip { background: color-mix(in srgb, var(--ok) 18%, var(--card)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); font-weight: 600; animation: ppBeat .45s ease both; }
.pwcheck .pwrules li > .chip i { font-size: .85rem; }
@keyframes ppChipIn { from { transform: translateY(-4px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ppBeat { 0% { transform: scale(.8); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .pwcheck, .pwcheck .pwtrack i, .pwcheck .pwrules li, .pwcheck .pwlevel i { transition: none; }
  .pwcheck .pwrules li > .chip, .pwcheck[data-done="1"] .pwlevel i { animation: none !important; }
}

/* ==================== v2.19.0: Tabler x shadcn layer ====================
   Layout from Tabler (sidebar navigation on desktop, card headers, stat cards, badges) mixed with the minimal shadcn/ui style
   (thin borders, 8-12px corners, soft focus rings, small shadows). NO colours are defined here: every colour still comes from
   section 1, so light and dark mode stay exactly as before. The ticket-style document cards are PasaPrint's own look and are kept. */
:root { --r-sm: 8px; --r-md: 12px; --shadow-sm: 0 1px 2px color-mix(in srgb, var(--ink) 8%, transparent); --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* -- shadcn: buttons and fields -- */
html.page-admin button, html.page-admin .btn { border-radius: var(--r-sm); font-weight: 600; box-shadow: var(--shadow-sm); transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, filter .15s ease; }
html.page-admin button.quiet, html.page-admin .tab { box-shadow: none; }
html.page-admin button:focus-visible, html.page-admin .btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
html.page-admin input[type=text], html.page-admin input[type=password], html.page-admin input[type=search], html.page-admin input[type=date],
html.page-admin input[type=email], html.page-admin input[type=number] { border-radius: var(--r-sm); background: var(--card); min-height: 44px; box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }
html.page-admin input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
html.page-admin .panel { border-radius: var(--r-md); padding: 32px 28px; box-shadow: var(--shadow-sm), 0 12px 32px color-mix(in srgb, var(--ink) 10%, transparent); }
html.page-admin .mark { border-radius: var(--r-sm); }

/* -- Tabler: cards with a header strip, stat cards -- */
html.page-admin .card { border-radius: var(--r-md); padding: 0; box-shadow: var(--shadow-sm); overflow: hidden; }
html.page-admin .card > * { margin-left: 18px; margin-right: 18px; }
html.page-admin .card > .card-head { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 45%, var(--card)); }
html.page-admin .card > :first-child:not(.card-head) { margin-top: 18px; }
html.page-admin .card > :last-child { margin-bottom: 18px; }
html.page-admin .card > .card-head + * { margin-top: 16px; }
html.page-admin .card:has(> #docsTable) > * { margin-left: 0; margin-right: 0; }
html.page-admin .kpi { border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: 16px 18px; }
html.page-admin .kpi .l { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
html.page-admin .chip { border-radius: 99px; font-weight: 600; }
html.page-admin .actrow { border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
html.page-admin .welcome-head .eyebrow { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); letter-spacing: .05em; }
html.page-admin .appbar { box-shadow: var(--shadow-sm); }

/* -- shadcn: segmented section switcher (phones and tablets) -- */
html.page-admin .tabs { border-radius: var(--r-md); background: var(--soft); border-color: var(--line); padding: 4px; }
html.page-admin .tab { border-radius: var(--r-sm); font-weight: 600; }
html.page-admin .viewtabs { display: flex; width: 100%; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
html.page-admin .viewtabs::-webkit-scrollbar { display: none; }
html.page-admin .viewtabs .tab { flex: 1 1 auto; white-space: nowrap; justify-content: center; }
html.page-admin .viewtabs .tab::before { display: none; }

/* -- Tabler: sidebar navigation on desktop -- */
@media (min-width: 1024px) {
  html.page-admin .appbar-in { max-width: 1200px; padding: 10px 24px; }
  html.page-admin main:has(> .viewtabs) { max-width: 1200px; padding: 28px 24px 56px; display: grid; grid-template-columns: 232px minmax(0, 1fr); column-gap: 28px; row-gap: 0; align-items: start; }
  html.page-admin main:has(> .viewtabs) > * { grid-column: 2; min-width: 0; }
  html.page-admin main:has(> .viewtabs) > .viewtabs {
    grid-column: 1; grid-row: 1 / span 60; position: sticky; top: 84px; align-self: start;
    display: flex; flex-direction: column; gap: 4px; padding: 10px; margin: 0; overflow: visible;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  }
  html.page-admin .viewtabs .tab { flex: none; justify-content: flex-start; gap: 12px; width: 100%; min-height: 42px; padding: 0 12px; font-size: .95rem; text-align: left; }
  html.page-admin .viewtabs .tab::before {
    display: inline-block; width: 20px; text-align: center; font: 900 .95rem/1 "Font Awesome 7 Free"; opacity: .85;
  }
  html.page-admin .viewtabs .tab[data-view="docs"]::before { content: "\f07b"; }
  html.page-admin .viewtabs .tab[data-view="activity"]::before { content: "\f1da"; }
  html.page-admin .viewtabs .tab[data-view="account"]::before { content: "\f007"; }
  html.page-admin .viewtabs .tab[data-view="users"]::before { content: "\f0c0"; }
  html.page-admin .viewtabs .tab[data-view="stats"]::before { content: "\f080"; }
  html.page-admin .viewtabs .tab[data-view="data"]::before { content: "\f1c0"; }
  html.page-admin .viewtabs .tab[data-view="changelog"]::before { content: "\f46d"; }
  html.page-admin .viewtabs .tab[aria-pressed="true"]::before { opacity: 1; }
}
/* tablets in portrait: the switcher spreads across the full width, a bit roomier */
@media (min-width: 681px) and (max-width: 1023px) {
  html.page-admin main { padding: 24px 24px 48px; max-width: 860px; }
  html.page-admin .appbar-in { max-width: 860px; padding: 10px 24px; }
  html.page-admin .viewtabs .tab { min-height: 44px; font-size: .95rem; }
}
@media (max-width: 680px) {
  html.page-admin .card > * { margin-left: 14px; margin-right: 14px; }
  html.page-admin .card > .card-head { padding: 12px 14px; }
  html.page-admin .panel { padding: 26px 20px; }
}

/* -- landing page: shadcn badge, calmer cards, Tabler-style header -- */
html.page-landing .lp-bar {
  position: sticky; top: 0; z-index: 4; max-width: none; margin: 0; padding: 12px max(20px, calc((100% - 1120px) / 2 + 20px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
html.page-landing .mark { border-radius: var(--r-sm); width: 36px; height: 36px; }
html.page-landing .lp-btn { border-radius: var(--r-sm); box-shadow: var(--shadow-sm); border-width: 1px; transition: filter .15s ease, background-color .15s ease; }@media (hover: hover) { html.page-landing .lp-btn:hover{ filter: brightness(1.12); } }
html.page-landing .lp-btn.ghost { background: var(--card); }@media (hover: hover) { html.page-landing .lp-btn.ghost:hover{ background: var(--soft); filter: none; } }
html.page-landing main { max-width: 1120px; }
html.page-landing .lp-eyebrow { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); letter-spacing: .05em; }
html.page-landing h1 { letter-spacing: -.02em; }
html.page-landing .lp-step { border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }@media (hover: hover) { html.page-landing .lp-step:hover{ border-color: var(--accent); } }
html.page-landing .lp-step span { border-radius: var(--r-sm); }
html.page-landing .lp-honest { border-radius: var(--r-md); }
html.page-landing .lp-dialog, dialog.pp-policy, html.page-admin dialog { border-radius: var(--r-md); }
html.page-landing .lp-dclose { border-radius: var(--r-sm); }
@media (min-width: 1024px) {
  html.page-landing .lp-hero { padding: 80px 0 56px; max-width: 820px; }
  html.page-landing .lp-steps { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  html.page-landing .lp-honest { padding: 26px 28px; }
}
footer.site-footer p.pp-pol-link button { box-shadow: none; background: none; border: 0; min-height: 0; }

/* v2.19.1: touch-screen fixes.
   - No grey flash when a button, link or tab is tapped on iPhone/iPad (the buttons already have their own pressed states).
   - The Privacy Policy and Documentation pop-ups no longer draw an outline around the whole box when tapped or scrolled.
   - Every :hover rule above is now inside @media (hover: hover), so nothing stays highlighted after a tap. */
html.page-admin button, html.page-admin .btn, html.page-admin .tab, html.page-admin summary, html.page-landing a, html.page-landing button,
footer.site-footer button, dialog.pp-policy button, .lp-dialog button, .lp-toc a { -webkit-tap-highlight-color: transparent; }
dialog.pp-policy, dialog.pp-policy:focus, dialog.pp-policy:focus-visible, .pp-pol-body, .pp-pol-body:focus, .pp-pol-body:focus-visible,
html.page-landing .lp-dialog, html.page-landing .lp-dialog:focus, html.page-landing .lp-dialog:focus-visible, html.page-landing .lp-dbody:focus-visible { outline: none; }
dialog.pp-policy .pp-pol-ok:focus:not(:focus-visible), .lp-dialog .lp-dclose:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* v2.19.3: the Documentation X is never auto-focused (focus goes to the text), has no sticky look after a tap, and shows a clear pressed state. */
html.page-landing .lp-dclose { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html.page-landing .lp-dclose:focus:not(:focus-visible) { outline: none; box-shadow: none; background: var(--soft); border-color: var(--line); }
html.page-landing .lp-dclose:active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
html.page-landing .lp-dbody:focus { outline: none; }

/* ==================== v2.20.0: landing page story ====================
   An editorial layout built around PasaPrint's own object: the print pass (ticket). No stock photos, no gradients, no emoji.
   Colours come only from section 1. Hover styles sit inside @media (hover: hover). Motion is switched off for people who ask for less motion. */
html.page-landing main { overflow-x: clip; }
html.page-landing.auth-pending .lp-final-cta { opacity: 0; visibility: hidden; }
html.page-landing button.lp-btn { font: inherit; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* -- hero: copy on the left, the example pass on the right -- */
html.page-landing .lp-hero { max-width: none; display: grid; gap: 40px; align-items: center; padding: 40px 0 28px; }
html.page-landing .lp-hero-copy { max-width: 640px; }
@media (min-width: 960px) {
  html.page-landing .lp-hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; padding: 72px 0 48px; }
}
html.page-landing .lp-hero-art { display: grid; justify-items: center; gap: 14px; padding: 8px 0 14px; filter: drop-shadow(0 18px 28px color-mix(in srgb, var(--ink) 18%, transparent)); }
html.page-landing .tk { position: relative; width: min(100%, 420px); display: grid; grid-template-columns: 64px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 14px; transform: rotate(-1.6deg); animation: tkIn .7s cubic-bezier(.2, .8, .2, 1) both; }
html.page-landing .tk::before, html.page-landing .tk::after { content: ""; position: absolute; left: 55px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
html.page-landing .tk::before { top: -10px; clip-path: inset(50% 0 0 0); }
html.page-landing .tk::after { bottom: -10px; clip-path: inset(0 0 50% 0); }
html.page-landing .tk-stub { display: grid; justify-items: center; align-content: center; gap: 12px; padding: 18px 0; border-right: 2px dashed var(--line); color: var(--ink); }
html.page-landing .tk-bars { width: 26px; height: 78px; opacity: .85; }
html.page-landing .tk-stub span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-mono); font-weight: 700; font-size: .72rem; letter-spacing: .32em; color: var(--muted); }
html.page-landing .tk-main { padding: 20px 22px 20px; }
html.page-landing .tk-label { margin: 0 0 6px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
html.page-landing .tk-title { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
html.page-landing .tk-sub { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
html.page-landing .tk-clock { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 20px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
html.page-landing .tk-clock-l { font-size: .85rem; color: var(--muted); }
html.page-landing .tk-clock b { font-family: var(--font-mono); font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
html.page-landing .tk-track { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
html.page-landing .tk-track i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transform-origin: left center; transition: transform 1s linear; }
html.page-landing .tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
html.page-landing .tk-chips span { padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--card); }
html.page-landing .tk-chips span.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
html.page-landing .tk-note { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
@keyframes tkIn { from { opacity: 0; transform: translateY(22px) rotate(-4deg); } to { opacity: 1; transform: rotate(-1.6deg); } }

/* -- sections -- */
html.page-landing .lp-sec { padding: 56px 0 8px; margin-top: 40px; border-top: 1px solid var(--line); }
html.page-landing .lp-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
html.page-landing .lp-kicker span { padding-right: 12px; border-right: 1px solid var(--line); color: var(--ink); font-weight: 700; }
html.page-landing .lp-h2 { margin: 0 0 16px; max-width: 24ch; font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.08; letter-spacing: -.02em; }
html.page-landing .lp-lead { margin: 0 0 28px; max-width: 62ch; font-size: 1.1rem; color: var(--muted); }
html.page-landing .lp-lead em { color: var(--ink); font-style: normal; font-weight: 700; }
html.reveal-on [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
html.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }

/* -- the file versus the pass -- */
html.page-landing .lp-versus { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--card); }
html.page-landing .lp-vs-col { padding: 22px 22px 14px; }
html.page-landing .lp-vs-col + .lp-vs-col { border-top: 1px solid var(--line); }
html.page-landing .lp-vs-col h3 { margin: 0 0 12px; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
html.page-landing .lp-vs-col ul { list-style: none; margin: 0; padding: 0; }
html.page-landing .lp-vs-col li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent); color: var(--muted); }
html.page-landing .lp-vs-col li:first-child { border-top: 0; }
html.page-landing .lp-vs-col li i { margin-top: 4px; font-size: .85rem; color: var(--bad); }
html.page-landing .lp-vs-col.on { background: var(--soft); }
html.page-landing .lp-vs-col.on h3 { color: var(--ink); }
html.page-landing .lp-vs-col.on li { color: var(--ink); font-weight: 600; }
html.page-landing .lp-vs-col.on li i { color: var(--ok); }
@media (min-width: 760px) {
  html.page-landing .lp-versus { grid-template-columns: 1fr 1fr; }
  html.page-landing .lp-vs-col + .lp-vs-col { border-top: 0; border-left: 1px solid var(--line); }
  html.page-landing .lp-vs-col { padding: 28px 30px 20px; }
}

/* -- practice demo -- */
html.page-landing .lp-demo { display: grid; gap: 22px; padding: 22px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-md); }
@media (min-width: 860px) { html.page-landing .lp-demo { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); padding: 28px; gap: 32px; } }
html.page-landing .lp-demo-form { display: grid; gap: 16px; align-content: start; }
html.page-landing .lp-field { position: relative; }
html.page-landing .lp-field label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 700; }
html.page-landing .lp-field select { width: 100%; min-height: 46px; padding: 0 40px 0 14px; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); appearance: none; -webkit-appearance: none; cursor: pointer; box-shadow: var(--shadow-sm); }
html.page-landing .lp-field::after { content: ""; position: absolute; right: 16px; bottom: 17px; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); pointer-events: none; }
html.page-landing .lp-field select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
html.page-landing .lp-check { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; cursor: pointer; }
html.page-landing .lp-check input { width: 20px; height: 20px; accent-color: var(--accent); }
html.page-landing .lp-demo-form .lp-btn { width: 100%; text-align: center; }
html.page-landing .lp-demo-out { position: relative; min-height: 260px; display: grid; }
html.page-landing .lp-demo-empty { display: grid; place-content: center; justify-items: center; gap: 10px; border: 2px dashed var(--line); border-radius: var(--r-md); color: var(--muted); text-align: center; padding: 24px; }
html.page-landing .lp-demo-empty i { font-size: 1.6rem; }
html.page-landing .lp-demo-empty p { margin: 0; }
html.page-landing .lp-pass { position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
html.page-landing .lp-pass.enter { animation: passIn .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes passIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
html.page-landing .lp-pass-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html.page-landing .lp-pass-doc { font-weight: 800; font-size: 1.15rem; overflow-wrap: anywhere; }
html.page-landing .lp-pass-state { padding: 3px 11px; border-radius: 99px; font-size: .8rem; font-weight: 700; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
html.page-landing .lp-pass-state.active { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
html.page-landing .lp-pass-state.revoked { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
html.page-landing .lp-pass-link { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--soft); font-family: var(--font-mono); font-size: .95rem; overflow-wrap: anywhere; }
html.page-landing .lp-pass-small { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
html.page-landing .lp-pass-clock { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
html.page-landing .lp-pass-clock span { color: var(--muted); font-size: .88rem; }
html.page-landing .lp-pass-clock b { font-family: var(--font-mono); font-size: 2rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; transition: opacity .3s ease; }
html.page-landing .lp-pass.revoked .lp-pass-clock b, html.page-landing .lp-pass.expired .lp-pass-clock b { opacity: .35; text-decoration: line-through; }
html.page-landing .lp-pass-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); }
html.page-landing .lp-pass-acts { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
html.page-landing .lp-pass-acts .lp-btn { padding: 9px 16px; }
html.page-landing .lp-pass-acts .lp-btn:disabled { opacity: .45; cursor: not-allowed; }
html.page-landing .lp-linkbtn { background: none; border: 0; padding: 8px 4px; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.page-landing .lp-stamp { display: none; margin-left: auto; padding: 3px 12px; border: 3px double var(--bad); border-radius: 6px; color: var(--bad); font-weight: 800; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-8deg); pointer-events: none; }
html.page-landing .lp-pass.revoked .lp-stamp { display: inline-block; animation: stampIn .32s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-8deg) scale(1.9); } to { opacity: .92; transform: rotate(-8deg) scale(1); } }

/* -- use cases as an index, not a card grid -- */
html.page-landing .lp-cases { list-style: none; margin: 8px 0 0; padding: 0; border-bottom: 1px solid var(--line); }
html.page-landing .lp-cases li { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); }
html.page-landing .lp-case-tag { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
html.page-landing .lp-cases h3 { margin: 0 0 4px; font-size: 1.2rem; }
html.page-landing .lp-cases p { margin: 0; max-width: 60ch; color: var(--muted); }
@media (min-width: 760px) { html.page-landing .lp-cases li { grid-template-columns: 180px 1fr; gap: 24px; padding: 28px 0; } }

/* -- controls -- */
html.page-landing .lp-ctl { display: grid; margin: 8px 0 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--card); }
html.page-landing .lp-ctl > div { padding: 22px; border-top: 1px solid var(--line); }
html.page-landing .lp-ctl > div:first-child { border-top: 0; }
html.page-landing .lp-ctl dt { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
html.page-landing .lp-ctl dd { margin: 0; color: var(--muted); }
@media (min-width: 760px) {
  html.page-landing .lp-ctl { grid-template-columns: 1fr 1fr; }
  html.page-landing .lp-ctl > div { padding: 28px 30px; }
  html.page-landing .lp-ctl > div:nth-child(2) { border-top: 0; }
  html.page-landing .lp-ctl > div:nth-child(even) { border-left: 1px solid var(--line); }
}

/* -- closing call to action -- */
html.page-landing .lp-honest { margin-top: 56px; }
html.page-landing .lp-final { margin-top: 40px; padding: 36px 24px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-md); }
html.page-landing .lp-final h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.08; letter-spacing: -.02em; }
html.page-landing .lp-final p { margin: 0 0 22px; max-width: 54ch; opacity: .9; }
html.page-landing .lp-final-cta { display: flex; gap: 12px; flex-wrap: wrap; }
html.page-landing .lp-final .lp-btn { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
html.page-landing .lp-final .lp-btn.ghost { background: transparent; color: var(--on-accent); border-color: var(--on-accent); }
@media (min-width: 760px) { html.page-landing .lp-final { padding: 56px 48px; } }
@media (hover: hover) { html.page-landing .lp-final .lp-btn.ghost:hover { background: color-mix(in srgb, var(--on-accent) 16%, transparent); filter: none; } }

@media (prefers-reduced-motion: reduce) {
  html.page-landing .tk { animation: none; }
  html.page-landing .lp-pass.enter { animation: none; }
  html.page-landing .tk-track i { transition: none; }
  html.page-landing .lp-pass.revoked .lp-stamp { animation: none; opacity: .92; }
}

@media (min-width: 960px) { html.page-landing .lp-hero h1 { font-size: clamp(2.1rem, 3.05vw, 2.9rem); } }


/* ---- v2.23.0: Delete User dialog, SuperAdmin Messages tab ---- */
html.page-admin #deleteUserDialog .dlg, html.page-admin #rejectDialog .dlg { display: grid; gap: 6px; }
html.page-admin #deleteUserDialog label, html.page-admin #rejectDialog label { font-weight: 600; margin-top: 8px; }
html.page-admin #deleteUserDialog .lead, html.page-admin #rejectDialog .lead { margin-bottom: 4px; }
html.page-admin #deleteUserDialog .dlg-foot, html.page-admin #rejectDialog .dlg-foot { margin-top: 14px; }
html.page-admin #deleteUserDialog button:disabled { opacity: .5; cursor: not-allowed; }
html.page-admin .msgbadge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px;
  border-radius: 99px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1;
}
html.page-admin .msgbadge[hidden] { display: none; }
html.page-admin .viewtabs .tab[data-view="messages"]::before { content: "\f0e0"; }
html.page-admin .msglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
html.page-admin .msgcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; min-width: 0; }
html.page-admin .msgcard.pending { border-color: var(--bad); }
html.page-admin .msghead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
html.page-admin .msghead strong { overflow-wrap: anywhere; }
html.page-admin .msghead .chip { margin-left: auto; }
html.page-admin .msgwhy, html.page-admin .msgdone { margin: 0; overflow-wrap: anywhere; }
html.page-admin .msgdone { color: var(--muted); font-size: .9rem; }
html.page-admin .msgacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (max-width: 680px) { html.page-admin .msgacts button { flex: 1 1 100%; justify-content: center; min-height: 44px; } }

/* ---- stats: Pasa funnel (v2.25.0) ---- */
html.page-admin .funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
html.page-admin .funnel li { display: grid; grid-template-columns: 110px 1fr 48px 110px; align-items: center; gap: 10px; }
html.page-admin .funnel .fl { font-weight: 600; font-size: .92rem; }
html.page-admin .funnel .fb { display: block; height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
html.page-admin .funnel .fb i { display: block; height: 100%; border-radius: 999px; }
html.page-admin .funnel .fv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
html.page-admin .funnel .fp { color: var(--muted); font-size: .82rem; }
html.page-admin .kpi .s.split { margin-top: 2px; }
@media (max-width: 560px) {
  html.page-admin .funnel li { grid-template-columns: 1fr 44px; row-gap: 4px; }
  html.page-admin .funnel .fb { grid-column: 1 / -1; order: 3; }
  html.page-admin .funnel .fp { grid-column: 1 / -1; order: 4; }
}

/* ---- Data tab: borderless red buttons line up with the text above them (v2.26.1) ---- */
html.page-admin #viewData .btnrow .quiet.dangertext { margin-left: -12px; }
html.page-admin #viewData .btnrow + .note { margin-top: 10px; }
