/* Royal Craft & Art — Inspección. Diseñada para usarse con una mano, al sol, con prisa. */
:root {
  --ink: #1E2A3A;        /* azul marino profundo: barra superior */
  --royal: #2F4F9E;      /* azul "royal": acción principal */
  --royal-dk: #24407F;
  --bg: #EDF0F3;         /* fondo frío, sin brillo */
  --card: #FFFFFF;
  --line: #D6DBE1;
  --text: #1E2A3A;
  --muted: #6B7684;
  --ok: #2F8F5B;
  --falta: #D68A0C;
  --danado: #C7362E;
  --obs: #5C6E8A;
  --pend: #9AA4B0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(30,42,58,.06), 0 4px 12px rgba(30,42,58,.05);
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.4; }
a { color: var(--royal); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; font-weight: 750; }
h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
p { margin: .35rem 0; }
code { background: #E3E8EE; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .2rem; }
.eyebrow a { color: var(--muted); }
.wrap { max-width: 720px; margin: 0 auto; padding: 1rem 1rem 6rem; }
[hidden] { display: none !important; }

/* ---------- barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: .5rem .9rem; padding-top: max(.5rem, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--royal); color: #fff; font-size: .8rem; font-weight: 800; letter-spacing: .02em; }
.brand-mark.lg { width: 56px; height: 56px; font-size: 1.3rem; border-radius: 14px; }
.tabs { display: flex; align-items: center; gap: .15rem; }
.tabs a { color: rgba(255,255,255,.75); padding: .45rem .6rem; border-radius: 8px; font-size: .9rem; font-weight: 600; }
.tabs a.on { color: #fff; background: rgba(255,255,255,.14); }
.tabs a.soon { opacity: .45; cursor: default; }
.tabs a.gear { display: inline-flex; padding: .4rem; }
.tabs a.user { font-size: .8rem; opacity: .8; }

/* ---------- login ---------- */
.login-body { background: var(--ink); }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { background: var(--card); border-radius: 18px; padding: 2rem 1.5rem; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: .8rem; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.login-card h1 { font-size: 1.3rem; }
.login-card label { text-align: left; }
.brand-big { display: grid; place-items: center; margin-bottom: .3rem; }
.error { background: #FBE9E7; color: var(--danado); padding: .6rem .8rem; border-radius: 8px; font-size: .9rem; }

/* ---------- elementos comunes ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: .9rem; }
.card.note { border-left: 4px solid var(--falta); white-space: pre-wrap; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin: .3rem 0 1rem; }
.page-head h1 { word-break: break-word; }
.section-title { margin: 1.3rem 0 .5rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.flash { background: #E8F1FF; color: var(--royal-dk); padding: .6rem .9rem; border-radius: 10px; margin-bottom: .9rem; font-weight: 600; }
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--text); }
.empty p:first-child { font-weight: 700; font-size: 1.05rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap; }
.row-wrap { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center; margin: .5rem 0; }
.stack { display: flex; flex-direction: column; gap: .35rem; }

.form label, .lbl { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .8rem; }
.form.inline { flex-direction: row; display: flex; gap: .4rem; align-items: center; margin: .4rem 0; }
.form.inline input { margin: 0; }
input, select, textarea { font: inherit; color: var(--text); border: 1.5px solid var(--line); border-radius: 10px; padding: .65rem .75rem; background: #fff; width: 100%; min-height: 44px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, [contenteditable]:focus { outline: 3px solid rgba(47,79,158,.35); outline-offset: 1px; }
.pill-check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; color: var(--text); margin: 0; flex-direction: row; }
.pill-check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--royal); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1rem; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--royal); border-color: var(--royal); color: #fff; }
.btn.primary:hover { background: var(--royal-dk); }
.btn.big { font-size: 1.05rem; min-height: 52px; padding: .7rem 1.2rem; }
.btn.small { min-height: 38px; padding: .4rem .8rem; font-size: .88rem; }
.btn.ghost { background: transparent; border-style: dashed; color: var(--royal); }
.btn.full { width: 100%; }
.btn.danger { color: var(--danado); border-color: #F0C7C3; }
.icon-btn { background: none; border: 0; font-size: 1.1rem; padding: .3rem .5rem; cursor: pointer; color: var(--muted); border-radius: 8px; min-width: 40px; min-height: 40px; }
.sticky-actions { position: fixed; left: 0; right: 0; bottom: 0; padding: .7rem 1rem; padding-bottom: max(.7rem, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgba(237,240,243,0)); display: flex; justify-content: center; z-index: 15; }
.sticky-actions > * { max-width: 720px; width: 100%; }
.sticky-actions.two { display: grid; grid-template-columns: auto 1fr; gap: .6rem; max-width: 720px; margin: 0 auto; }
.sticky-actions.two > * { width: auto; }

.toast { position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .55rem 1rem; border-radius: 999px; font-weight: 600; font-size: .9rem; z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 90vw; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danado); }

.badge { font-size: .72rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; white-space: nowrap; background: #E3E8EE; color: var(--muted); }
.badge.estado-inspeccion { background: #E8F1FF; color: var(--royal-dk); }
.badge.estado-reparacion { background: #FFF1DB; color: #9C6408; }
.badge.estado-lista { background: #E3F5EA; color: var(--ok); }

.chip { display: inline-block; font-style: normal; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: #E3E8EE; color: var(--muted); }
.chip.ok { background: #E3F5EA; color: var(--ok); }
.chip.falta { background: #FFF1DB; color: #9C6408; }
.chip.danado { background: #FBE9E7; color: var(--danado); }
.chip.observacion { background: #E7ECF3; color: var(--obs); }
.chip.pendiente { background: #EEF1F4; color: var(--pend); }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.tag { font-style: normal; font-size: .75rem; padding: .15rem .5rem; border-radius: 6px; background: #EEF1F4; color: var(--muted); }
.tag.mat { background: #FFF1DB; color: #9C6408; }

/* ---------- lista de propiedades ---------- */
.prop-list, .zona-list, .cfg-list, .res-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.prop-card { display: flex; justify-content: space-between; gap: .8rem; background: var(--card); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); color: var(--text); }
.prop-main { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.prop-addr { font-size: 1.05rem; }
.prop-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex-shrink: 0; }
.progress-mini { width: 70px; height: 6px; background: #E3E8EE; border-radius: 3px; overflow: hidden; }
.progress-mini i, .progress-big i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .3s; }
.progress-big { height: 10px; background: #E3E8EE; border-radius: 5px; overflow: hidden; margin-bottom: .7rem; }
.progress-card .btn { margin-left: auto; }

/* ---------- nueva propiedad ---------- */
.nivel-bloque { margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.nivel-bloque:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.counter-row { display: flex; align-items: center; justify-content: space-between; padding: .35rem 0; }
.counter { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.counter button { width: 44px; height: 44px; border: 0; background: #F3F5F7; font-size: 1.3rem; font-weight: 700; color: var(--royal); cursor: pointer; }
.counter input { width: 52px; text-align: center; border: 0; border-radius: 0; min-height: 44px; padding: 0; font-weight: 700; font-size: 1.05rem; -moz-appearance: textfield; }
.counter input::-webkit-outer-spin-button, .counter input::-webkit-inner-spin-button { -webkit-appearance: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.check-tile { display: flex; gap: .5rem; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: .6rem .65rem; cursor: pointer; font-weight: 600; font-size: .9rem; margin: 0; color: var(--text); flex-direction: row; }
.check-tile:has(input:checked) { border-color: var(--royal); background: #F3F6FD; }
.check-tile input { width: 22px; height: 22px; min-height: 0; margin: .1rem 0 0; accent-color: var(--royal); flex-shrink: 0; }
.tile-body { display: flex; flex-direction: column; gap: .35rem; min-width: 0; flex: 1; }
.tile-nivel select { min-height: 34px; padding: .25rem .5rem; font-size: .82rem; font-weight: 600; }

/* ---------- propiedad: recorrido ---------- */
.zona-list li a, .cfg-list li a, .cfg-list .user-row { display: flex; align-items: center; gap: .7rem; background: var(--card); border-radius: var(--radius); padding: .75rem .9rem; box-shadow: var(--shadow); color: var(--text); }
.zona-list li.done a { opacity: .75; }
.cfg-list li.off a, .cfg-list li.off .user-row { opacity: .55; }
.zona-ico { font-size: 1.3rem; width: 2rem; text-align: center; flex-shrink: 0; }
.zona-ico.big { font-size: 1.8rem; width: auto; }
.zona-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.zona-state { color: var(--muted); font-weight: 700; font-size: 1.1rem; }
.zona-list li.done .zona-state { color: var(--ok); }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.danger-zone .form { margin-top: .8rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1rem; }
.stat { background: var(--card); border-radius: 10px; padding: .6rem .3rem; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat strong { font-size: 1.4rem; }
.stat span { font-size: .7rem; color: var(--muted); font-weight: 600; }

/* ---------- vista de zona (el carrusel) ---------- */
.zona-body .wrap { padding-top: .4rem; }
.ruta { display: flex; align-items: center; gap: .4rem; margin: 0 -1rem .6rem; padding: .4rem 1rem; position: sticky; top: 52px; z-index: 10; background: var(--bg); }
.ruta-back { flex-shrink: 0; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--card); box-shadow: var(--shadow); color: var(--text); font-size: 1.1rem; }
.ruta-scroll { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ruta-scroll::-webkit-scrollbar { display: none; }
.ruta-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: .3rem; height: 32px; padding: 0 .6rem; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 600; box-shadow: var(--shadow); }
.ruta-pill span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .2s; }
.ruta-pill.cur { background: var(--ink); border-color: var(--ink); color: #fff; }
.ruta-pill.cur span { max-width: 160px; margin-left: .2rem; }
.ruta-pill.done { border-color: var(--ok); color: var(--ok); background: #F0F9F3; }
.ruta-pill.done::after { content: "✓"; font-size: .7rem; }

.zona-head { margin-bottom: .8rem; }
.zona-title { display: flex; align-items: center; gap: .5rem; }
.zona-title h1 { flex: 1; min-width: 0; padding: .1rem .3rem; border-radius: 6px; }
.zona-title h1:focus { background: #fff; }
.zona-counts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }

.item { background: var(--card); border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); margin-bottom: .6rem; border-left: 5px solid transparent; transition: border-color .2s; }
.item.estado-ok { border-left-color: var(--ok); }
.item.estado-falta { border-left-color: var(--falta); }
.item.estado-danado { border-left-color: var(--danado); }
.item.estado-observacion { border-left-color: var(--obs); }
.item.hallazgo { background: #FBFCFE; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .5rem; }
.item-name { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.item-name strong { font-size: 1rem; }
.i-nombre[contenteditable]:focus { background: #F3F6FD; border-radius: 6px; padding: 0 .2rem; }

/* Segmento de estado: el control principal de toda la app — grande, con color */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; min-height: 46px; font: inherit; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; border-right: 1.5px solid var(--line); -webkit-tap-highlight-color: transparent; padding: 0 .3rem; }
.seg button:last-child { border-right: 0; }
.seg button.on { color: #fff; }
.seg button.st-ok.on { background: var(--ok); }
.seg button.st-falta.on { background: var(--falta); }
.seg button.st-danado.on { background: var(--danado); }
.seg button.st-observacion.on { background: var(--obs); }
.seg.small button { min-height: 38px; font-size: .85rem; }
.seg.small button.on { background: var(--royal); }
.seg.wrap { display: flex; flex-wrap: wrap; border: 0; gap: .35rem; overflow: visible; }
.seg.wrap button { border: 1.5px solid var(--line); border-radius: 999px; padding: 0 .75rem; }
.seg.wrap button.on { border-color: var(--royal); }

.item-body { margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: .5rem; }
.item-body .lbl { margin-bottom: 0; }
.lbl-inline { font-size: .8rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: .3rem; }
.paga { flex: 1; min-width: 180px; }
.aviso-obs { background: #E7ECF3; color: var(--obs); padding: .5rem .7rem; border-radius: 8px; font-weight: 600; font-size: .88rem; margin: 0; }
.materiales { background: #FFF8EC; border-radius: 10px; padding: .7rem; display: flex; flex-direction: column; gap: .5rem; }
.schema-field { display: flex; flex-direction: column; }
.photos { display: flex; flex-direction: column; gap: .5rem; }
.thumbs { display: flex; gap: .4rem; flex-wrap: wrap; }
.thumbs figure { margin: 0; position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: #E3E8EE; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.photo-btns { display: flex; gap: .5rem; }
.photo-btns .btn { flex: 1; cursor: pointer; margin: 0; flex-direction: row; color: var(--text); font-size: .88rem; }
.photo-btns .btn.cam { border-color: var(--royal); color: var(--royal); }

.hallazgo-box { margin-top: .4rem; }
.hallazgo-box form { margin-top: .8rem; }

/* ---------- resumen ---------- */
.res-item { background: var(--card); border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); border-left: 5px solid var(--line); display: flex; gap: .7rem; justify-content: space-between; }
.res-item.estado-falta { border-left-color: var(--falta); }
.res-item.estado-danado { border-left-color: var(--danado); }
.res-item.estado-observacion { border-left-color: var(--obs); }
.res-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.res-main p { margin: .2rem 0; }
.res-thumbs { display: flex; gap: .3rem; flex-shrink: 0; }
.res-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.compras { background: var(--card); border-radius: var(--radius); padding: .8rem 1rem .8rem 2rem; box-shadow: var(--shadow); }
.compras li { padding: .25rem 0; }

/* ---------- configuración ---------- */
.cfg-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 560px) { .cfg-grid { grid-template-columns: 1fr 1fr; } }
.cfg-card { display: flex; flex-direction: column; gap: .3rem; color: var(--text); margin: 0; }
.cfg-card strong { font-size: 1.05rem; }
.tabs-scroll { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .6rem; scrollbar-width: none; margin-bottom: .4rem; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab-pill { flex-shrink: 0; padding: .4rem .8rem; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); color: var(--muted); font-weight: 600; font-size: .85rem; }
.tab-pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.schema-row { display: grid; grid-template-columns: 1.2fr .8fr 1.6fr auto; gap: .4rem; margin-bottom: .4rem; align-items: center; }
.schema-row input, .schema-row select { min-height: 40px; padding: .4rem .5rem; font-size: .9rem; }
@media (max-width: 520px) { .schema-row { grid-template-columns: 1fr 1fr; } .schema-row input[name=f_opciones] { grid-column: 1 / -1; } .schema-row .del-row { grid-column: 2; justify-self: end; } }
.user-actions summary { list-style: none; }
.user-actions summary::-webkit-details-marker { display: none; }
.user-actions[open] { display: flex; flex-direction: column; gap: .3rem; }

/* ---------- Entrega 2: trabajo, tareas, compras, puntual ---------- */
.note-inline { color: #9C6408; margin: .2rem 0 0; }
.stat.link { color: var(--royal); }
.filtros { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; margin-bottom: .8rem; padding: 2px; }
.filtros::-webkit-scrollbar { display: none; }
.filtros button { flex-shrink: 0; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font: inherit; font-weight: 700; font-size: .85rem; padding: .4rem .8rem; border-radius: 999px; cursor: pointer; }
.filtros button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.item.tarea { border-left-color: var(--danado); }
.item.tarea.tarea-en_progreso { border-left-color: var(--falta); }
.item.tarea.tarea-completada { border-left-color: var(--ok); opacity: .8; }
.item.tarea.mia { background: #FBFCFE; }
.tag.mine { background: #E3F5EA; color: var(--ok); }
.thumbs-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.thumbs-row .thumbs figure { width: 64px; height: 64px; }
.t-acciones { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; align-items: center; }
.t-acciones .btn { flex: 1; min-width: 110px; }
.t-acciones .asignar { width: auto; flex: 1; min-width: 120px; min-height: 44px; font-size: .88rem; }
.t-desc { white-space: pre-wrap; }
.tarea-row { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .6rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--line); position: relative; }
.tarea-row .del-tarea { position: absolute; right: 0; top: 0; }
.compras-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.compras-list label { display: flex; gap: .7rem; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); cursor: pointer; margin: 0; color: var(--text); font-weight: 500; flex-direction: row; }
.compras-list input { width: 24px; height: 24px; min-height: 0; margin-top: .1rem; accent-color: var(--ok); flex-shrink: 0; }
.c-main { display: flex; flex-direction: column; gap: .15rem; }
.compras-list li.bought label { opacity: .55; }
.compras-list li.bought strong { text-decoration: line-through; }

/* ---------- Entrega 3: reportes (escritorio) ---------- */
.wrap.wide { max-width: 1240px; }
.filtros-rep { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filtros-rep input { flex: 2; min-width: 200px; }
.filtros-rep select { flex: 1; min-width: 160px; width: auto; }
.tabla-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .7rem .8rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tabla td { padding: .65rem .8rem; border-bottom: 1px solid #EEF1F4; vertical-align: top; }
.tabla tbody tr[onclick] { cursor: pointer; }
.tabla tbody tr[onclick]:hover { background: #F6F8FB; }
.tabla .num { text-align: right; }
.tabla .nowrap { white-space: nowrap; }
.items-rep tr.estado-falta td:first-child { box-shadow: inset 4px 0 0 var(--falta); }
.items-rep tr.estado-danado td:first-child { box-shadow: inset 4px 0 0 var(--danado); }
.items-rep tr.estado-observacion td:first-child { box-shadow: inset 4px 0 0 var(--obs); }
.items-rep input, .items-rep textarea, .items-rep select { min-height: 36px; padding: .35rem .5rem; font-size: .88rem; }
.items-rep .en-cell { min-width: 260px; display: flex; flex-direction: column; gap: .3rem; }
.items-rep .f-precio { width: 90px; text-align: right; }
.items-rep .f-paga { width: auto; }
.fotos-mini { white-space: nowrap; }
.fotos-mini img { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; margin-right: 2px; border: 2px solid transparent; }
.fotos-mini img.despues { border-color: var(--ok); }
.rep-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 900px) { .rep-grid { grid-template-columns: 3fr 2fr; } }
.btn.disabled { opacity: .45; pointer-events: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (min-width: 720px) { h1 { font-size: 1.7rem; } .item-name strong { font-size: 1.05rem; } }
