/* Portal La Imagería — estilo de laimageria.com: blanco y negro, esquinas rectas, Bodoni + Roboto Mono */
:root {
  /* Marca: negro #020E0F, texto #545454, gris #A2AAB0, salvia #D0D3C5, rojo #D73A31 (solo avisos) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --tile: #f1f1ef;
  --ink: #020e0f;
  --ink-2: #2d3233;
  --text: #545454;
  --muted: #7d8284;
  --line: #e7e7e4;
  --line-strong: #cfd0cc;
  --accent: #020e0f;
  --accent-hover: #000000;
  --accent-soft: #efefec;
  --brand-red: #d73a31;
  --brand-teal: #56b1bf;
  --brand-sage: #d0d3c5;
  --ok: #3e7a5e;
  --ok-soft: #e7f0eb;
  --warn: #8a6a2a;
  --warn-soft: #ebe9df;
  --danger: #d73a31;
  --danger-soft: #fbe7e5;
  --dark: #020e0f;
  --dark-2: #141c1d;
  --radius: 0px;
  --radius-sm: 0px;
  --shadow: none;
  --shadow-lg: 0 20px 60px rgba(2, 14, 15, .28);
  --font: "Roboto Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --top: 72px;

  --st-en_seleccion: #a2aab0;
  --st-seleccionado: #56b1bf;
  --st-en_retoque: #c8963e;
  --st-en_revision: #2d5f6b;
  --st-aprobado: #3e7a5e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
h1 { font-size: 28px; font-weight: 680; }
h2 { font-size: 17px; font-weight: 640; }
h3 { font-size: 15px; font-weight: 640; }
p { margin: 0; }
small, .muted { color: var(--muted); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.ic.lg { width: 22px; height: 22px; }
kbd { font: 600 11px var(--font); padding: 1px 6px; border-radius: 5px; border: 1px solid currentColor; opacity: .7; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  height: var(--top); padding: 0 24px;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-mark { width: 32px; height: 32px; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-size: 15.5px; font-weight: 720; letter-spacing: -.01em; }
.brand small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; color: var(--muted); }
.crumbs a, .crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--line-strong); flex: none; }
.crumbs > :last-child { color: var(--ink); font-weight: 560; }
.top-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.top-actions .nav { text-decoration: none; padding: 7px 11px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 540; }
.top-actions .nav:hover { background: var(--surface-2); }
.who { display: inline-flex; align-items: center; gap: 8px; padding-left: 14px; margin-left: 8px; border-left: 1px solid var(--line); color: var(--muted); }
.who b { color: var(--ink); font-weight: 580; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; }

main { max-width: 1760px; margin: 0 auto; padding: 28px 32px 120px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: var(--radius-sm);
  font: 580 13.5px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, .icon-btn:focus-visible, .pick:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(1, 58, 72, .25); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.small { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
form.inline { display: inline; }

/* Menú desplegable */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 260px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: 8px;
  background: none; font: 520 13.5px var(--font); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left;
}
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.menu-list small { display: block; font-weight: 450; }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 580; font-size: 13px; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; height: 40px; padding: 0 12px;
  font: 14px var(--font); color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.choice-list { display: grid; gap: 10px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-weight: 520;
  transition: border-color .12s, background .12s;
}
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: #f2f7f8; }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice b { display: block; font-weight: 620; }
.choice small { display: block; font-weight: 450; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--ink-2); }
.stepper button:hover { background: var(--surface-2); }
.stepper input { width: 64px; border: 0; border-radius: 0; text-align: center; font-weight: 650; font-size: 16px; }
.stepper input:focus { outline: 0; }

/* ---------- Estructura ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { margin-top: 6px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.page-head .sub span { display: inline-flex; align-items: center; gap: 5px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.flash { max-width: 1760px; margin: 16px auto -6px; padding: 0 32px; }
.flash > div { padding: 11px 16px; border-radius: var(--radius-sm); font-weight: 540; display: flex; gap: 8px; align-items: center; }
.flash-ok > div { background: var(--ok-soft); color: #2e5b46; }
.flash-error > div { background: var(--danger-soft); color: #8e2620; }

/* Avisos flotantes */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 540; box-shadow: var(--shadow-lg); animation: toast-in .18s ease-out; max-width: min(560px, 90vw); }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Estado ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 620; white-space: nowrap; text-decoration: none;
  background: color-mix(in srgb, var(--c) 14%, white); color: color-mix(in srgb, var(--c) 78%, black);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.st-en_seleccion { --c: var(--st-en_seleccion); }
.st-seleccionado { --c: var(--st-seleccionado); }
.st-en_retoque { --c: var(--st-en_retoque); }
.st-en_revision { --c: var(--st-en_revision); }
.st-aprobado { --c: var(--st-aprobado); }
.rv-pendiente { --c: #a2aab0; }
.rv-aprobada { --c: var(--ok); }
.rv-cambios { --c: var(--danger); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.pill.accent { background: var(--accent-soft); color: var(--accent-hover); }
.pill.ok { background: var(--ok-soft); color: #2e5b46; }
.pill.warn { background: var(--warn-soft); color: #7a5512; }

/* Resumen de estados */
.summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
@media (max-width: 860px) { .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  position: relative; display: block; padding: 16px 18px 15px; text-decoration: none; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .12s, box-shadow .12s;
}
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.stat:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15, 20, 20, .09); }
.stat b { display: block; font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-weight: 540; }
.stat .bar { margin-top: 10px; height: 4px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--c); }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; margin-bottom: -1px;
  text-decoration: none; font-weight: 580; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.tabs a.on .count { background: var(--accent-soft); color: var(--accent-hover); }

/* Barra de herramientas de la galería */
.toolbar { position: sticky; top: var(--top); z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; margin-bottom: 8px; background: var(--bg); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font: 560 13px var(--font); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.toolbar .search { width: 220px; height: 34px; }
.spacer { flex: 1; }
.sizes { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); }
.sizes button { height: 28px; min-width: 34px; padding: 0 8px; border: 0; border-radius: 7px; background: none; font: 650 12px var(--font); color: var(--muted); cursor: pointer; }
.sizes button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* ---------- Galería ---------- */
.gallery { --tile-w: 260px; }
.gallery[data-size=s] { --tile-w: 170px; }
.gallery[data-size=m] { --tile-w: 260px; }
.gallery[data-size=l] { --tile-w: 380px; }
.gallery[data-size=xl] { --tile-w: 560px; }
.ref { margin-bottom: 30px; scroll-margin-top: calc(var(--top) + 64px); }
.ref-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 2px 12px; }
.ref-head h2 { font-size: 18px; }
.ref-head .grow { flex: 1; }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--accent); }
.dots i.on { background: var(--accent); }
.ref-count { display: inline-flex; align-items: center; gap: 8px; font-weight: 620; font-variant-numeric: tabular-nums; }
.ref-count.full { color: var(--accent-hover); }
.ref-count.done::after { content: "✓"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 11px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--tile-w), 100%), 1fr)); gap: 14px; }
.tile { position: relative; margin: 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; outline: 0 solid var(--accent); transition: outline-width .1s, box-shadow .15s; }
.tile:hover { box-shadow: 0 12px 30px rgba(15, 20, 20, .14); }
.tile .frame-box { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--tile); cursor: zoom-in; overflow: hidden; }
.tile .frame-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s; }
.tile:hover .frame-box img { transform: scale(1.015); }
.tile .zoom-hint { position: absolute; left: 10px; bottom: 10px; display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 99px; background: rgba(15, 20, 20, .72); color: #fff; font-size: 12px; font-weight: 560; opacity: 0; transition: opacity .15s; }
.tile:hover .zoom-hint { opacity: 1; }
.tile .cap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px 10px; }
.tile .cap .name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.tile .cap .by { font-size: 11.5px; color: var(--accent-hover); font-weight: 600; white-space: nowrap; }
.tile.selected { outline-width: 3px; outline-offset: -3px; }
.tile.selected .cap { background: var(--accent-soft); }
.tile .corner { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; align-items: center; }
.tile .corner .badge { box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.tile .cmt-count { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 99px; background: rgba(255, 255, 255, .95); font-size: 12px; font-weight: 650; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.tile .cmt-count .ic { width: 14px; height: 14px; }
.pick {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, .95); background: rgba(15, 20, 20, .35); color: rgba(255, 255, 255, .9);
  cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); transition: transform .1s, background .12s;
}
.pick:hover { transform: scale(1.06); background: rgba(15, 20, 20, .55); }
.pick[aria-pressed=true] { background: var(--accent); border-color: #fff; color: #fff; }
.pick[disabled] { cursor: not-allowed; opacity: .6; transform: none; }
.pick .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.gallery[data-size=s] .pick { width: 32px; height: 32px; }
.gallery[data-size=s] .tile .cap { padding: 7px 9px; }
.tile .frame-box.pickable { cursor: pointer; }
.tile .zoom-hint.open-big { cursor: zoom-in; border: 0; font-family: var(--font); }
.tile .zoom-hint.open-big:hover { background: rgba(15, 20, 20, .9); }
.tile.selected .frame-box img { filter: none; }
.tile:not(.selected) .frame-box.pickable:active img { transform: scale(.985); }

/* Cuadrícula de una referencia a pantalla completa */
.refgrid { position: fixed; inset: 0; z-index: 55; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); background: #0f1414; color: #eef0ee; }
.refgrid .lb-top { min-width: 0; gap: 16px; }
.refgrid .icon-btn { color: #e3e6e4; }
.refgrid .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.refgrid .icon-btn[disabled] { opacity: .25; cursor: default; }
.rg-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rg-count { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.rg-count .dots i { border-color: #56b1bf; }
.rg-count .dots i.on { background: #56b1bf; }
.rg-main { min-height: 0; display: grid; justify-content: center; align-content: center; gap: 14px; padding: 12px 16px; }
.rg-main.scroll { align-content: start; overflow-y: auto; overflow-x: hidden; }
.rg-cell { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rg-img { position: relative; height: var(--img-h); border-radius: 10px; overflow: hidden; background: #1a2022; cursor: pointer; outline: 0 solid var(--accent); transition: outline-width .1s; }
.rg-img img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; }
.rg-cell.on .rg-img { outline-width: 4px; outline-offset: -4px; }
.rg-img .chosen-flag { display: none; }
.rg-cell.on .rg-img .chosen-flag { display: grid; }
.rg-num { position: absolute; left: 10px; top: 10px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 700; font-size: 12.5px; }
.rg-cell figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #a2aab0; height: 22px; }
.rg-cell figcaption .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-cell figcaption .by { color: #56b1bf; font-weight: 600; white-space: nowrap; }

.chip.only-sel.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Marcas de referencia: hecha / revisar luego */
.ref-marks { display: inline-flex; gap: 6px; }
.mark-btn {
  height: 32px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line-strong);
  background: var(--surface); font: 620 12.5px var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.mark-btn:hover { border-color: var(--ink-2); }
.mark-btn.hecha[aria-pressed=true] { background: var(--ok); border-color: var(--ok); color: #fff; }
.mark-btn.revisar[aria-pressed=true] { background: var(--warn); border-color: var(--warn); color: #fff; }
.mark-btn[disabled] { cursor: default; opacity: .75; }
.mark-btn[disabled]:not([aria-pressed=true]) { display: none; }
.ref[data-state=hecha] .ref-head h2::after { content: " ✓"; color: var(--ok); }
.ref[data-state=revisar] .ref-head h2::after { content: " ⚑"; color: var(--warn); }
.dark-marks .mark-btn { background: transparent; color: #e3e6e4; border-color: #3e4649; }
.dark-marks .mark-btn:hover { border-color: #a2aab0; }
.dark-marks .mark-btn.hecha[aria-pressed=true] { background: var(--ok); border-color: var(--ok); color: #fff; }
.dark-marks .mark-btn.revisar[aria-pressed=true] { background: var(--warn); border-color: var(--warn); color: #fff; }
.dark-marks .mark-btn.next { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Botón «Elegir» bajo cada foto */
.tile .pick.choose {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 20px); height: 42px; margin: 0 10px 10px; border-radius: 10px;
  border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent-hover);
  font: 650 14px var(--font); box-shadow: none; transform: none;
}
.tile .pick.choose:hover { background: var(--accent-soft); transform: none; }
.tile .pick.choose .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.tile .pick.choose .on-txt { display: none; }
.tile .pick.choose[aria-pressed=true] { background: var(--accent); color: #fff; }
.tile .pick.choose[aria-pressed=true] .on-txt { display: inline-flex; align-items: center; gap: 8px; }
.tile .pick.choose[aria-pressed=true] .off-txt { display: none; }
.tile .pick.choose .off-txt { display: inline-flex; align-items: center; gap: 8px; }
.tile .pick.choose[disabled] { opacity: .55; border-color: var(--line-strong); color: var(--muted); }
.tile .pick.choose[disabled][aria-pressed=true] { opacity: .85; background: var(--accent); color: #fff; }
.gallery[data-size=s] .tile .pick.choose { height: 34px; font-size: 12.5px; margin: 0 7px 7px; width: calc(100% - 14px); }
.chosen-flag { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.chosen-flag .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.locked-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }

/* Barra fija inferior de selección */
.dock {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 25;
  display: flex; align-items: center; gap: 18px; padding: 10px 10px 10px 20px; width: min(760px, calc(100vw - 32px));
  border-radius: 16px; background: var(--dark); color: #f3f4f2; box-shadow: var(--shadow-lg);
}
.dock .txt { flex: 1; line-height: 1.3; }
.dock .txt b { color: #fff; font-size: 15px; }
.dock .txt small { color: #a2aab0; display: block; }
.dock .progress { width: 120px; height: 6px; border-radius: 9px; background: #2e3638; overflow: hidden; }
.dock .progress i { display: block; height: 100%; background: var(--accent); transition: width .2s; }

/* Tabla */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: #f7f8f6; }
.list .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sku-cell { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 640; }
.sku-cell img, .sku-cell .ph { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--tile); flex: none; }
.over { color: var(--danger); font-weight: 650; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: var(--line-strong); margin-bottom: 10px; }
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* ---------- Proyectos ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.project-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(15, 20, 20, .12); }
.mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; aspect-ratio: 16 / 10; background: var(--tile); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--tile); }
.mosaic img:first-child { grid-row: span 2; }
.mosaic.n1 img:first-child { grid-column: span 2; }
.mosaic.n2 img:nth-child(2) { grid-row: span 2; }
.mosaic .none { grid-column: span 2; grid-row: span 2; display: grid; place-items: center; color: var(--line-strong); }
.mosaic .none .ic { width: 42px; height: 42px; }
.project-card .body { padding: 16px 18px 18px; display: grid; gap: 10px; }
.project-card h2 { font-size: 17px; }
.stack { display: flex; height: 7px; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.stack i { display: block; height: 100%; background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ---------- Subida ---------- */
.drops { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .drops { grid-template-columns: 1fr; } }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 230px; padding: 28px; border-radius: 18px; border: 2px dashed var(--line-strong); background: var(--surface);
  transition: border-color .12s, background .12s, transform .12s; cursor: pointer;
}
.drop:hover { border-color: var(--accent); }
.drop.over { border-color: var(--accent); background: #eaf3f5; transform: scale(1.01); }
.drop .big-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.drop .big-ic .ic { width: 28px; height: 28px; }
.drop.ret .big-ic { background: #e2f1f3; color: var(--st-en_revision); }
.drop h3 { font-size: 17px; }
.drop p { color: var(--muted); max-width: 340px; }
.drop .row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.drop .where { font-size: 12px; color: var(--muted); margin-top: 4px; }
.queue { margin-top: 18px; }
.queue-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.queue-head .grow { flex: 1; min-width: 200px; }
.queue-head .bar { height: 8px; border-radius: 9px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.queue-head .bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.queue-list { max-height: 420px; overflow-y: auto; }
.qrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 140px 150px; gap: 12px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.qrow:last-child { border-bottom: 0; }
.qrow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .nm small { margin-left: 6px; }
.qrow .st { font-size: 12.5px; color: var(--muted); text-align: right; }
.qrow .mini { height: 5px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.qrow .mini i { display: block; height: 100%; width: 0; background: var(--accent); }
.qrow.done .mini i { background: var(--ok); }
.qrow.err { background: #fdf3f2; }
.qrow.err .st { color: var(--danger); text-align: left; grid-column: 3 / span 2; }
.qrow.err .mini { display: none; }
.qrow .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.qrow.up .dot { background: var(--accent); animation: pulse 1s infinite; }
.qrow.done .dot { background: var(--ok); }
.qrow.err .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 700px) { .qrow { grid-template-columns: 22px 1fr 90px; } .qrow .mini { display: none; } }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.info { padding: 18px 20px; }
.info h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.info p { color: var(--ink-2); }
.info p + p { margin-top: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin-top: 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.sync-box { display: flex; align-items: center; gap: 12px; padding: 13px 18px; margin-bottom: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sync-box .grow { flex: 1; }
.sync-box .bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.sync-box .bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.sync-box ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Asistente de proyecto ---------- */
.wizard { max-width: 860px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 24px; border-bottom: 1px solid var(--line); }
.step:last-of-type { border-bottom: 0; }
.step-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; }
.step h2 { margin: 5px 0 14px; }
.folder-list { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.folder-list .choice { align-items: center; }
.folder-list .meta { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.folder-list .meta b { color: var(--ink); }
.wizard-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; background: #f7f8f6; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Visor (pantalla completa y página de revisión) ---------- */
.zoom-stage { position: relative; overflow: hidden; touch-action: none; user-select: none; cursor: grab; }
.zoom-stage.dragging { cursor: grabbing; }
.zoom-stage.pinnable { cursor: crosshair; }
.zoom-stage.pinnable.dragging { cursor: grabbing; }
.zoom-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.zoom-layer img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; -webkit-user-drag: none; pointer-events: none; }
.zoom-layer .pins { position: absolute; inset: 0; }
.pin-at { position: absolute; width: 0; height: 0; transform: scale(var(--inv, 1)); transform-origin: 0 0; }
.pinmark {
  position: absolute; left: 0; top: -30px; width: 30px; height: 30px; padding: 0;
  border-radius: 50% 50% 50% 0; rotate: -45deg; transform-origin: 0 100%;
  background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
  display: grid; place-items: center; cursor: pointer;
}
.pinmark span { rotate: 45deg; color: #fff; font: 750 12.5px var(--font); line-height: 1; }
.pinmark.draft { background: var(--ink); animation: pulse 1.2s infinite; }
.pin-at.hl { z-index: 3; }
.pin-at.hl .pinmark { background: var(--ink); }

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); background: #0f1414; color: #eef0ee; outline: 0; }
.lb-top, .lb-bottom, .lb-main { min-width: 0; }
.strip { min-width: 0; }
.lb-title { flex: 1 1 auto; }
.lb-tools, .lb-pick { flex: none; }
.lb-top, .lb-bottom { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.lb-top { justify-content: space-between; border-bottom: 1px solid #263033; }
.lb-title { min-width: 0; line-height: 1.25; }
.lb-title b { font-size: 15px; }
.lb-title small { display: block; color: #a2aab0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-tools { display: flex; align-items: center; gap: 4px; }
.lb-tools .zoom-val { min-width: 58px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; color: #cdd2d4; }
.lightbox .icon-btn, .review .icon-btn { color: #e3e6e4; }
.lightbox .icon-btn:hover, .review .stage-bar .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lb-main { position: relative; min-height: 0; }
.lb-main .zoom-stage { position: absolute; inset: 0; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background .12s;
}
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-nav[disabled] { opacity: .2; cursor: default; }
.lb-nav .ic { width: 26px; height: 26px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-bottom { border-top: 1px solid #263033; gap: 16px; }
.strip { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 4px 2px; scrollbar-width: thin; }
.strip button, .strip a { position: relative; flex: none; width: 58px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; background: #1c2224; cursor: pointer; opacity: .6; transition: opacity .12s; }
.strip button:hover, .strip a:hover { opacity: .9; }
.strip .cur { border-color: #fff; opacity: 1; }
.strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip .sel::after { content: ""; position: absolute; right: 4px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.strip .rv { position: absolute; left: 4px; bottom: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 2px solid #fff; }
.lb-pick { display: flex; align-items: center; gap: 14px; flex: none; }
.lb-pick .cnt { text-align: right; line-height: 1.25; }
.lb-pick .cnt small { display: block; color: #a2aab0; }
.lb-pick .btn { min-width: 180px; height: 46px; font-size: 15px; }
.lb-pick .btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lb-pick .btn.is-off { background: #eef0ee; border-color: #eef0ee; color: var(--ink); }
.lb-help { color: #8a9196; font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .lb-help, .lb-tools .zoom-val { display: none; } .lb-pick .btn { min-width: 0; } .lb-nav { width: 42px; height: 42px; } }

/* Página de revisión */
.viewer-page main { max-width: none; padding: 0; }
.viewer-page .flash { position: fixed; top: calc(var(--top) + 10px); left: 50%; transform: translateX(-50%); margin: 0; z-index: 40; padding: 0; }
.review { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: calc(100vh - var(--top)); }
.stage-wrap { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; background: #6e7376; }
.stage-wrap .zoom-stage { min-height: 0; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 50px; padding: 0 12px; background: #262c2e; color: #e3e6e4; }
.stage-bar .group { display: flex; align-items: center; gap: 4px; }
.stage-bar .icon-btn.on { background: rgba(255, 255, 255, .16); color: #fff; }
.stage-bar .zoom-val { min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.stage-bar a.icon-btn[aria-disabled=true] { opacity: .3; pointer-events: none; }
.stage-wrap .strip { background: #1c2224; padding: 8px 12px; flex: none; }
.stage-wrap .strip a { width: 54px; height: 66px; }

.panel { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.panel-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; word-break: break-all; }
.panel-head .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.decision { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.decision .btn { height: 44px; }
.decision .btn.on-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.decision .btn.on-changes { background: var(--danger); border-color: var(--danger); color: #fff; }
.review-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.thread { flex: 1; overflow-y: auto; padding: 10px 12px; }
.thread-empty { text-align: center; color: var(--muted); padding: 44px 18px; }
.thread-empty .ic { width: 38px; height: 38px; color: var(--line-strong); }
.thread-empty b { display: block; color: var(--ink); margin: 6px 0 2px; }
.cmt { display: flex; gap: 11px; padding: 11px 10px; border-radius: 10px; cursor: default; }
.cmt.pinned { cursor: pointer; }
.cmt:hover, .cmt.hl { background: #f1f4f4; }
.cmt .num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 750; background: var(--accent); color: #fff; }
.cmt .num.general { background: var(--surface-2); color: var(--muted); }
.cmt .who-line { font-size: 12.5px; color: var(--muted); }
.cmt .who-line b { font-weight: 650; color: var(--ink); }
.cmt .who-line .tag { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); margin-left: 4px; }
.cmt .who-line .tag.team { background: var(--accent-soft); color: var(--accent-hover); }
.cmt p { margin: 3px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.composer { border-top: 1px solid var(--line); padding: 12px 16px 16px; background: #fafaf9; }
.composer .where { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; min-height: 26px; }
.composer .where b { color: var(--accent-hover); }
.composer textarea { min-height: 80px; background: #fff; }
.composer .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.select-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-top: 14px; border-radius: 10px; background: var(--surface-2); }
.select-box .pick { border-color: var(--line-strong); background: #fff; color: var(--line-strong); box-shadow: none; }
.select-box .pick[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (max-width: 960px) {
  .review { grid-template-columns: 1fr; height: auto; }
  .stage-wrap { height: 70vh; }
}

/* ---------- Acceso ---------- */
.auth { min-height: calc(100vh - var(--top) - 120px); display: grid; place-items: center; padding: 24px; }
.auth .card { width: 100%; max-width: 410px; padding: 32px; }
.auth h1 { font-size: 23px; margin-bottom: 6px; }
.auth p { color: var(--muted); margin: 0 0 22px; }
.auth .btn { width: 100%; height: 44px; }
.error { color: #8e2620; background: var(--danger-soft); padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 540; }

/* ---------- Enlaces ---------- */
.link-url { display: flex; gap: 6px; align-items: center; }
.link-url input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; height: 34px; }
.created { border: 1px solid var(--ok); background: var(--ok-soft); padding: 18px 20px; border-radius: var(--radius); margin-bottom: 18px; }
.created h2 { margin-bottom: 10px; color: #2e5b46; display: flex; gap: 8px; align-items: center; }

dialog { border: 0; border-radius: 16px; padding: 26px; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog::backdrop { background: rgba(15, 20, 20, .5); }
dialog h2 { margin-bottom: 8px; font-size: 20px; }
dialog p { color: var(--ink-2); margin: 0 0 14px; }
dialog .actions { justify-content: flex-end; margin-top: 18px; }
dialog ul { margin: 0; padding: 10px 14px 10px 30px; max-height: 220px; overflow-y: auto; background: var(--warn-soft); border-radius: 10px; color: #6d4c12; }

/* =====================================================================
   Identidad laimageria.com
   Negro y blanco, esquinas rectas, sin sombras.
   Títulos: Bodoni Moda en mayúsculas · Texto y botones: Roboto Mono · Menú: Inter espaciado
   ===================================================================== */
body { font-weight: 400; font-size: 13.5px; color: var(--text); }
h1, h2, h3 { color: var(--ink); letter-spacing: 0; }
h1 { font: 800 34px/1.1 var(--font-display); text-transform: uppercase; }
.ref-head h2, .project-card h2, dialog h2, .empty h2, .step h2, .card.pad > h2, .info h3, .auth h1, .panel-head h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em;
}
.ref-head h2 { font-size: 20px; }
.panel-head h2 { font-size: 15px; word-break: break-all; }
code { background: var(--surface-2); border-radius: 0; color: var(--ink-2); }
small, .muted { color: var(--muted); }

/* Cabecera negra como la web */
.topbar { background: var(--dark); border-bottom: 0; color: #fff; padding: 0 32px; gap: 28px; }
.brand { gap: 16px; }
.brand img { height: 20px; width: auto; display: block; }
.brand small { font: 600 10px var(--font-ui); letter-spacing: .4em; text-transform: uppercase; color: #a2aab0; padding-left: 16px; border-left: 1px solid #3a4344; line-height: 20px; }
.crumbs { color: #a2aab0; font: 500 12px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
.crumbs a:hover, .crumbs > :last-child { color: #fff; }
.crumbs .sep { color: #3a4344; }
.top-actions .nav { font: 600 12px var(--font-ui); letter-spacing: 3px; text-transform: uppercase; color: #fff; border-radius: 0; padding: 12px 16px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; }
.top-actions .nav:hover { background: none; border-color: #fff; }
.who { border-left-color: #3a4344; color: #a2aab0; font: 500 12px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.who b { color: #fff; font-weight: 600; }
.avatar { background: #fff; color: var(--ink); border-radius: 0; font-family: var(--font-ui); }
.topbar .icon-btn { color: #fff; }
.topbar .icon-btn:hover { background: #1c2627; color: #fff; }

/* Botones rectangulares de línea fina */
.btn {
  border-radius: 0; height: 40px; padding: 0 20px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 400 12.5px var(--font); text-transform: uppercase; letter-spacing: .04em; box-shadow: none;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.btn.primary:hover { background: #fff; color: var(--ink); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { height: 32px; padding: 0 12px; font-size: 11.5px; }
.btn.big { height: 48px; padding: 0 26px; font-size: 13px; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.icon-btn { border-radius: 0; }
.menu-list { border-radius: 0; border-color: var(--ink); box-shadow: var(--shadow-lg); }
.menu-list a, .menu-list button { border-radius: 0; font-family: var(--font); font-size: 12.5px; }

/* Formularios */
label { font: 600 11px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  border-radius: 0; border-color: var(--line-strong); font-family: var(--font); font-size: 13px; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--ink); border-color: var(--ink); }
.choice { border-radius: 0; border-width: 1px; font-family: var(--font); }
.choice b { font: 600 12px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.choice input { accent-color: var(--ink); }
.stepper { border-radius: 0; }
.stepper input { font-family: var(--font); }

/* Bloques: sin sombras, línea fina */
.card { border-radius: 0; box-shadow: none; border-color: var(--line); }
.page-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.page-head .sub { font-size: 12.5px; }
.flash > div { border-radius: 0; font-family: var(--font); }
.toast { border-radius: 0; font-family: var(--font); font-size: 12.5px; background: var(--ink); }
.toast.ok { background: var(--ink); }
.toast.error { background: var(--danger); }

/* Estados: punto de color discreto sobre gris */
.badge { border-radius: 0; background: var(--surface-2); color: var(--ink-2); font: 600 10.5px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; height: 22px; }
.pill { border-radius: 0; font: 600 10.5px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; }
.pill.accent { background: var(--surface-2); color: var(--ink); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--brand-sage); color: var(--ink); }

/* Resumen */
.summary { gap: 0; border: 1px solid var(--line); }
.stat { border: 0; border-right: 1px solid var(--line); box-shadow: none; padding: 20px 22px; }
.stat:last-child { border-right: 0; }
.stat::before { height: 2px; }
.stat:hover { transform: none; box-shadow: none; background: var(--surface-2); }
.stat b { font: 800 38px/1 var(--font-display); color: var(--ink); }
.stat span { font: 600 10.5px var(--font-ui); letter-spacing: .16em; text-transform: uppercase; }

/* Pestañas como el menú de la web */
.tabs { border-bottom-color: var(--line); gap: 8px; }
.tabs a { font: 600 11.5px var(--font-ui); letter-spacing: 3px; text-transform: uppercase; color: var(--muted); padding: 14px 14px; border-bottom-width: 1px; }
.tabs a.on { color: var(--ink); border-bottom: 1px solid var(--ink); }
.tabs .count { border-radius: 0; letter-spacing: .06em; background: var(--surface-2); color: var(--ink-2); }
.tabs a.on .count { background: var(--ink); color: #fff; }

/* Herramientas */
.toolbar { background: rgba(255, 255, 255, .97); }
.chip { border-radius: 0; height: 32px; font: 600 10.5px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; border-color: var(--line-strong); }
.chip.on, .chip.only-sel.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sizes { border-radius: 0; padding: 0; gap: 0; border: 1px solid var(--line-strong); background: transparent; }
.sizes button { border-radius: 0; height: 30px; font: 600 11px var(--font-ui); }
.sizes button.on { background: var(--ink); color: #fff; box-shadow: none; }
.locked-note, .sync-box { border-radius: 0; box-shadow: none; background: var(--surface-2); border: 0; font-size: 12.5px; }

/* Galería: fotos sin marco, selección en negro */
.tiles { gap: 18px; }
.tile { border-radius: 0; box-shadow: none; background: transparent; outline-color: var(--ink); }
.tile:hover { box-shadow: none; }
.tile .frame-box { background: var(--tile); }
.tile .cap { padding: 8px 0 6px; }
.tile .cap .name { font-size: 11.5px; color: var(--text); }
.tile .cap .by { color: var(--ink); font-size: 11px; }
.tile.selected { outline-width: 2px; outline-offset: 4px; }
.tile.selected .cap { background: transparent; }
.tile .zoom-hint { border-radius: 0; background: rgba(2, 14, 15, .82); font: 400 11px var(--font); text-transform: uppercase; }
.chosen-flag { background: var(--ink); border: 2px solid #fff; border-radius: 0; box-shadow: none; }
.tile .pick.choose { border-radius: 0; border: 1px solid var(--ink); color: var(--ink); width: 100%; margin: 4px 0 0; font: 400 11.5px var(--font); letter-spacing: .04em; text-transform: uppercase; height: 36px; }
.tile .pick.choose:hover { background: var(--ink); color: #fff; }
.tile .pick.choose[aria-pressed=true] { background: var(--ink); color: #fff; }
.gallery[data-size=s] .tile .pick.choose { width: 100%; margin: 4px 0 0; height: 30px; font-size: 10.5px; }
.ref { padding-top: 6px; }
.ref-head { border-top: 1px solid var(--ink); padding-top: 14px; }
.ref-count { font-family: var(--font); color: var(--ink); }
.ref-count.full { color: var(--ink); }
.dots i { border-radius: 0; border-color: var(--ink); width: 9px; height: 9px; }
.dots i.on { background: var(--ink); }
.mark-btn { border-radius: 0; border: 1px solid var(--line-strong); font: 600 10.5px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; height: 30px; }
.mark-btn.hecha[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mark-btn.revisar[aria-pressed=true] { background: var(--brand-sage); border-color: var(--brand-sage); color: var(--ink); }
.ref[data-state=hecha] .ref-head h2::after { color: var(--ink); }
.ref[data-state=revisar] .ref-head h2::after { color: var(--muted); }

/* Barra inferior: negra y recta */
.dock { border-radius: 0; background: var(--dark); box-shadow: var(--shadow-lg); }
.dock .txt b { font: 600 12px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; }
.dock .txt small { font-size: 11.5px; color: #a2aab0; }
.dock .progress { border-radius: 0; height: 3px; background: #2a3334; }
.dock .progress i { background: #fff; }
.dock .btn.primary { background: #fff; color: var(--ink); border-color: #fff; }
.dock .btn.primary:hover { background: transparent; color: #fff; }

/* Tablas */
.list th { font: 600 10.5px var(--font-ui); letter-spacing: .16em; color: var(--muted); }
.list td { font-size: 12.5px; }
.list tbody tr:hover { background: var(--surface-2); }
.sku-cell { font: 800 14px var(--font-display); text-transform: uppercase; color: var(--ink); }
.sku-cell img, .sku-cell .ph { border-radius: 0; }

/* Portada de proyectos */
.projects { gap: 28px; }
.project-card { border: 0; }
.project-card:hover { transform: none; box-shadow: none; }
.project-card:hover .mosaic img { opacity: .9; }
.project-card .body { padding: 14px 0 0; }
.mosaic { gap: 2px; }
.stack { border-radius: 0; height: 3px; }

/* Subida, asistente, diálogos */
.drop { border-radius: 0; border: 1px dashed var(--ink); }
.drop.over { background: var(--surface-2); transform: none; }
.drop .big-ic, .drop.ret .big-ic { border-radius: 0; background: var(--ink); color: #fff; }
.drop h3 { font: 800 18px var(--font-display); text-transform: uppercase; color: var(--ink); }
.queue-head .bar, .qrow .mini, .sync-box .bar { border-radius: 0; }
.queue-head .bar i, .qrow .mini i, .sync-box .bar i { background: var(--ink); }
.step-n { border-radius: 0; font-family: var(--font-display); }
.wizard-foot { border-radius: 0; background: var(--surface-2); }
dialog { border-radius: 0; }
dialog ul { border-radius: 0; background: var(--surface-2); color: var(--ink-2); }
.error { border-radius: 0; }
.created { border-radius: 0; }

/* Vistas oscuras (en grande y cuadrícula): todo en blanco sobre negro */
.lightbox, .refgrid { background: var(--dark); }
.lb-top, .lb-bottom { border-color: #1c2627; }
.lb-title b { font: 800 16px var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.lb-title small { font-family: var(--font); }
.lb-nav { border-radius: 0; background: rgba(255, 255, 255, .08); }
.lb-pick .btn { font-family: var(--font); }
.lb-pick .btn.is-off { background: transparent; border-color: #fff; color: #fff; }
.lb-pick .btn.is-off:hover { background: #fff; color: var(--ink); }
.lb-pick .btn.is-on { background: #fff; border-color: #fff; color: var(--ink); }
.strip button, .strip a { border-radius: 0; }
.strip .cur { border-color: #fff; }
.lightbox .strip .sel::after, .refgrid .chosen-flag { background: #fff; border-color: var(--ink); color: var(--ink); }
.rg-img { border-radius: 0; outline-color: #fff; background: #0b1617; }
.rg-num { border-radius: 0; font-family: var(--font-ui); }
.rg-count, .rg-count b { font-family: var(--font); color: #fff; }
.rg-count .dots i { border-color: #fff; }
.rg-count .dots i.on { background: #fff; }
.rg-cell figcaption .by { color: #fff; }
.dark-marks .mark-btn { border-color: #3a4344; color: #fff; }
.dark-marks .mark-btn.hecha[aria-pressed=true] { background: #fff; border-color: #fff; color: var(--ink); }
.dark-marks .mark-btn.revisar[aria-pressed=true] { background: var(--brand-sage); border-color: var(--brand-sage); color: var(--ink); }

/* Página de revisión */
.stage-wrap { background: #5f6466; }
.stage-bar { background: var(--dark); }
.stage-wrap .strip { background: #0b1617; }
.decision .btn.on-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.decision .btn.on-changes { background: var(--danger); border-color: var(--danger); color: #fff; }
.cmt .num { border-radius: 0; background: var(--ink); font-family: var(--font-ui); }
.cmt .who-line .tag, .cmt .who-line .tag.team { border-radius: 0; background: var(--surface-2); color: var(--ink); }
.pinmark { background: var(--ink); }
.pin-at.hl .pinmark { background: var(--danger); }

/* Acceso: fondo negro y logotipo blanco */
.auth-page { background: var(--dark); }
.auth-page .topbar { display: none; }
.auth-page main { padding: 0; max-width: none; }
.auth-page .auth { min-height: 100vh; align-content: center; gap: 48px; }
.auth-logo { width: 320px; max-width: 72vw; height: auto; display: block; }
.auth-page .auth .card { border: 0; padding: 40px; }
.auth h1 { font-size: 26px; }
.auth p { font-size: 12.5px; }
.auth-page .flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); margin: 0; padding: 0; z-index: 40; }

/* Los códigos de referencia y archivos, en monoespaciada: en Bodoni el «1» parece una «I» */
.ref-head h2, .sku-cell, .lb-title b, .panel-head h2 { font-family: var(--font); font-weight: 500; letter-spacing: .02em; text-transform: none; }
.ref-head h2 { font-size: 18px; }
.sku-cell { font-size: 13px; }

/* Deshacer */
.toasts .toast { display: flex; align-items: center; gap: 16px; pointer-events: auto; }
.toast-action { border: 1px solid #fff; background: transparent; color: #fff; font: 600 11px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; cursor: pointer; }
.toast-action:hover { background: #fff; color: var(--ink); }
.dock .undo-btn { border-color: #3a4344; color: #fff; background: transparent; }
.dock .undo-btn:hover { border-color: #fff; background: transparent; color: #fff; }
