/* rx-system.css - System Management: the header, the list on the left and the selected record on the right. Phones: list, then record. */
:root { --ux-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23f6f6f7' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ux { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.ux__msg { padding: 28px 8px; text-align: center; font-size: 14px; }
.ux-btn {
  height: 42px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--ctl-line); background: var(--ctl); color: var(--ink);
  font: 400 13.5px var(--font); white-space: nowrap; transition: border-color .15s, box-shadow .15s;
}
.ux-btn:hover, .ux-btn:focus-visible { border-color: var(--line-hover); box-shadow: var(--glow-hover); outline: none; }
.ux-btn--ok { background: var(--ac); border-color: var(--ac); color: #fff; font-weight: 500; box-shadow: 0 6px 16px rgba(30,30,32,.22); }
.ux-btn--ok:hover, .ux-btn--ok:focus-visible { background: var(--ac-hover); border-color: var(--ac-hover); box-shadow: 0 6px 16px rgba(30,30,32,.22); }
.ux-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.ux-in {
  width: 100%; min-width: 0; height: 42px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--ctl-line); background: var(--field); color: var(--ink); font: 400 14px var(--font);
}
.ux-in::placeholder { color: var(--placeholder); }
.ux-in:focus { outline: none; border-color: var(--line-hover); }
.ux-in.is-bad { border-color: var(--bad); }
/* read-only: plain and easy to read, without looking like a box to type in */
.ux-in:disabled { opacity: 1; background: transparent; border-color: transparent; padding-left: 0; color: var(--ink); -webkit-text-fill-color: var(--ink); appearance: none; -webkit-appearance: none; }
.ux-count { font-size: 12.5px; white-space: nowrap; }

/* the same header on every section */
.ux-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ux-tools__search { flex: 1 1 200px; width: auto; }
.ux-tools__pick { flex: 0 1 130px; width: auto; cursor: pointer; }
.ux-tools__add { margin-left: auto; }

/* list */
.ux-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ux-rows { display: flex; flex-direction: column; gap: 6px; }
.ux-row {
  flex: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 18px; cursor: pointer; text-align: left;
  border: 1px solid transparent; background: transparent; color: var(--ink); font-family: var(--font);
  transition: border-color .15s, background .15s;
}
.ux-row:hover, .ux-row:focus-visible { border-color: var(--line-hover); outline: none; }
.ux-row[aria-current="true"] { background: var(--ac); border-color: var(--ac); color: #fff; }
.ux-row[aria-current="true"] .ux-chip { border-color: rgba(255,255,255,.45); }
.ux-row[aria-current="true"] .ux-av { background: rgba(0,0,0,.34); color: #fff; }
.ux-row.is-off { opacity: .55; }
.ux-av {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 400; color: var(--ink); background: var(--tint-2); border: 1px solid var(--line);
}
.ux-row__t { flex: 1; min-width: 0; }
.ux-row b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-row small { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux-chip { flex: none; max-width: 110px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* selected record */
.ux-detail { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ux-card { flex: none; padding: 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); }
.ux-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.ux-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ux-bar h3 { flex: 1 1 140px; min-width: 0; margin: 0; font-size: 20px; font-weight: 300; letter-spacing: -.01em; overflow-wrap: anywhere; }
/* the name, Back and Save stay in view while the form scrolls */
.ux-detail > .ux-bar { position: sticky; top: 24px; z-index: 6; background: var(--solid-2); box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .6); }
.ux-back { display: none; }
.ux-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ux-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ux-f label { font-size: 12px; font-weight: 500; }
/* a field you type in to narrow its list */
.ux-pick { position: relative; }
.ux-card--over { position: relative; z-index: 7; }
.ux-pick__in:not(:disabled), select.ux-in { padding-right: 34px; background-image: var(--ux-chevron); background-repeat: no-repeat; background-position: right 12px center; }
.ux-pick__list { position: absolute; top: 100%; left: 0; right: 0; z-index: 8; margin-top: 6px; max-height: 300px; overflow-y: auto; padding: 0 6px 8px; border-radius: 16px; border: 1px solid var(--line-hover); background: var(--solid); color: var(--ink); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
.ux-pick__cat { position: sticky; top: 0; z-index: 1; margin: 0 -6px; padding: 10px 14px 8px; border-bottom: 1px solid var(--line); background: var(--solid-2); font-size: 13.5px; font-weight: 500; }
.ux-pick__sub { padding: 10px 8px 4px; font-size: 11.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.ux-pick__opt { margin-top: 1px; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 400; cursor: pointer; }
.ux-pick__opt:hover { background: var(--tint-2); }
.ux-pick__opt.is-on, .ux-pick__opt[aria-selected="true"] { background: var(--ac); color: #fff; }
.ux-pick__none { margin: 0; padding: 14px 8px 6px; font-size: 14px; }
/* other dropdowns: same arrow, font and colours */
select.ux-in { -webkit-appearance: none; appearance: none; cursor: pointer; }
select.ux-in option { background: var(--solid); color: var(--ink); font: 400 14px var(--font); }
.ux-note { margin: 0; font-size: 12.5px; }
.ux-err { margin: 10px 0 0; font-size: 13px; color: var(--bad); }
.ux-err:empty { display: none; }
.ux-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; font-size: 14px; font-weight: 500; }
.ux-pin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ux-pin .ux-note { flex: 1 1 160px; }
.ux-people { display: flex; flex-direction: column; gap: 6px; }
.ux-person { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.ux-person.is-off { opacity: .55; }

/* switch */
.ux-sw { position: relative; flex: none; display: inline-block; width: 38px; height: 22px; }
.ux-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ux-sw i {
  position: absolute; inset: 0; border-radius: 999px; border: 1px solid var(--line-hover); background: var(--tint); pointer-events: none; transition: background .15s;
}
.ux-sw i::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s;
}
.ux-sw input:checked + i { background: var(--ac); border-color: var(--ac); }
.ux-sw input:checked + i::after { transform: translateX(16px); }
.ux-sw input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.ux-sw input:disabled { cursor: not-allowed; }
.ux-sw input:disabled + i { opacity: .45; }

/* permissions, one block per module with its sections below */
.ux-mods { display: flex; flex-direction: column; gap: 8px; }
.ux-mod { border-radius: 18px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.ux-mod__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; font-size: 14px; font-weight: 500; }
.ux-grid { display: grid; grid-template-columns: minmax(70px, 1fr) repeat(5, 46px); align-items: center; gap: 0 2px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.ux-grid--h { font-size: 11px; font-weight: 500; text-align: center; padding: 6px 12px; }
.ux-grid--h span:first-child { text-align: left; }
.ux-cell { display: flex; justify-content: center; align-items: center; min-height: 28px; }
.ux-cell input { width: 18px; height: 18px; margin: 0; accent-color: var(--ac); cursor: pointer; }
.ux-cell input:disabled { cursor: not-allowed; }
.ux-dash { opacity: .35; }

/* Security */
.sec { display: flex; flex-direction: column; gap: 12px; }
.sec-list { list-style: none; margin: 0 0 12px; padding: 0; }
.sec-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.sec-list b { display: block; font-weight: 500; font-size: 14px; }
.sec-list small { color: var(--ink2); font-size: 12px; }

/* Approval rules */
.ap-wrap { overflow-x: auto; margin: 10px 0; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ap-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ink2); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ap-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ap-table td small { display: block; color: var(--ink2); font-size: 12px; }
.ap-table td b { font-weight: 500; }
.ap-amt { width: 150px; }
.ap-status { font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.ap-status.is-on { color: var(--ink); font-weight: 500; }
.ap-status.is-on::before { content: "● "; color: var(--ac-text); }

/* Import */
.im { display: flex; flex-direction: column; gap: 12px; }
.im-step h3 { margin-bottom: 8px; }
.im-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.im-tpl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.im-tpl .ux-note { flex: 1 1 260px; }
.im-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.im-link { min-height: 40px; padding: 0; border: 0; background: none; color: var(--ink); font: 500 13px var(--font); text-decoration: underline; text-decoration-color: var(--ac-text); text-underline-offset: 3px; cursor: pointer; }
.im-sum { margin: 10px 0 4px; font-size: 13.5px; font-weight: 500; }
.im-tablewrap { overflow-x: auto; margin-top: 8px; }
.im-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.im-table th { text-align: left; font-weight: 500; color: var(--ink2); padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.im-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.im-table tr.is-bad td { color: var(--bad); }
.im-bar { height: 8px; margin: 12px 0 4px; border-radius: 4px; background: var(--tint-2); overflow: hidden; }
.im-bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--ac); transition: width .2s; }
.im-errors { margin: 4px 0 10px; padding-left: 20px; font-size: 13px; color: var(--bad); }

/* Company (branding) */
.co-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.co-form .ux-f { margin-top: 10px; }
.co-logo { display: flex; flex-wrap: wrap; gap: 8px; }
.co-acts { display: flex; justify-content: flex-end; margin-top: 14px; }
.co-paper { padding: 18px; border-radius: 12px; background: #fff; color: #242427; min-height: 160px; }
.co-paper__body { display: flex; flex-direction: column; gap: 8px; font: 11px Arial, sans-serif; }
.co-paper__body b { font-size: 15px; }
.co-paper__body span { height: 8px; border-radius: 3px; background: #e6e6e6; }
.co-paper__body span:nth-child(3) { width: 80%; } .co-paper__body span:nth-child(4) { width: 60%; }
@media (max-width: 900px), (orientation: portrait) { .co-grid { grid-template-columns: minmax(0, 1fr); } }

/* permissions: start from a role */
.ux-role { display: grid; grid-template-columns: auto minmax(180px, 280px) 1fr; align-items: center; gap: 6px 12px; margin: 0 0 12px; font-size: 13.5px; }
.ux-role label { font-weight: 500; }
.ux-role small { color: var(--ink2); font-size: 12px; }
.ux-role small.ux-role__done { color: var(--ink); font-weight: 500; }
.ux-role small.ux-role__done::before { content: "✓ "; color: var(--ac-text); }
.ux-role__more { grid-column: 1 / -1; font-size: 12.5px; }
.ux-role__more summary { cursor: pointer; color: var(--ink2); text-decoration: underline; text-decoration-color: var(--ac-text); text-underline-offset: 3px; width: max-content; }
.ux-role__list { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--tint); }
.ux-role__list b { font-weight: 500; }
@media (max-width: 760px), (orientation: portrait) { .ux-role { grid-template-columns: minmax(0, 1fr); } }

/* permissions: "can see sensitive" inside each module */
.ux-mod__s { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.ux-mod__s small { display: block; font-size: 11.5px; opacity: .72; }
.ux-mod > .ux-mod__s:first-child { border-top: 0; font-size: 14px; font-weight: 500; }   /* the general Can export switch */
.ux-mod > .ux-mod__s:first-child small { font-weight: 400; }

/* Field Control */
.ux--one { grid-template-columns: minmax(0, 1fr); }
.ux-fc { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ux-fc > * { flex: none; }   /* keeps each block its full height, so the list scrolls instead of squeezing */
.ux-fc > .ux-bar { position: sticky; top: 24px; z-index: 6; background: var(--solid-2); box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .6); }
.ux-fc__legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; font-size: 12.5px; }
.ux-fc__legend b { display: block; font-weight: 500; }
.ux-fc__sec { border-top: 1px solid var(--line); }
.ux-fc__head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: none; cursor: pointer;
  color: var(--ink); font: 500 14px var(--font); text-align: left;
}
.ux-fc__head:hover, .ux-fc__head:focus-visible { background: var(--tint); outline: none; }
.ux-fc__head::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 2px 0; transition: transform .15s; }
.ux-fc__head[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.ux-fc__sum { flex: 1; min-width: 0; font-size: 12px; font-weight: 400; text-align: right; }
.ux-fc__grid { display: grid; grid-template-columns: minmax(90px, 1fr) repeat(4, 66px); align-items: center; gap: 0 2px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.ux-fc__grid--h { font-size: 11px; font-weight: 500; text-align: center; }
.ux-fc__grid--h span:first-child { text-align: left; }
.ux-fc__grid.is-changed { background: var(--tint-2); box-shadow: inset 3px 0 0 var(--ink); }
.ux-fc__name small { display: block; font-size: 11px; opacity: .65; }
.ux-fc__on { font-size: 11px; text-align: center; opacity: .55; }

/* User Activity */
.ux-dates { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.ux-dates .ux-in { flex: 0 1 160px; width: auto; }
.ux-act { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ux-act > * { flex: none; }
.ux-act__row { padding: 10px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font-size: 13.5px; }
.ux-act__top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ux-act__top b { font-weight: 500; }
.ux-act__rec { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-decoration-color: var(--ac-text); text-underline-offset: 3px; cursor: pointer; }
.ux-act__rec:focus-visible { outline: 2px solid var(--ac-text); outline-offset: 2px; border-radius: 3px; }
.ux-act__when { margin-left: auto; font-size: 12px; opacity: .72; white-space: nowrap; }
.ux-act__list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 12.5px; }
.ux-act__list li { overflow-wrap: anywhere; }
.ux-act__list span { opacity: .72; }
.ux-act__more { align-self: center; }

/* employee files: cards at the bottom of the profile */
.ux-files__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ux-files__head h3 { margin: 0; }
.ux-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ux-files__cat { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13.5px; font-weight: 500; }
.ux-files__cat:first-child { margin-top: 0; }
.ux-file { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.ux-file__open { display: flex; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font-family: var(--font); text-align: left; cursor: pointer; }
.ux-file__open:hover b, .ux-file__open:focus-visible b { text-decoration: underline; }
.ux-file__open:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.ux-file__pdf { flex: none; width: 34px; height: 42px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5px; border-radius: 6px; background: var(--ac); color: #fff; font-size: 9.5px; font-weight: 500; letter-spacing: .03em; }
.ux-file__t { min-width: 0; }
.ux-file__t b { display: block; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.ux-file__t small { display: block; margin-top: 2px; font-size: 12px; }
.ux-file__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; margin-top: auto; }
.ux-file__del { min-height: 32px; padding: 0 12px; border: 1px solid var(--ctl-line); border-radius: 999px; background: none; color: var(--ink); font: 400 12px var(--font); cursor: pointer; }
.ux-file__del:hover, .ux-file__del:focus-visible { border-color: var(--line-hover); outline: none; }
.ux-chip--warn { border-color: var(--bad); color: var(--bad); max-width: none; }

/* scanning a paper */
.ux-scan { z-index: 70; }
.ux-scan__card { display: flex; flex-direction: column; gap: 10px; width: min(560px, 100%); max-height: 94dvh; overflow-y: auto; padding: 18px; border-radius: 30px; border: 1px solid var(--line); background: var(--solid); color: var(--ink); box-shadow: 0 18px 44px rgba(0, 0, 0, .5); font-family: var(--font); }
.ux-scan__card:focus { outline: none; }
.ux-scan__card > * { flex: none; }
.ux-scan__card h3 { margin: 0; font-size: 17px; font-weight: 500; }
.ux-scan__view { display: flex; align-items: center; justify-content: center; min-height: 180px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--solid-2); }
.ux-scan__view img { display: block; max-width: 100%; max-height: 38dvh; border-radius: 4px; background: #fff; box-shadow: 0 4px 16px rgba(46, 46, 50, .25); }
.ux-scan__video { display: block; width: 100%; max-height: 62dvh; border-radius: 8px; background: #18181b; }
.ux-scan__strip { display: flex; gap: 10px; overflow-x: auto; padding: 6px 8px 2px 0; }
.ux-scan__th { position: relative; flex: none; }
.ux-scan__page { display: flex; align-items: flex-end; width: 50px; height: 64px; padding: 2px 4px; border-radius: 8px; border: 1px solid var(--line-hover); background: #fff center / cover no-repeat; color: var(--ink); font: 500 11px var(--font); cursor: pointer; }
.ux-scan__th.is-on .ux-scan__page { border: 2px solid var(--ink); }
.ux-scan__rm { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 0; background: var(--ac); color: #fff; font: 500 13px/20px var(--font); cursor: pointer; }
.ux-scan__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ux-scan__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* map pop-up */
.ux-map { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); -webkit-backdrop-filter: blur(20px) saturate(120%); backdrop-filter: blur(20px) saturate(120%); }
.ux-map[hidden] { display: none; }
.ux-map__card { display: flex; flex-direction: column; gap: 10px; width: min(760px, 100%); height: min(88dvh, 760px); padding: 16px; border-radius: 30px; border: 1px solid var(--line); background: var(--solid); box-shadow: 0 18px 44px rgba(0,0,0,.16); }
.ux-map__card h3 { margin: 0; font-size: 16px; font-weight: 500; text-align: center; }
.ux-map__frame { flex: 1; min-height: 0; width: 100%; border: 0; border-radius: 16px; background: transparent; }

/* desktop: the list and the record scroll separately; the header stays put */
@media (orientation: landscape) and (min-width: 761px) {
  /* this page never scrolls, so its glass shadow can run under the tagline without touching any text */
  .sm-main--split { overflow: hidden; margin-bottom: calc(var(--foot-h) * -1); padding-bottom: var(--foot-h); }
  /* the title and its tools share one row, with the list and record below */
  .sm-main--split .sm-perm { height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 18px; }
  .sm-main--split .sm-perm__head, .sm-main--split .ux-tools { align-self: center; }
  .sm-main--split .ux { grid-column: 1 / -1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .sm-main--split .ux-list { min-height: 0; }
  .sm-main--split .ux-rows, .sm-main--split .ux-detail { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
  .sm-main--split .ux-rows { flex: 1; padding-right: 4px; }
  .sm-main--split .ux-detail { padding-right: 6px; }
  .sm-main--split .ux-detail > .ux-bar, .sm-main--split .ux-fc > .ux-bar { top: -1px; }
  .sm-main--split .ux-act { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
  .sm-main--split .ux-fc { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
}

/* phones: the list, then the record with a Back button */
@media (orientation: portrait), (max-width: 760px) {
  .ux { grid-template-columns: minmax(0, 1fr); }
  .ux .ux-detail { display: none; }
  .is-detail .ux .ux-detail { display: flex; }
  .is-detail .ux .ux-list, .is-detail .ux-tools { display: none; }
  .ux-back { display: inline-block; }
  /* the page title scrolls away; only the record's bar stays, so nothing passes between them */
    .ux-detail > .ux-bar, .ux-fc > .ux-bar { top: -1px; flex-wrap: nowrap; }
  .ux-detail > .ux-bar h3 { flex: 1 1 0; font-size: 15px; }
  .ux-tools__search { flex-basis: 100%; }
  .ux-tools__pick { flex: 1 1 90px; }
  .ux-tools__add { margin-left: 0; }
  .ux-in { font-size: 16px; }   /* smaller text makes iPhones zoom in when a box is tapped */
  .ux-file__del { min-height: 42px; }
}
@media (max-width: 420px) {
  .ux-card { padding: 10px; }
  .ux-grid { grid-template-columns: minmax(56px, 1fr) repeat(5, 40px); padding: 6px 8px; }
  .ux-grid--h { padding: 6px 8px; font-size: 10px; }
  .ux-mod__h { padding: 10px 8px; }
  .ux-mod__s { padding: 9px 8px; }
  .ux-fc__grid { grid-template-columns: minmax(70px, 1fr) repeat(4, 50px); padding: 7px 8px; }
  .ux-fc__grid--h { font-size: 10px; }
  .ux-fc__head { padding: 10px 8px; }
}

/* User Activity filters: side by side on a computer, two to a row on a phone */
.ux-act__picks { display: contents; }
@media (max-width: 640px) {
  .ux-act__picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1 1 100%; min-width: 0; }
  .ux-act__picks .ux-tools__pick { width: 100%; min-width: 0; }
  .ux-act__picks .ux-tools__pick:first-child { grid-column: 1 / -1; }
  .ux-dates { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
  .ux-dates .ux-in { width: 100%; min-width: 0; }
  .ux-act__rec { min-height: 32px; padding: 4px 2px; }
}
/* Approval rules and Security's people: one card per row on a phone, each value under its column name */
@media (max-width: 640px) {
  .ap-wrap { overflow-x: visible; }
  .ap-table--cards, .ap-table--cards tbody, .ap-table--cards tr, .ap-table--cards td { display: block; width: 100%; }
  .ap-table--cards thead { display: none; }
  .ap-table--cards tr { margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
  .ap-table--cards td { padding: 5px 0; border: 0; }
  .ap-table--cards td:first-child { font-weight: 500; }
  .ap-table--cards td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .ap-table--cards td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--ink2); font-weight: 400; }
  .ap-table--cards .ap-amt { width: 140px; }
  .ap-table--cards td:last-child:not([data-label]) .ux-btn { width: 100%; margin-top: 4px; }
  .ap-table--cards td:last-child:not([data-label]):empty { display: none; }
}

/* Setup: the first-run wizard */
.su { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.su-head h3 { margin: 0 0 4px; }
.su-bar { height: 8px; margin-top: 10px; border-radius: 999px; background: var(--tint-2); overflow: hidden; }
.su-bar i { display: block; height: 100%; background: var(--ac); border-radius: 999px; transition: width .3s ease; }
.su-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 12px; align-items: start; }
.su-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.su-step__b { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.su-step__b:hover, .su-step__b:focus-visible { border-color: var(--line-hover); outline: none; }
.su-step.is-on .su-step__b { border-color: var(--ac); box-shadow: inset 3px 0 0 var(--ac); }
.su-step__n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 500; border: 1.5px solid var(--line); }
.su-step.is-done .su-step__n { background: var(--ac); border-color: var(--ac); color: #fff; }
.su-step__t { min-width: 0; display: flex; flex-direction: column; }
.su-step__t b { font-weight: 500; font-size: 14px; }
.su-step__t small { font-size: 12px; color: var(--ink2); }
.su-step.is-skip .su-step__t small { font-style: italic; }
.su-card h3 { margin: 2px 0 8px; font-size: 18px; }
.su-card__k { margin: 0; font-size: 12px; color: var(--ink2); }
.su-how { margin: 6px 0 10px; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.su-state { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--tint); font-size: 13.5px; }
.su-state.is-done { box-shadow: inset 3px 0 0 var(--ac); }
.su-acts, .su-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.su-acts a.ux-btn { text-decoration: none; display: inline-flex; align-items: center; }
.su-check { margin-left: auto; }
/* Setup > Data health check (162) */
.su-health { margin-top: 12px; }
.su-health h3 { margin: 2px 0 6px; font-size: 18px; }
.su-hl { margin: 8px 0 12px; padding: 0; list-style: none; display: grid; gap: 6px; }
.su-hl__i { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.su-hl__i.is-bad { box-shadow: inset 3px 0 0 var(--ac); }
.su-hl__i.is-ok { opacity: .72; }
.su-hl__t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.su-hl__t b { font-weight: 500; font-size: 14px; }
.su-hl__t small { font-size: 12px; color: var(--ink2); }
.su-hl__i a.ux-btn { flex: none; text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 760px) { .su-grid { grid-template-columns: 1fr; } .su-check { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .su-bar i { transition: none; } }
/* Users > Start page */
.sp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp-row .ux-in { flex: 1 1 240px; min-width: 0; }

/* Import: match the file's columns to the fields when the headings differ */
.im-map { margin: 10px 0; border: 1px solid var(--line, rgba(255,255,255,.14)); border-radius: 14px; padding: 10px 14px; }
.im-map summary { cursor: pointer; font-weight: 500; }
.im-map summary:focus-visible { outline: 2px solid var(--ac-text); outline-offset: 2px; }
.im-map__g { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.im-map__g .rp-myform__f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
