/* The menu screen (#/menu), ported from the demo dashboard (sites/lib/eg/assets/dashboard.tpl.html: .top, .btn,
   .card, .catbar, .catchip, .toolbar, .search, .tw, table.resp, .grp, .th, .pinput, .sw, .ibtn, .chip, .f, .row2,
   .chipseg, .modal/.mbox/.mhead/.mfoot, .empty, and the phone layout under 820px). The rules are the demo's own,
   scoped under .dm so the rest of the dashboard keeps its look; the demo's inline style="" became classes (dm-*),
   because this page's policy has no 'unsafe-inline'. Colours are tokens (tokens.css, --dm-*). */
.dm { --r: 18px; color: var(--dm-ink); background: var(--dm-bg); border-radius: var(--r-lg); padding: 18px;
  margin: -4px 0 0; font-size: 14px; }
.dm .top { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dm .top h1 { font-size: 24px; margin: 0; font-weight: 800; }
.dm .top .sp { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.dm .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px;
  padding: 10px 15px; background: var(--dm-solid); color: var(--dm-solidfg); font-weight: 600; cursor: pointer;
  font-size: 14px; line-height: 1.3; min-height: 0; box-shadow: none; }
.dm .btn:disabled { opacity: .45; cursor: not-allowed; }
.dm .btn.g { background: var(--dm-card); color: var(--dm-ink); box-shadow: inset 0 0 0 1px var(--dm-line); }
.dm .btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.dm .btn.bad { background: var(--dm-bad2); color: var(--dm-bad); }
.dm .card { background: var(--dm-card); border-radius: var(--r); padding: 18px; min-width: 0; box-shadow: none; }
.dm .muted { color: var(--dm-muted); }
.dm .num { font-variant-numeric: tabular-nums; }
.dm .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 6px; }
.dm .search { flex: 1; min-width: 180px; border: 0; background: var(--dm-soft); color: var(--dm-ink); border-radius: 12px;
  padding: 10px 14px; font: inherit; }
.dm .dm-note { margin: 0 0 6px; font-size: 13.5px; }
.dm .tw { overflow-x: auto; }
.dm table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dm th { text-align: start; font-weight: 600; color: var(--dm-muted); font-size: 12.5px; padding: 8px 10px;
  border-bottom: 1px solid var(--dm-line); white-space: nowrap; }
.dm td { padding: 10px; border-bottom: 1px solid var(--dm-line); vertical-align: middle; }
.dm .grp td { background: var(--dm-soft); font-weight: 700; font-size: 13px; }
.dm .th { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; background: var(--dm-soft); flex: none; display: block; }
.dm .dm-desc { font-size: 12.5px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm .pinput { width: 92px; border: 1px solid var(--dm-line); background: var(--dm-soft); color: var(--dm-ink);
  border-radius: 10px; padding: 7px 8px; text-align: center; font: inherit; }
.dm .sw { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.dm .sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.dm .sw span { position: absolute; inset: 0; border-radius: 99px; background: var(--dm-line); transition: .2s; }
.dm .sw span::before { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; inset-inline-start: 3px;
  border-radius: 50%; background: var(--dm-knob); transition: .2s; }
.dm .sw input:checked + span { background: var(--dm-ok); }
.dm .sw input:checked + span::before { transform: translateX(-18px); }
[dir="ltr"] .dm .sw input:checked + span::before { transform: translateX(18px); }
.dm .sw input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.dm .ibtn { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--dm-soft); cursor: pointer;
  display: inline-grid; place-items: center; color: var(--dm-ink); flex: none; padding: 0; }
.dm .ibtn:hover { background: var(--dm-line); }
.dm .ibtn .icon { width: 16px; height: 16px; }
.dm .acts { white-space: nowrap; }
.dm .acts .ibtn + .ibtn { margin-inline-start: 4px; }
.dm .catbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.dm .catchip { display: inline-flex; align-items: center; gap: 6px; background: var(--dm-soft); border-radius: 99px;
  padding: 5px 6px 5px 12px; font-weight: 600; font-size: 14px; }
.dm .catchip .muted { font-weight: 400; }
.dm .catchip .ibtn { width: 26px; height: 26px; border-radius: 50%; background: var(--dm-card); }
.dm .chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.dm .chip.p { background: var(--dm-warn2); color: var(--dm-warn); }
.dm .empty { color: var(--dm-muted); text-align: center; padding: 26px 10px; font-size: 14px; }
.dm .dm-pending { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--dm-warn2);
  color: var(--dm-warn); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-weight: 600; }
.dm .dm-pending .btn { margin-inline-start: auto; }

/* the item, category and bulk sheets: the demo's .modal / .mbox, as a native <dialog> (focus and Escape for free) */
.dm-modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%;
  color: var(--dm-ink); }
.dm-modal[open] { display: grid; place-items: center; }
.dm-modal::backdrop { background: var(--dm-scrim); }
.dm-modal .mbox { background: var(--dm-card); border-radius: 22px; width: min(560px, calc(100% - 32px)); max-height: 90vh;
  overflow: auto; padding: 0 20px 20px; }
.dm-modal .mhead { position: sticky; top: 0; background: var(--dm-card); display: flex; align-items: center;
  justify-content: space-between; gap: 10px; padding: 18px 0 12px; z-index: 2; }
.dm-modal .mhead h3 { margin: 0; font-size: 18px; }
.dm-modal .mfoot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; position: sticky;
  bottom: -20px; background: var(--dm-card); padding: 12px 0; }
.dm-modal .f { display: grid; gap: 12px; }
.dm-modal .f label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--dm-muted); }
.dm-modal .f input, .dm-modal .f textarea, .dm-modal .f select { border: 1px solid var(--dm-line); background: var(--dm-soft);
  border-radius: 12px; padding: 10px 12px; color: var(--dm-ink); width: 100%; min-width: 0; font: inherit; }
.dm-modal .f label.sw { display: inline-block; }
.dm-modal .f label.sw input { width: 100%; padding: 0; }
.dm-modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dm-modal .dm-photo { display: flex; gap: 14px; align-items: center; }
.dm-modal .dm-photo .th { width: 84px; height: 84px; border-radius: 16px; }
.dm-modal .dm-photo-btns { display: grid; gap: 6px; }
.dm-modal .dm-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dm-modal .swrow { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.dm-modal .swrow b { display: block; color: var(--dm-ink); }
.dm-modal .swrow small { color: var(--dm-muted); font-weight: 400; }
.dm-modal .chipseg { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-modal .chipseg button { border: 0; background: var(--dm-soft); color: var(--dm-ink); border-radius: 10px; padding: 7px 12px;
  font-weight: 600; font-size: 13.5px; cursor: pointer; }
.dm-modal .chipseg button[aria-pressed="true"] { background: var(--dm-solid); color: var(--dm-solidfg); }
.dm-modal .dm-small { margin: 0; font-size: 13.5px; color: var(--dm-muted); }
.dm-modal .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px;
  padding: 10px 15px; background: var(--dm-solid); color: var(--dm-solidfg); font-weight: 600; cursor: pointer; font-size: 14px; }
.dm-modal .btn.g { background: var(--dm-card); color: var(--dm-ink); box-shadow: inset 0 0 0 1px var(--dm-line); }
.dm-modal .btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.dm-modal .btn.bad { background: var(--dm-bad2); color: var(--dm-bad); }
.dm-modal .ibtn { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--dm-soft); cursor: pointer;
  display: inline-grid; place-items: center; color: var(--dm-ink); }
.dm-modal .ibtn .icon { width: 16px; height: 16px; }
.dm-modal .sw { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.dm-modal .sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.dm-modal .sw span { position: absolute; inset: 0; border-radius: 99px; background: var(--dm-line); transition: .2s; }
.dm-modal .sw span::before { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; inset-inline-start: 3px;
  border-radius: 50%; background: var(--dm-knob); transition: .2s; }
.dm-modal .sw input:checked + span { background: var(--dm-ok); }
.dm-modal .sw input:checked + span::before { transform: translateX(-18px); }
[dir="ltr"] .dm-modal .sw input:checked + span::before { transform: translateX(18px); }
.dm-modal .th { object-fit: cover; background: var(--dm-soft); display: block; }

@media (max-width: 820px) {
  .dm { padding: 12px; }
  .dm .top h1 { font-size: 21px; }
  .dm .btn.sm { min-height: 44px; }
  .dm table.resp thead { display: none; }
  .dm table.resp, .dm table.resp tbody { display: block; }
  .dm table.resp tr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; padding: 12px 0;
    border-bottom: 1px solid var(--dm-line); }
  .dm table.resp td { border: 0; padding: 0; min-width: 0; }
  .dm table.resp td.nm { flex: 1 1 55%; align-self: center; }
  .dm table.resp td.wide { flex: 1 1 100%; }
  .dm table.resp tr.grp { display: block; padding: 0; border: 0; }
  .dm table.resp tr.grp td { display: block; padding: 6px 10px; border-radius: 8px; }
  .dm table.resp td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--dm-muted);
    font-weight: 600; margin-bottom: 3px; }
  .dm-modal .row2 { grid-template-columns: minmax(0, 1fr); }
}
