/* Los dibujos del programa en la portada. Copian el panel de verdad (estatico/panel.css): sus colores, bordes, chips y
   tarjetas, con la letra de la web. Se mueven paso a paso con pantallas.js: [data-paso] lleva .is-hecho desde su paso y
   .is-ahora en ese paso; dentro de algo hecho, .am-a se va y sale .am-b. Siempre en claro, como el panel por defecto. */
.am {
  --am-lateral: #fafafa; --am-muted: #f4f4f5; --am-tinta: #09090b; --am-suave: #52525b; --am-linea: #e4e4e7;
  --am-mal: #dc2626; --am-mal-f: #fef2f2; --am-ambar: #b45309; --am-ambar-f: #fffbeb; --am-ok: #15803d; --am-ok-f: #f0fdf4;
  font: 400 12px/1.45 var(--font-text); color: var(--am-tinta); text-align: left; color-scheme: light;
}
.am * { box-sizing: border-box; }
.am p { margin: 0; }
.am b { font-weight: 600; }

/* lo que cambia y lo que aparece */
.am .am-b { display: none; }
.am .is-hecho .am-a, .am .is-hecho.am-a { display: none; }
.am .is-hecho .am-b, .am .is-hecho.am-b { display: inline-block; animation: am-entra .35s var(--m-ease, ease) both; }
.am .am-aparece:not(.is-hecho) { visibility: hidden; }
.am .am-aparece.is-hecho { animation: am-entra .35s var(--m-ease, ease) both; }
@keyframes am-entra { from { opacity: 0; transform: translateY(3px); } }
.am-ok-txt { color: var(--am-ok); } .am-ambar-txt { color: var(--am-ambar); } .am-mal-txt { color: var(--am-mal); }
.am-suave { color: var(--am-suave); }

/* piezas del panel */
.am-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--am-muted); display: grid; place-items: center; font-size: 9.5px; font-weight: 600; flex: none; }
.am-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; line-height: 1.5; padding: 0 6px; border-radius: 5px;
  border: 1px solid var(--am-linea); background: var(--am-muted); color: var(--am-suave); white-space: nowrap; transition: color .3s, background-color .3s, border-color .3s; }
.am-chip--mal { color: var(--am-mal); background: var(--am-mal-f); border-color: #fecaca; }
.am-chip--ambar { color: var(--am-ambar); background: var(--am-ambar-f); border-color: #fde68a; }
.am-chip--ok, .am-chip.is-hecho { color: var(--am-ok); background: var(--am-ok-f); border-color: #bbf7d0; }
.am-btn { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--am-muted);
  font-weight: 500; font-size: 11px; white-space: nowrap; transition: transform .12s var(--m-ease, ease); }
.am-btn--negro { background: #18181b; color: #fafafa; }
.am .is-ahora.am-btn, .am .is-ahora .am-btn { transform: scale(.93); }
.am-tarjeta { width: min(100%, 440px); background: #fff; border: 1px solid var(--am-linea); border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 22px 48px -26px rgb(0 0 0 / .35); }
.am-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 13px; }

/* ---------- La ventana: la pantalla Hoy ---------- */
.am-win { display: grid; grid-template-columns: 146px minmax(0, 1fr); min-height: 430px; overflow: hidden; border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .08), 0 24px 60px -28px rgb(0 0 0 / .45); }
.am-lat { display: flex; flex-direction: column; gap: 10px; padding: 12px 8px; background: var(--am-lateral); border-right: 1px solid var(--am-linea); }
.am-local { display: flex; align-items: center; gap: 8px; padding: 2px 4px; min-width: 0; }
.am-logo { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--am-tinta); color: #fff; font-size: 10px; font-weight: 700; }
.am-local b { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-local small { display: block; font-size: 10px; color: var(--am-suave); }
.am-menu { display: grid; gap: 1px; }
.am-menu span { display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 7px; border-radius: 6px; color: #3f3f46; font-size: 11.5px; white-space: nowrap; }
.am-menu span i { width: 11px; height: 11px; flex: none; border: 1.4px solid currentColor; border-radius: 3px; opacity: .7; }
.am-menu span.is-on { background: #18181b; color: #fafafa; font-weight: 600; }
.am-menu small { padding: 8px 7px 2px; font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--am-suave); }
.am-main { display: flex; flex-direction: column; min-width: 0; }
.am-sup { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--am-linea); }
.am-buscar { display: flex; align-items: center; gap: 6px; width: min(100%, 200px); height: 26px; padding: 0 8px; border: 1px solid var(--am-linea); border-radius: 7px; color: #71717a; font-size: 11px; }
.am-buscar kbd { margin-left: auto; padding: 1px 4px; border: 1px solid var(--am-linea); border-radius: 4px; background: var(--am-muted); font: 500 9px/1.3 var(--font-text); }
.am-pag { display: grid; align-content: start; gap: 2px; padding: 14px 16px 16px; }
.am-h { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.am-sec { margin-top: 12px; font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--am-suave); }
.am-tarjetas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.am-t { padding: 10px 11px; border: 1px solid var(--am-linea); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .05); transition: border-color .4s; }
.am-t--mal:not(.is-hecho) { border-color: #f3a3a3; }
.am-t__cab { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 500; }
.am-cifra { margin-top: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.am-cifra small { font-size: 10.5px; font-weight: 500; letter-spacing: 0; color: var(--am-suave); }
.am-lista { list-style: none; margin: 8px 0 0; padding: 0; }
.am-lista li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px solid var(--am-linea); font-size: 11px; white-space: nowrap; }
.am-lista li > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.am-ind { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.am-ind > div { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--am-linea); border-radius: 10px; }
.am-ind small { font-size: 10px; font-weight: 500; color: var(--am-suave); }
.am-ind b { font-size: 15px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ly-piece--main.am-win .am-pag { padding-right: max(16px, var(--ly-cut-room, 0px)); }

/* La nota de la portada: un aviso del panel encima de la ventana */
.d-card { background: #fff; color: var(--am-tinta, #09090b); border: 1px solid #e4e4e7; border-radius: 12px; padding: 12px 14px; font: 400 12.5px/1.45 var(--font-text); text-align: left;
  box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 22px 48px -22px rgb(0 0 0 / .45); }
.d-card h5 { margin: 0; font: 600 13px/1.3 var(--font-text); }
.d-card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.d-chip { display: inline-flex; align-items: center; font-size: 10px; font-weight: 600; line-height: 1.5; padding: 0 6px; border-radius: 5px; color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; }
.d-note__line { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: #3f3f46; border-top: 1px solid #e4e4e7; }
.d-note__line i { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f0fdf4; color: #15803d; font-style: normal; font-size: 10px; font-weight: 700; }
.d-note__line b { font-weight: 600; color: #09090b; }

/* ---------- Dentro de las tarjetas de funciones ---------- */
.am-escena { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
/* APPCC: la lista de temperaturas */
.am-fila { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--am-linea); transition: background-color .3s; }
.am-fila b { display: block; font-size: 12px; }
.am-fila small { font-size: 10.5px; color: var(--am-suave); }
.am-estado { font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.am-campo { display: flex; align-items: center; justify-content: flex-end; height: 26px; padding: 0 7px; border: 1px solid var(--am-linea); border-radius: 6px; font-variant-numeric: tabular-nums; }
.am-fila.is-ahora .am-campo { border-color: #a1a1aa; box-shadow: 0 0 0 3px rgb(161 161 170 / .25); }
/* Fichar: el reloj, el PIN y los botones */
.am-fichar__arriba { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.am-reloj { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.am-quien { display: flex; align-items: center; gap: 8px; }
.am-caja { display: block; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--am-muted); font-size: 11.5px; }
.am-pin { margin-top: 12px; min-height: 40px; }
.am-pin .am-a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px dashed #d4d4d8; border-radius: 8px; font-size: 11.5px; }
.am-pin .am-a i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #a1a1aa; transition: background-color .15s, border-color .15s; }
.am-pin .am-a i.is-hecho { background: #18181b; border-color: #18181b; }
.am-pin .am-a span { margin-right: auto; color: var(--am-suave); }
.am-pin .am-b { width: 100%; }
.am-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.am-botones .am-btn { height: 38px; font-size: 12.5px; }
.am-log { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--am-linea); font-size: 11px; color: var(--am-suave); }
.am-log b { color: var(--am-tinta); }
/* Veri*Factu: el ticket en papel y el aviso */
.am-escena--ticket { grid-template-columns: auto auto; gap: 20px; align-items: center; justify-content: center; }
.am-ticket { width: 230px; padding: 14px 14px 12px; background: #fff; color: #111; font: 400 10.5px/1.45 var(--font-mono); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 18px 40px -20px rgb(0 0 0 / .4);
  -webkit-mask: radial-gradient(5px at 50% 100%, transparent 98%, #000) 50% 100% / 12px 100% repeat-x; mask: radial-gradient(5px at 50% 100%, transparent 98%, #000) 50% 100% / 12px 100% repeat-x; }
.am-ticket > * + * { margin-top: 6px; }
.am-tk-c { text-align: center; font-weight: 700; letter-spacing: .04em; }
.am-tk-l, .am-tk-lin p, .am-tk-total { display: flex; justify-content: space-between; gap: 8px; }
.am-tk-l { padding-bottom: 6px; border-bottom: 1px dashed #bbb; font-size: 9.5px; }
.am-tk-total { padding: 5px 0; border-top: 2px solid #111; border-bottom: 2px solid #111; font-size: 13px; font-weight: 700; }
.am-tk-iva { font-size: 9.5px; color: #444; }
.am-tk-vf { min-height: 82px; padding-top: 6px; border-top: 1px dashed #bbb; text-align: center; font-size: 9.5px; }
.am-tk-vf .am-a { display: grid; place-items: center; height: 72px; color: #777; }
.am-tk-vf .am-b { width: 100%; }
.am-tk-vf svg { display: block; width: 52px; height: 52px; margin: 3px auto; }
.am-aviso { display: flex; align-items: center; gap: 9px; max-width: 200px; padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 10px; background: #fff;
  box-shadow: 0 18px 40px -22px rgb(0 0 0 / .4); }
.am-aviso i { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--am-ok-f); color: var(--am-ok); font-style: normal; font-weight: 700; }
.am-aviso b { display: block; font-size: 12px; }
.am-aviso small { display: block; font-size: 10.5px; color: var(--am-suave); }

@media (prefers-reduced-motion: reduce) { .am .is-hecho .am-b, .am .am-aparece.is-hecho, .am-btn, .am-chip { animation: none; transition: none; } }
@media (max-width: 1279px) { .am-escena--ticket .am-aviso { display: none; } }
@media (max-width: 639px) {
  .am-win { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .am-lat, .am-buscar kbd { display: none; }
  .am-tarjetas { grid-template-columns: minmax(0, 1fr); }
  .am-tarjetas > :nth-child(2), .am-tarjetas > :nth-child(4), .am-ind > :nth-child(3) { display: none; }
  .am-ind { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-escena { padding: 12px; }
  .am-escena > .am, .am-escena.am { zoom: .48; }
  .am-escena--ticket .am-aviso, .am-tk-lin, .am-tk-iva { display: none; }
}
