/* =====================================================================================================
   Team area (docs/ADMIN.md): navigation, detail pages, the workshop, products, money, settings and "Today".
   Only tokens – light and dark follow by themselves. Hover changes colour only; arrows lean (motion.css, DESIGN.md "Motion").
   ===================================================================================================== */

/* ---------------------------------------------------------------- frame */
/* the same column as "My account" (pages.css "side navigation"); the groups get a little air */
.side-nav--admin { gap: var(--s-3); }
.side-nav__group { display: grid; gap: 2px; }
.side-nav__title--group { padding-top: var(--s-1); font-size: 11px; }
.side-nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1023px) {
  .side-nav--admin { flex-direction: row; gap: var(--s-1); }
  .side-nav__group { display: contents; }
}

.page-head--admin { align-items: flex-start; }
.page-head__text { display: grid; gap: var(--s-2); flex: 1 1 420px; min-width: 0; }
.page-head--admin .lead { max-width: 68ch; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-left: auto; }
.page-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); font-size: var(--t-small); }
.admin-section-title { display: flex; align-items: baseline; gap: var(--s-2); margin: var(--s-7) 0 var(--s-4); font-size: var(--t-h3); font-weight: 400; letter-spacing: var(--tracking-display); }
.admin-section-title .muted { font-size: var(--t-body); }

.admin-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: var(--gap); align-items: start; }
.admin-detail__main, .admin-detail__side { display: grid; gap: var(--gap); min-width: 0; }
@media (max-width: 1179px) { .admin-detail { grid-template-columns: minmax(0, 1fr); } }
.admin-card--spaced { margin-top: var(--gap); }
.admin-card .card__head .badge { flex: none; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 639px) { .field-row, .field-row--3 { grid-template-columns: minmax(0, 1fr); } }
.field--toggle { align-self: end; padding-bottom: 6px; }

.control__suffix { flex: none; font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.input--money { font-variant-numeric: tabular-nums; }
.kv--admin > div { grid-template-columns: minmax(110px, 40%) 1fr; }
.badge-stack { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.btn-row--end { justify-content: flex-end; }
.mono { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.text-danger { color: var(--danger); }
.code-chip { display: inline-block; padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface); font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.file-chip .icon { width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.segmented__count { min-width: 20px; padding: 0 6px; border-radius: var(--r-pill); background: color-mix(in oklab, var(--ink) 8%, transparent); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }

.swatch-label { display: inline-flex; align-items: center; gap: 6px; }
.swatch-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px var(--line-strong); }
.material-color { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* rows that open a page */
.table--rows tbody tr[data-row-link] { cursor: pointer; }
.table--rows tbody tr[data-row-link]:hover { background: var(--highlight); }
.table__primary { font-weight: 600; }
.table-wrap--flat { box-shadow: none; background: none; }
.product-cell { display: flex; align-items: center; gap: var(--s-3); }
.thumb--empty { display: grid; place-items: center; width: 44px; height: 44px; color: var(--muted); }
.thumb--empty .icon { width: 18px; height: 18px; }

/* A long form's save button floats right of its content (parts.js saveAside). Its column is as tall as
   the content and the button sticks under the header inside it: it moves down with the page, but only
   as far as the content reaches. Where the window leaves room right of the content (from 1620 px) the
   column takes no width and the button stands in that margin; narrower it gets a column of its own; on
   a tablet or phone it is a bar under the form, held at the window's lower edge while the form scrolls.
   The form's content stops at a readable width (--form-max) instead of running on to the window's edge. */
.save-layout { --form-max: 64rem; display: grid; grid-template-columns: minmax(0, var(--form-max)) auto; justify-content: start; gap: var(--gap); }
.save-layout--wide { --form-max: calc(64rem + 200px + var(--gap)); }
.save-layout > :first-child { min-width: 0; }
.save-bar {
  position: sticky; top: calc(var(--header-h) + var(--s-5)); z-index: 5;
  display: grid; justify-items: stretch; gap: var(--s-2); width: max-content;
}
.save-bar > .btn--primary { box-shadow: var(--shadow-md); }
.save-bar__state { display: inline-flex; align-items: center; justify-self: center; gap: 6px; margin-bottom: var(--s-1); font-size: var(--t-small); }
.save-bar__state .icon { width: 16px; height: 16px; }
/* undo and redo as bare arrows (only their lines turn yellow under the pointer), discard beside them */
.save-bar__tools { display: flex; align-items: center; gap: 2px; }
.save-bar__tools .icon-btn:hover:not(:disabled) { background: none; }
.save-bar__tools .icon-btn:disabled, .save-bar__discard:disabled { opacity: .35; }
.save-bar__discard { margin-left: auto; }
@media (min-width: 1620px) {
  .save-layout { column-gap: 0; }
  .save-aside { width: 0; }
  .save-bar { margin-left: var(--s-5); }
}
@media (max-width: 1023px) {
  .save-layout { grid-template-columns: minmax(0, 1fr); }
  /* the bar becomes an item of the whole form, so it can stay at the window's lower edge through it */
  .save-aside { display: contents; }
  .save-bar {
    top: auto; bottom: var(--s-3); display: flex; align-items: center; justify-content: flex-end; gap: var(--s-3); width: auto;
    padding: var(--s-3) var(--s-4); border-radius: var(--r-lg);
    background: color-mix(in oklab, var(--raised) 92%, transparent); box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line);
    backdrop-filter: blur(10px);
  }
  .save-bar > .btn--primary { order: 2; box-shadow: none; }
  .save-bar__state { margin: 0 auto 0 0; }
}

/* Sections of a form (product, settings) as tabs left of their content, like the page navigation;
   on narrower screens they become one scrolling row above it. */
.tabbed { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.tabbed__nav { position: sticky; top: calc(var(--header-h) + var(--s-5)); display: grid; gap: 2px; }
.tabbed__tab {
  display: flex; align-items: center; gap: var(--s-3); min-height: 40px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm);
  background: none; color: var(--muted); font: inherit; font-size: var(--t-small); font-weight: 500; text-align: left; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tabbed__tab .icon { width: 18px; height: 18px; flex: none; }
.tabbed__tab:hover { color: var(--ink); background: var(--highlight); }
.tabbed__tab:is([aria-selected="true"], [aria-current="page"]) { color: var(--ink); font-weight: 600; background: none; }
.tabbed__panels { display: grid; gap: var(--gap); min-width: 0; }
.tabbed__panels > .admin-card--spaced { margin-top: 0; }
@media (max-width: 1199px) {
  .tabbed { grid-template-columns: minmax(0, 1fr); }
  .tabbed__nav { position: static; display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; }
  .tabbed__tab { flex: none; }
}

/* ---------------------------------------------------------------- order */
.mini-lines--admin { display: grid; gap: var(--s-4); }
.mini-line__placeholder { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--surface); color: var(--muted); }
.mini-line__placeholder .icon { width: 20px; height: 20px; }
.mini-lines--admin + .summary__rows { padding-top: var(--s-4); border-top: 1px solid var(--line); }

.job-list { display: grid; gap: 0; font-size: var(--t-small); }
.job-list__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.job-list__item:last-child { border-bottom: 0; }
.job-list__number { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.note-form { display: grid; gap: var(--s-3); justify-items: start; padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.note-form .field { width: 100%; }
.history { display: grid; gap: 0; }
.history__item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3) 0; }
.history__item:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 40px; bottom: -8px; width: 2px; background: var(--line); }
.history__dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--ink); }
.history__dot .icon { width: 14px; height: 14px; }
.history__item--note .history__dot { background: var(--accent); color: var(--accent-ink); }
.history__text { font-weight: 500; }
.history__note { font-size: var(--t-small); }
.history__meta { font-size: var(--t-label); color: var(--muted); }

.refunds, .receipts { display: grid; gap: var(--s-2); font-size: var(--t-small); }
.refunds li, .receipts__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.refunds .icon, .receipts__item > .icon { width: 18px; height: 18px; color: var(--muted); }

/* ---------------------------------------------------------------- requests */
.request-card { padding: 0; }
.request-card__link { position: relative; display: grid; gap: var(--s-3); padding: var(--s-5) calc(var(--s-5) + 28px) var(--s-5) var(--s-5); border-radius: inherit; color: inherit; transition: background-color var(--dur) var(--ease); }
.request-card__link:hover { background: var(--highlight); }
.request-card__facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--t-small); color: var(--muted); }
.request-card__facts > span { display: inline-flex; align-items: center; gap: 6px; }
.request-card__facts .icon { width: 16px; height: 16px; }
.request-card__note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--t-small); }
.request-card__chev { position: absolute; right: var(--s-4); top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--muted); }

.thread { display: grid; gap: var(--s-3); }
.thread__item { display: grid; gap: 4px; max-width: 85%; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); }
.thread__item--team { justify-self: end; background: color-mix(in oklab, var(--accent) 22%, var(--raised)); }
.thread__meta { font-size: var(--t-label); color: var(--muted); }
.thread__text { font-size: var(--t-small); }

.quote { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.quote__calc { display: grid; gap: var(--s-4); }
.quote__title { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-body); font-weight: 600; }
.quote__title .icon { width: 18px; height: 18px; }
.quote__suggestion { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3) var(--s-5); align-items: end; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface); }
@media (max-width: 639px) { .quote__suggestion { grid-template-columns: minmax(0, 1fr); } }
.quote__offer { padding-top: var(--s-5); border-top: 1px solid var(--line); }
.calc__rows { display: grid; gap: 6px; font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.calc__rows > div { display: flex; justify-content: space-between; gap: var(--s-3); }
.calc__rows dt { color: var(--muted); }
.calc__unit { padding-top: var(--s-2); border-top: 1px solid var(--line); font-weight: 600; }
.calc__unit dt, .calc__total dt { color: var(--ink); }
.calc__total { font-size: var(--t-body); font-weight: 600; }
.quote-sent { display: grid; gap: var(--s-4); }
.quote-sent__line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-3); font-size: var(--t-small); }
.quote-sent__line > span:first-of-type { grid-column: 1; color: var(--muted); }
.quote-sent__price { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- workshop */
.printers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.printer { display: grid; gap: var(--s-4); align-content: start; padding: var(--s-5); border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.printer__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.printer__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--surface); }
.printer__icon .icon { width: 20px; height: 20px; }
.printer__name { display: grid; }
.printer__job { display: grid; gap: var(--s-3); }
.printer__title { display: grid; font-weight: 600; }
.printer__title .table__sub { font-weight: 400; }
.printer__times { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--t-label); color: var(--muted); }
.printer__idle { font-size: var(--t-small); }
.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface); overflow: hidden; }
.progress__bar { display: block; width: var(--value); height: 100%; border-radius: inherit; background: var(--action); }

/* ---------------------------------------------------------------- filament */
.spools { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--gap); }
.spool { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-5); border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.spool--empty { box-shadow: var(--shadow-sm), inset 3px 0 0 var(--danger), inset 0 0 0 1px var(--line); }
.spool__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.spool__swatch { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--swatch); color: color-mix(in oklab, var(--swatch) 40%, #000); box-shadow: inset 0 0 0 1px var(--line-strong); }
.spool__swatch .icon { width: 20px; height: 20px; opacity: .55; }
.spool__name { display: grid; font-size: var(--t-small); }
.spool__name strong { font-size: var(--t-body); }
.spool__grams { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.meter { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--surface); }
.meter__fill { position: absolute; inset: 0 auto 0 0; width: var(--value); border-radius: inherit; background: var(--action); }
.spool--empty .meter__fill, .spool--low .meter__fill { background: var(--muted); }
.meter__min { position: absolute; top: -3px; bottom: -3px; left: var(--at); width: 2px; border-radius: 1px; background: var(--danger); }
.spool__facts { display: grid; gap: 4px; font-size: var(--t-small); }
.spool__facts > div { display: flex; justify-content: space-between; gap: var(--s-3); }
.spool__facts dt { color: var(--muted); }
.spool__facts dd { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- products */
.photo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: var(--s-3); }
.photo-pick__item { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.photo-pick__img { display: block; aspect-ratio: 1; background: var(--surface); }
.photo-pick__img img { width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: opacity var(--dur) var(--ease); }
.photo-pick__item:hover .photo-pick__img img, .photo-pick__item.is-on .photo-pick__img img { opacity: 1; }
.photo-pick__item.is-on { box-shadow: 0 0 0 2px var(--action); }
.photo-pick__input { position: absolute; opacity: 0; pointer-events: none; }
.photo-pick__item:has(.photo-pick__input:focus-visible) { box-shadow: var(--focus-ring); }
.photo-pick__mark { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--raised); color: transparent; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line-strong); }
.photo-pick__mark .icon { width: 14px; height: 14px; }
.photo-pick__item.is-on .photo-pick__mark { background: var(--action); color: var(--action-ink); box-shadow: none; }
.photo-pick__main { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-2); margin-top: var(--s-2); }
.check-grid--colors { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.check-card { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: var(--surface); font-size: var(--t-small); cursor: pointer; transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.check-card:hover { background: var(--highlight); }
.check-card:has(input:checked) { background: var(--raised); box-shadow: inset 0 0 0 2px var(--action); }
.check-card input { width: 16px; height: 16px; flex: none; accent-color: var(--action); }
.check-card > span { display: grid; }
.check-card--color > span:last-child { display: inline; }

.specs-edit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-2); }
.specs-edit__head { font-size: var(--t-label); color: var(--muted); }
.input--cell { width: 100%; min-height: 40px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-small); box-shadow: inset 0 -2px 0 transparent; transition: box-shadow var(--dur) var(--ease); }
.input--cell:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 767px) { .specs-edit { grid-template-columns: repeat(2, minmax(0, 1fr)); } .specs-edit__head:nth-child(n + 3) { display: none; } }

/* ---------------------------------------------------------------- money */
.kpis--money { margin-bottom: var(--s-5); }
.kpi--static { cursor: default; }
.kpi--static:hover { box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }

/* ---------------------------------------------------------------- reviews */
.review-card { gap: var(--s-3); }
.review-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.review-card__title { font-size: var(--t-body); font-weight: 600; }
.review-card__text { max-width: 72ch; }
.review-card__product { display: inline-flex; align-items: center; gap: var(--s-2); justify-self: start; font-size: var(--t-small); color: var(--muted); }
.review-card__product:hover { color: var(--ink); }
.review-card__reply { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); font-size: var(--t-small); }
.review-card__form { display: grid; gap: var(--s-3); }
.stars { display: inline-flex; gap: 1px; }
.stars__star .icon { width: 16px; height: 16px; color: var(--line-strong); }
.stars__star.is-on .icon { color: var(--ink); fill: var(--accent); stroke: var(--accent-stroke); }
:root[data-theme="dark"] .stars__star.is-on .icon { stroke: var(--accent); }

/* ---------------------------------------------------------------- settings */
.methods { display: grid; gap: 0; }
.method-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto; align-items: end; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.method-row:first-child { padding-top: 0; }
.method-row__name { display: grid; align-self: center; }
.method-row__toggle { padding-bottom: 8px; }
@media (max-width: 639px) { .method-row { grid-template-columns: minmax(0, 1fr); } }
.settings-marks { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.emails { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: var(--gap); align-items: start; }
@media (max-width: 1023px) { .emails { grid-template-columns: minmax(0, 1fr); } }
.email-preview { position: sticky; top: calc(var(--header-h) + var(--s-5)); gap: var(--s-3); }
.email-preview__label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-label); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.email-preview__label .icon { width: 16px; height: 16px; }
.email-preview__subject { font-weight: 600; padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.email-preview__body { display: grid; gap: 2px; font-size: var(--t-small); white-space: pre-wrap; }

/* ---------------------------------------------------------------- log */
.log { display: grid; gap: 0; }
.log__item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.log__item:last-child { border-bottom: 0; }
.log__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface); }
.log__icon .icon { width: 18px; height: 18px; }
.log__text { font-size: var(--t-small); }
.log__meta { font-size: var(--t-label); color: var(--muted); }

/* ---------------------------------------------------------------- "Today" */
.tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1279px) { .tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .tasks { grid-template-columns: minmax(0, 1fr); } }
.task { display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.task__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.task__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--surface); }
.task__icon .icon { width: 18px; height: 18px; }
.task__title { font-size: var(--t-body); font-weight: 600; }
.task__count { min-width: 28px; height: 28px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.task.has-work .task__count { background: var(--accent); color: var(--accent-ink); }
.task__rows { display: grid; gap: 2px; align-content: start; margin: 0 calc(-1 * var(--s-2)); }
.task__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); padding: var(--s-2); border-radius: var(--r-sm); color: inherit; transition: background-color var(--dur) var(--ease); }
.task__row:hover { background: var(--highlight); }
.task__main { display: grid; min-width: 0; font-size: var(--t-small); font-weight: 600; }
.task__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--muted); font-size: var(--t-label); }
.task__sub .material-color { flex-wrap: nowrap; }
.task__aside { font-size: var(--t-label); }
.task__empty { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); }
.task__empty .icon { width: 16px; height: 16px; }
.task__more { font-size: var(--t-label); }
.task__link { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font-size: var(--t-small); font-weight: 600; }
.task__link .icon { width: 16px; height: 16px; }

.figures { margin-top: var(--s-7); }
.figures__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.figures__head .admin-section-title { margin: 0; }
.figures__head .segmented--scroll { margin-bottom: 0; }
.kpi__delta { grid-area: delta; display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-label); color: var(--muted); }
.kpi__delta .icon { width: 14px; height: 14px; }
.kpi__delta.is-down .icon { transform: rotate(90deg); }

/* the revenue chart: one series in the action colour (graphite / yellow in dark), thin bars with
   rounded ends on the baseline, a 2px gap, a recessive grid, value-first tooltip, a table to read it all */
.chart { display: grid; gap: var(--s-4); }
.chart__title { font-size: var(--t-card); font-weight: 600; }
.chart__plot { position: relative; height: 240px; margin-left: 64px; }
.chart__grid { position: absolute; inset: 0 0 24px 0; pointer-events: none; }
.chart__line { position: absolute; left: 0; right: 0; bottom: var(--at); height: 1px; background: var(--line); }
.chart__tick { position: absolute; right: calc(100% + 10px); top: -8px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart__bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--bars), minmax(0, 1fr)); }
.chart__col { position: relative; display: flex; align-items: flex-end; justify-content: center; padding: 0 1px 24px; outline: none; cursor: default; }
.chart__col::before { content: ""; position: absolute; inset: 0 0 24px; border-radius: var(--r-xs); background: transparent; transition: background-color var(--dur-fast) var(--ease); }
.chart__col.is-hover::before { background: var(--highlight); }
.chart__col:focus-visible::before { box-shadow: var(--focus-ring); }
.chart__bar { position: relative; width: min(100%, 28px); height: var(--h); min-height: 0; border-radius: 4px 4px 0 0; background: var(--action); transition: background-color var(--dur-fast) var(--ease); }
.chart__col.is-hover .chart__bar { background: color-mix(in oklab, var(--action) 72%, var(--raised)); }
.chart__x { position: absolute; bottom: 0; left: 50%; translate: -50% 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.chart__tip {
  position: absolute; top: -8px; left: var(--x, 50%); translate: -50% -100%; z-index: 2; display: grid; gap: 2px;
  padding: 8px 12px; border-radius: var(--r-sm); background: var(--raised); box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line);
  font-size: var(--t-label); white-space: nowrap; pointer-events: none;
}
.chart__tip strong { font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.chart__tip span { color: var(--muted); }
@media (max-width: 639px) { .chart__plot { height: 200px; margin-left: 52px; } .chart__x { font-size: 11px; } }

/* ---------------------------------------------------------------- invoice / packing slip */
.invoice-page__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.sheet {
  display: grid; gap: var(--s-6); padding: clamp(24px, 5vw, 56px); border-radius: var(--r-lg);
  background: #ffffff; color: #16161a; box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line);
  font-size: 14px; line-height: 1.5;
}
.sheet__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-6); }
.sheet__brand { display: flex; gap: var(--s-3); align-items: flex-start; }
.sheet__mark { display: block; width: 32px; --logo-ink: #16161a; color: #16161a; }
.sheet__mark .logo-mark { width: 32px; height: auto; }
.sheet__company { display: grid; color: #63646b; font-size: 13px; }
.sheet__company strong { color: #16161a; font-size: 15px; }
.sheet__to { font-style: normal; min-width: 200px; }
.sheet__title { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; outline: none; }
.sheet__meta { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: calc(-1 * var(--s-3)); font-size: 13px; }
.sheet__meta dt { color: #63646b; }
.sheet__table { width: 100%; border-collapse: collapse; }
.sheet__table th { padding: 8px 0; border-bottom: 2px solid #16161a; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.sheet__table td { padding: 10px 0; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.sheet__table .num { text-align: right; padding-left: var(--s-4); font-variant-numeric: tabular-nums; }
.sheet__sub { display: block; color: #63646b; font-size: 13px; }
.sheet__box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #16161a; border-radius: 3px; }
.sheet__totals { display: grid; gap: 6px; justify-self: end; min-width: min(100%, 280px); font-variant-numeric: tabular-nums; }
.sheet__totals > div { display: flex; justify-content: space-between; gap: var(--s-5); }
.sheet__totals dt { color: #63646b; }
.sheet__total { padding-top: 8px; border-top: 2px solid #16161a; font-size: 16px; font-weight: 600; }
.sheet__total dt { color: #16161a; }
.sheet__note { color: #63646b; font-size: 13px; }
.sheet__foot { padding-top: var(--s-4); border-top: 1px solid #e3e3e3; color: #63646b; font-size: 12px; }
.sheet .logo-mark__layer { stroke: var(--accent); }

@media print {
  .site-header, .site-footer, .app-bar, .feedback-fab, .no-print, .skip-link, #overlays, .page-scrollbar, .debug-badge { display: none !important; }
  body { background: #ffffff; }
  .section--page { padding: 0; }
  .wrap, .narrow { width: 100%; max-width: none; margin: 0; }
  .sheet { box-shadow: none; border-radius: 0; padding: 0; }
}
.sheet .logo-mark__path { stroke: #16161a; }

/* ---------------------------------------------------------------- content (start page, questions, search preview) */
.section-list { display: grid; gap: 0; margin-bottom: var(--s-3); }
.section-list__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.section-list__item:last-child { border-bottom: 0; }
.section-list__tools { display: flex; align-items: center; gap: var(--s-2); }
.section-list__tools .toggle { margin-left: var(--s-2); }
/* the move arrows: no disc under the pointer, only their lines turn yellow (accent icons, chrome.css) */
.section-list__tools [data-move]:hover:not(:disabled) { background: none; }
.icon--up { transform: rotate(180deg); }
.faq-list { display: grid; gap: var(--gap); }
.faq-edit { gap: var(--s-3); }
.faq-edit__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.serp__result { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: var(--s-4); align-items: start; }
.serp__result > div:last-child { order: -1; }
.serp__thumb { width: 96px; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.serp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.serp__url { font-size: 12px; color: var(--muted); }
.serp__title { font-size: 18px; line-height: 1.3; color: var(--info); }
:root[data-theme="dark"] .serp__title { color: #9cc3ff; }
.serp__text { font-size: var(--t-small); color: var(--muted); }

/* ---------------------------------------------------------------- media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.media-card { gap: var(--s-3); }
.media-card__focus { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--surface); cursor: crosshair; }
.media-card__focus img { width: 100%; height: 100%; object-fit: contain; }
.media-card__marker { position: absolute; left: var(--x); top: var(--y); width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #ffffff; background: rgb(246 224 22 / .85); box-shadow: 0 0 0 1px rgb(0 0 0 / .45), 0 2px 6px rgb(0 0 0 / .35); pointer-events: none; }
.media-card__crops { display: flex; gap: var(--s-2); }
.media-card__crop { display: block; height: 64px; border-radius: var(--r-xs); overflow: hidden; background: var(--surface); }
.media-card__crop--square { width: 64px; }
.media-card__crop--wide { width: 128px; }
.media-card__crop img { width: 100%; height: 100%; object-fit: cover; }
.media-card__focus-value { font-size: var(--t-label); font-variant-numeric: tabular-nums; align-self: center; }
.field-row--tight { display: flex; justify-content: space-between; gap: var(--s-3); }
.media-card__meta { display: flex; gap: var(--s-2); font-size: var(--t-label); color: var(--muted); }
.media-card__meta .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.media-upload { margin-top: var(--gap); }

/* ---------------------------------------------------------------- system */
.admin-detail--even { grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); }
.checks { display: grid; gap: 0; }
.checks__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.checks__item:last-child { border-bottom: 0; }
.checks__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--surface); }
.checks__icon .icon { width: 18px; height: 18px; }
.checks__item.is-ok .checks__icon { color: var(--success); background: var(--success-soft); }
.checks__item.is-warn .checks__icon { color: var(--warn); background: var(--warn-soft); }
.btn-stack { display: grid; gap: var(--s-2); }
@media (max-width: 1179px) { .admin-detail--even { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- people: sign-in, invitations */
.badge-row { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.text-danger { color: var(--danger); }
.plain-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.invites { margin-bottom: var(--gap); }
.invite-list { display: grid; margin: 0; padding: 0; list-style: none; }
.invite-list__item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.invite-list__item:first-child { border-top: 0; padding-top: 0; }
.invite-list__text { display: grid; flex: 1; min-width: 0; }
.avatar--ghost { background: var(--highlight); color: var(--ink); }
.avatar--ghost .icon { width: 16px; height: 16px; }
.invite-count:empty { display: none; }
/* invitation links, shown once after inviting */
.invite-links li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.mail-view__note .icon { width: 14px; height: 14px; margin-right: var(--s-1); vertical-align: -2px; }

/* ---------------------------------------------------------------- outbox log */
.table--rows tr.is-clickable { cursor: pointer; }
.table--rows tr.is-clickable:is(:hover, :focus-visible) td { background: color-mix(in oklab, var(--ink) 4%, transparent); }
.mail-view { display: grid; gap: var(--s-4); }
.mail-view__paper { display: grid; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mail-view__subject { font-weight: 600; font-size: var(--t-lead); }
.mail-view__text { margin: 0; font: inherit; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-view__note { font-size: var(--t-small); }

/* ---------------------------------------------------------------- newsletter */
.tabs__tab[aria-current="page"] { color: var(--ink); }
.tabs__tab[aria-current="page"]::after { transform: scaleX(1); }
.newsletter-hint { margin: 0 0 var(--s-3); font-size: var(--t-small); }
.campaigns { display: grid; gap: var(--gap); }
.campaign .card__head { gap: var(--s-3); }
.campaign__text { margin: 0; font: inherit; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow: hidden; }
.campaign__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--t-small); }
