:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #5b6577;
  --line: #e2e7ee;
  --line-strong: #cfd6e0;
  --brand: #0e7490;
  --brand-ink: #ffffff;
  --brand-soft: #e3f6fb;
  --brand-glow: #9beaff;
  --good: #15803d;
  --good-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --bad: #b91c1c;
  --bad-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.03);
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 12px; }
small, .muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
code { font-family: var(--mono); font-size: 0.92em; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: #0b1f2a;
  color: #c9d6df;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; font-weight: 650; }
.brand img { width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.brand span { line-height: 1.15; font-size: 14px; }
.brand small { display: block; color: #8fb3c2; font-weight: 400; font-size: 11px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #6f8ea0; padding: 14px 10px 4px; }
.nav a {
  color: #c9d6df;
  padding: 7px 10px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.nav a:hover { background: #12303f; text-decoration: none; color: #fff; }
.nav a.on { background: var(--brand-glow); color: #06232e; font-weight: 600; }
.nav svg { width: 16px; height: 16px; flex: none; opacity: 0.85; }
.side form { margin: 0; }
.side .who { border-top: 1px solid #17384a; margin-top: 14px; padding: 12px 10px 0; font-size: 13px; }
.side .who a { color: #c9d6df; }
.linkbtn { background: none; border: 0; padding: 0; color: #8fb3c2; cursor: pointer; font: inherit; }
.linkbtn:hover { color: #fff; text-decoration: underline; }

main { padding: 24px 32px 64px; width: 100%; min-width: 0; }
.appbar, .tabbar { display: none; }

/* ---- page header ---- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- surfaces ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .pad, .pad { padding: 16px; }
.card + .card, .card + .grid, .grid + .card, .grid + .grid { margin-top: 16px; }
.grid > * { margin-top: 0 !important; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.stat { padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .value { font-size: 22px; font-weight: 650; margin-top: 2px; letter-spacing: -0.01em; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; background: #fafbfc; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfd; }
td.num, th.num { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; background: #fafbfc; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* ---- badges ---- */
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f5; color: #3b4658; white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

/* ---- forms ---- */
form { margin: 0; }
.form { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.grid > *, .fields > * { min-width: 0; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
label { display: grid; gap: 4px; font-weight: 550; font-size: 13px; }
label .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 640px) { .span2 { grid-column: auto; } }
input, select, textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  min-height: 38px;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-glow); outline-offset: 0; border-color: var(--brand); }
input[type='checkbox'] { width: auto; min-height: 0; }
input[readonly] { background: #f6f8fa; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  min-height: 38px;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; background: #f6f8fa; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #0b5f76; }
.btn.danger { color: var(--bad); border-color: #efc4c1; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.alert.error { background: var(--bad-soft); border-color: #f2c5c2; color: #8c1616; }
.alert.ok { background: var(--good-soft); border-color: #bfe5cb; color: #135f30; }
.copy-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.copy-row input { flex: 1 1 260px; min-height: 32px; font-family: var(--mono); font-size: 12.5px; background: #fff; color: var(--ink); }
.alert-link { font-weight: 650; color: inherit; text-decoration: underline; margin-left: 4px; }
.alert.info { background: var(--brand-soft); border-color: #b9e6f2; color: #0b5368; }

/* workflow steps */
.steps { list-style: none; margin: 0 0 16px; padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; position: relative; }
.steps .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: #eef1f5; color: var(--muted); border: 1px solid var(--line-strong); }
.steps li.done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.steps li.current .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.steps strong { display: block; font-size: 13.5px; }
.steps li.todo strong { color: var(--muted); }
.steps small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.steps .btn { margin-top: 2px; }
.step-link { font-size: 12px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: #eef1f5; color: var(--muted); }
.checklist li.done .dot { background: var(--good); color: #fff; }
.checklist li.done strong { text-decoration: line-through; color: var(--muted); }
.checklist li.current .dot { background: var(--brand); color: #fff; }
.checklist small { display: block; color: var(--muted); }

/* clickable table rows */
tr[data-href] { cursor: pointer; }

/* pickers with "+ New" */
.select-add { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
.select-add select { flex: 1; min-width: 0; }
.select-add .quick { padding: 0 10px; color: var(--brand); font-weight: 650; flex: none; }
.select-add .quick.sm { min-height: 0; padding: 0 9px; font-size: 16px; }

/* quick-add dialog */
dialog.quick-dialog { border: 0; border-radius: 14px; padding: 0; width: min(760px, 96vw); max-height: 92vh; box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35); overflow: hidden; }
dialog.quick-dialog::backdrop { background: rgba(11, 31, 42, 0.45); }
dialog.quick-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
dialog.quick-dialog iframe { display: block; width: 100%; height: 360px; max-height: calc(92vh - 54px); border: 0; background: var(--bg); }
body.embed { background: var(--bg); }
body.embed main { padding: 16px; }
body.embed .crumbs, body.embed .head .actions, body.embed .head h1, body.embed a.btn.ghost { display: none; }
body.embed .head { margin-bottom: 10px; }
body.embed .head:not(:has(p)) { display: none; }
/* inside the dialog: no app bar or tab bar, so the save bar sits at the bottom */
body.embed { --tabbar-h: 0px; }
body.embed .appbar { display: none !important; }

/* line-item editors */
.lines td { padding: 6px 8px; }
.lines input, .lines select { min-width: 90px; }
.lines .rm { color: var(--bad); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters label { min-width: 150px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 550; font-size: 13px; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a:hover { text-decoration: none; }

.bar { height: 6px; border-radius: 3px; background: #e8edf2; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--brand); }
.bar.done > i { background: var(--good); }

/* chart */
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 11px; }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 0%, #dff6fd 0, transparent 50%), var(--bg); }
.auth .card { width: 100%; max-width: 380px; }
.auth .logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 18px; text-align: center; }
.auth .logo img { width: 72px; height: 72px; border-radius: 50%; }
.auth .switch { text-align: center; margin-top: 14px; font-size: 13px; display: grid; gap: 6px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { width: 140px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; font-size: 12px; }
.thumb a.img { display: block; aspect-ratio: 4 / 3; background: #f1f4f7 center / cover no-repeat; }
.thumb .file-icon { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #f1f4f7; font-weight: 700; color: var(--muted); }
.thumb .meta { padding: 6px 8px; display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.thumb .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- New / More screens ---- */
.tile-group, .menu-group { margin-bottom: 22px; }
.tile-group h2, .menu-group h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 8px 2px; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { text-decoration: none; border-color: var(--brand); }
.tile .ti { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tile svg { width: 22px; height: 22px; }
.tile strong { display: block; font-size: 15px; }
.tile small { display: block; font-size: 12.5px; line-height: 1.3; }
.profile-row { display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 22px; color: var(--ink); }
.profile-row:hover { text-decoration: none; }
.profile-row small { display: block; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 18px; flex: none; }
.menu-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); border-bottom: 1px solid var(--line); font-weight: 550; }
.menu-list a:last-child { border-bottom: 0; }
.menu-list a:hover { text-decoration: none; background: #fafcfd; }
.menu-list a::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 20px; line-height: 1; }
.menu-list svg { width: 20px; height: 20px; color: var(--brand); flex: none; }

/* ======== Phones & tablets: app-style shell ======== */
@media (max-width: 1024px) {
  :root { --tabbar-h: 62px; --safe-b: env(safe-area-inset-bottom, 0px); --radius: 14px; }
  body { font-size: 15px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  main { display: flex; flex-direction: column; padding: 0 16px calc(var(--tabbar-h) + var(--safe-b) + 28px); }
  main > * { flex: none; }
  a, button { -webkit-tap-highlight-color: transparent; }

  /* sticky title bar with back button */
  .appbar {
    order: -1;
    display: flex;
    align-items: center;
    gap: 4px;
    position: sticky;
    top: 0;
    z-index: 15;
    margin: 0 -16px 14px;
    padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px;
    min-height: 54px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .appbar .back { width: 42px; height: 42px; margin-left: -6px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); flex: none; }
  .appbar .back:active { background: #eef2f6; }
  .appbar .back svg { width: 26px; height: 26px; }
  .appbar-title { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .head h1, .crumbs { display: none; }
  .head { margin-bottom: 14px; }
  .head > div:first-child:not(:has(p)) { display: none; }
  .head .actions { width: 100%; }
  .head .actions > *, .head .actions form .btn { flex: 1 1 auto; }

  /* bottom tab bar */
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: var(--safe-b);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--tabbar-h); color: #6b7585; font-size: 11.5px; font-weight: 600; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .ti { display: grid; place-items: center; width: 52px; height: 28px; border-radius: 14px; transition: background 0.15s; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--brand); }
  .tabbar a.on .ti { background: var(--brand-soft); }
  .tabbar a.new .ti { width: 48px; height: 48px; margin-top: -18px; border-radius: 16px; background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(14, 116, 144, 0.35); }
  .tabbar a.new.on .ti { background: #0b5f76; }

  /* touch-sized controls; 16px text stops iPhones zooming into inputs */
  input, select, textarea { font-size: 16px; min-height: 46px; border-radius: 10px; padding: 10px 12px; }
  input[type='checkbox'] { width: 22px; height: 22px; min-height: 0; }
  .btn { min-height: 46px; padding: 10px 16px; border-radius: 10px; font-size: 15px; }
  .btn.sm { min-height: 38px; padding: 6px 12px; font-size: 14px; }
  label { font-size: 14px; }
  .select-add .quick { min-width: 46px; }
  .select-add .quick.sm { font-size: 20px; }

  /* the save button stays reachable above the tab bar on long forms */
  .form > .btn-row:last-child {
    position: sticky;
    bottom: calc(var(--tabbar-h) + var(--safe-b));
    z-index: 5;
    margin: 4px -16px -16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .form > .btn-row:last-child .btn.primary { flex: 1 1 auto; }

  /* scrollable pills and compact filters */
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; padding: 9px 15px; font-size: 14px; }
  .filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .filters label { min-width: 0; }

  .card { border-radius: var(--radius); }
  .tile:active, .menu-list a:active, tr[data-href]:active td, table.cards tr[data-href]:active { background: #eef3f6; }
  .stat .value { font-size: 20px; }
}

/* ======== Phones ======== */
@media (max-width: 700px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid { gap: 12px; }
  .stat { padding: 12px 14px; }
  .stat .label { font-size: 11px; }
  .stat .value { font-size: 18px; }
  .fields { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 8px; }
  .steps { grid-template-columns: 1fr 1fr; }

  /* quick-add opens as a full-screen sheet */
  dialog.quick-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog.quick-dialog iframe { height: calc(100dvh - 54px) !important; max-height: none; }

  /* list tables become cards: first column is the title, the rest label/value pairs */
  .table-wrap:has(table.cards) { overflow: visible; }
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tfoot, table.cards tr { display: block; width: 100%; }
  table.cards tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  table.cards tbody tr:last-child { border-bottom: 0; }
  table.cards td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; border: 0; text-align: right; background: none !important; }
  table.cards td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; }
  table.cards td:first-child { display: block; padding: 0 0 6px; text-align: left; font-weight: 650; font-size: 15.5px; }
  table.cards td:first-child::before { display: none; }
  table.cards td:empty { display: none; }
  table.cards tfoot tr { background: #fafbfc; border-top: 1px solid var(--line-strong); }
  table.cards .bar { flex: 1; max-width: 160px; margin-top: 8px; }

  /* line-item editors: one card per row, label above each input */
  .lines thead { display: none; }
  .lines tbody, .lines tfoot { display: block; }
  .lines tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); position: relative; }
  .lines tbody td { display: block; padding: 0; border: 0; text-align: left; }
  .lines tbody td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .lines tbody td:first-child { grid-column: 1 / -1; padding-right: 48px; }
  .lines tbody td:last-child:has(.rm) { position: absolute; top: 8px; right: 0; }
  .lines tbody td:last-child:has(.rm)::before { display: none; }
  .lines tbody td:empty { display: none; }
  .lines input, .lines select { min-width: 0; }
  .lines .rm { width: 42px; height: 42px; font-size: 18px; }
  .lines tfoot tr { display: flex; justify-content: space-between; padding: 12px 0 0; }
  .lines tfoot td { border: 0; background: none; padding: 0; }
  .lines tfoot td:empty { display: none; }
}

/* print (packing list) */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 12px; }
  .side, .tabbar, .appbar, .no-print { display: none !important; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #bbb; }
  .print-only { display: block; }
}
