/* ChemERP - responsive: phone, tablet (shop floor), desktop (office). No external dependencies. */
:root {
  --ink: #17252d;
  --muted: #647782;
  --line: #dbe3e8;
  --bg: #f2f5f7;
  --card: #ffffff;
  --brand: #14323f;
  --brand-2: #1d4a5c;
  --accent: #0b7a75;
  --accent-dark: #075f5b;
  --ok: #17794a;      --ok-bg: #e0f3e8;
  --info: #1f5fa8;    --info-bg: #e2eefb;
  --warn: #8a5a00;    --warn-bg: #fdf0cf;
  --bad: #b3261e;     --bad-bg: #fbe3e1;
  --grey-bg: #e8edf0;
  --radius: 8px;
  --tap: 44px;
  --sidebar: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; line-height: 1.2; }
h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 54px; display: flex; align-items: center; gap: .75rem;
  padding: 0 .9rem; background: var(--brand); color: #fff;
}
.brand { display: flex; align-items: center; gap: .45rem; color: #fff; font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.company { color: #b9ccd4; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.user .who { text-align: right; line-height: 1.15; }
.user .who strong { display: block; font-size: .9rem; }
.user .who small { color: #b9ccd4; font-size: .74rem; }
.menu-btn { display: none; width: var(--tap); height: var(--tap); background: none; border: 0; padding: 11px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* ---------- layout */
.shell { display: flex; min-height: calc(100vh - 54px); }
.sidebar {
  width: var(--sidebar); flex: none; background: #fff; border-right: 1px solid var(--line);
  padding: .6rem .5rem 2rem; position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto;
}
.navgroup summary {
  cursor: pointer; list-style: none; padding: .55rem .6rem; font-size: .74rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between;
}
.navgroup summary::-webkit-details-marker { display: none; }
.navgroup summary::after { content: "+"; font-weight: 400; font-size: 1rem; line-height: 1; }
.navgroup[open] summary::after { content: "\2212"; }
.navlink { display: block; padding: .5rem .7rem .5rem 1rem; border-radius: 6px; color: var(--ink); font-size: .92rem; }
.navlink.top { padding-left: .6rem; font-weight: 600; margin-bottom: .2rem; }
.navlink:hover { background: var(--bg); text-decoration: none; }
.navlink.active { background: #dff1ef; color: var(--accent-dark); font-weight: 600; }
.content { flex: 1; min-width: 0; padding: 1.1rem 1.3rem 3rem; }
.scrim { display: none; }

/* ---------- page header */
.pagehead { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1rem; }
.pagehead .titles { flex: 1; min-width: 200px; }
.pagehead .crumb { font-size: .82rem; color: var(--muted); margin-bottom: .15rem; }
.pagehead .tools { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 38px;
  padding: .45rem .9rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--bad); border-color: #e9b9b5; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.warn { color: var(--warn); border-color: #e6cf94; }
.btn.small { min-height: 30px; padding: .2rem .6rem; font-size: .82rem; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.big { min-height: 52px; font-size: 1rem; padding: .6rem 1.2rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

/* ---------- cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: .8rem 1rem 0; }
.card > h2 .count { font-weight: 400; color: var(--muted); font-size: .85rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; color: var(--ink); display: block; }
.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi .v { font-size: 1.55rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .8rem; color: var(--muted); }
.kpi.alert .v { color: var(--bad); }
.kpi.attn .v { color: var(--warn); }

/* ---------- definition grid on detail pages */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .7rem 1.2rem; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.facts dd { margin: .1rem 0 0; overflow-wrap: anywhere; }

/* ---------- tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: .5rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafb; white-space: nowrap; }
table.data th.num, table.data td.num { text-align: right; }
table.data tbody tr:hover { background: #f8fbfb; }
table.data tr.clickable { cursor: pointer; }
table.data td a strong, table.data td strong:first-child { white-space: nowrap; }
table.data tfoot td { font-weight: 700; background: #f8fafb; border-top: 2px solid var(--line); }
table.data td.empty { text-align: center; color: var(--muted); padding: 1.6rem; }
table.data tr.flag td { background: #fff8e6; }
table.data tr.bad td { background: #fdf0ef; }

/* ---------- badges */
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--grey-bg); color: #44545c; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- notifications (toasts) */
.toasts { position: fixed; z-index: 60; top: 66px; right: 16px; width: min(400px, calc(100vw - 32px)); display: grid; gap: .5rem; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: .65rem; align-items: flex-start; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-left: 5px solid var(--info); border-radius: var(--radius);
  padding: .7rem .6rem .7rem .8rem; box-shadow: 0 10px 30px rgba(20,50,63,.22); animation: toast-in .22s ease-out;
}
.toast.success { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--bad); background: #fff6f5; }
.toast.warning { border-left-color: #c98a00; }
.toast .ico { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--info); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.toast .ico::before { content: "i"; }
.toast.success .ico { background: var(--ok); } .toast.success .ico::before { content: "\2713"; }
.toast.error .ico { background: var(--bad); } .toast.error .ico::before { content: "!"; }
.toast.warning .ico { background: #c98a00; } .toast.warning .ico::before { content: "!"; }
.toast .txt { flex: 1; min-width: 0; font-size: .92rem; overflow-wrap: anywhere; }
.toast .txt strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.toast.error .txt strong { color: var(--bad); } .toast.success .txt strong { color: var(--ok); }
.toast .x { flex: none; width: 32px; height: 32px; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 6px; }
.toast .x:hover { background: var(--bg); color: var(--ink); }
.toast.leaving { opacity: 0; transform: translateX(12px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast.leaving { transition: none; } }

/* ---------- form errors */
.errsummary { border: 2px solid var(--bad); background: #fff6f5; border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; max-width: calc(100% - 420px); }
/* Tablets and phones: notifications sit at the bottom so they never cover the form */
@media (max-width: 1024px) {
  .errsummary { max-width: none; }
  .toasts { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; }
}
.errsummary h2 { color: var(--bad); margin-bottom: .4rem; }
.errsummary ul { margin: 0; padding-left: 1.1rem; }
.errsummary li { margin: .15rem 0; }
.errsummary a { color: var(--bad); font-weight: 600; text-decoration: underline; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--bad); background: #fff6f5; }
.field.has-error > label, td.has-error::before { color: var(--bad); }
.dev.over { color: var(--bad); } .dev.under { color: var(--warn); }
table.access td label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; font-size: .9rem; margin: 0; cursor: pointer; min-height: 32px; }
table.access td:first-child { width: 46%; }

.note { background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: .55rem .8rem; font-size: .88rem; margin-bottom: .8rem; }
.note.info { background: var(--info-bg); color: var(--info); }
.note.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- forms */
label { font-size: .82rem; font-weight: 600; display: block; margin-bottom: .2rem; }
input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=time],
input[type=email], input[type=password], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 38px; padding: .4rem .6rem; border: 1px solid #c3ced5; border-radius: 6px;
  background: #fff; color: var(--ink); font: inherit;
}
input[type=file] { font: inherit; max-width: 100%; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; vertical-align: middle; accent-color: var(--accent); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem 1rem; }
.field.wide { grid-column: 1 / -1; }
.field .help { font-size: .76rem; color: var(--muted); margin-top: .15rem; }
.field.check label { display: inline; margin-left: .35rem; }
.errorlist { list-style: none; margin: .25rem 0 0; padding: 0; color: var(--bad); font-size: .84rem; font-weight: 600; }
.errorlist li::before { content: "! "; }
.formerrors { background: var(--bad-bg); color: var(--bad); border-radius: 6px; padding: .6rem .9rem; margin-bottom: .8rem; font-weight: 600; }
.req::after { content: " *"; color: var(--bad); }
.formactions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }

/* line-item editors */
table.lines { width: 100%; border-collapse: collapse; }
table.lines th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; padding: .3rem .35rem; white-space: nowrap; }
table.lines td { padding: .25rem .35rem; vertical-align: top; min-width: 92px; }
table.lines td.del { min-width: 0; width: 1%; text-align: center; padding-top: .7rem; }
table.lines select { min-width: 150px; }
table.lines input[type=checkbox] { margin-top: .5rem; }

/* filter bar */
.filterbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: .9rem; }
.filterbar > div { min-width: 150px; }
.filterbar .grow { flex: 1; min-width: 190px; }

/* action panels on detail pages */
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; margin-bottom: 1rem; }
details.action { position: relative; }
details.action > summary { list-style: none; }
details.action > summary::-webkit-details-marker { display: none; }
details.action[open] > summary { background: var(--bg); }
details.action .panel {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(440px, 92vw); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: 0 8px 28px rgba(20,50,63,.18);
}
details.action .panel .fields { grid-template-columns: 1fr; }

.pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; padding: .7rem 1rem; font-size: .88rem; color: var(--muted); }

/* progress bar */
.bar { height: 8px; background: var(--grey-bg); border-radius: 999px; overflow: hidden; min-width: 70px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.bar.over > i { background: var(--bad); }

/* ---------- batch execution (tablet first) */
.steps { display: grid; gap: .8rem; }
.step { background: #fff; border: 1px solid var(--line); border-left: 6px solid #b8c6cd; border-radius: var(--radius); }
.step.IN_PROGRESS { border-left-color: #e0a100; }
.step.DONE { border-left-color: var(--ok); }
.step.SKIPPED { border-left-color: var(--bad); }
.step > summary { cursor: pointer; list-style: none; padding: .8rem 1rem; display: flex; align-items: center; gap: .7rem; min-height: 56px; }
.step > summary::-webkit-details-marker { display: none; }
.step .no { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--grey-bg); display: grid; place-items: center; font-weight: 700; }
.step.DONE .no { background: var(--ok-bg); color: var(--ok); }
.step.IN_PROGRESS .no { background: var(--warn-bg); color: var(--warn); }
.step .nm { flex: 1; font-weight: 700; font-size: 1.02rem; }
.step .nm small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.step .body { padding: 0 1rem 1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.params { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem 1rem; }
.param label { font-size: .88rem; }
.param .target { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.param input, .param select { min-height: 46px; font-size: 1.02rem; }
.param.oor input { border-color: var(--bad); background: var(--bad-bg); }
.param .oor-note { color: var(--bad); font-size: .78rem; font-weight: 700; }
.readings { border: 1px solid var(--line); border-radius: 6px; padding: .7rem; margin-top: .9rem; }
.readings .add { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; }
.readings .add > div { flex: 1; min-width: 120px; }
.readings .add input { min-height: 46px; font-size: 1.02rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.chip { background: var(--grey-bg); border-radius: 6px; padding: .15rem .5rem; font-size: .84rem; font-variant-numeric: tabular-nums; }
.chip b { font-weight: 700; }
.chip.oor { background: var(--bad-bg); color: var(--bad); }
.tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--accent-dark); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* schedule */
.sched { overflow-x: auto; }
.sched table { border-collapse: collapse; min-width: 100%; font-size: .82rem; }
.sched th, .sched td { border: 1px solid var(--line); padding: .25rem .3rem; text-align: center; min-width: 34px; }
.sched th.lbl, .sched td.lbl { text-align: left; min-width: 210px; position: sticky; left: 0; background: #fff; z-index: 1; }
.sched th { background: #f8fafb; font-weight: 600; color: var(--muted); }
.sched th.we { background: #eef2f4; }
.sched th.today { background: #dff1ef; color: var(--accent-dark); }
.sched td.on { background: #9fd3cf; }
.sched td.on.IN_PROGRESS { background: #f0c75e; }
.sched td.on.COMPLETED { background: #9fd6b5; }
.sched td.on.DRAFT { background: #cfd8dd; }
.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .82rem; color: var(--muted); margin-top: .6rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }

/* genealogy tree */
ul.tree, ul.tree ul { list-style: none; margin: 0; padding-left: 1.3rem; }
ul.tree { padding-left: 0; }
ul.tree li { position: relative; padding: .3rem 0 .3rem .9rem; border-left: 2px solid var(--line); }
ul.tree li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .7rem; border-top: 2px solid var(--line); }
ul.tree > li { border-left: 0; padding-left: 0; }
ul.tree > li::before { display: none; }
.node { display: inline-flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .6rem; }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, var(--brand), var(--brand-2)); }
.login .box { background: #fff; border-radius: 12px; padding: 2rem; width: min(400px, 100%); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.login h1 { margin-bottom: .2rem; }
.login .field { margin-top: .9rem; }
.login .btn { width: 100%; margin-top: 1.2rem; min-height: 46px; }

/* ---------- printed documents */
.doc { background: #fff; max-width: 900px; margin: 0 auto 2rem; padding: 2rem 2.2rem; border: 1px solid var(--line); color: #000; font-size: 13px; }
.doc .dochead { display: flex; justify-content: space-between; gap: 1.5rem; border-bottom: 2px solid #000; padding-bottom: .7rem; margin-bottom: .9rem; }
.doc .dochead h1 { font-size: 1.25rem; }
.doc .dochead .co { font-size: 12px; white-space: pre-line; }
.doc .doctitle { text-align: right; }
.doc .doctitle h2 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.doc h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #000; padding-bottom: .2rem; margin: 1.1rem 0 .5rem; }
.doc table { width: 100%; border-collapse: collapse; margin-bottom: .6rem; }
.doc th, .doc td { border: 1px solid #555; padding: .28rem .45rem; text-align: left; vertical-align: top; }
.doc th { background: #eee; font-size: 11px; text-transform: uppercase; }
.doc td.num, .doc th.num { text-align: right; }
.doc table.plain td, .doc table.plain th { border: 0; padding: .12rem .5rem .12rem 0; }
.doc table.plain th { background: none; width: 150px; text-transform: none; font-size: 13px; color: #333; font-weight: 600; }
.doc .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.doc .box { border: 1px solid #555; padding: .5rem .6rem; white-space: pre-line; }
.doc .signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.6rem; }
.doc .signs div { border-top: 1px solid #000; padding-top: .3rem; font-size: 12px; }
.doc .fine { font-size: 11px; color: #333; }
.doc .oor { font-weight: 700; }
.printbar { max-width: 900px; margin: 0 auto 1rem; display: flex; gap: .5rem; justify-content: space-between; flex-wrap: wrap; }

/* ---------- tablet & phone */
@media (max-width: 1024px) {
  .menu-btn { display: block; }
  .company { display: none; }
  .sidebar { position: fixed; left: 0; top: 54px; z-index: 40; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 4px 0 18px rgba(0,0,0,.15); width: min(300px, 86vw); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 54px 0 0 0; background: rgba(0,0,0,.35); z-index: 35; }
  .navlink { padding-top: .7rem; padding-bottom: .7rem; }
  .content { padding: 1rem .9rem 3rem; }
  .btn { min-height: var(--tap); }
  .btn.small { min-height: 36px; }
  input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=time],
  input[type=email], input[type=password], input[type=search], select { min-height: var(--tap); font-size: 16px; }
  textarea { font-size: 16px; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .user .who { display: none; }
  h1 { font-size: 1.25rem; }
  .pagehead .tools { width: 100%; }
  .doc { padding: 1rem; }

  .doc .cols { grid-template-columns: 1fr; }
  details.action { position: static; }
  details.action .panel { position: static; width: 100%; box-shadow: none; margin-top: .4rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  /* line-item editors become stacked cards */
  table.lines thead { display: none; }
  table.lines, table.lines tbody, table.lines tr, table.lines td { display: block; width: 100%; }
  table.lines tr { border: 1px solid var(--line); border-radius: 6px; padding: .5rem; margin-bottom: .6rem; }
  table.lines td { padding: .25rem 0; }
  table.lines td::before { content: attr(data-label); display: block; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
  table.lines td.del { text-align: left; width: 100%; }
}

@media print {
  .topbar, .sidebar, .printbar, .toasts, .no-print, .scrim { display: none !important; }
  /* Printing is a right of Administrator and Management only */
  body.no-export .shell { display: none !important; }
  body.no-export::after { content: "Printing is not enabled for your role."; display: block; padding: 2rem; font-size: 14pt; }
  body { background: #fff; }
  .content { padding: 0; }
  .shell { display: block; }
  .doc { border: 0; margin: 0; padding: 0; max-width: none; }
  .card { border: 0; padding: 0; }
  .pagebreak { page-break-before: always; }
  a { color: #000; text-decoration: none; }
  @page { margin: 14mm; }
}
