/* Plataforma de retoque · requiere tokens.css */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--surface-alt); color: var(--text); font: 400 15px/24px var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-size: 32px; line-height: 38px; letter-spacing: -.8px; }
h2 { font-size: 24px; line-height: 30px; letter-spacing: -.4px; }
h3 { font-size: 18px; line-height: 24px; letter-spacing: -.2px; }
p { text-wrap: pretty; }
.overline { font: 500 11px/16px var(--font-mono); letter-spacing: 2.4px; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 12px; }
.mono { font: 500 13px/20px var(--font-mono); }
.muted { color: var(--text-secondary); }
.small { font-size: 13px; line-height: 20px; }

/* Layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--night); padding: 24px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .logo { padding: 0 12px 24px; }
.sidebar .logo img { height: 28px; display: block; }
.sidebar .logo span { display: block; margin-top: 8px; font: 500 10px/14px var(--font-mono, monospace); letter-spacing: 1.4px; text-transform: uppercase; color: #a2a5a7; }
.login .form img.proof { height: 34px; width: auto; display: block; margin-bottom: 28px; }
.sidebar a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: #e7e8e8; text-decoration: none; font-weight: 500; }
.sidebar a.nav:hover { background: #162024; }
.sidebar a.nav.active { background: #162024; color: #fff; font-weight: 600; }
.sidebar .pend { color: #a2a5a7; padding: 8px 12px; font-size: 13px; }
.sidebar .spacer { flex: 1; }
.sidebar .who { color: #a2a5a7; font-size: 13px; line-height: 20px; padding: 12px; border-top: 1px solid #202b2e; }
.sidebar .who b { color: #fff; font-weight: 600; display: block; }
.sidebar .who button { margin-top: 8px; background: none; border: 0; color: var(--brand-light); padding: 0; font: inherit; cursor: pointer; }
.main { min-width: 0; }
.topbar { height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.crumbs { font: 500 13px var(--font-mono); color: var(--text-secondary); }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.tag-ejemplo { font: 500 10px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--warning); }
.content { padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; padding: 24px; min-width: 0; }
.card h3 { margin-bottom: 12px; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font: 600 15px/20px var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--duration-fast) var(--ease-brand); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.btn-primary { background: var(--action); color: var(--on-action); } .btn-primary:hover { background: var(--action-hover); }
.btn-secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--border-control); } .btn-secondary:hover { background: var(--surface-muted); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.lbl { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: 400 15px/24px var(--font-body); color: var(--ink); background: var(--surface-raised);
  border: 1px solid var(--border-control); border-radius: 8px; padding: 7px 12px; }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 16px; }
.hint { font-size: 13px; line-height: 20px; color: var(--text-secondary); margin-top: 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
form.inline { display: inline; }

/* Drop zone */
.drop { border: 1px dashed var(--border-control); border-radius: 8px; padding: 20px; text-align: center; transition: background var(--duration-fast); }
.drop.over { background: var(--brand-wash); border-color: var(--brand); }
.drop b { display: block; color: var(--ink); font-weight: 600; }
.drop input[type=file] { display: none; }

/* Flash */
.flash { border-radius: 8px; padding: 10px 14px; display: flex; gap: 8px; align-items: flex-start; }
.flash.ok { background: var(--success-bg); color: var(--success); }
.flash.error { background: var(--danger-bg); color: var(--danger); }
.flash svg { flex: none; margin-top: 2px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font: 600 12px/16px var(--font-body); white-space: nowrap; }
.badge svg { width: 14px; height: 14px; }
.b-pendiente { background: var(--surface-muted); color: var(--text); }
.b-en_retoque { background: var(--brand-wash); color: var(--brand-text); }
.b-en_revision { background: var(--warning-bg); color: var(--warning); }
.b-cambios { background: var(--danger-bg); color: var(--danger); }
.b-aprobada, .b-ok { background: var(--success-bg); color: var(--success); }
.b-error { background: var(--danger-bg); color: var(--danger); }
.b-aviso { background: var(--warning-bg); color: var(--warning); }
.b-pendiente-check { background: var(--surface-muted); color: var(--text-secondary); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--surface-raised); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.chip.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* Justified grid: les miniatures mai es retallen */
.jgrid { display: flex; flex-wrap: wrap; gap: 24px 16px; }
.jgrid::after { content: ""; flex-grow: 999999; }
.jitem { min-width: 0; text-decoration: none; color: inherit; }
.jframe { position: relative; background: var(--surface-muted); }
.jframe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 2px; display: block; }
.jframe .nopreview { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 8px; font: 500 10px/14px var(--font-mono); letter-spacing: 1.4px; color: var(--text-secondary); background: repeating-linear-gradient(135deg, var(--border) 0 1px, transparent 1px 12px), var(--surface-muted); }
.jmeta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font: 500 12px/16px var(--font-mono); color: var(--text-secondary); }
.jmeta .name { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jmeta2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font: 500 11px var(--font-mono); color: var(--text-secondary); }

/* Table */
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; }
.tblwrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl th { text-align: left; font: 500 11px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-secondary); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a.rowlink { color: var(--ink); font-weight: 600; text-decoration: none; }
.tbl a.rowlink:hover { color: var(--link); }

/* Instructions */
.instr p { margin: 0 0 8px; }
.instr b { color: var(--ink); }
.refs { display: flex; gap: 12px; flex-wrap: wrap; }
.refs figure { margin: 0; width: 120px; }
.refs img { width: 120px; height: 120px; object-fit: contain; background: var(--surface-muted); border-radius: 2px; display: block; }
.refs figcaption { font: 500 11px/14px var(--font-mono); color: var(--text-secondary); margin-top: 4px; overflow-wrap: anywhere; }

/* Checks */
ul.checks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 20px; }
ul.checks li .badge { flex: none; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login .photo { background: var(--night); position: relative; overflow: hidden; }
.login .photo img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.login .photo img.logo { position: absolute; left: 40px; top: 40px; height: 28px; }
.login .form { display: grid; place-items: center; padding: 24px; background: var(--surface); }
.login .form > div { width: 100%; max-width: 360px; }

.navtoggle, .navbtn { display: none; }
.navlinks { display: contents; }
.cards.two { grid-template-columns: 2fr 1fr; }

/* Mòbil i tauleta: barra superior compacta amb menú desplegable; tot en una columna; taules amb desplaçament propi */
@media (max-width: 900px) {
  /* la barra amb la seva alçada; l'espai que sobra és per al contingut (si no, a les pàgines curtes s'estira) */
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 50; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 0; }
  .sidebar .logo { padding: 0; }
  .sidebar .logo img { height: 24px; }
  .sidebar .logo span { margin-top: 4px; font-size: 8px; line-height: 10px; letter-spacing: 1.2px; }
  .navbtn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid #2c393d; border-radius: 8px; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
  .navtoggle:focus-visible + .navbtn { outline: 2px solid var(--brand-bright, #22c9dd); outline-offset: 2px; }
  .navlinks { display: none; flex-basis: 100%; flex-direction: column; gap: 4px; padding-top: 12px; }
  .navtoggle:checked ~ .navlinks { display: flex; }
  .sidebar .spacer, .sidebar .pend { display: none; }
  .sidebar .who { margin-top: 8px; padding-top: 12px; border-top: 1px solid #202b2e; }
  .topbar { height: auto; min-height: 44px; padding: 8px 16px; }
  .crumbs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .tag-ejemplo { display: none; }
  .content { padding: 16px; gap: 16px; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 28px; line-height: 34px; }
  table.tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .login { grid-template-columns: 1fr; }
  .login .photo { display: none; }
}
}

/* Etiquetas de color (tipo Bridge) */
.labelbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lbtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--surface-raised); color: var(--ink); font: 600 13px var(--font-body); cursor: pointer; }
.lbtn:hover { background: var(--surface-muted); }
.lbtn i, .ldot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.ldot { margin-right: 6px; }
.lbtn kbd { font: 500 10px var(--font-mono); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.jgrid.selectable .sel { position: absolute; z-index: 2; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid #fff; background: rgba(10, 19, 21, .35); box-shadow: 0 0 0 1px rgba(10, 19, 21, .3); cursor: pointer; opacity: 0; transition: opacity var(--duration-fast); }
.jgrid.selectable .jitem:hover .sel, .jgrid.selectable .jitem.selected .sel, .jgrid.selectable .sel:focus-visible { opacity: 1; }
.jgrid.selectable .jitem.selected .sel { background: var(--brand); border-color: var(--brand); }
.jgrid.selectable .jitem.selected .sel::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.jgrid.selectable .jitem.selected .jframe { outline: 3px solid var(--brand); outline-offset: 2px; }
.clabel { position: absolute; z-index: 2; top: 8px; right: 8px; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.clabel:not([style*="background"]) { display: none; }
.b-cambios_cliente { background: var(--danger-bg); color: var(--danger); }
.b-en_acabado { background: var(--brand-wash); color: var(--brand-text); }

/* Orbe de espera (respaldo sin React del sistema de diseño) */
.orb { display: inline-block; width: 20px; height: 20px; border-radius: 50%; vertical-align: middle; background: radial-gradient(circle, var(--brand-text) 1.2px, transparent 1.6px) 0 0 / 5px 5px; -webkit-mask: radial-gradient(circle, #000 55%, transparent 70%); mask: radial-gradient(circle, #000 55%, transparent 70%); animation: orb 1.6s ease-in-out infinite; }
@keyframes orb { 50% { opacity: .55; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* Cifras de tiempos */
.kpi-card { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.kpi-card .overline { margin: 0 0 4px; }
.kpi-v { font: 500 28px/34px var(--font-display); letter-spacing: -.5px; color: var(--ink); }

/* Cercador de la biblioteca: graella fixa, cap camp trepitja l'altre */
.libsearch { display: grid; grid-template-columns: minmax(200px, 2fr) 80px minmax(180px, 1.5fr) minmax(150px, 1fr) minmax(150px, 1fr); gap: 12px; align-items: end; }
.libsearch .field { margin: 0; min-width: 0; }
.libsearch input, .libsearch select { width: 100%; box-sizing: border-box; height: 42px; margin: 0; }
@media (max-width: 1100px) { .libsearch { grid-template-columns: 1fr 80px 1fr; } .libsearch .f-q { grid-column: 1 / -1; } }
@media (max-width: 640px) { .libsearch { grid-template-columns: 1fr; } }

/* Filtres sense recarregar (live_filters.js) */
.js .js-hide { display: none; }
.live-results { transition: opacity .15s ease; }
.live-results.is-loading { opacity: .45; pointer-events: none; }
.live-more { height: 1px; }
.jitem.skel .jframe { background: var(--surface-muted); border-radius: 2px; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .live-results { transition: none; } .jitem.skel .jframe { animation: none; } }
.liblist { margin-top: 12px; }
.liblist summary { cursor: pointer; color: var(--brand-text); font-weight: 600; }
.liblist textarea { width: 100%; box-sizing: border-box; margin-top: 8px; font-size: 13px; }

/* Biblioteca: barra de selecció fixa a baix (galeria = selecció) */
.selbar { position: sticky; bottom: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface-raised); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(18, 24, 27, 0.12); }
.selbar[hidden] { display: none; }
.selbar .selcount { font-size: 14px; color: var(--ink); }
.selbar .selspacer { flex: 1; }
@media (max-width: 640px) { .selbar .selspacer { flex-basis: 100%; height: 0; } .selbar { border-radius: 12px 12px 0 0; margin: 16px -16px -16px; } }
/* Exportar: miniatures de la selecció i formats amb avisos */
.selthumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.selthumbs figure { margin: 0; width: 84px; position: relative; }
.selthumbs img { width: 84px; height: 105px; object-fit: contain; background: var(--surface-muted); border-radius: 2px; display: block; }
.selthumbs figcaption { font-size: 10px; line-height: 14px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selthumbs .vbadge { position: absolute; top: 4px; left: 4px; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: rgba(10, 19, 21, .8); color: #fff; }
.notice { background: var(--warning-bg); color: var(--warning); border-radius: 8px; padding: 12px 16px; font-size: 14px; }
label.fmt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); margin: 0; cursor: pointer; }
label.fmt input { margin-top: 3px; }
label.fmt b { color: var(--ink); }
label.fmt .fmt-lines { display: block; margin-top: 4px; }
label.fmt.fmt-off { cursor: default; opacity: .75; }

/* Graelles: un fill amb una taula o text llarg no pot eixamplar la columna (ni la pàgina al mòbil) */
.cards > * { min-width: 0; }
.morefilt, .morefilt-btn { display: none; }
@media (max-width: 640px) {
  /* Biblioteca al mòbil: el cercador a la vista; els altres filtres, a «Más filtros» */
  .morefilt-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; margin-top: 10px; border: 1px solid var(--border-control); border-radius: 8px; color: var(--ink); font-weight: 600; cursor: pointer; }
  .morefilt:checked + .morefilt-btn { background: var(--surface-muted); }
  .libsearch .field:not(.f-q), .liblist { display: none; }
  .libsearch-opts label.small { display: none; }
  .morefilt:checked ~ .libsearch .field, .morefilt:checked ~ .liblist { display: block; }
  .morefilt:checked ~ .libsearch-opts label.small { display: flex; }
  .libsearch { order: -1; }
  form[data-live] { display: flex; flex-direction: column; }
  .morefilt-btn { align-self: flex-start; order: 0; }
  .libsearch-opts { order: 1; justify-content: flex-end; }
  /* fitxes de la galeria: menys text */
  .jitem .jlot { display: none; }  /* lot i data: al visor */
  .jmeta, .jmeta2 { font-size: 11px; }
  .page-head .actions .btn { height: 34px; }
}

/* Pestanyes de la fitxa del lot (una per etapa) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #d7dfe2); margin: 8px 0 16px; overflow-x: auto; }
.tabs .tab { padding: 10px 16px; color: var(--muted, #4c565b); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs .tab:hover { color: var(--ink, #12181b); }
.tabs .tab.active { color: var(--ink, #12181b); border-bottom-color: var(--brand-ink, #087c8e); font-weight: 600; }

/* Mòbil: menys filtres a la vista (Pau). Les etiquetes de color van amb tecles (5–9) i no hi són; els filtres
   d'estat, d'etapa i de lots en una sola línia que es desplaça de costat. */
@media (max-width: 640px) {
  .labelbar .lbtn, .labelbar #selCount, .labelbar a.chip { display: none; }
  .labelbar { flex-wrap: nowrap; justify-content: flex-end; }
  .filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chip { flex: 0 0 auto; }
}

/* Full de preproducció (static/js/preprod.js) */

/* Planning (static/js/planning.js): el mateix disseny que el mockup */
.sr-only { position: absolute; left: -9999px; }
.pl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -8px 0 10px; }
.pl-head h1 { margin: 0 8px 0 0; font-size: 26px; }
.pl-seg { display: flex; border: 1px solid #8a969b; border-radius: 8px; overflow: hidden; }
.pl-seg a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; background: #fff; color: #12181b; font-weight: 600; font-size: 13px; text-decoration: none; }
.pl-seg a[aria-current] { background: #12181b; color: #fff; }
.pl-filter { height: 34px; width: 220px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 400 13px var(--font-body); }
.pl-modes { display: flex; gap: 6px; }
.pl-modes button, .pl-btn { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 12px var(--font-body); cursor: pointer; }
.pl-modes button[aria-pressed="true"] { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.pl-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #3f7d1b; }
.pl-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3f7d1b; }
.pl-map { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; }
.pl-map button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; white-space: nowrap; cursor: pointer; font: 600 12px var(--font-body); border: 1px solid #cfd8db; background: #fff; color: #12181b; }
.pl-map button.on { border-color: #12181b; background: #12181b; color: #fff; }
.pl-map i, .pl-colh i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.pl-colh i { width: 10px; height: 10px; border-radius: 3px; }
.pl-board { display: flex; gap: 12px; overflow-x: auto; padding: 0 0 12px; align-items: flex-start; cursor: grab; user-select: none; touch-action: pan-y; }
.pl-board.pl-panning, .pl-cal.pl-panning { cursor: grabbing; }
.pl-col { flex: 0 0 260px; height: calc(100vh - 230px); min-height: 420px; display: flex; flex-direction: column; background: #edf1f3; border-radius: 12px; padding: 10px 6px 10px 10px; box-sizing: border-box; }
.pl-col.pl-over { background: #edf8fa; box-shadow: inset 0 0 0 2px #087c8e; }
.pl-colh { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-size: 13px; }
.pl-colh b { color: #12181b; }
.pl-n, .pl-hint { font-size: 12px; color: #66737a; }
.pl-hint { font-size: 11px; }
.pl-order { padding: 0 4px 8px; font-size: 11px; color: #66737a; }
.pl-order b { color: #12181b; }
.pl-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; min-height: 40px; }
.pl-card, .pl-ccard { background: #fff; border: 1px solid #e4ebed; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; cursor: grab; flex: none; box-shadow: 0 1px 2px rgba(18,24,27,.06); font-size: 13px; }
.pl-card:hover { border-color: #cfd8db; }
.pl-card:focus { outline: 2px solid #087c8e; outline-offset: 1px; }
.pl-card-late { border-color: #9b1c1c; background: #fbecec; }
.pl-src { opacity: .35; }
.pl-ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; box-shadow: 0 12px 32px rgba(18,24,27,.22); opacity: .95; }
body.pl-dragging, body.pl-dragging * { cursor: grabbing !important; }
.pl-marker { height: 3px; margin: -4px 0; background: #087c8e; border-radius: 2px; flex: none; }
.pl-crow { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.pl-crow b { font: 500 12px var(--font-mono); color: #12181b; }
.pl-crow i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.pl-urg { color: #d97706; font-size: 11px; letter-spacing: 1px; }
.pl-cclient { color: #12181b; font-weight: 600; font-size: 13px; }
.pl-parent { font-size: 11px; color: #d97706; font-weight: 600; }
.pl-cinfo { font-size: 12px; color: #4c565b; }
.pl-cdates { display: flex; gap: 10px; margin-top: 4px; font-size: 11px; color: #66737a; }
.pl-cdates b { color: #12181b; }
.pl-red { color: #9b1c1c !important; }
.pl-clabels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pl-lab { font: 600 11px var(--font-mono); letter-spacing: .8px; padding: 2px 7px; border-radius: 4px; }
.pl-lab-s { font-size: 10px; padding: 1px 6px; }
.pl-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: #0f1a1e; color: #fff; font-size: 13px; box-shadow: 0 12px 32px rgba(18,24,27,.25); }
.pl-toast[hidden] { display: none; }
.pl-toast button { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #5fe3f0; background: transparent; color: #5fe3f0; font: 600 12px var(--font-body); cursor: pointer; }
.pl-calwrap { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; overflow: hidden; }
.pl-calhead, .pl-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, .4fr)); }
.pl-calhead { border-bottom: 1px solid #cfd8db; }
.pl-calhead div { padding: 8px 10px; font: 500 11px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; }
.pl-cal { height: calc(100vh - 250px); min-height: 480px; overflow-y: auto; cursor: grab; user-select: none; }
.pl-day { min-height: 132px; padding: 6px; border-bottom: 1px solid #e4ebed; border-left: 1px solid #e4ebed; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; }
.pl-day.pl-we { background: #f3f7f8; }
.pl-day.pl-over { background: #edf8fa; box-shadow: inset 0 0 0 2px #087c8e; }
.pl-dnum { font: 600 12px var(--font-body); color: #12181b; }
.pl-we .pl-dnum { color: #5f6b70; }
.pl-dnum.pl-today { display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #087c8e; color: #fff; }
.pl-ccard { padding: 4px 6px; border-radius: 6px; font-size: 12px; }
.pl-ccard .pl-crow b { font-size: 11px; }
.pl-ccard .pl-cclient { font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ccard .pl-cinfo { font-size: 11px; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12px; color: #4c565b; }
.pl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pl-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pl-legend .pl-legend-late { width: 12px; height: 12px; background: #fbecec; border: 1px solid #9b1c1c; }
.pl-detail { position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 100%; background: #fff; border-left: 1px solid #cfd8db; box-shadow: -16px 0 40px rgba(18,24,27,.12); display: flex; flex-direction: column; z-index: 30; }
.pl-detail[hidden] { display: none; }
.pl-dhead { display: flex; align-items: center; gap: 8px; padding: 16px 20px 0; }
.pl-dhead b { font: 500 14px var(--font-mono); color: #12181b; }
.pl-stagepill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: #edf1f3; color: #12181b; font: 600 12px var(--font-body); }
.pl-stagepill i { width: 8px; height: 8px; border-radius: 2px; }
.pl-x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #cfd8db; background: #fff; color: #12181b; font: 600 16px var(--font-body); cursor: pointer; }
.pl-dclient { margin: 6px 20px 0; font-family: var(--font-display); font-weight: 500; font-size: 24px; color: #12181b; }
.pl-detail > .pl-parent { margin: 2px 20px 0; font-size: 13px; }
.pl-dbody { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 18px; border-top: 1px solid #e4ebed; margin-top: 12px; }
.pl-dbody .overline { margin: 0 0 8px; }
.pl-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pl-dates label { border: 1px solid #e4ebed; border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; margin: 0; }
.pl-dates label span { font: 500 10px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; }
.pl-dates input { border: 0; padding: 0; height: 24px; font-weight: 600; color: #12181b; background: transparent; }
.pl-dates .pl-due { border-color: #087c8e; }
.pl-dates .pl-late { background: #fbecec; border-color: #9b1c1c; }
.pl-stars button { border: 0; background: none; color: #d97706; font-size: 22px; cursor: pointer; padding: 0 2px; }
.pl-prog { margin-bottom: 8px; }
.pl-prog div { display: flex; justify-content: space-between; font-size: 13px; }
.pl-prog b { color: #12181b; }
.pl-prog i { display: block; height: 6px; background: #edf1f3; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.pl-prog u { display: block; height: 100%; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pl-chipx { border: 0; background: none; padding: 0; cursor: pointer; font: 600 11px var(--font-mono); color: #4c565b; }
.pl-addlab { height: 26px; padding: 0 10px; border-radius: 6px; border: 1px dashed #8a969b; background: #fff; color: #087c8e; font: 600 12px var(--font-body); cursor: pointer; }
.pl-labpop { margin-top: 8px; border: 1px solid #cfd8db; border-radius: 10px; padding: 10px; box-shadow: 0 8px 24px rgba(18,24,27,.10); }
.pl-labpop input { width: 100%; box-sizing: border-box; height: 32px; }
.pl-sub { margin: 8px 0 4px; font: 500 10px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; }
.pl-swatches { display: flex; gap: 4px; }
.pl-swatches button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd8db; cursor: pointer; }
.pl-team { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; margin: 0; }
.pl-team dt { color: #66737a; }
.pl-team dd { margin: 0; color: #12181b; }
.pl-comments { display: flex; flex-direction: column; gap: 10px; }
.pl-comment { border: 1px solid #e4ebed; border-radius: 10px; padding: 10px 12px; }
.pl-comment div { font-size: 12px; color: #66737a; }
.pl-comment div b { color: #12181b; }
.pl-comment p { margin: 4px 0 0; font-size: 14px; line-height: 21px; color: #12181b; white-space: pre-wrap; }
.pl-shot { display: block; max-width: 220px; max-height: 160px; margin-top: 8px; border-radius: 4px; border: 1px solid #cfd8db; }
.pl-compose { margin-top: 10px; border: 1px solid #8a969b; border-radius: 8px; overflow: hidden; }
.pl-compose textarea { display: block; width: 100%; box-sizing: border-box; border: 0; padding: 10px 12px; font: 400 14px var(--font-body); resize: vertical; }
.pl-composebar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-top: 1px solid #e4ebed; background: #f3f7f8; }
.pl-history { margin-top: 8px; font-size: 12px; line-height: 20px; color: #4c565b; }
.pl-dfoot { padding: 12px 20px; border-top: 1px solid #e4ebed; display: flex; flex-wrap: wrap; gap: 8px; }
.pl-dfoot form { margin: 0; }
.pl-ccard .pl-crow { justify-content: flex-start; }
.pl-ccard .pl-urg { margin-left: auto; }
.pl-calhead { padding-right: 15px; }
.pl-est { border: 1px solid #e4ebed; border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.pl-est span { font: 500 10px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; }
.pl-est b { height: 24px; line-height: 24px; color: #12181b; }

/* Seguiment de revelat (static/js/revelat.js): com el mockup */
.rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -8px 0 12px; }
.rv-head h1 { margin: 0 8px 0 0; font-size: 26px; }
.rv-q { flex: 1 1 220px; max-width: 320px; height: 34px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 400 13px var(--font-body); }
.rv-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rv-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: #fff; border: 1px solid #cfd8db; font: 600 12px var(--font-body); color: #12181b; }
.rv-chip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.rv-lots { display: flex; flex-direction: column; gap: 10px; }
.rv-lot { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 12px 16px; }
.rv-lot.rv-end { background: #fbecec; border-color: #e8a3a3; }
.rv-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rv-id { min-width: 220px; }
.rv-id > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.rv-id b { color: #12181b; letter-spacing: .4px; }
.rv-id .mono { font: 500 13px var(--font-mono); color: #12181b; }
.rv-sub { font-size: 12px; color: #66737a; }
.rv-stars { display: inline-flex; }
.rv-star { width: 22px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; }
.rv-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 12px var(--font-body); text-decoration: none; cursor: pointer; }
.rv-teal { border-color: #087c8e; color: #087c8e; }
.rv-fin { border-color: #9b1c1c; color: #9b1c1c; }
.rv-fin[aria-pressed="true"] { background: #9b1c1c; color: #fff; }
.rv-hide { border-color: #cfd8db; color: #66737a; }
.rv-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #cfd8db; }
.rv-part { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid #e4ebed; border-radius: 8px; background: #fff; }
.rv-part .mono { min-width: 22px; text-align: center; font: 600 11px var(--font-mono); color: #12181b; }
.rv-redo { font: 600 11px var(--font-body); color: #8a5300; background: #fff4e0; border-radius: 999px; padding: 1px 8px; }
.rv-part select { height: 28px; width: auto; border: 0; border-radius: 6px; padding: 0 6px; font: 600 11px var(--font-body); letter-spacing: .3px; text-transform: uppercase; }
.rv-more { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px dashed #087c8e; background: #edf8fa; color: #087c8e; font: 600 12px var(--font-body); cursor: pointer; }

/* Feedback (static/js/feedback.js): com el mockup */
.fb-kpis { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 12px 0 16px; }
.fb-kpi { flex: 1 1 140px; background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 12px 16px; }
.fb-kpi b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 28px; color: #12181b; }
.fb-kpi span { font-size: 13px; }
.fb-new { align-self: center; }
.fb-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.fb-list { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fb-card { background: #fff; border: 1px solid #e4ebed; border-left: 4px solid #8a5300; border-radius: 12px; padding: 14px 16px; }
.fb-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-top b { color: #12181b; }
.fb-pill { font: 600 11px var(--font-body); padding: 2px 8px; border-radius: 999px; background: #edf1f3; color: #12181b; }
.fb-bar { height: 5px; background: #edf1f3; border-radius: 3px; overflow: hidden; margin: 8px 0; }
.fb-bar u { display: block; height: 100%; background: #3f7d1b; }
.fb-item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid #f3f7f8; margin: 0; cursor: pointer; }
.fb-th { width: 40px; height: 40px; object-fit: contain; background: #f3f7f8; border-radius: 2px; }
.fb-item input { width: 18px; height: 18px; accent-color: #3f7d1b; }
.fb-item .mono { font: 500 12px var(--font-mono); color: #12181b; min-width: 140px; }
.fb-done { opacity: .5; }
.fb-done .mono { text-decoration: line-through; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fb-actions form { margin: 0; }
.fb-ok { background: #3f7d1b; color: #fff; border: 0; }
.fb-muted { color: #66737a; border-color: #cfd8db; }
.fb-new-panel { flex: 1 1 360px; min-width: 300px; background: #fff; border: 1px solid #087c8e; border-radius: 12px; padding: 16px 20px; }
.fb-new-panel[hidden] { display: none; }
.fb-new-panel h2 { font-size: 20px; }
.fb-new-panel textarea, .fb-new-panel input[name="reason"] { width: 100%; box-sizing: border-box; }
.fb-label { margin: 14px 0 6px; }
.fb-opts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fb-opts[hidden] { display: none; }
.fb-opts button { height: 34px; padding: 0 12px; border-radius: 8px; cursor: pointer; font: 600 12px var(--font-body); border: 1px solid #8a969b; background: #fff; color: #12181b; }
.fb-opts button[aria-pressed="true"] { border-color: #12181b; background: #12181b; color: #fff; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fb-chip { font: 500 12px var(--font-mono); padding: 3px 8px; border-radius: 6px; background: #edf8fa; color: #087c8e; }
.fb-new-panel input[name="reason"] { height: 34px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 400 13px var(--font-body); }
.fb-new-panel textarea { border: 1px solid #8a969b; border-radius: 8px; padding: 8px 10px; font: 400 13px var(--font-body); }

/* Checkout (static/js/checkout.js): com el mockup */
.co-card { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 14px 20px; margin-bottom: 16px; }
.co-pickup { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.co-pickup label { margin: 0; }
.co-pickup input, .co-pickup select { height: 34px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 400 13px var(--font-body); width: 100%; box-sizing: border-box; }
.co-lbl { display: block; font: 500 10px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; margin-bottom: 4px; }
.co-lbl-big { font-size: 11px; letter-spacing: 2.4px; margin-bottom: 6px; }
.co-lbl b { color: #087c8e; }
.co-lots { display: flex; gap: 6px; flex-wrap: wrap; }
.co-lot { display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border: 1px solid #087c8e; border-radius: 8px; background: #edf8fa; font: 500 12px var(--font-mono); color: #12181b; }
.co-scanrow { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; }
.co-scan { width: 100%; box-sizing: border-box; height: 52px; border: 2px solid #087c8e; border-radius: 10px; padding: 0 14px; font: 500 20px var(--font-mono); color: #12181b; }
.co-count { font-size: 13px; }
.co-count b { font-family: var(--font-display); font-weight: 500; font-size: 26px; color: #12181b; }
.co-count span { font-size: 16px; color: #66737a; }
.co-last { margin-top: 10px; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.co-ok { background: #eef6e7; color: #3f7d1b; }
.co-bad { background: #fbecec; color: #9b1c1c; }
.co-boxes { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 6px; margin-bottom: 16px; }
.co-box { flex: 0 0 280px; min-height: 260px; background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 12px; box-sizing: border-box; }
.co-box.co-active { border: 2px solid #087c8e; background: #f7fcfd; }
.co-box.co-loose { background: #f3f7f8; border-style: dashed; }
.co-boxh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.co-boxh b { color: #12181b; }
.co-name { width: 110px; height: 28px; border: 1px solid #cfd8db; border-radius: 6px; padding: 0 6px; font: 600 13px var(--font-body); color: #12181b; }
.co-act { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #087c8e; background: #fff; color: #087c8e; font: 600 12px var(--font-body); cursor: pointer; }
.co-active .co-act { background: #087c8e; color: #fff; }
.co-items { display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.co-item { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid #e4ebed; border-radius: 6px; background: #fff; cursor: grab; font-size: 12px; }
.co-item .mono { font: 500 12px var(--font-mono); color: #12181b; }
.co-flash { animation: coflash 1.2s ease-out; }
@keyframes coflash { from { background: #d9f2c8; border-color: #3f7d1b; } to { background: #fff; } }
.co-red { color: #9b1c1c; font-weight: 600; }
.co-boxf { display: flex; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #e4ebed; }
.co-undo { border: 1px solid #9b1c1c; color: #9b1c1c; background: #fff; }
.co-new { flex: 0 0 160px; height: 120px; border-radius: 12px; border: 2px dashed #087c8e; background: #fff; color: #087c8e; font: 600 15px var(--font-body); cursor: pointer; }
.co-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.co-item span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.co-extra { cursor: default; background: #fdf6f6; border-style: dashed; }
.co-extrabtn { margin-top: 6px; width: 100%; justify-content: center; }
.co-item .mono { flex: none; }

/* Check-in (static/js/checkin.js): com el mockup */
.ci-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.ci-step { display: flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfd8db; background: #fff; color: #4c565b; font-weight: 600; font-size: 14px; text-decoration: none; }
.ci-step.ci-done { color: #3f7d1b; }
.ci-step.ci-on { background: #087c8e; border-color: #087c8e; color: #fff; }
.ci-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ci-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ci-side { flex: 1 1 320px; min-width: 280px; display: flex; flex-direction: column; gap: 16px; }
.ci-card { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 18px 20px; margin: 0; }
.ci-scan { padding: 20px 24px; }
.ci-list { padding: 16px 0 8px; }
.ci-lbl { display: block; margin: 0 0 6px; font: 500 11px/16px var(--font-mono); letter-spacing: 2.4px; text-transform: uppercase; color: #66737a; }
.ci-scanrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ci-code { width: 100%; box-sizing: border-box; height: 56px; border: 2px solid #087c8e; border-radius: 10px; padding: 0 16px; font: 500 22px var(--font-mono); color: #12181b; }
.ci-box { height: 56px; border: 1px solid #8a969b; border-radius: 10px; padding: 0 14px; font: 600 16px var(--font-body); color: #12181b; background: #fff; }
.ci-go { height: 56px; padding: 0 20px; border-radius: 10px; border: 0; background: #087c8e; color: #fff; font: 600 16px var(--font-body); cursor: pointer; }
.ci-last { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 10px; color: #12181b; }
.ci-rt { font: 600 18px var(--font-body); }
.ci-rd { color: #4c565b; }
.ci-r-ok { background: #eef6e7; } .ci-r-ok .ci-rt { color: #3f7d1b; }
.ci-r-amber { background: #fff4e0; } .ci-r-amber .ci-rt { color: #8a5300; }
.ci-r-red { background: #fbecec; } .ci-r-red .ci-rt { color: #9b1c1c; }
.ci-b { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 14px var(--font-body); text-decoration: none; cursor: pointer; }
.ci-b-main { border: 0; background: #087c8e; color: #fff; }
.ci-pick { height: 36px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 8px; font: 500 13px var(--font-body); max-width: 320px; }
.ci-queue { margin: 10px 0 0; font-size: 13px; color: #8a5300; }
.ci-counts { display: flex; flex-wrap: wrap; gap: 24px; align-items: baseline; padding: 0 24px 12px; }
.ci-counts b { font-family: var(--font-display); font-weight: 500; font-size: 28px; color: #12181b; }
.ci-counts b.ci-red { color: #9b1c1c; }
.ci-counts b.ci-amber { color: #8a5300; }
.ci-counts span { font-size: 18px; color: #66737a; }
.ci-counts small { font-size: 13px; }
.ci-filter { display: flex; gap: 6px; }
.ci-filter button { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 13px var(--font-body); cursor: pointer; }
.ci-filter button[aria-pressed="true"] { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.ci-bar { height: 6px; margin: 0 24px 12px; background: #edf1f3; border-radius: 3px; overflow: hidden; }
.ci-bar div { height: 100%; width: 0; background: #087c8e; transition: width .2s; }
.ci-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.ci-table th { text-align: left; padding: 8px 10px; border-bottom: 1px solid #cfd8db; font: 500 11px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; }
.ci-table td { padding: 10px; border-bottom: 1px solid #e4ebed; color: #12181b; }
.ci-table th:first-child, .ci-table td:first-child { padding-left: 24px; }
.ci-table th:last-child, .ci-table td:last-child { padding-right: 24px; }
.ci-table td:nth-child(2) { color: #66737a; }
.ci-mono { font: 500 13px var(--font-mono); color: #12181b; }
.ci-muted { color: #66737a; }
.ci-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12px var(--font-body); }
.ci-s-ok { background: #eef6e7; color: #3f7d1b; }
.ci-s-amber { background: #fff4e0; color: #8a5300; }
.ci-s-red { background: #fbecec; color: #9b1c1c; }
.ci-s-grey { background: #edf1f3; color: #4c565b; }
.ci-flash { animation: ciflash 1.2s ease-out; }
@keyframes ciflash { from { background: #d9f2c8; } to { background: transparent; } }
.ci-empty { padding: 12px 24px; margin: 0; font-size: 14px; }
.ci-hint { margin: 0 0 10px; font-size: 13px; line-height: 20px; color: #66737a; }
.ci-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ci-photos a, .ci-photos button { aspect-ratio: 1; border-radius: 2px; overflow: hidden; background: #edf1f3; display: block; }
.ci-photos img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ci-photos button { border: 1px dashed #8a969b; background: #fff; color: #087c8e; font: 600 22px var(--font-body); cursor: pointer; }
.ci-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; align-items: center; }
.ci-grid > :nth-child(odd) { color: #66737a; margin: 0; }
.ci-grid input { height: 34px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 500 13px var(--font-mono); }
.ci-strong { color: #12181b; }
.ci-grid .ci-mono { font-size: 12px; word-break: break-all; }
.ci-notel { display: block; margin: 14px 0 6px; font-size: 14px; color: #12181b; font-weight: 600; }
.ci-card textarea { width: 100%; box-sizing: border-box; border: 1px solid #8a969b; border-radius: 8px; padding: 8px 10px; font: 400 14px var(--font-body); }
.ci-check { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 14px; color: #12181b; }
.ci-check input { margin-top: 4px; accent-color: #087c8e; }
.ci-warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fbecec; color: #9b1c1c; font-size: 13px; line-height: 20px; }
.ci-closed { margin: 12px 0 0; font-size: 13px; color: #3f7d1b; font-weight: 600; }
.ci-close { margin-top: 14px; width: 100%; height: 44px; border-radius: 8px; border: 0; background: #087c8e; color: #fff; font: 600 15px var(--font-body); cursor: pointer; }

/* Precheck de l'Excel (static/js/precheck.js): com el mockup */
.pc-excel { flex: 1 1 360px; min-width: 300px; padding: 20px 24px; }
.pc-checkbox { flex: 999 1 560px; min-width: 0; padding: 20px 24px; }
.pc-drop { border: 1px dashed #8a969b; border-radius: 10px; padding: 18px; text-align: center; }
.pc-drop.pc-over { border-color: #087c8e; background: #edf8fa; }
.pc-fname { margin: 0; color: #12181b; font-weight: 600; word-break: break-all; }
.pc-sub { margin: 4px 0 12px; font-size: 13px; line-height: 20px; color: #4c565b; }
.pc-foot .pc-sub, .pc-excel > .pc-sub { margin: 0; color: #66737a; }
.pc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-center { justify-content: center; }
.pc-b { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 13px var(--font-body); cursor: pointer; }
.pc-drop .pc-b { height: 36px; padding: 0 14px; font-size: 14px; }
.pc-b.pc-on { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.pc-paste { width: 100%; box-sizing: border-box; margin-top: 10px; border: 2px solid #087c8e; border-radius: 8px; padding: 8px; font: 400 13px var(--font-mono); }
.pc-err { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fbecec; color: #9b1c1c; font-size: 13px; }
.pc-h { margin: 18px 0 8px; font-weight: 600; color: #12181b; font-size: 14px; }
.pc-cols { width: 100%; border-collapse: collapse; font-size: 14px; }
.pc-cols td { padding: 6px 0; border-top: 1px solid #e4ebed; }
.pc-cols td:last-child { text-align: right; white-space: nowrap; padding-left: 8px; }
.pc-cols td:first-child { padding-right: 8px; word-break: break-word; }
.pc-cols select { width: 100%; }
.pc-cols select, .pc-checkbox select { height: 30px; border: 1px solid #8a969b; border-radius: 6px; font: 500 13px var(--font-body); max-width: 220px; }
.pc-mono { font: 500 12px var(--font-mono); color: #12181b; }
.pc-okc { color: #3f7d1b; font-weight: 600; }
.pc-muted { color: #66737a; }
.pc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pc-table th { text-align: left; padding: 8px 0; border-bottom: 1px solid #cfd8db; font: 500 11px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; }
.pc-table th:nth-child(2) { padding: 8px 10px; }
.pc-table td { padding: 12px 0; border-bottom: 1px solid #e4ebed; vertical-align: top; }
.pc-table tr:last-child td { border-bottom: 0; }
.pc-table td:first-child .pc-sub { display: inline; margin: 0; }
.pc-n { padding: 12px 10px !important; font-family: var(--font-display); font-weight: 500; color: #12181b; }
.pc-red { color: #9b1c1c; } .pc-amber { color: #8a5300; } .pc-teal { color: #087c8e; }
.pc-blue { color: #1f5fa8; } .pc-grey { color: #4c565b; } .pc-green { color: #3f7d1b; }
.ci-counts b.pc-green { color: #3f7d1b; }
.pc-block { display: block; margin-top: 4px; font-size: 12px; color: #9b1c1c; }
.pc-note, .pc-small { font-size: 12px; line-height: 18px; color: #4c565b; }
.pc-note { display: block; margin-top: 4px; }
.pc-line { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; }
.pc-line input { height: 30px; border: 1px solid #8a969b; border-radius: 6px; padding: 0 8px; font: 500 12px var(--font-mono); width: 170px; }
.pc-list { margin-top: 6px; font: 500 12px/18px var(--font-mono); color: #12181b; max-height: 160px; overflow: auto; }
.pc-link { border: 0; background: none; padding: 0; color: #087c8e; font: 600 13px var(--font-body); cursor: pointer; }
.pc-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.pc-save { height: 42px; padding: 0 18px; border-radius: 8px; border: 0; background: #087c8e; color: #fff; font: 600 15px var(--font-body); cursor: pointer; }
.pc-save:disabled { background: #8a969b; cursor: not-allowed; }
.pc-hand { margin-top: 14px; }
.pc-handt { border-collapse: collapse; font-size: 13px; min-width: 520px; width: 100%; }
.pc-handt th { text-align: left; padding: 4px 4px; font: 500 10px var(--font-mono); letter-spacing: 1.2px; text-transform: uppercase; color: #66737a; }
.pc-handt td { padding: 2px; }
.pc-handt input { width: 100%; box-sizing: border-box; height: 30px; border: 1px solid #cfd8db; border-radius: 6px; padding: 0 6px; font: 400 13px var(--font-body); }
.pc-handt input:focus { border-color: #087c8e; outline: 2px solid #087c8e33; }
.ci-tall { height: 56px; border-radius: 10px; }
.ci-new { margin-top: 14px; padding: 14px 16px; border: 1px solid #cfd8db; border-radius: 10px; background: #f7fafb; }
.ci-newrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ci-newrow label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #66737a; flex: 1 1 140px; margin: 0; }
.ci-newrow input { height: 36px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 400 14px var(--font-body); color: #12181b; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.msg-files a { width: 84px; height: 84px; border-radius: 2px; overflow: hidden; background: #edf1f3; display: block; }
.msg-files img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ci-qs { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; margin-bottom: 10px; }
.ci-q { padding: 8px 10px; border-radius: 8px; background: #f3f7f8; font-size: 13px; }
.ci-q.ci-qc { background: #edf8fa; }
.ci-qform select, .ci-qform textarea { width: 100%; box-sizing: border-box; border: 1px solid #8a969b; border-radius: 8px; font: 400 14px var(--font-body); }
.ci-qform select { height: 34px; padding: 0 8px; margin-bottom: 8px; }
.ci-qform textarea { padding: 8px 10px; }
.ci-qrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* Llista de lots de l'equip (lots_team.html) */
.lt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.lt-stage { white-space: nowrap; font-size: 13px; color: #12181b; }
.lt-code { font: 500 14px var(--font-mono); }
.lt-late { color: #9b1c1c; font-weight: 600; }
.lt-new { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.lt-new .field { margin: 0; flex: 1 1 200px; }

/* Mostres d'un lot (static/js/samples_lot.js): com el mockup */
.sm-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 14px; }
.sm-h1 { margin: 0; font: 500 22px var(--font-display); color: #12181b; }
.sm-seg { display: inline-flex; border: 1px solid #cfd8db; border-radius: 8px; overflow: hidden; }
.sm-seg button { height: 34px; padding: 0 12px; border: 0; background: #fff; color: #4c565b; font: 600 13px var(--font-body); cursor: pointer; }
.sm-seg button[aria-pressed="true"] { background: #12181b; color: #fff; }
.sm-seg button:disabled { color: #a2a5a7; cursor: not-allowed; }
.sm-card { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 14px 20px; margin: 0 0 16px; }
.sm-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sm-lbl { display: block; font: 500 10px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; margin: 0 0 2px; }
.sm-lbl2 { margin: 0 0 4px; font: 500 11px var(--font-mono); letter-spacing: 2.4px; text-transform: uppercase; color: #66737a; }
.sm-pill { display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border: 1px solid #cfd8db; border-radius: 8px; font-size: 12px; color: #12181b; }
.sm-crit select, .sm-crit input { width: auto; height: 34px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 8px; font: 500 13px var(--font-body); box-sizing: border-box; margin: 0; }
.sm-crit .sm-cond { display: inline-flex; gap: 2px; margin-right: 6px; }
.sm-inline { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.sm-note { font-size: 12px; line-height: 18px; color: #66737a; }
.sm-b { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 13px var(--font-body); cursor: pointer; }
.sm-b.sm-main { border: 0; background: #087c8e; color: #fff; }
.sm-b:disabled { opacity: .5; cursor: not-allowed; }
.sm-b[aria-pressed="true"] { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.sm-cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.sm-cov { flex: 999 1 640px; min-width: 0; padding: 16px 20px; }
.sm-side { flex: 1 1 340px; min-width: 300px; padding: 16px 20px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; }  /* les alternatives es recorren sense moure la pàgina */
.sm-counts { display: flex; flex-wrap: wrap; gap: 24px 12px; align-items: baseline; margin-bottom: 14px; }
.sm-counts b { font: 500 28px var(--font-display); color: #12181b; }
.sm-counts span { font-size: 16px; color: #66737a; }
.sm-counts small { font-size: 13px; }
.sm-amber { color: #8a5300 !important; } .sm-green { color: #3f7d1b; } .sm-red { color: #9b1c1c; }
.sm-prod { border-top: 1px solid #e4ebed; padding: 12px 0; }
.sm-ptitle { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sm-ptitle b { font: 500 13px var(--font-mono); color: #12181b; }
.sm-ptitle span { font-size: 12px; color: #66737a; }
.sm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sm-tile { display: block; padding: 6px; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; border: 2px solid #e4ebed; }
.sm-tile.sm-on { border-color: #087c8e; }
.sm-th { display: flex; justify-content: space-between; font: 600 11px var(--font-mono); color: #12181b; }
.sm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 6px; }
.sm-ph { position: relative; display: block; aspect-ratio: 4 / 5; background: #edf1f3; border-radius: 2px; overflow: hidden; }
.sm-pair .sm-ph + .sm-ph { background: #dfe7ea; }
.sm-ph img { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .2s; }
.sm-ph img.sm-ld { opacity: 1; }
.sm-grid em { font: 600 12px var(--font-body); font-style: normal; }
.sm-ph em { position: absolute; left: 6px; bottom: 4px; font: 500 10px var(--font-mono); font-style: normal; color: #66737a; background: rgba(255,255,255,.8); padding: 0 3px; }
.sm-fn { display: block; margin-top: 4px; font: 500 10px var(--font-mono); color: #4c565b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-none { display: flex; align-items: center; justify-content: center; margin-top: 6px; aspect-ratio: 8 / 5; border: 1px dashed #cfd8db; border-radius: 4px; font-size: 11px; color: #8a5300; }
.sm-big { margin: 8px 0; }
.sm-one { display: block; margin-top: 6px; }
.sm-noret { display: flex; align-items: center; justify-content: center; border: 1px dashed #cfd8db; background: #fff !important; }
.sm-noret em { position: static !important; background: none !important; color: #8a5300 !important; font: 600 11px var(--font-body) !important; }
.sm-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; color: #12181b; }
.sm-grid > span:nth-child(odd) { color: #66737a; }
.sm-grid .mono { font-size: 12px; word-break: break-all; }
.sm-btns { display: flex; gap: 6px; margin-top: 10px; }
.sm-ok, .sm-ko { height: 32px; padding: 0 12px; border-radius: 8px; font: 600 12px var(--font-body); cursor: pointer; background: #fff; }
.sm-ok { border: 1px solid #3f7d1b; color: #3f7d1b; } .sm-ok.sm-pressed { background: #eef6e7; }
.sm-ko { border: 1px solid #9b1c1c; color: #9b1c1c; } .sm-ko.sm-pressed { background: #fbecec; }
.sm-h { margin: 16px 0 6px; font-weight: 600; color: #12181b; font-size: 14px; }
.sm-alts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sm-alt { padding: 4px; border: 1px solid #e4ebed; border-radius: 6px; background: #fff; cursor: pointer; text-align: left; }
.sm-input { width: 100%; box-sizing: border-box; height: 36px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 400 13px var(--font-body); margin-bottom: 8px; }
.sm-err { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: #fbecec; color: #9b1c1c; font-size: 13px; }
.rl-c { text-align: center; }
.rl-table input[type=checkbox] { width: 18px; height: 18px; accent-color: #087c8e; }

/* Pestanyes del lot a la barra de dalt (macros.lot_tabs), com al mockup */
.lt-tabs { display: flex; gap: 2px; font-size: 14px; align-self: stretch; }
.lt-tabs a { display: flex; align-items: center; padding: 3px 12px 0; color: #4c565b; text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; }
.lt-tabs a[aria-current="page"] { color: #12181b; font-weight: 600; border-bottom-color: #087c8e; }
.lt-tabs a:hover { color: #12181b; }
@media (max-width: 760px) { .lt-tabs { overflow-x: auto; max-width: 60vw; } }
.sm-seg-sm button { height: 34px; padding: 0 10px; font-size: 12px; }
.sm-pillbtn { height: 34px; padding: 0 10px; border: 1px solid #8a969b; border-radius: 8px; background: #fff; color: #12181b; font: 600 12px var(--font-body); cursor: pointer; }
.sm-crit textarea { height: 34px; min-height: 34px; width: 220px; border: 1px solid #8a969b; border-radius: 8px; padding: 6px 8px; font: 500 12px var(--font-mono); box-sizing: border-box; resize: vertical; }
.sm-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid #cfd8db; background: #fff; color: #12181b; font: 600 12px var(--font-body); white-space: nowrap; }
.sm-chip.sm-must { background: #12181b; border-color: #12181b; color: #fff; }
.sm-chip button { border: 0; background: none; color: inherit; font: 600 14px var(--font-body); cursor: pointer; padding: 0 0 0 2px; }
.sm-chip.sm-add { border-style: dashed; color: #087c8e; cursor: pointer; }
.sm-newc { display: inline-flex; gap: 4px; margin-left: 4px; }
.sm-notes:empty { display: none; }
.sm-tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.sm-tok { border-top: 1px solid #e4ebed; }
.sm-tokh { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 10px 0; border: 0; background: none; cursor: pointer; text-align: left; font: 500 13px var(--font-body); color: #4c565b; }
.sm-tokh b { font: 600 14px var(--font-body); color: #12181b; }
.sm-caret { width: 12px; color: #087c8e; }
.sm-tok .sm-prod { border-top: 1px dashed #e4ebed; padding: 10px 0 10px 22px; }
.sm-th { gap: 6px; }
.sm-th span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-caret { font-size: 14px; }
.sm-tokb { padding: 0 0 12px 22px; }
.sm-tok.sm-cur > .sm-tokh b { color: #087c8e; }
.sm-ref { border: 1px solid #e4ebed; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.sm-refh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 12px; color: #66737a; }
.sm-refh b { font-size: 13px; color: #12181b; }
.sm-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.sm-side .sm-strip { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.sm-vw { padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.sm-vl { display: block; font: 600 10px var(--font-mono); color: #4c565b; margin-bottom: 2px; }
.sm-x { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 12px var(--font-body); cursor: pointer; }
.sm-cover { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; font-size: 12px; }
.sm-pc { display: inline-flex; align-items: center; gap: 4px; }
.sm-v { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 4px; font: 600 11px var(--font-mono); }
.sm-vok { background: #eef6e7; color: #3f7d1b; }
.sm-vno { background: #fbecec; color: #9b1c1c; }
.sm-tokf { display: flex; gap: 6px; align-items: center; }
.sm-noret img { opacity: .35 !important; }
.sm-noret.sm-ph { border: 1px dashed #cfd8db; }
.sm-noret em { position: absolute !important; left: 4px; right: 4px; bottom: 4px; text-align: center; }
.sm-side .sm-alts { display: block; }
.sm-side .sm-refh { flex-wrap: wrap; }
.sm-noret img:not(.sm-ld) { opacity: 0 !important; }
.sm-copy { padding: 10px 12px; margin-bottom: 10px; border: 1px solid #cfd8db; border-radius: 10px; background: #f7fafb; }
.sm-copy select { height: 36px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 8px; font: 500 13px var(--font-body); }
.ex-card { margin-bottom: 16px; }
.ex-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: baseline; margin-bottom: 10px; }
.ex-n { font-size: 13px; color: #4c565b; }
.ex-n b { font: 500 22px var(--font-display); color: #12181b; }
.ex-n b.ex-amber { color: #8a5300; }
.ex-tbl { margin-top: 8px; }
.msg-attach { display: inline-flex; align-items: center; gap: 6px; color: #087c8e; cursor: pointer; }
.msg-attach input { font-size: 12px; max-width: 220px; }
.ret-ship { display: inline-block; }
.ret-ship[open] form { display: grid; gap: 6px; margin-top: 6px; padding: 10px; border: 1px solid #cfd8db; border-radius: 8px; background: #fff; min-width: 320px; }
.ret-ship summary { list-style: none; }

/* QC de fotos (qc.html, static/js/qc.js): com el mockup */
.qc-bar { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 12px 16px; margin: 0 0 12px; }
.qc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.qc-bar select, .qc-bar input { height: 34px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 8px; font: 500 13px var(--font-body); box-sizing: border-box; width: auto; }
.qc-bar [disabled] { opacity: .5; }
.qc-list { position: relative; }
.qc-list textarea { position: absolute; z-index: 5; top: 38px; left: 0; width: 260px; border: 1px solid #8a969b; border-radius: 8px; padding: 6px; font: 500 12px var(--font-mono); background: #fff; }
.qc-list summary { list-style: none; display: inline-flex; align-items: center; }
.qc-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.qc-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border-radius: 999px; background: #edf8fa; color: #087c8e; font: 600 12px var(--font-body); }
.qc-bar2 { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.qc-seg { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; font: 600 12px var(--font-body); color: #12181b; text-decoration: none; background: #fff; }
.qc-seg[aria-pressed="true"] { background: #12181b; color: #fff; }
.qc-k { margin-left: 8px; font: 500 11px var(--font-mono); letter-spacing: 1.6px; text-transform: uppercase; color: #66737a; }
.qc-c { display: inline-flex; align-items: center; gap: 6px; height: 30px; min-width: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 12px var(--font-body); text-decoration: none; justify-content: center; }
.qc-c[aria-pressed="true"] { border-color: #12181b; background: #12181b; color: #fff; }
.qc-go { display: inline-flex; align-items: center; text-decoration: none; }
.badge-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: #8a969b; }
.badge-dot.b-aprobada, .badge-dot.b-aceptada { background: #3f7d1b; } .badge-dot.b-en_revision { background: #5b4bb7; }
.badge-dot.b-cambios, .badge-dot.b-cambios_cliente { background: #8a5300; } .badge-dot.b-en_acabado { background: #1f5fa8; }
.qc-main { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.qc-sem { flex: 1 1 340px; max-width: 420px; padding: 16px; }
.qc-semt { width: 100%; border-collapse: collapse; font-size: 12px; }
.qc-semt th { text-align: left; padding: 4px 2px; font: 500 11px var(--font-mono); color: #66737a; }
.qc-semt td { padding: 3px 2px; text-align: center; }
.qc-semt td:first-child { text-align: left; font: 500 11px var(--font-mono); color: #12181b; }
.qc-s { display: inline-block; width: 22px; height: 22px; border-radius: 4px; vertical-align: middle; }
.qc-leg .qc-s { width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.qc-done { background: #3f7d1b; } .qc-missing { background: #9b1c1c; } .qc-dup { background: #b45309; }
.qc-s { color: #fff; font: 700 12px/22px var(--font-body); text-align: center; }
.qc-done::after { content: "✓"; } .qc-missing::after { content: "–"; } .qc-dup::after { content: "×2"; font-size: 10px; }
.qc-leg .qc-s::after { content: none; }
.qc-leg { display: flex; gap: 12px; margin-top: 10px; font-size: 11px; }
.qc-gal { flex: 999 1 560px; min-width: 0; padding: 16px; }
.qc-galh { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; color: #12181b; }
.qc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qc-tile { display: block; padding: 6px; border-radius: 8px; border: 2px solid #e4ebed; background: #fff; cursor: pointer; text-align: left; }
.qc-tile[aria-pressed="true"] { border-color: #087c8e; }
.qc-tile.qc-cur { box-shadow: 0 0 0 2px #22c9dd; }
.qc-ph { position: relative; display: block; aspect-ratio: 4 / 5; background: #edf1f3; border-radius: 2px; overflow: hidden; }
.qc-ph img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qc-ph em { position: absolute; left: 6px; bottom: 6px; font: 500 10px var(--font-mono); font-style: normal; color: #66737a; background: rgba(255,255,255,.8); padding: 0 3px; }
.qc-ph .badge { position: absolute; right: 6px; top: 6px; }
.qc-fn { display: block; margin-top: 6px; font: 500 11px var(--font-mono); color: #12181b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-cmp { margin-top: 16px; background: #0a1315; border-radius: 10px; padding: 14px; }
.qc-cmph { display: flex; justify-content: space-between; color: #a2a5a7; font: 500 11px var(--font-mono); margin-bottom: 8px; }
.qc-side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qc-side img { width: 100%; max-height: 70vh; object-fit: contain; background: #162024; border-radius: 4px; }
.qc-curtain { position: relative; max-width: 720px; margin: 0 auto; }
.qc-curtain img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.qc-top { position: absolute; inset: 0; }
.qc-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #22c9dd; }
#qc-range { display: block; width: 100%; max-width: 720px; margin: 8px auto 0; accent-color: #22c9dd; }
.co-bname { font-size: 13px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-queue { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #fff7e6; color: #7a4b00; }
/* Seguiment del client */
.tr-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.tr-search textarea { flex: 1 1 360px; min-height: 42px; height: 42px; resize: vertical; border: 1px solid #8a969b; border-radius: 8px; padding: 10px 14px; font: 400 14px var(--font-body); box-sizing: border-box; }
.tr-search select { height: 42px; }
.tr-list { display: flex; flex-direction: column; gap: 14px; }
.tr-lot { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.tr-list .tr-lot { margin-bottom: 0; }
.tr-open { border-color: #087c8e; }
.tr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.tr-head .mono { font: 500 15px var(--font-mono); color: #12181b; }
.tr-name { color: #12181b; font-weight: 600; }
.tr-eta { color: #12181b; }
.tr-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0; }
.tr-steps.tr-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tr-steps li { padding-top: 10px; border-top: 4px solid #e4ebed; }
.tr-sn { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: #5f6b70; }
.tr-dot { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; background: #cfd8db; color: #fff; }
.tr-st { font-size: 12px; line-height: 17px; color: #4c565b; margin-top: 2px; }
.tr-done { border-top-color: #3f7d1b !important; } .tr-done .tr-sn { color: #12181b; } .tr-done .tr-dot { background: #3f7d1b; }
.tr-now { border-top-color: #087c8e !important; } .tr-now .tr-sn { color: #087c8e; } .tr-now .tr-dot { background: #087c8e; }
.tr-none .tr-st { color: #5f6b70; }
.tr-pill { font: 600 12px var(--font-body); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tr-s-ok { background: #eef6e7; color: #3f7d1b; } .tr-s-ret { background: #efedff; color: #5b4bb7; } .tr-s-wait { background: #edf1f3; color: #4c565b; }
.tr-miss { color: #9b1c1c; }
@media (max-width: 700px) { .tr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tr-steps.tr-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Etiquetes típiques del planning */
.lb-card { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 8px 0; max-width: 820px; }
.lb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid #f3f7f8; }
.lb-grip { cursor: grab; color: #5f6b70; font-size: 16px; }
.lb-chip { min-width: 110px; font: 600 12px var(--font-mono); padding: 3px 8px; border-radius: 4px; text-align: center; }
.lb-name { flex: 1 1 160px; height: 32px; border: 1px solid #cfd8db; border-radius: 8px; padding: 0 10px; font: 500 13px var(--font-mono); }
.lb-sw { display: flex; gap: 4px; }
.lb-dot { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid #cfd8db; padding: 0; }
.lb-dot[aria-pressed="true"] { border-color: #12181b; }
.lb-uses { min-width: 70px; text-align: right; }
.lb-move:focus-within { position: static; left: auto; }
.lb-add { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
.lb-add input { flex: 1 1 200px; height: 32px; border: 1px solid #cfd8db; border-radius: 8px; padding: 0 10px; font: 500 13px var(--font-mono); }
.lb-gris { background: #edf1f3; color: #4c565b; } .lb-rojo { background: #fbecec; color: #9b1c1c; } .lb-naranja { background: #fff4e0; color: #8a5300; }
.lb-verde { background: #eef6e7; color: #3f7d1b; } .lb-azul { background: #e7f1fb; color: #1f5fa8; } .lb-lila { background: #efedff; color: #5b4bb7; }

/* Raport per facturar */
.rb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.rb-head h1 { margin: 0 8px 0 0; }
.rb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-chips a { height: 30px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 8px; border: 1px solid #cfd8db; background: #fff; color: #12181b; font: 600 12px var(--font-body); text-decoration: none; }
.rb-chips a[aria-pressed="true"] { background: #12181b; border-color: #12181b; color: #fff; }
.rb-client { display: flex; gap: 6px; align-items: center; }
.rb-card { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; }
.rb-tbl td, .rb-tbl th { padding: 10px 12px; }
.rb-tbl .num { text-align: right; }
.rb-n { font-family: var(--font-display); font-weight: 500; color: #12181b; }
.rb-st { font: 600 12px var(--font-body); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.rb-new { background: #edf1f3; color: #12181b; } .rb-ready { background: #eef6e7; color: #3f7d1b; }
.rb-bill { background: #fff4e0; color: #8a5300; } .rb-done { background: #e7f1fb; color: #1f5fa8; }

/* QC d'arxius */
.qf-tabs { display: flex; gap: 2px; margin-bottom: 12px; border-bottom: 1px solid #e4ebed; }
.qf-tabs a { padding: 10px 12px; color: #4c565b; text-decoration: none; font-weight: 500; }
.qf-tabs a[aria-current="page"] { color: #12181b; font-weight: 600; border-bottom: 3px solid #087c8e; }
.qf-card { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; }
.qf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qf-f, .qf-dis { height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 13px var(--font-body); text-decoration: none; }
.qf-f[aria-pressed="true"] { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.qf-dis { color: #5f6b70; border-style: dashed; cursor: default; }
.qf-path { margin: 10px 0 0; word-break: break-all; color: #12181b; }
.qf-state { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 12px; margin-bottom: 16px; color: #12181b; }
.qf-state b { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.qf-ok { background: #eef6e7; } .qf-ok b { color: #3f7d1b; }
.qf-warn { background: #fff4e0; } .qf-warn b { color: #8a5300; }
.qf-block { background: #fbecec; } .qf-block b { color: #9b1c1c; }
.qf-main { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.qf-sum { flex: 999 1 620px; min-width: 0; }
.qf-side { flex: 1 1 300px; min-width: 260px; }
.qf-side ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.qf-kpis { display: flex; flex-wrap: wrap; gap: 28px; align-items: baseline; margin-bottom: 14px; font-size: 13px; }
.qf-kpis b { font-family: var(--font-display); font-weight: 500; font-size: 28px; color: #12181b; }
.qf-kpis b.qf-red { color: #9b1c1c; }
.qf-issues { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 18px; }
.qf-issues td { padding: 10px 6px 10px 0; border-top: 1px solid #e4ebed; vertical-align: top; }
.qf-issues td:last-child { text-align: right; white-space: nowrap; }
.qf-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.qf-dot-b { background: #9b1c1c; } .qf-dot-w { background: #8a5300; }
.qf-v { display: inline-flex; min-width: 26px; height: 22px; padding: 0 4px; margin-right: 4px; border-radius: 4px; background: #eef6e7; color: #3f7d1b; align-items: center; justify-content: center; font: 600 11px var(--font-mono); }
.qf-pat { font: 500 12px var(--font-mono); color: #087c8e; background: #edf8fa; padding: 2px 6px; border-radius: 4px; }
.qf-empty { background: #edf1f3; } .qf-empty b { color: #4c565b; }

/* Menú plegat (64 px d'icones) a les pantalles de treball, com als mockups; s'obre per sobre en passar-hi o amb Tab */
.sidebar .ni { flex: none; color: #a2a5a7; }
.sidebar a.nav.active .ni { color: #fff; }
.sidebar .logo .logo-p { display: none; }
@media (min-width: 901px) {
  .shell.rail { grid-template-columns: 64px 1fr; }
  .shell.rail .sidebar { position: sticky; top: 0; height: 100vh; width: 64px; padding: 20px 12px; z-index: 40; overflow: hidden; transition: width .15s ease, box-shadow .15s ease; }
  .shell.rail .sidebar .logo { padding: 0 0 20px; text-align: center; }
  .shell.rail .sidebar .logo img, .shell.rail .sidebar .logo span { display: none; }
  .shell.rail .sidebar .logo .logo-p { display: block; width: 30px; height: auto; margin: 0 auto; }
  .shell.rail .sidebar a.nav { width: 40px; height: 40px; padding: 0 10px; white-space: nowrap; }
  .shell.rail .sidebar .nl, .shell.rail .sidebar .who { display: none; }
  .shell.rail .sidebar:hover, .shell.rail .sidebar:focus-within { width: 240px; overflow-y: auto; box-shadow: 16px 0 40px rgba(10, 19, 21, .25); }
  .shell.rail .sidebar:hover a.nav, .shell.rail .sidebar:focus-within a.nav { width: auto; }
  .shell.rail .sidebar:hover .nl, .shell.rail .sidebar:focus-within .nl, .shell.rail .sidebar:hover .who, .shell.rail .sidebar:focus-within .who { display: block; }
  .shell.rail .sidebar:hover .logo, .shell.rail .sidebar:focus-within .logo { text-align: left; padding: 0 12px 24px; }
  .shell.rail .sidebar:hover .logo img, .shell.rail .sidebar:focus-within .logo img, .shell.rail .sidebar:hover .logo span, .shell.rail .sidebar:focus-within .logo span { display: block; }
  .shell.rail .sidebar:hover .logo-p, .shell.rail .sidebar:focus-within .logo-p { display: none; }
}
@media (prefers-reduced-motion: reduce) { .shell.rail .sidebar { transition: none; } }

/* Preproducció (mockup «Preproducció · full de vistes i sets») */
.shell.rail .content:has(.pp-page) { padding: 0; }
.pp-page { margin: 0; }
.pp-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 24px; background: #fff; border-bottom: 1px solid #e4ebed; }
.pp-q { flex: 1 1 280px; height: 36px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 12px; font: 400 14px var(--font-body); }
.pp-sel, .pp-btn { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #8a969b; background: #fff; color: #12181b; font: 600 14px var(--font-body); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; white-space: nowrap; }
.pp-btn[aria-pressed="true"] { background: #edf1f3; }
.pp-btn:disabled { opacity: .5; cursor: default; }
.pp-primary { border: 0; background: #087c8e; color: #fff; padding: 0 16px; }
.pp-grow { flex: 1; }
.pp-addview { display: inline-flex; gap: 6px; align-items: center; }
.pp-addview #pp-newview-box:not([hidden]) { display: inline-flex; gap: 6px; }
.pp-addview input { width: 5rem; height: 36px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 8px; }
.pp-cols { position: relative; }
.pp-cols summary { list-style: none; }
.pp-cols summary::-webkit-details-marker { display: none; }
.pp-cols-menu { position: absolute; z-index: 30; top: 40px; left: 0; min-width: 180px; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid #cfd8db; border-radius: 8px; padding: 8px 12px; box-shadow: 0 12px 32px rgba(10, 19, 21, .12); font-size: 14px; }
.pp-cols-menu label { display: flex; gap: 8px; align-items: center; padding: 3px 0; color: #12181b; white-space: nowrap; }
.pp-dirtybar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px 24px; background: #fff4e0; border-bottom: 1px solid #f0d9ae; color: #12181b; font-size: 14px; }
.pp-dirtybar:not([hidden]) { display: flex; }
.pp-dot { width: 10px; height: 10px; border-radius: 50%; background: #8a5300; }
.pp-chg { color: #4c565b; }
.pp-dirtybar .pp-btn { height: 34px; }
.pp-msg { margin: 0; padding: 0 24px; font-size: 13px; color: #4c565b; min-height: 0; }
.pp-msg:not(:empty) { padding: 8px 24px 0; }
.pp-main { padding: 16px 24px 40px; }
.pp-kpis { display: flex; flex-wrap: wrap; gap: 28px; align-items: baseline; margin-bottom: 12px; font-size: 13px; color: #4c565b; }
.pp-kpis b { font: 500 24px var(--font-display); color: #12181b; margin-right: 4px; }
.pp-wrap { overflow: auto; max-height: calc(100vh - 290px); background: #fff; border: 1px solid #e4ebed; border-radius: 12px; }
.pp-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; user-select: none; }
.pp-grid:focus { outline: 2px solid #087c8e; outline-offset: -2px; }
.pp-grid thead th { position: sticky; top: 0; z-index: 3; background: #fff; padding: 10px; border-bottom: 1px solid #cfd8db; text-align: left; font: 500 11px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; white-space: nowrap; }
.pp-grid thead th.pp-vh { text-align: center; font: 500 12px var(--font-mono); letter-spacing: 0; text-transform: none; color: #12181b; border-left: 1px solid #e4ebed; min-width: 84px; padding: 10px 4px; }
.pp-grid thead th.pp-stick { left: 0; z-index: 4; min-width: 130px; }
.pp-grid .pp-num { text-align: right; border-left: 1px solid #e4ebed; padding: 0 10px; }
.pp-grid thead th.pp-num { text-align: right; }
.pp-grid .pp-state { min-width: 200px; padding: 0 10px; font-size: 12px; line-height: 16px; color: #4c565b; }
.pp-grid tbody th.pp-stick { position: sticky; left: 0; z-index: 2; background: #fff; padding: 0 10px; height: 40px; text-align: left; font: 500 12px var(--font-mono); color: #12181b; border-bottom: 1px solid #e4ebed; white-space: nowrap; }
.pp-grid tbody td { border-bottom: 1px solid #e4ebed; padding: 0 10px; color: #12181b; white-space: nowrap; }
.pp-grid tbody td.pp-ref { color: #66737a; }
.pp-grid tbody td.pp-x { color: #4c565b; font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pp-grid tbody tr > td.pp-num { font: 500 13px var(--font-display); color: #12181b; }
.pp-grid td.pp-c { position: relative; height: 40px; min-width: 84px; padding: 0 4px; text-align: center; font: 600 12px var(--font-body); border-left: 1px solid #e4ebed; background: #fff; cursor: cell; }
.pp-grid td.pp-exc { background: #e7f1fb; }
.pp-grid td.pp-dirty { background: #fff4e0; box-shadow: inset 0 0 0 1px #8a5300; }
.pp-grid td.pp-done::after { content: "✓"; position: absolute; top: 2px; right: 4px; font-size: 10px; color: #3f7d1b; }
.pp-grid td.pp-in { box-shadow: inset 0 0 0 2px #087c8e; }
.pp-grid td.pp-filling { box-shadow: inset 0 0 0 1px #087c8e; background: #edf8fa; }
.pp-fill { position: absolute; right: -4px; bottom: -4px; width: 8px; height: 8px; background: #087c8e; border: 1px solid #fff; cursor: crosshair; z-index: 1; }
.pp-grid tr.pp-tpl > * { background: #edf8fa; border-bottom: 1px solid #cfd8db; height: 36px; }
.pp-grid tr.pp-tpl th.pp-stick { background: #edf8fa; font: 600 12px var(--font-body); color: #087c8e; }
.pp-grid tr.pp-tpl .pp-src { font-size: 12px; color: #4c565b; }
.pp-grid tr.pp-tpl .pp-typ { font-weight: 600; }
.pp-grid tr.pp-tpl td.pp-tc { padding: 0; border-left: 1px solid #e4ebed; }
.pp-grid tr.pp-tpl td.pp-tc button { width: 100%; height: 36px; border: 0; background: transparent; color: #087c8e; font: 600 12px var(--font-body); cursor: pointer; }
.pp-grid tr.pp-tpl td.pp-num { color: #087c8e; font-weight: 600; }
.pp-link { background: none; border: 0; padding: 0; color: #087c8e; font: 600 12px var(--font-body); cursor: pointer; text-align: left; }
.pp-link:disabled { color: #5f6b70; cursor: default; }
.pp-grid tr.pp-discarded > * { background: #f3f7f8; }
.pp-grid tr.pp-discarded th.pp-stick { text-decoration: line-through; background: #f3f7f8; }
.pp-grid tr.pp-discarded td.pp-c { opacity: .45; cursor: default; }
.pp-st-disc { color: #8a5300 !important; }
.pp-st-done { color: #3f7d1b !important; }
.pp-st-none { color: #9b1c1c !important; }
.pp-empty { padding: 24px !important; text-align: center; color: #66737a !important; }
.pp-legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 12px; font-size: 12px; color: #4c565b; }
.pp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pp-sw { width: 14px; height: 14px; border-radius: 3px; background: #fff; border: 1px solid #cfd8db; display: inline-block; }
.pp-sw-exc { background: #e7f1fb; border-color: #9cc3e8; }
.pp-sw-dirty { background: #fff4e0; border-color: #8a5300; }
.pp-sw-done { background: #fff; border-color: #3f7d1b; }
.pp-help { margin: 8px 0 0; font-size: 12px; line-height: 18px; color: #66737a; }
@media (max-width: 640px) { .pp-tools, .pp-main, .pp-dirtybar { padding-left: 16px; padding-right: 16px; } }
.pp-grid td.pp-f { min-width: 110px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; cursor: cell; position: relative; height: 40px; }
.pp-grid td.pp-ro { color: #66737a; cursor: default; }
.pp-grid td.pp-f.pp-exc { background: #fff; }
.pp-edit { position: absolute; inset: 0; width: 100%; height: 100%; border: 2px solid #087c8e; padding: 0 8px; font: 400 13px var(--font-body); background: #fff; color: #12181b; box-sizing: border-box; }
.pp-xls { padding: 12px 24px; background: #fff; border-bottom: 1px solid #e4ebed; }
.pp-xls:not([hidden]) { display: block; }
.pp-xls-in { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pp-xls-in textarea { flex: 1 1 320px; min-height: 36px; border: 1px solid #8a969b; border-radius: 8px; padding: 6px 10px; font: 500 12px/18px var(--font-mono); }
.pp-xls-wrap { overflow-x: auto; margin: 8px 0; }
.pp-xls-map { border-collapse: collapse; font-size: 12px; }
.pp-xls-map th { padding: 6px; border-bottom: 1px solid #cfd8db; text-align: left; vertical-align: top; min-width: 120px; }
.pp-xls-map .pp-xh-name { display: block; font: 600 12px var(--font-body); color: #12181b; margin-bottom: 4px; }
.pp-xls-map select { width: 100%; height: 30px; border: 1px solid #8a969b; border-radius: 6px; font: 500 12px var(--font-body); }
.pp-xls-map td { padding: 4px 6px; border-bottom: 1px solid #f3f7f8; color: #4c565b; white-space: nowrap; }
.pp-tools .pp-q { width: auto; min-width: 0; }
.pp-tools .pp-sel { width: auto; flex: none; padding-right: 8px; }
/* Fotos i Estat sempre a la vista, com al mockup, encara que hi hagi moltes vistes */
.pp-grid th.pp-num, .pp-grid td.pp-num { position: sticky; right: 200px; z-index: 2; background: #fff; min-width: 64px; }
.pp-grid th.pp-state, .pp-grid td.pp-state { position: sticky; right: 0; z-index: 2; background: #fff; width: 200px; min-width: 200px; max-width: 200px; white-space: normal; box-shadow: -1px 0 0 #e4ebed; }
.pp-grid thead th.pp-num, .pp-grid thead th.pp-state { z-index: 4; }
.pp-grid tr.pp-tpl > td.pp-num, .pp-grid tr.pp-tpl > td.pp-state { background: #edf8fa; }
.pp-grid tr.pp-discarded > td.pp-num, .pp-grid tr.pp-discarded > td.pp-state { background: #f3f7f8; }
.pp-grid td.pp-cyc { min-width: 92px; text-align: center; font-weight: 600; }
.pp-grid td.pp-urg { color: #9b1c1c; background: #fbecec; }
.pp-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pp-head .pp-kpis { margin-bottom: 0; }
.pp-lotcx { display: inline-flex; gap: 6px; align-items: center; }
.pp-lotcx .pp-btn { height: 32px; font-size: 13px; }
.pp-lotcx .pp-btn[aria-pressed="true"] { background: #12181b; border-color: #12181b; color: #fff; }
.pp-grid td.pp-inh { color: #5f6b70; font-weight: 400; }
.ci-dirs-done { color: #3f7d1b; font-weight: 600; }
.ci-dirs-queued { color: #087c8e; }
.ci-dirs-partial, .ci-dirs-failed, .ci-dirs-blocked { color: #9b1c1c; }
.tr-brand { font: 600 11px var(--font-body); padding: 2px 8px; border-radius: 999px; background: #edf1f3; color: #12181b; margin: 0 6px; }
.rv-focus { box-shadow: 0 0 0 2px #087c8e; }
.ci-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 24px 12px; }
.ci-link { background: none; border: 0; padding: 0; color: #087c8e; font: 600 12px var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.ci-acts { white-space: nowrap; text-align: right; }
td.ci-ed { cursor: text; }
td.ci-ed:hover { background: #edf8fa; }
.ci-edin { width: 100%; min-width: 120px; height: 30px; border: 2px solid #087c8e; border-radius: 6px; padding: 0 6px; font: 400 14px var(--font-body); }
@media print {
  .sidebar, .topbar, .ci-noprint, .ci-tools, .ci-filter, .ci-steps, aside, form, .ci-last, section:has(.ci-scanrow), .lt-tabs { display: none !important; }
  .shell { display: block !important; }
  .ci-card { border: 0 !important; }
}
.rv-cap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0; font-size: 12px; color: #4c565b; }
.rv-cap-lbl { font: 500 11px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: #66737a; }
.rv-capf { display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; border: 1px solid #e4ebed; border-radius: 8px; background: #fff; }
.rv-capf.rv-open { border-color: #087c8e; background: #edf8fa; }
.rv-capf .rv-btn { height: 26px; padding: 0 8px; font-size: 12px; }
.rv-hint { flex-basis: 100%; font-size: 11px; color: #66737a; }
.rv-join { height: 26px; border: 1px solid #8a969b; border-radius: 6px; font: 500 12px var(--font-body); }
.rv-pnum { background: none; border: 0; padding: 0; cursor: pointer; color: #087c8e; font-weight: 600; text-decoration: underline dotted; }
.rv-files { margin-top: 8px; padding: 10px 12px; border: 1px solid #e4ebed; border-radius: 8px; background: #fff; max-height: 360px; overflow: auto; font-size: 12px; }
.rv-files-sum { margin: 0 0 6px; font-weight: 600; color: #12181b; }
.rv-ftab { border-collapse: collapse; width: 100%; }
.rv-ftab th, .rv-ftab td { text-align: left; padding: 3px 8px; border-bottom: 1px solid #f3f7f8; }
.ex-flow { margin-top: 12px; padding: 14px 16px; border: 1px solid #087c8e; border-radius: 12px; background: #fff; }
.ex-flow:not([hidden]) { display: block; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; margin: 8px 0; }
.ex-grid label, .ex-flow > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #4c565b; }
.ex-grid .ex-chk { flex-direction: row; align-items: center; gap: 6px; margin-top: 22px; }
.ex-flow textarea { width: 100%; }
.ex-warn { color: #8a5300; }
.gp-list { margin: 4px 0; padding-left: 18px; }
.ci-ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #cfd8db; border-radius: 8px; background: #fff; color: #087c8e; cursor: pointer; vertical-align: middle; }
.ci-ico:hover { background: #edf8fa; }
/* Mostres: el que està triat s'ha de veure (token obert, referència elegida, vista gran) */
.sm-tok.sm-cur { background: #edf8fa; box-shadow: inset 3px 0 0 #087c8e; padding-left: 10px; border-radius: 8px; }
.sm-ref.sm-chosen { border-color: #087c8e; box-shadow: 0 0 0 1px #087c8e; }
.sm-badge { font: 600 11px var(--font-mono, monospace); text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #087c8e; border-radius: 4px; padding: 1px 6px; }
.sm-vw.sm-sel { outline: 3px solid #087c8e; outline-offset: 1px; border-radius: 4px; }
/* Mostres: panell lateral «Datos en la BD» */
.sm-peek { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); overflow-y: auto; background: #fff; border-left: 1px solid #e4ebed; box-shadow: -8px 0 24px rgba(10,19,21,.08); padding: 16px; z-index: 40; }
.sm-peekh { display: flex; align-items: center; gap: 8px; font: 500 16px var(--font-display, inherit); }
.sm-fill { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: #4c565b; }
.sm-fill b { color: #12181b; }
.sm-pk { display: grid; grid-template-columns: 84px 1fr; gap: 2px 10px; margin: 0 0 8px; padding: 8px 10px; border: 1px solid #e4ebed; border-radius: 10px; font-size: 13px; }
.sm-pk dt { color: #4c565b; } .sm-pk dd { margin: 0; overflow-wrap: anywhere; } .sm-pk dd.sm-empty { color: #5f6b70; }
/* Mostres: comparar la foto actual de cada producte amb la mostra de la mateixa vista (com photoapp) */
.sm-cmp { display: grid; gap: 10px; margin: 8px 0; }
.sm-cmpr { border-top: 1px solid #e4ebed; padding-top: 8px; }
.sm-cmph { font-size: 13px; color: #4c565b; margin-bottom: 6px; } .sm-cmph b { color: #12181b; }
.sm-cmpg { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-cmpv { margin: 0; display: grid; gap: 4px; width: 96px; }
.sm-cmpv .sm-vw { padding: 0; border: 0; background: none; cursor: zoom-in; }
.sm-ph.sm-none { display: flex; align-items: center; justify-content: center; min-height: 96px; border: 1px dashed #cfd8db; border-radius: 4px; font-size: 11px; color: #5f6b70; text-align: center; }
/* Nou lot (mockup «Nou lot») */
.nl-main { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.nl-form { flex: 999 1 520px; min-width: 0; max-width: 760px; padding: 20px 24px; }
.nl-h1 { margin: 0 0 16px; font: 500 26px var(--font-display, 'Space Grotesk', sans-serif); color: #12181b; }
.nl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nl-grid .field { margin: 0; } .nl-wide { grid-column: 1 / -1; }
.nl-grid input:not([type=radio]), .nl-grid select, .nl-grid textarea { width: 100%; box-sizing: border-box; border: 1px solid #8a969b; border-radius: 8px; font: 500 14px var(--font-body, Figtree, sans-serif); }
.nl-grid input:not([type=radio]), .nl-grid select { height: 38px; padding: 0 10px; } .nl-grid textarea { padding: 8px 10px; }
.nl-grid input.mono { font-family: var(--font-mono, monospace); }
.nl-opt input { width: auto; height: auto; margin: 0; }
.nl-opt { white-space: nowrap; }
.nl-grid input[readonly] { background: #f3f7f8; border-color: #cfd8db; }
.nl-hint { display: block; font-size: 12px; line-height: 18px; color: #66737a; margin-top: 4px; }
.nl-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.nl-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid #8a969b; border-radius: 8px; cursor: pointer; font-weight: 600; color: #12181b; }
.nl-opt:has(input:checked) { background: #12181b; border-color: #12181b; color: #fff; }
.nl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.nl-side { flex: 1 1 320px; min-width: 260px; padding: 18px 20px; }
.nl-label { margin: 0 0 10px; font: 500 11px var(--font-mono, monospace); letter-spacing: 2.4px; text-transform: uppercase; color: #66737a; }
.nl-folder { margin: 0 0 8px; font-size: 13px; color: #12181b; word-break: break-all; }
.nl-paths { margin: 0; padding-left: 16px; font-size: 12px; line-height: 20px; color: #4c565b; word-break: break-all; }
@media (max-width: 640px) { .nl-grid { grid-template-columns: minmax(0, 1fr); } }
/* Visor de comparar (pairviewer.js): fosc com el de revisió, dues imatges amb el zoom a la vegada */
.pv { position: fixed; inset: 0; z-index: 60; background: #0a1315; color: #e4ebed; display: flex; flex-direction: column; }
.pv-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #1d2a2e; }
.pv-title { font: 500 15px var(--font-body, Figtree, sans-serif); color: #fff; } .pv-pos { font: 500 12px var(--font-mono, monospace); color: #5f6b70; } .pv-sp { flex: 1; }
.pv-btn { min-width: 40px; height: 36px; border: 1px solid #2c3a3f; border-radius: 8px; background: #162024; color: #fff; font-size: 18px; cursor: pointer; }
.pv-btn:hover, .pv-btn:focus-visible { border-color: #22c9dd; outline: none; }
.pv-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-height: 0; }
.pv-col { margin: 0; display: flex; flex-direction: column; min-height: 0; background: #111b1e; }
.pv-cap { padding: 6px 12px; font: 500 12px var(--font-mono, monospace); color: #5f6b70; overflow-wrap: anywhere; }
.pv-area { flex: 1; position: relative; min-height: 0; } .pv-area img { width: 100%; height: 100%; object-fit: contain; }
.pv-area[data-empty]::after { content: attr(data-empty); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #66737a; }
.pv-help { margin: 0; padding: 6px 16px; font-size: 12px; color: #5f6b70; }
@media (max-width: 720px) { .pv-body { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } }
.pv.pv-single .pv-body { grid-template-columns: 1fr; } .pv.pv-single .pv-col + .pv-col { display: none; }
/* panell «Información» (tecla I) a la dreta de les imatges */
.pv-main { flex: 1; display: flex; min-height: 0; }
.pv-main .pv-body { flex: 1; min-width: 0; }
.pv-infobtn { font: 600 13px var(--font-body, Figtree, sans-serif); padding: 0 12px; }
.pv-infobtn[aria-pressed="true"] { border-color: #22c9dd; color: #22c9dd; }
.pv-info { width: 300px; flex: none; overflow: auto; border-left: 1px solid #1d2a2e; background: #0d181b; padding: 14px 16px 20px; }
.pv-info-h { margin: 16px 0 8px; font: 500 11px var(--font-mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: #5f6b70; }
.pv-info-h:first-child { margin-top: 0; }
.pv-dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; font-size: 13px; line-height: 18px; }
.pv-dl dt { color: #5f6b70; }
.pv-dl dd { margin: 0; color: #e4ebed; overflow-wrap: anywhere; }
.pv-info-sub { margin: 10px 0 4px; font: 500 10px var(--font-mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: #22c9dd; }
.pv-info-wait { margin: 0; font-size: 13px; color: #5f6b70; }
@media (max-width: 900px) { .pv-main { flex-direction: column; } .pv-info { width: auto; max-height: 40%; border-left: 0; border-top: 1px solid #1d2a2e; } }
.rv-fview { border: 0; background: none; padding: 0; color: #087c8e; font: inherit; cursor: zoom-in; text-align: left; } .rv-fview:hover { text-decoration: underline; }
/* Taules: ordenar clicant la capçalera (static/js/table_sort.js) */
th.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.th-sort:hover, th.th-sort:focus-visible { color: #087c8e; }
th.th-sort::after { content: ''; display: inline-block; width: 0.9em; margin-left: 4px; color: #5f6b70; }
th.th-sort[aria-sort=ascending]::after { content: '▲'; color: #087c8e; font-size: 9px; }
th.th-sort[aria-sort=descending]::after { content: '▼'; color: #087c8e; font-size: 9px; }
/* Preproducció: fase de cada vista (feta → revelada → retocada), del registre de photoapp */
.pp-grid td.pp-rev::after { content: "✓✓"; color: #087c8e; }
.pp-grid td.pp-ret::after { content: "✓✓✓"; color: #5b4bb7; }
.pp-mk { font-size: 11px; margin-right: 2px; } .pp-mk-done { color: #3f7d1b; } .pp-mk-rev { color: #087c8e; } .pp-mk-ret { color: #5b4bb7; }
/* Espera de pantalla (sistema de disseny: orbe de 128 px amb el text a sota; respaldo CSS sense React) */
.orb.orb-screen { width: 128px; height: 128px; background-size: 9px 9px; background-image: radial-gradient(circle, var(--brand-text) 2px, transparent 2.6px); }
.sm-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 360px; text-align: center; }
.sm-loading p { margin: 0; font: 500 16px var(--font-body); color: #12181b; } .sm-loading .sm-note { font-size: 13px; color: #66737a; }
.sm-loading[hidden] { display: none; }
/* Mostres: el que hi ha triat, a dalt i a cada token */
.sm-sel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; padding: 10px 12px; border: 1px solid #cfe7eb; border-radius: 10px; background: #f5fbfc; }
.sm-selh { flex-basis: 100%; margin: 0 0 4px; font-size: 13px; color: #4c565b; } .sm-selh b { color: #087c8e; }
.sm-selchip { border: 1px solid #087c8e; border-radius: 999px; background: #fff; padding: 3px 10px; font-size: 12px; color: #12181b; cursor: pointer; }
.sm-selchip:hover, .sm-selchip:focus-visible { background: #edf8fa; }
.sm-tokref { font-size: 12px; color: #087c8e; } .sm-tokref b { color: #087c8e; }
/* Mostres: les parts del token, amb nom i l'exemple en directe */
.sm-parts { border: 0; margin: 0; padding: 0; min-width: 0; } .sm-mini { display: inline-flex; flex-direction: column; gap: 2px; font-size: 11px; color: #66737a; }
.sm-tokprev { display: block; margin-top: 4px; font-size: 12px; color: #4c565b; max-width: 520px; } .sm-tokprev b { color: #087c8e; }
/* Fotos del lot: captura · revelada · retocada per producte i vista */
.lp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.lp-h1 { margin: 0; font: 500 26px var(--font-display, 'Space Grotesk', sans-serif); color: #12181b; }
.lp-counts { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: #4c565b; } .lp-counts b { font: 500 20px var(--font-display, sans-serif); color: #12181b; }
.lp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; margin-bottom: 12px; } .lp-bar .sm-input { width: 260px; max-width: 100%; }
.lp-list { display: grid; gap: 10px; }
.lp-item { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 10px 14px; }
.lp-ih { font-size: 13px; margin-bottom: 8px; color: #4c565b; } .lp-ih b { color: #12181b; }
.lp-views { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-view { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid #e4ebed; border-radius: 8px; background: #fff; cursor: zoom-in; text-align: left; font: inherit; }
.lp-view:hover, .lp-view:focus-visible { border-color: #087c8e; outline: none; }
.lp-vh { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: #12181b; } .lp-vh small { color: #66737a; }
.lp-st { margin-left: auto; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.lp-pending .lp-st { background: #f3f4f5; color: #66737a; } .lp-captured .lp-st { background: #eef6e7; color: #3f7d1b; }
.lp-revealed .lp-st { background: #e6f5f7; color: #087c8e; } .lp-retouched .lp-st { background: #efedff; color: #5b4bb7; }
.lp-thumbs { display: flex; gap: 4px; }
.lp-ph { position: relative; width: 64px; height: 80px; border-radius: 2px; background: #f3f7f8; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.lp-ph img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s; } .lp-ph img.lp-ld { opacity: 1; }
.lp-ph i { position: absolute; left: 3px; top: 2px; font: 600 10px var(--font-mono, monospace); font-style: normal; color: #4c565b; background: rgba(255,255,255,.85); padding: 0 3px; border-radius: 2px; }
.lp-none { border: 1px dashed #cfd8db; background: #fff; color: #b5bec2; font: 600 12px var(--font-mono, monospace); }
@media (prefers-reduced-motion: reduce) { .lp-ph img { transition: none; } }
/* Revisió ràpida de la part (QC del revelat) */
.pr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.pr-head .sm-note { margin: 4px 0 0; }
.pr-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; color: #4c565b; } .pr-counts b { font: 500 20px var(--font-display, sans-serif); color: #12181b; }
.pr-c-ok b { color: #3f7d1b; } .pr-c-no b { color: #b42318; }
.pr-warn { padding: 10px 16px; margin-bottom: 12px; border-color: #f2d6a2; background: #fffaf0; font-size: 13px; } .pr-warn ul { margin: 6px 0 0; padding-left: 18px; }
.pr-keys { margin: 0 0 8px; }
/* la galeria i, al costat, el panell de la foto triada (mai a sobre de les miniatures) */
.pr-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.pr-grid { flex: 999 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pr-tile { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid #e4ebed; border-radius: 8px; background: #fff; text-align: left; font: inherit; font-size: 12px; cursor: pointer; }
.pr-tile[aria-selected="true"] { border-color: #087c8e; box-shadow: 0 0 0 2px #087c8e; }
.pr-img { height: 180px; border-radius: 2px; background: #f3f7f8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pr-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pr-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; color: #12181b; }
.pr-badge { margin-left: auto; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.pr-ok { border-color: #b7dba0; } .pr-ok .pr-badge { background: #eef6e7; color: #3f7d1b; }
.pr-no { border-color: #f1b5ae; background: #fff8f7; } .pr-no .pr-badge { background: #fdecea; color: #b42318; }
.pr-ext { padding: 0 4px; border-radius: 4px; background: #e6f5f7; color: #087c8e; font: 600 10px var(--font-mono, monospace); }
.pr-panel { flex: 1 1 320px; max-width: 380px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 12px 16px; display: grid; gap: 8px; }
.pr-ptitle { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-notes { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pr-panel-docked .pr-notes { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 640px) { .pr-panel-docked .pr-notes { grid-template-columns: 1fr; } }
.pr-lab { display: grid; gap: 4px; font-size: 12px; color: #4c565b; } .pr-lab textarea { width: 100%; height: 52px; min-height: 52px; resize: vertical; font: inherit; font-size: 13px; }
.pr-actions .btn { padding-top: 6px; padding-bottom: 6px; }
.pr-err { margin: 0; color: #b42318; font-size: 12px; }
.rv-qc { padding: 0 6px; border-radius: 6px; font: 600 10px var(--font-mono, monospace); color: #4c565b; text-decoration: none; border: 1px solid #e4ebed; line-height: 22px; }
.rv-qc:hover { border-color: #087c8e; color: #087c8e; } .rv-qc-ok { background: #eef6e7; color: #3f7d1b; border-color: #b7dba0; }
.pv.pr-docked { bottom: 168px; }
.pr-panel.pr-panel-docked { position: fixed; top: auto; left: 0; right: 0; bottom: 0; max-width: none; max-height: none; width: auto; height: 168px; border-radius: 0; z-index: 61; overflow: auto; }
.pr-panel-docked .pr-ptitle, .pr-panel-docked #pr-view { display: none; }
.pr-res { padding: 0 4px; border-radius: 4px; background: #f3f4f5; color: #4c565b; font: 600 10px var(--font-mono, monospace); text-transform: uppercase; }
.pr-dc { border-color: #d5dadc; background: #f6f7f8; } .pr-dc .pr-img img { opacity: .45; } .pr-dc .pr-badge { background: #e9ecee; color: #4c565b; }
.pr-c-dc b { color: #66737a; }
.pr-badge.pr-redone { background: #e6f5f7; color: #087c8e; }
/* Etiquetes «Img. descartada» i «Prod. descartado» (app/badges.py), iguals a totes les pantalles */
.fe-tag { display: inline-block; padding: 0 5px; border-radius: 4px; font: 600 10px/16px var(--font-mono, monospace); letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.fe-tag-img { background: #e9ecee; color: #4c565b; }
.fe-tag-prod { background: #fdecea; color: #b42318; }
.fe-tag-on { position: absolute; left: 6px; bottom: 6px; z-index: 2; }
.lp-ph .fe-tag { position: absolute; left: 2px; bottom: 2px; font-size: 8px; line-height: 12px; padding: 0 3px; }
.lp-dc img { opacity: .45; }
.lp-item-dc { background: #fffafa; border-color: #f1d0cc; }
.qc-ph { position: relative; }
/* Guies de foto i retoc (app/guides.py) */
.gd-session { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; margin-bottom: 12px; }
.gd-session .overline { margin: 0; }
.gd-kv { display: flex; flex-direction: column; } .gd-kv b { color: #12181b; font: 500 16px/22px var(--font-display, sans-serif); }
.gd-alert { background: #fff4e0; color: #8a5300; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.gd-work { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .gd-work { grid-template-columns: minmax(0, 1fr); } }
.gd-side { padding: 14px; } .gd-side .overline { margin: 0 0 6px; }
.gd-glist, .gd-tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gd-glist a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: #12181b; text-decoration: none; }
.gd-glist a:hover { background: #f3f7f8; } .gd-glist a[aria-current] { background: #edf8fa; }
.gd-gn { font-weight: 600; }
.gd-tlist { max-height: 340px; overflow: auto; font-size: 13px; } .gd-tlist label { display: flex; gap: 6px; align-items: baseline; padding: 3px 4px; }
.gd-in { margin-left: auto; padding: 0 5px; border-radius: 4px; background: #edf8fa; color: #087c8e; font-size: 11px; }
.gd-newg { display: grid; gap: 6px; margin-top: 10px; }
.gd-main { display: grid; gap: 16px; min-width: 0; }
.gd-box { padding: 14px; display: grid; gap: 10px; min-width: 0; }
.gd-box h3 { margin: 0; font: 500 16px/22px var(--font-display, sans-serif); color: #12181b; } .gd-box h3 small { font: 400 13px var(--font-body, sans-serif); }
.gd-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; } .gd-h h2 { margin: 0; font: 500 24px/30px var(--font-display, sans-serif); color: #12181b; }
.gd-members { font-size: 13px; }
.gd-variants { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gd-variants .chip, button.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid #8a969b; border-radius: 8px; color: #12181b; text-decoration: none; font: 600 12.5px var(--font-body, sans-serif); }
.gd-variants .chip[aria-pressed="true"] { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.gd-more summary { cursor: pointer; font-size: 12.5px; color: #087c8e; } .gd-vform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; }
.gd-pos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gd-p { border: 1px solid #e4ebed; border-radius: 10px; padding: 6px; display: grid; gap: 6px; min-width: 0; background: #fff; }
.gd-ph { position: relative; aspect-ratio: 4 / 5; border-radius: 2px; background: #edf1f3; display: grid; place-items: center; overflow: hidden; color: #66737a; font: 500 11px var(--font-mono, monospace); }
.gd-ph img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gd-ph i { position: absolute; left: 4px; top: 4px; font: 500 10px var(--font-mono, monospace); font-style: normal; color: #12181b; background: rgba(255,255,255,.9); padding: 0 4px; border-radius: 2px; }
.gd-ph em { position: absolute; right: 4px; top: 4px; font-style: normal; font-size: 11px; color: #3f7d1b; background: #eef6e7; padding: 0 4px; border-radius: 4px; }
.gd-pl { display: grid; grid-template-columns: 64px 1fr 56px; gap: 4px; } .gd-pl input { height: 28px; min-width: 0; border: 1px solid #cfd8db; border-radius: 6px; padding: 0 6px; font-size: 12.5px; }
.gd-rl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.gd-pb { display: flex; gap: 4px; } .gd-pb .btn { flex: 1; }
.gd-p textarea { width: 100%; min-height: 48px; border: 1px solid #e4ebed; border-radius: 8px; padding: 6px 8px; font: 13px/18px var(--font-body, sans-serif); resize: vertical; }
.gd-cands { border-top: 1px solid #e4ebed; padding-top: 10px; } .gd-chead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gd-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gd-c { display: grid; gap: 4px; padding: 4px; border: 1px solid #e4ebed; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; }
.gd-c:hover { border-color: #087c8e; } .gd-c img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: #f3f7f8; } .gd-c small { font-size: 10.5px; color: #66737a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; } @media (max-width: 1100px) { .gd-cols { grid-template-columns: minmax(0, 1fr); } }
.gd-box .pr-lab textarea { height: auto; min-height: 64px; }
.gd-ch { width: 100%; border-collapse: collapse; font-size: 13px; } table.gd-ch th { text-align: left; font: 500 10.5px var(--font-mono, monospace); text-transform: uppercase; color: #66737a; padding: 4px; border-bottom: 1px solid #e4ebed; } table.gd-ch td { padding: 6px 4px; border-bottom: 1px solid #e4ebed; }
.gd-approve { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .gd-approve #gd-flow { flex: 1; min-width: 240px; margin: 0; }
/* Esquema del set d'una guia (static/js/setplan.js; colors com el prototip de Guia de foto) */
.sp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.sp-head .overline { margin: 0; } .sp-head .sm-note { margin: 4px 0 0; max-width: 62ch; }
.sp-tpl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .sp-tpl select { width: 240px; max-width: 100%; }
.sp-tform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; margin-bottom: 10px; } .sp-tform input[type=text] { width: 320px; max-width: 100%; }
.sp-confirm { margin: 0 0 10px; }
.sp-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.sp-sets { display: flex; gap: 4px; flex-wrap: wrap; } .sp-sets .btn[aria-pressed="true"], .sp-views .btn[aria-pressed="true"] { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.sp-sep { width: 1px; height: 22px; background: #e4ebed; margin: 0 4px; } .sp-grow { flex: 1; }
.sp-lbl { font: 500 11px/1 var(--font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: #66737a; margin: 0; }
.sp-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; height: calc(100vh - 290px); min-height: 460px; }
@media (max-width: 900px) { .sp-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: 58vh auto; height: auto; } }
.sp-planwrap { position: relative; border: 1px solid #e4ebed; border-radius: 12px; background: #fff; overflow: hidden; min-height: 360px;
  --grid: #edf1f3; --grid-strong: #dbe3e6; --light: #d99a12; --light-soft: rgba(224,162,26,.15); --obj: #66737a; --obj-fill: #fff; --accent: #087c8e; --accent-soft: rgba(11,147,167,.12); --fg: #12181b; --muted: #66737a; --plan: #fff; }
svg#plan { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: grab; } svg#plan.panning { cursor: grabbing; }
.sp-hint { position: absolute; left: 10px; bottom: 8px; font: 11px var(--font-mono, monospace); color: #66737a; background: #fff; padding: 2px 6px; border-radius: 6px; }
.sp-views { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; z-index: 2; } .sp-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; }
.sp-aside { padding: 16px; overflow: auto; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sp-insp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; } .sp-insp .full { grid-column: 1 / -1; }
.sp-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .sp-f input, .sp-f select { border: 1px solid #e4ebed; border-radius: 8px; padding: 6px 8px; width: 100%; font: inherit; font-variant-numeric: tabular-nums; }
.sp-f input[type=checkbox] { width: auto; } .sp-chk { flex-direction: row; align-items: center; gap: 8px; }
.sp-ttl { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .sp-ttl b { font: 500 18px/24px var(--font-display, sans-serif); color: #12181b; }
.sp-read { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .sp-read div { background: #f3f7f8; border: 1px solid #e4ebed; border-radius: 8px; padding: 6px 8px; }
.sp-read b { display: block; color: #12181b; font: 500 20px/26px var(--font-display, sans-serif); font-variant-numeric: tabular-nums; }
.sp-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-sheet { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sp-sheet th { text-align: left; font: 500 10.5px var(--font-mono, monospace); text-transform: uppercase; color: #66737a; padding: 4px; border-bottom: 1px solid #e4ebed; }
.sp-sheet td { padding: 5px 4px; border-bottom: 1px solid #e4ebed; white-space: nowrap; } .sp-sheet tr.sel td { background: rgba(11,147,167,.12); } .sp-sheet tr[data-id] { cursor: pointer; }
.sp-toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: #12181b; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 80; }
#plan .gridm { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; } #plan .gridM { stroke: var(--grid-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
#plan .axis { fill: var(--muted); font: calc(11px * var(--k, 1)) var(--font-mono, monospace); }
#plan .obj { fill: var(--obj-fill); stroke: var(--obj); stroke-width: 1.5; vector-effect: non-scaling-stroke; } #plan .obj.dark { fill: var(--fg); }
#plan .objtxt { fill: var(--fg); font: 500 calc(12px * var(--k, 1)) var(--font-body, sans-serif); paint-order: stroke; stroke: var(--plan); stroke-width: calc(3px * var(--k, 1)); }
#plan .meas { fill: var(--muted); font: calc(11px * var(--k, 1)) var(--font-mono, monospace); paint-order: stroke; stroke: var(--plan); stroke-width: calc(3px * var(--k, 1)); }
#plan .cone { fill: var(--light-soft); stroke: var(--light); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
#plan .flash { fill: var(--light); stroke: var(--obj); stroke-width: 1.5; vector-effect: non-scaling-stroke; } #plan .mod { fill: var(--obj-fill); stroke: var(--light); stroke-width: 2; vector-effect: non-scaling-stroke; }
#plan .fov { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
#plan .cam { fill: var(--accent); stroke: var(--obj); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#plan .ray { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; fill: none; }
#plan .subject { fill: none; stroke: var(--fg); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#plan .selring { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
#plan .handle { fill: #fff; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: crosshair; }
#plan .paper { fill: none; stroke: var(--obj); stroke-width: 6; stroke-linecap: round; opacity: .55; vector-effect: non-scaling-stroke; }
#plan .ground { stroke: var(--obj); stroke-width: 2; vector-effect: non-scaling-stroke; } #plan g.it { cursor: move; }
.gd-plan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.sp-title { display: block; border: 0; border-bottom: 1px solid transparent; background: none; padding: 0; font: 500 26px/32px var(--font-display, sans-serif); color: #12181b; width: min(560px, 100%); }
.sp-title:hover, .sp-title:focus { border-bottom-color: #cfd8db; outline: none; }
.sp-notes { margin-bottom: 10px; } .sp-notes textarea { width: 100%; min-height: 48px; }
.sp-lhead { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.sp-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 200px; overflow: auto; }
.sp-layers button { width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; color: #12181b; cursor: pointer; }
.sp-layers button:hover { background: #f3f7f8; } .sp-layers button[aria-pressed="true"] { background: #edf8fa; box-shadow: inset 2px 0 0 #087c8e; }
.sp-ltype { font: 500 10px var(--font-mono, monospace); text-transform: uppercase; color: #66737a; letter-spacing: .06em; }
/* Material del estudi (app/equipment.py) */
.eq-kv { text-decoration: none; } .eq-bad { color: #b42318 !important; } .eq-warn { color: #8a5300 !important; }
.eq-imp { display: inline; } .eq-imp .eq-file { display: none; } .eq-imp label { cursor: pointer; }
.eq-st { padding: 0 6px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.eq-disponible { background: #eef6e7; color: #3f7d1b; } .eq-reparacion { background: #fff4e0; color: #8a5300; } .eq-averiado { background: #fdecea; color: #b42318; } .eq-baja { background: #e9ecee; color: #4c565b; }
.eq-d-expired { color: #b42318; font-weight: 600; } .eq-d-soon { color: #8a5300; font-weight: 600; }
.eq-form { padding: 16px; display: grid; gap: 14px; max-width: 980px; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; } .eq-full { grid-column: 1 / -1; }
.eq-grid input, .eq-grid select, .eq-grid textarea { width: 100%; }
.sp-mat { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.sp-mat li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #e4ebed; padding: 3px 0; }
.sp-mat .bad { color: #b42318; font-weight: 600; }
.sp-eq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; } .sp-eq select { min-width: 0; border: 1px solid #e4ebed; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }
.sp-fixed { display: flex; gap: 8px; align-items: center; margin: -4px 0 10px; }
.pr-img { position: relative; } .pr-mv { position: absolute; left: 4px; bottom: 4px; font: 600 10px var(--font-mono, monospace); font-style: normal; padding: 0 4px; border-radius: 4px; background: #fdecea; color: #b42318; }
.pr-mv-out_pending, .pr-mv-back_pending { background: #fff4e0; color: #8a5300; }
.pr-confirm { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff4e0; color: #8a5300; font-size: 13px; }
.pr-move { margin: 0; }
.fe-tag-refoto { background: #fff4e0; color: #8a5300; }
.pr-mu { border-color: #a9d6de; background: #f4fbfc; } .pr-mu .pr-badge { background: #e6f5f7; color: #087c8e; } .pr-c-mu b { color: #087c8e; }
.sm-mu { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; } .sm-mu .chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid #8a969b; border-radius: 8px; color: #12181b; text-decoration: none; font: 600 12.5px var(--font-body, sans-serif); } .sm-mu .chip[aria-pressed="true"] { border-color: #12181b; box-shadow: inset 0 0 0 1px #12181b; }
.pr-panel-docked .pr-notes { grid-template-columns: 1fr 1fr 1fr; } @media (max-width: 760px) { .pr-panel-docked .pr-notes { grid-template-columns: 1fr; } }
.pr-lab input { width: 100%; height: 52px; border: 1px solid #cfd8db; border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; }
/* revisió de la part per referència */
.pr-byref { display: flex; flex-direction: column; gap: 10px; }
.pr-ref { border: 1px solid #e4ebed; border-radius: 12px; padding: 8px; background: #fff; }
.pr-ref-inc { border-color: #f0c9a8; }
.pr-rhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; margin: 0 2px 8px; }
.pr-rtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pr-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; border: 1px dashed #cfd8db; border-radius: 8px; font-size: 12px; color: #4c565b; background: #f3f7f8; }
.pr-ph-other { opacity: .75; }
.pr-ph-sent { opacity: .6; }
.pr-ph-miss { border: 2px solid #c0392b; color: #a12a1d; background: #fdf1ef; }
.pr-st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid #cfd8db; }
.pr-st-ok { border-color: #8cc9a3; color: #1f6b3c; }
.pr-st-inc { border-color: #e2a08f; color: #a12a1d; }
.pr-st-wait { background: #fff4e5; border-color: #f0c9a8; color: #8a4b0f; }
.pr-st-go { color: #4c565b; }
.pr-refbar { border: 1px solid #f0c9a8; background: #fffaf3; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }
.pr-refbar p { margin: 0 0 8px; }
.pr-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-fbtn { border: 1px solid #cfd8db; background: #fff; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.pr-fbtn[aria-pressed="true"] { background: #12181b; border-color: #12181b; color: #fff; }
.pr-c-wait b { color: #8a4b0f; }
.pp-refs { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }
.ex-plan p { margin: 4px 0; }
/* encarpetar a mà l'enviament */
.fb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; }
.fb-mode { display: inline-flex; align-items: center; gap: 6px; }
.fb-new input { height: 32px; border: 1px solid #cfd8db; border-radius: 8px; padding: 0 8px; font: inherit; min-width: 240px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.fb-chip { border: 1px solid #cfd8db; background: #f3f7f8; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.fb-chip:hover { border-color: #087c8e; }
.fb-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; align-items: start; }
.fb-box { border: 1px solid #e4ebed; border-radius: 12px; background: #fff; padding: 8px; min-height: 120px; }
.fb-box header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.fb-root { background: #f3f7f8; }
.fb-over { border-color: #087c8e; box-shadow: 0 0 0 2px #087c8e; }
.fb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.fb-tile { display: flex; flex-direction: column; gap: 2px; padding: 4px; border: 1px solid #e4ebed; border-radius: 8px; background: #fff; font: inherit; font-size: 11px; text-align: left; cursor: grab; }
.fb-tile img { width: 100%; height: 84px; object-fit: contain; background: #f3f7f8; border-radius: 2px; }
.fb-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-on { border-color: #087c8e; box-shadow: 0 0 0 2px #087c8e; }
.fb-man { border-style: dashed; }
.ex-guides { margin: 6px 0; } .ex-glist { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; padding: 4px 0; }
.ex-gfile { display: flex; align-items: center; gap: 6px; }
/* zoom sense roda, per al llapis (zoomkit.js) */
.zk-bar { position: absolute; right: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(10, 19, 21, .82); color: #fff; font-size: 13px; }
.zk-btn { min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: transparent; color: #fff; font: inherit; font-size: 15px; cursor: pointer; touch-action: manipulation; }
.zk-btn:hover, .zk-btn:focus-visible { background: rgba(34, 201, 221, .25); border-color: #22c9dd; }
.zk-pct { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.zk-help { color: rgba(255, 255, 255, .7); font-size: 11px; margin: 0 6px; }
@media (max-width: 900px) { .zk-help { display: none; } }
.zk-zoomcur, .zk-zoomcur * { cursor: zoom-in !important; }
.zk-pancur, .zk-pancur * { cursor: grab !important; }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 10px; }
.selbar .chip { cursor: pointer; font: inherit; }
.rv-selbar { position: sticky; top: 0; z-index: 5; }
/* buscador de mostres: la barra en tres blocs */
.sm-sub { color: #4c565b; font-size: 14px; }
.sm-grps { display: grid; grid-template-columns: auto minmax(460px, 1.6fr) minmax(0, 1fr) auto; gap: 0; align-items: stretch; }
.sm-grp .sm-row { flex-wrap: wrap; } .sm-grp:nth-child(2) .sm-row { flex-wrap: nowrap; } .sm-tokprev { display: block; max-width: 280px; }
.sm-grp { padding: 4px 16px 6px; border-left: 1px solid #e4ebed; min-width: 0; }
.sm-grp:first-child { padding-left: 0; border-left: 0; }
.sm-gh { display: block; margin: 0 0 8px; font: 600 12px var(--font-body); color: #12181b; }
.sm-grp .sm-row { gap: 12px; }
.sm-grpgo { display: flex; align-items: flex-end; padding-left: 16px; }
.sm-grpgo .sm-main { height: 40px; padding: 0 22px; }
.sm-parts .sm-inline { gap: 8px; }
@media (max-width: 1380px) { .sm-grps { grid-template-columns: auto minmax(0, 1fr); row-gap: 12px; } .sm-grp:nth-child(2) .sm-row { flex-wrap: wrap; } .sm-grp:nth-child(3) { padding-left: 0; border-left: 0; } .sm-grpgo { padding-left: 16px; } }
@media (max-width: 760px) { .sm-grps { grid-template-columns: 1fr; } .sm-grp { padding-left: 0; border-left: 0; } .sm-grpgo { padding-left: 0; } }
.lp-vw { position: relative; display: flex; } .lp-vw .lp-view { flex: 1; }
.lp-chk { position: absolute; top: 6px; left: 6px; z-index: 2; width: 18px; height: 18px; margin: 0; accent-color: #087c8e; }
.lp-vw .lp-vh { padding-left: 22px; }
.lp-on .lp-view { border-color: #087c8e; box-shadow: 0 0 0 2px #087c8e; }

/* Captura (app/capture_live.py, static/js/capture.js): cua | producte actiu amb posicions i escenari | guia del set */
.cap-session { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 12px; }
.cap-session .overline { margin: 0; }
.cap-h1 { font: 500 26px/32px var(--font-display); letter-spacing: -.5px; color: var(--ink); margin: 0; }
.cap-kv { display: flex; flex-direction: column; }
.cap-kv b { color: var(--ink); font: 500 16px/22px var(--font-display); font-variant-numeric: tabular-nums; }
.cap-kv b.mono { font: 500 14px/22px var(--font-mono); }
.cap-grow { flex: 1; }
.cap-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--warning-bg); color: var(--warning); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-weight: 600; }
.cap-work { display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cap-panel { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; min-width: 0; display: flex; flex-direction: column; }
.cap-ph { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cap-ph-col { flex-direction: column; align-items: stretch; }
.cap-ph-col .overline { margin: 0; }
.cap-pb { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cap-scan { display: flex; gap: 6px; }
.cap-scan input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--surface); padding: 0 10px; font: 500 14px var(--font-mono); color: var(--ink); }
.cap-order { display: flex; flex-direction: column; gap: 8px; }
.cap-order .overline { margin: 0; }
.cap-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.cap-seg .btn { height: 30px; padding: 0 8px; font-size: 12.5px; flex: 1 1 auto; }
.cap-work .btn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cap-est { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.cap-est b { color: var(--ink); font: 500 15px/20px var(--font-display); font-variant-numeric: tabular-nums; }
.cap-alt { font-size: 12px; line-height: 17px; color: var(--text-secondary); font-variant-numeric: tabular-nums; margin: 0; }
.cap-how summary { cursor: pointer; font-size: 12.5px; color: var(--brand-text); }
.cap-grid2 { display: grid; grid-template-columns: 1fr 72px; gap: 4px 8px; align-items: center; margin-top: 6px; font-size: 12.5px; }
.cap-grid2 input { height: 28px; border: 1px solid var(--border-control); border-radius: 6px; background: var(--surface); padding: 0 6px; width: 100%; font: 500 12.5px var(--font-mono); color: var(--ink); }
.cap-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cap-queue li button { width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; cursor: pointer; color: inherit; font: inherit; }
.cap-queue li button:hover { background: var(--surface-muted); }
.cap-queue li button[aria-current="true"] { background: var(--brand-wash); }
.cap-queue li.cap-done button { opacity: .6; }
.cap-ean { font: 500 12.5px var(--font-mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.cap-meta { grid-column: 1; font-size: 12.5px; color: var(--text-secondary); }
.cap-cnt { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.cap-qhead { font: 500 10.5px/16px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand-text); padding: 10px 8px 2px; display: flex; justify-content: space-between; gap: 6px; }
.cap-qhead span { color: var(--text-secondary); letter-spacing: .4px; text-transform: none; font-family: var(--font-body); }
.cap-empty { padding: 8px; font-size: 13px; }
.cap-prod { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.cap-prod h2 { font: 500 22px/28px var(--font-display); color: var(--ink); margin: 0; letter-spacing: -.3px; }
.cap-positions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cap-pos { border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: var(--surface); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: inherit; font: inherit; }
.cap-pos.cap-ok { border-color: var(--success); }
.cap-pos.cap-ko { border-color: var(--danger); }
.cap-pos.cap-active { border-color: var(--action); box-shadow: 0 0 0 2px var(--action) inset; }
.cap-th { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.cap-th > div { aspect-ratio: 4 / 5; background: #fff; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; position: relative; }
.cap-th img { width: 100%; height: 100%; display: block; object-fit: contain; }
.cap-th i { position: absolute; left: 3px; top: 3px; font: 500 9px var(--font-mono); letter-spacing: .6px; color: #4c565b; background: rgba(255,255,255,.85); padding: 0 3px; border-radius: 2px; font-style: normal; }
.cap-th .cap-empty-th { display: grid; place-items: center; color: var(--text-secondary); font: 500 11px var(--font-mono); background: var(--surface-muted); }
.cap-pl { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 13px; color: var(--ink); font-weight: 600; }
.cap-pl small { font-weight: 400; color: var(--text-secondary); }
.cap-setup { font: 500 10px var(--font-mono); letter-spacing: .8px; color: var(--brand-text); }
.cap-stage { position: relative; background: var(--surface-muted); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.cap-frame { position: relative; width: 94%; height: 92%; }
.cap-lay { position: absolute; inset: 0; }
.cap-lay img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cap-ghost { opacity: .45; mix-blend-mode: multiply; }
.cap-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-secondary); text-align: center; }
.cap-curtain { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--action); cursor: ew-resize; touch-action: none; }
.cap-curtain::after { content: ""; position: absolute; top: 50%; left: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--action); transform: translateY(-50%); }
.cap-curtain:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }
.cap-over { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.cap-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cap-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cap-armed { font-size: 13px; font-weight: 600; color: var(--warning); }
.cap-hint { margin: 0; font-size: 13px; }
.cap-recent .overline { margin: 0 0 4px; }
.cap-recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.cap-gname { font: 500 16px var(--font-display); color: var(--ink); }
.cap-guide .overline { margin: 0 0 4px; }
.cap-notes { font-size: 13.5px; line-height: 20px; margin: 0; white-space: pre-line; }
.cap-plan { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-secondary); display: block; }
.cap-sample { width: 96px; aspect-ratio: 4 / 5; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; background: #fff; }
.cap-sample img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cap-toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 8px; font-size: 14px; z-index: 60; }
.b-err { background: var(--danger-bg); color: var(--danger); }
.b-warn { background: var(--warning-bg); color: var(--warning); }
.b-info { background: var(--brand-wash); color: var(--brand-text); }
.b-mute { background: var(--surface-muted); color: var(--text-secondary); }
.cap-pick { display: grid; gap: 16px; max-width: 900px; }
.cap-pick .tbl td, .cap-pick .tbl th { padding: 6px 8px; }
@media (max-width: 1180px) { .cap-work { grid-template-columns: 230px minmax(0, 1fr); } .cap-guide { grid-column: 1 / -1; } }
@media (max-width: 760px) { .cap-work { grid-template-columns: minmax(0, 1fr); } }
/* Agents o estacions sense senyal (app/heartbeat.py) */
.hb-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; background: var(--danger-bg); color: var(--danger); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.hb-strip small { flex-basis: 100%; color: var(--text); }

.cap-vorder { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.cap-vorder input { height: 30px; font: 500 13px var(--font-mono); }
.cap-hold { border: 1px solid var(--warning); background: var(--warning-bg); border-radius: 10px; padding: 10px 12px; }
.cap-hold .overline { margin: 0 0 6px; color: var(--warning); }
.cap-hold ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cap-hold li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.cap-hold img, .cap-hold .cap-empty-th { width: 48px; aspect-ratio: 4 / 5; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 2px; display: grid; place-items: center; }
.cap-hold select { height: 30px; max-width: 220px; }

.cap-vbox-check { border: 2px solid var(--warning); border-radius: 8px; padding: 8px; background: var(--warning-bg); }
.cap-vcheck { margin: 0; color: var(--warning); font-weight: 600; }

.cap-pos-add { align-items: center; justify-content: center; color: var(--brand-text); font-weight: 600; border-style: dashed; min-height: 80px; }
.cap-added { font: 500 10px var(--font-mono); letter-spacing: .6px; color: var(--warning); text-transform: uppercase; }
.cap-addview { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; background: var(--surface-alt); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.cap-addview label { display: grid; gap: 2px; }
.cap-addview #cap-av-v { width: 80px; height: 30px; }
.cap-addview .cap-av-r { flex: 1 1 260px; }
.cap-addview #cap-av-r { height: 30px; width: 100%; }
.cap-av-n { display: grid; gap: 2px; }
.cap-av-n b { font-size: 16px; line-height: 30px; }

/* Dudas (app/client_questions.py) */
.nav-badge { margin-left: auto; background: #22c9dd; color: #0a1315; border-radius: 999px; padding: 0 7px; font: 600 12px/18px var(--font-body); }
.qs-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin-bottom: 12px; }
.qs-head > div { flex: 1 1 280px; }
.qs-open { margin: 4px 0 0; color: var(--warning); font-weight: 600; }
.qs-intro { margin: 0; max-width: 460px; font-size: 14px; }
.qs-filters { margin-bottom: 16px; }
.qs-n { background: var(--warning-bg); color: var(--warning); border-radius: 999px; padding: 0 6px; margin-left: 4px; font-size: 12px; }
.qs-list { display: flex; flex-direction: column; gap: 16px; max-width: 1100px; }
.qs-card { display: flex; flex-wrap: wrap; gap: 16px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.qs-card.qs-wait { border-color: #f0c9a8; }
.qs-img { width: 180px; aspect-ratio: 4 / 5; object-fit: contain; background: #fff; border-radius: 2px; flex: none; border: 1px solid var(--border); }
.qs-noimg { display: grid; place-items: center; color: var(--text-secondary); font-size: 13px; }
.qs-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.qs-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13px; }
.qs-meta b { font: 500 14px var(--font-mono); color: var(--ink); }
.qs-grow { flex: 1; }
.qs-q { margin: 0; color: var(--ink); font-size: 16px; line-height: 24px; white-space: pre-wrap; }
.qs-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.qs-opt { min-height: 44px; border-color: var(--action); color: var(--action); }
.qs-media { flex: none; display: flex; flex-direction: column; gap: 8px; width: 180px; }
.qs-media a { display: block; }
.qs-more { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.qs-more img { width: 54px; height: 54px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 2px; display: block; }
/* «¿esta o esta?»: respostes amb foto, una targeta per opció */
.qs-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qs-pick { display: flex; flex-direction: column; gap: 4px; }
.qs-pick-btn { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); color: var(--ink); font: 400 14px var(--font-body); text-align: left; }
button.qs-pick-btn { cursor: pointer; transition: border-color var(--duration-fast), box-shadow var(--duration-fast); }
button.qs-pick-btn:hover, button.qs-pick-btn:focus-visible { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); }
.qs-pick-btn img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 2px; }
.qs-pick-noimg { display: grid; place-items: center; aspect-ratio: 1; background: var(--surface-muted); border-radius: 2px; padding: 8px; text-align: center; font-weight: 600; }
.qs-pick-l b { color: var(--action); margin-right: 4px; }
.qs-zoom { color: var(--text-secondary); padding-left: 4px; }
.qs-picks-done .qs-pick:not(.qs-chosen) { opacity: .45; }
.qs-chosen .qs-pick-btn { border-color: var(--success); box-shadow: 0 0 0 1px var(--success); }
.qs-free label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink); font-weight: 600; }
.qs-free { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.qs-free textarea { width: 100%; }
.qs-ans { margin: 0; background: var(--success-bg); color: var(--success); border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.qs-err { margin: 0; color: var(--danger); font-size: 13px; }
.ask-back { position: fixed; inset: 0; background: rgba(10,19,21,.45); display: grid; place-items: center; z-index: 70; padding: 16px; }
.ask-panel { background: var(--surface-raised); border-radius: 12px; padding: 20px; width: min(640px, 100%); display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow: auto; }
.ask-panel h2 { font: 500 20px var(--font-display); color: var(--ink); margin: 0; }
.ask-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.ask-panel .ask-shot { flex-direction: row; align-items: center; font-weight: 400; }
.ask-where { margin: 2px 0 0; }
/* Fotos i respostes per triar del dubte (static/js/ask_dialog.js) */
.ask-sec { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.ask-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ask-label { margin: 0; font: 500 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.ask-count { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ask-sub { margin: 0; font-size: 13px; color: var(--text-secondary); }
.ask-drop { border: 1px dashed var(--border-control); border-radius: 8px; padding: 14px 12px; text-align: center; font-size: 14px; color: var(--text-secondary); cursor: pointer; background: var(--surface-muted); transition: border-color var(--duration-fast), background var(--duration-fast); }
.ask-drop u { color: var(--action); text-underline-offset: 2px; }
.ask-drop:hover, .ask-drop:focus-visible, .ask-drop.over { border-color: var(--action); background: var(--brand-wash); color: var(--ink); }
.ask-thumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ask-thumbs:empty { display: none; }
.ask-th { position: relative; width: 88px; display: flex; flex-direction: column; gap: 4px; }
.ask-th img { width: 88px; height: 88px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 2px; display: block; }
.ask-th-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-raised); color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer; }
.ask-th-x:hover { border-color: var(--danger); color: var(--danger); }
.ask-th-opt { border: 0; background: none; padding: 0; font: 600 12px var(--font-body); color: var(--action); cursor: pointer; text-align: left; }
.ask-th-opt:hover { text-decoration: underline; }
.ask-th-pick { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 2px; }
.ask-th-pick:hover img, .ask-th-pick:focus-visible img { border-color: var(--action); }
.ask-th-pick:disabled { cursor: default; }
.ask-th-used img { opacity: .4; }
.ask-th-name { font-size: 10px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ask-opts:empty { display: none; }
.ask-opt { display: flex; align-items: center; gap: 10px; }
.ask-opt-l { width: 20px; flex: none; font-size: 13px; color: var(--text-secondary); text-align: center; }
.ask-opt-img { width: 64px; height: 64px; flex: none; padding: 0; border: 1px dashed var(--border-control); border-radius: 2px; background: var(--surface-muted); color: var(--action); font: 600 12px var(--font-body); cursor: pointer; display: grid; place-items: center; overflow: hidden; }
.ask-opt-img.has { border-style: solid; border-color: var(--border); background: #fff; }
.ask-opt-img img { width: 100%; height: 100%; object-fit: contain; }
.ask-opt-img:hover, .ask-opt-img:focus-visible, .ask-opt-img.over { border-color: var(--action); }
.ask-opt input[type=text] { flex: 1; min-width: 0; }
.ask-opt-x { flex: none; border: 0; background: none; color: var(--text-secondary); font: 600 13px var(--font-body); cursor: pointer; padding: 6px; }
.ask-opt-x:hover { color: var(--danger); }
.ask-opt-add { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-panel .ask-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.ask-err { margin: 0; color: var(--danger); font-size: 13px; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; }
.qs-free label { align-self: stretch; }
.cap-planned-h { margin: 12px 0 6px; }
.cap-late { color: var(--danger); font-weight: 600; }
.cap-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Panel del client (app/client_panel.py) */
.pn-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 16px; }
.pn-head .overline { margin: 0; }
.pn-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pn-kpi { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.pn-kpi .overline { margin: 0; }
.pn-kpi b { font: 500 28px/34px var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.pn-kpi b.pn-na { font-size: 18px; color: var(--text-secondary); }
.pn-kpi small { color: var(--text-secondary); font-size: 13px; }
.pn-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.pn-grid h2, .pn-head + * h2, .card > h2 { font: 500 18px var(--font-display); color: var(--ink); margin: 0 0 4px; }
.pn-bars { display: flex; align-items: flex-end; gap: 6px; height: 240px; padding-top: 24px; }
.pn-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.pn-bar { display: block; width: 100%; max-width: 44px; background: var(--action); border-radius: 4px 4px 0 0; min-height: 2px; }
.pn-col:hover .pn-bar { background: var(--action-hover); }
.pn-v { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; visibility: hidden; }
.pn-col:hover .pn-v, .pn-v-show { visibility: visible; }
.pn-m { font-size: 12px; color: var(--text-secondary); }
.pn-q { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 12px 0; font-size: 14px; }
.pn-q b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pn-track { grid-column: 1 / -1; height: 8px; background: var(--surface-muted); border-radius: 4px; overflow: hidden; }
.pn-track span { display: block; height: 100%; background: var(--action); border-radius: 4px; }
.pn-steps { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; }
.pn-steps i { display: block; width: 18px; height: 6px; border-radius: 3px; background: var(--border); }
.pn-steps i.pn-s-done { background: var(--action); }
.pn-steps i.pn-s-now { background: #5fb6c3; }
@media (max-width: 900px) { .pn-grid { grid-template-columns: minmax(0, 1fr); } }

/* Dudas: l'estudi la dona per resolta */
.qs-resolve { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.qs-resolve label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.qs-resolve .qs-grow { flex: 1; min-width: 200px; }

/* Panell d'instruccions plegable (macro help_panel) */
.hp-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.hp-wrap > .hp-main { flex: 999 1 640px; min-width: 0; }
.hp { flex: 0 0 300px; max-width: 100%; position: sticky; top: 12px; }
.hp-tab { display: none; }
.hp-body { background: #fff; border: 1px solid var(--border, #e4ebed); border-radius: 12px; padding: 16px 18px; font-size: 14px; color: var(--text, #12181b); }
.hp-head { display: flex; align-items: center; gap: 8px; }
.hp-head .overline { flex: 1; }
.hp-close { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #cfd8db; background: #fff; font-size: 16px; cursor: pointer; }
.hp-title { margin: 8px 0 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 19px; line-height: 25px; }
.hp-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.hp-body p { margin: 10px 0 0; }
.hp-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-alt, #f3f7f8); font-size: 13px; }
.hp-body code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #087c8e; }
.hp.hp-closed { flex: 0 0 44px; }
.hp.hp-closed .hp-body { display: none; }
.hp.hp-closed .hp-tab { display: flex; align-items: center; gap: 6px; writing-mode: vertical-rl; min-height: 150px; width: 40px; justify-content: center; border-radius: 8px; border: 1px solid #c7e6ec; background: #edf8fa; color: #087c8e; font-weight: 600; cursor: pointer; }
@media (max-width: 900px) { .hp, .hp.hp-closed { flex: 1 1 100%; position: static; } .hp.hp-closed .hp-tab { writing-mode: horizontal-tb; min-height: 40px; width: auto; padding: 0 12px; } }

/* Presets d'entrega i entrega per canal */
.dl-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.dl-chans { flex: 1 1 220px; max-width: 250px; background: #fff; border: 1px solid var(--border, #e4ebed); border-radius: 12px; padding: 12px; }
.dl-chan { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; border: 1px solid transparent; background: #fff; cursor: pointer; font: inherit; margin-bottom: 4px; }
.dl-chan[aria-pressed="true"] { border-color: #087c8e; background: #edf8fa; }
.dl-chan b { display: block; color: #12181b; }
.dl-chan .mono { display: block; font-size: 11px; word-break: break-all; color: #4c565b; }
.dl-chan small { color: #66737a; }
.dl-ed { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.dl-card { background: #fff; border: 1px solid var(--border, #e4ebed); border-radius: 12px; padding: 16px 20px; }
.dl-sec { border-top: 1px solid #e4ebed; padding-top: 14px; margin-top: 14px; }
.dl-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.dl-sec > .overline { display: block; margin-bottom: 8px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dl-tpl { flex: 1 1 300px; min-width: 0; height: 42px; font: 500 15px 'JetBrains Mono', monospace; }
.dl-tok { min-height: 28px; font: 500 12px 'JetBrains Mono', monospace; padding: 2px 8px; border-radius: 6px; border: 1px solid #c7e6ec; background: #edf8fa; color: #087c8e; cursor: pointer; }
.dl-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #cfd8db; border-radius: 8px; overflow: hidden; }
.dl-seg button { min-height: 36px; padding: 0 14px; border: 0; border-right: 1px solid #cfd8db; background: #fff; font: 600 13px Figtree, sans-serif; cursor: pointer; color: #12181b; }
.dl-seg button:last-child { border-right: 0; }
.dl-seg button[aria-pressed="true"] { background: #087c8e; color: #fff; }
.dl-v { min-width: 38px; min-height: 34px; border-radius: 8px; border: 1px solid #cfd8db; background: #fff; font: 500 13px 'JetBrains Mono', monospace; cursor: pointer; }
.dl-v[aria-pressed="true"] { border-color: #087c8e; background: #087c8e; color: #fff; }
.dl-exc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #fff7ec; border: 1px solid #f2d3a6; }
.dl-map { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 8px 0 10px; border-radius: 8px; border: 1px solid #cfd8db; font: 500 13px 'JetBrains Mono', monospace; }
.dl-map input { width: 40px; height: 26px; text-align: center; padding: 0; }
.dl-help { font-size: 12px; color: #66737a; margin: 6px 0 0; }
.dl-st { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dl-st-new { background: #eef6e7; color: #3f7d1b; } .dl-st-warn { background: #fff1df; color: #8a4b00; }
.dl-st-err, .dl-st-dup, .dl-st-missing { background: #fdecea; color: #a12a1d; } .dl-st-skip { background: #edf1f3; color: #4c565b; }
.dl-cell { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; padding: 3px 8px; margin: 1px 0; border-radius: 6px; border: 1px solid #d7ebc8; background: #f6fbf2; }
.dl-cell.dl-c-warn { background: #fff7ec; border-color: #f2d3a6; } .dl-cell.dl-c-skip { background: #f9fbfb; border-color: #edf1f3; color: #5f6b70; }
.dl-cell.dl-c-err, .dl-cell.dl-c-dup, .dl-cell.dl-c-missing { background: #fdf3f2; border-color: #f2c6c0; }
.dl-cell .mono { font-size: 12px; }
.dl-cell small { font-size: 11px; }
.dl-src { white-space: nowrap; }
#ld-wrap .tbl td { padding-top: 4px; padding-bottom: 4px; vertical-align: middle; }
.dl-cell small { font-weight: 600; }
.dl-warn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: #fff7ec; border: 1px solid #f2d3a6; margin-bottom: 10px; font-size: 13px; }
.dl-side { flex: 1 1 260px; max-width: 320px; display: flex; flex-direction: column; gap: 16px; }
#ld-wrap { overflow-x: auto; max-width: 100%; }
.hp-main .dl-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
#ld-kind button { padding: 0 10px; }

.pl-legacy { font-size: 11px; color: #4c565b; background: #edf1f3; border-radius: 4px; padding: 1px 6px; margin-top: 4px; display: inline-block; }

/* planning nou: com ha arribat la targeta, etiquetes de peces i facturació, «Proof diría», motiu del moviment a mà */
.pl-how { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-size: 10px; font-weight: 700; margin-left: auto; }
.pl-how-A { background: #edf8fa; color: #087c8e; } .pl-how-M { background: #fff1df; color: #8a4b00; } .pl-how-P { background: #edf1f3; color: #4c565b; }
.pl-tr { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 600; margin-left: 4px; white-space: nowrap; }
.pl-tr-estudio { background: #edf1f3; color: #4c565b; } .pl-tr-recoger, .pl-tr-facturar { background: #fff1df; color: #8a4b00; }
.pl-tr-devuelto, .pl-tr-facturado { background: #eef6e7; color: #3f7d1b; }
.pl-cdates { flex-wrap: wrap; row-gap: 4px; }
.pl-expect { font-size: 11px; color: #5b4bb7; background: #f3eefe; border-radius: 4px; padding: 1px 6px; margin-top: 4px; display: inline-block; }
.pl-reason { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-reason input { flex: 1 1 220px; min-width: 0; height: 32px; }
.pl-pending { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pl-pending span { font-size: 11px; font-weight: 600; color: #8a4b00; background: #fff1df; border-radius: 4px; padding: 1px 6px; }
.pl-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-part { font-size: 12px; background: #f3f7f8; border-radius: 6px; padding: 2px 8px; }
/* part de la referència (models amb colorways), app/static/js/refpart.js */
.refpart select { height: 28px; font-size: 12px; max-width: 220px; }

/* «Preparar envío»: barra de passos a dalt de cada pas (app/views_prep.py) */
.prep-bar { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.prep-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.prep-over { font: 500 11px/14px var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-secondary); }
.prep-ok { color: var(--success); }
.prep-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.prep-part { font: 600 12px var(--font-body); padding: 3px 10px; border-radius: 999px; background: var(--brand-wash); color: var(--brand-text); text-decoration: none; }
.prep-saved { margin-left: auto; font-size: 12px; color: var(--text-secondary); }
.prep-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.prep-step { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.prep-step:hover { background: var(--surface-muted); }
.prep-step.prep-cur { color: var(--ink); border-bottom-color: var(--action); }
.prep-dot { width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font: 700 12px var(--font-body); background: var(--surface-muted); color: var(--text); }
.prep-cur .prep-dot { background: var(--action); color: #fff; } .prep-done .prep-dot { background: var(--success); color: #fff; }
.prep-nav { display: flex; gap: 8px; justify-content: flex-end; }
.prep-card { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.prep-note { margin: 0; padding: 10px 12px; background: var(--brand-wash); border-radius: 8px; color: var(--ink); font-size: 14px; }
.prep-form { display: flex; flex-direction: column; gap: 14px; }
.prep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.prep-grid-6 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.prep-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.prep-row { display: flex; gap: 6px; align-items: center; } .prep-row input { min-width: 0; }
.prep-form .prep-check { flex-direction: row; align-items: center; gap: 4px; font-weight: 500; }
.prep-name { margin: 0; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.prep-name legend { font-weight: 600; color: var(--ink); padding: 0 4px; }
.prep-preview { margin: 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.prep-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.prep-facts div { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.prep-facts b { color: var(--ink); }
.prep-full textarea { width: 100%; }
.prep-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prep-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.prep-pending { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
form.inline { display: inline; }
/* «Preparar envío» · pas 2 · Muestras (static/js/prep_samples.js) */
.ps-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ps-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ps-query { display: flex; flex-direction: column; gap: 10px; }
.ps-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.ps-head .cap-h1 { margin: 0; }
.ps-sub { font-weight: 600; color: var(--brand-text); }
.ps-hint { font-size: 12px; color: var(--text-secondary); margin-left: auto; }
.ps-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.ps-row label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink); }
.ps-row input, .ps-row select { min-height: 34px; }
.ps-row input[type=number] { width: 72px; }
.ps-group { padding: 8px 10px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; }
.ps-example { font-size: 12px; color: var(--text); align-self: center; }
.ps-lab { font: 600 12px var(--font-body); color: var(--text); align-self: center; }
.ps-cond { display: inline-flex; gap: 4px; align-items: center; }
.ps-cond input { width: 120px; }
.ps-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.ps-seg button { min-height: 34px; padding: 0 12px; border: 0; background: var(--surface-raised); font: 600 12px var(--font-body); color: var(--ink); cursor: pointer; }
.ps-seg button.on { background: var(--action); color: #fff; }
.ps-msg { font-size: 13px; color: var(--text-secondary); align-self: center; }
.ps-tokens { display: flex; flex-direction: column; gap: 10px; }
.ps-tok { padding: 0; overflow: hidden; }
.ps-tok-h { width: 100%; min-height: 52px; padding: 10px 16px; border: 0; background: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; cursor: pointer; text-align: left; font: inherit; }
.ps-tok-h.ps-ok { background: #f3faf0; }
.ps-chev { width: 14px; font-weight: 700; }
.ps-tok-n { flex: 1; font-size: 13px; color: var(--text); }
.ps-chip { font: 600 12px var(--font-body); padding: 3px 10px; border-radius: 999px; background: var(--brand-wash); color: var(--brand-text); }
.ps-chip-ok { background: var(--success-bg); color: var(--success); } .ps-chip-warn { background: var(--warning-bg); color: var(--warning); }
.ps-tok-b { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.ps-inline { flex-direction: row !important; align-items: center; gap: 6px !important; margin-left: auto; }
.ps-prods { display: flex; flex-wrap: wrap; gap: 10px; }
.ps-prod { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.ps-prod-h { font-size: 12px; color: var(--text); }
.ps-thumbs { display: flex; flex-wrap: wrap; gap: 4px; }
.ps-th { position: relative; width: 64px; height: 80px; padding: 0; border: 1px solid var(--border); border-radius: 2px; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: pointer; }
span.ps-th { cursor: default; }
.ps-th img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ps-th i { position: absolute; left: 2px; bottom: 2px; font: 600 9px var(--font-mono); background: rgba(255,255,255,.85); padding: 0 3px; border-radius: 2px; font-style: normal; color: var(--ink); }
.ps-th-cap { border-style: dashed; }
.ps-noimg { font-size: 10px; color: var(--text-muted); }
.ps-alts-h { margin: 0; font: 600 12px var(--font-body); color: var(--text-secondary); }
.ps-alts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ps-alt { border: 2px solid var(--border); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-raised); }
.ps-alt-on { border-color: var(--success); background: #f7fbf4; }
.ps-alt-ref { font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.ps-alt-meta { font-size: 11px; color: var(--text-secondary); }
.ps-scope { display: flex; flex-direction: column; gap: 3px; font: 600 11px var(--font-body); color: var(--ink); }
.ps-scope select { min-height: 32px; }
.ps-approve { min-height: 38px; border-radius: 8px; border: 1px solid var(--action); background: var(--action); color: #fff; font: 600 13px var(--font-body); cursor: pointer; }
.ps-approve.on { background: var(--success-bg); color: var(--success); border-color: #bfdcae; }
.ps-approve:disabled { opacity: .5; cursor: default; }
.ps-alt-tools { display: flex; gap: 4px; }
.ps-alt-tools button { flex: 1; min-height: 30px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-raised); font: 600 11px var(--font-body); color: var(--ink); cursor: pointer; }
.ps-alt-tools .ps-bad { color: var(--danger); border-color: #f2c9c9; }
.ps-cart { flex: 1 1 280px; max-width: 360px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.ps-cart-h { display: flex; justify-content: space-between; align-items: baseline; }
.ps-cart-h h2 { margin: 0; font: 500 16px var(--font-display); color: var(--ink); }
.ps-cart-h b { color: var(--brand-text); font-size: 13px; }
.ps-bar { display: block; height: 8px; background: var(--surface-muted); border-radius: 4px; overflow: hidden; }
.ps-bar span { display: block; height: 100%; background: var(--action); }
.ps-cart-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ps-cart-list li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); font-size: 12px; }
.ps-cart-list li > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ps-cart-v { color: var(--text-secondary); white-space: nowrap; }
.ps-cart-list button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); background: none; cursor: pointer; }
/* Preparar envío · 3 Encarpetar (prep_folders.js) */
.pf-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.pf-main { flex: 999 1 560px; min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pf-guides { flex: 1 1 260px; max-width: 320px; padding: 16px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.pf-label { font: 600 12px var(--font-body); color: #4c565b; }
.pf-levels { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #f7fafb; border: 1px solid #e4ebed; border-radius: 8px; }
.pf-level { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 8px 10px; background: #fff; border: 1px solid #e4ebed; border-radius: 8px; }
.pf-level > b { font: 600 13px var(--font-body); color: #087c8e; min-width: 150px; align-self: center; }
.pf-level label { display: flex; flex-direction: column; gap: 3px; font: 600 11px var(--font-body); color: #4c565b; }
.pf-level input { min-height: 32px; width: 72px; border: 1px solid #8a969b; border-radius: 6px; padding: 0 6px; font: 500 12px var(--font-body); }
.pf-level > span { align-self: center; }
.pf-x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #cfd8db; background: #fff; color: #4c565b; cursor: pointer; }
.pf-x[data-rm] { margin-left: auto; }
.pf-add-level { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-add-level > span:last-child { display: contents; }
.pf-addlv { min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px dashed #8a969b; background: #fff; color: #12181b; font: 600 12px var(--font-body); cursor: pointer; }
.pf-addlv:hover, .pf-addlv:focus-visible { border-color: #087c8e; }
.pf-filter { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pf-chipgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-chip { min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid #cfd8db; background: #fff; color: #12181b; font: 600 12px var(--font-body); cursor: pointer; }
.pf-chip span { opacity: .7; }
.pf-chip.on { background: #087c8e; border-color: #087c8e; color: #fff; }
.pf-tools { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 10px; border: 1px solid #e4ebed; border-radius: 8px; }
.pf-inline { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pf-inline select, .pf-inline input:not([type=checkbox]) { min-height: 32px; border: 1px solid #8a969b; border-radius: 6px; padding: 0 8px; font: 500 13px var(--font-body); }
.pf-hint { flex-basis: 100%; }
.pf-sel { color: #087c8e; font-weight: 600; }
.pf-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-new input { width: 220px; }
.pf-quick { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-quick > span:last-child { display: contents; }
.pf-clash { margin: 0; padding: 8px 10px; background: #fbecec; color: #9b1c1c; border-radius: 8px; font-size: 12px; }
.pf-clash[hidden] { display: none; }
.pf-ok { color: #3f7d1b !important; }
.pf-tree { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pf-folder { border: 1px solid #e4ebed; border-radius: 10px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.pf-empty { border-style: dashed; background: #fbfcfc; }
.pf-root { background: #f3f7f8; }
.pf-fhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #4c565b; }
.pf-fhead b { font: 500 14px var(--font-mono); color: #12181b; }
.pf-root .pf-fhead b { font-family: var(--font-body); font-weight: 600; }
.pf-detail { flex: 1; color: #66737a; }
.pf-btn { min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid #cfd8db; background: #fff; font: 600 12px var(--font-body); color: #12181b; cursor: pointer; }
.pf-btn:hover, .pf-btn:focus-visible { border-color: #087c8e; }
.pf-dash { border-style: dashed; border-color: #5f6b70; }
.pf-del { border-color: #f2c9c9; color: #9b1c1c; }
.pf-del:hover, .pf-del:focus-visible { border-color: #9b1c1c; }
.pf-mv { display: flex; align-items: center; gap: 4px; font: 600 11px var(--font-body); color: #4c565b; }
.pf-mv select { min-height: 30px; max-width: 180px; border: 1px solid #8a969b; border-radius: 6px; padding: 0 4px; font: 500 12px var(--font-body); }
.pf-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-edit input { min-height: 32px; width: 240px; border: 1px solid #087c8e; border-radius: 6px; padding: 0 8px; font: 500 13px var(--font-body); }
.pf-gdrop { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 32px; padding: 4px 6px; border: 1px dashed #d6dfe2; border-radius: 6px; }
.pf-glabel { font: 600 11px var(--font-body); color: #66737a; }
.pf-gchip { display: inline-flex; align-items: center; gap: 2px; font: 600 11px var(--font-body); padding: 2px 2px 2px 8px; border-radius: 6px; background: #fff4e0; color: #8a5300; max-width: 260px; }
.pf-gchip button { width: 24px; height: 24px; border: 0; border-radius: 4px; background: none; color: #8a5300; cursor: pointer; font-size: 14px; }
.pf-gchip button:hover { background: #ffe6bf; }
.pf-gh { margin: 0; font: 500 15px var(--font-display); color: #12181b; }
.pf-disk { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 0; background: #0a1315; color: #fff; font: 600 13px var(--font-body); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.pf-disk svg { color: #22c9dd; }
.pf-disk:hover, .pf-disk:focus-visible { background: #1c2a2d; }
.pf-disk:disabled { opacity: .6; cursor: default; }
.pf-target { display: flex; flex-direction: column; gap: 4px; font: 600 12px var(--font-body); color: #12181b; }
.pf-target select { min-height: 34px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 8px; font: 500 12px var(--font-body); }
.pf-glist, #pf-uploads { display: flex; flex-direction: column; gap: 6px; }
.pf-gitem { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 10px; border: 1px solid #e4ebed; border-radius: 8px; background: #f7fafb; font: 500 13px var(--font-body); color: #12181b; cursor: grab; }
.pf-gname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-hint { font-weight: 400; font-size: 12px; color: #4c565b; }
.prep-warn { color: #8a5300; font-weight: 600; }
.prep-glance { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.prep-n { width: 72px; }
.prep-list { margin: 6px 0 0; padding-left: 18px; font-size: 12px; max-height: 220px; overflow: auto; }
.prep-folders { display: flex; flex-direction: column; gap: 6px; border: 1px solid #e4ebed; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.pf-inline, .pf-mv { white-space: nowrap; }
.pf-tools .refpart label { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.pf-tools .refpart select { min-height: 32px; border: 1px solid #8a969b; border-radius: 6px; padding: 0 6px; font: 500 12px var(--font-body); max-width: 220px; }
.prep-form input:not([type=checkbox]), .prep-form select { min-height: 40px; border: 1px solid #8a969b; border-radius: 8px; padding: 0 10px; font: 500 14px var(--font-body); background: #fff; box-sizing: border-box; }
.prep-name input:not([type=checkbox]) { min-height: 34px; font: 500 13px var(--font-mono); }
.prep-form input[type=date] { min-width: 150px; }
.prep-form input[name=time] { width: 76px; flex: 0 0 auto; }
.prep-form textarea { border: 1px solid #8a969b; border-radius: 8px; padding: 8px 10px; font: 400 14px var(--font-body); }
.prep-hint { line-height: 1.35; }
/* Capçalera del lot (macros.lot_crumbs): la mateixa a totes les pantalles del lot */
.topbar:has(.lc-path) { height: auto; flex-wrap: wrap; padding-top: 8px; row-gap: 0; }
.topbar:has(.lc-path) .crumbs { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font: 500 14px var(--font-body); }
.topbar:has(.lc-path) .lt-tabs { flex: 1 1 100%; }
.crumbs .lc-path a { color: var(--brand-text, #087c8e); }
.crumbs .lc-path b { color: var(--ink); }
.lc-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; flex: 1 1 auto; min-width: 0; }
.lc-sep { color: var(--muted, #66737a); }
.lc-client { color: var(--muted, #66737a); }
.fe-link { font-family: var(--font-mono); font-weight: 500; color: var(--brand-text, #087c8e); text-decoration: underline; text-underline-offset: 3px; }
.lc-go { display: flex; align-items: center; gap: 10px; margin: 0; }
.lc-go input[name=fe] { min-height: 32px; width: 170px; border: 1px solid #cfd8db; border-radius: 8px; padding: 0 10px; font: 500 13px var(--font-body); }
.lc-all { font-weight: 600; white-space: nowrap; }
/* Barra de filtres comuna (.fbar, static/js/fbar.js): buscar · filtres típics · Avanzados (n) · Limpiar · actius */
.fbar { background: #fff; border: 1px solid #e4ebed; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.fbar-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fbar-q { flex: 1 1 260px; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 9px 12px 9px 36px; border: 1px solid #cfd8db; border-radius: 8px; font: 400 14px/1.4 var(--font-body); resize: none; overflow: hidden;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366737a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 12px 12px; }
.fbar-q:focus-visible, .fbar-sel:focus-visible { outline: 2px solid #087c8e; outline-offset: 1px; }
.fbar-sel { min-height: 40px; border: 1px solid #cfd8db; border-radius: 8px; padding: 0 10px; font: 500 14px var(--font-body); background: #fff; color: #12181b; max-width: 260px; }
.fbar-field { display: flex; flex-direction: column; gap: 4px; font: 600 12px var(--font-body); color: #4c565b; min-width: 0; }
.fbar-field .fbar-sel, .fbar-field input { width: 100%; max-width: none; box-sizing: border-box; }
.fbar-field input { min-height: 40px; border: 1px solid #cfd8db; border-radius: 8px; padding: 0 10px; font: 500 14px var(--font-body); }
.fbar-seg { display: inline-flex; border: 1px solid #cfd8db; border-radius: 8px; overflow: hidden; }
.fbar-seg > * { min-height: 38px; padding: 0 12px; border: 0; background: #fff; color: #12181b; font: 600 13px var(--font-body); display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; }
.fbar-seg > [aria-pressed="true"], .fbar-seg > [aria-current="page"] { background: #087c8e; color: #fff; }
.fbar-adv { position: relative; }
.fbar-adv > summary { list-style: none; min-height: 40px; padding: 0 14px; border: 1px solid #cfd8db; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--font-body); cursor: pointer; background: #fff; }
.fbar-adv > summary::-webkit-details-marker { display: none; }
.fbar-adv[open] > summary { border-color: #087c8e; color: #087c8e; }
.fbar-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #087c8e; color: #fff; font: 600 11px var(--font-body); display: inline-flex; align-items: center; justify-content: center; }
.fbar-panel { border-top: 1px dashed #cfd8db; padding-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.fbar-panel[hidden] { display: none; }
.fbar-clear { font: 600 13px var(--font-body); color: #087c8e; padding: 0 4px; }
.fbar-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fbar-active > span { font: 600 12px var(--font-body); color: #66737a; }
.fbar-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 4px 0 10px; border-radius: 999px; border: 1px solid #cfd8db; background: #e6f4f6; color: #12181b; font: 600 12px var(--font-body); text-decoration: none; }
.fbar-chip b { color: #087c8e; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbar-chip i { font-style: normal; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: #66737a; }
.fbar-chip:hover i { color: #9b1c1c; }
.fbar-spacer { flex: 1; }
@media (max-width: 600px) { .fbar-sel { max-width: none; flex: 1 1 140px; } }
.fbar-adv[open] > .fbar-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(680px, 86vw); background: #fff; border: 1px solid #cfd8db; border-radius: 12px; box-shadow: 0 10px 30px rgba(10, 19, 21, .14); padding: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
@media (max-width: 600px) { .fbar-adv { position: static; } .fbar-adv[open] > .fbar-pop { left: 12px; right: 12px; width: auto; } }
.fbar-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-head .pl-fbar { margin: 0; padding: 6px 8px; flex: 1 1 520px; border: 0; background: transparent; }
.pl-head .pl-fbar .pl-filter { width: auto; }
/* QC · Producción */
.qp-tot, .qp-gal { padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.qp-kpis { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.qp-kpis div { display: flex; flex-direction: column; }
.qp-kpis b { font: 500 28px var(--font-display); color: #12181b; font-variant-numeric: tabular-nums; }
.qp-kpis span { font-size: 13px; color: #4c565b; }
.qp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.qp-tile { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.qp-tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: #f3f7f8; border-radius: 2px; }
.qp-tile figcaption { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
/* Accions que esborren o anul·len (confirm.js) */
.btn-danger { background: #fff; color: #9b1c1c; border: 1px solid #e3b3b3; }
.btn-danger:hover, .btn-danger:focus-visible { background: #fbecec; border-color: #9b1c1c; }
.cf-strip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: #fbecec; color: #12181b; font-size: 13px; }
.btn-ghost { background: transparent; border: 1px solid transparent; color: #087c8e; }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: #cfd8db; }
.fbar { position: relative; }
.fbar .fbar-adv { position: static; }
.fbar-adv[open] > .fbar-pop { left: 12px; right: 12px; width: auto; }
.pl-head { position: relative; }
.refpart label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; }
.refpart select { min-height: 32px; border: 1px solid #cfd8db; border-radius: 6px; padding: 0 6px; font: 500 12px var(--font-body); max-width: 200px; }
/* Planning: comptador, semàfor i termini a la targeta */
.pl-counter { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #4c565b; margin: 4px 0; font-variant-numeric: tabular-nums; }
.pl-cbar { height: 5px; background: #e4ebed; border-radius: 3px; overflow: hidden; display: block; }
.pl-cbar u { display: block; height: 100%; background: #087c8e; }
.pl-due { display: inline-flex; align-items: center; gap: 5px; }
.pl-light { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.pl-light-ok { background: #3f7d1b; } .pl-light-risk { background: #b45309; } .pl-light-late { background: #9b1c1c; }
.pl-term { padding: 0 7px; border: 1px solid #cfd8db; border-radius: 999px; font: 600 11px var(--font-body); color: #12181b; white-space: nowrap; }
.pl-live.pl-live-off { color: #9b1c1c; }
.pl-live.pl-live-off::before { background: #9b1c1c !important; }
.pl-fix { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; margin-top: 8px; border: 1px solid #b45309; background: #fff4e0; border-radius: 10px; color: #12181b; text-decoration: none; font-size: 13px; }
.pl-fix:hover, .pl-fix:focus-visible { border-color: #8a5300; outline: none; box-shadow: 0 0 0 2px #f2c94c; }
.pl-fix-k { font: 600 11px var(--font-body); color: #8a5300; text-transform: uppercase; letter-spacing: .5px; }
.pl-fix .pl-cbar u { background: #b45309; }
.pl-fixed { font-size: 12px; color: #8a5300; margin: 2px 0; }
/* Comparador comú (compare.js): cortineta, al costat o tres */
.pc-box { position: fixed; inset: 0; z-index: 1200; background: #0a1315; display: flex; flex-direction: column; color: #e8f0f2; }
.pc-box[hidden] { display: none; }
.pc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px max(16px, env(safe-area-inset-left, 0px)); }
.pc-modes { display: inline-flex; border: 1px solid #33494f; border-radius: 8px; overflow: hidden; }
.pc-modes button, .pc-b { min-height: 40px; padding: 0 14px; border: 0; background: transparent; color: #e8f0f2; font: 600 13px var(--font-body); cursor: pointer; }
.pc-b { border: 1px solid #33494f; border-radius: 8px; }
.pc-modes button[aria-pressed="true"], .pc-b[aria-pressed="true"] { background: #22c9dd; color: #0a1315; }
.pc-modes button:focus-visible, .pc-b:focus-visible { outline: 2px solid #22c9dd; outline-offset: 2px; }
.pc-name { flex: 1; min-width: 0; font: 500 13px var(--font-mono); color: #b4c2c6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-stage { flex: 1; min-height: 0; position: relative; padding: 0 16px 16px; --ox: 50%; --oy: 40%; display: flex; justify-content: center; }
.pc-slider { position: relative; width: 100%; height: 100%; margin: 0 auto; overflow: hidden; touch-action: pan-y; }
.pc-slider[hidden], .pc-grid[hidden] { display: none; }
.pc-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.pc-slider .pc-ia { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.pc-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.pc-knob { position: absolute; top: 50%; left: var(--pos, 50%); transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0a1315; display: flex; align-items: center; justify-content: center; font-weight: 700; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.pc-lab { position: absolute; top: 10px; background: rgba(255,255,255,.92); color: #12181b; border-radius: 999px; padding: 3px 10px; font: 700 12px var(--font-body); pointer-events: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-lab.l { left: 10px; } .pc-lab.r { right: 10px; }
.pc-slider input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; height: 100%; }
.pc-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: hidden; }
.pc-fig img { flex: 1; min-height: 0; width: 100%; object-fit: contain; display: block; }
.pc-fig figcaption { color: #b4c2c6; font: 700 12px var(--font-body); text-align: center; }
.pc-box.pc-full .pc-slider img, .pc-box.pc-full .pc-fig img { object-fit: none; object-position: var(--ox) var(--oy); }
@media (max-width: 760px) { .pc-stage { padding: 0 8px 8px; overflow-y: auto; } .pc-grid, .pc-grid.three { grid-template-columns: 1fr; height: auto; } .pc-fig img { flex: none; height: 60vh; } }
/* Accessibilitat comuna (anàlisi UI/UX): focus visible a tot el que es pot clicar i dits als mòbils */
button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .chip:focus-visible, a:focus-visible { outline: 2px solid #087c8e; outline-offset: 2px; }
.btn:not(.btn-primary):not(.btn-secondary):not(.btn-danger):not(.btn-ghost) { background: #fff; color: #12181b; border: 1px solid #cfd8db; }
@media (pointer: coarse) {
  .btn, .btn-sm, button.chip, .chip, .fbar-chip, .lbtn, .pr-fbtn, .pf-btn, .pf-chip, .qc-chip, .rv-btn, .pl-toast button { min-height: 44px; }
  .fbar-chip i, .pf-gchip button { width: 32px; height: 32px; }
}
/* Revisió: les accions sobre la selecció només quan n'hi ha */
.js .labelbar:not(.has-sel) .lbtn, .js .labelbar:not(.has-sel) #approveSel, .js .labelbar:not(.has-sel) #finishSel { display: none; }
/* Mòbil: planning una columna cada vegada (lliscant) i galeries en graella de 3 */
@media (max-width: 700px) {
  .pl-board { scroll-snap-type: x mandatory; }
  .pl-board .pl-col { min-width: calc(100vw - 40px); max-width: calc(100vw - 40px); scroll-snap-align: start; }
  .qc-grid, .lp-grid, .qp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 4px !important; }
  .jgrid .jitem { flex-basis: calc(33.333% - 6px) !important; flex-grow: 0 !important; }
}

/* historial de versiones del visor */
.vh summary{cursor:pointer;list-style:none}
.vh-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.vh-item{border-left:2px solid rgba(255,255,255,.18);padding:2px 0 2px 10px}
.vh-item.is-latest{border-left-color:var(--accent-dark,#22c9dd)}
.vh-head{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.vh-step.vh-aprobada,.vh-step.vh-aceptada{color:#7fd8a5}
.vh-step.vh-cambios,.vh-step.vh-cambios_cliente{color:#f2b36b}
.vh-acts{gap:6px;margin-top:4px;flex-wrap:wrap}

/* Control del lot (lot_control.html): cadena de baules, encallats i taula producte × vista */
.ct-chain { display: grid; grid-template-columns: repeat(9, minmax(96px, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; background: var(--surface-raised); margin-bottom: 6px; }
.ct-link { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-right: 1px solid var(--border); color: var(--ink); text-decoration: none; min-width: 96px; }
.ct-link:last-child { border-right: 0; }
.ct-link:hover, .ct-link[aria-current] { background: var(--brand-wash); }
.ct-n { font: 500 22px/28px var(--font-display); font-variant-numeric: tabular-nums; }
.ct-n small { font: 400 13px var(--font-body); color: var(--text-secondary); }
.ct-lab { font-size: 13px; color: var(--text-secondary); }
.ct-bar { height: 4px; border-radius: 2px; background: var(--surface-muted); overflow: hidden; }
.ct-bar i { display: block; height: 100%; background: var(--success); }
.ct-p { font-size: 12px; font-weight: 600; color: var(--warning); }
.ct-all .ct-p { color: var(--success); }
.ct-note { margin: 4px 0 18px; max-width: 90ch; }
.ct-h2 { font-size: 18px; margin-bottom: 8px; }
.ct-stuck-wrap { margin-bottom: 20px; }
.ct-stuck { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); margin-bottom: 6px; }
.ct-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.ct-row:last-child { border-bottom: 0; }
.ct-dot { width: 10px; height: 10px; border-radius: 50%; }
.ct-late { background: var(--danger); } .ct-risk { background: var(--warning); } .ct-new { background: var(--text-muted); }
.ct-age { font-size: 13px; color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ct-ok { color: var(--success); font-weight: 600; }
.ct-warn { color: var(--warning); font-weight: 600; }
.ct-empty { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ct-tbl table { min-width: 980px; }
.ct-c { text-align: center; padding-left: 3px !important; padding-right: 3px !important; }
.ct-c abbr { text-decoration: none; }
.ct-s { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 6px; font: 600 12px var(--font-body); }
.ct-ok.ct-s { background: var(--success-bg); color: var(--success); }
.ct-no { background: var(--danger-bg); color: var(--danger); }
.ct-pd { background: var(--warning-bg); color: var(--warning); }
.ct-na { background: var(--surface-muted); color: var(--text-secondary); }
.ct-wt { color: var(--border-strong); }
.ct-tag { display: inline-flex; padding: 1px 8px; border-radius: 999px; font: 600 12px/18px var(--font-body); white-space: nowrap; text-decoration: none; }
.ct-tag-ok { background: var(--success-bg); color: var(--success); }
.ct-tag-no { background: var(--danger-bg); color: var(--danger); }
.ct-tag-pd { background: var(--warning-bg); color: var(--warning); }
.ct-disc td { color: var(--text-secondary); }
.ct-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 4px; align-items: center; }
.ct-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.ct-csv { margin-left: auto; }
@media (max-width: 640px) { .ct-row { grid-template-columns: 12px 1fr; } .ct-row .ct-age, .ct-row .btn { grid-column: 2; justify-self: start; } }
.ct-row { grid-template-columns: 12px 1fr auto auto auto; }
.ct-row .ct-claimed { grid-column: 2 / -1; color: var(--text-secondary); margin-top: -4px; }
.ct-claim > summary { list-style: none; }
.ct-claim > summary::-webkit-details-marker { display: none; }
.ct-claim[open] { grid-column: 1 / -1; order: 10; }
.ct-claim-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.ct-claim-form fieldset { border: 0; padding: 0; margin: 0; }
.ct-claim-form legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.ct-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; font-size: 14px; }
.ct-claim-form .btn-primary { align-self: flex-start; }
.nav .nb-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-bright); color: var(--night); font: 600 12px/20px var(--font-body); text-align: center; }
.inbox { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); }
.inbox a.ib-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.inbox a.ib-row:last-child { border-bottom: 0; }
.inbox a.ib-row:hover { background: var(--surface-muted); }
.ib-dot { width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--brand); }
.ib-read .ib-dot { background: transparent; }
.ib-read { color: var(--text-secondary) !important; }
.ib-body { display: block; font-size: 14px; color: var(--text-secondary); white-space: pre-line; }
@media (max-width: 640px) { .ct-row { grid-template-columns: 12px 1fr; } .ct-row .ct-acts, .ct-row .ct-claim { grid-column: 2; justify-self: start; } }
.ct-en { display: flex; flex-direction: column; gap: 4px; }
.ct-en-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.ct-en-head .lbl { margin: 0; }
.ct-tag-na { background: var(--surface-muted); color: var(--text-secondary); }
.ct-waive { margin-bottom: 10px; }
.ct-waive > summary { list-style: none; }
.ct-waive > summary::-webkit-details-marker { display: none; }
.ct-waive-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.ct-waive-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ct-waive-row select, .ct-waive-row input { display: block; width: 100%; margin-top: 4px; font: 400 15px/24px var(--font-body); padding: 7px 12px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--surface-raised); color: var(--ink); }
.ct-charge { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 14px; }
.ct-charge legend { font-weight: 600; margin-bottom: 4px; }
.rv-endwarn { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--warning); background: var(--warning-bg); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }
.rv-endwarn p { margin: 0; color: var(--ink); }
.rv-endwarn input { font: inherit; padding: 6px 10px; border: 1px solid var(--border-control); border-radius: 8px; }
.rv-endwarn input[aria-invalid] { border-color: var(--danger); }
.rv-endacts { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-btn-pri { background: var(--action); color: var(--on-action); border-color: var(--action); }
.co-pending { display: flex; flex-direction: column; gap: 6px; border-color: var(--warning); background: var(--warning-bg); }
.co-pending input { font: inherit; padding: 8px 12px; border: 1px solid var(--border-control); border-radius: 8px; }
.ct-finish { margin-bottom: 16px; border-color: var(--warning); background: var(--warning-bg); color: var(--ink); padding: 14px 18px; }
.pl-ctl { display: inline-block; margin-top: 4px; padding: 0 8px; border-radius: 999px; font: 600 11.5px/18px var(--font-body); background: var(--warning-bg); color: var(--warning); text-decoration: none; }
.pl-ctl-late { background: var(--danger-bg); color: var(--danger); }
.ad-card { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.ad-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.ad-go { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.ad-go p { margin: 0; }
.stg-strip { margin: -8px 0 16px; padding: 8px 14px; border-radius: 8px; background: #6b21a8; color: #fff; font-size: 13.5px; }
.stg-strip b { letter-spacing: 1px; }
.ps-peek { position: relative; }
.ps-peek > summary { list-style: none; }
.ps-peek > summary::-webkit-details-marker { display: none; }
.ps-peek-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(560px, 92vw); max-height: 70vh; overflow: auto; display: block; }
.ps-peek-body[hidden] { display: none; }
.rv-todo { margin: 2px 0 6px 34px; font-size: 13px; }
.rv-todo summary { cursor: pointer; color: var(--warning); font-weight: 600; }
.rv-todo ul { margin: 4px 0 0; padding-left: 18px; }
