/* =====================================================================
   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 { --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 { display: flex; flex-direction: column; gap: 18px; }
#recetas-view h3, #recetas-view h4 { color: var(--gm-ink); display: block; }
#recetas-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-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); }
