/* Caja de herramientas · herramienta diaria (P2b, 13-nov-2026) y Ferretería. Va DESPUÉS de caja.css; usa los tokens de xoxaz.css. */

/* Hoy: secciones cortas con UNA acción cada renglón */
.c5-sec { margin-top: 22px; }
.c5-sec > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.c5-sec > h2 .n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; background: var(--brand-50); color: var(--brand-700); font-size: 14px; }
.c5-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.c5-row + .c5-row { margin-top: 8px; }
.c5-row .grow { min-width: 0; }
.c5-row .grow b { display: block; font-size: var(--fs-md); line-height: 1.25; overflow-wrap: anywhere; }
.c5-row .grow small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; line-height: 1.35; }
.c5-row .btn { flex: none; }
.c5-row.is-hecho { opacity: .6; }
.c5-hora { flex: none; min-width: 52px; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.c5-mini { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.c5-mini form { margin: 0; }
.c5-mini .btn { min-height: 44px; }
.c5-bloque { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.c5-bloque + .c5-bloque { margin-top: 8px; }
.c5-bloque > b { display: block; font-size: var(--fs-md); line-height: 1.3; }
.c5-bloque > small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.c5-bien { text-align: center; padding: 22px 16px; background: var(--brand-50); border-radius: var(--r-lg); color: var(--brand-700); font-weight: 700; }
.c5-bien small { display: block; font-weight: 500; color: var(--muted); margin-top: 4px; }

/* 5 botones grandes */
.c5-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.c5-btns a { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 92px; padding: 14px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); -webkit-tap-highlight-color: transparent; }
.c5-btns a:active { transform: scale(.98); }
.c5-btns a b { font-size: var(--fs-md); line-height: 1.2; }
.c5-btns a small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.3; }
.c5-btns a .i { width: 24px; height: 24px; color: var(--brand-700); }
.c5-btns a.is-main { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 64px; background: var(--brand); color: #fff; border-color: transparent; box-shadow: var(--relieve-1, var(--shadow-2)); }
.c5-btns a.is-main .i { color: #fff; }
.c5-btns a.is-main small { color: rgb(255 255 255 / .85); }
@media (min-width: 720px) { .c5-btns { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.c5-mas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.c5-mas-grid a { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); min-width: 0; }
.c5-mas-grid a .i { width: 20px; height: 20px; color: var(--brand-700); flex: none; }

/* Tarjeta del trabajo: cotizado → agendado → hecho → cobrado */
.c5-tarjeta { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 22px; box-shadow: var(--shadow-1); }
.c5-pasos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: p; }
.c5-pasos li { position: relative; text-align: center; font-size: 12px; font-weight: 700; color: var(--subtle); padding-top: 30px; }
.c5-pasos li::before { counter-increment: p; content: counter(p); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--line-2); color: var(--muted); font-size: 12px; }
.c5-pasos li::after { content: ""; position: absolute; top: 11px; left: calc(50% + 14px); right: calc(-50% + 14px); height: 2px; background: var(--line-2); }
.c5-pasos li:last-child::after { display: none; }
.c5-pasos li.is-ok { color: var(--brand-700); }
.c5-pasos li.is-ok::before { content: "✓"; background: var(--brand); color: #fff; }
.c5-pasos li.is-ok::after { background: var(--brand); }
.c5-pasos li.is-ahora { color: var(--ink); }
.c5-pasos li.is-ahora::before { background: var(--oro); color: var(--ink); box-shadow: 0 0 0 4px var(--oro-50); }
.c5-dinero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.c5-dinero > div { background: var(--bg-soft); border-radius: var(--r-md); padding: 10px 8px; min-width: 0; }
.c5-dinero span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.c5-dinero b { display: block; font-size: clamp(15px, 4.2vw, 20px); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.c5-dinero .pos { color: var(--brand-700); } .c5-dinero .neg { color: var(--err); }
.c5-accion { display: flex; flex-direction: column; gap: 10px; }
.c5-accion .btn { width: 100%; }
.c5-fila2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; }
.c5-extra { border-top: 1px solid var(--line-2); margin-top: 14px; padding-top: 4px; }
.c5-extra > div, .c5-extra > details { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.c5-extra > :last-child { border-bottom: 0; }
.c5-extra summary { cursor: pointer; font-weight: 700; color: var(--brand-700); min-height: 44px; display: flex; align-items: center; gap: 8px; }
.c5-extra .eti { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.c5-extra .eti .grow { min-width: 0; }
.c5-extra .eti .grow b { display: block; font-size: var(--fs-sm); }
.c5-extra .eti .grow small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.c5-aviso { padding: 12px 14px; border-radius: var(--r-md); background: var(--oro-50); margin-bottom: 12px; font-weight: 600; line-height: 1.4; }
.c5-aviso a { color: var(--brand-700); }
.c5-chip-etapa { font-size: 12px; }

/* Tablero de trabajos */
.c5-col h2 .n { font-weight: 700; color: var(--muted); }

/* Lista de compras: un toque por renglón */
.c5-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.c5-lista form { margin: 0; }
.c5-check { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); text-align: left; font: inherit; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.c5-check .caja { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--brand); display: grid; place-items: center; color: #fff; }
.c5-check .cant { flex: none; font-weight: 800; color: var(--brand-700); min-width: 44px; }
.c5-check .con { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-md); }
.c5-check[aria-pressed="true"] { background: var(--bg-soft); }
.c5-check[aria-pressed="true"] .caja { background: var(--brand); }
.c5-check[aria-pressed="true"] .caja::after { content: "✓"; font-weight: 800; }
.c5-check[aria-pressed="true"] .con, .c5-check[aria-pressed="true"] .cant { text-decoration: line-through; color: var(--muted); }

/* Estrellas (opinión del cliente de fuera) */
.c5-estrellas { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; }
.c5-estrellas input { position: absolute; opacity: 0; pointer-events: none; }
.c5-estrellas label { font-size: 42px; line-height: 1; color: var(--line); cursor: pointer; padding: 4px; min-width: 52px; min-height: 52px; display: grid; place-items: center; }
.c5-estrellas input:checked ~ label, .c5-estrellas label:hover, .c5-estrellas label:hover ~ label { color: var(--oro); }
.c5-estrellas input:focus-visible + label { box-shadow: var(--ring); border-radius: 12px; }
.c5-op { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.c5-op .est { color: var(--oro-700); font-weight: 800; letter-spacing: 1px; }
.c5-op p { margin: 6px 0 0; white-space: pre-line; }
.c5-op small { color: var(--muted); font-size: var(--fs-xs); }
.c5-fuera { border: 1px dashed var(--line); background: var(--bg-soft); }

/* Ferretería */
.c5-tienda { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.c5-tienda + .c5-tienda { margin-top: 8px; }
.c5-tienda .grow { min-width: 0; }
.c5-tienda .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c5-tienda .grow small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.c5-tienda form { margin: 0; }
.c5-estrella { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--subtle); }
.c5-estrella.on { background: var(--oro-50); border-color: var(--oro); color: var(--oro-700); }
.c5-wa-lista { display: flex; flex-direction: column; gap: 8px; }
.c5-wa-lista .btn { width: 100%; justify-content: flex-start; }
.c5-wa-lista .btn.is-mandado { opacity: .65; }
.c5-texto { width: 100%; min-height: 150px; font: inherit; font-size: var(--fs-md); line-height: 1.45; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; resize: vertical; }
.c5-sob { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.c5-sob + .c5-sob { margin-top: 8px; }
.c5-sob img, .c5-sob .sin { flex: none; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--bg-soft); display: grid; place-items: center; color: var(--subtle); }
.c5-sob .grow { min-width: 0; }
.c5-sob .grow b { display: block; overflow-wrap: anywhere; line-height: 1.3; }
.c5-sob .grow small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 3px; }
.c5-precio { font-weight: 800; color: var(--brand-700); }
.c5-foto-grande { width: 100%; max-height: 420px; object-fit: contain; border-radius: var(--r-md); background: var(--bg-soft); }
.c5-bloque.is-hecho { opacity: .6; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.c5-btns a.is-main .grow { min-width: 0; }
.c5-btns a.is-main .grow b, .c5-btns a.is-main .grow small { display: block; }

/* ===================== Ferretería con dos pestañas (13-nov-2026) =====================
   Marco: igual que Buscar trabajo (Lista | Mapa): "Atrás · Ferretería", el selector .segmented.vista-seg (medidas de
   xoxaz.css) con "Ferretería" | "Sobrantes" y, en "Ferretería", todo en una pantalla de iPhone: una tarjeta baja (dibujo de
   44 px de menu_ilus, título, una línea y su botón) y los plegados de 56 px. */
.fe-seg { margin-top: 0; }
.fe-pide { display: grid; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.fe-pide-cab { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fe-pide-cab .menu-ilus { width: 44px; height: 44px; }
.fe-pide-cab .grow { flex: 1; min-width: 0; }
.fe-pide-cab b { display: block; font-size: var(--fs-lg); font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.fe-pide-cab small { display: block; margin-top: 3px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.35; }
.fe-dato { font-size: var(--fs-xs); color: var(--muted); margin: -4px 2px 0; }
/* Detalle público de un sobrante: quién (solo "Guerrero verificado") y dónde/cuándo, sin partir el renglón a la mitad */
.fe-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-sm); color: var(--muted); }
.fe-meta-l { display: inline-flex; align-items: center; gap: 4px; }
.fe-meta-l .i { flex: none; }
/* "Tus ferreterías" sin cuenta: un renglón con la misma forma que los plegados, que pide entrar */
a.fe-renglon { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; font-weight: 700; color: var(--ink); text-decoration: none; }
a.fe-renglon > .i:first-child { color: var(--brand-700); }
a.fe-renglon > .i:last-child { color: var(--muted); }
a.fe-renglon:focus-visible { outline: none; box-shadow: var(--ring); }

.fe-plegado { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.fe-plegado + .fe-plegado { margin-top: 8px; }
.fe-plegado > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; cursor: pointer; font-weight: 700; }
.fe-plegado > summary::-webkit-details-marker { display: none; }
.fe-plegado > summary > .i:first-child { color: var(--brand-700); }
.fe-plegado > summary > .i:last-child { color: var(--muted); transition: transform .2s var(--ease); }
.fe-plegado[open] > summary > .i:last-child { transform: rotate(180deg); }
.fe-plegado > summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-md); }
.fe-dentro { padding: 0 12px 12px; }
.fe-dentro .cj-mas { margin-top: 8px; }
.fe-dentro .c5-estrella { width: 48px; height: 48px; }
.fe-notas { margin: 0 16px 16px; padding-left: 22px; display: grid; gap: 8px; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .fe-plegado > summary > .i:last-child { transition: none; } }
