/* People & access → Invite people (#people, people.js): the app's own tokens (app.css), so light and dark follow the
   theme. Each status is a word in a pill (never color alone); everything stacks to one column on a phone (320 px). */
.ipform, .iplist { max-width: 860px; }
.ipform h2, .iplist h2 { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
#ip-about { max-width: 780px; }
#ip-about .ipurl { color: var(--ink); overflow-wrap: anywhere; }

.ipnotice { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; font-size: 14px; max-width: 860px; overflow-wrap: anywhere; border: 1px solid var(--line); background: var(--surface); }
.ipnotice.warn { background: var(--warn-soft); border-color: var(--warn); }
.ipnotice.info { background: var(--accent-soft); border-color: var(--accent); }

#ip-form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.iprows { display: grid; gap: 10px; }
.iprow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 4px 12px; align-items: end; min-width: 0; }
.ipfield { display: grid; gap: 4px; min-width: 0; }
.ipfield label, .ipnote label { font-size: 13px; font-weight: 600; }
.ipfield input, .ipnote textarea, .ippaste textarea { font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
.ipfield input[aria-invalid="true"] { border-color: var(--warn) !important; box-shadow: 0 0 0 1px var(--warn); }
.iprm { align-self: end; padding: 9px 6px; }
.iprow .iphint, .iprow .iprerr { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.iprow .iphint { color: var(--muted); }
.iprow .iprerr:empty { display: none; }
.ipmore { margin-top: -4px; }
.ippaste { font-size: 14px; }
.ippaste summary { cursor: pointer; font-weight: 600; color: var(--accent); width: fit-content; padding: 4px 0; }
.ippaste[open] { display: grid; gap: 8px; }
.ippaste[open] summary { margin-bottom: 2px; }
.ippaste label { font-size: 13.5px; }
.ippaste .err:empty { display: none; }

.iprole { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.iprole legend { font-size: 13px; font-weight: 700; padding: 0; margin-bottom: 6px; }
.iprole label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; min-width: 0; }
.iprole label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.iprole input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; }
.iprole span { display: grid; gap: 2px; min-width: 0; }
.iprole small { color: var(--muted); font-size: 13px; }
@media (min-width: 640px) { .iprole { grid-template-columns: 1fr 1fr; } .iprole legend { grid-column: 1 / -1; } }
.ipnote { display: grid; gap: 4px; }
.ipnote p { margin: 0; font-size: 13px; }
#ip-err:empty { display: none; }

.ipresult { margin-top: 14px; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px; background: var(--surface); }
.ipresult:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.ipresult h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.ipresult .ipbad { color: var(--warn); }
.ipres { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.ipres li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 6px; overflow-wrap: anywhere; }
.ipres .iplinkbox { grid-column: 2; margin-top: 6px; }
.ipmark { font-weight: 800; text-align: center; width: 20px; height: 20px; line-height: 20px; border-radius: 50%; font-size: 12px; }
.ipres .ipr-ok .ipmark { background: var(--ok-soft); color: var(--k-pass-ink); }
.ipres .ipr-note .ipmark { background: var(--accent-soft); color: var(--accent); font-style: italic; }
.ipres .ipr-bad .ipmark { background: var(--warn-soft); color: var(--warn); }
.ipnext { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.ipnext b { color: var(--ink); }
.iplinkbox { padding: 10px 12px; }
.iplinkbox code { font-size: 13px; letter-spacing: 0; overflow-wrap: anywhere; }

.iplist { margin-top: 26px; }
.iplist header p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.ipfilter { flex-wrap: wrap; margin-bottom: 12px; max-width: 100%; }
.ipfilter .ipn { font-variant-numeric: tabular-nums; font-weight: 400; }
.ippeople { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ipp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.ipp.st-invited { border-left-color: var(--accent); }
.ipp.st-expired { border-left-color: var(--k-one, #c77800); }
.ipp.st-active { border-left-color: var(--k-pass, #00a35e); }
.ipp.st-access_off { border-left-style: dashed; background: var(--bg); }
.ippwho { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-width: 0; }
.ippname { font-size: 15.5px; font-weight: 700; margin: 0; }
.ippname:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ippmail { font-size: 13px; color: var(--muted); flex-basis: 100%; }
.iprolechip, .ipyou { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--bg); }
.ipyou { border-style: dashed; }
.ippstat { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; min-width: 0; }
.ipst { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.ipst.st-invited { color: var(--accent); background: var(--accent-soft); }
.ipst.st-expired { color: var(--k-one-ink, #8a5300); background: var(--support-soft); }
.ipst.st-active { color: var(--k-pass-ink, #0b6b3d); background: var(--ok-soft); }
.ipst.st-access_off { color: var(--muted); background: var(--bg); border-style: dashed; }
.ipst.st-not_invited { color: var(--ink); background: var(--bg); border-color: var(--line); }
.ippwhen { color: var(--muted); min-width: 0; }
.ippnote { flex-basis: 100%; color: var(--ink); font-style: italic; }
.ippact { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-content: flex-start; max-width: 300px; }
.ipperr, .ipplink { grid-column: 1 / -1; margin: 0; }
.ipperr:empty, .ipplink:empty { display: none; }
.ipplink p { margin: 6px 0 0; font-size: 13px; }
.ipempty { padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; }

/* Settings → People & access: the way to this page */
.setinvite { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 0 0 14px; }

/* The confirm dialogs (revoke, role): the app's dialog with a checkbox for the explicit choice. */
dialog.ipdlg { max-width: min(480px, calc(100vw - 32px)); }
dialog.ipdlg h2 { margin: 0 0 10px; overflow-wrap: anywhere; }
dialog.ipdlg p { margin: 0 0 8px; font-size: 14px; }
.ipdcheck { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); font-size: 14px; cursor: pointer; }
.ipdcheck input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; }
.btn.danger { background: var(--tone-red, #b4233c); border-color: var(--tone-red, #b4233c); color: #fff; }
:root[data-theme="dark"] .btn.danger { color: #1d0b10; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.danger { color: #1d0b10; } }

@media (max-width: 640px) {
  #ip-form { padding: 14px; }
  .iprow { grid-template-columns: minmax(0, 1fr); }
  .iprm { justify-self: start; padding: 2px 0; }
  .ipp { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .ippact { grid-column: 1; grid-row: auto; justify-content: flex-start; max-width: none; }
}
