/* report-ui.css · REPORT lane (27 Nov 2026, WAT). The report dialogs (PDF, partner report, schedule, share) and the Reports tab
   (Scheduled · Shared with me · Definitions), on the admin dialog kit (css/kit/dialog.css: .opt rows, .field, .seg, .chip, .dlg__f).
   Admin tokens only; no new colours. Checkboxes reuse the kit's option row with a square box in place of the dot. */

/* ── Dialog body ── */
#dlg.rp-dlg { width: min(560px, calc(100vw - var(--space-8))); }
#dlg .rp-gap { margin-top: var(--space-5); }
#dlg .rp-field { display: grid; gap: 6px; margin-top: var(--space-5); }
#dlg .rp-field:first-child { margin-top: 0; }
#dlg .rp-field .lbl { margin: 0; }
#dlg .rp-cap { color: var(--color-text-tertiary); font-size: var(--font-size-12); font-weight: var(--font-weight-regular); font-variant-numeric: tabular-nums; }
#dlg .rp-val { margin: 0; color: var(--color-text-primary); font-size: var(--font-size-13); }
#dlg .rp-seg { width: max-content; max-width: 100%; }
#dlg .rp-seg button { height: 32px; }
#dlg .rp-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
#dlg .rp-chips .chip { height: 30px; }
#dlg .rp-chips .chip[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* checkbox rows: the kit's .opt with a square box */
#dlg .rp-ck { grid-template-columns: 16px 1fr; }
#dlg .rp-ck input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
#dlg .rp-ck__box { grid-row: 1 / 3; align-self: start; margin-top: 2px; width: 16px; height: 16px; box-sizing: border-box; display: grid; place-items: center; border: 1px solid var(--color-border-control); border-radius: 4px; background: var(--color-bg-canvas); transition: background-color var(--motion-duration-fast) var(--motion-easing-standard), border-color var(--motion-duration-fast) var(--motion-easing-standard); }
#dlg .rp-ck__box svg { width: 12px; height: 12px; fill: none; stroke: var(--color-text-inverse); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.9); transition: opacity 120ms var(--motion-easing-out), transform 120ms var(--motion-easing-out); }
#dlg .rp-ck input:checked + .rp-ck__box { background: var(--color-bg-inverse); border-color: var(--color-bg-inverse); }
#dlg .rp-ck input:checked + .rp-ck__box svg { opacity: 1; transform: none; }
#dlg .rp-ck input:disabled + .rp-ck__box { opacity: .55; }
#dlg .rp-ck:has(input:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: -2px; }
#dlg .rp-opt--off { cursor: not-allowed; }
#dlg .rp-opt--off .opt__t { color: var(--color-text-tertiary); }
#dlg .rp-always { margin: var(--space-2) 0 0; }
#dlg .rp-people { max-height: 248px; overflow: auto; scrollbar-width: thin; }

/* the "add by name" line and its error */
#dlg .rp-add { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
#dlg .rp-add input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); font: inherit; font-size: var(--font-size-13); color: var(--color-text-primary); background: var(--color-bg-canvas); }
#dlg .rp-add input:focus { outline: none; border-color: var(--color-text-primary); box-shadow: 0 0 0 3px var(--color-alpha-black-8); }
#dlg .rp-add .b { height: 32px; }
#dlg .rp-err { margin: var(--space-2) 0 0; color: var(--color-status-danger-fg); font-size: var(--font-size-12); }

/* notes inside dialogs: late data (amber dot + ink, never amber text), role notes, the prototype line */
#dlg .rp-late { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0 0 var(--space-5); padding: var(--space-3); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-sm); font-size: var(--font-size-12); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); }
#dlg .rp-late .pa-fresh__dot { margin-top: 5px; flex: none; }
#dlg .rp-note, #dlg .rp-warn { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0 0 var(--space-4); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--color-bg-surface); font-size: var(--font-size-12); color: var(--color-text-secondary); }
#dlg .rp-warn { margin: var(--space-3) 0 0; color: var(--color-text-primary); }
#dlg .rp-warn[hidden] { display: none; }
#dlg .rp-note .gi, #dlg .rp-warn .gi { flex: none; margin-top: 1px; }
#dlg .rp-subj { margin: var(--space-5) 0 0; font-size: var(--font-size-12); color: var(--color-text-secondary); }
#dlg .rp-subj b { color: var(--color-text-primary); font-weight: var(--font-weight-medium); }
#dlg .rp-proto { display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-3) 0 0; font-size: var(--font-size-12); color: var(--color-text-tertiary); }
#dlg .rp-proto .gi { flex: none; margin-top: 1px; opacity: .8; }
#dlg .rp-link { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-3) 0 0; border-top: 1px solid var(--color-border-subtle); font-size: var(--font-size-12); color: var(--color-text-secondary); }
#dlg .rp-link > span { display: flex; align-items: flex-start; gap: var(--space-2); }
#dlg .rp-link .gi { flex: none; margin-top: 1px; }
#dlg .rp-link .b { flex: none; }

/* success card art from the illustration library (64px PNG) */
#dlg.pa-ok .pa-ok__art[src$=".png"] { image-rendering: auto; }

/* Reports tab: see the 30 Nov block at the end */
.rp-partial { height: 20px; padding: 0 6px; font-size: var(--font-size-11); background: var(--color-bg-surface); color: var(--color-text-secondary); }

@media (max-width: 560px) {
  #dlg.rp-dlg { width: 100%; }
  #dlg .rp-seg { width: 100%; }
  #dlg .rp-seg button { flex: 1; height: 40px; }
  #dlg .rp-chips .chip { height: 40px; }
  #dlg .rp-add input { font-size: var(--font-size-16); height: 40px; }
  #dlg .rp-add .b { height: 40px; }
  #dlg .rp-link { flex-direction: column; align-items: stretch; }
  #dlg .rp-people { max-height: none; }
}
@media (prefers-reduced-motion: reduce) { #dlg .rp-ck__box, #dlg .rp-ck__box svg, .rp-def { transition: none; } }
/* option lists stack one per row (the kit floats the legend; a long list of checkboxes then wraps beside it) */
#dlg fieldset.opts { display: flex; flex-direction: column; gap: 2px; }
#dlg fieldset.opts > legend.lbl { float: none; width: auto; padding: 0; margin: 0 0 var(--space-2); }
#dlg .rp-ck:has(input:checked) { background: none; }
#dlg .rp-ck:hover { background: var(--color-bg-surface); }
#dlg .rp-people { max-height: 296px; }

/* ── Reports tab, 30 Nov (Mikky: "neat, minimal, easy to use") ──
   One calm list: icon · name over a quiet line · who · formats · ⋯. One hairline between rows, one pane around them. Rows keep one
   column template so everything lines up. Under 640px a row stacks: icon · name and line · ⋯, who and formats under the line. */
.rp-rv { display: grid; gap: var(--space-3); }
.rp-tbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 32px; }
.rp-meta { margin: 0; color: var(--color-text-tertiary); font-size: var(--font-size-12); font-variant-numeric: tabular-nums; }
.rp-meta:empty { display: none; }
.rp-new { gap: 6px; height: 32px; padding: 0 12px 0 10px; transition: transform 160ms var(--motion-easing-out), background-color var(--motion-duration-press) var(--motion-easing-out); }
.rp-new svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rp-new:not([aria-disabled="true"]):active { transform: scale(.97); }
.rp-new[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.rp-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--se-line, var(--color-border-subtle)); border-radius: var(--radius-sm); box-shadow: var(--se-shadow, none); background: var(--color-bg-canvas); }
/* 2 Dec (Mikky: "fill it, it should be full screen"): full content width; name 2 parts, who 1, formats .6, so the columns spread evenly */
.rp-row { display: grid; grid-template-columns: 24px minmax(220px, 2fr) minmax(120px, 1fr) minmax(88px, .6fr) 32px; align-items: center; gap: var(--space-4); min-height: 60px; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4); }
.rp-row + .rp-row { border-top: 1px solid var(--color-border-subtle); }
.rp-ic { display: grid; place-items: center; width: 24px; height: 24px; }
.rp-ic .gi { width: 20px; height: 20px; image-rendering: pixelated; }
.rp-main { display: grid; gap: 2px; min-width: 0; }
.rp-name { overflow: hidden; color: var(--color-text-primary); font-size: var(--font-size-14); font-weight: var(--font-weight-medium); white-space: nowrap; text-overflow: ellipsis; }
.rp-line { overflow: hidden; color: var(--color-text-tertiary); font-size: var(--font-size-12); white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.rp-paused { color: var(--color-text-secondary); font-weight: var(--font-weight-medium); }
.rp-row.is-paused .rp-name, .rp-row.is-paused .rp-ic { opacity: .55; }
.rp-a { text-decoration: none; }
.rp-a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rp-a:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 2px; border-radius: 2px; }

/* who: small initials, overlapped, you first; names in the tip */
.rp-to { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.rp-av { display: inline-flex; align-items: center; padding: 2px; border-radius: var(--radius-pill); outline: none; }
.rp-av:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 1px; }
.rp-av i { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: -5px; border: 2px solid var(--color-bg-canvas); border-radius: 50%; background: var(--color-bg-surface); color: var(--color-text-secondary); font-size: 10px; font-style: normal; font-weight: var(--font-weight-semibold); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rp-av i:first-child { margin-left: 0; }
.rp-av i.is-me { background: var(--color-bg-inverse); color: var(--color-text-inverse); }
.rp-av i.is-more { background: var(--color-bg-canvas); box-shadow: inset 0 0 0 1px var(--color-border-default); }
.rp-from { overflow: hidden; color: var(--color-text-secondary); font-size: var(--font-size-13); white-space: nowrap; text-overflow: ellipsis; }
.rp-when { color: var(--color-text-tertiary); font-size: var(--font-size-12); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }

/* formats: quiet marks */
.rp-fmt { display: flex; gap: var(--space-2); }
.rp-fmt i { color: var(--color-text-tertiary); font-size: var(--font-size-11); font-style: normal; font-weight: var(--font-weight-semibold); letter-spacing: .02em; }
.rp-more { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.rp-more svg { width: 16px; height: 16px; fill: currentColor; }

/* shared with me: icon · title over the note · from · when */
.rp-row--sh { grid-template-columns: 24px minmax(220px, 2fr) minmax(120px, 1fr) minmax(88px, .6fr) 32px; }
.rp-row--sh > .rp-when { text-align: left; }

/* activity: a quiet section under the list */
.rp-act { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.rp-h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-family: var(--font-family-display); font-size: var(--font-size-14); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); }
.rp-i { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--color-text-tertiary); font-size: var(--font-size-12); cursor: help; }
.rp-i:hover { color: var(--color-text-primary); }
.rp-i:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 1px; }
.rp-quiet { margin: 0; color: var(--color-text-tertiary); font-size: var(--font-size-13); }
.rp-row--act { grid-template-columns: 24px minmax(0, 1fr) auto; min-height: 52px; }
.rp-row--act .rp-name { font-size: var(--font-size-13); }
.rp-row--act .rp-ic .gi { width: 16px; height: 16px; opacity: .8; }
.rp-end:empty { display: none; }

/* empty states: one icon, one short line */
.rp-empty { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-4); border: 1px dashed var(--color-border-default); border-radius: var(--radius-sm); color: var(--color-text-secondary); font-size: var(--font-size-13); }
.rp-empty p { margin: 0; }
.rp-empty[hidden] { display: none; }
.rp-empty .gi { width: 20px; height: 20px; }

/* Definitions: search and a group index on the left (sticky), the dictionary on the right */
.rp-defs { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.rp-defside { position: sticky; top: var(--space-4); display: grid; gap: var(--space-3); }
.rp-search { display: flex; align-items: center; gap: var(--space-2); height: 36px; padding: 0 var(--space-3); border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-canvas); }
.rp-search:focus-within { border-color: var(--color-text-primary); box-shadow: 0 0 0 3px var(--color-alpha-black-8); }
.rp-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--color-text-tertiary); stroke-width: 1.75; stroke-linecap: round; }
.rp-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: var(--font-size-13); color: var(--color-text-primary); }
.rp-idx { display: grid; gap: 1px; margin: 0 calc(-1 * var(--space-2)); }
.rp-idx button { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); height: 30px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-text-secondary); font: inherit; font-size: var(--font-size-13); text-align: left; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.rp-idx button[hidden] { display: none; }
.rp-idx button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rp-idx button b { color: var(--color-text-tertiary); font-size: var(--font-size-12); font-weight: var(--font-weight-regular); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .rp-idx button:hover { background: var(--color-bg-surface); color: var(--color-text-primary); } }
.rp-idx button:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: -2px; }
.rp-defmain { display: grid; gap: var(--space-6); min-width: 0; }
.rp-defg { display: grid; scroll-margin-top: var(--space-4); }
.rp-defg[hidden] { display: none; }
.rp-defg > .rp-h2 { padding-bottom: var(--space-2); font-size: var(--font-size-16); }
.rp-def { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-1) var(--space-6); padding: var(--space-4) 0; border-top: 1px solid var(--color-border-subtle); scroll-margin-top: 96px; outline: none; transition: background-color var(--motion-duration-base) var(--motion-easing-standard); }
.rp-def[hidden] { display: none; }
.rp-def:focus-visible { box-shadow: inset 2px 0 0 var(--color-text-primary); }
.rp-def.is-on { margin: 0 calc(-1 * var(--space-3)); padding-left: var(--space-3); padding-right: var(--space-3); border-radius: var(--radius-sm); background: var(--color-bg-brand); }
.rp-def header { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.rp-def h3 { margin: 0; font-size: var(--font-size-14); font-weight: var(--font-weight-semibold); }
.rp-def code { font-size: var(--font-size-12); color: var(--color-text-tertiary); overflow-wrap: anywhere; }
.rp-def__b { min-width: 0; }
.rp-def__d { margin: 0 0 var(--space-2); font-size: var(--font-size-14); color: var(--color-text-primary); }
.rp-def dl { margin: 0; display: grid; gap: 4px; font-size: var(--font-size-12); }
.rp-def dl > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--space-3); }
.rp-def dt { color: var(--color-text-tertiary); }
.rp-def dd { margin: 0; color: var(--color-text-secondary); overflow-wrap: anywhere; }
.rp-dim { color: var(--color-text-tertiary); }

@media (max-width: 1100px) {
  .rp-defs { grid-template-columns: 1fr; gap: var(--space-4); }
  .rp-defside { position: static; }
  .rp-idx { display: none; }
  .rp-search { max-width: 420px; }
}
@media (max-width: 760px) {
  .rp-def { grid-template-columns: 1fr; }
  .rp-def header { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
}
@media (max-width: 640px) {
  .rp-row { grid-template-columns: 24px minmax(0, 1fr) 32px; grid-template-areas: "ic main more" "ic meta more"; column-gap: var(--space-3); row-gap: 6px; padding: var(--space-3); }
  .rp-row > .rp-ic { grid-area: ic; align-self: start; }
  .rp-row > .rp-main { grid-area: main; }
  .rp-row > .rp-more { grid-area: more; align-self: start; }
  .rp-list--sc .rp-row > .rp-to { grid-area: meta; }
  .rp-list--sc .rp-row > .rp-fmt { grid-area: meta; justify-self: end; align-self: center; }
  .rp-row--sh { grid-template-areas: "ic main main" "ic meta when"; }
  .rp-row--sh > .rp-to { grid-area: meta; }
  .rp-row--sh > .rp-when { grid-area: when; align-self: center; text-align: right; }
  .rp-row--act { grid-template-areas: "ic main end"; }
  .rp-row--act > .rp-end { grid-area: end; }
  .rp-line { white-space: normal; }
  .rp-def dl > div { grid-template-columns: 76px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .rp-new, .rp-idx button { transition: none; } }
