:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #5d6b7a;
  --paper: #eef2f5;
  --card: #ffffff;
  --line: #e4e9ef;
  --accent: #0f766e;
  --ok: #067647;
  --bad: #b42318;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 10px 28px rgba(16, 24, 40, 0.05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 280px at 10% -10%, #e7f4f2 0%, transparent 60%),
    var(--paper);
}
.top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand {
  color: inherit;
  font-weight: 760;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.desk-nav, .desk-aside { display: none; }
.phone-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.icon-btn, .menu-pop summary.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  padding: 0;
  text-decoration: none;
}
.icon-btn[aria-current="page"], .menu-pop[open] > summary { background: #e7f4f2; color: var(--accent); }
.menu-pop { position: relative; }
.menu-pop summary { list-style: none; cursor: pointer; }
.menu-pop summary::-webkit-details-marker { display: none; }
.menu-pop summary::marker { content: ""; }
.menu-pop .pop {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 6;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.menu-pop .menu-rule { border: 0; border-top: 1px solid var(--line); margin: 6px 10px; }
.menu-pop:not(.nav-bell) .pop a,
.menu-pop:not(.nav-bell) .pop button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  color: var(--ink);
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 650;
  text-decoration: none;
}
.menu-pop:not(.nav-bell) .pop a svg,
.menu-pop:not(.nav-bell) .pop button svg { flex: none; }
nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
nav a:not(.desk-tab), .linkish {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
nav a:not(.desk-tab)[aria-current="page"], nav a:not(.desk-tab):hover,
.desk-nav .nav-config > summary[aria-current="page"],
.desk-nav .nav-config > summary:hover,
.desk-nav .nav-config[open] > summary { color: var(--ink); background: #eef3f6; }
.desk-nav .nav-config > summary {
  color: var(--muted);
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
main { padding: 20px 16px 40px; max-width: 760px; margin: 0 auto; }
h1 { font-size: 1.8rem; letter-spacing: -0.04em; margin: 0 0 8px; }
h2 { font-size: 1.15rem; letter-spacing: -0.02em; margin: 0 0 8px; }
.muted { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}
.slip { padding: 0; }
.slip summary, a.slip-link {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  min-height: 56px;
  color: inherit;
  text-decoration: none;
}
details.slip-fold { padding: 0; }
details.slip-fold summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  min-height: 56px;
}
details.slip-fold summary::-webkit-details-marker { display: none; }
details.slip-fold summary::marker { content: ""; }
details.slip-fold summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
details.slip-fold[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
details.slip-fold .slip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
details.slip-fold .slip-names {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px 14px;
  min-width: 0;
}
details.slip-fold .slip-names span { overflow-wrap: anywhere; }
details.slip-fold .slip-names a { color: var(--accent, #0f766e); }
a.log-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
a.log-link strong { font-size: 1.05rem; }
.log-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.log-actions button, .log-actions a.action { width: 100%; }
.slip summary::-webkit-details-marker { display: none; }
.slip summary::marker { content: ""; }
.slip .when, .slip .amount, .slip-link .when, .slip-link .amount { white-space: nowrap; }
.slip .product, .slip-link .product {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.slip .amount, .slip-link .amount { font-weight: 750; }
.slip.voided .amount, .slip-link.voided .amount, .slip-fold.voided .amount { color: var(--muted); text-decoration: line-through; }
.slip[open] summary { border-bottom: 1px solid var(--line); }
.slip-body { padding: 12px 16px 16px; }
.narrow { max-width: 420px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.day-line { display: flex; align-items: center; flex-wrap: nowrap; gap: 0; margin: 0 0 12px; }
.day-line .muted { margin-right: 2px; }
.day-visits-card { margin-top: 0; }
.day-visits-card .due { margin: 0; font-size: 1.05rem; line-height: 1.45; }
.week-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.week-top h1 { margin: 0; flex: 1; min-width: 0; }
.week-top .secondary { flex: none; min-height: 44px; }
.week-period { margin: 0 0 8px; }
.week-line .muted { flex: 1; text-align: center; min-width: 0; }
.week-period-nav { display: none; }
@media (min-width: 900px) {
  .week-period { display: none; }
  .week-period-nav { display: inline; }
}
.week-metrics { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 10px; }
.close-metrics { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.close-metrics p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.close-receipts { list-style: none; margin: 0; padding: 0; }
.close-receipts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.close-receipts li:last-child { border-bottom: 0; }
.close-receipt-actions { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
.close-receipt-actions .linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.pay-tag { font-size: 0.88rem; }
@media (min-width: 640px) {
  .close-receipts li {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }
  .close-receipt-actions { grid-column: auto; justify-content: flex-end; }
}
.week-metric-toggle { font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.week-metric-toggle input { margin-right: 6px; accent-color: var(--accent); }
.week-chart-wrap { margin: 12px 0 4px; padding: 8px 4px 0; background: #f8fafb; border-radius: 12px; border: 1px solid var(--line); }
.week-chart { width: 100%; height: auto; display: block; }
.week-chart-day { font-size: 10px; fill: var(--muted); }
.week-sub { margin: 16px 0 8px; font-size: 1rem; font-weight: 650; }
.week-pages { list-style: none; margin: 0; padding: 0; }
.week-pages li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.week-pages li:last-child { border-bottom: 0; }
.week-page-title { grid-column: 1; font-weight: 560; }
.week-page-path { grid-column: 1; font-size: 0.85rem; word-break: break-all; }
.week-pages strong { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; }
.day-pick { margin: 0; flex: none; width: 44px; height: 44px; }
.day-pick label.icon-btn { position: relative; display: grid; width: 44px; height: 44px; overflow: hidden; }
.day-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 44px; height: 44px; min-width: 0; padding: 0; border: 0; }
.page-title { display: flex; align-items: center; gap: 2px; margin: 0 0 8px; }
.page-title h1 { margin: 0; }
.page-title .icon-btn { border: 0; background: transparent; }
dialog.confirm {
  width: min(28rem, calc(100vw - 32px));
  border: 0;
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
dialog.confirm::backdrop { background: rgba(28, 36, 48, 0.45); }
dialog.confirm h2 { font-size: 1.25rem; margin: 0 0 8px; }
dialog.confirm p { margin: 0 0 16px; }
a.receive-new { width: 100%; margin-top: 10px; justify-content: center; min-height: 52px; }
.variation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}
form.variation-row {
  grid-template-columns: minmax(0, 1fr) 5.5rem minmax(7rem, 9rem) auto;
  margin-top: 12px;
}
form.variation-row input[name="stock"] { width: 4.25rem; padding-left: 8px; padding-right: 4px; }
.variation-row > label { min-width: 0; }
.variation-row input[name="variation_stock"] {
  width: 4.25rem;
  min-width: 0;
  padding-left: 8px;
  padding-right: 4px;
}
.variation-row input[name="variation_price"] {
  width: 6rem;
  min-width: 0;
  flex: 0 0 auto;
  padding-left: 8px;
  padding-right: 8px;
}
#add-variation { align-self: flex-start; }
.article-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.article-bar form { margin: 0; }
.article-bar button, .article-bar a.secondary { min-height: 48px; }
.article-bar a.secondary { display: inline-flex; align-items: center; padding: 12px 14px; border-radius: 12px; text-decoration: none; font-weight: 700; }
.field-name { white-space: nowrap; }
.made { margin: 0 0 16px; }
.made-label { margin: 10px 0 6px; font-weight: 700; }
.form-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.form-title h2 { margin: 0; }
.req { color: #b42318; }
button.icon-x {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b42318;
  font-size: 28px;
  line-height: 1;
}
.money { display: flex; align-items: center; gap: 8px; }
.money input { flex: 1; min-width: 0; }
details.fold { border: 1px solid var(--line); border-radius: 12px; }
details.fold summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; cursor: pointer; list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
details.fold[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
details.fold .stack { padding: 0 14px 14px; }
.settings { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.settings-form { display: flex; flex-direction: column; gap: 10px; }
details.settings-fold {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
details.settings-fold summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  font-weight: 750;
  font-size: 1.15rem;
  cursor: pointer;
  list-style: none;
}
details.settings-fold summary::-webkit-details-marker { display: none; }
details.settings-fold summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
details.settings-fold[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
details.settings-fold .stack { padding: 0 18px 16px; }
.template-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.template-row button { margin-left: auto; }
.user-list { display: flex; flex-direction: column; gap: 4px; }
.user-list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #e8e4df);
}
.user-list-row form { margin: 0; }
.user-list-name { font-weight: 700; min-width: 6rem; }
.user-list-role { min-width: 5rem; }
.user-list-row .user-edit-open { margin-left: auto; }
.user-edit-panel {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e8e4df);
  border-radius: 12px;
  background: var(--card, #fff);
}
.task-filter { margin: 0 0 12px; }
.task-filter label.check { margin: 0; }
.insight-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #6b6560);
  margin: 0 0 6px;
}
.insight-card { margin-bottom: 12px; }
.insight-teaser {
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #e8e4df);
}
.insight-teaser:last-child { border-bottom: 0; }
.page-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title h1 { margin: 0; flex: 1 1 auto; }
.page-title .secondary { flex: none; }
.user-locked { color: var(--bad); font-weight: 650; }
.balance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 12px 0;
}
.balance-table th,
.balance-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line, #e8e4df);
}
.balance-table th { font-weight: 700; }
.balance-remove { margin: 4px 0; }
.slip-helper { margin-top: 14px; font-weight: 650; }
.slip-kind { font-weight: 750; margin: 0 0 8px; }
.when-set {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.when-set legend { font-weight: 750; padding: 0; }
.when-line {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.when-line input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  margin: 0;
  accent-color: var(--accent, #1f6f68);
}
.when-line input[type="number"] { width: 4.5rem; flex: none; }
.when-line select { width: auto; flex: none; }
.fold-label { margin: 4px 0 0; font-weight: 750; }
.finder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}
.finder .finder-status, .finder #reader, .finder .file-fallback, .filter-fields { grid-column: 1 / -1; }
.filter-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stock-filter { display: flex; gap: 8px; }
.stock-filter select, .stock-filter input { width: 100%; }
.grow { min-width: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; }
input, select, textarea, button {
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid #99d5cf; border-color: transparent; }
button, .mode, a.action {
  background: var(--accent);
  color: white;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}
button.secondary, a.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}
button:disabled {
  background: #e8edf2;
  color: #8b97a3;
  cursor: not-allowed;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.actions > * { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modes-stack { grid-template-columns: 1fr; gap: 12px; max-width: 28rem; }
.modes-stack .mode { min-height: 92px; font-size: 1.2rem; }
.open-slip {
  max-width: 28rem;
  margin: 0 0 18px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: #fdeceb;
  border: 1px solid #f3c3be;
}
.open-slip h2 { margin: 0; font-size: 1.35rem; color: var(--bad); }
.open-when { margin: 2px 0 10px; color: var(--ink); font-weight: 400; }
.open-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  font-size: 1.08rem;
  color: var(--ink);
}
.open-line span:last-child { font-weight: 750; white-space: nowrap; }
.open-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.open-actions form { margin: 0; }
.open-actions .open-go, .open-actions .open-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
}
.open-actions .open-go { background: var(--bad); color: white; border: 0; }
.open-actions .open-stop { background: white; color: var(--bad); border: 1px solid #f3c3be; }
.mode {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 16px;
  border-radius: 18px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.mode span { font-weight: 450; color: var(--muted); }
.plain { list-style: none; padding: 0; margin: 0; }
.line { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line form { margin: 0; }
.line button.remove {
  background: transparent;
  color: var(--bad);
  border: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}
.notice { background: #e8f7ef; color: var(--ok); padding: 12px 14px; border-radius: 12px; }
.error { background: #fdeceb; color: var(--bad); padding: 12px 14px; border-radius: 12px; }
.picks { display: flex; flex-direction: column; gap: 10px; }
a.pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  margin: 0;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}
a.pick .product {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
a.pick .when, a.pick .amount { white-space: nowrap; }
a.pick .when { color: var(--muted); }
a.pick .amount { font-weight: 750; }
.barcode-line { margin: 0 0 14px; color: var(--muted); font-size: 0.85rem; }
.stock-kicker { margin: 0; color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.stock-num { display: flex; align-items: baseline; gap: 8px; margin: 0 0 14px; font-size: 2.6rem; font-weight: 760; letter-spacing: -0.04em; line-height: 1.05; }
.stock-unit { color: var(--muted); font-size: 0.95rem; font-weight: 650; letter-spacing: 0; }
.price-line { margin: 0 0 12px; font-size: 1.25rem; font-weight: 750; }
.price-line span, .price-line s { font-weight: 450; color: var(--muted); font-size: 0.95rem; }
.low-list { display: flex; flex-direction: column; }
a.low-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
a.low-link:last-child { border-bottom: 0; }
.low-name { min-width: 0; }
.low-qty {
  flex: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.low-qty-bad { color: var(--bad); }
.task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.task-row > form { margin: 0; }
.task-row:last-of-type { border-bottom: 0; }
button.task-check {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}
.task-name { font-weight: 700; }
.task-copy { display: flex; flex-direction: column; min-width: 0; }
.task-course { color: var(--muted); font-size: 0.85rem; font-weight: 650; }
.task-meta { color: var(--muted); font-size: 0.9rem; white-space: nowrap; grid-column: -1; justify-self: end; }
.nav-bell > summary { position: relative; }
.bell-summary .desk-tab-label { display: none; }
.bell-summary .desk-tab-icon { position: relative; width: 44px; height: 44px; }
.bell-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #b42318;
  color: white;
  font-size: 10px;
  line-height: 16px;
  font-weight: 750;
  text-align: center;
}
.nav-bell .pop { max-height: 70vh; overflow: auto; min-width: min(300px, calc(100vw - 24px)); padding: 4px; }
.nav-bell .bell-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: end;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.nav-bell .bell-item:last-child { border-bottom: 0; }
.nav-bell .bell-foot { display: contents; }
.nav-bell a.bell-title {
  grid-column: 1 / -1;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: none;
}
.nav-bell a.bell-detail {
  grid-column: 1;
  grid-row: 2;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  color: var(--muted);
  background: none;
}
.nav-bell a.bell-title:hover,
.nav-bell a.bell-detail:hover { color: var(--accent); }
.nav-bell .bell-actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  justify-self: end;
}
.nav-bell .bell-actions form {
  margin: 0;
  width: auto;
  display: block;
}
.nav-bell .bell-actions button.bell-task,
.nav-bell .bell-actions button.bell-dismiss {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-weight: inherit;
  text-align: center;
  font-size: 0;
  line-height: 0;
}
.nav-bell .bell-actions button.bell-task {
  color: #d97706;
}
.nav-bell .bell-actions button.bell-task .bell-task-icon {
  display: block;
  width: 22px;
  height: 22px;
}
.nav-bell .bell-actions button.bell-task:hover { color: #b45309; }
.nav-bell .bell-actions button.bell-dismiss {
  color: var(--bad);
}
.nav-bell .bell-actions button.bell-dismiss:hover { color: #912018; }
.nav-bell .bell-foot {
  align-items: center;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.card-head h2,
.card-head .due {
  margin: 0;
  flex: 1 1 auto;
}
.card-updated {
  font-size: 0.85rem;
  white-space: nowrap;
  margin-left: auto;
}
.nav-bell .bell-actions button.bell-snooze {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.nav-bell .bell-actions button.bell-snooze:hover { color: var(--ink); }
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.btn-icon svg { flex-shrink: 0; }
.article-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.5rem 12px;
  align-items: center;
}
.article-row-actions,
.article-actions-block .article-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.article-row-actions .inline-icon-form { display: inline; margin: 0; }
.variation-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.35rem 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.variation-line:first-of-type { border-top: 0; }
.variation-title { font-weight: 650; min-width: 0; }
.variation-stock,
.variation-price {
  white-space: nowrap;
  text-align: right;
}
.variation-price { font-weight: 750; }
.variation-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-left: 0.75rem;
}
@media (min-width: 900px) {
  .slip summary.article-summary {
    grid-template-columns: minmax(0, 1fr) 5.5rem 7rem 4.25rem;
    gap: 12px;
  }
  .slip summary.article-summary.article-summary--variable,
  .slip summary.article-summary:not(:has(.article-row-actions)) {
    grid-template-columns: minmax(0, 1fr) 5.5rem 7rem;
  }
  .variation-line {
    grid-template-columns: minmax(0, 1fr) 5.5rem 7rem 5rem;
    gap: 12px;
  }
  .variation-actions {
    padding-left: 1rem;
  }
}
.bell-empty { margin: 8px 10px; }
.task-bell { position: relative; }
.task-bell .icon-btn { width: 36px; height: 36px; }
.task-bell.bell-on > .menu-pop > summary { color: var(--accent); }
.task-bell .pop { min-width: 210px; padding: 12px; }
.task-done { color: var(--muted); }
.task-done .task-name { text-decoration: line-through; font-weight: 650; }
.task-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f4f7f8;
}
.idea-block { display: flex; flex-direction: column; gap: 8px; }
.idea-block .field-name { margin: 0; }
.idea-bar { margin: 0 0 12px; }
.idea-bar a.secondary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}
.idea-photo { width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; background: #f4f7f8; }
.idea audio { width: 100%; margin: 8px 0; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-actions form { margin: 0; }
#idea-audio { width: 100%; }
#idea-status:empty { display: none; }
label.check { flex-direction: row; align-items: center; font-weight: 700; }
label.check input { width: 22px; height: 22px; padding: 0; }
.receipt-sheet {
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  font-variant-numeric: tabular-nums;
}
.slip-when, .slip-brand { text-align: center; margin: 0; }
.slip-brand { font-weight: 800; letter-spacing: -0.03em; font-size: 1.15rem; margin: 2px 0 6px; }
.slip-shop-meta { text-align: center; margin: 0 0 12px; }
.slip-meta { margin: 2px 0; font-size: 0.9rem; color: var(--muted); }
.slip-meta a { color: inherit; text-decoration: none; }
.slip-meta a:hover { text-decoration: underline; }
.slip-void { text-align: center; color: var(--bad); margin: 0 0 10px; }
.slip-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: baseline;
  padding: 3px 0;
}
.slip-line.with-remove { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.slip-name { overflow: hidden; text-overflow: ellipsis; }
.slip-qty { color: var(--muted); white-space: nowrap; font-size: 0.92rem; }
.slip-price { text-align: right; white-space: nowrap; }
.slip-rule { border: 0; border-top: 1px dashed var(--ink); margin: 8px 0; }
.slip-sum { display: flex; justify-content: flex-end; gap: 16px; margin: 0; }
.slip-sum span:last-child { min-width: 5.5rem; text-align: right; }
.slip-grand { font-weight: 800; font-size: 1.05rem; }
.product form { margin-top: 8px; }
.calc { margin: 0; color: var(--muted); font-size: 0.85rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.due { font-size: 1.25rem; }
video { width: 100%; border-radius: 12px; background: #111; }
#cam { min-height: 48px; font-weight: 700; }
#scan-status { margin: 0; }
#scan-status:empty { display: none; }
#reader { width: 100%; overflow: hidden; border-radius: 12px; background: #111; }
#reader video { width: 100% !important; }
#photo-reader { position: absolute; width: 0; height: 0; overflow: hidden; }
a.action { display: inline-flex; align-items: center; padding: 12px 14px; border-radius: 12px; }
button.danger { color: var(--bad); border-color: #f3c3be; }
button.linkish { background: none; color: var(--muted); padding: 8px 10px; font-weight: 650; }
.label-sheet {
  width: 54mm;
  margin: 16px auto;
  padding: 3mm 2mm 2mm;
  text-align: center;
  background: white;
  border: 1px dashed var(--line);
}
.label-sheet img { display: block; background: white; }
.label-sheet .bars { width: 50mm; max-width: 100%; height: auto; margin: 0 auto; }
.label-sheet h1 { font-size: 0.8rem; line-height: 1.2; margin: 0 0 1.5mm; }
.label-sheet .code-line { font-size: 0.68rem; letter-spacing: 0.03em; font-weight: 650; margin: 1mm 0 0; }
.label-actions { text-align: center; }
.label-grid { display: grid; grid-template-columns: repeat(auto-fill, 58mm); gap: 4mm; justify-content: center; }
.task-order summary { cursor: pointer; }
.task-address { white-space: pre-line; margin: 4px 0; }
.task-lines { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 640px) {
  .finder { grid-template-columns: 1fr; }
  .filter-fields { grid-template-columns: 1fr; }
}
details.scan-again { padding: 0; }
details.scan-again summary {
  padding: 16px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
details.scan-again summary::-webkit-details-marker { display: none; }
details.scan-again summary::marker { content: ""; }
details.scan-again form, details.scan-again + .card form { padding: 0 16px 16px; }
.card > form.stack { padding: 0; }
.notice a { color: inherit; font-weight: 750; }
#bon { scroll-margin-top: 84px; }
.receipt-follow { max-width: 28rem; margin: 0 auto; }
.receipt-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 14px 0 10px; }
.receipt-actions form { margin: 0; }
.receipt-actions button { width: 100%; min-height: 52px; }
.receipt-next { width: 100%; min-height: 52px; margin: 0 0 14px; }
.slip-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.slip-actions form { margin: 0; }
.slip-actions button { width: 100%; min-height: 52px; }
textarea { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.receipt-note { white-space: pre-wrap; }
.label-sheet h1, .label-sheet .code-line { text-align: center; }
@media (min-width: 900px) {
  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 16px;
    padding: 8px 20px 10px;
  }
  .brand { grid-column: 1; justify-self: start; }
  .desk-nav {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2px 2px;
    margin: 0;
    max-width: min(820px, 72vw);
  }
  .desk-aside {
    grid-column: 3;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 2px;
    justify-self: end;
  }
  .desk-config { position: relative; }
  .desk-config > summary { list-style: none; }
  .desk-config > summary::-webkit-details-marker { display: none; }
  .desk-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 4.5rem;
    padding: 4px 6px 2px;
    border-radius: 14px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-align: center;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .desk-nav a.desk-tab,
  .desk-aside a.desk-tab,
  .desk-aside .desk-config > summary.desk-tab {
    padding: 4px 6px 2px;
    border-radius: 14px;
  }
  nav a.desk-tab { padding: 4px 6px 2px; border-radius: 14px; }
  .desk-tab-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 38px;
    border-radius: 12px;
    color: var(--ink);
    transition: background 0.15s ease, color 0.15s ease;
  }
  .desk-tab-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: currentColor;
    color: var(--ink);
  }
  .desk-tab-icon svg path { fill: inherit; }
  .desk-tab-icon svg path[fill="none"] {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }
  .desk-tab-label { max-width: 5.5rem; }
  .desk-nav a.desk-tab:hover .desk-tab-icon,
  .desk-aside a.desk-tab:hover .desk-tab-icon,
  .desk-config > summary.desk-tab:hover .desk-tab-icon,
  .desk-nav .bell-summary:hover .desk-tab-icon {
    background: #eef3f6;
  }
  .desk-tab[aria-current="page"] { color: var(--accent); }
  .desk-tab[aria-current="page"] .desk-tab-icon {
    background: #e7f4f2;
    color: var(--accent);
  }
  .desk-nav .bell-summary.icon-btn {
    width: auto;
    height: auto;
    min-width: 4.5rem;
    padding: 4px 6px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-radius: 14px;
  }
  .desk-nav .bell-summary .desk-tab-icon { width: 42px; height: 38px; }
  .desk-nav .bell-summary .desk-tab-label {
    display: block;
    max-width: 5.5rem;
    font-size: 0.68rem;
    font-weight: 650;
    color: var(--muted);
    line-height: 1.15;
    text-align: center;
  }
  .desk-nav .nav-bell .pop { left: 50%; right: auto; transform: translateX(-50%); }
  .phone-nav { display: none; }
  main { max-width: 1120px; }
  .home-board {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 16px;
    align-items: start;
  }
  .home-board .modes { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .desk:not(:has(.desk-detail > *)) .desk-find { max-width: 720px; }
  .desk:has(.desk-detail > *) {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 20px;
    align-items: start;
  }
  .desk-detail { position: sticky; top: 76px; }
}
@page label {
  size: 58mm 34mm;
  margin: 1.5mm;
}
@page label-sheet {
  size: A4;
  margin: 8mm;
}
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-nav a { width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none; font-size: 1.4rem; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.month-grid span, .month-grid a { min-height: 36px; display: grid; place-items: center; border-radius: 10px; text-decoration: none; color: inherit; }
.month-grid .has { background: #e7f4f2; font-weight: 750; }
.month-grid .picked { outline: 2px solid var(--accent); }
.people { margin: 0; padding-left: 18px; }

@media print {
  @page { size: A4; margin: 16mm; }
  body.label-print { page: label; }
  body.label-print.label-batch { page: label-sheet; }
  body.label-print .label-sheet { border: 0; width: auto; margin: 0; padding: 0; break-after: page; page-break-after: always; }
  body.label-print.label-batch .label-grid { display: grid; grid-template-columns: repeat(3, 62mm); gap: 2mm 3mm; justify-content: start; }
  body.label-print.label-batch .label-sheet { width: 62mm; height: 32mm; margin: 0; padding: 1mm; overflow: hidden; break-after: auto; page-break-after: auto; break-inside: avoid; page-break-inside: avoid; }
  body.label-print .label-sheet:last-of-type { break-after: auto; page-break-after: auto; }
  body.label-print .label-sheet h1 { font-size: 8pt; }
  body.label-print .label-sheet .code-line { font-size: 7pt; }
  body.label-print .label-sheet .bars { width: 50mm; }
  .top, .no-print, .crumbs { display: none !important; }
  body { background: white; }
  main { max-width: none; padding: 0; }
  .desk, .home-board { display: block !important; }
  .desk-detail { position: static !important; }
  .card { box-shadow: none; border: 1px solid #ddd; padding: 12px 0; margin: 0 0 14px; break-inside: avoid; }
  body.week-page .week-line,
  body.week-page .week-metrics,
  body.week-page .notice,
  body.week-page .error,
  body.week-page form > button { display: none !important; }
  body.week-page .week-period { display: block !important; margin-bottom: 12px; }
  body.week-page .week-chart-wrap { border: 1px solid #ddd; background: white; }
  body.week-page .week-chart { max-height: 140px; }
  body.week-page textarea { border: 1px solid #ddd; min-height: 3em; }
  body.week-page label { display: block; margin-top: 10px; }
}
