/* Backoffice Nanù: strumento interno.
   Identità del sito nanubaby.it (crema, inchiostro, Newsreader per i titoli)
   con un sans per l'interfaccia. Guida: docs/superpowers/specs/2026-11-06-backoffice-ui.md
   Tutte le classi hanno il prefisso .bo- ; gli stati usano .is-* */

@font-face {
  font-family: "Newsreader";
  src: url("assets/newsreader.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat";
  src: url("assets/redhat.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

/* ================================================================ token */

:root {
  /* superfici */
  --bg: #f7f6f4;          /* crema del sito: fondo pagina */
  --paper: #ffffff;       /* pannelli, campi */
  --sunk: #eeebe7;        /* pozzetti immagine, scheletri */
  --line: #e6e2dd;
  --line-strong: #d4cec7;

  /* testo */
  --ink: #1c1a17;         /* inchiostro: testo e barra scura */
  --ink-2: #3a3631;
  --muted: #66625d;       /* testo secondario: 5,6:1 su --bg */
  --faint: #8c8781;       /* solo icone e bordi, mai testo piccolo */

  /* accento: salvia del bottone del sito, scurita per il testo bianco */
  --sage: #9ba998;
  --accent: #56694f;      /* 5,9:1 col bianco */
  --accent-hover: #46573f;
  --accent-soft: #e6ece2;

  /* stati */
  --ok: #3c6a39;    --ok-soft: #e2eedd;
  --warn: #8f5418;  --warn-soft: #f6eadb;
  --err: #a33a2b;   --err-soft: #f8e5e1;
  --work: #2f5470;  --work-soft: #e3ecf2;   /* in lavorazione */

  /* tipografia */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Red Hat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.875rem;    /* 14 */
  --fs-md: 0.9375rem;   /* 15, base */
  --fs-lg: 1.0625rem;   /* 17 */
  --fs-xl: 1.375rem;    /* 22 serif */
  --fs-2xl: 1.875rem;   /* 30 serif */
  --fs-3xl: 2.5rem;     /* 40 serif */

  /* forme: il raggio scende con la gerarchia */
  --r-lg: 18px;   /* pannelli grandi, finestra di accesso */
  --r: 12px;      /* card, tile */
  --r-sm: 8px;    /* bottoni, campi */
  --r-xs: 5px;    /* miniature, etichette */
  --r-pill: 999px;

  /* spaziatura (multipli di 4) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  --side-w: 248px;
  --shadow-pop: 0 1px 2px rgba(28, 26, 23, .06), 0 8px 24px -6px rgba(28, 26, 23, .18);
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* ================================================================ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s4); scroll-padding-bottom: 104px; /* la barra ZIP non copre il fuoco */ }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-family: var(--sans); font-size: var(--fs-md); font-weight: 600; letter-spacing: 0; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
button, a, label, input[type="range"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (forced-colors: active) { :focus-visible { outline: 2px solid CanvasText; outline-offset: 2px; } }
::selection { background: var(--accent-soft); }

.bo-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.bo-muted { color: var(--muted); }
.bo-small { font-size: var(--fs-sm); }
.bo-num { font-variant-numeric: tabular-nums; }
.bo-nowrap { white-space: nowrap; }
.bo-stack { display: grid; gap: var(--s4); }
.bo-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.bo-spacer { flex: 1; }
.bo-kbd {
  display: inline-block; min-width: 1.6em; padding: 0 5px; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: var(--r-xs); background: var(--paper);
  font-size: var(--fs-xs); line-height: 1.5; text-align: center; color: var(--ink-2);
}
.bo-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ================================================================ shell */

.bo-skip {
  position: absolute; left: var(--s4); top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: var(--s2) var(--s4); border-radius: var(--r-sm);
}
.bo-skip:focus { top: var(--s4); }

.bo-shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* barra laterale: scura come l'inchiostro, il lavoro resta sulla crema */
.bo-side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--ink); color: #e9e5df;
  padding: var(--s5) var(--s4) var(--s4);
}
.bo-side__brand { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s2) var(--s6); text-decoration: none; }
.bo-side__logo { height: 40px; width: auto; align-self: flex-start; filter: invert(1) brightness(1.1); }
.bo-side__name { font-family: var(--serif); font-size: var(--fs-lg); color: #b9b3ab; }

.bo-nav { display: grid; gap: var(--s5); }
.bo-nav__group { display: grid; gap: 2px; }
.bo-nav__title { padding: 0 var(--s3) var(--s2); font-size: var(--fs-xs); color: #a39d95; }
.bo-nav__item {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 40px; padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  color: #e9e5df; text-decoration: none; font-size: var(--fs-sm);
}
.bo-nav__item:hover { background: rgba(255, 255, 255, .07); }
.bo-nav__item.is-active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.bo-nav__item .bo-icon { color: #b9b3ab; }
.bo-nav__item.is-active .bo-icon { color: var(--sage); }
.bo-nav__sub { display: grid; gap: 2px; margin: 2px 0 var(--s2) 30px; padding-left: var(--s2); border-left: 1px solid rgba(255, 255, 255, .14); }
.bo-nav__sub .bo-nav__item { min-height: 34px; padding: var(--s1) var(--s3); }
.bo-nav__count { margin-left: auto; font-size: var(--fs-xs); color: #a39d95; font-variant-numeric: tabular-nums; }
.bo-side :focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--sage); }

/* il margine automatico sta sui crediti: crediti e operatore restano insieme in fondo */
.bo-side__user {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s2) 0; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: var(--fs-sm);
}
.bo-side__user .bo-avatar { background: #3a3631; color: #e9e5df; }
.bo-side__who { min-width: 0; flex: 1; }
.bo-side__who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-side__who span { display: block; color: #a39d95; font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-side__out {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 0; background: none; color: #b9b3ab; cursor: pointer;
}
.bo-side__out:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.bo-main { min-width: 0; }
.bo-page { max-width: 1280px; margin: 0 auto; padding: var(--s6) var(--s6) var(--s8); }
.bo-page--narrow { max-width: 880px; }

.bo-crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.bo-crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--faint); }
.bo-crumbs a { text-decoration: none; }
.bo-crumbs a:hover { text-decoration: underline; color: var(--ink); }

.bo-page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4) var(--s5); flex-wrap: wrap; margin-bottom: var(--s6); }
.bo-page__title { font-size: var(--fs-2xl); }
.bo-page__lede { margin-top: var(--s2); color: var(--muted); max-width: 62ch; }
.bo-page__actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

.bo-section { margin-top: var(--s7); }
.bo-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }
.bo-section__head h2 { font-size: var(--fs-xl); }

/* ================================================================ blocchi */

.bo-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s5);
}
.bo-card--flush { padding: 0; overflow: hidden; }
.bo-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.bo-card__head h2 { font-size: var(--fs-xl); }

.bo-avatar {
  flex: none; display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--sunk); color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: 600;
}

/* etichette di stato (testo + punto, mai solo colore) */
.bo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--sunk); color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
}
.bo-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bo-badge--plain::before { display: none; }
.bo-badge--queued { background: var(--sunk); color: var(--muted); }
.bo-badge--queued::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.bo-badge--processing { background: var(--work-soft); color: var(--work); }
.bo-badge--processing::before { animation: bo-pulse 1.4s ease-in-out infinite; }
.bo-badge--done { background: var(--ok-soft); color: var(--ok); }
.bo-badge--error { background: var(--err-soft); color: var(--err); }
.bo-badge--warn { background: var(--warn-soft); color: var(--warn); }

/* riepilogo impostazioni del lotto */
.bo-tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.bo-tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-xs);
  background: var(--paper); font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap;
}
.bo-tag__dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-strong); }

.bo-meta { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); margin: 0; font-size: var(--fs-sm); }
.bo-meta dt { color: var(--muted); }
.bo-meta dd { margin: 0; }

/* ================================================================ bottoni */

.bo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s4);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.bo-btn:hover { border-color: var(--ink-2); }
.bo-btn:focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
.bo-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.bo-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.bo-btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.bo-btn--dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.bo-btn--ghost { background: transparent; border-color: transparent; }
.bo-btn--ghost:hover { background: var(--sunk); border-color: transparent; }
.bo-btn--danger { color: var(--err); border-color: #e7c7c0; }
.bo-btn--danger:hover { border-color: var(--err); background: var(--err-soft); }
.bo-btn--sm { min-height: 32px; padding: 0 var(--s3); font-size: var(--fs-xs); }
.bo-btn--lg { min-height: 48px; padding: 0 var(--s5); font-size: var(--fs-md); }
.bo-btn--block { width: 100%; }
.bo-btn--icon { width: 40px; padding: 0; }
.bo-btn--icon.bo-btn--sm { width: 32px; }
.bo-btn:disabled, .bo-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.bo-btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.bo-btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: #fff #fff transparent transparent;
  animation: bo-spin .8s linear infinite;
}
.bo-btn:not(.bo-btn--primary):not(.bo-btn--dark).is-loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
.bo-link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.bo-link:hover { color: var(--ink); }

/* ================================================================ campi */

.bo-form { display: grid; gap: var(--s4); }
.bo-field { display: grid; gap: 6px; min-width: 0; border: 0; margin: 0; padding: 0; }
.bo-field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); padding: 0; }
.bo-field__label small { font-weight: 400; color: var(--muted); }
.bo-field__hint { font-size: var(--fs-xs); color: var(--muted); }
.bo-field__error { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-xs); color: var(--err); font-weight: 600; }
.bo-input, .bo-textarea, .bo-select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
}
.bo-textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.bo-input::placeholder, .bo-textarea::placeholder { color: var(--muted); opacity: 1; }
.bo-input:hover, .bo-textarea:hover { border-color: var(--faint); }
.bo-input:focus-visible, .bo-textarea:focus-visible, .bo-select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); border-radius: var(--r-sm); }
.bo-field.is-invalid .bo-input, .bo-field.is-invalid .bo-textarea { border-color: var(--err); }
.bo-field.is-invalid .bo-input:focus-visible { box-shadow: 0 0 0 3px var(--err-soft); }
.bo-pass { position: relative; }
.bo-pass .bo-input { padding-right: 84px; }
.bo-pass__show { position: absolute; right: 6px; top: 6px; min-height: 32px; }

/* contatore requisiti password */
.bo-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.bo-meter span { height: 4px; border-radius: 2px; background: var(--sunk); }
.bo-meter[data-level="1"] span:nth-child(-n+1),
.bo-meter[data-level="2"] span:nth-child(-n+2) { background: var(--warn); }
.bo-meter[data-level="3"] span:nth-child(-n+3),
.bo-meter[data-level="4"] span { background: var(--ok); }

/* ================================================== formato (chip disegnati) */

.bo-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.bo-chip { position: relative; }
.bo-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bo-chip__face {
  display: grid; justify-items: center; align-content: end; gap: 6px;
  width: 64px; height: 76px; padding: var(--s2) 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: border-color .15s, background-color .15s;
}
.bo-chip__shape {
  --w: 3; --h: 4;
  width: calc(32px * var(--w) / max(var(--w), var(--h)));
  height: calc(32px * var(--h) / max(var(--w), var(--h)));
  border: 1.5px solid currentColor; border-radius: 2px; color: var(--faint);
}
.bo-chip__shape--auto { border-style: dashed; width: 30px; height: 24px; }
.bo-chip--wide .bo-chip__face { width: auto; padding-inline: var(--s3); }
.bo-chip:hover .bo-chip__face { border-color: var(--ink-2); }
.bo-chip input:checked + .bo-chip__face { border-color: var(--ink); background: var(--ink); color: #fff; }
.bo-chip input:checked + .bo-chip__face .bo-chip__shape { color: var(--sage); background: rgba(155, 169, 152, .25); }
.bo-chip input:focus-visible + .bo-chip__face { box-shadow: var(--focus); }
.bo-chip input:disabled { cursor: not-allowed; }
.bo-chip input:disabled + .bo-chip__face { opacity: .4; }

/* ======================================= trattamento (toggle a scheda) */

.bo-toggles { display: grid; gap: var(--s2); }
.bo-toggle {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s3);
  padding: var(--s3) var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.bo-toggle__main { display: contents; cursor: pointer; }
.bo-toggle__main > input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bo-toggle__box {
  grid-row: span 2; margin-top: 2px; width: 20px; height: 20px; border-radius: var(--r-xs);
  border: 1.5px solid var(--faint); background: var(--paper); display: grid; place-items: center;
}
.bo-toggle__box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.4; fill: none; opacity: 0; }
.bo-toggle__title { font-weight: 600; font-size: var(--fs-sm); }
.bo-toggle__desc { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.bo-toggle:hover { border-color: var(--ink-2); }
.bo-toggle:has(> .bo-toggle__main > input:checked) { border-color: var(--accent); background: #f6f8f4; }
.bo-toggle input:checked ~ .bo-toggle__box { background: var(--accent); border-color: var(--accent); }
.bo-toggle input:checked ~ .bo-toggle__box svg { opacity: 1; }
.bo-toggle:has(> .bo-toggle__main > input:focus-visible) { box-shadow: var(--focus); }
/* variante radio (sfondo): cerchio invece del quadrato */
.bo-toggle--radio .bo-toggle__box { border-radius: 50%; }
.bo-toggle--radio input:checked ~ .bo-toggle__box { background: var(--paper); box-shadow: inset 0 0 0 5px var(--accent); }
.bo-toggle--radio input:checked ~ .bo-toggle__box svg { opacity: 0; }
.bo-toggle.is-disabled { opacity: .5; cursor: not-allowed; }
.bo-toggle__extra { grid-column: 2; margin-top: var(--s2); position: relative; z-index: 1; }

/* campioni colore sfondo */
.bo-swatches { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.bo-swatch { position: relative; }
.bo-swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bo-swatch span {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  background: var(--c, #fff); box-shadow: inset 0 0 0 1px rgba(28, 26, 23, .18);
}
.bo-swatch input:checked + span { box-shadow: inset 0 0 0 1px rgba(28, 26, 23, .18), 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.bo-swatch input:focus-visible + span { box-shadow: inset 0 0 0 1px rgba(28, 26, 23, .18), 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.bo-swatch__hex { width: 104px; min-height: 32px; padding: 4px 8px; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

/* ================================================================ caricamento */

.bo-dropzone {
  position: relative; display: grid; justify-items: center; gap: var(--s2); text-align: center;
  padding: var(--s7) var(--s5);
  border: 1.5px dashed var(--line-strong); border-radius: var(--r);
  background: var(--paper); color: var(--muted);
  transition: border-color .15s, background-color .15s;
}
.bo-dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bo-dropzone__icon { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.3; }
.bo-dropzone__title { font-family: var(--serif); font-size: var(--fs-xl); color: var(--ink); }
.bo-dropzone__hint { font-size: var(--fs-xs); }
.bo-dropzone:hover, .bo-dropzone.is-dragover { border-color: var(--accent); background: #f6f8f4; }
.bo-dropzone.is-dragover { border-style: solid; }
.bo-dropzone:has(input:focus-visible) { box-shadow: var(--focus); }
.bo-dropzone--compact { padding: var(--s4); grid-auto-flow: column; justify-content: center; align-items: center; }
.bo-dropzone--compact .bo-dropzone__icon { width: 22px; height: 22px; }
.bo-dropzone--compact .bo-dropzone__title { font-family: var(--sans); font-size: var(--fs-sm); font-weight: 600; }

.bo-uploads { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.bo-upload { position: relative; display: grid; gap: 4px; min-width: 0; }
.bo-upload__thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-xs); background: var(--sunk); overflow: hidden; }
.bo-upload__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bo-upload__name { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-upload__remove {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(28, 26, 23, .72); color: #fff; cursor: pointer;
}
.bo-upload__remove .bo-icon { width: 14px; height: 14px; }
.bo-upload__bar { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.bo-upload__bar span { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); }
.bo-upload.is-uploading .bo-upload__thumb img { opacity: .55; }
.bo-upload.is-error .bo-upload__thumb { box-shadow: inset 0 0 0 2px var(--err); }
.bo-upload.is-error .bo-upload__thumb img { opacity: .35; filter: grayscale(1); }
.bo-upload.is-error .bo-upload__name { color: var(--err); font-weight: 600; white-space: normal; }
.bo-upload__flag { position: absolute; left: 6px; top: 6px; }

/* ======================================================= nuovo lotto */

.bo-compose { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s5); align-items: start; }
.bo-compose__photos { display: grid; gap: var(--s4); min-width: 0; }
.bo-compose__count { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.bo-compose__count h2 { font-size: var(--fs-xl); }

/* pannello impostazioni: resta visibile mentre si scorre la lista foto */
.bo-panel { position: sticky; top: var(--s4); display: grid; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.bo-panel__section { display: grid; gap: var(--s3); padding: var(--s5); border: 0; margin: 0; min-width: 0; }
.bo-panel__section + .bo-panel__section { border-top: 1px solid var(--line); }
.bo-panel__legend { padding: 0; font-family: var(--serif); font-size: var(--fs-lg); float: left; width: 100%; margin-bottom: var(--s3); }
.bo-panel__legend + * { clear: both; }
.bo-panel__foot { display: grid; gap: var(--s3); padding: var(--s5); border-top: 1px solid var(--line); background: #fbfaf8; border-radius: 0 0 var(--r) var(--r); }
.bo-panel__summary { font-size: var(--fs-sm); color: var(--muted); }
.bo-panel__summary b { color: var(--ink); font-weight: 600; }
.bo-panel__section.is-disabled > :not(.bo-panel__legend):not(.bo-field__hint) { opacity: .45; pointer-events: none; }

.bo-toolbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.bo-toolbar .bo-select { width: auto; min-height: 36px; padding: 6px 32px 6px 10px; font-size: var(--fs-sm); }

/* ================================================================ lotto */

/* barra di avanzamento a segmenti: una porzione per stato */
.bo-progress { display: grid; gap: var(--s2); }
.bo-progress__bar { display: flex; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--sunk); gap: 2px; }
.bo-progress__seg { flex: var(--n) 0 0; min-width: 0; }
.bo-progress__seg--done { background: var(--ok); }
.bo-progress__seg--processing { background: var(--work); background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); background-size: 200% 100%; animation: bo-sweep 1.6s linear infinite; }
.bo-progress__seg--error { background: var(--err); }
.bo-progress__seg--queued { background: transparent; }
.bo-progress__legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.bo-progress__legend b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* filtri della griglia */
.bo-filter { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); background: var(--sunk); flex-wrap: wrap; }
.bo-filter button, .bo-filter a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s3);
  border: 0; border-radius: 6px; background: none; color: var(--muted);
  font-size: var(--fs-xs); font-weight: 600; text-decoration: none; cursor: pointer;
}
.bo-filter [aria-pressed="true"], .bo-filter [aria-current="true"], .bo-filter [aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 26, 23, .08); }
.bo-filter__n { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; }

.bo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: var(--s5) var(--s4); margin: 0; padding: 0; list-style: none; }

/* tile: la foto è il contenuto, la cornice è minima */
.bo-tile { position: relative; display: grid; gap: var(--s2); min-width: 0; }
.bo-tile__media {
  position: relative; display: block; aspect-ratio: var(--ratio, 3 / 4);
  border-radius: var(--r); overflow: hidden; background: var(--sunk);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none; color: inherit;
}
.bo-tile__media:focus-visible { box-shadow: var(--focus); border-radius: var(--r); }
.bo-tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.bo-tile__before {
  position: absolute; left: var(--s2); bottom: var(--s2); width: 34%; aspect-ratio: 1;
  border-radius: var(--r-xs); overflow: hidden; background: var(--sunk);
  box-shadow: 0 0 0 2px var(--paper), var(--shadow-pop);
}
.bo-tile__before img { width: 100%; height: 100%; object-fit: cover; }
.bo-tile__status { position: absolute; left: var(--s2); top: var(--s2); }
.bo-tile__ver { position: absolute; right: var(--s2); top: var(--s2); }
.bo-tile__body { display: flex; align-items: flex-start; gap: var(--s2); min-width: 0; }
.bo-tile__text { min-width: 0; flex: 1; }
.bo-tile__name { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-tile__meta { font-size: var(--fs-xs); color: var(--muted); }
.bo-tile__actions { display: flex; gap: 4px; }
.bo-tile.is-error .bo-tile__body { flex-direction: column; align-items: stretch; }
.bo-tile.is-error .bo-tile__actions .bo-btn { width: 100%; }
.bo-tile__msg { font-size: var(--fs-xs); color: var(--err); line-height: 1.4; }

.bo-tile.is-done .bo-tile__media { background: var(--paper); }
.bo-tile.is-done .bo-tile__media:hover { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px var(--ink-2); }
.bo-tile.is-queued .bo-tile__img { object-fit: cover; opacity: .5; filter: grayscale(.8); }
.bo-tile.is-processing .bo-tile__img { object-fit: cover; filter: saturate(.6) blur(1px); opacity: .85; }
.bo-tile.is-processing .bo-tile__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-100%); animation: bo-slide 2.2s var(--ease) infinite; /* solo transform: tante tile insieme */
}
.bo-tile.is-error .bo-tile__media { box-shadow: inset 0 0 0 2px var(--err); }
.bo-tile.is-error .bo-tile__img { object-fit: cover; opacity: .4; filter: grayscale(1); }
.bo-tile.is-error .bo-tile__name { color: var(--err); }
.bo-tile__center { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; padding: var(--s3); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.bo-tile__timer { font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .85); padding: 2px 8px; border-radius: var(--r-pill); }

/* barra in fondo alla pagina del lotto: download sempre a portata */
.bo-dock {
  position: sticky; bottom: var(--s4); z-index: 6; margin-top: var(--s6);
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  padding: var(--s3) var(--s3) var(--s3) var(--s5); border-radius: var(--r);
  background: var(--ink); color: #e9e5df; box-shadow: var(--shadow-pop);
  font-size: var(--fs-sm);
}
.bo-dock b { color: #fff; }
.bo-dock .bo-btn:not(.bo-btn--primary) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
.bo-dock .bo-btn:not(.bo-btn--primary):hover { border-color: #fff; }
.bo-dock :focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--sage); }

/* ================================================== confronto prima/dopo */

.bo-compare {
  --pos: 50%;
  position: relative; overflow: hidden; border-radius: var(--r);
  /* il riquadro ha la proporzione del risultato: l'originale ci sta dentro com'è,
     così si vede subito quanta scena ha generato il cambio formato */
  aspect-ratio: var(--ar, .75); max-width: 100%; margin-inline: auto;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  user-select: none; touch-action: pan-y;
}
.bo-compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.bo-compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); background: var(--sunk); }
.bo-compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 0 1px rgba(28, 26, 23, .25); pointer-events: none;
}
.bo-compare__grip {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.bo-compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
}
.bo-compare__range:focus-visible ~ .bo-compare__handle .bo-compare__grip { box-shadow: var(--shadow-pop), 0 0 0 3px #fff, 0 0 0 5px var(--accent); }
.bo-compare__label {
  position: absolute; top: var(--s3); padding: 3px 10px; border-radius: var(--r-pill);
  background: rgba(28, 26, 23, .72); color: #fff; font-size: var(--fs-xs); font-weight: 600; pointer-events: none;
}
.bo-compare__label--before { left: var(--s3); }
.bo-compare__label--after { right: var(--s3); }
/* affiancate */
.bo-compare--side { aspect-ratio: auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.bo-compare--side .bo-compare__pane { position: relative; background: var(--paper); }
.bo-compare--side .bo-compare__pane:first-child { background: var(--sunk); }

/* ================================================================ versioni */

.bo-versions { display: grid; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.bo-version {
  position: relative; display: grid; grid-template-columns: 52px 1fr; gap: var(--s1) var(--s3); align-items: start;
  padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
}
.bo-version__thumb { grid-row: span 2; width: 52px; height: 64px; border-radius: var(--r-xs); background: var(--sunk); overflow: hidden; }
.bo-version__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bo-version__title { font-size: var(--fs-sm); font-weight: 600; }
.bo-version__note { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.bo-version__open { position: absolute; inset: 0; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; }
.bo-version__open:focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
.bo-version__side { grid-column: 2; position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.bo-version:hover { border-color: var(--line-strong); }
.bo-version.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.bo-version.is-processing .bo-version__thumb { background: var(--work-soft); }
.bo-version.is-error { border-color: #e7c7c0; }

/* ================================================================ dettaglio */

.bo-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s5); align-items: start; }
.bo-detail__stage { position: sticky; top: var(--s4); display: grid; gap: var(--s3); container-type: inline-size; }
.bo-detail__stage .bo-compare { height: min(calc(100vh - 190px), 900px, calc(100cqw / var(--ar, .75))); min-height: 360px; }
.bo-detail__stage .bo-compare--side { height: min(calc(100vh - 190px), 900px); }
.bo-detail__bar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.bo-detail__panel { display: grid; gap: var(--s5); }
.bo-detail__nav { display: flex; align-items: center; gap: var(--s2); }

/* ================================================================ tabelle */

.bo-table-wrap { position: relative; overflow-x: auto; }
.bo-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bo-table th { text-align: left; font-weight: 600; font-size: var(--fs-xs); color: var(--muted); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.bo-table td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.bo-table tr:last-child td { border-bottom: 0; }
.bo-table tbody tr:hover { background: #fbfaf9; }
.bo-table__actions { text-align: right; white-space: nowrap; }
.bo-table__actions .bo-btn + .bo-btn { margin-left: var(--s2); }
.bo-person { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.bo-person b { display: block; font-weight: 600; }
.bo-person b + span { display: block; color: var(--muted); font-size: var(--fs-xs); }
.bo-person b .bo-badge { margin-left: 6px; vertical-align: 1px; }

/* miniature in fila (archivio) */
.bo-strip { display: flex; }
.bo-strip img, .bo-strip span {
  width: 40px; height: 50px; object-fit: cover; border-radius: var(--r-xs); background: var(--paper);
  box-shadow: 0 0 0 2px var(--paper); margin-left: -10px;
}
.bo-strip > * { flex: none; }
.bo-strip :first-child { margin-left: 0; }
.bo-strip span { display: grid; place-items: center; background: var(--sunk); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }

/* ================================================================ home */

.bo-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: var(--s4); margin: 0; padding: 0; list-style: none; }
.bo-tool {
  position: relative; display: grid; grid-template-columns: 132px 1fr; gap: var(--s5);
  padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  transition: border-color .15s;
}
.bo-tool:hover { border-color: var(--ink-2); }
.bo-tool:has(.bo-tool__link:focus-visible) { box-shadow: var(--focus); }
.bo-tool__art { position: relative; height: 150px; }
.bo-tool__art img { position: absolute; border-radius: var(--r-xs); object-fit: cover; box-shadow: 0 0 0 3px var(--paper), var(--shadow-pop); }
.bo-tool__art img:first-child { left: 0; top: 18px; width: 92px; height: 70px; transform: rotate(-4deg); }
.bo-tool__art img:last-child { right: 0; bottom: 0; width: 84px; height: 112px; }
.bo-tool__body { display: grid; gap: var(--s2); align-content: start; }
.bo-tool__title { font-family: var(--serif); font-size: var(--fs-xl); }
.bo-tool__link { text-decoration: none; }
.bo-tool__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.bo-tool__link:focus-visible { box-shadow: none; }
.bo-tool__desc { font-size: var(--fs-sm); color: var(--muted); }
.bo-tool__foot { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); position: relative; z-index: 1; }
.bo-tool--soon { border-style: dashed; background: transparent; grid-template-columns: 1fr; align-content: center; color: var(--muted); }
.bo-tool--soon:hover { border-color: var(--line-strong); }

/* ================================================================ accesso */

.bo-auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s6) var(--s4); background: var(--bg); }
.bo-auth__card {
  width: 100%; max-width: 420px; display: grid; gap: var(--s5);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: var(--s7) var(--s6);
}
.bo-auth__card h1 { font-size: var(--fs-2xl); }
.bo-auth__foot { font-size: var(--fs-sm); color: var(--muted); }
.bo-auth__logo { display: block; height: 48px; width: auto; justify-self: center; margin-bottom: var(--s2); }

/* ================================================== avvisi, vuoti, caricamento */

.bo-banner {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s3) var(--s4); border-radius: var(--r-sm);
  background: var(--sunk); color: var(--ink-2); font-size: var(--fs-sm);
}
.bo-banner .bo-icon { margin-top: 1px; }
.bo-banner__body { flex: 1; display: grid; gap: 2px; }
.bo-banner__body b { font-weight: 600; }
.bo-banner--err { background: var(--err-soft); color: #7d2a1e; }
.bo-banner--err .bo-icon { color: var(--err); }
.bo-banner--warn { background: var(--warn-soft); color: #6e4012; }
.bo-banner--ok { background: var(--ok-soft); color: #2c512a; }
.bo-banner--info { background: var(--work-soft); color: #23425a; }

.bo-empty { display: grid; justify-items: center; gap: var(--s3); text-align: center; padding: var(--s8) var(--s5); }
.bo-empty__art { width: 120px; height: 84px; color: var(--faint); stroke-width: 1.2; }
.bo-empty h2 { font-size: var(--fs-xl); }
.bo-empty p { color: var(--muted); max-width: 46ch; }

.bo-skeleton { border-radius: var(--r-xs); background: linear-gradient(90deg, var(--sunk) 0 40%, #f6f4f1 50%, var(--sunk) 60% 100%); background-size: 300% 100%; animation: bo-sweep 1.4s linear infinite; }
.bo-skeleton--text { height: 12px; border-radius: 6px; }
.bo-skeleton--tile { aspect-ratio: 3 / 4; border-radius: var(--r); }

.bo-spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--ink); animation: bo-spin .8s linear infinite; }

/* notifiche */
.bo-toasts { position: fixed; right: var(--s5); bottom: var(--s5); z-index: 40; display: grid; gap: var(--s2); justify-items: end; pointer-events: none; }
.bo-toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s3);
  max-width: 420px; padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-size: var(--fs-sm); box-shadow: var(--shadow-pop);
  animation: bo-in .25s var(--ease);
}
.bo-toast .bo-icon { color: var(--sage); }
.bo-toast--err { background: #5b2017; }
.bo-toast--err .bo-icon { color: #f2b8ad; }
.bo-toast .bo-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.bo-toast :focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--sage); }

/* finestra di conferma (dialog nativo) */
.bo-dialog { width: min(440px, calc(100vw - 32px)); padding: var(--s5); border: 0; border-radius: var(--r-lg); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-pop); }
.bo-dialog::backdrop { background: rgba(28, 26, 23, .4); }
.bo-dialog h2 { margin-bottom: var(--s2); }
.bo-dialog__actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s5); }

/* ================================================================ moto */

@keyframes bo-spin { to { transform: rotate(360deg); } }
@keyframes bo-sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes bo-pulse { 50% { opacity: .35; } }
@keyframes bo-slide { to { transform: translateX(100%); } }
@keyframes bo-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ================================================================ larghezze */

@media (max-width: 1180px) {
  :root { --side-w: 216px; }
  .bo-page { padding: var(--s5) var(--s5) var(--s8); }
  .bo-detail { grid-template-columns: minmax(0, 1fr) 320px; }
  .bo-compose { grid-template-columns: minmax(0, 1fr) 330px; }
  .bo-table .bo-strip { display: none; }
}

/* tablet in verticale e sotto: barra laterale → barra in alto */
@media (max-width: 900px) {
  .bo-shell { grid-template-columns: 1fr; }
  .bo-side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); overflow-x: auto; }
  .bo-side__brand { padding: 0 var(--s2) 0 0; }
  .bo-side__name, .bo-nav__title, .bo-nav__count, .bo-side__who { display: none; }
  .bo-nav, .bo-nav__group { display: flex; gap: 2px; }
  .bo-nav__sub { display: contents; }
  .bo-nav__item { white-space: nowrap; }
  .bo-side__user { margin: 0 0 0 auto; padding: 0; border: 0; }
  .bo-detail, .bo-compose { grid-template-columns: 1fr; }
  .bo-detail__stage, .bo-panel { position: static; }
  .bo-detail__stage .bo-compare { height: min(62vh, calc(100cqw / var(--ar, .75))); }
  .bo-auth__card { padding: var(--s6) var(--s5); }
}
@media (max-width: 600px) {
  .bo-page { padding: var(--s4) var(--s4) var(--s8); }
  .bo-tools { grid-template-columns: 1fr; }
  .bo-tool { grid-template-columns: 1fr; }
  .bo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
  .bo-nav__item span { display: none; }
}

/* ---- Task 9: crediti KIE nella barra laterale ---- */
.bo-credits { margin: auto var(--s3) var(--s3); padding: var(--s3); border-radius: var(--r); background: rgba(255, 255, 255, .06); color: #d8d3cc; font-size: var(--fs-xs); display: grid; gap: var(--s1); }
.bo-credits__n { display: flex; align-items: center; gap: var(--s2); }
.bo-credits__n b { color: #fff; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.bo-credits__msg, .bo-credits a { color: inherit; }
.bo-credits a { text-decoration: underline; text-underline-offset: 2px; }
.bo-credits--low { background: #4a3419; color: #f6d9ae; }
.bo-credits--low .bo-credits__n b { color: #ffc77a; }
.bo-credits--crit { background: #5a2218; color: #fbd3cb; }
.bo-credits--crit .bo-credits__n b { color: #ff9c8a; }
.bo-side__out { background: none; border: 0; cursor: pointer; color: inherit; }
@media (max-width: 900px) { .bo-credits { display: none; } }

/* bande del "Cambia formato": anteprima dal vivo e cursori */
.bo-bands__preview { display: grid; place-items: center; padding: var(--s3); border-radius: var(--r); background: var(--sunk); margin-bottom: var(--s3); }
.bo-bands__canvas { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; border-radius: 4px; box-shadow: 0 1px 3px rgba(28, 26, 23, .18); }
.bo-ranges { display: grid; gap: var(--s3); }
.bo-range { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s3); align-items: center; }
.bo-range__label { font-size: var(--fs-sm); }
.bo-range__out { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.bo-range__input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.bo-range__input:disabled { opacity: .45; }
.bo-check { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); align-items: start; margin-top: var(--s4); font-size: var(--fs-sm); cursor: pointer; }
.bo-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.bo-color { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper); cursor: pointer; }

[hidden] { display: none !important; }
.bo-dialog--wide { width: min(560px, calc(100vw - 32px)); }
.bo-dialog__list { margin: var(--s3) 0; padding-left: var(--s5); display: grid; gap: var(--s2); font-size: var(--fs-sm); }
