/* Pasqyra · monitoring (#/matja, #/matja/rryma|uji|mbetjet) and the data page (#/te-dhenat).
   Built by app/js/pq/monitor.js and app/js/pq/data.js. Layout and the few things that exist only on these screens;
   every colour is a token of pq.css. Load after css/pq.css. Rules that restyle a heading, a link, a paragraph or a
   button are written `.pq .pq-mon-…` because the resets of pq.css are `.pq h3`, `.pq a`, `.pq p`, `.pq .pq-btn`. */

/* ───────────────────────────── both screens ───────────────────────────── */
/* The right column of these pages is as long as the left one: it is not pinned while the page scrolls. */
.pq .pq-mon-split > .pq-aside, .pq .pq-data-split > .pq-aside { position: static; }

/* ───────────────────────────── the month card ("Numrat e muajit") ───────────────────────────── */
.pq .pq-mon-monthcard h3 { font-size: 20px; letter-spacing: -.01em; }
.pq-mon-month { gap: 14px; }
.pq-mon-monthrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
.pq-mon-have { align-self: center; }
.pq-mon-trio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pq-mon-area { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; min-width: 0; padding: 12px; border-radius: var(--pq-r-s); background: var(--pq-ac-soft); }
.pq .pq-mon-area-h { font-size: 15px; font-weight: 700; color: var(--pq-ac-ink); }
/* two numbers side by side, also on a 375 px phone: the inputs give up some padding so eight characters fit */
.pq-mon-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
.pq .pq-mon-pair .pq-in input { padding: 0 4px 0 10px; font-size: 17px; }
.pq-mon-pair .pq-unit { padding-right: 10px; font-size: 13px; }
.pq-mon-pair .pq-label { font-size: 13.5px; }

/* ───────────────────────────── charts and verdicts ───────────────────────────── */
.pq-mon-charts { align-items: stretch; }
.pq-mon-chart > .pq-card-h { align-items: center; }
.pq .pq-mon-more-a { flex: none; display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
.pq .pq-mon-last { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 22px; line-height: 1.2; }
.pq-mon-last .pq-muted { font-size: 14px; }
.pq .pq-mon-verdict { font-size: 15px; line-height: 1.45; }
.pq-mon-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; line-height: 1.45; }
.pq-mon-notes .is-alert { color: var(--pq-red-t); }

/* ───────────────────────────── forms of the logs ───────────────────────────── */
.pq .pq-mon-formcard.is-edit { box-shadow: 0 0 0 2px var(--pq-ac-fill), var(--pq-shadow); }
.pq-mon-form { scroll-margin-top: 96px; }
.pq-mon-more { min-width: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--pq-line); }
.pq-mon-more > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.pq-mon-more > summary::-webkit-details-marker { display: none; }
.pq-mon-more > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: -4px 2px 0 auto; border-right: 2px solid var(--pq-fg); border-bottom: 2px solid var(--pq-fg); transform: rotate(45deg); transition: transform .15s; }
.pq-mon-more[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.pq-mon-more > .pq-form { padding: 4px 14px 14px; }
.pq-mon-needs { margin-top: 4px; }

/* ───────────────────────────── tables of the logs ───────────────────────────── */
.pq-mon-log, .pq-mon-check, .pq-mon-samples { scroll-margin-top: 96px; }
.pq-mon-scroll { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pq-mon-table caption { font-size: 13.5px; font-weight: 500; color: var(--pq-fg-2); }
.pq-mon-table .pq-chip { margin-left: 4px; }
.pq-mon-table small { display: block; color: var(--pq-fg-2); }
/* Edit and delete stand side by side, never one above the other: the last cell of a log table is as narrow as its
   content (width: 1%), and a flex box that may wrap is only as wide as its widest item. So this one does not wrap. */
.pq-mon-acts { display: inline-flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 4px; }
.pq .pq-mon-acts .pq-btn { min-height: 44px; }
.pq .pq-mon-acts .pq-btn-icon { width: 44px; }
.pq-mon-confirm { gap: 8px; font-size: 14px; font-weight: 600; }
@media (max-width: 559px) {
  .pq-mon-rows td:last-child { justify-content: flex-end; }
  /* the question "delete it?" with its two buttons may need a second line on a phone */
  .pq-mon-confirm { flex-wrap: wrap; }
  .pq-mon-table td small { text-align: right; }
}
@media (min-width: 560px) {
  .pq-mon-monthrow { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
  .pq-mon-table td.pq-num, .pq-mon-table th.pq-num { white-space: nowrap; overflow-wrap: normal; }
  .pq-mon-rows td:last-child { width: 1%; white-space: nowrap; text-align: right; }
}

/* ───────────────────────────── lab samples ───────────────────────────── */
.pq-mon-sample { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.pq-mon-sample + .pq-mon-sample { padding-top: 16px; border-top: 1px solid var(--pq-line); }

/* ───────────────────────────── measured against expected ───────────────────────────── */
.pq-mon-item > .pq-card-h { flex-wrap: wrap; }
.pq-mon-item .pq-line dd { max-width: 58%; }
.pq .pq-mon-started { align-items: flex-start; }
.pq .pq-mon-started a { color: inherit; text-decoration: none; }
.pq .pq-mon-started a:hover { text-decoration: underline; }
.pq-mon-startedcard .pq-item-v { font-size: 15px; }

/* ───────────────────────────── the legal calendar ───────────────────────────── */
.pq .pq-mon-cal-row { align-items: flex-start; }
.pq-mon-cal-row .pq-item-b { gap: 4px; }
.pq-mon-cal-row .pq-chips { align-items: center; margin-top: 2px; }
.pq-mon-date { width: 62px; }
.pq-mon-src { font-weight: 600; }
.pq-mon-cal .pq-help { margin-top: 4px; }

/* ───────────────────────────── the data page ───────────────────────────── */
.pq-data-where p + p { margin-top: 8px; }
.pq .pq-data-holds { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--pq-line); font-size: 14.5px; line-height: 1.5; }
.pq-data-saves { font-size: 13.5px; }
.pq-data-group .pq-form, .pq-data-answers .pq-form { align-items: start; }
.pq-data-needs .pq-form + .pq-list, .pq-data-links { margin-top: 8px; }
.pq-data-example .pq-banner .pq-actions { width: 100%; }
.pq-data-backup .pq-help { margin-top: 8px; }
.pq .pq-data-file { position: relative; justify-self: start; cursor: pointer; }
.pq-data-file:focus-within { outline: 3px solid var(--pq-focus); outline-offset: 2px; }
.pq-data-restore .pq-line { align-items: flex-start; }
.pq-data-restore .pq-line dd { max-width: 68%; }
.pq-data-sum { font-size: 14.5px; overflow-wrap: anywhere; }
.pq .pq-data-wipe h3 { color: var(--pq-red-t); }

/* ───────────────────────────── laptop (≥ 900 px) ───────────────────────────── */
@media (min-width: 900px) {
  .pq-mon-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pq-mon-area { padding: 14px; }
}

@media print {
  .pq-mon-formcard, .pq-mon-monthcard, .pq-mon-acts, .pq-data-backup, .pq-data-restore, .pq-data-wipe, .pq-data-example { display: none !important; }
  .pq-mon-scroll { overflow: visible; }
}
