/* FICHA (hub) — P3, 20-oct-2026 (spec §4.6, §6.1, §6.8). Blanco, icono + palabra en cada estado, 48 px de toque.
   Las pestañas de la ficha nueva miden 44 px y se desplazan en horizontal si no caben (iPad vertical). */
.tabs.ficha-hub{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tabs.ficha-hub::-webkit-scrollbar{display:none}
.tabs.ficha-hub button{min-height:44px;flex:0 0 auto;font-size:.95rem;padding:0 14px}
/* hero */
.fh-pills{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center}
.fh-pill{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:2px 12px;border-radius:20px;font:inherit;font-size:.88rem;font-weight:600;border:1px solid transparent;background:#f1ece2;color:#3b3229}
.fh-pill .ico{width:15px;height:15px}
.fh-pill.cliente{background:#e6f3ea;color:#1d6b3f}
.fh-pill.lead{background:#e9eef5;color:#2f4a6b}
.fh-pill.debe{background:#fbf0db;color:#8a5a00;border-color:#d9a441;cursor:pointer;min-height:40px}
.fh-pill.warn{background:#fbf0db;color:#8a5a00;cursor:pointer;min-height:40px}
/* resumen */
.ficha-resumen{margin-bottom:14px;color:#1a1206}
.fh-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-bottom:10px}
.fh-kpi{display:flex;flex-direction:column;padding:10px 12px;border:1px solid rgba(40,28,12,.14);border-radius:14px;background:#fff}
.fh-kpi span{font-size:.85rem;color:#5c4a33}
.fh-kpi b{font-size:1.15rem;font-weight:600;font-variant-numeric:tabular-nums}
.fh-debe{color:#8a5a00}
.fh-cobrar{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;margin:4px 0 10px;border:none;border-radius:14px;background:#1d6b3f;color:#fff;font:inherit;font-size:1.15rem;font-weight:600;cursor:pointer}
.fh-cobrar .ico{width:22px;height:22px}
.fh-aviso{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;border-radius:12px;margin:0 0 8px;font-size:1rem}
.fh-aviso span{flex:1;min-width:150px}
.fh-aviso .ico{width:20px;height:20px}
.fh-aviso.ok{background:#e6f3ea;color:#1d6b3f}
.fh-aviso.warn{background:#fbf0db;color:#8a5a00}
.fh-aviso.err{background:#f8e8ea;color:#a3222f}
.fh-link{background:none;border:none;color:#7a5418;font:inherit;font-weight:600;text-decoration:underline;cursor:pointer;min-height:44px;display:inline-flex;align-items:center;gap:6px;padding:0 6px}
.fh-link .ico{width:18px;height:18px}
/* botones, chips, formularios */
.fh-acc{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.fh-top{margin:0 0 12px}
.fh-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 16px;border:1px solid rgba(40,28,12,.2);border-radius:12px;background:#fff;color:#1a1206;font:inherit;font-weight:600;cursor:pointer}
.fh-btn .ico{width:18px;height:18px}
.fh-btn.pri{background:#7a5418;border-color:#7a5418;color:#fff}
.fh-btn.mal{color:#a3222f;border-color:rgba(163,34,47,.4)}
.fh-btn[disabled]{opacity:.5;cursor:not-allowed}
.fh-btn:focus-visible,.fh-chip:focus-visible,.fh-pill:focus-visible,.fh-link:focus-visible{outline:3px solid #1f5fbf;outline-offset:2px}
.fh-chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.fh-chip{min-height:44px;padding:0 14px;border:1px solid rgba(40,28,12,.2);border-radius:22px;background:#fff;color:#1a1206;font:inherit;cursor:pointer}
.fh-chip[aria-pressed="true"]{border:2px solid #7a5418;background:#fff6e3;font-weight:600}
.fh-form{display:flex;flex-direction:column;gap:10px;margin-top:10px;padding:12px;border:1px solid rgba(40,28,12,.18);border-radius:14px;background:#fffdf8}
.fh-form label{display:flex;flex-direction:column;gap:6px;font-weight:600}
.fh-form .input{color-scheme:light;min-height:48px}
.fh-lbl{font-weight:600;margin-top:4px}
.fh-h{display:flex;align-items:center;gap:8px;font-size:1rem;font-weight:600;color:#5c4a33;margin:18px 0 8px}
.fh-h .ico{width:18px;height:18px}
.fh-vacio{color:#5c4a33;margin:4px 0 8px}
/* estados: icono + palabra + color */
.fh-estado{display:inline-flex;align-items:center;gap:5px;padding:2px 10px;border-radius:20px;font-size:.85rem;font-weight:600;background:#f1ece2;color:#3b3229}
.fh-estado .ico{width:14px;height:14px}
.fh-estado.ok{background:#e6f3ea;color:#1d6b3f}
.fh-estado.warn{background:#fbf0db;color:#8a5a00}
.fh-estado.mal{background:#f8e8ea;color:#a3222f}
.fh-estado.gris{background:#efedea;color:#4d453b}
.fh-estado.estrella{background:#fff4d6;color:#7a5418}
/* citas */
.fh-cita{padding:12px 14px;border:1px solid rgba(40,28,12,.16);border-radius:14px;margin-bottom:8px;background:#fff;color:#1a1206}
.fh-cita.pasada{background:#fcfbf8}
.fc-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.fc-top b{font-size:1.05rem}
.fc-sub{color:#5c4a33;margin-top:2px}
/* historial */
.fh-feed{display:flex;flex-direction:column;gap:8px}
.fh-item{display:block;width:100%;text-align:left;padding:12px 14px;border:1px solid rgba(40,28,12,.16);border-radius:14px;background:#fff;color:#1a1206;font:inherit}
.fh-item.nota{border-left:4px solid #b8ae9f}
.fh-item.nota.ella{border-left-color:#1d6b3f}
.fh-item.compra{cursor:pointer;border-left:4px solid #7a5418}
.fi-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.fi-top .ico{width:18px;height:18px;color:#7a5418}
.fi-fecha{margin-left:auto;color:#5c4a33;font-size:.9rem}
.fi-txt{margin:6px 0 0;white-space:pre-wrap;line-height:1.55;max-width:70ch}
.fi-meta{color:#5c4a33;font-size:.9rem;margin-top:2px}
.fh-item.foto img{display:block;max-width:220px;width:100%;border-radius:10px;margin-top:8px;background:#f1ece2;min-height:80px}
/* hoja de la venta */
.fh-venta{display:flex;flex-direction:column;gap:6px;margin:10px 0;color:#1a1206}
.fh-venta .pc-fila,.fh-hoja .pc-fila{display:flex;justify-content:space-between;gap:12px;font-size:1.05rem;font-variant-numeric:tabular-nums}
.fh-venta .pc-total{display:flex;justify-content:space-between;border-top:2px solid #1a1206;padding-top:8px;font-size:1.3rem;font-weight:600}
.fh-dev{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dotted rgba(40,28,12,.2)}
.fh-dev > span:first-child{flex:1;min-width:140px}
.fh-hoja .pos-paso{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(40,28,12,.2);border-radius:12px;background:#fff;cursor:pointer}
.fh-hoja .pl-cant{display:inline-flex;align-items:center;gap:6px}
.fh-hoja .ph-frase{font-size:1.25rem;margin:8px 0}
/* productos */
.fh-prod{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border:1px solid rgba(40,28,12,.16);border-radius:14px;margin-bottom:8px;background:#fff;color:#1a1206}
.fh-prod small{color:#5c4a33}
.fh-preview{margin-top:12px;padding:16px;border:2px solid #d9cfbf;border-radius:18px;max-width:420px;background:#fff;color:#1a1206;font-size:1.05rem;line-height:1.6}
.fh-preview .fp-top{display:flex;gap:12px;align-items:center;margin-bottom:8px}
.fh-preview img{width:72px;height:72px;object-fit:cover;border-radius:12px}
.fh-preview ol{margin:4px 0 8px;padding-left:22px}
/* consentimientos (legado) */
.ficha-consent{margin-bottom:14px}
.fh-consents{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
.fh-consent{padding:12px 14px;border:1px solid rgba(40,28,12,.16);border-radius:14px;background:#fff;color:#1a1206}
.fh-consent .fc-top .ico{width:18px;height:18px}
.fh-consent.ok{border-left:4px solid #1d6b3f}
.fh-consent.warn{border-left:4px solid #d9a441}
@media (prefers-reduced-motion:reduce){.fh-hoja *{animation:none!important;transition:none!important}}
.fh-falta{margin:4px 0 8px;padding-left:22px;font-size:1.05rem;line-height:1.6}
