/*
  Quiet surfaces – the account and the team area (everything inside .side-layout).

  Why: the pages where people manage things were built from the stock parts of generated UI – a filled
  grey card around every section, icons in tinted squares, a pill on every status, grey filled buttons,
  filter tabs in a grey capsule, tables in a filled frame. Each part is harmless; together they bury the
  content under boxes. Here the content carries the structure instead:
    - a section is its title and a hairline above it – no fill, no shadow, no radius, and never a box in a box
    - lists and tables are rows on hairlines; the row under the pointer lights up, nothing else does
    - a status is a coloured dot and a word; a count is a plain number beside its title
    - icons stand bare beside their text, without a tile
    - second buttons are outlined, filter tabs are words with a line under the chosen one
    - an aside (a note, an offer, a reply) is set off by a line on its left, not a grey box
  Only the brand's own moments keep a surface (the yellow greeting card, primary buttons). The shop's
  pages keep their components – they are not touched here. Loaded after admin.css; the phone's area
  stylesheets (ui/mobile/account.css, team.css) build on this.
*/

/* ---------------------------------------------------------------- sections instead of cards */
.side-layout :is(.card, .task, .printer, .spool):not(.card--accent) {
  padding: var(--s-5) 0 0; border-radius: 0; background: none; box-shadow: none;
  border-top: 1px solid var(--line);
}
/* the "delete account" section says what it is with a red line, not a red frame */
.side-layout .card--danger { border-top-color: color-mix(in oklab, var(--danger) 60%, transparent); }
/* ---------------------------------------------------------------- tables */
/* Text, lines and the row under the pointer all start and end on the content's edge, like the headings
   above them – the highlight is exactly as wide as the lines it lies between. */
.side-layout .table-wrap { border-radius: 0; background: none; box-shadow: none; }
.side-layout .card > .table { margin-inline: 0; width: 100%; }
.side-layout .table th { border-bottom-color: var(--line-strong); }
.side-layout .table :is(th, td):first-child { padding-left: 0; }
.side-layout .table :is(th, td):last-child { padding-right: 0; }
.side-layout .table tbody tr:hover { background: color-mix(in oklab, var(--ink) 3%, transparent); }
.side-layout .table--rows tbody tr:is([data-row-link], .is-clickable):hover { background: var(--highlight); }
.side-layout .table--rows tbody tr.is-clickable:is(:hover, :focus-visible) td { background: none; }

/* ---------------------------------------------------------------- status: a dot and a word */
.side-layout .badge {
  height: auto; padding: 0; gap: 7px; border-radius: 0; background: none;
  color: var(--ink); font-weight: 500;
}
.side-layout .badge::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--badge-dot, var(--badge-ink));
}
.side-layout .badge--accent { --badge-dot: var(--accent); font-weight: 600; }
/* by day a yellow dot needs its edge to be seen on the pale ground */
:root:not([data-theme="dark"]) .side-layout .badge--accent::before { box-shadow: 0 0 0 1px var(--accent-stroke); }
.side-layout .badge--strong { --badge-dot: var(--ink); font-weight: 600; }
.side-layout .badge--muted { --badge-dot: var(--line-strong); color: var(--muted); }
.side-layout .badge--danger { color: var(--danger); }
/* the order list's state column: the word starts on the column's edge, like every other word */
.side-layout .order-card__summary .badge { justify-content: flex-start; }

/* ---------------------------------------------------------------- icons without tiles */
.side-layout :is(.task__icon, .printer__icon, .log__icon, .checks__icon, .security-list__icon, .link-card__icon) {
  width: auto; height: auto; border-radius: 0; background: none; color: var(--muted);
}
.side-layout .checks__item:is(.is-ok, .is-warn) .checks__icon { background: none; }
.side-layout .kpi__icon { display: none; }

/* ---------------------------------------------------------------- key figures: the number is the design */
.side-layout .kpi {
  grid-template-areas: "label label" "value value" "delta delta";
  padding: var(--s-4) 0 0; border-radius: 0; background: none; box-shadow: none;
  border-top: 1px solid var(--line);
}
.side-layout :is(.kpi, .kpi--static):hover { box-shadow: none; }
.side-layout a.kpi:hover .kpi__label { color: var(--ink); }

/* ---------------------------------------------------------------- "Today": open columns of work */
.side-layout .task__count {
  min-width: 0; height: auto; padding: 0; gap: 6px; border-radius: 0; background: none;
  display: inline-flex; align-items: center; color: var(--muted); font-weight: 500;
}
/* work waiting: the number in ink with the brand's dot – the same signal as a status */
.side-layout .task.has-work .task__count { background: none; color: var(--ink); font-weight: 600; }
.side-layout .task.has-work .task__count::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
:root:not([data-theme="dark"]) .side-layout .task.has-work .task__count::before { box-shadow: 0 0 0 1px var(--accent-stroke); }

/* ---------------------------------------------------------------- lists of links (to-dos in the account) */
.side-layout .link-cards { gap: 0; }
.side-layout .link-card {
  padding: var(--s-4) 0; border-radius: 0; background: none; box-shadow: none;
  border-top: 1px solid var(--line);
}
.side-layout .link-cards > li:last-child .link-card { border-bottom: 1px solid var(--line); }
.side-layout .link-card:hover { box-shadow: none; }
.side-layout .link-card:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- the account's orders: a list, not a stack of boxes */
.side-layout .stack:has(> .order-card) { gap: 0; }
.side-layout .order-card {
  overflow: visible; border-radius: 0; background: none; box-shadow: none;
  border-top: 1px solid var(--line);
}
.side-layout .stack > .order-card:last-child { border-bottom: 1px solid var(--line); }
.side-layout .order-card__summary { padding-inline: 0; }
.side-layout .order-card__summary:hover { background: none; }
.side-layout .order-card__summary:hover .order-card__number { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.side-layout .order-card__body { padding-inline: 0; }

/* ---------------------------------------------------------------- filter tabs: words with a line */
.side-layout__main .segmented {
  gap: var(--s-5); padding: 0; border-radius: 0; background: none;
  box-shadow: inset 0 -1px 0 var(--line);
}
.side-layout__main .segmented__item { height: 40px; padding: 0 2px; border-radius: 0; }
.side-layout__main .segmented__item:is([aria-pressed="true"], [aria-selected="true"]) { background: none; box-shadow: inset 0 -2px 0 var(--accent); color: var(--ink); }
/* the gliding marker becomes the line under the chosen tab (ui/components/segmented.js moves it) */
.side-layout__main .segmented.has-thumb > .segmented__item:is([aria-pressed="true"], [aria-selected="true"]) { box-shadow: none; }
.side-layout__main .segmented__thumb { top: auto; bottom: 0; height: 2px !important; border-radius: 1px; background: var(--accent); box-shadow: none; }
.side-layout__main .segmented__count { min-width: 0; padding: 0; background: none; color: var(--muted); }

/* ---------------------------------------------------------------- second buttons: outlined */
.side-layout .btn--secondary { --btn-bg: transparent; }
.side-layout .btn--secondary:not(:focus-visible) { box-shadow: inset 0 0 0 1px var(--line-strong); }
.side-layout .btn--secondary:hover { --btn-bg: color-mix(in oklab, var(--ink) 5%, transparent); }

/* ---------------------------------------------------------------- notes and asides: a line on the left */
.side-layout .notice {
  padding: 2px 0 2px var(--s-4); border-radius: 0; background: none;
  box-shadow: inset 2px 0 0 var(--info);
}
.side-layout .notice--success { box-shadow: inset 2px 0 0 var(--success); }
.side-layout .notice--warn { box-shadow: inset 2px 0 0 var(--warn); }
.side-layout .notice--danger { box-shadow: inset 2px 0 0 var(--danger); }
.side-layout :is(.offer, .account-request__question, .quote__suggestion, .review-card__reply) {
  padding: 2px 0 2px var(--s-4); border-radius: 0; background: none;
  box-shadow: inset 2px 0 0 var(--line-strong);
}
/* backup codes stay one block to copy – framed by a hairline, not filled */
.side-layout .backup-codes { background: none; box-shadow: inset 0 0 0 1px var(--line); }
