/* Cotización — avance de obra: the panel tab and sheet, and the client's portal (?obra=). Theme tokens only. Prefix ao-. */

/* ---------- panel ---------- */
.ao-item { align-items: flex-start; }
.ao-main { flex: 1 1 300px; min-width: 0; display: grid; gap: 5px; }
.ao-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 14.5px; }
.ao-sub { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ao-meter { height: 6px; max-width: 360px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--fg) 12%, transparent); }
.ao-meter.big { height: 10px; max-width: none; }
.ao-meter i, .ao-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent-ink); }
.ao-item .ndf-item-side { justify-content: flex-end; }
.ao-etapas-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: ao; }
.ao-etapas-mini li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; counter-increment: ao;
  background: color-mix(in srgb, var(--fg) 4%, transparent); border-left: 3px solid color-mix(in srgb, var(--fg) 20%, transparent); }
.ao-etapas-mini li::before { content: counter(ao) ". "; font-weight: 700; color: var(--muted); }
.ao-etapas-mini li > span { flex: 1 1 auto; font-weight: 600; }
.ao-etapas-mini li[data-st="hecha"] { border-left-color: var(--accent-ink); }
.ao-etapas-mini li[data-st="curso"] { border-left-color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ao-etapas-mini small { color: var(--muted); font-size: 12.5px; }
.ao-fotos-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.ao-pick { width: 96px; height: 72px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--fg);
  border: 2px solid color-mix(in srgb, var(--fg) 18%, transparent); font: 600 13px/1.2 var(--font-body, system-ui), system-ui, sans-serif; }
.ao-pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ao-pick[aria-pressed="true"] { border-color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent-ink); }
.ao-pick:focus-visible, .ao-thumb:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.ao-upd { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ao-upd li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.ao-upd img { flex: none; width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.ao-upd span { display: grid; gap: 2px; min-width: 0; }
.ao-upd small { color: var(--muted); font-size: 12.5px; }
.ndf-dlg[data-mod="avance-obra"] input[type="date"] { font: 15px/1.3 var(--font-body, system-ui), system-ui, sans-serif; min-height: 44px; padding: 8px 10px; border-radius: 10px; max-width: 100%; box-sizing: border-box;
  background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--fg); border: 1px solid color-mix(in srgb, var(--fg) 20%, transparent); }
.ndf-dlg[data-mod="avance-obra"] textarea { width: 100%; box-sizing: border-box; }

/* ---------- page: the client's portal ---------- */
.ao-avance { display: grid; gap: 8px; }
.ao-avance-t { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ao-avance-t span { color: var(--muted); font-size: 14px; }
.ao-bar { height: 12px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--fg) 12%, transparent); }
.ao-etapas { list-style: none; margin: 0; padding: 0; display: grid; }
.ao-etapas > li { position: relative; display: grid; gap: 8px; padding: 0 0 18px 30px; }
.ao-etapas > li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent-ink); background: var(--bg); }
.ao-etapas > li::after { content: ""; position: absolute; left: 12px; top: 20px; bottom: 0; width: 2px; background: color-mix(in srgb, var(--fg) 15%, transparent); }
.ao-etapas > li:last-child::after { display: none; }
.ao-etapas > li[data-st="hecha"]::before, .ao-etapas > li[data-st="curso"]::before { background: var(--accent-ink); }
.ao-etapas > li[data-st="curso"]::before { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 28%, transparent); }
.ao-etapas > li[data-st="pendiente"] .ao-et-h b { color: var(--muted); }
.ao-et-h { display: grid; gap: 1px; }
.ao-et-h b { font-size: 16px; }
.ao-et-h small { color: var(--muted); font-size: 13.5px; }
.ao-novedades { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ao-novedades li { display: flex; gap: 12px; align-items: flex-start; }
.ao-novedades span { display: grid; gap: 2px; min-width: 0; font-size: 15px; }
.ao-novedades small { color: var(--muted); font-size: 13px; }
.ao-thumb { flex: none; width: 112px; height: 84px; padding: 0; border: 1px solid color-mix(in srgb, var(--fg) 15%, transparent); border-radius: calc(var(--radius, 16px) * .5); overflow: hidden; cursor: zoom-in; background: none; }
.ao-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 420px) { .ao-thumb { width: 88px; height: 66px; } }
.ao-grande { display: block; width: 100%; height: auto; border-radius: 12px; }

/* touch: 44 px targets in both panel skins (Rapport keeps .ndf-btn.sm at 36 px) */
@media (pointer: coarse), (max-width: 1023px) {
  #t-m-avance-obra .ndf-btn, #t-m-avance-obra .ndf-seg button, #t-m-avance-obra select, #t-m-avance-obra .ndf-link, .ndf-dlg[data-mod="avance-obra"] .ndf-btn, .ndf-dlg[data-mod="avance-obra"] .ndf-chip, section[data-mod="avance-obra"] .ndf-btn { min-height: 44px; }
  #t-m-avance-obra .ndf-link { display: inline-flex; align-items: center; }
}
