/* flipper_service — the stylesheet of the HTML site (public pages + both panels).
   One file on purpose: the site is small, and a single stylesheet keeps the
   views free of inline styling (every view is a template, not a design). */

:root {
    --ink: #14161c;
    --ink-soft: #5a6273;
    --line: #dfe3ea;
    --bg: #f4f6fa;
    --panel: #ffffff;
    --brand: #6d28d9;
    --brand-soft: #ede9fe;
    --accent: #f59e0b;
    --ok: #15803d;
    --ok-bg: #dcfce7;
    --warn: #b45309;
    --warn-bg: #fef3c7;
    --bad: #b91c1c;
    --bad-bg: #fee2e2;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(20, 22, 28, .06), 0 8px 24px rgba(20, 22, 28, .06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a { color: var(--brand); }
a:hover { color: #4c1d95; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: #eef1f6; padding: .1em .35em; border-radius: 4px; }

/* ------------------------------------------------------------- masthead */
.masthead { background: var(--ink); color: #e7e9f0; }
.masthead-inner {
    max-width: 1180px; margin: 0 auto; padding: .85rem 1.25rem;
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
/* Line 1 of the panel masthead: brand (with its tag) left, identity right. */
.masthead-inner .who { margin-left: auto; }
/* Line 2 of the panel masthead: the whole navigation on its own row. */
.masthead-nav { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem .6rem; }
.brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; color: #fff; font-size: 1.1rem; }
.brand span { color: var(--accent); }
.mainnav { display: flex; gap: .15rem; flex: 1 1 auto; flex-wrap: wrap; }
/* The menu is grouped, and the grouping prints nothing (T-247, then T-248,
   owner 2026-11-04: "remove the name »Dane i raporty« and »Firmy i
   użytkownicy« and »maszyny« this takes to many space"). A run is one flex
   item, so when the labels wrap, a run moves to the next line **whole** and the
   hairline before it is never left stranded from the screens it separates — that
   is the whole reason `.navgroup` exists, and it is why the grouping survives the
   loss of its captions: the bar still has four blocks, it just no longer names
   them. What it costs is one hairline. */
.navgroup { display: flex; align-items: center; gap: .15rem; }
.navgroup + .navgroup {
    margin-left: .45rem; padding-left: .8rem;
    border-left: 1px solid rgba(255, 255, 255, .12);
}
.mainnav a {
    color: #c8cddd; text-decoration: none; padding: .35rem .6rem; border-radius: 7px; font-size: .93rem;
}
.mainnav a:hover { background: #222633; color: #fff; }
.who { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: #b9bfcd; }
.who-name { color: #fff; font-weight: 600; }
.who-company { background: #222633; padding: .15rem .5rem; border-radius: 999px; }
.who .logout { color: var(--accent); text-decoration: none; }
/* T-244 (M6-05): `Wyloguj` is a POST form now, not a link, and a `button` brings its
   own chrome with it — a background, a border, a font of its own, and Bootstrap's
   reboot adds more. The rule strips all of that so the control is the word it was:
   the same accent colour, the same size as the identity beside it, and nothing
   around it. `display: contents` on the form keeps the flex row of `.who` intact —
   the button joins it as if the form were not there. */
.who .logout-form { display: contents; }
.who .logout {
    background: none; border: 0; padding: 0; margin: 0; font: inherit;
    line-height: inherit; cursor: pointer;
}
.who .logout:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- layout */
.content { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.content-public { max-width: 900px; }
.footer {
    max-width: 1180px; margin: 0 auto; padding: 1.25rem;
    color: var(--ink-soft); font-size: .85rem; border-top: 1px solid var(--line);
}

h1 { font-size: 1.6rem; margin: 0 0 .35rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .4rem; }
.lede { font-size: 1.06rem; color: var(--ink-soft); max-width: 62ch; }
/* The one modifier a page asks when its intro is a whole-company line rather than a
   reading column — it keeps the type of `.lede` and gives up only the measure, so the
   paragraph spans `.content` edge to edge (T-196, the client history page). */
.lede-wide { max-width: none; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }
.section-head h2 { margin: 0; }

/* ----------------------------------------------------------------- cards */
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1.25rem;
}
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.hero { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.5rem; }
.stat {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: .85rem 1rem; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 1.5rem; line-height: 1.2; }
.stat span { color: var(--ink-soft); font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-ok b { color: var(--ok); }
.stat-warn b { color: var(--warn); }

/* ---------------------------------------------------------------- tables */
.table {
    width: 100%; border-collapse: collapse; background: var(--panel);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
/* Bootstrap 6 paints the **cell**, not only the table (T-225, the owner: "after adding the
   bootstrap to the project in the table there is black background"). Its
   `.table > :not(caption) > * > *` gives every `<td>` a `background-color: var(--bs-table-bg)`
   and a `color: var(--bs-table-color)`, and its `.table` sets those two to
   `var(--bs-bg-body)` / `var(--bs-fg-body)` — which are `light-dark(#fff, …gray-975)`. On a
   dark-mode monitor the `light-dark()` resolves to the dark half, and because `app.css` never
   spoke about a `<td>`'s own background (the rule of T-222, "the panel's sheet has the last
   word", only holds where the panel's sheet actually speaks), the data rows came out near-black
   — measured `oklch(0.144 0.0048 245)` on a white page around them, the header still `#eef1f7`.
   Answered in Bootstrap's own language rather than by out-shouting it: the cell keeps painting
   itself, with the panel's own white and the page's own ink. The look is exactly the one from
   before the bundle was added, and it no longer depends on which colour scheme the browser is
   in. Striped / hover rows are untouched — those ride the cell's `box-shadow`, not its
   background — and `.table th` above still wins on the header (equal specificity, later file). */
.table { --bs-table-bg: var(--panel); --bs-table-color: inherit; }
.table th, .table td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #eef1f7; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* The row buttons of every panel table sit at the right edge (owner, 2026-10-30),
   so the Open/Edit/On-Off/Delete group of each row starts at the same place;
   nowrap keeps one row's group on one line (`.table-wrap` scrolls if need be).
   Not `<p class="actions">` — that is the submit pair at the foot of a form. */
.table td.actions { text-align: right; white-space: nowrap; width: 1%; }
/* `width: 1%` is the minimum-width trick for a table cell (it works because
   `nowrap` above already forbids wrapping): the column may not take more of
   the table than its widest group needs, so the freed width goes to the
   data columns. Without it the auto layout can hand the actions column a
   share of the spare width no button asked for. */
/* …and the group is squeezed to the narrowest it can be while staying one line
   (owner, 2026-10-31): the row buttons take the .button default padding and
   font-size, four of them eat a third of the table. Inside an action cell they
   shrink — less padding, a smaller caption, a flatter corner — the buttons of
   the rest of the panel (page heads, forms) keep the comfortable size. The
   markup separates them with a plain space, which shrinks with the font-size,
   so no extra margin is needed. */
.table td.actions .button { padding: .15rem .45rem; font-size: .78rem; border-radius: 6px; }
/* The active/inactive column gets the same minimum as the buttons (owner,
   2026-10-31): "in the table where is column with status of active/nonactive
   elements set also shorter like table buttons", then "maybe better will be
   to use the class in this column instead to use only child". Every status
   cell of every painter therefore carries `class="status"` in its markup —
   the six JS painters and the root PHP tables alike — and one rule narrows
   the column: `width: 1%` is the T-184 trick again (the column may not take
   more of the table than its widest cell needs — the header word ("Aktywna")
   is the floor, the "tak"/"nie" pill far below it) and `nowrap` keeps the
   pill whole. The class is named for what the column *is* — a status —
   rather than `active`, because the same pill shape prints a direction
   ("przyjęte"/"wydane") or a login result ("udana"/"nieudana"), not only
   activity. Cells that mix a badge with text (the company column's `root`
   pill beside a name) deliberately carry no class and keep their width.
   `text-align: center` (owner, 2026-10-31): "now everything what is under the
   td.status should be set in center" — the pill sits in the middle of its
   column, the way a status reads, not glued to an edge. */
.table td.status { width: 1%; white-space: nowrap; text-align: center; }
.table tr:hover td { background: #fafbff; }
.table-wrap { overflow-x: auto; }

/* --------------------------------------------------------------- badges */
.badge {
    display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem;
    background: #eef1f6; color: var(--ink-soft); border: 1px solid var(--line); white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: #fecaca; }
.badge-root { background: var(--brand-soft); color: var(--brand); border-color: #ddd6fe; }

/* --------------------------------------------------------------- flashes */
.flash { padding: .7rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid; }
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.flash-error { background: var(--bad-bg); color: var(--bad); border-color: #fecaca; }
.flash ul { margin: .35rem 0 0 1.1rem; }

/* ---------------------------------------------------------------- forms */
.stacked { display: grid; gap: .85rem; max-width: 460px; }
.stacked label { display: grid; gap: .3rem; font-size: .9rem; }
.stacked label span { color: var(--ink-soft); }
/* The field skin (owner, 2026-10-30). A **checkbox and a radio are not fields**:
   this rule used to name every `input`, so the OS tick box arrived wrapped in
   `.5rem` of padding, a 1px border and an 8px radius — a rounded rectangle drawn
   *around* a 13px control, which is what the owner saw on the machine form
   (2026-11-20: "label with class check, contain a rounded border but it not
   looks good for the checkboxes inside"; the label's own box was Bootstrap 6's
   `.check`, and it is now `.check-row`, see the panel-forms rules below). They are
   excluded here and get their own rule beside it. */
input:not([type="checkbox"]):not([type="radio"]),
select, textarea, button {
    font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
/* The control keeps its own glyph — the panel has no reason to redraw a tick —
   but it takes the panel's size and brand: a box of the row's text, the accent
   colour where the OS would use its own blue, and none of the field skin's
   padding, border, radius or background. */
input[type="checkbox"],
input[type="radio"] {
    width: 1.05rem; height: 1.05rem;
    margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
    accent-color: var(--brand);
}
/* A field the service refused (owner, 2026-11-19: "when there is a form
   /client/places/create but required fields are empty … there is no red border
   on those fields"; the same week, asked whether the *other* forms do it too —
   T-275). The API-painted forms carry `novalidate` and the API is the validator
   (point 7: the door answers, the panel never re-decides), so a refused submit
   comes back as `errors[]` naming its column, and `FlipperApi.markFieldErrors()`
   puts this class on the control the door named — one implementation for all
   seven form painters. A plain form that validates on the server
   (`/client/refills/create`) gets the same class from
   `panel_invalid_attributes()`, which reads the same refusals out of the
   `errors` flash: a refused field looks the same whoever refused it.
   The class is applied after a refusal, never by CSS `:invalid`:
   an empty add-form has its `required` fields empty from the first paint, and
   a `:invalid` rule would print the whole form in red before anyone typed
   anything. The border is the palette's own `--bad` with a light ring of the
   same colour, so the field reads refused at a glance and agrees with the
   `.flash-error` box the panel already uses for a refusal. */
input.is-invalid, select.is-invalid, textarea.is-invalid {
    border-color: var(--bad); outline: 2px solid var(--bad-bg);
}
/* The line the painters write those sentences into (`#place-form-errors`,
   `#machine-form-errors`, …). The markup has carried the class since CD-1 and
   the sheet never defined it — the same markup-without-a-skin T-181 found on
   `.button-danger` — so the sentences sat on the card as bare black paragraphs
   above the fields they described. Now it is the panel's own error flash. */
.form-errors {
    background: var(--bad-bg); color: var(--bad); border: 1px solid #fecaca;
    border-radius: var(--radius); padding: .6rem .8rem; margin: 0 0 1rem;
}
.form-errors p { margin: 0 0 .25rem; }
.form-errors p:last-child { margin-bottom: 0; }
.button {
    display: inline-block; padding: .55rem .95rem; border-radius: 8px; text-decoration: none;
    border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.button-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.button-primary:hover { background: #4c1d95; color: #fff; }
/* The delete buttons of every panel table ("make the delete button red",
   owner, 2026-10-31). The painters of the client lists have always written
   `button button-danger` on the "Usuń" of each row, but the sheet never
   defined `.button-danger` — the class was markup without a skin, so the
   button wore the plain white `.button` default like every other action.
   Now it is red the way `.button-primary` is brand: the palette's own
   `--bad`, solid fill, a darker corner on hover. */
.button-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.button-danger:hover { background: #7f1d1d; color: #fff; }
.button-danger:disabled { background: #fca5a5; border-color: #fca5a5; color: #fff; cursor: not-allowed; }
/* The "back to the list" link of a show screen becomes a button (owner,
   2026-10-31): "for the client/tokens/ endpoint there is a link to back into
   the list it's the <p> element with class small, make it as button but the
   same <p> with <a> and move it on the right". The paragraph stays (it is
   still a line of navigation, not a toolbar) and the `a` inside it wears the
   `.button` skin; `text-align: right` pushes the single button to the right
   edge, where the row buttons of T-181 taught the eye to look for the way
   out. The class is separate from `.small` because the sheet's other
   `.small` lines — the "Dziennik logowań →" style cross-links — stay plain
   text links, left-aligned, until the owner asks. */
.back-link { text-align: right; }
/* The panel's list pager (T-223, `App\Libraries\PanelPager` + `WebController::pager()`).
   A page number is an action on the screen, so it wears the panel's own `.button`
   skin instead of Bootstrap's `.pagination` (T-222 put the bundle's stylesheet on
   the panels, but nothing on them is dressed in it yet — a pager wearing the
   bundle would be the one Bootstrap-looking control of the whole panel, and
   `app.css` has the last word on the page anyway). `ul` keeps the links in one
   line, `flex-wrap` is the phone's fallback, `justify-content: flex-end` puts
   the row of page buttons at the right edge of the table they page (owner,
   2026-11-04: "pagination move to right" — the same right edge `.back-link`
   pushes its button to), and the two rules below are what the
   view relies on: the current page is not a link, so it is a span with
   `aria-current`, and a link that leads nowhere is a span with `aria-disabled` —
   styled dead and made unclickable so the shape of the row never changes between
   the first page and the last. */
.pager { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0 2rem; }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; margin: 0; padding: 0; }
.pager li { display: flex; }
.pager .button { padding: .3rem .7rem; font-size: .9rem; line-height: 1.3; }
.pager [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager [aria-disabled="true"] { opacity: .45; pointer-events: none; }
.pager-gap { align-self: center; color: var(--ink-soft); padding: 0 .15rem; }
/* The submit pair of every form — "Zapisz" / "Anuluj" (and the action lines of
   the show screens, which are the same `<p class="actions">` shape) — sits at
   the right edge (owner, 2026-10-31): "when we edit and add new element
   'Zapisz' and 'Anuluj' is always on the left, move it to the right". One
   rule for every create/edit screen of both panels; it matches where T-181
   put the table buttons and T-188/T-189 the back buttons — the eye finds the
   way forward and the way out at the same edge. The `.table td.actions` rule
   of T-181 is scoped to the table, so the two never meet. */
.actions { text-align: right; }
/* A list page's title and its "add new" button on one row (owner, 2026-10-30):
   the button used to sit in its own <p> below the heading — its own row. The
   page header is a flex line instead: the title keeps the left, the button is
   pushed to the right edge. `.section-head` (the h2 rows of a page) uses the
   same shape for the same reason. */
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem;
}
.page-head h1 { margin-bottom: 0; }
/* The "?" help button and its popup (owner, 2026-10-31): "near the add button
   for each of the site, add the button with question mark, after click on it
   popup need to apear with description what can we do on this page". The
   button is a round question mark worn in the `.button` skin — recognisable
   as *the* help affordance, not a fourth verb — and it stands beside the
   page's add button inside `.page-head-actions`, the flex line that keeps
   that pair together at the right edge (the add button alone was there
   before; the help button must not split from it). The popup is the partial
   `app/Views/partials/panel-help.php`, opened and closed by
   `public/js/panel-help.js`; this sheet only skins it. */
.page-head-actions { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.button-help {
    width: 2.3rem; padding: .55rem 0; border-radius: 999px; text-align: center;
    font-weight: 700; color: var(--brand); border-color: var(--brand); background: #fff;
}
.button-help:hover { background: var(--brand-soft); color: #4c1d95; }
/* The dashboard's quick-action line became a div when the help button joined
   it (an overlay may not live inside a <p>), so it now carries its own flex
   line — the same comfortable gap the row had as spaced inline-blocks. */
.quick-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.help-overlay {
    position: fixed; inset: 0; z-index: 50; padding: 1.25rem;
    background: rgba(20, 22, 28, .55);
    display: flex; align-items: center; justify-content: center;
}
/* `hidden` is the one state the JS flips; the `display: flex` above would
   override the attribute's UA default, so the sheet must honour it itself. */
.help-overlay[hidden] { display: none; }
.help-box {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); width: 100%; max-width: 620px; max-height: 85vh;
    overflow: auto; padding: 1.1rem 1.3rem 1.2rem;
}
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.help-head h2 { margin: 0; font-size: 1.1rem; }
.help-close {
    border: 0; background: none; padding: 0 .25rem; cursor: pointer;
    font-size: 1.5rem; line-height: 1; color: var(--ink-soft);
}
.help-close:hover { color: var(--ink); }
.help-intro { margin: .6rem 0 0; color: var(--ink-soft); }
.help-topics { margin: .7rem 0 0; padding-left: 1.15rem; }
.help-topics li { margin-bottom: .45rem; }
.help-topics li:last-child { margin-bottom: 0; }
.help-foot { text-align: right; margin: 1rem 0 0; }
.inline-form { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; }
.filters { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }

/* One element per row (owner, 2026-10-30): a field of a panel form is never
   one after another on a line — the caption sits above its control, the pair
   takes the whole row. `.check-row` keeps its checkbox and its label-text on one
   line (they are one question), and `.filters` / `.inline-form` stay
   horizontal on purpose: those are toolbars, not the form of a record.
   The name is ours, not Bootstrap's `.check`, on purpose (owner, 2026-11-20:
   "label with class check, contain a rounded border but it not looks good for
   the checkboxes inside"): in the Bootstrap 6 alpha the panel links (T-222)
   `.check` is the **input's** class — `appearance: none`, `width`/`height`
   `1.25rem`, `border: 1px solid`, `border-radius: 33%` and a `.check::before`
   tick — so `<label class="check">` drew the whole row as a small rounded box
   around the denomination's name. A row is a row; the box inside it is the
   checkbox, and it keeps its own glyph — the field skin is lifted off it by the
   rule of the forms section above, which is the other box this sentence named. */
form.card label:not(.check-row) {
    display: grid; gap: .3rem; margin-bottom: .85rem; font-size: .9rem;
}
form.card label.check-row { display: flex; align-items: baseline; gap: .4rem; }
/* The face value client-machines.js paints after a denomination's name is **one
   unit with its number** (owner, 2026-11-20: "(0 PLN) … is too small, it split
   into 2 lines"). A `.check-row` label is a flex row, so its price span was a
   shrinkable flex item: the row broke at the space between number and currency
   word — and at the `.small` size it read smaller than the name beside it. A
   hint by its `.muted` colour alone: the row's own size, never shrunk, never
   wrapped (the pair belongs together, like `.table td.actions` above). */
form.card label.check-row > .money { flex: none; white-space: nowrap; }
/* The acceptor editor client-machines.js paints inside the machine's table
   (CD-3b) is not a <form>, but it is a form: same rule for its fields. */
.editor label { display: grid; gap: .3rem; margin-bottom: .5rem; font-size: .9rem; }
/* One element per row still holds *within* a row-group, but the fields that
   answer one question share a line (owner, 2026-10-31): in the acceptor editor
   "Przyjmuje"|"Wydaje", "Min"|"Max"|"Stan" and "Przelicznik"|"Pin" each sit on
   one line. `.editor-row` is that line: a horizontal band of fields whose
   captions stay above their controls.
   The panel's own forms use the same band as `.form-row` (owner, 2026-10-31,
   T-214): on the add-machine form "Lokalizacja"|"Typ" is one question (where
   this machine stands) and "Przyjmuje monety (in)"|"Wydaje monety (out)" is one
   question (what it does with coins), so each pair takes one line while every
   caption stays above its own control. */
.editor-row,
.form-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.editor-row label,
.form-row label { flex: 1 1 0; min-width: 6rem; }
/* The machine form's denomination list is **two columns of one list** (owner,
   2026-11-20, T-277: "split the row to left as input with the checkboxes and on the
   right as output, the same list of checkboxes"): left the coins the machine takes,
   right the coins it gives back — one row of `company_machine_tokens` carries both
   flags, so it is one list painted twice rather than two lists of two things. The
   band is the panel's own `.form-row` (the two columns answer one question: which
   coins this machine touches), each column grows evenly and keeps its caption above
   its own boxes. */
.token-sets .token-set { flex: 1 1 12rem; min-width: 12rem; }
.token-sets h3 { margin: 0 0 .35rem; font-size: .9rem; }

/* ------------------------------------------------------- key/value blocks */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.kv dt { color: var(--ink-soft); font-size: .86rem; }
.kv dd { margin: 0; }
pre.raw {
    background: #0f1117; color: #d7deec; padding: .75rem .9rem; border-radius: 8px;
    overflow-x: auto; font-size: .8rem; margin: .35rem 0 0;
}

/* ------------------------------------------------------------------ map */
.map { width: 100%; height: 380px; border: 1px solid var(--line); border-radius: var(--radius); background: #e9edf4; }
.map-fallback { margin-top: .5rem; }
.map-frame { width: 100%; height: 380px; border: 1px solid var(--line); border-radius: var(--radius); }
.login-box { max-width: 460px; margin: 2rem auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }

ul.clean { list-style: none; margin: 0; padding: 0; }
ul.clean li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }
ul.clean li:last-child { border-bottom: 0; }

/* ------------------------------------------------------------ layouts */
/* One layout per user type, three identities:
   - public.php (official site, no login): the plain masthead + a CTA, a site footer;
   - client.php (client panel, login): ink masthead with a violet rule;
   - root.php   (root panel, login): a darker masthead with an amber rule,
     so the person who manages every tenant never sits in the wrong shell. */
.masthead-public { border-bottom: 3px solid var(--brand); }
.masthead-client { border-bottom: 3px solid var(--brand); }
.masthead-root { background: #1c1030; border-bottom: 3px solid var(--accent); }
.masthead-root .mainnav a:hover { background: #32204d; }

/* Where am I? (T-245, owner 2026-11-04: "for the root company in the panel,
   menu is not selected in another color or something similar to know where we
   are"). The menu view marks the current page with `aria-current="page"`; the
   rule that used to answer it was a 12%-white wash plus a 2px inset line — on
   the owner's near-black purple masthead that reads as a hover, not as a
   verdict, and the eye had nothing to anchor on. The current item is now
   **filled with its panel's own identity colour**: violet on the tenant's ink
   bar, the owner's amber on the root's purple bar (the same pair the badge of
   `.panel-tag-client` / `.panel-tag-root` prints, so the menu and the badge
   agree about who is speaking). A fill is the point: it survives grey-scale,
   a projector, and a monitor the way `text-decoration` alone does not, so the
   weight plus the fill carry the cue and the inset bar stays a detail.
   Both rules sit **after** every `:hover` above so the equal-specificity ties
   go to the current page: hovering the page you stand on keeps the fill
   instead of falling back to the hover wash. */
.mainnav a[aria-current="page"] {
    background: var(--brand); color: #fff; font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--accent);
}
.mainnav a[aria-current="page"]:hover { background: #5b21b6; color: #fff; }
.masthead-root .mainnav a[aria-current="page"] {
    background: var(--accent); color: #1c1030;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .55);
}
.masthead-root .mainnav a[aria-current="page"]:hover { background: #fbbf24; color: #1c1030; }

/* The run you are standing in (T-247) — marked **without a word** since T-248.
   The hairline before it takes the amber this product already uses to say
   "here" (the inset bar under the current item, the rule under the masthead,
   the owner's badge), and the run's other labels come up to full white, so the
   block reads as the row of the map the person is on: one pixel of width
   instead of a caption. Two halves of these selectors are load-bearing. The
   `.navgroup +` of the divider rule, because the sibling rule above paints
   `border-left` with a shorthand and a lone `.navgroup-current` would lose that
   tie and stay grey; and the `:not(…)` of the label rules, because this block
   sits below the fills and would otherwise answer the current item's text
   colour and take the ink-on-amber of the owner's bar away. One marker for both
   bars: the same amber on the ink and on the purple. */
.navgroup + .navgroup.navgroup-current { border-left-color: var(--accent); }
.navgroup-current a:not([aria-current="page"]) { color: #e7e9f0; }
.masthead-root .navgroup-current a:not([aria-current="page"]) { color: #efe9fb; }

.panel-tag {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    padding: .2rem .55rem; border-radius: 999px; white-space: nowrap;
}
.panel-tag-client { background: var(--brand-soft); color: var(--brand); }
.panel-tag-root { background: var(--accent); color: #1c1030; }

.who-link { color: #c8cddd; text-decoration: none; }
.who-link:hover { color: #fff; }

/* --------------------------------------------------------- official site */
.footer-public { max-width: 1180px; }
.footer-cols { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1rem; }
.footer-cols .clean li { border-bottom-color: #d3d9e2; }
.brand-dot { color: var(--brand); }
ol.steps { margin: .5rem 0 1rem; padding-left: 1.3rem; }
ol.steps li { padding: .3rem 0; }

