/* Ribh app styles. Layout and colours follow the mock-ups in "Screens/" (sidebar, tiles,
   tables, status chips). Mobile first: staff use this at a counter and on phones. */

:root {
  --ink: #1b1c1e;
  --muted: #62666d;
  --faint: #8b8f96;
  --bg: #f4f2ee;
  --card: #ffffff;
  --line: #e4e0d8;
  --line-soft: #efece6;
  --side: #1e1f22;
  --side-ink: #e9e6df;
  --side-muted: #9a9890;
  --accent: #e0662a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9dd;
  --good: #1f7a3d;
  --good-soft: #e3f3e7;
  --warn: #a2560f;
  --warn-soft: #fcefdc;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(20 20 20 / 4%);
  --side-width: 248px;

  /* Chart series (checked for colour-blind readers: sales blue, profit green, never orange
     next to green). Sales are columns and profit a line, so they differ by shape too. */
  --series-sales: #4a72b8;
  --series-profit: #1f7a3d;
  --grid: #ebe7e0;

  /* Type scale, from the mock-ups: page title, card title, tile figure, body, small. */
  --text-title: 1.75rem;
  --text-card: 1.1rem;
  --text-figure: clamp(1.35rem, 1.7vw, 1.7rem);
  --text-body: 1rem;
  --text-small: 0.9rem;
  --text-tiny: 0.8rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1 { font-size: var(--text-title); font-weight: 750; line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: var(--text-card); font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 4px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
.good { color: var(--good); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- Shell: sidebar + content ---- */
.shell { min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; }
.sidebar-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
}
.brand { color: var(--side-ink); text-decoration: none; display: block; min-width: 0; }
.brand:hover { color: var(--side-ink); }
.brand-name {
  display: block; font-weight: 700; font-size: 1.1rem; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand-sub { display: block; font-size: 0.85rem; color: var(--side-muted); }
.menu-button {
  border: 1px solid #3a3b3f; background: none; color: var(--side-ink);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 0.95rem;
}
.nav { display: none; padding: 4px 12px 12px; }
.nav.open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; margin: 2px 0; border-radius: 10px;
  color: var(--side-ink); text-decoration: none;
}
.nav a:hover { background: #2a2b2f; color: #fff; }
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav .count {
  min-width: 24px; padding: 0 7px; border-radius: 999px; text-align: center;
  font-size: 0.8rem; font-weight: 700; line-height: 22px;
  background: var(--accent); color: var(--accent-ink);
}
.nav a[aria-current="page"] .count { background: #fff; color: var(--accent); }
.nav-section {
  margin: 16px 14px 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--side-muted);
}
.sidebar-foot { padding: 12px 26px 18px; font-size: 0.85rem; color: var(--side-muted); }
.sidebar-foot .who { display: block; margin-bottom: 4px; }
.sidebar-foot form { display: inline; }
.sidebar-foot button {
  background: none; border: 0; padding: 0; color: var(--side-ink);
  text-decoration: underline; text-underline-offset: 2px;
}
/* On phones the sign-out block folds away with the menu. */
.with-sidebar .sidebar-foot { display: none; }
.with-sidebar.menu-open .sidebar-foot { display: block; }

.content { min-width: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: 20px 16px 32px; }
.footer {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; padding: 8px 16px 24px;
  font-size: 0.85rem; color: var(--muted);
}
.footer a { color: var(--muted); }

@media (min-width: 900px) {
  .shell.with-sidebar { display: grid; grid-template-columns: var(--side-width) 1fr; }
  .with-sidebar .sidebar { position: sticky; top: 0; height: 100vh; }
  .with-sidebar .sidebar-top { padding: 28px 26px 20px; }
  .menu-button { display: none; }
  .nav, .nav.open { display: block; flex: 1; overflow-y: auto; padding: 0 16px; }
  .with-sidebar .sidebar-foot { display: block; margin-top: auto; }
  .page { padding: 36px 40px 40px; }
}

/* ---- Page header ---- */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 24px; margin-bottom: 20px;
}
.page-head .sub { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb { margin: 0 0 8px; font-size: 0.9rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.intro { max-width: 75ch; color: var(--muted); margin-bottom: 20px; }

/* ---- Cards ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 16px; margin-bottom: 12px;
}
.card-head h2 { margin: 0; }
.card-head .note { font-size: 0.9rem; color: var(--muted); }
.card.narrow { max-width: 420px; margin: 32px auto; }
.grid-2 { display: grid; gap: 16px; }
.grid-2 > .card { margin: 0; }
.grid-2 > * { min-width: 0; }  /* let tables scroll inside their card on phones */
@media (min-width: 1000px) { .grid-2 { grid-template-columns: 3fr 2fr; align-items: start; } }

/* ---- Tiles (numbers at a glance) ---- */
.tiles {
  display: grid; gap: 12px; margin-bottom: 20px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.tile {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
}
a.tile:hover { border-color: var(--accent); color: var(--ink); }
.tile-label { display: block; font-size: var(--text-small); color: var(--muted); }
.tile-value {
  display: block; font-size: var(--text-figure); font-weight: 700; line-height: 1.25;
  margin: 4px 0; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tile-value.good { color: var(--good); }
.tile-value.warn { color: var(--accent); }
.tile-value.bad { color: var(--bad); }
.tile-note { display: block; font-size: var(--text-small); color: var(--muted); }

/* ---- Tables: they scroll inside their card, never the whole page ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-weight: 600; font-size: 0.9rem; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; }
.table .sub-row td { background: #faf9f6; font-size: 0.92rem; }
.table ul { margin: 4px 0 0; padding-left: 20px; }

/* ---- Status chips ---- */
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem;
  font-weight: 600; white-space: nowrap; background: var(--line-soft); color: var(--muted);
}
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }

/* ---- Alerts (coloured bar on the left, as in the mock-up) ---- */
.alert-item { border-left: 4px solid var(--accent); padding: 2px 0 2px 14px; margin: 0 0 18px; }
.alert-item:last-child { margin-bottom: 0; }
.alert-item.serious { border-left-color: var(--bad); }
.alert-item.closed { border-left-color: var(--line); }
.alert-item h3 { margin: 0 0 2px; }
.alert-item p { margin: 0 0 4px; }
.alert-meta { font-size: 0.9rem; color: var(--muted); }
.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* ---- Forms and buttons ---- */
label { display: block; margin-top: 12px; font-weight: 600; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 4px; }
input[type="text"], input[type="password"], input[type="number"], input[type="email"],
input[type="search"], input[type="date"], select, textarea {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
input[type="number"].short { width: 9em; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.filters label { margin: 0; flex: 1 1 180px; }
.inline-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-field label { margin: 0; }

button { font: inherit; cursor: pointer; }
.button, button.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: 1px solid var(--accent); border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 1rem;
  text-decoration: none; line-height: 1.3;
}
.button:hover, button.primary:hover { filter: brightness(0.95); color: var(--accent-ink); }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.button.secondary:hover { border-color: var(--ink); color: var(--ink); filter: none; }
.button.secondary[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.button.danger { background: #fff; color: var(--bad); border-color: #f2c4bf; }
.button.danger:hover { border-color: var(--bad); color: var(--bad); filter: none; }
.button.small { padding: 6px 12px; font-size: 0.9rem; }
button.primary { width: 100%; margin-top: 18px; padding: 12px; }
form.inline { display: inline; }

/* ---- Messages and banners ---- */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.message {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px;
  background: var(--good-soft); color: var(--good); border: 1px solid #c9e6d1;
}
.message.error { background: var(--bad-soft); color: var(--bad); border-color: #f6c9c4; }
.message.warning, .message.info { background: var(--warn-soft); color: var(--warn); border-color: #f2d6ae; }
.banner {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px;
  background: var(--accent-soft); border: 1px solid #f3c7aa;
}
.banner p { margin: 0; }

/* ---- Empty states ---- */
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); }

/* ---- Label / value lists ---- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---- Raw record view and pager ---- */
pre.raw {
  overflow-x: auto; background: #fbfaf8; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px; font-size: 13px;
}
.pager { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; margin: 16px 0; }

/* ---- Legal pages ---- */
.prose { max-width: 75ch; }
.prose h2 { margin-top: 24px; }

/* ---- Error pages ---- */
.error-page { text-align: center; max-width: 520px; margin: 40px auto; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--accent); margin: 0 0 8px; }

/* Intuit's "Connect to QuickBooks" button colours (their app-review guidelines). Swap in Intuit's
   official button image from the developer portal if the reviewer asks for it. */
.button.c2qb { background: #2ca01c; border-color: #2ca01c; color: #fff; }
.button.c2qb:hover { background: #108000; border-color: #108000; color: #fff; filter: none; }
.error-page .actions-row { justify-content: center; }

.table .cell-wide { display: block; min-width: 240px; }
input[type="text"].short { width: 10em; }
.button { white-space: nowrap; }
.card.narrow-form { max-width: 560px; }

/* ---- One-line hints (instead of paragraphs of instructions) ---- */
.hint { margin: 0 0 16px; font-size: var(--text-small); color: var(--muted); }
.hint a { color: var(--muted); }
.page-head .hint { margin: 4px 0 0; }

/* ---- Tiles: change against last week, and the one tile that must stand out ---- */
.tile-change { display: block; font-size: var(--text-tiny); color: var(--muted); margin-top: 2px; }
.tile-change .up, .tile-change .down { font-weight: 600; color: var(--ink); }
.tile.prominent { border-color: #f3c7aa; background: #fffaf6; }
.tile.prominent .tile-value { color: var(--warn); }

/* ---- Charts (apps/core/charts.py draws them; no scripts, no inline styles) ---- */
.chart { margin: 4px 0 0; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-svg .grid { stroke: var(--grid); stroke-width: 1; }
.chart-svg .grid.base { stroke: var(--line); }
.chart-svg .axis { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-svg .bar { fill: var(--series-sales); }
.chart-svg .line {
  fill: none; stroke: var(--series-profit); stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round;
}
.chart-svg .dot { fill: var(--series-profit); stroke: var(--card); stroke-width: 2; }
.chart-svg .hit { fill: transparent; }
.chart-svg .hit:hover { fill: rgb(27 28 30 / 5%); }
.chart-narrow { display: none; }
@media (max-width: 640px) {
  .chart-wide { display: none; }
  .chart-narrow { display: block; }
}
.legend {
  display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0; padding: 0;
  font-size: var(--text-small); color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.legend .key.sales { background: var(--series-sales); }
.legend .key.profit { height: 3px; border-radius: 2px; background: var(--series-profit); }
details.table-view { margin-top: 8px; font-size: var(--text-small); }
details.table-view summary { cursor: pointer; color: var(--muted); }
.meter { display: block; width: 100%; height: 10px; }
.meter-track { fill: var(--line-soft); }
.meter-fill { fill: var(--accent); }

/* ---- Lists of things that need a look (Today, Alerts) ---- */
.attention { list-style: none; margin: 0; padding: 0; }
.attention li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.attention li:last-child { border-bottom: 0; }
.attention .what { min-width: 0; flex: 1 1 260px; }
.attention .what a { font-weight: 600; text-decoration: none; }
.attention .what a:hover { text-decoration: underline; }
.attention .detail { display: block; font-size: var(--text-small); color: var(--muted); }
.attention .amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- Filter chips (instead of a form with a Show button) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.chips a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: var(--text-small); font-weight: 600; text-decoration: none;
}
.chips a:hover { border-color: var(--ink); color: var(--ink); }
.chips a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips .n { font-weight: 500; color: var(--faint); }
.chips a[aria-current="true"] .n { color: #d6d3cc; }

/* Phones: two tiles per row, so the day's numbers fit on one screen. */
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile-value { font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; }
  .tile-note, .tile-label { font-size: var(--text-tiny); }
  h1 { font-size: 1.5rem; }
}
.nowrap { white-space: nowrap; }
.attention .amount.bad { color: var(--bad); }
.attention .detail a { color: var(--muted); font-weight: 500; }
.tile-value.muted { color: var(--faint); }
.tile-change .down { color: var(--ink); }
.stack { display: grid; gap: 16px; align-content: start; }
.stack > .card { margin: 0; }
.stack > * { min-width: 0; }
@media (max-width: 640px) {
  /* On a phone the owner's first questions come first: what's overdue, what needs a look. */
  .tile.prominent { grid-column: 1 / -1; order: -1; }
  .grid-2 > #needs-attention { order: -1; }
}

/* ---- Alerts list: money at stake first ---- */
.alert-list { padding: 4px 20px; }
.alert-row {
  border-left: 4px solid var(--accent); padding: 14px 0 14px 16px; margin: 12px 0;
}
.alert-row + .alert-row { border-top: 0; }
.alert-list .alert-row:not(:last-child) { box-shadow: 0 1px 0 var(--line-soft); padding-bottom: 18px; }
.alert-row.serious { border-left-color: var(--bad); }
.alert-row.closed { border-left-color: var(--line); }
.alert-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.stake { margin: 0; font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.stake span { font-size: var(--text-body); font-weight: 600; color: var(--muted); }
.alert-what { margin: 4px 0 2px; }
.alert-row .alert-meta { margin: 0; }
.alert-more { margin: 6px 0 0; font-size: var(--text-small); color: var(--muted); }
.alert-more summary { cursor: pointer; }
.alert-more p { margin: 6px 0 0; }
.alert-row .actions-row { margin-top: 8px; }
@media (min-width: 900px) {
  .alert-row { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; }
  .alert-row > :not(form) { grid-column: 1; }
  .alert-row > form.actions-row { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin: 0; }
}
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin-bottom: 10px; }
  .chips li { flex: 0 0 auto; }
  .chips a { white-space: nowrap; }
  .alert-list { padding: 4px 14px; }
}
.tile-warning {
  display: block; margin-top: 6px; font-size: var(--text-tiny); font-weight: 600; color: var(--warn);
  text-decoration: none;
}
.tile-warning::before { content: "! "; font-weight: 800; }
.tile-warning:hover { text-decoration: underline; color: var(--warn); }

/* ---- Who owes me ---- */
.cell-sub { display: block; font-size: var(--text-small); color: var(--muted); margin-top: 2px; }
.owed-table td { vertical-align: middle; }
@media (max-width: 900px) { .wide-only { display: none; } }
.owed-table td:first-child { min-width: 220px; }
.owed-table .cell-sub { white-space: nowrap; }
@media (max-width: 640px) {
  /* Each overdue customer becomes a small card: name and amount, oldest invoice, Remind. */
  .owed-table thead { display: none; }
  .owed-table, .owed-table tbody, .owed-table tr { display: block; width: 100%; }
  .owed-table tr {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  }
  .owed-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .owed-table td:first-child { min-width: 0; }
  .owed-table .owed-amount { grid-column: 2; grid-row: 1; }
  .owed-table .owed-oldest { grid-column: 1; }
  .owed-table .owed-action { grid-column: 2; }
  .owed-table .cell-sub { white-space: normal; }
}
@media (max-width: 640px) { .owed-table td.wide-only { display: none; } }
/* ---- Needs your attention: one header line per group, top 3, See all ---- */
.attention-group { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.attention-group:first-of-type { padding-top: 0; }
.attention-group:last-of-type { border-bottom: 0; }
.attention-group h3 {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 0 4px; font-size: var(--text-body);
}
.attention-group h3 a { text-decoration: none; }
.attention-group h3 a:hover { text-decoration: underline; }
.attention-group .attention li { padding: 4px 0; border: 0; font-size: var(--text-small); flex-wrap: nowrap; }
.attention-group .attention .what { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-group .attention .what a { font-weight: 500; color: var(--ink); }
.attention-group .attention .amount { font-weight: 600; }
.see-all { display: inline-block; margin-top: 2px; font-size: var(--text-small); color: var(--muted); }
.attention-group .attention .detail { display: inline; margin-left: 6px; font-size: var(--text-tiny); }
.tile-change .when { white-space: nowrap; }
.alert-facts {
  display: flex; flex-wrap: wrap; gap: 2px 18px; list-style: none; margin: 2px 0 0; padding: 0;
  font-size: var(--text-small);
}
.alert-facts span { color: var(--faint); }
.alert-facts a { color: var(--ink); }

/* ---- Products insights ---- */
.grid-even { display: grid; gap: 16px; }
.grid-even > .card { margin: 0; min-width: 0; }
@media (min-width: 1000px) { .grid-even { grid-template-columns: 1fr 1fr; align-items: start; } }
.table.compact td, .table.compact th { padding: 9px 10px; }
.table .name-cell a { color: var(--ink); text-decoration: none; font-weight: 500; }
.table .name-cell a:hover { text-decoration: underline; }
.attention.compact li { padding: 7px 0; flex-wrap: nowrap; }
.attention.compact .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention.compact .what a { font-weight: 500; color: var(--ink); }
.list-head {
  display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 2px; font-size: var(--text-body);
}
.list-head:first-of-type { margin-top: 0; }
.list-head a { text-decoration: none; }
.inline-search input { width: 220px; padding: 9px 12px; }
@media (max-width: 640px) { .inline-search, .inline-search input { width: 100%; } }
.table .name-cell { max-width: 0; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-cell { min-width: 300px; }
.product-cell a { color: var(--ink); text-decoration: none; }
.product-cell a:hover { text-decoration: underline; }

/* ---- Month report ---- */
.bar-rows { display: grid; gap: 12px; margin: 4px 0 14px; }
.bar-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: center; }
.bar-row .num { font-weight: 600; min-width: 110px; }
.actions-list { margin: 0; padding-left: 22px; }
.actions-list li { margin: 0 0 10px; line-height: 1.45; }
.actions-list a { color: var(--ink); text-decoration: none; }
.actions-list a:hover { text-decoration: underline; }
.table td.bad { color: var(--bad); }
.chart-svg .break { fill: none; stroke: var(--card); stroke-width: 2; }
.chart-svg .outlier { font-weight: 600; fill: var(--ink); }
.chart-svg .pdot { fill: var(--series-profit); stroke: var(--card); stroke-width: 1.5; }

/* Month report: how profit on parts is worked out (value plan) */
.profit-steps { margin-bottom: 1.5rem; }
.profit-steps li.total { border-top: 1px solid var(--line, #e3e6ea); }
