/* Default theme ("Unraid"): dark, modeled on the Unraid "black" web UI.
   Other themes in themes.css only override these variables (plus a few shapes). */
:root {
  --bg: #1d1b1b;
  --bg-alt: #212121;
  --panel: #262626;
  --line: #303030;
  --line-soft: #2a2a2a;
  --text: #f2f2f2;
  --muted: #909090;
  --head-bg: #f2f2f2;
  --head-text: #1d1b1b;
  --accent: #ff8c2f;
  --accent-2: #e22828;
  --link: #6d9eeb;
  --green: #17bf0b;
  --yellow: #ffd324;
  --red: #ff3300;
  --gray: #808080;
  --bar: #808080;
  --bar-track: #3a3a3a;
  --hover: #2b2b2b;
  --input-bg: var(--bg-alt);
  --input-border: #444;
  --quiet-border: #555;
  --head-muted: #606060;
  --head-meta: #808080;
  --head-link: #486dba;
  --head-border: transparent;
  --tab-text: var(--head-text);
  --tab-hover: #bbb;
  --tab-on: var(--head-text);
  --search-bg: #fff;
  --search-border: #ccc;
  --title-bg: var(--panel);
  --title-text: var(--text);
  --code-bg: rgba(0, 0, 0, .25);
  --ok-text: #127a05;
  --btn-bg: transparent;
  --btn-text: var(--accent);
  --btn-hover-text: #fff;
  --btn-hover-bg: linear-gradient(90deg, var(--accent-2), var(--accent));
  --radius: 4px;
  --panel-radius: 0;
  --panel-border: none;
  --upper: uppercase;
  --spacing: 1.5px;
  --font: "Clear Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --head-font: var(--font);
  --mono: "Bitstream Vera Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 var(--font);
  padding-bottom: 40px;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- header ---------- */
.top {
  background: var(--head-bg);
  color: var(--head-text);
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--head-border);
  /* stays at the top while the page scrolls (on a phone base.html lets the logo row scroll away and keeps the menu) */
  position: sticky; top: 0; z-index: 40;
}
html { scroll-padding-top: 150px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: flex-end; gap: 12px; }
.brand img { height: 76px; width: auto; display: block; }
.brand .app-name {
  font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--head-muted); padding-bottom: 6px;
}
.who { text-align: right; }
.who .meta { font-size: 12px; color: var(--head-meta); }
.who .meta a { color: var(--head-link); }
.who .name { font-size: 15px; }
.who form { display: inline; }
.who button.link {
  background: none; border: 0; padding: 0; color: var(--head-link); font: inherit; cursor: pointer;
}

.tabs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 10px;
}
/* drop-down menu in the tab bar (Lists): opens on hover, on tap/focus, or with the keyboard */
.tabs .menu { position: relative; }
/* line Lookups up with the other menu names (its drop-down wrapper sat it 2px lower) */
.tabs > .menu { display: flex; align-items: center; }
/* ...but never the phone-only "More" menu: on a computer it would repeat menu items already in the bar */
html .tabs > .menu.more-menu { display: none; }
.tabs .menu .caret { font-size: 12px; opacity: .7; }
.tabs .menu-items {
  display: none; position: absolute; left: 0; top: 100%; z-index: 50; min-width: 190px; padding: 6px 0;
  background: var(--menu-bg, var(--head-bg)); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.tabs .menu:hover .menu-items, .tabs .menu:focus-within .menu-items { display: block; }
.tabs .menu-items a { display: block; border-bottom: 0; padding: 7px 14px; }
.tabs .menu-items a:hover, .tabs .menu-items a.on { background: var(--menu-hover, rgba(128, 128, 128, .15)); }
.tabs .menu-items a.on { box-shadow: inset 3px 0 0 var(--tab-on); }
.tabs .menu-items hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.tabs a {
  color: var(--tab-text); font-family: var(--head-font);
  font-size: 12.5px; font-weight: 600; letter-spacing: var(--spacing); text-transform: var(--upper);
  padding: 8px 10px 9px; white-space: nowrap; border-bottom: 2px solid transparent;
}
.tabs a:hover { text-decoration: none; border-bottom-color: var(--tab-hover); }
.tabs a.on { border-bottom-color: var(--tab-on); }
.tabs .spacer { flex: 1; }
.tabs form.search { display: flex; padding: 4px 0; }
.tabs form.search input {
  background: var(--search-bg); color: var(--head-text); border: 1px solid var(--search-border); border-radius: var(--radius);
  padding: 5px 8px; width: 220px; font: inherit;
}

main { padding: 12px 10px 20px; max-width: 1600px; margin: 0 auto; }

/* ---------- panels ---------- */
.panel { margin-bottom: 16px; border: var(--panel-border); border-radius: var(--panel-radius); background: var(--bg); }
.panel > .panel-title:first-child, .panel > details:first-child > .panel-title { border-radius: var(--panel-radius) var(--panel-radius) 0 0; }
.panel-title {
  display: flex; align-items: center; gap: 10px;
  background: var(--title-bg); color: var(--title-text);
  padding: 8px 10px; font-family: var(--head-font);
  font-size: 14px; letter-spacing: var(--spacing);
}
.panel-title .ico { color: inherit; opacity: .9; width: 16px; text-align: center; }
.panel-title .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.panel-body { padding: 8px 0 0; }
.panel-body.pad { padding: 14px 10px 4px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
/* 0.16.6.14a: List text size (each person's, 80-160%): lists are drawn bigger or smaller and still fill their box */
.table-wrap > table, .pinned-head table { zoom: var(--list-size, 1); }
.table-wrap > table { width: calc(100% / var(--list-size, 1)); }
/* 0.16.6.14a: View button on lists (listview.js): text size and columns, for each person */
.lv-hide { display: none !important; }
/* Saved column views: lists stay blank until listview.js has applied the view, so hidden columns never flash. A
   spinner shows only if that takes over a quarter second, and the lists show after 2 s whatever happens. */
html.lv-wait .table-wrap { position: relative; min-height: 64px; }
html.lv-wait .table-wrap > table { visibility: hidden; animation: lv-show 0s 2s forwards; }
html.lv-wait .table-wrap::after { content: ""; position: absolute; left: 50%; top: 18px; width: 24px; height: 24px; margin-left: -12px;
  border: 3px solid rgba(30,115,190,.18); border-top-color: #1e73be; border-radius: 50%; opacity: 0;
  animation: lv-spin .9s linear infinite, lv-appear 0s .25s forwards, lv-gone 0s 2s forwards; }
@keyframes lv-show { to { visibility: visible; } }
@keyframes lv-appear { to { opacity: 1; } }
@keyframes lv-gone { to { opacity: 0; visibility: hidden; } }
@keyframes lv-spin { to { transform: rotate(360deg); } }
/* 0.16.6.17a: auto-refresh. Changed rows glow for a moment; the New changes bar shows when someone is busy. */
tr.ar-new > td { animation: ar-glow 2.6s ease-out; }
@keyframes ar-glow { from { background-color: rgba(255, 214, 92, .55); } to { background-color: transparent; } }
.ar-bar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; margin: 0 0 6px; border-radius: 6px;
  background: #123f6c; color: #fff; font-size: 13px; }
.ar-bar[hidden] { display: none; }
.ar-bar .ar-text { flex: 1; }
@media (prefers-reduced-motion: reduce) { tr.ar-new > td { animation: none; outline: 2px solid rgba(255, 190, 60, .8); outline-offset: -2px; } }
@media (prefers-reduced-motion: reduce) { html.lv-wait .table-wrap::after { animation: lv-appear 0s .25s forwards, lv-gone 0s 2s forwards; } }
.lv { position: relative; display: inline-block; }
.lv-btn { display: inline-flex; align-items: center; gap: 5px; }
.lv-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 270px; max-width: calc(100vw - 32px);
  padding: 10px 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); text-align: left; font-size: 14px; font-weight: normal; text-transform: none; letter-spacing: normal; }
.lv-head { font-size: 12px; font-weight: 600; color: var(--muted); margin: 4px 0 6px; }
.lv-head + .lv-head, .lv-size + .lv-head { margin-top: 12px; }
.lv-size { display: flex; align-items: center; gap: 8px; }
.lv-size input { flex: 1; min-width: 0; }
.lv-size output { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.lv-a { font-size: 12px; color: var(--muted); }
.lv-a-big { font-size: 17px; }
.lv-cols { list-style: none; margin: 0; padding: 0; max-height: min(320px, 50vh); overflow: auto; }
.lv-col { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 4px; }
.lv-col:hover { background: var(--hover); }
.lv-col label { flex: 1; cursor: pointer; text-transform: none; letter-spacing: normal; font-size: 14px; font-weight: normal; color: var(--text); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-col.lv-dragging { opacity: .45; }
.lv-grip { color: var(--muted); cursor: grab; font-size: 12px; letter-spacing: -2px; user-select: none; }
.lv-move { display: inline-flex; gap: 2px; }
.lv-move button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 5px; border-radius: 4px; font: inherit; line-height: 1; }
.lv-move button:hover:not([disabled]) { color: var(--text); background: var(--line); }
.lv-move button[disabled] { opacity: .3; cursor: default; }
.lv-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
@media (pointer: fine) { .lv-move { opacity: 0; } .lv-col:hover .lv-move, .lv-col:focus-within .lv-move { opacity: 1; } }
/* Assets list: room for a first and last name on one line in the Assignee column */
.assets-table .col-person { min-width: 10em; }
.assets-pin > .panel-title { border-radius: var(--panel-radius) var(--panel-radius) 0 0; }
.assets-pin .pager { background: var(--bg); }
/* 0.15.3.10a: the column headings' row pinned at the top of the screen once it scrolls up there (see nav.js) */
.pinned-head { position: fixed; z-index: 35; overflow: hidden; margin: 0; padding: 0; background: var(--bg); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.pinned-head[hidden] { display: none; }
.pinned-head table { table-layout: fixed; border-collapse: collapse; }
.pinned-head th { background: var(--bg); box-shadow: 0 1px 0 var(--line); box-sizing: border-box; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-weight: normal; font-size: 12px; letter-spacing: var(--spacing); text-transform: var(--upper);
  padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--text);
}
th a { color: var(--text); }
th.sorted a::after { content: " ▾"; color: var(--accent); }
th.sorted.asc a::after { content: " ▴"; }
td { padding: 5px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:nth-child(even) td { background: var(--bg-alt); }
tbody tr:hover td { background: var(--hover); }
tfoot td { border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); }

/* status dots, like the drive dots on the Main page */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.dot.active { background: var(--green); }
.dot.in_repair { background: var(--accent); }
.dot.missing { background: var(--red); }
.dot.disposed { background: var(--gray); }
.dot.warn { background: var(--yellow); }

/* usage bar, like the USED / FREE columns */
.bar { position: relative; background: var(--bar-track); height: 18px; min-width: 90px; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--bar); }
.bar > em { position: relative; font-style: normal; display: block; text-align: right; padding: 0 6px; line-height: 18px; font-size: 12px; }

/* ---------- forms & buttons ---------- */
.btn, button.btn, input[type=submit] {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 5px 12px; font: 600 12px var(--font); letter-spacing: var(--spacing); text-transform: var(--upper);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover, button.btn:hover, input[type=submit]:hover {
  background: var(--btn-hover-bg); color: var(--btn-hover-text); border-color: transparent;
  text-decoration: none;
}
.btn.quiet { color: var(--muted); border-color: var(--quiet-border); background: transparent; }
.btn.danger { color: var(--danger-text, var(--red)); border-color: var(--red); background: transparent; }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.small { padding: 2px 8px; font-size: 12px; }

input, select, textarea {
  background: var(--input-bg); color: var(--text); border: 1px solid var(--input-border); border-radius: var(--radius);
  padding: 5px 8px; font: 13px var(--font); max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { width: 100%; min-height: 80px; }
label { color: var(--muted); font-size: 12.5px; letter-spacing: 0; text-transform: none; }

.form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 18px;
}
.field { display: flex; flex-direction: column; gap: 3px; }
.field input, .field select { width: 100%; }
.field.wide { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px; background: var(--bg-alt); }
.filters input[type=search] { width: 240px; }

/* ---------- misc ---------- */
.flash { padding: 8px 12px; margin: 0 0 12px; border-left: 3px solid var(--green); background: var(--bg-alt); }
.flash.error { border-color: var(--red); }

.stats { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat { flex: 1 1 150px; background: var(--bg); padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat .n { font-size: 24px; }
.stat .l { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }

dl.props { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; margin: 0; }
dl.props dt, dl.props dd { padding: 5px 8px; border-bottom: 1px solid var(--line-soft); margin: 0; overflow-wrap: anywhere; }
dl.props dt { font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }
dl.props dd:nth-of-type(even), dl.props dt:nth-of-type(even) { background: var(--bg-alt); }

.actions-grid { display: grid; gap: 14px; padding: 12px 10px; }
.actions-grid form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions-grid h4 { margin: 0 0 4px; font-weight: normal; font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; padding: 10px; }
.pager .spacer { flex: 1 1 8px; }
.tag-pill { font-family: var(--mono); }
.warnline { color: var(--yellow); }
.scan-input { font-size: 20px !important; padding: 8px 12px !important; width: 320px; }

details.row-tools summary { cursor: pointer; color: var(--muted); list-style: none; }
details.row-tools summary::-webkit-details-marker { display: none; }
details.row-tools[open] { padding: 6px 0; }
details.row-tools form { margin: 4px 0; }

/* ---------- footer ---------- */
.foot {
  position: fixed; left: 0; right: 0; bottom: 0; height: 28px;
  background: var(--head-bg); color: var(--head-text);
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font-size: 12px;
}
.foot .ok { color: var(--ok-text); font-weight: 600; }
.foot .ok::before { content: "●"; margin-right: 6px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-box { width: 100%; max-width: 380px; }
.login-box .logo { background: var(--head-bg); padding: 18px; text-align: center; }
.login-box .logo img { max-width: 260px; width: 100%; }
.login-box .card { background: var(--panel); padding: 18px; display: grid; gap: 12px; }
.login-box form.pwform { display: grid; gap: 12px; }
.ms-btn { display: flex; align-items: center; justify-content: center; gap: 12px; height: 42px; background: #fff; color: #3b3b3b;
  border: 1px solid #8c8c8c; font: 600 15px "Segoe UI", system-ui, sans-serif; text-decoration: none; }
.ms-btn:hover { background: #f1f1f1; text-decoration: none; }
.ms-btn.off, .ms-btn.off:hover { opacity: .5; cursor: not-allowed; background: #fff; }
.alt-link { text-align: center; font-size: 12.5px; color: var(--muted); }
.alt-link:hover { color: var(--link); }
.login-box input { width: 100%; padding: 8px 10px; }

@media (max-width: 700px) {
  .brand img { height: 36px; }
  .who .name { display: none; }
  .tabs form.search input { width: 150px; }
  .tabs { gap: 0 2px; }
  .tabs a { padding: 6px 7px 7px; font-size: 12px; }
  .tabs form.search { padding: 2px 0 4px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .scan-input { width: 100%; }
  main { padding: 10px 6px 20px; }
}

/* ---------- added: photos, bulk bar ---------- */
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 0 0; }
.thumbs img { height: 120px; width: auto; max-width: 200px; object-fit: cover; border: 1px solid var(--line); display: block; }
.bulkbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg-alt); }
.save-view[open] { position: relative; }
.save-view form { position: absolute; right: 0; top: 30px; z-index: 5; background: var(--panel); padding: 8px; border: 1px solid var(--line); }
input[type=checkbox] { accent-color: var(--accent); }
.site-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; padding: 8px; background: var(--panel); margin-top: 4px; }
.site-picker label { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); }
.site-picker p { grid-column: 1 / -1; margin: 4px 0 0; }
.field.span2 { grid-column: span 2; }
.add-panel > summary { list-style: none; cursor: pointer; }
.add-panel > summary::-webkit-details-marker { display: none; }
.add-panel[open] > summary { margin-bottom: 10px; }
.add-panel .panel-body { padding: 0 0 4px; }
/* forms that sit straight in a panel (Add employee, Add site, Install a module…): room around the fields and buttons */
.panel > form.pad, .add-panel > form.pad { padding: 4px 14px 16px; }
.add-panel > form.pad > div:last-child { margin-top: 16px !important; }
.badge.inactive { background: transparent; border: 1px solid var(--muted, #888); color: var(--muted, #888); font-size: 12px; padding: 0 5px; border-radius: 3px; }
.role-help { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; padding: 4px 10px 10px; font-size: 13px; }
.role-help dt { font-weight: 600; }
.role-help dd { margin: 0; color: var(--muted, #999); }
.report { white-space: pre-wrap; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; background: var(--code-bg); padding: 10px; border-radius: 4px; max-height: 60vh; overflow: auto; }
.add-panel[open] .hint { display: none; }
.panel-title .muted { color: inherit; opacity: .75; }
.tabs .menu-items a.muted-link { opacity: .7; font-size: 12px; }

/* ---------- camera scanning (phones and tablets only) ---------- */
.scan-btn { display: none; }
.can-scan .scan-btn { display: inline-flex; align-items: center; justify-content: center; }
.can-scan .tabs form.search .scan-btn {
  margin-left: 4px; min-width: 38px; border: 1px solid var(--search-border); border-radius: var(--radius);
  background: var(--search-bg); font-size: 18px; cursor: pointer;
}
.can-scan .scan-btn.inline {
  position: absolute; right: 2px; bottom: 2px; height: calc(100% - 4px); padding: 0 8px; border: 0;
  background: transparent; font-size: 18px; cursor: pointer;
}
input.locked, input[readonly].locked { background: rgba(128, 128, 128, .22); color: var(--muted); cursor: not-allowed; border-style: dashed; }
.with-scan { position: relative; display: block; }
.with-scan input { width: 100%; }
.can-scan .with-scan input { padding-right: 40px; }
.can-scan .scan-big { font-size: 15px; padding: 10px 16px; }
.scan-overlay { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 7%; right: 7%; top: 28%; height: 26%; border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); }
.scan-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 14px 12px; background: rgba(0, 0, 0, .55); }
.scan-title { flex: 1; font-size: 16px; font-weight: 600; }
.scan-close { font-size: 16px; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 0; background: #fff; color: #000; }
.scan-status { position: absolute; left: 0; right: 0; top: 57%; text-align: center; font-size: 15px; padding: 0 16px;
  text-shadow: 0 1px 3px #000; }
.scan-status.bad { color: #ffb4b4; }
.scan-list { position: absolute; left: 0; right: 0; bottom: 0; max-height: 34%; overflow-y: auto; margin: 0; padding: 8px 14px
  max(12px, env(safe-area-inset-bottom)); list-style: none; background: rgba(0, 0, 0, .65); font-size: 14px; }
.scan-list:empty { display: none; }
.scan-list li { padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.scan-list li.bad { color: #ffb4b4; }
body.scan-open { overflow: hidden; }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > .field, .field.span2 { grid-column: 1 / -1 !important; }
}

.scan-icon { display: inline-block; vertical-align: middle; }
.can-scan .tabs form.search .scan-btn { color: #333; }
.can-scan .scan-btn.inline { color: var(--text); opacity: .8; }
.scan-zoom { font-size: 15px; font-weight: 700; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.6);
  background: rgba(0,0,0,.35); color: #fff; min-width: 52px; }

/* "?" in the top right: shows the version on hover; click opens Settings → About */
.who .meta a.help-badge {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; vertical-align: 1px;
  border: 1.5px solid currentColor; color: var(--head-link); font: 700 12px/1 var(--font); text-decoration: none;
}
.who .meta a.help-badge:hover, .who .meta a.help-badge:focus-visible { background: var(--head-link); color: var(--head-bg); }
.help-badge::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: -4px; z-index: 60;
  white-space: nowrap; padding: 5px 9px; border-radius: 4px; font: 600 12px/1.2 var(--font); letter-spacing: 0;
  background: #222; color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(-3px); pointer-events: none; transition: opacity .12s, transform .12s;
}
.help-badge:hover::after, .help-badge:focus-visible::after { opacity: 1; transform: none; }

/* Users page: "Save all" bar and rows with unsaved changes */
.save-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
tr.dirty > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* right-click menu on the assets list */
.ctxmenu { position: fixed; z-index: 60; min-width: 190px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(0,0,0,.35); padding: 4px 0; }
.ctxmenu[hidden] { display: none; }
.ctxmenu a { display: block; padding: 7px 14px; color: var(--text); text-decoration: none; cursor: pointer; }
.ctxmenu a:hover:not(.disabled), .ctxmenu a:focus:not(.disabled) { background: var(--accent); color: #fff; }
.ctxmenu a.disabled { opacity: .4; cursor: default; }
.ctxmenu a.danger-text { color: var(--red, #e5484d); }
.ctxmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.ctx-head { padding: 5px 14px 6px; font-size: 12px; letter-spacing: 0; text-transform: none; opacity: .7; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctxdialog { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 16px 18px; min-width: 320px; }
.ctxdialog::backdrop { background: rgba(0,0,0,.45); }
/* the "asset is somewhere else" question during an audit: always fits the screen, buttons wrap or stack */
.movedlg { box-sizing: border-box; width: min(94vw, 480px); max-width: 94vw; }
.movedlg p { max-width: none !important; }
.movedlg .ctx-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.movedlg .ctx-buttons .btn { white-space: normal; text-align: center; }
@media (max-width: 700px) {
  .movedlg .ctx-buttons { flex-direction: column; }
  .movedlg .ctx-buttons .btn { width: 100%; padding: 12px 10px; }
}
.ctx-fields { display: grid; gap: 10px; margin-bottom: 14px; }
.ctx-fields label { display: grid; gap: 4px; font-size: 13px; }
.ctx-buttons { display: flex; gap: 8px; justify-content: flex-end; }
tbody tr[data-id] { cursor: context-menu; }

/* ---------- dashboard: collapsible panels and customize mode ---------- */
.dash-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-bottom: 10px; }
.dash-hint { flex: 1 1 260px; font-size: 12.5px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 0 16px; align-items: start; }
.dash-grid > .dash-w { min-width: 0; }
.dash-grid > .dash-w.wide { grid-column: 1 / -1; }
.dash-w .stat { min-width: 0; }
.dash-w > details > summary.panel-title, .panel-fold > details > summary.panel-title { cursor: pointer; list-style: none; user-select: none; border-radius: var(--panel-radius) var(--panel-radius) 0 0; }
.dash-w > details > summary.panel-title::-webkit-details-marker, .panel-fold > details > summary.panel-title::-webkit-details-marker { display: none; }
.dash-w > details > summary.panel-title::after, .panel-fold > details > summary.panel-title::after { content: "▾"; margin-left: auto; opacity: .85; }
.dash-w[data-key="overview"] > details > summary.panel-title::after { margin-left: 10px; }
.dash-w > details:not([open]) > summary.panel-title, .panel-fold > details:not([open]) > summary.panel-title { border-radius: var(--panel-radius); }
.dash-w > details:not([open]) > summary.panel-title::after, .panel-fold > details:not([open]) > summary.panel-title::after { content: "▸"; }
.dash-w > details > summary .actions { margin-left: auto; }
.dash-w.is-hidden, .stat.is-hidden { display: none; }
.dash-handle { cursor: grab; touch-action: none; user-select: none; }
.dash-w.dragging, .stat.dragging { opacity: .45; pointer-events: none; outline-color: var(--tab-on); }
body.dash-dragging, body.dash-dragging * { cursor: grabbing !important; user-select: none; }
.dash-ctl, .stat-ctl, .dash-bar .dash-edit-only { display: none; }
.dash-editing .dash-bar .dash-view-only { display: none; }
.dash-editing .dash-bar .dash-edit-only { display: inline-block; }
.dash-editing .dash-bar .dash-hint.dash-edit-only { display: block; }
.dash-editing .dash-ctl { display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px dashed var(--line); }
.dash-editing .stat-ctl { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.dash-editing .stat-ctl .btn { padding: 2px 6px; }
.dash-editing .dash-w.is-hidden, .dash-editing .stat.is-hidden { display: block; opacity: .45; }
.dash-editing .dash-w { outline: 2px dashed var(--line); outline-offset: 2px; }
@media (max-width: 700px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-size { display: none; }
  .dash-bar { justify-content: stretch; }
  .dash-bar .btn { flex: 1 1 auto; }
}
.dash-editing > p.dash-view-only { display: none; }

/* ---------- signatures ---------- */
.sig-field { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sig-field .sig-open:disabled { opacity: .45; cursor: not-allowed; }
.sig-status { font-size: 12px; }
.sigdlg { width: min(640px, 96vw); box-sizing: border-box; padding: 12px 14px; }
.sigdlg canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: #fff; border: 1px solid var(--line); touch-action: none; cursor: crosshair; }
/* a saved signature: an inline drawing, with nothing to select, drag or save */
.sigbox { display: inline-block; line-height: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; pointer-events: none; }
.sigbox svg { width: 300px; max-width: 100%; height: auto; border: 1px solid var(--line); }
.sig-note { padding: 6px 10px; font-size: 12px; color: var(--muted); }

/* ---------- phone menu: one row, "More" drop-down, the search always shown under it (see nav.js) ---------- */
.more-menu { display: none; }
.more-group { padding: 6px 14px 2px; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); }
@media (max-width: 700px) {
  .tabs.one-row { flex-wrap: wrap; gap: 0 2px; position: relative; }
  .tabs.one-row > a, .tabs.one-row > .menu { flex: 0 0 auto; }
  .top .tabs.one-row > a, .top .tabs.one-row > .menu > a { font-size: 12px; letter-spacing: .2px; padding: 7px 6px 8px; }
  .tabs.one-row .nav-hidden { display: none !important; }
  .tabs.one-row .more-menu { display: block; position: static; }
  .tabs.one-row .more-menu[hidden] { display: none; }
  html .tabs.one-row > .menu.more-menu { display: block; }
  html .tabs.one-row > .menu.more-menu[hidden] { display: none; }
  .tabs.one-row .more-menu .menu-items { left: 0; right: 0; min-width: 0; max-height: 70vh; overflow-y: auto; }
  .tabs.one-row .more-menu:hover .menu-items, .tabs.one-row .more-menu:focus-within .menu-items { display: none; }
  .tabs.one-row .more-menu.open .menu-items { display: block; }
  .tabs.one-row .more-menu .menu-items a { display: block; white-space: nowrap; }
  .tabs.one-row .spacer { flex: 1 1 0; min-width: 0; }
  /* 0.15.3.8a: the search box and its scan button are always shown on phones, as a full row under the menu */
  html .tabs.one-row form.search { display: flex; flex: 1 0 100%; order: 20; padding: 2px 0 6px; margin: 0; background: none; }
  html .tabs.one-row form.search input { flex: 1; width: auto; min-width: 0; }
  /* every theme's phone menu looks the same: words only (the side-menu themes' icons are for wide screens) */
  html .tabs.one-row a[data-ico]::before { display: none; }
  html .tabs.one-row .side-top { display: contents; }
}

/* ---------- phones: no zoom-in when tapping a field ----------
   iPhone Safari zooms into any text field whose text is smaller than 16px and leaves the page zoomed in
   (the scan button ends up off the side). Keeping fields at 16px on phones stops that. */
@media (max-width: 700px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]),
  select, textarea { font-size: 16px; }
}

/* ---------- backups: what to back up / restore ---------- */
.bk-scope { display: grid; gap: 6px; }
.bk-scope label { display: block; }
.bk-scope button { justify-self: start; margin-top: 4px; }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- label preview pop-up (see labelpreview.js) ---------- */
.lblpv { width: min(980px, 96vw); height: min(86vh, 760px); padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--text); flex-direction: column; }
.lblpv[open] { display: flex; }
.lblpv::backdrop { background: rgba(0, 0, 0, .5); }
.lblpv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.lblpv-bar .lblpv-close { margin-left: auto; }
.lblpv-note { font-size: 12px; color: #f0b429; }
.lblpv-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: #ddd; }

/* ---------- pop-ups open with a short fade and a small rise, so they don't just snap onto the screen ----------
   Quick on purpose (about a sixth of a second) so nothing feels slow. Off for people who ask their device to reduce motion. */
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop-fade { from { opacity: 0; } to { opacity: 1; } }
dialog[open] { animation: pop-in .16s ease-out; }
dialog[open]::backdrop { animation: pop-fade .16s ease-out; }
.ctxmenu:not([hidden]) { animation: pop-in .1s ease-out; transform-origin: top left; }
@media (prefers-reduced-motion: reduce) {
  dialog[open], dialog[open]::backdrop, .ctxmenu:not([hidden]) { animation: none; }
}

/* Settings -> Theme: logo cards with the logo shown on a light and a dark background */
.logo-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.logo-card { border: 1px solid var(--line); border-radius: var(--panel-radius); padding: 14px; }
.logo-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.logo-preview > div { display: grid; place-items: center; height: 110px; border-radius: 6px; padding: 8px; }
.logo-preview .on-light { background: #fff; border: 1px solid #e3e6e9; }
.logo-preview .on-dark { background: #34444f; }
.logo-preview img { max-width: 100%; max-height: 94px; object-fit: contain; }
.logo-preview.mini img { max-height: 64px; }
.logo-preview.mini .on-dark img { background: #fff; border-radius: 12px; padding: 6px; }
.logo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.logo-pick { width: 100%; display: grid; gap: 4px; justify-items: center; padding: 8px 6px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: #333; cursor: pointer; font: inherit; font-size: 12px; line-height: 1.25; }
.logo-pick:hover, .logo-pick:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.logo-pick img { height: 44px; max-width: 100%; object-fit: contain; }
.logo-pick.in-use { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.logo-pick em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 600; }
.logo-pick.static { cursor: default; }
.logo-pick.static:hover { border-color: var(--line); box-shadow: none; }

/* Settings -> Theme: the theme gallery */
.theme-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.theme-tile { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: var(--panel-radius); padding: 10px; }
.theme-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.theme-tile .swatch { height: 70px; }
.theme-info small { display: block; margin-top: 4px; line-height: 1.35; }
.theme-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.theme-badges .badge { font-size: 12px; padding: 0 6px; border-radius: 3px; border: 1px solid var(--line); }
.theme-badges .badge.on { background: var(--accent); color: #fff; }
.theme-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.theme-actions form { margin: 0; }
.theme-actions .btn.is-active { background: #1f8a4c; border-color: #1f8a4c; color: #fff; cursor: default; pointer-events: none; }

/* Settings -> Theme: the theme buttons are the same size on every card and in every theme
   (three equal columns; a theme can change their colors but not their size) */
.theme-gallery .theme-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-self: end; align-items: start; }
.theme-gallery .theme-actions form { display: flex; }
:root .theme-gallery .theme-actions .btn {
  width: 100%; height: 34px; min-height: 0; margin: 0; padding: 0 8px; justify-content: center; box-sizing: border-box;
  font-family: var(--font); font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none;
}

/* ---------- desktop: larger text and a bigger menu bar (phones keep their sizes) ---------- */
@media (min-width: 701px) {
  body { font-size: 14.5px; }
  .brand img { height: 88px; }   /* a little bigger, to go with the larger "Asset Inventory" */
  .mono { font-size: 13.5px; }
  th { font-size: 12px; }
  .btn, button.btn, input[type=submit] { font-size: 12px; }
  .btn.small { font-size: 12px; padding: 3px 9px; }
  input, select, textarea { font-size: 14.5px; }
  label { font-size: 12px; }
  .panel-title { font-size: 15.5px; }
  .brand .app-name { font-size: 18px; }   /* "Asset Inventory": bigger than the menu words */
  .who .meta { font-size: 13px; }
  .who .name { font-size: 16px; }
  .stat .n { font-size: 26px; }
  .stat .l, dl.props dt, .actions-grid h4 { font-size: 12px; }
  .bar > em { font-size: 13px; }
  .alt-link { font-size: 13.5px; }
  /* the menu bar, in every theme but AssetCloud (and themes built on it). :where() adds no weight,
     so an uploaded theme can still set its own menu sizes. */
  :where(html:not([data-theme="assetcloud"])) .tabs { margin-top: 12px; }
  :where(html:not([data-theme="assetcloud"])) .tabs a { font-size: 14px; padding: 11px 13px 12px; }
  :where(html:not([data-theme="assetcloud"])) .tabs .menu-items a { padding: 9px 16px; }
  :where(html:not([data-theme="assetcloud"])) .tabs .menu .caret { font-size: 12px; }
  :where(html:not([data-theme="assetcloud"])) .tabs form.search input { padding: 7px 10px; width: 240px; }
}

/* 0.15.2.4a: Settings -> About: versions of the app and each module, folded */
.ver-item { border: var(--panel-border); border-radius: 4px; margin-bottom: 6px; background: var(--bg-alt); }
.ver-item > summary { cursor: pointer; padding: 7px 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ver-item[open] > summary { border-bottom: var(--panel-border); }
.ver-body { padding: 4px 12px 8px; }
.ver-older { margin-top: 6px; }
.ver-older > summary { list-style: none; }
/* 0.16.5a: Backups -> a tab for Core and one per module */
.bk-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin: 0 0 14px; overflow-x: auto; scrollbar-width: thin; }
.bk-tabs a { display: flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: -2px; white-space: nowrap; color: var(--muted);
  border-bottom: 3px solid transparent; text-decoration: none; font-family: var(--head-font, inherit); font-weight: 600; }
.bk-tabs a:hover { color: var(--text); }
.bk-tabs a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.bk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.bk-dot.ok { background: var(--green); }
.bk-dot.late, .bk-dot.off { background: var(--yellow); }
.bk-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 12px 4px; font-size: 13px; }   /* 0.16.6.11a: what the dots in All saved backups mean */
.bk-glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.bk-glance a { display: block; border: var(--panel-border); border-radius: 6px; padding: 10px 12px; background: var(--bg-alt); color: var(--text); text-decoration: none; }
.bk-glance a:hover { border-color: var(--accent); }
.bk-glance b { display: block; }
.sch-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 0; }
.sch-checks label { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 14px; }
.sch-sum { margin: 12px 0; padding: 9px 12px; border: var(--panel-border); border-radius: 6px; background: var(--bg-alt); }
.sch-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sch-week > div { border: var(--panel-border); border-radius: 6px; padding: 6px 8px; background: var(--bg-alt); font-size: 12.5px; min-height: 64px; }
.sch-week span { display: block; margin-top: 3px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .sch-week { grid-template-columns: 1fr; } .sch-week > div { min-height: 0; } }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bk-actions form { display: inline; }

/* 0.15.3a: Settings -> Modules: who can use each module */
.mod-access { margin-top: 6px; font-weight: 400; }
.mod-access-form { margin-top: 8px; display: grid; gap: 4px; max-width: 420px; font-weight: 400; }
.mod-access-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; padding: 4px 0 0 22px; }
.mod-access-list label, .mod-access-form > label { font-size: 13px; text-transform: none; letter-spacing: 0; }

/* Module details depend on the space left beside navigation, not the window width. */
.module-table { container: module-list / inline-size; }
.module-details, .module-meta { display: none; }
.module-actions { width: 1%; white-space: nowrap; }
@container module-list (width < 820px) {
  .module-description { display: none; }
  .module-details { display: block; margin-top: 6px; }
  .module-details summary { width: fit-content; cursor: pointer; color: var(--link); }
  .module-details p { margin: 4px 0; overflow-wrap: anywhere; }
  .module-actions { width: 34%; white-space: normal; }
  .module-actions form { display: flex; flex-wrap: wrap; gap: 4px; }
  .module-actions .btn { white-space: nowrap; }
}
@container module-list (width < 560px) {
  .module-extra { display: none; }
  .module-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; }
  .module-table .mod-access-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); padding-left: 8px; }
  .module-table .mod-access-form { overflow-wrap: anywhere; }
}

/* 0.15.3.1a: choose which parts of a backup to restore */
.rv-parts { display: grid; gap: 6px; max-width: 900px; }
.rv-part { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 8px 10px; border: var(--panel-border); border-radius: 4px; background: var(--bg-alt); text-transform: none; letter-spacing: 0; font-size: 14px; cursor: pointer; }
.rv-part > input { grid-row: span 6; }
.rv-part > span { grid-column: 2; }
.rv-off { opacity: .55; cursor: default; }
.rv-meta { font-size: 13px; }
.rv-warn { color: #b77900; font-size: 13px; }
.rv-bad { color: var(--red); font-size: 13px; }
.rv-note { font-size: 12px; }
.rv-links { margin: 6px 0; padding-left: 20px; }

/* 0.15.3.1a: logos with no picture chosen */
.logo-none { margin: 4px 0 12px; padding: 10px 12px; border: 1px dashed var(--muted); border-radius: 4px; color: var(--muted); }

/* 0.15.3.1a: Users: click a person to change them in a popup */
.user-row { cursor: pointer; }
.user-row:hover td, .user-row:focus td { background: var(--hover, var(--bg-alt)); }
.app-modal { padding: 0; border: var(--panel-border); border-radius: 6px; width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
             background: var(--panel, var(--bg)); color: inherit; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.app-modal::backdrop { background: rgba(0, 0, 0, .45); }
.app-modal form { display: flex; flex-direction: column; max-height: calc(100vh - 42px); }
.app-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: var(--panel-border); }
.app-modal-head h2 { margin: 0; font-size: 17px; }
.app-modal-body { padding: 12px 14px; overflow: auto; }
.app-modal-foot { display: flex; gap: 8px; padding: 10px 14px; border-top: var(--panel-border); }
.app-modal-x { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: inherit; padding: 2px 8px; }
.app-modal-x:hover { color: var(--red); }

/* 0.15.3.4a: a thin line in the menu between modules (the inventory's items, then each module's) */
.tabs .mod-sep { flex: 0 0 1px; width: 1px; align-self: stretch; margin: 9px 6px; background: var(--mod-sep, var(--tab-text, var(--line))); opacity: .35; }
@media (max-width: 700px) { .tabs .mod-sep { margin: 6px 3px; } }
/* 0.15.3.4a: the sign-out icon is only for the side menu's bottom block (see themes.css) */
.who .who-ico { display: none; }
/* 0.15.3.6a: Settings -> Theme: "Default theme for everyone" drop-down */
.theme-default { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 12px;
  border: var(--panel-border); border-radius: var(--radius); background: var(--bg-alt); }
.theme-default select { min-width: 220px; }
/* Settings -> General -> Your theme: one button per card, so it gets the card's full width */
.theme-gallery.my-themes .theme-actions { grid-template-columns: 1fr; }

/* 0.16a offline mode: the bar on a page shown from the copy saved on this device, and the offline / sending note */
.offline-bar { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius); background: #fff4d6; color: #5c4400;
  border: 1px solid #e6c766; font-weight: 600; }
.offline-status { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  padding: 9px 16px; border-radius: 20px; background: #333; color: #fff; font-size: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.offline-status[hidden] { display: none; }



/* ---------- module headings (0.16.1a; 0.16.1.3a: a normal menu item) ----------
   A module with several menu items starts with its name as an ordinary menu item that opens the module (Inventory →
   its Dashboard); the ▾ button right beside it folds the module's items away. */
.tabs .modrow { display: inline-flex; align-items: center; position: relative; }
.tabs .mod-fold {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 0 4px; margin: 0;
  border: 0; border-radius: var(--radius); background: none; cursor: pointer; color: var(--mod-head-text, var(--tab-text));
}
.tabs .mod-fold:hover { background: rgba(128, 128, 128, .18); }
.tabs .mod-fold:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.tabs .mod-fold .caret { display: inline-block; opacity: .9; transition: transform .2s ease; }
.tabs .modrow.folded .mod-fold .caret { transform: rotate(-90deg); }
.tabs .mod-gone { display: none !important; }      /* 0.16.1.8a: a folded module stays folded in the slim icon strip too (it shows just its own icon) */
@media (prefers-reduced-motion: reduce) { .tabs .mod-fold .caret { transition: none; } }

/* ---------- 0.16.1a: phone menu: bottom strip + menu sheet (hidden on wider screens) ----------
   Themes can restyle it with --mbar-bg, --mbar-text, --mbar-on, --mbar-line, --mbar-scan-bg, --mbar-scan-text,
   --msheet-bg and --msheet-text (they fall back to the theme's panel, text, link and accent colors). */
.mbar, .msheet, .msearch { display: none; }
@media (max-width: 700px) {
  header.top nav.tabs { display: none !important; }    /* the strip and sheet replace the menu across the top */
  header.top { padding-bottom: 8px; }
  .foot { display: none; }                             /* "Database online" and the version are in the sheet */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .offline-status { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .mbar { display: flex; }
}
@media not all and (min-width: 900px) {
  /* Sidebar themes use the quick menu until there is room for the full sidebar. */
  [data-theme="assetcloud"] header.top nav.tabs { display: none !important; }
  [data-theme="assetcloud"] header.top { padding-bottom: 8px; }
  [data-theme="assetcloud"] .foot { display: none; }
  [data-theme="assetcloud"] body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  [data-theme="assetcloud"] .offline-status { bottom: calc(80px + env(safe-area-inset-bottom)); }
  [data-theme="assetcloud"] .mbar { display: flex; }
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 4px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    background: var(--mbar-bg, var(--panel)); color: var(--mbar-text, var(--text));
    border-top: 1px solid var(--mbar-line, var(--line)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .10);
  }
  .mbar-item {
    flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 4px 2px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit;
    text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .mbar-item:hover { text-decoration: none; }
  .mbar-item:active { background: rgba(128, 128, 128, .15); }
  .mbar-item:focus-visible { outline: 2px solid var(--mbar-on, var(--link)); outline-offset: -2px; }
  .mbar-ico { font-size: calc(22px * var(--gs, 1)); line-height: 1; height: 26px; display: flex; align-items: center; justify-content: center; }
  .mbar-ico svg { width: 22px; height: 22px; }
  .mbar-scan .mbar-ico svg { width: 27px; height: 27px; }
  .mbar-txt { font-size: 12px; line-height: 1.2; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbar-item.on, .mbar-item[aria-expanded="true"] { color: var(--mbar-on, var(--link)); }
  .mbar-item.on .mbar-txt { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
  /* Scan: the big round button in the middle of the strip (only on phones with a camera) */
  .mbar-scan { display: none; }
  .can-scan .mbar-scan, .mbar-action { display: flex; }   /* a module's own middle button shows on every phone */
  .mbar-item.mbar-action { text-decoration: none; }
  .mbar-scan .mbar-ico {
    width: 54px; height: 54px; margin-top: -24px; border-radius: 50%; justify-content: center;
    background: var(--mbar-scan-bg, var(--accent)); color: var(--mbar-scan-text, #fff);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25); border: 3px solid var(--mbar-bg, var(--panel));
  }
  /* Audit page (0.16.1.14a): the middle button only scans into the audit, and looks it: green with a check */
  .mbar-scan.mbar-audit .mbar-ico { background: var(--mbar-audit-bg, #1e8e4e); color: #fff; }
  .mbar-scan.mbar-audit .mbar-txt { color: var(--mbar-audit-text, #1e8e4e); font-weight: 700; }
  .mbar-scan.mbar-audit-wait .mbar-ico { opacity: .55; }
  .mbar-note {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 80;
    max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px; background: rgba(0, 0, 0, .85); color: #fff;
    font-size: 14px; font-weight: 600; text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  }

  .msheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 70; }
  .msheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s ease; }
  .msheet.in .msheet-back { opacity: 1; }
  .msheet-panel {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 28px - env(safe-area-inset-top));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--msheet-bg, var(--panel)); color: var(--msheet-text, var(--text));
    border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .3);
    transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .msheet.in .msheet-panel { transform: none; }
  .msheet-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 18px 12px 8px 18px; touch-action: none; }
  .msheet-grip { position: absolute; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: currentColor; opacity: .25; }
  .msheet-head h2 { flex: 1; margin: 0; font: 400 19px var(--head-font); text-transform: var(--upper); letter-spacing: var(--spacing); }
  .msheet-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(128, 128, 128, .15); color: inherit; font-size: 18px; cursor: pointer; }
  .msheet-search { display: flex; gap: 8px; padding: 6px 14px 10px; }
  .msheet-search input { flex: 1; min-width: 0; min-height: 46px; font-size: 16px; border-radius: 12px; padding: 0 14px; }
  .msheet-scan { display: none; }
  .can-scan .msheet-scan { display: inline-flex; min-height: 46px; border-radius: 12px; align-items: center; gap: 4px; }
  .msheet-scan svg { width: 20px; height: 20px; }
  .msheet-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 10px 8px; -webkit-overflow-scrolling: touch; }
  .mgroup { margin: 4px 0 8px; border-radius: 14px; background: rgba(128, 128, 128, .07); }
  /* 0.16.1.3a: a module's row: its name opens the module, the ▾ beside it folds its pages */
  .mgroup-head { display: flex; align-items: center; border-radius: 14px; }
  .mgroup-name {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 6px 0 14px; border-radius: 14px;
    color: inherit; text-decoration: none; font: 400 15px var(--head-font); letter-spacing: 1px; text-transform: uppercase;
  }
  .mgroup-name:hover { text-decoration: none; }
  .mgroup-fold { flex: 0 0 52px; height: 52px; border: 0; border-radius: 14px; background: none; color: inherit; cursor: pointer; font-size: 14px; }
  .mgroup.current .mgroup-name { color: var(--mbar-on, var(--link)); }
  .mgroup-name:active, .mgroup-fold:active { background: rgba(128, 128, 128, .15); }
  .mgroup-name:focus-visible, .mgroup-fold:focus-visible { outline: 2px solid var(--mbar-on, var(--link)); outline-offset: -2px; }
  .mgroup-link {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; border-radius: 14px;
    background: none; color: inherit; cursor: pointer; text-align: left; text-decoration: none;
    font: 400 15px var(--head-font); letter-spacing: 1px; text-transform: uppercase;
  }
  .mgroup-link { margin: 4px 0 8px; background: rgba(128, 128, 128, .07); }
  .mgroup-link.on { color: var(--mbar-on, var(--link)); }
  .mgroup-label { flex: 1; }
  .mgroup-ico, .mlink-ico { width: 24px; text-align: center; font-size: 18px; opacity: .85; }
  .mgroup-caret { transition: transform .2s ease; }
  .mgroup.folded .mgroup-caret { transform: rotate(-90deg); }
  .mgroup-items { padding: 0 6px 6px; }
  .mlink, .msub > summary {
    display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 10px;
    color: inherit; text-decoration: none; font-size: 16px; cursor: pointer; list-style: none;
  }
  .msub > summary::-webkit-details-marker { display: none; }
  .msub > summary::after { content: "▾"; margin-left: auto; font-size: 12px; opacity: .7; transition: transform .2s ease; }
  .msub:not([open]) > summary::after { transform: rotate(-90deg); }
  .mlink.sub { padding-left: 48px; min-height: 44px; font-size: 15px; }
  .msub hr { border: 0; border-top: 1px solid var(--line); margin: 4px 12px 4px 48px; }
  .mlink:active, .msub > summary:active, .mgroup-head:active, .mgroup-link:active { background: rgba(128, 128, 128, .15); }
  .mlink.on { color: var(--mbar-on, var(--link)); font-weight: 600; background: rgba(128, 128, 128, .12); }
  .mlink:focus-visible, .msub > summary:focus-visible, .mgroup-head:focus-visible, .mgroup-link:focus-visible, .msheet-x:focus-visible {
    outline: 2px solid var(--mbar-on, var(--link)); outline-offset: -2px; }
  .msheet-foot { border-top: 1px solid var(--line); padding: 10px 16px 12px; font-size: 13px; }
  .msheet-user { font-weight: 600; margin-bottom: 8px; }
  .msheet-acts { display: flex; gap: 8px; margin-bottom: 8px; }
  .msheet-acts form { margin: 0; }
  .msheet-acts .btn { min-height: 44px; }
  .msheet-ver { color: var(--muted); font-size: 12px; }
  .msheet-ver .ok { color: var(--ok-text); font-weight: 600; }
  .msheet-ver a { color: inherit; }
  /* 0.16.1.1a: the strip's and sheet's icons are drawn too, all the same size (24px on the strip, 20px in the sheet) */
  .mbar-ico[data-ico="⌂"], .mlink-ico[data-ico="⌂"], .mgroup-ico[data-ico="⌂"],
  .mbar-ico[data-ico="⌕"], .mlink-ico[data-ico="⌕"], .mgroup-ico[data-ico="⌕"],
  .mbar-ico[data-ico="☑"], .mlink-ico[data-ico="☑"], .mgroup-ico[data-ico="☑"],
  .mbar-ico[data-ico="⚒"], .mlink-ico[data-ico="⚒"], .mgroup-ico[data-ico="⚒"],
  .mbar-ico[data-ico="◷"], .mlink-ico[data-ico="◷"], .mgroup-ico[data-ico="◷"],
  .mbar-ico[data-ico="◔"], .mlink-ico[data-ico="◔"], .mgroup-ico[data-ico="◔"],
  .mbar-ico[data-ico="✉"], .mlink-ico[data-ico="✉"], .mgroup-ico[data-ico="✉"],
  .mbar-ico[data-ico="☰"], .mlink-ico[data-ico="☰"], .mgroup-ico[data-ico="☰"],
  .mbar-ico[data-ico="▣"], .mlink-ico[data-ico="▣"], .mgroup-ico[data-ico="▣"] {
    font-size: 0; width: 24px; height: 24px; background: currentColor; opacity: 1;
    -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-size: 24px 24px; mask-size: 24px 24px;
  }
  .mbar-ico[data-ico="⌂"], .mlink-ico[data-ico="⌂"], .mgroup-ico[data-ico="⌂"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2011.2%2012%203.6l9%207.6'/%3E%3Cpath%20d='M5.6%209.4v11h12.8v-11'/%3E%3Cpath%20d='M10%2020.4v-6h4v6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2011.2%2012%203.6l9%207.6'/%3E%3Cpath%20d='M5.6%209.4v11h12.8v-11'/%3E%3Cpath%20d='M10%2020.4v-6h4v6'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="⌕"], .mlink-ico[data-ico="⌕"], .mgroup-ico[data-ico="⌕"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='10.5'%20cy='10.5'%20r='6.6'/%3E%3Cpath%20d='M15.4%2015.4%2021%2021'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='10.5'%20cy='10.5'%20r='6.6'/%3E%3Cpath%20d='M15.4%2015.4%2021%2021'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="☑"], .mlink-ico[data-ico="☑"], .mgroup-ico[data-ico="☑"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3.6'%20y='3.6'%20width='16.8'%20height='16.8'%20rx='2.6'/%3E%3Cpath%20d='M7.6%2012.4l3.1%203.1%205.9-6.8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3.6'%20y='3.6'%20width='16.8'%20height='16.8'%20rx='2.6'/%3E%3Cpath%20d='M7.6%2012.4l3.1%203.1%205.9-6.8'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="⚒"], .mlink-ico[data-ico="⚒"], .mgroup-ico[data-ico="⚒"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M15.6%203.4a4.6%204.6%200%200%200-4.3%206.2l-7.6%207.6a2%202%200%200%200%202.8%202.8l7.6-7.6a4.6%204.6%200%200%200%206.2-4.3l-2.7%202.7-2.6-.6-.6-2.6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M15.6%203.4a4.6%204.6%200%200%200-4.3%206.2l-7.6%207.6a2%202%200%200%200%202.8%202.8l7.6-7.6a4.6%204.6%200%200%200%206.2-4.3l-2.7%202.7-2.6-.6-.6-2.6z'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="◷"], .mlink-ico[data-ico="◷"], .mgroup-ico[data-ico="◷"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3.6'%20y='5'%20width='16.8'%20height='15.4'%20rx='2.4'/%3E%3Cpath%20d='M3.6%209.6h16.8M8%203v4M16%203v4M8%2013.4h.01M12%2013.4h.01M16%2013.4h.01M8%2017h.01M12%2017h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3.6'%20y='5'%20width='16.8'%20height='15.4'%20rx='2.4'/%3E%3Cpath%20d='M3.6%209.6h16.8M8%203v4M16%203v4M8%2013.4h.01M12%2013.4h.01M16%2013.4h.01M8%2017h.01M12%2017h.01'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="◔"], .mlink-ico[data-ico="◔"], .mgroup-ico[data-ico="◔"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203.6a8.4%208.4%200%201%200%208.4%208.4H12z'/%3E%3Cpath%20d='M15%202.9a8.4%208.4%200%200%201%206.1%206.1H15z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203.6a8.4%208.4%200%201%200%208.4%208.4H12z'/%3E%3Cpath%20d='M15%202.9a8.4%208.4%200%200%201%206.1%206.1H15z'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="✉"], .mlink-ico[data-ico="✉"], .mgroup-ico[data-ico="✉"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='5.4'%20width='18'%20height='13.2'%20rx='2.2'/%3E%3Cpath%20d='M3.6%207.2l8.4%206%208.4-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='5.4'%20width='18'%20height='13.2'%20rx='2.2'/%3E%3Cpath%20d='M3.6%207.2l8.4%206%208.4-6'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="☰"], .mlink-ico[data-ico="☰"], .mgroup-ico[data-ico="☰"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%207h16M4%2012h16M4%2017h16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%207h16M4%2012h16M4%2017h16'/%3E%3C/svg%3E"); }
  .mbar-ico[data-ico="▣"], .mlink-ico[data-ico="▣"], .mgroup-ico[data-ico="▣"] { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='g'%3E%3Crect width='24' height='24' fill='%23fff'/%3E%3Crect x='11' y='5.6' width='13' height='18.4' rx='2.6' fill='%23000'/%3E%3C/mask%3E%3Cmask id='c'%3E%3Crect width='24' height='24' fill='%23fff'/%3E%3Crect x='14.2' y='5.9' width='6.6' height='4.4' rx='1.6' fill='%23000'/%3E%3Cpath d='M14.6 13.1l1 1 1.9-2.1M14.6 17.6l1 1 1.9-2.1M18.9 13.1h1.9M18.9 17.6h1.9' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url%28%23g%29'%3E%3Cpath d='M1.6 6.7L8.6 3.2l7 3.5-7 3.5z'/%3E%3Cpath d='M1 7.8l7 3.5v9.2l-7-3.5z'/%3E%3Cpath d='M9.2 11.3l7-3.5v9.2l-7 3.5z'/%3E%3C/g%3E%3Crect x='12.5' y='8' width='10' height='14.6' rx='1.7' mask='url%28%23c%29'/%3E%3Crect x='15' y='6.7' width='5' height='2.8' rx='1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='g'%3E%3Crect width='24' height='24' fill='%23fff'/%3E%3Crect x='11' y='5.6' width='13' height='18.4' rx='2.6' fill='%23000'/%3E%3C/mask%3E%3Cmask id='c'%3E%3Crect width='24' height='24' fill='%23fff'/%3E%3Crect x='14.2' y='5.9' width='6.6' height='4.4' rx='1.6' fill='%23000'/%3E%3Cpath d='M14.6 13.1l1 1 1.9-2.1M14.6 17.6l1 1 1.9-2.1M18.9 13.1h1.9M18.9 17.6h1.9' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url%28%23g%29'%3E%3Cpath d='M1.6 6.7L8.6 3.2l7 3.5-7 3.5z'/%3E%3Cpath d='M1 7.8l7 3.5v9.2l-7-3.5z'/%3E%3Cpath d='M9.2 11.3l7-3.5v9.2l-7 3.5z'/%3E%3C/g%3E%3Crect x='12.5' y='8' width='10' height='14.6' rx='1.7' mask='url%28%23c%29'/%3E%3Crect x='15' y='6.7' width='5' height='2.8' rx='1'/%3E%3C/svg%3E"); }
  .mlink-ico[data-ico="⌂"], .mgroup-ico[data-ico="⌂"],
  .mlink-ico[data-ico="⌕"], .mgroup-ico[data-ico="⌕"],
  .mlink-ico[data-ico="☑"], .mgroup-ico[data-ico="☑"],
  .mlink-ico[data-ico="⚒"], .mgroup-ico[data-ico="⚒"],
  .mlink-ico[data-ico="◷"], .mgroup-ico[data-ico="◷"],
  .mlink-ico[data-ico="◔"], .mgroup-ico[data-ico="◔"],
  .mlink-ico[data-ico="✉"], .mgroup-ico[data-ico="✉"],
  .mlink-ico[data-ico="☰"], .mgroup-ico[data-ico="☰"],
  .mlink-ico[data-ico="▣"], .mgroup-ico[data-ico="▣"] { width: 20px; height: 20px; -webkit-mask-size: 20px 20px; mask-size: 20px 20px; margin: 0 2px; }
  /* 0.16.1.2a: Search's own bar at the top of the screen: the box, Scan and Cancel */
  .msearch:not([hidden]) { display: block; position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 72; }
  .msearch-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .18s ease; }
  .msearch.in .msearch-back { opacity: 1; }
  .msearch-bar {
    position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; margin: 0;
    padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
    background: var(--msheet-bg, var(--panel)); color: var(--msheet-text, var(--text));
    border-radius: 0 0 16px 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
  }
  .msearch-bar input { flex: 1; min-width: 0; min-height: 46px; font-size: 16px; border-radius: 12px; padding: 0 14px; }
  .msearch-scan { display: none; }
  .can-scan .msearch-scan {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 46px; width: 46px; height: 46px;
    border: 0; border-radius: 12px; cursor: pointer;
    background: var(--mbar-scan-bg, var(--accent)); color: var(--mbar-scan-text, #fff);
  }
  .msearch-scan svg { width: 24px; height: 24px; }
  .msearch-cancel {
    flex: 0 0 auto; min-height: 46px; padding: 0 4px 0 6px; border: 0; background: none; cursor: pointer;
    color: var(--mbar-on, var(--link)); font: 600 15px var(--font);
  }
  .msearch-scan:focus-visible, .msearch-cancel:focus-visible { outline: 2px solid var(--mbar-on, var(--link)); outline-offset: 2px; }
  /* 0.16.1.3a: the Inventory's own icon (a box) */
  .mgroup-ico[data-ico="▤"], .mbar-ico[data-ico="▤"], .mlink-ico[data-ico="▤"] {
    font-size: 0; width: 20px; height: 20px; margin: 0 2px; background: currentColor; opacity: 1;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%202.8%203.4%207.4v9.2L12%2021.2l8.6-4.6V7.4z'/%3E%3Cpath%20d='M3.6%207.5%2012%2012l8.4-4.5M12%2012v9'/%3E%3Cpath%20d='M7.8%205.1l8.5%204.6'/%3E%3C/svg%3E") center / 20px 20px no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%202.8%203.4%207.4v9.2L12%2021.2l8.6-4.6V7.4z'/%3E%3Cpath%20d='M3.6%207.5%2012%2012l8.4-4.5M12%2012v9'/%3E%3Cpath%20d='M7.8%205.1l8.5%204.6'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  }
  /* 0.16.1.4a: a person ("Mine") */
  .mbar-ico[data-ico="◉"], .mlink-ico[data-ico="◉"] {
    font-size: 0; width: 24px; height: 24px; background: currentColor; opacity: 1;
    -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='8.5'%20r='3.8'/%3E%3Cpath%20d='M4.5%2020.5c1.3-3.6%204.2-5.3%207.5-5.3s6.2%201.7%207.5%205.3'/%3E%3C/svg%3E") center / 24px 24px no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='8.5'%20r='3.8'/%3E%3Cpath%20d='M4.5%2020.5c1.3-3.6%204.2-5.3%207.5-5.3s6.2%201.7%207.5%205.3'/%3E%3C/svg%3E") center / 24px 24px no-repeat;
  }
  html.msheet-open, html.msheet-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .msheet-panel, .msheet-back, .msearch-back, .mgroup-caret, .msub > summary::after { transition: none; }
}

/* 0.16.1.6a: Settings -> Email */
.mail-now { margin: 0; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }
.mail-now.ok { border-color: rgba(46, 139, 61, .45); background: rgba(46, 139, 61, .08); }
.mail-now.off { border-color: rgba(200, 140, 20, .45); background: rgba(240, 180, 40, .10); }
.mail-steps { margin: 10px 0 0; padding-left: 22px; line-height: 1.55; }
.mail-steps li { margin-bottom: 8px; }
.mail-copy { user-select: all; word-break: break-all; }

/* 0.16.1.7a: every dropdown gets the same arrow, a little in from the right edge, in the theme's own text color
   (the browsers' built-in arrows sat tight against the edge and differed between computers and phones). The
   !importants keep it when a theme pack resets a dropdown's background or padding. Lists that show several rows
   (multiple / size) keep their normal look. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%) !important;
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52% !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 32px !important;
  text-overflow: ellipsis;
}
select:not([multiple]):not([size])::-ms-expand { display: none; }
select:not([multiple]):not([size]):disabled { opacity: .6; }

/* 0.16.1.10a: phone Menu sheet: a module's items sit a little in from its heading, a touch lighter (same size) */
.mgroup-items .mlink, .mgroup-items .msub > summary { padding-left: 22px; }
.mgroup-items .mlink.sub { padding-left: 58px; }
.mgroup-items .mlink:not(.on), .mgroup-items .msub > summary { opacity: .88; }
.mgroup-name { font-weight: 700; }
/* 0.16.1.10a: the module heading's ▾ turns smoothly as its items glide open or shut */
.tabs .modrow .mod-fold .caret, .mgroup-caret { transition: transform .22s ease; }
@media (prefers-reduced-motion: reduce) { .tabs .modrow .mod-fold .caret, .mgroup-caret { transition: none; } }

/* 0.16.2a: Settings -> Plugins */
.pl-badge { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--chip, rgba(0,0,0,.06)); color: var(--muted, #667); white-space: nowrap; }
.pl-restart .panel-body form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pl-restart { border-left: 4px solid #d08b00; }
.pl-trust { display: block; margin-top: 10px; font-size: 13px; }
.pl-signers { margin: 0 0 12px; padding-left: 18px; line-height: 1.9; }
.pl-log { max-width: 460px; font-size: 12px; }

/* 0.16.2.2a: Backups page, "status first" */
.okc { color: var(--green); }
.warnc { color: var(--yellow); }
.bk-health .bk-verdict { margin-left: auto; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.bk-health.ok .bk-verdict { color: var(--green); }
.bk-health.warn .bk-verdict { color: var(--yellow); }
.bk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.bk-stat { border: var(--panel-border); border-radius: 6px; padding: 10px 12px; background: var(--bg-alt); }
.bk-stat .k { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--muted); }
.bk-stat .v { font-weight: 600; margin-top: 2px; }
.bk-stat .s { font-size: 12px; }
.bk-problems { margin: 12px 0 0; padding: 8px 12px; list-style: none; border-left: 3px solid var(--yellow); background: var(--bg-alt); border-radius: 0 6px 6px 0; }
.bk-problems li { margin: 3px 0; }
.bk-now { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.bk-now .bk-restore-btn { margin-left: auto; }
/* 0.16.2.5a: select and delete several backups */
.bk-sel-bar { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bk-sel-bar .bk-del-btn { margin-left: auto; }
@media (max-width: 700px) { .bk-sel-bar .bk-del-btn { margin-left: 0; } }
/* 0.16.2.4a: the Back up pop-up and the backup password pop-up */
.bk-now-dlg, .bk-pw-dlg { width: min(440px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; }
.bk-now-dlg .bk-lock, .bk-now-dlg .bk-chk { display: block; margin: 6px 0; }
.bk-now-dlg .bk-other { margin: 4px 0 8px 24px; display: grid; gap: 6px; }
.bk-now-dlg .bk-other[hidden] { display: none; }
.bk-now-dlg input[type=password], .bk-pw-dlg input[type=password] { width: 100%; box-sizing: border-box; }
.bk-chk { display: inline-flex; gap: 6px; align-items: center; }
.bk-hint { margin: 8px 0 0; font-size: 12px; }
.panel-title .bk-all-link { margin-left: auto; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 400; }
.bk-recent .bk-pick summary { display: inline-block; }
.bk-pick[open] { padding: 4px 0; }
.bk-pick[open] > a, .bk-pick[open] > ul { display: block; margin: 4px 0; text-align: left; }
details.bk-fold { margin-bottom: 10px; border: var(--panel-border); border-radius: var(--panel-radius); background: var(--bg); }
details.bk-fold > summary { cursor: pointer; list-style: none; padding: 11px 14px; display: flex; gap: 10px; align-items: baseline; font-weight: 600; flex-wrap: wrap; }
details.bk-fold > summary::-webkit-details-marker { display: none; }
details.bk-fold > summary::before { content: "▸"; color: var(--muted); display: inline-block; transition: transform .15s; }
details.bk-fold[open] > summary::before { transform: rotate(90deg); }
details.bk-fold > summary .bk-sum { margin-left: auto; font-weight: 400; font-size: 12px; }
.bk-in { padding: 12px 14px; border-top: 1px solid var(--line); }
.bk-cards .panel { margin-bottom: 10px; }
@media (max-width: 700px) {
  .bk-hide-sm { display: none; }
  .bk-now .bk-restore-btn { margin-left: 0; }
  details.bk-fold > summary .bk-sum { margin-left: 22px; width: 100%; }
}

/* 0.16.3.5a: a clear keyboard focus ring on every theme. It takes the element's own text colour, so it shows on light
   and dark surfaces alike; a theme pack can set --focus-ring instead. Mouse and touch clicks don't show it. */
a:focus-visible, button:focus-visible, summary:focus-visible, [role=button]:focus-visible, [tabindex]:focus-visible,
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible {
  outline: 2px solid var(--focus-ring, currentColor); outline-offset: 2px;
}
/* a button that opens a fold-out (+ Add maintenance or repair) keeps button text colour, not the muted link colour */
details.row-tools summary.btn:not(.quiet):not(.danger) { color: var(--btn-text); }
/* the tick boxes in lists: on phones the whole 44px square around the box ticks it */
label.tick { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media screen and (max-width: 700px) {
  label.tick { min-width: 44px; min-height: 44px; margin: -10px -8px; }
  label.tick input[type=checkbox] { width: 20px; height: 20px; }
}

/* ====================================================================================================
   0.16.3.7a: shared page parts for every module (docs/adr/0001-one-shared-design-system.md).
   They take their colours from the active theme (its --pill-*, --chip-*, --selbar-* tokens if it has them,
   otherwise its usual colours), so every theme keeps working.
   ==================================================================================================== */

/* each person's text size (Settings -> General -> Your theme); zoom scales every theme the same way */
:root[data-textsize="compact"] body { zoom: .92; }
:root[data-textsize="large"] body { zoom: 1.14; }
.text-size-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 4px; }

/* page header: title, a count, one main action on the right */
.page-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 12px; }
.page-head h1 { margin: 0; font-family: var(--head-font, inherit); font-weight: 500; font-size: 24px; line-height: 1.15; color: var(--title-text, var(--text)); }
.page-head .count { color: var(--muted); font-size: 13.5px; }
.page-head .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 600px) {
  .page-head h1 { font-size: 21px; flex: 1 1 100%; }
  .page-head .acts .secondary { display: none; }      /* phones: the main action and the "…" menu only */
  .page-head .acts { margin-left: 0; }
}

/* status pills: a word and a colour, never a colour alone (green fine, amber soon, red problem, blue in progress, grey ended) */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px;
        border-radius: 99px; border: 1px solid; white-space: nowrap; vertical-align: 1px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; flex: none; }
.pill.ok   { color: var(--pill-ok-text, var(--green));  background: var(--pill-ok-bg, transparent);   border-color: var(--pill-ok-line, currentColor); }
.pill.warn { color: var(--pill-warn-text, var(--text)); background: var(--pill-warn-bg, transparent); border-color: var(--pill-warn-line, var(--yellow)); }
.pill.bad  { color: var(--pill-bad-text, var(--red));   background: var(--pill-bad-bg, transparent);  border-color: var(--pill-bad-line, currentColor); }
.pill.info { color: var(--pill-info-text, var(--link)); background: var(--pill-info-bg, transparent); border-color: var(--pill-info-line, currentColor); }
.pill.off  { color: var(--pill-off-text, var(--muted)); background: var(--pill-off-bg, transparent);  border-color: var(--pill-off-line, var(--line)); }
.pill.warn::before { background: var(--pill-warn-text, var(--yellow)); }

/* filters in use, as chips you can remove */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 8px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 3px 4px 3px 10px; border-radius: 99px;
        background: var(--chip-bg, var(--bg-alt)); color: var(--chip-text, var(--text)); border: 1px solid var(--chip-line, var(--line)); }
.chip a, .chip button { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 99px; border: 0; background: transparent;
        color: inherit; text-decoration: none; cursor: pointer; font-size: 14px; line-height: 1; }
.chip a:hover, .chip button:hover { background: var(--hover); }

/* the selection bar: shows only while rows are ticked */
.selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border-radius: 6px; margin: 0 0 10px;
          background: var(--selbar-bg, var(--title-bg, #333)); color: var(--selbar-text, var(--title-text, #fff)); }
.selbar[hidden] { display: none; }
.selbar .sel-count { font-weight: 700; margin-right: 4px; }
.selbar .btn { background: rgba(255,255,255,.1); color: inherit; border-color: rgba(255,255,255,.35); }
.selbar .btn:hover { background: rgba(255,255,255,.22); color: inherit; }
.selbar .btn.danger { border-color: rgba(255,170,170,.7); }
.selbar .end { margin-left: auto; }

/* drawn icons (one stroke set, from the core's icon sheet) */
svg.ico-svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* phone cards: a list row becomes a card on narrow screens (tables with class "cardify") */
@media (max-width: 700px) {
  table.cardify thead { display: none; }
  table.cardify, table.cardify tbody { display: block; }
  table.cardify tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; margin: 0 0 8px; border: 1px solid var(--line);
                     border-radius: 8px; background: var(--panel); }
  table.cardify td { display: block; border: 0; padding: 0; white-space: normal; }
  table.cardify td:not([data-card]) { display: none; }
  table.cardify td[data-card="title"] { grid-column: 1; font-weight: 600; }
  table.cardify td[data-card="badge"] { grid-column: 2; grid-row: 1; justify-self: end; }
  table.cardify td[data-card="main"] { grid-column: 1; font-size: 15px; }
  table.cardify td[data-card="meta"] { grid-column: 1; color: var(--muted); font-size: 13px; }
  table.cardify td[data-card="pick"] { grid-column: 2; grid-row: 2 / span 2; justify-self: end; align-self: center; }
}

/* readability floor: small print stays readable (12px), whatever the theme */
small, .small, .hint { font-size: max(12px, 0.86em); }
/* the selection bar's buttons stay quiet outlines on its dark bar, whatever the theme's button colour */
html:root .selbar .btn { background: rgba(255,255,255,.08) !important; color: inherit !important; border-color: rgba(255,255,255,.4) !important; box-shadow: none !important; }   /* beats a theme's filled buttons */
html:root .selbar .btn:hover { background: rgba(255,255,255,.2) !important; }
html:root .selbar .btn.danger { border-color: rgba(255,170,170,.75) !important; color: #ffd6d6 !important; }

/* the selection bar fades and slides up when it appears (a still fade for people who ask for less motion) */
@keyframes selbar-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes selbar-fade { from { opacity: 0; } to { opacity: 1; } }
.selbar:not([hidden]) { animation: selbar-in .22s cubic-bezier(.16, 1, .3, 1) both; }
@media (prefers-reduced-motion: reduce) { .selbar:not([hidden]) { animation: selbar-fade .15s ease-out both; } }

/* 0.16.3.14a: a drop-down menu that is open (a <details> pop-up, like the "…" on an asset) stays on top of the
   panels further down the page. Themes that give panels a frosted-glass blur make each panel its own layer, and a
   later panel (History) was drawn over the earlier panel's open menu. */
.panel:has(details[open]) { position: relative; z-index: 5; }   /* under the menu bar (20), over later panels */

/* ====================================================================================================
   0.16.3.9a: smooth page changes. Moving between pages cross-fades the page area while the side menu,
   header and footer stay still (browsers that support cross-page view transitions: Chrome, Edge, Safari 18.2+;
   others just load the page as before). Nothing moves for people who ask their device for less motion.
   ==================================================================================================== */
@view-transition { navigation: auto; }
header.top { view-transition-name: app-header; }
footer.foot { view-transition-name: app-footer; }
main { view-transition-name: app-main; }
::view-transition-group(app-header), ::view-transition-group(app-footer) { animation: none; }
::view-transition-old(app-header), ::view-transition-old(app-footer) { display: none; }
::view-transition-new(app-header), ::view-transition-new(app-footer) { animation: none; }
::view-transition-old(app-main) { animation: none; display: none; }   /* 0.16.3.11a: no fade; the page area swaps in one step */
::view-transition-new(app-main) { animation: none; }   /* the side menu, header and footer stay perfectly still */
::view-transition-group(app-main) { animation: none; }   /* no stretching when the new page is taller or shorter */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* 0.16.6.2a: column widths you can change (static/colresize.js). Near a heading's right edge the cursor shows it can
   be dragged. In a column made narrow the heading ends in "…" and cell text wraps (cells aren't cut off, so menus that
   open inside a row, like More on the Lists pages, still show). */
th.col-edge { cursor: ew-resize; box-shadow: inset -2px 0 0 var(--line, rgba(127, 127, 127, .5)); }
.col-dragging, .col-dragging * { cursor: ew-resize !important; user-select: none; }
table.cols-sized th, .pinned-head th { overflow: hidden; text-overflow: ellipsis; }
table.cols-sized td { overflow-wrap: anywhere; }
/* 0.16.6.18a: themes cap some one-line cells (an asset's Description, Category, Site…) so a list fits the screen; once
   someone sets column widths, the text follows the column instead: wider shows more, narrower ends in "…" */
table.cols-sized td .cell { max-width: none !important; }
/* a list shown as cards is never held at saved column widths (colresize.js also takes them off) */
@media (max-width: 700px) { table.cardify { min-width: 0 !important; table-layout: auto !important; } }

/* 0.16.7a: search fields (static/searchfield.js). Type a few letters, pick from the list under the box. Same look in every
   theme (it uses the theme's input colours) and on phones (the list stays under the box, short and scrolling). */
.sf { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; }
.field .sf, .rb-form .sf { display: block; width: 100%; }
.sf .sf-input { width: 100%; padding-right: 26px; }
.filters .sf .sf-input { width: 200px; }
.sf-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted);
  font-size: 16px; line-height: 1; padding: 2px 5px; cursor: pointer; display: none; }
.sf.has-value .sf-clear { display: block; }
.sf-input:disabled ~ .sf-clear { display: none !important; }
.sf-clear:hover { color: var(--text); }
.sf-list { position: absolute; z-index: 60; left: 0; top: calc(100% + 2px); min-width: 100%; width: max-content; max-width: min(440px, 92vw);
  max-height: 290px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none; text-transform: none; letter-spacing: 0;
  background: var(--input-bg); color: var(--text); border: 1px solid var(--input-border); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28); }
.sf-list li { padding: 5px 10px; cursor: pointer; font-size: 13px; line-height: 1.3; }
.sf-list li.active, .sf-list li[data-i]:hover { background: var(--hover); }
.sf-list li.active { box-shadow: inset 3px 0 0 var(--accent); }
.sf-name { display: block; }
.sf-sub { display: block; color: var(--muted); font-size: 12px; }
.sf-list .sf-add { color: var(--accent); }
.sf-list .sf-more { color: var(--muted); font-size: 12px; cursor: default; }
.sf.bad .sf-input { border-color: var(--red); }
/* in a dialog the list takes room in it, so the dialog's own scrolling can't cut it off */
dialog .sf-list { position: static; width: 100%; max-width: none; max-height: 220px; margin-top: 2px; box-shadow: none; }
.sf-msg[hidden] { display: none; }
.sf-msg { display: block; color: var(--red); font-size: 12px; margin-top: 2px; text-transform: none; letter-spacing: 0; }
@media (max-width: 720px) {
  .sf-list { max-height: 40vh; width: 100%; max-width: none; }
  .sf-list li { padding: 8px 10px; }
  .filters .sf .sf-input { width: 100%; }
}
