:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f1f4f7;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-ink: #ffffff;
  --accent-soft: #ccfbf1;
  --d-bg: #fde68a;
  --d-ink: #713f12;
  --n-bg: #3730a3;
  --n-ink: #ffffff;
  --f-bg: #dcfce7;
  --f-ink: #166534;
  --c-bg: #dbeafe;
  --c-ink: #1e40af;
  --nn: #db2777;
  --we: #f1f5f9;
  --hol: #fde8e8;
  --err: #dc2626;
  --err-soft: #fee2e2;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --over: #1d4ed8;
  --sel: #0ea5e9;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 4px 16px rgb(15 23 42 / 6%);
  --radius: 10px;
  --cell: 31px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1220;
    --surface: #111a2b;
    --surface-2: #162036;
    --border: #23314b;
    --border-strong: #33456a;
    --text: #e6eaf2;
    --muted: #94a3b8;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-ink: #042f2e;
    --accent-soft: #134e4a;
    --d-bg: #fbbf24;
    --d-ink: #3b2203;
    --n-bg: #6366f1;
    --n-ink: #ffffff;
    --f-bg: #14532d;
    --f-ink: #bbf7d0;
    --c-bg: #1e3a8a;
    --c-ink: #dbeafe;
    --nn: #f472b6;
    --we: #152038;
    --hol: #3a1d27;
    --err: #f87171;
    --err-soft: #451a1a;
    --warn: #fbbf24;
    --warn-soft: #3d2c0b;
    --ok: #4ade80;
    --ok-soft: #12321f;
    --over: #93c5fd;
    --sel: #38bdf8;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1220;
  --surface: #111a2b;
  --surface-2: #162036;
  --border: #23314b;
  --border-strong: #33456a;
  --text: #e6eaf2;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-ink: #042f2e;
  --accent-soft: #134e4a;
  --d-bg: #fbbf24;
  --d-ink: #3b2203;
  --n-bg: #6366f1;
  --n-ink: #ffffff;
  --f-bg: #14532d;
  --f-ink: #bbf7d0;
  --c-bg: #1e3a8a;
  --c-ink: #dbeafe;
  --nn: #f472b6;
  --we: #152038;
  --hol: #3a1d27;
  --err: #f87171;
  --err-soft: #451a1a;
  --warn: #fbbf24;
  --warn-soft: #3d2c0b;
  --ok: #4ade80;
  --ok-soft: #12321f;
  --over: #93c5fd;
  --sel: #38bdf8;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.boot {
  padding: 40px;
  color: var(--muted);
}

/* ------------------------------------------------------------ pulsanti */
.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
}
.btn:hover {
  background: var(--surface-2);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover {
  background: var(--accent-hover);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.ghost:hover {
  background: var(--surface-2);
}
.btn.danger {
  color: var(--err);
}
.btn.small {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
:focus-visible {
  outline: 2px solid var(--sel);
  outline-offset: 1px;
}

/* ------------------------------------------------------------ intestazione */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand img {
  width: 26px;
  height: 26px;
}
.month {
  display: flex;
  align-items: center;
  gap: 4px;
}
.month strong {
  min-width: 140px;
  text-align: center;
  font-size: 15px;
}
.month .btn {
  width: 32px;
  padding: 0;
  justify-content: center;
}
.tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  padding: 3px;
  border-radius: 10px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
}
.tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.top .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.save-status.error {
  color: var(--err);
}
.save-status .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 6px;
  vertical-align: 1px;
}
.save-status.pending .dot {
  background: var(--warn);
}
.save-status.error .dot {
  background: var(--err);
}

main {
  padding: 16px 20px 40px;
}

/* ------------------------------------------------------------ toolbar e riepilogo */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar .group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.toolbar .end {
  margin-left: auto;
}
.hint {
  color: var(--muted);
  font-size: 13px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.card .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card .value {
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.card .sub {
  font-size: 12.5px;
  color: var(--muted);
}
.card.bad .value {
  color: var(--err);
}
.card.warn .value {
  color: var(--warn);
}
.card.good .value {
  color: var(--ok);
}
.card.wide {
  grid-column: span 2;
}
@media (max-width: 640px) {
  .card.wide {
    grid-column: auto;
  }
  main {
    padding: 12px 16px 32px;
  }
  .top {
    padding: 10px 16px;
  }
}

/* ------------------------------------------------------------ griglia */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 1880px) {
  .workspace.with-side {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}
.grid-wrap {
  overflow: auto;
  max-height: calc(100vh - 250px);
  min-height: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table.grid {
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.grid th,
.grid td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  text-align: center;
  height: 30px;
}
.grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  font-weight: 600;
  font-size: 13px;
  height: 42px;
  border-bottom: 1px solid var(--border-strong);
}
.grid thead th small {
  display: block;
  font-weight: 400;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1;
}
.grid th.day {
  width: var(--cell);
  min-width: var(--cell);
  max-width: var(--cell);
  line-height: 1.15;
}
.grid th.we,
.grid td.we {
  background: var(--we);
}
.grid th.hol,
.grid td.hol {
  background: var(--hol);
}
.grid th.hol {
  color: var(--err);
}
.grid .name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  text-align: left;
  padding: 0 10px;
  min-width: 190px;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  border-right: 1px solid var(--border-strong);
  cursor: pointer;
}
.grid thead .name {
  z-index: 4;
  cursor: default;
}
.grid .name .tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 4px;
  line-height: 15px;
}
.grid tr.hl > * {
  background-image: linear-gradient(rgb(14 165 233 / 9%), rgb(14 165 233 / 9%));
}
.grid tbody tr:hover > .name {
  color: var(--accent);
}
.grid td.cell {
  position: relative;
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
}
.grid td.cell:hover {
  box-shadow: inset 0 0 0 2px var(--border-strong);
}
.grid td.v-D {
  background: var(--d-bg);
  color: var(--d-ink);
}
.grid td.v-N {
  background: var(--n-bg);
  color: var(--n-ink);
}
.grid td.des-F {
  background: var(--f-bg);
  color: var(--f-ink);
  font-weight: 500;
}
.grid td.des-C {
  background: var(--c-bg);
  color: var(--c-ink);
  font-weight: 500;
}
.grid td.v-D.des-F,
.grid td.v-N.des-F,
.grid td.v-D.des-C,
.grid td.v-N.des-C {
  background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgb(220 38 38 / 35%) 4px 6px);
}
.grid td.des-NN::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 0;
  height: 0;
  border-top: 7px solid var(--nn);
  border-left: 7px solid transparent;
}
.grid td.smonto {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}
.grid td.locked::before {
  content: '';
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}
.grid td.locked.empty::before {
  background: var(--muted);
}
.grid td.issue {
  box-shadow: inset 0 0 0 2px var(--err);
}
.grid td.sel {
  box-shadow: inset 0 0 0 2px var(--sel), 0 0 0 1px var(--sel);
  z-index: 1;
}
.grid td.dsel,
.grid th.dsel {
  outline: 1px dashed var(--sel);
  outline-offset: -2px;
}
.grid .tot {
  min-width: 52px;
  padding: 0 6px;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
}
.grid thead .tot {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.grid .tot.first {
  border-left: 1px solid var(--border-strong);
}
.grid .saldo.neg {
  color: var(--warn);
  font-weight: 600;
}
.grid .saldo.pos {
  color: var(--over);
  font-weight: 600;
}
.grid .saldo.zero {
  color: var(--ok);
  font-weight: 600;
}
.grid .tot.wk-ko {
  color: var(--err);
  background: var(--err-soft);
  font-weight: 600;
}
.grid tfoot td,
.grid tfoot th {
  position: sticky;
  z-index: 2;
  background: var(--surface-2);
  font-size: 11.5px;
  height: 26px;
}
.grid tfoot tr:nth-child(1) > * {
  bottom: 52px;
  border-top: 1px solid var(--border-strong);
}
.grid tfoot tr:nth-child(2) > * {
  bottom: 26px;
}
.grid tfoot tr:nth-child(3) > * {
  bottom: 0;
}
.grid tfoot .name {
  z-index: 3;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
  cursor: default;
}
.grid tfoot .ko {
  color: var(--err);
  font-weight: 700;
  background: var(--err-soft);
}
.grid tfoot .over {
  color: var(--over);
  font-weight: 600;
}
.grid tfoot .warn {
  color: var(--warn);
  font-weight: 700;
  background: var(--warn-soft);
}
.grid tfoot .muted {
  color: var(--muted);
}

/* ------------------------------------------------------------ pannello problemi */
.side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  align-self: start;
  max-height: calc(100vh - 250px);
  overflow: auto;
}
.side h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.issues {
  list-style: none;
  margin: 0;
  padding: 0;
}
.issues li {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.issues li:hover {
  background: var(--surface-2);
}
.issues .d {
  flex: none;
  min-width: 46px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.issues .error::before,
.issues .warning::before,
.issues .info::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
}
.issues .error::before {
  background: var(--err);
}
.issues .warning::before {
  background: var(--warn);
}
.issues .info::before {
  background: var(--muted);
}
.side .empty {
  color: var(--ok);
  font-size: 13px;
}
.side details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  align-items: center;
}
.legend .sw {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 3px;
  height: 18px;
  border-radius: 4px;
  font-weight: 650;
  font-size: 11px;
  margin-right: 5px;
  vertical-align: -4px;
  position: relative;
  border: 1px solid var(--border);
}
.sw.D {
  background: var(--d-bg);
  color: var(--d-ink);
}
.sw.N {
  background: var(--n-bg);
  color: var(--n-ink);
}
.sw.F {
  background: var(--f-bg);
  color: var(--f-ink);
}
.sw.C {
  background: var(--c-bg);
  color: var(--c-ink);
}
.sw.NN::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  border-top: 6px solid var(--nn);
  border-left: 6px solid transparent;
}
.sw.L::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
}
.sw.E {
  box-shadow: inset 0 0 0 2px var(--err);
}
kbd {
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 4px;
  background: var(--surface);
}

/* ------------------------------------------------------------ popover */
#popover {
  position: fixed;
  z-index: 50;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow), 0 12px 32px rgb(15 23 42 / 18%);
  padding: 10px;
}
.pop-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.pop-head span {
  color: var(--muted);
}
.pop-note {
  font-size: 12.5px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  margin-bottom: 8px;
}
.pop-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pop-actions.three {
  grid-template-columns: repeat(4, 1fr);
}
.pop-actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 0 5px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
}
.pop-actions button small {
  font-weight: 400;
  font-size: 10.5px;
  color: var(--muted);
}
.pop-actions button.on {
  box-shadow: 0 0 0 2px var(--sel);
}
.pop-actions .b-D {
  background: var(--d-bg);
  color: var(--d-ink);
}
.pop-actions .b-N {
  background: var(--n-bg);
  color: var(--n-ink);
}
.pop-actions .b-N small,
.pop-actions .b-D small {
  color: inherit;
  opacity: 0.8;
}
.pop-actions .b-F {
  background: var(--f-bg);
  color: var(--f-ink);
}
.pop-actions .b-C {
  background: var(--c-bg);
  color: var(--c-ink);
}
.pop-actions .b-F small,
.pop-actions .b-C small {
  color: inherit;
  opacity: 0.8;
}
.pop-actions svg {
  width: 15px;
  height: 15px;
  margin: 1px 0;
}
.pop-issues {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--err);
}
.pop-issues li {
  padding: 2px 0;
}
.pop-hint {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------ toast */
#toasts {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  animation: pop 0.18s ease-out;
}
.toast.error {
  background: var(--err);
  color: #fff;
}
@keyframes pop {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
}

/* ------------------------------------------------------------ pannelli / form */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  max-width: 1100px;
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 16px;
}
.panel > p.desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
table.list {
  width: 100%;
  border-collapse: collapse;
}
table.list th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.list td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.list tr.inactive td {
  opacity: 0.55;
}
input[type='text'],
input[type='number'],
input[type='password'],
input[type='url'],
select,
textarea {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
}
textarea {
  height: auto;
  padding: 8px 10px;
  width: 100%;
  resize: vertical;
}
input[type='number'] {
  width: 90px;
}
input.wide {
  width: 100%;
}
input[type='checkbox'] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  vertical-align: middle;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label,
.field .lbl {
  font-size: 13px;
  font-weight: 550;
}
.field .help {
  font-size: 12px;
  color: var(--muted);
}
.field.inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.mt {
  margin-top: 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
}
.chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.chip button:hover {
  background: var(--border);
  color: var(--err);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}

/* ------------------------------------------------------------ dialog */
dialog {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: var(--shadow), 0 24px 60px rgb(15 23 42 / 25%);
}
dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}
.dlg-head {
  padding: 16px 20px 6px;
}
.dlg-head h2 {
  margin: 0;
  font-size: 17px;
}
.dlg-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.dlg-body {
  padding: 10px 20px;
  overflow: auto;
  max-height: calc(100vh - 220px);
}
.dlg-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}
.warnings {
  font-size: 12.5px;
  color: var(--warn);
  margin: 0;
  padding-left: 18px;
}
.status-ok {
  color: var(--ok);
}
.status-new {
  color: var(--over);
}
.status-skip {
  color: var(--muted);
}

/* ------------------------------------------------------------ login */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.login form {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login h1 {
  margin: 0;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.login h1 img {
  width: 30px;
  height: 30px;
}
.login p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.login input {
  width: 100%;
}
.login .err {
  color: var(--err);
  font-size: 13px;
  min-height: 18px;
}
.login .btn {
  justify-content: center;
  height: 38px;
}

.busy {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgb(15 23 42 / 25%);
}
.busy div {
  background: var(--surface);
  padding: 16px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 500;
}

@media print {
  .top,
  .toolbar,
  .cards,
  .side,
  .legend,
  #toasts {
    display: none !important;
  }
  main {
    padding: 0;
  }
  .grid-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
  }
  .grid thead th,
  .grid .name,
  .grid tfoot > tr > * {
    position: static;
  }
}
