/* Liste — styles (mobile d'abord) */
:root {
  --bg: #1D2226; --surface: #262C31; --surface2: #2F363C; --line: #3B444B; --line2: #4A545C;
  --text: #ECEEEF; --muted: #9BA5AD; --brass: #D9A931; --brass-2: #F0C24A; --on-brass: #1D2226;
  --brass-ink: #D9A931; --rouge: #E0533F; --vert: #3DAF7E; --cipac: #5596E6; --desco: #9B6BD6; --facqweb: #2FA3A3; --danger: #EE7A60; --ok: #3DAF7E;
  --r: 10px; --r-s: 7px;
  --f-ui: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-head: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #ECEEEC; --surface: #FFFFFF; --surface2: #F4F5F3; --line: #D6DBDE; --line2: #C3C9CD;
  --text: #1D2226; --muted: #5B666E; --brass: #D9A931; --brass-2: #C99A1F; --on-brass: #1D2226;
  --brass-ink: #8A6400; --rouge: #C93B28; --vert: #1F8A5B; --cipac: #2A6CC4; --desco: #7445B5; --facqweb: #1A7F7F; --danger: #C2412A; --ok: #1F8A5B;
  color-scheme: light;
} }
:root[data-theme="light"] {
  --bg: #ECEEEC; --surface: #FFFFFF; --surface2: #F4F5F3; --line: #D6DBDE; --line2: #C3C9CD;
  --text: #1D2226; --muted: #5B666E; --brass: #D9A931; --brass-2: #C99A1F; --on-brass: #1D2226;
  --brass-ink: #8A6400; --rouge: #C93B28; --vert: #1F8A5B; --cipac: #2A6CC4; --desco: #7445B5; --facqweb: #1A7F7F; --danger: #C2412A; --ok: #1F8A5B;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.45 var(--f-ui); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body.has-sheet { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pad { padding: 12px 16px; }
.pad-x { padding: 0 16px; }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 6px; padding: 8px 10px 6px; background: var(--bg); }
.topbar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 6px; }
.topbar h1 { margin: 0; font: 700 1.45rem/1.1 var(--f-head); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chantier-pill { align-self: flex-start; margin-top: 2px; max-width: 100%; font-size: .82rem; color: var(--brass-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.chantier-pill.muted { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: var(--r-s); color: var(--text); }
.icon-btn:active { background: var(--surface2); }
.mode-pill { font: 600 .78rem var(--f-ui); padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); }
.mode-pill.exact { border-color: var(--brass); color: var(--brass-ink); }

.searchbar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 62px); z-index: 19; display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; padding: 0 6px 0 12px; height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.searchbar:focus-within { border-color: var(--brass); }
.searchbar svg { color: var(--muted); }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 1.02rem; }
.searchbar input::-webkit-search-cancel-button { display: none; }
body[data-tab="liste"] .searchbar, body[data-tab="historique"] .searchbar, body[data-tab="reglages"] .searchbar { display: none; }

main { padding: 4px 0 calc(var(--tab-h) + var(--safe-b) + 24px); min-height: 60vh; outline: none; }

/* ---------- Barre d'onglets ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--line); }
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 500; }
.tabbar a.active { color: var(--brass-ink); }
.tabbar a.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brass); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brass); color: var(--on-brass); font: 700 .72rem/19px var(--f-ui); text-align: center; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 18px; border-radius: var(--r); background: var(--surface2); border: 1px solid var(--line2); font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn svg { width: 19px; height: 19px; }
.btn.primary { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }
.btn.primary:active { background: var(--brass-2); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: .9rem; }
.danger-text { color: var(--danger) !important; }
.link { color: var(--brass-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.link svg { width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); font-size: .88rem; font-weight: 500; white-space: nowrap; }
.chip b { font-weight: 600; color: var(--text); }
.chip.on { border-color: var(--brass); color: var(--text); background: color-mix(in srgb, var(--brass) 16%, transparent); }

/* ---------- Champs ---------- */
.field { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r-s); border: 1px solid var(--line2); background: var(--surface); outline: none; font-size: 1rem; }
textarea.field { resize: vertical; line-height: 1.4; }
.field:focus { border-color: var(--brass); }
.field-label { display: flex; flex-direction: column; gap: 5px; font-size: .86rem; color: var(--muted); font-weight: 500; }
.field-label .field { color: var(--text); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form { display: flex; flex-direction: column; gap: 14px; padding: 8px 16px 20px; }
.form h3, .form h2 { margin: 8px 0 0; font: 600 1.1rem var(--f-head); }
.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 500; }
.switch input { width: 22px; height: 22px; accent-color: var(--brass); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 8px 16px; }
.seg-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line2); text-align: left; }
.seg-btn small { color: var(--muted); font-size: .8rem; }
.seg-btn.on { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 14%, transparent); }

/* ---------- Accueil et navigation ---------- */
.notice { display: flex; align-items: center; gap: 10px; margin: 6px 12px 10px; padding: 12px 14px; border-radius: var(--r); background: color-mix(in srgb, var(--brass) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); text-decoration: none; font-size: .92rem; }
.notice svg { margin-left: auto; color: var(--brass-ink); }
.sources { display: grid; gap: 10px; padding: 6px 12px 4px; }
.source-card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 16px 16px 15px 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; overflow: hidden; }
.source-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--c, var(--brass)); }
.source-card.src-plr { --c: var(--rouge); }
.source-card.src-plv { --c: var(--vert); }
.source-card.src-cip { --c: var(--cipac); }
.source-card.src-dsc { --c: var(--desco); }
.source-card.src-fqw { --c: var(--facqweb); }
.source-name { font: 700 1.28rem/1.15 var(--f-head); }
.source-meta { color: var(--muted); font-size: .88rem; }
.block { padding: 14px 0 4px; }
.block h2, .brand-name, .hist-month h2 { margin: 0 16px 8px; font: 600 1.05rem var(--f-head); color: var(--muted); letter-spacing: .02em; }
.hint p { margin: 0 16px 10px; color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 2px 16px 8px; font-size: .84rem; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs span { color: var(--text); font-weight: 500; }
.crumbs i { font-style: normal; opacity: .5; }
.tiles, .settings-list { display: flex; flex-direction: column; padding: 0 12px; gap: 1px; }
.tile { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 13px 12px; background: var(--surface); text-decoration: none; }
.tile:first-child { border-radius: var(--r) var(--r) 0 0; }
.tile:last-child { border-radius: 0 0 var(--r) var(--r); }
.tile:only-child { border-radius: var(--r); }
.tile-name { font-weight: 600; font-size: 1.02rem; }
.tile-meta { grid-row: 2; color: var(--muted); font-size: .84rem; }
.tile svg { grid-row: 1 / span 2; grid-column: 2; color: var(--muted); width: 18px; height: 18px; }
.local-search { padding: 0 12px 10px; }
.local-search input { width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-s); border: 1px dashed var(--line2); background: transparent; outline: none; }
.local-search input:focus { border-style: solid; border-color: var(--brass); }

/* ---------- Lignes d'articles ---------- */
.rows { display: flex; flex-direction: column; }
.vrow { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "thumb body side" "thumb body acts"; column-gap: 10px; padding: 10px 8px 10px 12px; border-bottom: 1px solid var(--line); }
.vthumb { grid-area: thumb; align-self: start; }
.vrow.in-list { background: color-mix(in srgb, var(--brass) 7%, transparent); }
.vbody { grid-area: body; display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; }
.vtitle { font-weight: 600; font-size: .98rem; line-height: 1.3; }
.vmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); font-size: .84rem; }
.vvar { color: var(--text); font-weight: 600; }
.valias { align-self: flex-start; font-size: .78rem; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--brass) 18%, transparent); color: var(--brass-ink); font-weight: 600; }
.vside { grid-area: side; display: flex; flex-direction: column; align-items: flex-end; }
.vprice { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vcode, .ref { font-variant-numeric: tabular-nums; letter-spacing: .04em; font-weight: 600; color: var(--muted); font-size: .84rem; }
.vacts { grid-area: acts; display: flex; justify-content: flex-end; gap: 2px; margin-right: -4px; }
.icon-btn.fav svg { width: 20px; height: 20px; }
.icon-btn.fav.on { color: var(--brass-ink); }
.icon-btn.fav.on svg { fill: var(--brass); }
.icon-btn.add { background: var(--surface2); border: 1px solid var(--line2); }
.qty-dot { font-weight: 700; color: var(--brass-ink); font-variant-numeric: tabular-nums; }
.src-tag { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 4px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--muted); }
.src-tag.src-plr { background: var(--rouge); }
.src-tag.src-plv { background: var(--vert); }
.src-tag.src-cip { background: var(--cipac); }
.src-tag.src-dsc { background: var(--desco); }
.src-tag.src-fqw { background: var(--facqweb); }
.stock { font-size: .76rem; color: var(--muted); }

/* sous-catégorie */
.brand-jump { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.brand-jump a { flex: none; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line2); font-size: .82rem; text-decoration: none; color: var(--muted); }
.brand { padding-top: 10px; scroll-margin-top: 130px; }
.brand-name { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 118px); z-index: 5; margin: 0; padding: 8px 16px; background: var(--bg); color: var(--brass-ink); font-size: 1.15rem; }
.family { margin: 12px 16px 4px; font: 600 1rem var(--f-head); }
.article { margin: 0 12px 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.article.solo { margin-top: 4px; padding-top: 12px; }
.article.solo h2 { margin: 0 14px 2px; font: 600 1.2rem var(--f-head); }
.article.solo > p { margin: 0 14px 8px; }
.fam-desc { color: var(--muted); font-size: .9rem; }
.art-desc { margin: 0; padding: 10px 14px 6px; font-size: .92rem; line-height: 1.35; }
.crow { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 2px 4px; padding: 4px 6px 4px 14px; border-top: 1px solid var(--line); min-height: 52px; }
.crow.in-list { background: color-mix(in srgb, var(--brass) 8%, transparent); }
.cbody { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-width: 0; gap: 1px; padding: 4px 0; }
.cvar { font-weight: 600; font-size: .95rem; }
.crow .vprice { padding: 0 4px; font-size: .95rem; }

/* résultats */
.result-head { padding: 0 0 4px; }
.result-count { margin: 4px 16px 8px; color: var(--muted); font-size: .84rem; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 8px; scrollbar-width: none; }
.more-wrap { display: flex; justify-content: center; padding: 16px; }
.empty { padding: 40px 24px; text-align: center; }
.empty h2 { margin: 0 0 8px; font: 600 1.3rem var(--f-head); }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 18px; }
.empty.small { padding: 24px 16px; }
.loading { display: grid; place-items: center; gap: 12px; padding: 70px 20px; color: var(--muted); }
.ring { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--brass); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* favoris */
.fav-tree { padding: 0 12px; }
.fav-node { border-left: 2px solid var(--line); margin: 4px 0 4px 2px; }
.fav-node > summary { list-style: none; cursor: pointer; padding: 8px 10px; font-weight: 600; }
.fav-node > summary::-webkit-details-marker { display: none; }
.fav-node > summary::before { content: '▸'; display: inline-block; width: 16px; color: var(--muted); transition: transform .15s; }
.fav-node[open] > summary::before { transform: rotate(90deg); }
.fav-node.d0 { border-color: var(--brass); }
.fav-node.d0 > summary { font: 700 1.15rem var(--f-head); }
.fav-node .fav-node { margin-left: 12px; }
.fav-leaf { margin: 2px 0 8px 14px; border-radius: var(--r); background: var(--surface); overflow: hidden; }
.fav-leaf h4 { margin: 0; padding: 8px 14px; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); }

/* ---------- Liste ---------- */
.ch-card { display: flex; align-items: center; gap: 10px; margin: 4px 12px 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.ch-card > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-card b { font: 700 1.15rem var(--f-head); }
.list-rows { display: flex; flex-direction: column; margin: 0 12px; border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.lrow { display: grid; grid-template-columns: 48px 1fr auto; gap: 6px 10px; padding: 12px 12px 8px 12px; border-bottom: 1px solid var(--line); }
.lr-thumb { align-self: start; }
.lr-thumb .thumb { width: 48px; height: 48px; }
.lrow:last-child { border-bottom: 0; }
.lr-body { display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; }
.lr-note { font-size: .84rem; font-style: italic; color: var(--brass-ink); }
.lr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lr-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.lr-tools { grid-column: 2 / -1; display: flex; gap: 18px; }
.lr-tools .link { color: var(--muted); text-decoration: none; font-size: .84rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: var(--r-s); overflow: hidden; background: var(--surface2); }
.stepper .step { display: grid; place-items: center; width: 38px; height: 38px; color: var(--text); }
.stepper .step:active { background: var(--line); }
.stepper input { width: 46px; height: 38px; border: 0; border-left: 1px solid var(--line2); border-right: 1px solid var(--line2); background: var(--surface); text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; outline: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.big .step { width: 52px; height: 52px; }
.stepper.big input { width: 64px; height: 52px; font-size: 1.25rem; }
.list-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 4px; }
.pad-x.field-label { margin-top: 14px; }
.list-footer { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 10; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.lf-total { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.lf-total span, .lf-total small { color: var(--muted); font-size: .8rem; }
.lf-total b { font: 700 1.4rem var(--f-head); font-variant-numeric: tabular-nums; }

/* ---------- Feuilles ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 12, .55); opacity: 0; transition: opacity .2s; }
.sheet { position: relative; width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px calc(18px + var(--safe-b)); border-radius: 16px 16px 0 0; background: var(--surface); transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-handle { width: 40px; height: 4px; margin: 4px auto 10px; border-radius: 4px; background: var(--line2); }
.sheet-wrap.center { align-items: center; padding: 16px; }
.sheet-wrap.center .sheet { border-radius: 14px; max-width: 460px; transform: scale(.96); opacity: 0; transition: transform .18s, opacity .18s; padding-bottom: 18px; }
.sheet-wrap.center.open .sheet { transform: none; opacity: 1; }
.sheet-wrap.full .sheet { max-width: none; height: 100%; max-height: none; border-radius: 0; padding: 0; display: flex; flex-direction: column; background: var(--bg); }
.dialog h2 { margin: 6px 0 8px; font: 700 1.3rem var(--f-head); }
.dialog p { margin: 0 0 14px; color: var(--muted); }
.dialog .field { margin-bottom: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dialog-actions.sticky { position: sticky; bottom: calc(-18px - var(--safe-b)); padding: 12px 0 calc(6px + var(--safe-b)); background: var(--surface); margin-bottom: calc(-18px - var(--safe-b)); }
.dialog-actions .btn { flex: 1 1 auto; }
.warn { padding: 10px 12px; border-radius: var(--r-s); background: color-mix(in srgb, var(--brass) 14%, transparent); border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent); font-size: .9rem; }

/* ajout */
.as-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.as-path { margin: 0; color: var(--muted); font-size: .82rem; }
.as-name { margin: 2px 0 10px; font: 700 1.3rem/1.2 var(--f-head); }
.as-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.as-facts > div { padding: 10px 12px; border-radius: var(--r-s); background: var(--surface2); }
.as-facts .wide { grid-column: 1 / -1; }
.as-facts dt { font-size: .76rem; color: var(--muted); }
.as-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 1.05rem; }
.as-facts dd.ref { font-size: 1.3rem; letter-spacing: .06em; color: var(--brass-ink); }
.as-facts dd small { font-weight: 400; color: var(--muted); font-size: .78rem; }
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty-label { font-weight: 600; }
.qty-total { margin-left: auto; font: 700 1.3rem var(--f-head); font-variant-numeric: tabular-nums; }
.quick-qty { display: flex; gap: 6px; margin: 10px 0 14px; }
.alias-box { padding: 12px; border-radius: var(--r); border: 1px dashed var(--line2); margin-bottom: 14px; }
.alias-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.alias-head span { font-weight: 600; }
.alias-head small { color: var(--muted); }
.alias-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.alias-list:empty { display: none; }
.alias-chip { display: inline-flex; align-items: center; border-radius: 99px; background: color-mix(in srgb, var(--brass) 18%, transparent); color: var(--brass-ink); font-weight: 600; font-size: .88rem; }
.alias-chip > button:first-child { padding: 6px 4px 6px 12px; }
.alias-chip .x { display: grid; place-items: center; width: 30px; height: 30px; }
.alias-chip .x svg { width: 15px; height: 15px; }
.inline-form { display: flex; gap: 8px; }
.as-list { margin: 14px 0; font-size: .9rem; color: var(--muted); }
.as-list b { color: var(--text); }
.as-actions { position: sticky; bottom: calc(-18px - var(--safe-b)); display: flex; gap: 8px; margin: 0 -16px calc(-18px - var(--safe-b)); padding: 12px 16px calc(14px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.as-actions .btn { flex: 1; }
.as-link { margin: 12px 0 0; font-size: .86rem; }
.as-link a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.as-link svg { width: 16px; height: 16px; }
.field-label + .as-list { margin-top: 12px; }

/* sélecteur de chantier */
.picker h2 { margin: 6px 0 4px; font: 700 1.3rem var(--f-head); }
.picker > p { margin: 0 0 12px; }
.picker-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.pick { display: flex; flex-direction: column; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line2); text-align: left; }
.pick small { color: var(--muted); }
.pick.on { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 12%, transparent); }
.new-chantier { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.new-chantier h3 { margin: 0; font: 600 1.05rem var(--f-head); }

/* confirmation PDF */
.confirm-pdf h2 { margin: 6px 0 2px; font: 700 1.35rem var(--f-head); }
.confirm-pdf > p { margin: 0 0 10px; }
.cp-info { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 0 0 12px; }
.cp-info dt { font-size: .76rem; color: var(--muted); }
.cp-info dd { margin: 0; font-weight: 600; }
.cp-table { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; margin: 12px 0 4px; font-size: .88rem; }
.cp-row { display: grid; grid-template-columns: 62px 1fr 38px 78px; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cp-row span:nth-child(3), .cp-row span:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.cp-row em { display: block; color: var(--brass-ink); font-size: .8rem; }
.cp-row.head { background: var(--surface2); font-weight: 600; color: var(--muted); font-size: .78rem; }
.cp-row.foot { border-bottom: 0; background: var(--surface2); font-weight: 700; }

/* traitement */
.processing { text-align: center; padding: 10px 4px 2px; }
.proc-ring { position: relative; width: 120px; height: 120px; margin: 6px auto 10px; }
.proc-ring svg { width: 120px; height: 120px; transform: rotate(-90deg); animation: none; }
.proc-ring circle { fill: none; stroke-width: 7; }
.proc-ring .track { stroke: var(--line); }
.proc-ring .bar { stroke: var(--brass); stroke-linecap: round; transition: stroke-dashoffset .25s ease; }
.proc-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.5rem var(--f-head); font-variant-numeric: tabular-nums; }
.processing h2 { margin: 0 0 4px; font: 700 1.25rem var(--f-head); }
.proc-step { margin: 0 0 10px; color: var(--brass-ink); font-weight: 500; }
.proc-log { list-style: none; margin: 0 0 6px; padding: 8px 10px; height: 132px; overflow: auto; text-align: left; border-radius: var(--r-s); background: var(--surface2); font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.proc-log li { padding: 2px 0; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc-log li:last-child { color: var(--text); border: 0; }
#bgTask { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line2); box-shadow: 0 6px 22px rgba(0, 0, 0, .35); font-weight: 600; font-size: .9rem; }
#bgTask.clickable { cursor: pointer; border-color: var(--brass); color: var(--brass-ink); }
.mini-ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--brass); animation: spin .9s linear infinite; }
.mini-ring.done { animation: none; border-color: var(--brass); background: var(--brass); }

/* aperçu */
.preview { display: flex; flex-direction: column; height: 100%; }
.pv-head, .ed-head { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pv-head h2 { margin: 0; font: 700 1.05rem/1.2 var(--f-head); }
.pv-head p { margin: 0; }
.pv-pages { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 12px; background: color-mix(in srgb, var(--bg) 80%, #000); }
.pv-pages.inline { background: none; padding: 8px 4px 20px; }
.pv-actions { display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.pv-actions .btn { flex: 1; }
.pdf-page { position: relative; flex: none; background: #fff; color: #1D2226; box-shadow: 0 2px 14px rgba(0, 0, 0, .35); overflow: hidden; font-family: Helvetica, Arial, sans-serif; }
.op { position: absolute; white-space: pre; }
.op-text { overflow: visible; }

/* éditeur */
.editor { display: flex; flex-direction: column; height: 100%; }
.ed-head .ed-hist { display: flex; margin-right: auto; }
.ed-hint { margin: 0; padding: 8px 14px; font-size: .8rem; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); }
.ed-canvas { flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 8px 30px; background: color-mix(in srgb, var(--bg) 80%, #000); touch-action: pan-y; }
.ed-frame { position: absolute; border: 1.5px dashed rgba(217, 169, 49, .55); border-radius: 3px; cursor: grab; touch-action: none; }
.ed-frame.table { border-style: dotted; }
.ed-frame.sel { border: 2px solid var(--brass); background: rgba(217, 169, 49, .08); }
.ed-tag { position: absolute; left: -1px; top: -19px; padding: 1px 6px; border-radius: 3px 3px 0 0; background: var(--brass); color: var(--on-brass); font: 600 11px var(--f-ui); white-space: nowrap; opacity: 0; pointer-events: none; }
.ed-frame.sel .ed-tag { opacity: 1; }
.ed-resize { position: absolute; right: -9px; top: 50%; width: 18px; height: 30px; margin-top: -15px; border-radius: 5px; background: var(--brass); opacity: 0; cursor: ew-resize; }
.ed-frame.sel .ed-resize { opacity: 1; }
.ed-bar { min-height: 60px; padding: 8px 10px calc(8px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.ed-bar > p { margin: 10px 4px; }
.ed-tools { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ed-name { flex: none; margin-right: 4px; font: 700 1rem var(--f-head); color: var(--brass-ink); }
.tool { flex: none; display: inline-flex; align-items: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--r-s); border: 1px solid var(--line2); font-weight: 600; font-size: .9rem; }
.tool svg { width: 17px; height: 17px; }
.tool.on { border-color: var(--brass); color: var(--brass-ink); background: color-mix(in srgb, var(--brass) 14%, transparent); }
.tool-sep { flex: none; width: 1px; height: 26px; background: var(--line); }
.swatch { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line2); }
.swatch.on { box-shadow: 0 0 0 2px var(--brass); }
.swatch.big { width: 38px; height: 38px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.ed-options h2 { margin: 6px 0 8px; font: 700 1.3rem var(--f-head); }
.ed-options h3 { margin: 16px 0 8px; font: 600 1rem var(--f-head); color: var(--muted); }
.add-blocks { display: flex; flex-wrap: wrap; gap: 8px; }

/* lien */
.link-box .field { font-size: .85rem; color: var(--muted); }
.dialog-actions.wrap .btn { flex: 1 1 140px; }

/* historique */
.hist-tools { padding: 4px 12px 6px; display: flex; flex-direction: column; gap: 10px; }
.hist-tools .filters { padding: 0; }
.hist-month { padding-top: 12px; }
.hist-card { display: flex; gap: 10px; margin: 0 12px 6px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.hc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hc-main b { font: 700 1.08rem var(--f-head); }
.hc-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; }
.hc-side b { font-variant-numeric: tabular-nums; }
.status { font-size: .74rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.status.st-envoyee { background: color-mix(in srgb, var(--cipac) 22%, transparent); color: var(--cipac); }
.status.st-commandee { background: color-mix(in srgb, var(--brass) 22%, transparent); color: var(--brass-ink); }
.status.st-recue { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.order-head { padding: 4px 16px 6px; }
.order-head h2 { margin: 0 0 2px; font: 700 1.3rem var(--f-head); }
.order-head > p { margin: 0 0 12px; }
.status-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.order-actions .btn { min-height: 42px; padding: 0 10px; font-size: .92rem; }
.order-actions .btn.primary { grid-column: 1 / -1; min-height: 48px; font-size: 1rem; }

/* réglages */
.ch-row, .alias-row { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ch-row > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.alias-row { flex-direction: column; align-items: stretch; }
.ar-main { display: flex; flex-direction: column; }
.settings-list + p { margin-top: 10px; }
#newChBtn { margin: 16px; }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: var(--r); border: 1px dashed var(--line2); }
.logo-row > div { flex: 1 1 160px; }
.logo-row p { margin: 2px 0 0; }
.logo-prev { height: 44px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 4px; padding: 3px; }
.layout-prev { padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.layout-prev p { margin: 4px 0 10px; }
.cat-status { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line2); }
.cat-status.ok { border-color: var(--ok); }
.cat-status.ok b { color: var(--ok); }
.cat-status.todo { border-color: var(--brass); }
.cat-status.todo b { color: var(--brass-ink); }
.cat-status span { color: var(--muted); font-size: .88rem; }
.cat-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cat-table th, .cat-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.cat-table th { color: var(--muted); font-weight: 500; font-size: .8rem; }
.cat-table td:last-child, .cat-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sample { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.sample-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: .88rem; }
.sample-row span:last-child { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.sample-row svg { width: 15px; height: 15px; }
.diff-list { max-height: 300px; overflow: auto; font-size: .86rem; }
.diff-list div { padding: 5px 0; border-bottom: 1px solid var(--line); }
.diff-list span { float: right; font-variant-numeric: tabular-nums; }
.mono-ish { font-size: .9rem; line-height: 1.5; }

/* toasts */
#toastRoot { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px; padding: 11px 14px; border-radius: var(--r); background: var(--text); color: var(--bg); font-weight: 500; font-size: .92rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); animation: tin .2s ease; transition: opacity .3s, transform .3s; }
.toast.error { background: var(--danger); color: #fff; }
.toast button { color: var(--brass-2); font-weight: 700; white-space: nowrap; }
:root[data-theme="light"] .toast button { color: #E9B83A; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Écrans larges ---------- */
@media (min-width: 900px) {
  :root { --tab-h: 0px; }
  #app { padding-left: 92px; }
  .tabbar { top: 0; right: auto; width: 92px; height: 100vh; flex-direction: column; justify-content: flex-start; padding: 80px 0 0; border-top: 0; border-right: 1px solid var(--line); }
  .tabbar a { flex: none; height: 74px; font-size: .78rem; }
  .tabbar a.active::before { top: 18%; bottom: 18%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .topbar, .searchbar, main { max-width: 980px; margin-left: auto; margin-right: auto; }
  .searchbar { margin-bottom: 10px; }
  main { padding-bottom: 40px; }
  .sources { grid-template-columns: repeat(3, 1fr); }
  .vrow { grid-template-columns: 1fr auto auto; grid-template-areas: "body side acts"; align-items: center; }
  .vacts { margin: 0; }
  .list-footer { bottom: 0; border-radius: var(--r) var(--r) 0 0; }
  #toastRoot, #bgTask { bottom: 18px; }
  .sheet-wrap:not(.full):not(.center) { align-items: center; }
  .sheet-wrap:not(.full):not(.center) .sheet { border-radius: 14px; }
  .brand-name { top: 118px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* fermeture des fenêtres, erreurs de champ, TVA */
.sheet-close { position: absolute; top: 8px; right: 8px; z-index: 3; background: var(--surface2); border-radius: 50%; width: 38px; min-width: 38px; height: 38px; }
.sheet-close svg { width: 20px; height: 20px; }
.sheet-wrap.center .sheet { padding-top: 14px; }
.dialog h2, .as-head, .picker h2, .confirm-pdf h2, .ed-options h2, .form h2 { padding-right: 44px; }
.field-err { color: var(--danger); font-size: .82rem; min-height: 0; }
.field-err:empty { display: none; }
.field.invalid { border-color: var(--danger); }
.lf-total b i { font-style: normal; font-size: .8rem; font-weight: 600; color: var(--muted); }

/* images */
.thumb { display: block; width: 56px; height: 56px; border-radius: var(--r-s); background: #fff; object-fit: contain; border: 1px solid var(--line); }
.thumb.noimg { background: var(--surface2); border-style: dashed; }
img.thumb:not(.ok) { background: var(--surface2); }
.thumb.big { width: 92px; height: 92px; }
.art-head { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px 6px; }
.art-head .art-desc { padding: 0; flex: 1; min-width: 0; }
.art-img { position: relative; flex: none; }
.img-count { position: absolute; right: 4px; bottom: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: rgba(29, 34, 38, .78); color: #fff; font: 600 .74rem/20px var(--f-ui); text-align: center; }
.as-gallery { margin: 0 -16px 12px; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #fff; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-item { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; height: 210px; padding: 12px; }
.gal-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gal-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 0; }
.gal-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); }
.gal-dots span.on { background: var(--brass); }
.add-sheet .as-gallery + .as-head { padding-right: 0; }
.viewer { display: flex; flex-direction: column; height: 100%; background: #fff; }
.viewer-stage { flex: 1; display: grid; place-items: center; padding: 56px 16px 16px; touch-action: pan-y; }
.viewer-stage { min-height: 0; }
.viewer-stage img { width: 100%; height: 100%; max-width: 640px; object-fit: contain; }
.viewer-nav { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 16px calc(14px + var(--safe-b)); color: #1D2226; font-weight: 600; }
.viewer-nav .icon-btn { color: #1D2226; background: #EEF0EF; border-radius: 50%; }
.sheet-wrap.full .sheet-close { top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; }
@media (min-width: 900px) { .vrow { grid-template-columns: 64px 1fr auto auto; grid-template-areas: "thumb body side acts"; } .vrow .thumb { width: 64px; height: 64px; } }

.crow.with-thumb { grid-template-columns: auto 1fr auto auto auto; padding-left: 10px; }
.crow.with-thumb .vthumb { padding: 4px 4px 4px 0; }
.ed-frame { z-index: 2; }
.ed-frame.table { z-index: 1; }
.ed-frame.sel { z-index: 3; }
.crow .vthumb { grid-area: auto; }
.crow .vthumb .thumb { width: 48px; height: 48px; }
.lf-total { min-width: 0; }
.lf-total small { white-space: normal; }
.list-footer .btn { flex: none; }


/* espace chantier */
.ch-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 16px 10px; }
.ch-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 11px; border-radius: var(--r); border: 1px solid var(--line2); font-weight: 600; font-size: .95rem; text-align: left; }
.ch-tabs button small { color: var(--muted); font-size: .76rem; font-weight: 500; }
.ch-tabs button.on { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 14%, transparent); }
.mlists { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 8px; scrollbar-width: none; }
.mlists::-webkit-scrollbar { display: none; }
.mlists .chip.on { border-color: var(--brass); color: var(--text); background: color-mix(in srgb, var(--brass) 16%, transparent); }
.mlists .chip .cnt { font-size: .76rem; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: var(--surface2); color: var(--muted); padding: 0 5px; }
.mlists .chip.add { border-style: dashed; }
.mlists .chip.add svg { width: 15px; height: 15px; }
.mlist-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 4px 16px 10px; }
.mlist-head b { font: 600 1.05rem/1.2 var(--f-head); }
.mlist-head svg, .tasks-done .link svg { width: 15px; height: 15px; }
.task-add, .note-add { display: flex; gap: 8px; padding: 2px 16px 12px; }
.note-add { flex-direction: column; }
.task-add .field { flex: 1; }
.task-add .btn { min-width: 48px; padding: 0 12px; }
.task-add .btn svg { width: 20px; height: 20px; }
.tasks { display: flex; flex-direction: column; }
.task { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; padding: 4px 10px 4px 12px; border-top: 1px solid var(--line); }
.tk-check { width: 40px; height: 40px; display: grid; place-items: center; }
.tk-check svg { width: 26px; height: 26px; padding: 3px; border-radius: 7px; border: 2px solid var(--line2); stroke: transparent; stroke-width: 3; fill: none; }
.task.done .tk-check svg { background: var(--ok); border-color: var(--ok); stroke: #fff; }
.tk-body { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 0; min-width: 0; }
.tk-body span { font-size: 1rem; overflow-wrap: anywhere; }
.tk-body small { color: var(--muted); font-size: .8rem; }
.task.done .tk-body span { color: var(--muted); text-decoration: line-through; }
.tasks-done { margin: 10px 0 0; }
.tasks-done summary { padding: 10px 16px; color: var(--muted); font-weight: 600; cursor: pointer; }
.tasks-done .link { margin: 10px 16px; }
.notes { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 20px; }
.note { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 8px 8px 12px 14px; }
.note header { display: flex; align-items: center; gap: 2px; }
.note header span { flex: 1; }
.note header .icon-btn svg { width: 18px; height: 18px; }
.note p { margin: 4px 6px 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--brass); }
.order-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.order-actions .btn { white-space: normal; line-height: 1.15; text-align: center; }

/* comptes et collaborateurs */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; object-fit: cover; background: var(--surface2); }
.avatar.ini { background: color-mix(in srgb, var(--brass) 30%, var(--surface2)); color: var(--text); font-weight: 700; font-family: var(--f-head); }
.acct { display: flex; flex-direction: column; gap: 14px; padding: 8px 16px 24px; }
.acct h2 { margin: 6px 0 0; }
.acct-photo { display: flex; align-items: center; gap: 14px; color: var(--brass-ink); font-weight: 600; }
.acct .form { padding: 0; }
.acct .list-actions { padding: 0; flex-wrap: wrap; }
.auth-seg { padding: 0; }
.acct-tile { grid-template-columns: auto 1fr auto; column-gap: 12px; }
.acct-tile .avatar { grid-row: span 2; }
.collab-bar { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; }
.ro-badge { font-size: .8rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line2); border-radius: 99px; padding: 3px 10px; }
.ppl { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 14px; }
.person { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.person div { display: flex; flex-direction: column; min-width: 0; }
.person small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .role { font-size: .82rem; color: var(--muted); }
.person select.field.small { min-height: 36px; padding: 0 8px; font-size: .88rem; width: auto; }
.inv { display: flex; flex-direction: column; gap: 8px; }
.inv h3 { margin: 4px 0 0; font-size: 1rem; }
.acct-tile .avatar { grid-column: 1; grid-row: 1 / 3; }
.acct-tile .tile-name, .acct-tile .tile-meta { grid-column: 2; }
.acct-tile svg { grid-column: 3; grid-row: 1 / 3; }
