/* =====================================================================
   GASCA · Recetas — réplica de «Fichas de plato» (BBDD_Recetas.accdb) con el estilo de Victoria.
   Reutiliza las clases gm-* de Menús (gasca_menus.css); aquí solo lo propio (navegación lateral de la ficha).
   ===================================================================== */
#recetas-view, #platos-view, #ingredientes-view, #prod-mant-view { --gm-red: #b4000c; --gm-red-2: #8f000a; --gm-red-soft: rgba(180,0,12,.07);
  --gm-ink: #0f172a; --gm-muted: #64748b; --gm-line: #e2e8f0; --gm-card: #fff; --gm-bg: #f8fafc;
  --gm-green: #059669; --gm-green-soft: #ecfdf5; --gm-amber: #b45309; --gm-amber-soft: #fffbeb;
  --gm-radius: 14px; --gm-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.12); }
#recetas-view .gm-root, #platos-view .gm-root, #ingredientes-view .gm-root, #prod-mant-view .gm-root { display: flex; flex-direction: column; gap: 18px; }
#recetas-view h3, #recetas-view h4, #platos-view h3, #platos-view h4, #ingredientes-view h3, #ingredientes-view h4, #prod-mant-view h3, #prod-mant-view h4 { color: var(--gm-ink); display: block; }
#recetas-view [hidden], #platos-view [hidden], #ingredientes-view [hidden], #prod-mant-view [hidden] { display: none !important; }

/* Portada */
.fp-novedades { white-space: pre-line; font-size: .82rem; color: var(--gm-muted); line-height: 1.5; }
.fp-enlaces { display: flex; flex-direction: column; gap: 6px; }
.fp-enlaces a { color: #0563c1; font-weight: 600; font-size: .88rem; text-decoration: underline; cursor: pointer; }
.fp-enlaces span.fp-off { color: #94a3b8; font-size: .88rem; }
.fp-im-tabs .gm-tab { --tc: var(--accent-red, #b4000c); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.fp-im-tabs .gm-tab::before { display: none; }
.fp-diagrama { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 18px; justify-content: start; }

/* Listas */
.fp-lista thead th { cursor: pointer; user-select: none; white-space: nowrap; }
.fp-lista thead th.fp-ord::after { content: ' ▲'; font-size: .6rem; }
.fp-lista thead th.fp-ord.desc::after { content: ' ▼'; }
.fp-id { color: #0563c1; font-weight: 700; cursor: pointer; text-decoration: underline; }
.fp-cuenta { font-size: .78rem; color: var(--gm-muted); }
.fp-rev-S { color: var(--gm-green); font-weight: 700; }
.fp-rev-N { color: var(--gm-muted); }
.fp-inactivo td { color: #94a3b8; }

/* Ficha del plato: cabecera y navegación lateral (controles de navegación del Access) */
.fp-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fp-cab-t { flex: 1; min-width: 240px; }
.fp-cab-t small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gm-muted); }
.fp-cab-t b { font-size: 1.05rem; }
.fp-ficha { display: grid; grid-template-columns: 150px 200px minmax(0, 1fr); gap: 14px; align-items: start; }
.fp-ficha.fp-sin-sub { grid-template-columns: 150px minmax(0, 1fr); }
.fp-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 8px; }
.fp-nav button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--gm-line); background: #fff; color: var(--gm-ink); font: 600 .8rem 'Inter', sans-serif; cursor: pointer; }
.fp-nav.fp-nav-1 button { flex-direction: column; align-items: center; text-align: center; padding: 12px 8px; gap: 6px; }
.fp-nav.fp-nav-1 button i { font-size: 1.15rem; color: var(--gm-muted); }
.fp-nav button:hover:not(:disabled) { border-color: var(--gm-red); color: var(--gm-red); }
.fp-nav button.on { background: var(--gm-red); border-color: var(--gm-red); color: #fff; }
.fp-nav button.on i { color: #fff; }
.fp-nav button:disabled { opacity: .45; cursor: not-allowed; }
.fp-panel { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.fp-panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-panel-head h4 { margin: 0; font-size: 1rem; flex: 1; }
.fp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fp-grid .fp-c2 { grid-column: span 2; } .fp-grid .fp-c3 { grid-column: span 3; } .fp-grid .fp-c4 { grid-column: span 4; }
.fp-grid .gm-field { min-width: 0; }
.fp-barra { background: #1f497d; color: #fff; font-weight: 700; font-size: .8rem; padding: 6px 10px; border-radius: 8px; margin-top: 6px; }
.fp-aviso { background: #ff9900; color: #111; font-weight: 700; padding: 8px 12px; border-radius: 10px; }
.fp-nota { font-size: .78rem; color: var(--gm-muted); font-style: italic; }
.fp-ta { width: 100%; min-height: 90px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--gm-line); font: .88rem 'Inter', sans-serif; resize: vertical; }
.fp-ta:disabled, .gm-input:disabled { background: #f1f5f9; color: #64748b; }
.fp-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fp-lado h5 { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; text-align: center; font-size: .82rem; }
.fp-caliente { background: #cc0000; color: #fff; }
.fp-frio { background: #bdd7ee; color: #111; }
.fp-opciones { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 10px; }
.fp-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.fp-foto { border: 1px solid var(--gm-line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.fp-foto b { font-size: .8rem; text-align: center; }
.fp-foto .fp-img { aspect-ratio: 1 / 1; border-radius: 8px; background: #f1f5f9; display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: #94a3b8; font-size: .78rem; }
.fp-foto .fp-img img { width: 100%; height: 100%; object-fit: contain; }
.fp-foto .gm-toolbar { justify-content: center; gap: 6px; }
.fp-tabla-edit td { vertical-align: middle; }
.fp-tabla-edit .gm-select, .fp-tabla-edit .gm-input { height: 32px; width: 100%; }
.fp-principal { background: #c0504d !important; color: #fff !important; }
.fp-recuerda { font-size: .8rem; color: #3b3838; white-space: pre-line; }
@media (max-width: 1100px) {
  .fp-ficha, .fp-ficha.fp-sin-sub { grid-template-columns: minmax(0, 1fr); }
  .fp-nav { flex-direction: row; flex-wrap: wrap; position: static; }
  .fp-nav button, .fp-nav.fp-nav-1 button { width: auto; flex-direction: row; padding: 7px 10px; }
  .fp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fp-dos { grid-template-columns: minmax(0, 1fr); }
}

/* PLATOS: casillas de sistemas aptos (C, I, E); en gris si el plato no tiene sistemas definidos (apto para todos) */
.fp-sis { display: inline-flex; justify-content: center; width: 100%; cursor: pointer; }
.fp-sis input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent-red, #b4000c); }
.fp-sis-nd input { accent-color: #94a3b8; opacity: .6; }
/* Ficha del plato › Recetas: receta por defecto */
.fp-rec-def { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--gm-line, #e2e8f0); border-radius: 12px; background: #f8fafc; font-size: .9rem; }
.fp-rec-def .gm-btn { margin-left: auto; }
.fp-link { color: #0563c1; text-decoration: underline; cursor: pointer; font-weight: 700; background: none; border: 0; padding: 0; font: inherit; text-align: left; }

/* Ficha del plato con las pestañas arriba (INC-00042) */
.fp-nav[hidden] { display: none !important; }
.fp-ficha.fp-arriba, .fp-ficha.fp-arriba.fp-sin-sub { display: flex; flex-direction: column; gap: 12px; }
.fp-arriba .fp-nav { flex-direction: row; flex-wrap: wrap; position: static; gap: 6px; }
.fp-arriba .fp-nav.fp-nav-1 { border-bottom: 2px solid var(--gm-red); padding-bottom: 0; gap: 4px; }
.fp-arriba .fp-nav.fp-nav-1 button { width: auto; flex-direction: row; padding: 9px 16px; border-radius: 10px 10px 0 0; border-bottom: 0; gap: 8px; }
.fp-arriba .fp-nav.fp-nav-1 button i { font-size: .95rem; }
.fp-arriba .fp-nav.fp-nav-2 button { width: auto; padding: 6px 12px; border-radius: 999px; font-size: .8rem; }
/* Chips de sistemas aptos (lista PLATOS y ficha del plato) */
.fp-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.fp-chip { border: 1px solid #cbd5e1; background: #fff; color: #64748b; border-radius: 999px; padding: 2px 9px; font: 600 .72rem 'Inter', sans-serif; cursor: pointer; }
.fp-chip.on { background: var(--gm-red, #b4000c); border-color: var(--gm-red, #b4000c); color: #fff; }
.fp-chip:hover { border-color: var(--gm-red, #b4000c); }
.fp-chip:disabled { opacity: .5; cursor: wait; }
.fp-chips-nd .fp-chip.on { background: #e2e8f0; border-color: #cbd5e1; color: #475569; border-style: dashed; }

/* Fotos de los platos: miniaturas en listados, fondo en las fichas y mosaico en la portada (06/10/2026) */
.fp-mini { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: #f1f5f9 center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(15,23,42,.06); vertical-align: middle;
  transition: transform .18s ease, box-shadow .18s ease; position: relative; }
.fp-mini:not(.fp-foto-ok):not(.fp-mini-sin)::after { content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%); background-size: 200% 100%; animation: fpBrillo 1.2s infinite; }
.fp-mini.fp-foto-ok:hover { transform: scale(2.8); z-index: 5; box-shadow: 0 14px 30px -10px rgba(15,23,42,.45); }
.fp-mini-sin, .fp-mini.fp-foto-no { background: #f8fafc; color: #cbd5e1; font-size: .85rem; }
.fp-mini.fp-foto-no::after { display: none; }
@keyframes fpBrillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.fp-lista td:first-child { width: 46px; }
.fp-cab-card { position: relative; overflow: hidden; }
.fp-cab-card > :not(.fp-cab-foto) { position: relative; z-index: 1; }
.fp-cab-foto { position: absolute; top: 0; right: 0; bottom: 0; width: 55%; background: center / cover no-repeat; opacity: 0; transition: opacity .8s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 45%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 45%, #000 100%);
  pointer-events: none; }
.fp-cab-foto.fp-foto-ok { opacity: .28; }
.fp-hero .fp-hero-fotos { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 40%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 40%, #000 100%);
  pointer-events: none; }
.fp-hero .fp-hero-fotos span { background: center / cover no-repeat; opacity: 0; transition: opacity 1s ease; }
.fp-hero .fp-hero-fotos span.fp-foto-ok { opacity: .32; }
.fp-hero > :not(.fp-hero-fotos) { position: relative; z-index: 1; }
@media (max-width: 760px) { .fp-cab-foto { width: 100%; } .fp-hero .fp-hero-fotos { width: 100%; } }

/* Sistemas aptos en la cabecera de la ficha del plato (INC-00051) */
.fp-cab-sist { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fp-cab-sist-t { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gm-muted); }

/* Recetas por línea (especificación integral, 13/10/2026) */
.fp-recetas-lin tr.fp-sin-receta td { background: #fff4f4; }
.fp-sin-txt { color: #b4000c; font-weight: 700; }
.fp-aviso-sm { margin-top: 6px; background: #fff7e6; border: 1px solid #f5c26b; color: #6b4300; border-radius: 8px; padding: 6px 9px; font-size: .78rem; }
.fp-asig-quien { font-size: .76rem; line-height: 1.35; }
.fp-usar-otra { height: 30px; font-size: .78rem; max-width: 150px; }
.fp-dietas .fp-ale { display: inline-block; margin: 0 6px 6px 0; padding: 3px 8px; border-radius: 999px; background: #f1f5f9; font-size: .8rem; }
.fp-rojo { color: #b4000c; }

/* Gramajes por categoría (especificación integral, fase 3) */
.fp-gram-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fp-gram-cats .fp-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; font-weight: 700; font-size: .8rem; cursor: pointer; }
.fp-gram-cats .fp-chip.on { background: #0f172a; color: #fff; border-color: #0f172a; }
.fp-gram-cab { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.fp-gram-factor { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fp-gram-factor label { font-size: .78rem; font-weight: 700; }
.fp-gram-factor .gm-input { width: 130px; }
.fp-gram-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.fp-gram-kpi { border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 12px; display: grid; gap: 2px; }
.fp-gram-kpi small { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.fp-gram-kpi b { font-size: 1.1rem; }
.fp-gram-kpi span { font-size: .72rem; color: #64748b; }
.fp-gram-tabla tr.fp-gram-dif td { background: #fff7e6; }
.fp-gram-regla { font-size: .76rem; color: #475569; }
.fp-gram-modo { height: 30px; font-size: .76rem; }
.fp-gram-val { width: 70px; height: 30px; font-size: .78rem; }
.fp-gram-ambito { height: 30px; font-size: .76rem; max-width: 110px; }

/* Fase 4: contexto de coste y artículo */
.fp-gram-ctx { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 12px; font-size: .8rem; font-weight: 700; }
.fp-gram-ctx .gm-select, .fp-gram-ctx .gm-input { height: 32px; font-size: .8rem; margin-left: 6px; }
.fp-gram-art { font-size: .76rem; }
.fp-gram-rend { margin-top: 14px; }
/* Fase 5: acreditaciones de calidad */
.fp-acr-in { height: 28px; font-size: .74rem; max-width: 150px; margin-left: 4px; }
.fp-acred td { border-top: 0; padding-top: 0; }
.fp-cal-nuevo { flex-wrap: wrap; margin-top: 8px; }
/* Asignación en bloque */
.fp-bloque { flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 8px 0; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 12px; }

/* Artículos con calidad mejorada (Hugo 13/10/2026) */
.fp-cal-pill { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.fp-cal-ok { background: #dcfce7; color: #166534; } .fp-cal-aviso { background: #fef3c7; color: #92400e; } .fp-cal-mal { background: #fee2e2; color: #991b1b; } .fp-cal-gris { background: #f1f5f9; color: #475569; }
.fp-cal-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.fp-cal-kpi { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 14px; text-align: left; cursor: pointer; display: grid; gap: 2px; font: inherit; }
.fp-cal-kpi b { font-size: 1.5rem; } .fp-cal-kpi span { font-size: .78rem; } .fp-cal-kpi.on { outline: 2px solid currentColor; }

/* INC-00107/111: filtros por columna y barra de desplazamiento encima de la tabla */
.fp-hscroll { overflow-x: auto; overflow-y: hidden; height: 16px; margin-bottom: 4px; }
.fp-hscroll > div { height: 1px; }
.fp-fcols th { padding: 4px 6px !important; background: var(--gm-bg, #f8fafc); cursor: default !important; }
.fp-fcol { height: 30px !important; font-size: .78rem !important; padding: 0 8px !important; min-width: 70px; width: 100%; }

/* INC-00244: grupos de tipos de cliente */
.fp-gt { display: grid; grid-template-columns: 240px 1fr; gap: 14px; min-height: 360px; }
.fp-gt-l { display: grid; gap: 6px; align-content: start; border-right: 1px solid #e5e7eb; padding-right: 12px; }
.fp-gt-g { display: grid; text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; }
.fp-gt-g span { font-size: .74rem; color: #64748b; } .fp-gt-g.on { border-color: #b4000c; background: rgba(180, 0, 12, .05); }
.fp-gt-tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 10px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.fp-gt-t { font-size: .82rem; padding: 4px 6px; border-radius: 6px; cursor: pointer; } .fp-gt-t.on { background: rgba(180, 0, 12, .07); font-weight: 600; }
@media (max-width: 700px) { .fp-gt { grid-template-columns: 1fr; } .fp-gt-l { border-right: 0; padding-right: 0; } }

/* INC-00299: filas de excepciones por cliente más bajas (botones en una línea) */
.fp-exc-tabla td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.fp-exc-acc { display: flex; gap: 6px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.fp-exc-tabla .fp-asig-quien { white-space: nowrap; }

/* INC-00307: lista PLATOS sin hueco: el nombre ocupa como mucho 2 líneas; total de excepciones de receta */
.fp-nom2 { min-width: 220px; max-width: 360px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.fp-nexc { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; color: #7c3aed; background: #f3e8ff; border-radius: 999px; padding: 2px 8px; }
.fp-fam2 { min-width: 120px; max-width: 190px; }

/* INC-00487: selector en árbol de la clasificación (Producción › Platos) */
.fp-cls { position: relative; }
.fp-cls-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; cursor: pointer; }
.fp-cls-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-cls-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; width: min(480px, 92vw); background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(15,23,42,.35); padding: 8px; }
.fp-cls-h { display: flex; gap: 6px; margin-bottom: 6px; } .fp-cls-h .gm-input { flex: 1; }
.fp-cls-tree { max-height: 360px; overflow-y: auto; }
.fp-cls-n { display: flex; align-items: center; gap: 2px; }
.fp-cls-grp { padding-left: 18px; } .fp-cls-fam { padding-left: 36px; }
.fp-cls-x { flex: none; width: 22px; height: 26px; border: 0; background: none; color: #64748b; cursor: pointer; font-size: .8rem; }
.fp-cls-it { flex: 1; display: flex; justify-content: space-between; gap: 8px; border: 0; background: none; text-align: left; padding: 5px 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: .84rem; color: #0f172a; }
.fp-cls-ga > .fp-cls-it { font-weight: 800; } .fp-cls-grp > .fp-cls-it { font-weight: 600; }
.fp-cls-it small { color: #94a3b8; font-weight: 600; }
.fp-cls-it:hover { background: #f1f5f9; } .fp-cls-it.on { background: #e8f1fc; color: #0B3C73; }
/* INC-00486: paginación de las listas */
.fp-pag { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: .82rem; color: #475569; }
.fp-pag-n { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; } .fp-pag-n .gm-select { width: auto; padding: 4px 8px; }

/* INC-00481 (Hugo, 23/10/2026): ficha del plato «limpia y compacta, ya que son muchos datos»: cabecera baja, pestañas en una línea
   (las principales como barra segmentada y las secciones de Datos generales subrayadas, con desplazamiento lateral) y campos sin montarse */
.fp-cab-card { padding: 12px 16px; }
.fp-cab { gap: 10px; align-items: flex-start; }
.fp-cab-t b { font-size: 1rem; line-height: 1.25; }
.fp-cab-sist { margin-top: 4px; gap: 6px; }
.fp-cab-acc { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fp-cab-acc .gm-btn { padding: 6px 11px; font-size: .8rem; gap: 6px; }
.fp-ficha.fp-arriba, .fp-ficha.fp-arriba.fp-sin-sub { gap: 8px; }
.fp-arriba .fp-nav.fp-nav-1 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-bottom: 0; background: #eef2f7; border-radius: 12px; padding: 4px; gap: 4px; }
.fp-arriba .fp-nav.fp-nav-1::-webkit-scrollbar { display: none; }
.fp-arriba .fp-nav.fp-nav-1 button { flex: none; border: 0; border-radius: 9px; padding: 7px 14px; background: none; font-size: .84rem; font-weight: 700; color: #475569; white-space: nowrap; }
.fp-arriba .fp-nav.fp-nav-1 button i { color: #94a3b8; }
.fp-arriba .fp-nav.fp-nav-1 button.on { background: #fff; color: var(--gm-red); box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.fp-arriba .fp-nav.fp-nav-1 button.on i { color: var(--gm-red); }
.fp-arriba .fp-nav.fp-nav-1 button:hover:not(:disabled):not(.on) { color: #0f172a; background: rgba(255,255,255,.6); }
.fp-arriba .fp-nav.fp-nav-2 { flex-wrap: nowrap; overflow-x: auto; gap: 0; border-bottom: 1px solid var(--gm-line, #e2e8f0); scrollbar-width: thin; }
.fp-arriba .fp-nav.fp-nav-2 button { flex: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 7px 11px; font-size: .8rem; white-space: nowrap; color: #475569; }
.fp-arriba .fp-nav.fp-nav-2 button.on { background: none; color: var(--gm-red); border-bottom-color: var(--gm-red); font-weight: 700; }
.fp-arriba .fp-nav.fp-nav-2 button:hover:not(.on) { color: #0f172a; border-color: transparent; border-bottom-color: #cbd5e1; }
.fp-panel > .gm-card { padding: 14px 16px; }
.fp-panel .fp-panel-head h4 { font-size: .95rem; }
.fp-grid { gap: 10px; }
@media (max-width: 1100px) { .fp-grid .fp-c2, .fp-grid .fp-c3, .fp-grid .fp-c4 { grid-column: 1 / -1; } }
@media (max-width: 560px) { .fp-grid { grid-template-columns: minmax(0, 1fr); } .fp-cab-acc .gm-btn span { display: none; } .fp-cab-acc { margin-left: 0; } }
/* INC-00500 (Hugo, 23/10/2026): en el móvil la ficha se salía por la derecha. La ficha es una columna flex con align-items:start,
   así que las barras de pestañas tomaban el ancho de todo su contenido (hasta 1.900 px) en vez de desplazarse dentro de la pantalla.
   Con el ancho máximo al de la ficha se desplazan de lado (en el ordenador se ven igual que antes) */
.fp-arriba > .fp-nav, .fp-arriba > .fp-panel { max-width: 100%; min-width: 0; }
.fp-gourmet-g { display: grid; grid-template-columns: 260px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 900px) { .fp-gourmet-g { grid-template-columns: minmax(0, 1fr); } }

/* INC-00661: alta de excepciones con selección múltiple de líneas, grupos y clientes */
.fp-mlin { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.fp-mlista { max-height: 240px; overflow-y: auto; border: 1px solid var(--gm-border, #e5e7eb); border-radius: 8px; padding: 4px 8px; margin-top: 6px; }
.fp-mchk { display: flex; align-items: flex-start; gap: 6px; padding: 3px 0; cursor: pointer; font-size: .88rem; }
.fp-mchk input { margin-top: 3px; }

/* INC-00830: artículos comerciales del ingrediente como tarjetas, con su estado en color */
.fp-art-res { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; font-size: .84rem; }
.fp-art-res span { background: #f1f5f9; border-radius: 999px; padding: 4px 12px; }
.fp-art-res .fp-art-res-ok { background: #dcfce7; color: #166534; }
.fp-arts { display: grid; gap: 10px; }
.fp-arts-otros { margin: 16px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.fp-art { border: 1px solid #e2e8f0; border-left: 5px solid #94a3b8; border-radius: 12px; padding: 12px 14px; background: #fff; display: grid; gap: 10px; }
.fp-art-ok { border-left-color: #16a34a; background: linear-gradient(90deg, #f0fdf4, #fff 40%); }
.fp-art-no { border-left-color: #f59e0b; background: #fffbeb; }
.fp-art-off { border-left-color: #cbd5e1; background: #f8fafc; opacity: .8; }
.fp-art-h { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.fp-art-cod { font-weight: 800; font-size: 1.1rem; background: #0f172a; color: #fff; border-radius: 8px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.fp-art-ok .fp-art-cod { background: #16a34a; }
.fp-art-t { flex: 1 1 320px; min-width: 0; }
.fp-art-t > b { font-size: .95rem; }
.fp-art-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fp-art-est { font-size: .74rem; font-weight: 800; border-radius: 999px; padding: 2px 10px; background: #e2e8f0; color: #475569; }
.fp-art-ok .fp-art-est { background: #16a34a; color: #fff; }
.fp-art-no .fp-art-est { background: #f59e0b; color: #fff; }
.fp-tag { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #f1f5f9; color: #475569; }
.fp-tag-pref { background: #fef3c7; color: #92400e; }
.fp-tag-base { background: #e0f2fe; color: #075985; }
.fp-tag-barato { background: #dcfce7; color: #166534; }
.fp-tag-bloq { background: #fee2e2; color: #b91c1c; }
.fp-art-precio { text-align: right; min-width: 150px; display: grid; justify-items: end; line-height: 1.15; }
.fp-art-precio small { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.fp-art-precio b { font-size: 1.35rem; font-weight: 800; color: #0f172a; }
.fp-art-precio em { font-style: normal; font-size: .74rem; color: #64748b; margin-top: 2px; }
.fp-art-ctl { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: .82rem; }
.fp-art-ctl label { display: flex; align-items: center; gap: 6px; }
.fp-art-notas { flex: 1 1 260px; } .fp-art-notas input { flex: 1; }
.fp-art-acr, .fp-art-hist { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; }
.fp-art-sub { color: #64748b; font-weight: 700; }
.fp-tag-acr { background: #ede9fe; color: #5b21b6; }
.fp-art-addacr summary { cursor: pointer; color: #2563eb; font-weight: 700; display: inline; }
.fp-art-addacr[open] { flex-basis: 100%; }
.fp-hist-chip { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 1px 8px; }
/* INC-00838: filas compactas (Marcas del ingrediente): botones en línea y menos relleno */
.fi-tabla-comp td { padding-top: 5px !important; padding-bottom: 5px !important; vertical-align: middle; }
.fi-tabla-comp .fi-acc { white-space: nowrap; width: 1%; }
.fi-tabla-comp .fi-acc .gm-icon-btn { display: inline-flex; margin: 0 2px; width: 28px; height: 28px; min-height: 0; align-items: center; justify-content: center; vertical-align: middle; }
.fi-tabla-comp td > * { vertical-align: middle; }
/* INC-00843: texto de una celda en n filas como máximo */
.gm-clamp { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
