/* V1.44 (Sunday build Theme 3): Administration > Access, the employees' matrix (am-: the directory box, the checkmarks (V1.50;
   the User / Admin toggles before), the Administrator toggle, the section switches, the rename, the ONE Save bar; Client\Apps\Admin\AccessPage.razor, which keeps the ac- rules of
   app.css for the table itself), and the prospects' visits (pv-: the notice banner of a prospect's first visit,
   Client\Shared\VisitRecorder.razor; the visit page of a code, Client\Apps\Demo\ProspectVisitPage.razor). Only the theme's
   colour tokens (app.css :root and html[data-theme="dark"]), so light and dark both work. */

/* ---- The directory ---- */
.am-directory { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0; padding: 10px 14px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--panel-2); }
.am-directory-off { border-left-color: var(--chip); }
.am-directory-icon { color: var(--accent); }
.am-directory-body { display: flex; flex: 1 1 320px; flex-direction: column; gap: 3px; min-width: 0; font-size: 0.88rem; }
.am-skips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.am-skip { padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--chip-text); font-size: 0.76rem; }

/* ---- The ONE Save ---- */
.am-savebar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.am-savebar-on { border-color: var(--brand-gold); background: var(--note-soft); }

/* ---- The matrix: toggles, switches, the changes not saved ---- */
/* V1.50 (the owner: "I just want a matrix with checkmarks"): ONE checkmark per person per app (am-check): on = uses AND
   administers; am-check-half = a row saved before V1.50 that only uses the app (outlined, dashed: not administrator yet); off
   = neither. Also the Assistant checkmark (My tasks' assistant reads their email and Teams); am-check-warn: checked, but the
   assistant does not read them (turned off, or without Tasks). */
.am-check { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 2px solid var(--border); border-radius: 6px; background: var(--btn); color: transparent; cursor: pointer; }
.am-check .mud-icon-root { font-size: 1.15rem; }
.am-check:hover:not(:disabled) { border-color: var(--accent); }
.am-check.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.am-check-half { border-style: dashed; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.am-check-warn.on { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.am-check:disabled { cursor: default; opacity: 0.55; }
.am-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.am-tg { min-width: 54px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--btn); color: var(--muted); font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.am-tg:hover:not(:disabled) { border-color: var(--accent); }
.am-tg.on { border-color: var(--os-accent-fill); background: var(--os-accent-fill); color: var(--os-on-accent-fill); }
.am-tg:disabled { cursor: default; opacity: 0.55; }
.am-tg:focus-visible, .am-switch:focus-visible, .am-rename:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.am-switch { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--chip); color: var(--muted); font: inherit; font-size: 0.76rem; font-weight: 700; cursor: pointer; }
.am-switch-knob { width: 16px; height: 16px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.am-switch.on { flex-direction: row-reverse; padding: 2px 2px 2px 8px; border-color: var(--os-accent-fill); background: var(--os-accent-fill); color: var(--os-on-accent-fill); }
.am-switch.on .am-switch-knob { background: var(--os-on-accent-fill); }   /* the knob on the gold */
.am-switch:disabled { cursor: default; opacity: 0.55; }
.am-changed { box-shadow: 0 0 0 2px var(--brand-gold); }
.am-matrix th.am-col-changed { background: var(--note-soft); }
.am-badge-warn { background: var(--warn-soft); color: var(--warn); }
.am-renamed { color: var(--accent-strong); font-style: italic; }
.am-rename { display: inline-flex; vertical-align: middle; margin-left: 2px; padding: 1px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.am-rename:hover { background: var(--accent-soft); color: var(--accent); }
.am-rename .mud-icon-root { font-size: 0.95rem; }
.am-name-input { width: 100%; padding: 3px 6px; border: 1px solid var(--accent); border-radius: 6px; background: var(--field); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 700; }

/* ---- The notice of a prospect's first visit (like a cookie banner) ---- */
.pv-notice { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 1400; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px;
    max-width: 720px; margin: 0 auto; padding: 12px 16px; border: 1px solid var(--border); border-top: 4px solid var(--brand-gold); border-radius: var(--radius);
    background: var(--panel); color: var(--text); box-shadow: var(--shadow); font-size: 0.92rem; }
.pv-notice-icon { color: var(--accent); }
.pv-notice-text { flex: 1 1 260px; }
.pv-notice-text a { margin-left: 4px; color: var(--accent); font-weight: 700; }
.pv-notice-ok { min-width: 72px; }

/* ---- The visit page ---- */
.pv-page { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pv-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--accent); font-size: 0.85rem; font-weight: 700; text-decoration: none; }
.pv-back:hover { text-decoration: underline; }
.pv-person-link { color: inherit; text-decoration: none; }
.pv-person-link:hover { color: var(--accent); text-decoration: underline; }
.pv-who { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.pv-eyebrow { color: var(--muted); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; }
.pv-name { margin: 2px 0 0; font-size: 1.4rem; font-weight: 900; }
.pv-org { color: var(--muted); font-size: 0.9rem; }
.pv-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 0.86rem; }
.pv-facts dt { color: var(--muted); font-weight: 700; }
.pv-facts dd { margin: 0; }
.pv-device { display: inline-block; margin: 0 4px 2px 0; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--chip-text); font-size: 0.76rem; }
.pv-device.pv-forgotten { text-decoration: line-through; opacity: 0.6; }
.pv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pv-tiles .kpi .value { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.pv-tiles .kpi .value.pv-date { font-size: 1.05rem; }
.pv-idle { color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.pv-meter { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--chip); }
.pv-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.panel h3.pv-h { display: flex; align-items: center; gap: 6px; margin: 0; }
.pv-summary-text { margin: 6px 0; padding: 10px 14px; border-left: 4px solid var(--brand-gold); border-radius: 8px; background: var(--panel-2); font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; }
.pv-stale { color: var(--warn); font-weight: 700; }
.pv-bar-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr auto; align-items: center; gap: 10px; padding: 4px 0; font-size: 0.86rem; }
.pv-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-bar { display: flex; height: 12px; overflow: hidden; border-radius: 999px; background: var(--chip); }
.pv-bar-active { background: var(--accent); }
.pv-bar-idle { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pv-bar-value { min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.pv-key { display: inline-block; width: 10px; height: 10px; margin: 0 2px 0 8px; border-radius: 3px; vertical-align: middle; }
.pv-key-active { background: var(--accent); }
.pv-key-idle { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pv-session { margin-top: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.pv-session > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; cursor: pointer; font-size: 0.88rem; }
.pv-session[open] > summary { border-bottom: 1px solid var(--rule); background: var(--panel-2); }
.pv-timeline { margin: 0; padding: 6px 12px 10px; list-style: none; }
.pv-item { display: grid; grid-template-columns: 44px 22px 1fr auto; align-items: baseline; gap: 6px; padding: 4px 0; border-bottom: 1px dashed var(--rule); font-size: 0.86rem; }
.pv-item:last-child { border-bottom: 0; }
.pv-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.pv-item-icon { color: var(--accent); }
.pv-item-text { min-width: 0; overflow-wrap: anywhere; }
.pv-item-text code { color: var(--muted); font-size: 0.78rem; }
.pv-item-meta { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.pv-kind { color: var(--accent-strong); font-weight: 700; }
.pv-item.pv-question .pv-item-icon, .pv-item.pv-download .pv-item-icon { color: var(--brand-gold); }

@media (max-width: 600px) {
    .pv-item { grid-template-columns: 40px 20px 1fr; }
    .pv-item-meta { grid-column: 3; }
    .pv-bar-row { grid-template-columns: 1fr auto; }
    .pv-bar { grid-column: 1 / -1; }
    .pv-notice { right: 8px; bottom: 8px; left: 8px; }
}
