/* Sistema de Gestión LATE SPORT - estilos (marca tomada de latesport.com.ar) */
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url(/img/latesport/fonts/chakra-500.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url(/img/latesport/fonts/chakra-700.woff2) format("woff2"); }
@font-face { font-family: "Rubik"; font-weight: 300 900; font-display: swap; src: url(/img/latesport/fonts/rubik.woff2) format("woff2"); }
:root {
  --bg: #e8e8eb;
  --panel: #f6f6f7;
  --panel2: #ffffff;
  --line: #cdcdd3;
  --text: #1B1717;
  --muted: #66626a;
  --accent: #E40044;      /* rojo LATE SPORT */
  --accent2: #A8002F;
  --azul: #096AB5;        /* azul de stock de la tienda */
  --sel: #FDE0E9;
  --ok: #1e7b3a;
  --warn: #9a6400;
  --input: #ffffff;
  --inputdis: #ececef;
  --menu: #1B1717;
  --menutext: #f4f4f5;
  --shadow: 0 6px 24px rgba(0,0,0,.18);
  --radius: 6px;
  --font: "Rubik", "Segoe UI", Tahoma, Arial, sans-serif;
  --head: "Chakra Petch", "Rubik", "Segoe UI", sans-serif;
  --mono: Consolas, "Courier New", monospace;
}

/* ---------- Logo LATE sport (isotipo + texto) ---------- */
.ls-logo { display: inline-flex; align-items: center; gap: .18em; line-height: 1; color: var(--text); }
.ls-iso { width: 1.5em; height: 1.5em; flex: none; margin-right: -.12em; }
.ls-txt { display: flex; flex-direction: column; align-items: flex-end; }
.ls-txt b { font: 700 1em/0.9 var(--head); letter-spacing: .04em; }
.ls-txt i { font: 400 .52em/1 var(--font); font-style: normal; letter-spacing: .06em; margin-top: .08em; }
.ls-logo.grande { font-size: 46px; }
.ls-logo.claro { color: #fff; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.35 var(--font); color: var(--text); background: var(--bg); }
.hidden { display: none !important; }
.upper { text-transform: uppercase; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Login ---------- */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: #0d0b0b; overflow: hidden; }
.login-fondo { position: absolute; inset: -20px; background: url(/img/latesport/banner1.webp) center/cover no-repeat; filter: grayscale(.35) blur(3px) brightness(.55); transform: scale(1.04); animation: lsZoom 24s ease-in-out infinite alternate; }
.login::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg, rgba(27,23,23,.85) 0%, rgba(27,23,23,.45) 55%, rgba(228,0,68,.35) 100%); }
.login-box { position: relative; z-index: 2; width: min(360px, calc(100vw - 32px)); background: var(--panel2); border-radius: 14px; padding: 24px 22px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.55); border-top: 5px solid var(--accent); display: grid; gap: 10px; animation: lsEntra .45s cubic-bezier(.2,.8,.2,1) both; }
.login-box h1 { margin: 0 0 6px; font: 700 15px var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: center; }
.login-marca { justify-self: center; padding: 4px 0 6px; }
@keyframes lsEntra { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes lsZoom { from { transform: scale(1.04); } to { transform: scale(1.12); } }
.login-box label { display: grid; gap: 3px; font-weight: 600; }
.login-box input, .login-box select { padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--input); }
.login-err { color: var(--accent); min-height: 18px; font-weight: 600; white-space: pre-line; }
.login-btns { display: flex; justify-content: flex-end; }

/* ---------- Escritorio ---------- */
.desk { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; }
.menubar { background: linear-gradient(180deg, #2a2626 0%, #1B1717 55%, #121010 100%); color: var(--menutext); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 8px; user-select: none; position: relative; z-index: 50; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 3px 10px rgba(0,0,0,.45); border-bottom: 2px solid var(--accent2); }
.menubar > .mi { position: relative; }
.menubar.bloq > .mi { pointer-events: none; opacity: .45; }
.menubar > .mi > .ml { padding: 6px 16px; cursor: pointer; display: block; border-radius: 9px; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: #fff; background: linear-gradient(180deg, #3a3535 0%, #272323 50%, #1B1717 100%); border: 1px solid #0b0909; text-shadow: 0 1px 2px rgba(0,0,0,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -2px 0 rgba(0,0,0,.3), 0 2px 5px rgba(0,0,0,.5); transition: background .15s, box-shadow .15s, transform .12s; }
.menubar > .mi:hover > .ml { background: linear-gradient(180deg, #F43A6E 0%, #CC003C 50%, var(--accent2) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.5); transform: translateY(-1px); }
.menubar > .mi.open > .ml { background: linear-gradient(180deg, #F2195C 0%, var(--accent) 50%, var(--accent2) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.25), 0 3px 8px rgba(0,0,0,.45); transform: translateY(-1px); }
.menubar .brand { margin-left: auto; padding: 2px 10px; font-size: 22px; }
.menubar .brand .ls-logo { color: #fff; }
.dd { position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; background: linear-gradient(180deg, #ffffff 0%, #f3f3f5 100%); color: var(--text); border: 1px solid rgba(0,0,0,.18); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.2), inset 0 1px 0 #fff; padding: 6px; display: none; transform-origin: top left; }
.dd .dd { top: -7px; left: 100%; }
.mi.open > .dd, .dd .mi:hover > .dd { display: block; animation: ddIn .16s ease-out; }
@keyframes ddIn { from { opacity: 0; transform: perspective(600px) rotateX(-12deg) translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.dd .mi { position: relative; }
.dd .ml { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 12px; margin: 1px 0; cursor: pointer; white-space: nowrap; border-radius: 8px; border: 1px solid transparent; transition: background .12s, box-shadow .12s, transform .12s, color .12s; }
.dd .mi:hover > .ml { background: linear-gradient(180deg, #F2195C 0%, var(--accent) 55%, var(--accent2) 100%); color: #fff; border-color: rgba(0,0,0,.25); text-shadow: 0 1px 1px rgba(0,0,0,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 8px rgba(168,0,47,.35); transform: translateX(3px); }
.dd .ml:active { transform: translateX(3px) scale(.98); box-shadow: inset 0 2px 4px rgba(0,0,0,.3); }
.dd .sub::after { content: "▸"; color: var(--muted); transition: color .12s, transform .12s; }
.dd .mi:hover > .sub::after { color: #fff; transform: translateX(2px); }
.dd .sep { height: 2px; margin: 5px 8px; border: 0; background: linear-gradient(90deg, transparent, rgba(0,0,0,.15) 15%, rgba(0,0,0,.15) 85%, transparent); box-shadow: 0 1px 0 #fff; }

.tabs { display: flex; gap: 2px; background: #dcdce0; padding: 4px 6px 0; overflow-x: auto; min-height: 6px; }
.tab { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px 6px 0 0; background: #ececef; cursor: pointer; white-space: nowrap; border: 1px solid var(--line); border-bottom: 0; }
.tab.act { background: var(--panel); font-weight: 600; }
.tab .x { border: 0; background: none; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; color: var(--muted); }
.tab .x:hover { color: var(--accent); }

.cuerpo { display: flex; min-height: 0; position: relative; }
/* La barra de accesos flota sobre el video de fondo (sin fondo propio) */
.barra { position: absolute; top: 0; left: 0; bottom: 0; z-index: 5; width: 250px; display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; background: transparent; overflow-y: auto; }
.barra:empty { display: none; }
.btit { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; padding: 0 4px 2px; text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.7); }
.acc { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; font: inherit; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s, box-shadow .15s, filter .15s; }
.acc:hover { transform: translateX(4px); filter: brightness(1.08); box-shadow: 0 8px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.25); }
.acc:active { transform: scale(.97); }
.acc:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.acc .ico { flex: 0 0 48px; width: 48px; height: 48px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); transition: transform .2s; pointer-events: none; }
.acc:hover .ico { transform: scale(1.12) rotate(-4deg); }
.acc .tx { display: flex; flex-direction: column; min-width: 0; }
.acc .tx b { font-size: 15px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.acc .tx small { font-size: 12px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work { flex: 1; min-width: 0; position: relative; overflow: auto; background: var(--panel); }
/* Fondo de inicio: carrusel de banners de la tienda, fundido + zoom lento; sombra a la izquierda para leer los accesos rápidos */
.fondo { position: absolute; inset: 0; background: linear-gradient(160deg, #2a2626 0%, #1B1717 45%, #0d0b0b 100%); pointer-events: none; overflow: hidden; }
/* Isotipo grande de marca de agua debajo de los accesos rápidos */
.fondo::before { content: ""; position: absolute; left: -40px; bottom: -30px; width: 300px; height: 300px; background: url(/img/latesport/icono.png) center/contain no-repeat; opacity: .08; }
.fondo .slide { position: absolute; inset: 0 0 0 264px; background: left center/cover no-repeat; opacity: 0; transform: scale(1.02); transform-origin: left center; transition: opacity 1.2s ease, transform 8s linear; }
.fondo .slide.act { opacity: 1; transform: scale(1.06); }
.barra:empty ~ .work .fondo .slide, .cuerpo:has(.barra.hidden) .fondo .slide { left: 0; }
/* Filo rojo entre el panel y el banner, y franja roja al pie */
.fondo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 260px, var(--accent) 260px, var(--accent) 264px, rgba(0,0,0,.35) 264px, transparent 340px), linear-gradient(0deg, var(--accent) 0, var(--accent) 4px, transparent 4px); }
.cuerpo:has(.barra:empty) .fondo::after, .cuerpo:has(.barra.hidden) .fondo::after { background: linear-gradient(0deg, var(--accent) 0, var(--accent) 4px, transparent 4px); }
/* ---------- Panel de inicio LATE SPORT (HUD futurista sobre los banners) ---------- */
.hud { position: absolute; inset: 0 0 4px 264px; display: grid; place-items: center; overflow: hidden; perspective: 600px;
  background: radial-gradient(ellipse 60% 70% at 50% 45%, rgba(10,8,8,.55) 0%, rgba(10,8,8,.82) 70%, rgba(6,5,5,.94) 100%); }
.cuerpo:has(.barra:empty) .hud, .cuerpo:has(.barra.hidden) .hud { left: 0; }
/* Piso de grilla en perspectiva que avanza */
.hud-piso { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; transform: rotateX(72deg); transform-origin: bottom;
  background-image: linear-gradient(rgba(228,0,68,.55) 1px, transparent 1px), linear-gradient(90deg, rgba(228,0,68,.55) 1px, transparent 1px);
  background-size: 60px 60px; animation: hudPiso 3s linear infinite;
  mask-image: linear-gradient(to top, #000 10%, transparent 85%); -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); }
@keyframes hudPiso { to { background-position: 0 60px; } }
/* Línea de escaneo */
.hud-scan { position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(to bottom, transparent, rgba(228,0,68,.10) 80%, rgba(255,60,110,.45) 99%, transparent);
  animation: hudScan 6s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes hudScan { to { top: 110%; } }
/* Tarjeta central de vidrio */
.hud-centro { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 56px 28px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px; backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(228,0,68,.15), inset 0 1px 0 rgba(255,255,255,.12);
  color: #fff; text-align: center; animation: hudEntra .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hudEntra { from { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(6px); } }
.hud-esq { position: absolute; width: 22px; height: 22px; border: 2px solid var(--accent); filter: drop-shadow(0 0 6px rgba(228,0,68,.8)); }
.hud-esq.e1 { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.hud-esq.e2 { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.hud-esq.e3 { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.hud-esq.e4 { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
/* Isotipo con anillos girando */
.hud-iso { position: relative; width: 150px; height: 150px; display: grid; place-items: center; margin-bottom: 4px; }
.hud-iso img { width: 92px; height: 92px; filter: drop-shadow(0 0 14px rgba(228,0,68,.85)) drop-shadow(0 0 30px rgba(228,0,68,.45)); animation: hudLatido 2.4s ease-in-out infinite; }
@keyframes hudLatido { 50% { transform: scale(1.06); filter: drop-shadow(0 0 22px rgba(228,0,68,1)) drop-shadow(0 0 44px rgba(228,0,68,.6)); } }
.hud-anillo { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.hud-anillo.a1 { border-top-color: var(--accent); border-right-color: rgba(228,0,68,.35); animation: hudGira 3.2s linear infinite; box-shadow: 0 0 18px rgba(228,0,68,.25); }
.hud-anillo.a2 { inset: 12px; border: 1px dashed rgba(255,255,255,.28); animation: hudGira 14s linear infinite reverse; }
.hud-anillo.a3 { inset: -10px; border-bottom-color: rgba(255,255,255,.55); border-left-color: rgba(255,255,255,.12); animation: hudGira 6s linear infinite reverse; }
@keyframes hudGira { to { transform: rotate(360deg); } }
.hud-marca { display: flex; align-items: baseline; gap: .25em; line-height: 1; }
.hud-marca b { font: 700 64px/1 var(--head); letter-spacing: .08em; background: linear-gradient(180deg, #fff 30%, #c9c9cf); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 30px rgba(255,255,255,.15); }
.hud-marca i { font: 300 40px/1 var(--font); font-style: normal; letter-spacing: .1em; color: var(--accent); text-shadow: 0 0 18px rgba(228,0,68,.7); }
.hud-kick { font: 500 13px/1 var(--head); letter-spacing: .5em; text-transform: uppercase; color: rgba(255,255,255,.6); padding-left: .5em; margin-bottom: 10px; }
.hud-reloj { font: 700 54px/1 var(--head); letter-spacing: .06em; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 20px rgba(228,0,68,.55); }
.hud-reloj small { font-size: .42em; margin-left: .25em; color: var(--accent); vertical-align: top; }
.hud-fecha { font: 400 15px/1.2 var(--font); color: rgba(255,255,255,.75); letter-spacing: .04em; margin-bottom: 14px; }
.hud-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hud-chips span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 120px; padding: 8px 14px; border-radius: 10px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--accent); text-align: left; }
.hud-chips em { font: 500 10px/1 var(--head); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.hud-chips b { font: 700 15px/1.1 var(--head); letter-spacing: .04em; color: #fff; }
.hud-chips .on { border-left-color: #22d36b; }
.hud-chips .on b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #22d36b; box-shadow: 0 0 8px #22d36b; animation: hudPunto 1.6s ease-in-out infinite; vertical-align: middle; }
@keyframes hudPunto { 50% { opacity: .35; } }
@media (max-height: 640px) { .hud-iso { width: 110px; height: 110px; } .hud-iso img { width: 66px; height: 66px; } .hud-marca b { font-size: 46px; } .hud-marca i { font-size: 30px; } .hud-reloj { font-size: 40px; } .hud-centro { padding: 22px 36px 20px; } }
@media (prefers-reduced-motion: reduce) { .fondo .slide, .fondo .slide.act { transform: none; transition: opacity .4s; } .login-fondo, .login-box { animation: none; }
  .hud-piso, .hud-scan, .hud-centro, .hud-iso img, .hud-anillo, .hud-chips .on b::before { animation: none; } }
.win { position: absolute; inset: 0; overflow: auto; padding: 14px 16px 24px; background: var(--panel); }
.status { display: flex; gap: 18px; padding: 4px 10px; background: #dcdce0; font-size: 12px; color: #2b2727; flex-wrap: wrap; }
.status b { color: var(--accent2); }

/* ---------- Formularios ---------- */
.ftitle { font-family: var(--head); font-size: 18px; font-weight: 700; letter-spacing: .02em; text-decoration: underline; color: var(--accent2); margin: 0 0 12px; }
.card { background: var(--panel2); border: 2px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card.tight { padding: 10px; }
.card h3 { margin: 0 0 8px; font-size: 13px; color: var(--accent2); text-decoration: underline; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.fld { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 8px; }
.fld.wide { grid-column: 1 / -1; }
.fld > span { text-align: right; color: #2b2727; font-weight: 600; font-size: 12px; }
.fld.top { align-items: start; }
.inp, .fld input, .fld select, .fld textarea { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--input); min-width: 0; }
.fld input:disabled, .fld select:disabled, .fld textarea:disabled, .inp:disabled { background: var(--inputdis); color: #2b2727; }
.fld input[readonly] { background: var(--inputdis); }
input.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
input:focus, select:focus, textarea:focus { outline: 2px solid #F59AB5; outline-offset: 0; border-color: var(--accent); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.big { font-size: 18px; font-weight: 700; }
.tot { font-size: 16px; font-weight: 700; color: var(--accent2); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--sel); color: var(--accent2); font-weight: 600; font-size: 12px; }
.photo { width: 180px; height: 150px; border: 1px solid var(--line); border-radius: 8px; background: #f9f9fb center/contain no-repeat; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .cols2, .cols3 { grid-template-columns: 1fr; } .fld { grid-template-columns: 110px 1fr; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); background: #fbfbfc; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--sel); border-color: #F2A3BA; }
.btn:disabled { opacity: .45; cursor: default; }
.btn img { width: 20px; height: 20px; image-rendering: pixelated; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent2); }
.btn.primary:hover:not(:disabled) { background: var(--accent2); }
.btn.sm { padding: 2px 7px; font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 3px solid var(--line); border-radius: 10px; background: #f2f2f4; margin-bottom: 12px; align-items: center; }
.toolbar .btn { padding: 4px 6px; }
.toolbar .btn img { width: 24px; height: 24px; }
.toolbar .gsep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }

/* ---------- Grillas ---------- */
.gridwrap { overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; max-height: 60vh; }
table.grid { border-collapse: collapse; width: 100%; font-size: 12px; }
table.grid th { position: sticky; top: 0; background: #ececef; text-align: left; padding: 5px 7px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
table.grid td { padding: 3px 7px; border-bottom: 1px solid #ebebee; white-space: nowrap; }
table.grid tr:nth-child(even) td { background: #f8f8fa; }
table.grid tbody tr { cursor: default; }
table.grid tbody tr:hover td { background: #FFF1F5; }
table.grid tbody tr.sel td { background: var(--sel); }
table.grid tfoot td { font-weight: 700; background: #f2f2f4; border-top: 2px solid var(--line); position: sticky; bottom: 0; }
table.grid td input { width: 100%; border: 1px solid transparent; background: transparent; padding: 2px 4px; }
table.grid td input:focus { border-color: var(--accent); background: #fff; }
.neg { color: var(--accent); }

/* ---------- Modales ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20,18,16,.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); max-width: min(1100px, 100%); max-height: calc(100vh - 32px); overflow: auto; min-width: min(360px, 100%); }
.modal header { padding: 10px 14px; font: 700 14px var(--head); letter-spacing: .04em; color: #fff; background: #1B1717; border-bottom: 3px solid var(--accent); border-radius: 12px 12px 0 0; display: flex; align-items: center; gap: 8px; }
.modal .body { padding: 14px; white-space: pre-line; }
.modal .body.nopre { white-space: normal; }
.modal footer { padding: 10px 14px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 34px; right: 16px; background: #1B1717; color: #fff; padding: 9px 14px; border-radius: 8px; box-shadow: var(--shadow); z-index: 200; max-width: 420px; }
.busy { position: fixed; inset: 0; background: rgba(255,255,255,.35); z-index: 300; display: grid; place-items: center; cursor: progress; }
.busy div { background: #1B1717; color: #fff; padding: 10px 16px; border-radius: 8px; }

/* ---------- Impresión ---------- */
.printonly { display: none; }
@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ---------- Formularios Visual FoxPro (vfp.js) ---------- */
.win.vfpwin { padding: 0; background: transparent; overflow-x: hidden; }
.vfpscale { overflow: hidden; }
.vfpform { overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.25); border: 1px solid #7a7a7a; }
.vfpform * { box-sizing: border-box; }
.vfplabel { line-height: 1.15; pointer-events: none; }
.vfpinput { outline: none; }
.vfpinput:disabled { background: var(--dis-back) !important; color: var(--dis-fore) !important; opacity: 1; -webkit-text-fill-color: var(--dis-fore); }
.vfpinput:focus { outline: 2px solid #3a6ea5; outline-offset: -2px; }
select.vfpinput { padding: 0 2px; }
.vfpbtn { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0; border: 1px solid #8e8f8f; border-radius: 3px; background: linear-gradient(#fdfdfd, #e3e3e3); cursor: pointer; overflow: hidden; color: #000; }
.vfpbtn:hover:not(:disabled) { background: linear-gradient(#eaf6fd, #bee6fd); border-color: #3c7fb1; }
.vfpbtn:active:not(:disabled) { background: #c4e5f6; }
.vfpbtn:disabled { cursor: default; }
.vfpbtn:disabled img:not([src*="APAGADO"]) { opacity: .45; filter: grayscale(1); }
.vfpbtn img { max-width: 100%; max-height: 100%; image-rendering: auto; pointer-events: none; }
/* Botones con ícono moderno (reemplazan TOP/PREV/NEXT/BOTTOM/DOC/DEL/EDIT/... .BMP) */
.vfpbtn.vfpbtn-ico { --c: #475569; gap: 5px; background: #fff; border: 1px solid #d4d0c8; border-radius: 7px; color: #1B1717; box-shadow: 0 1px 2px rgba(0,0,0,.12); transition: background .12s, border-color .12s, transform .08s; }
.vfpbtn.vfpbtn-ico:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 10%, #fff); border-color: var(--c); }
.vfpbtn.vfpbtn-ico:active:not(:disabled) { background: color-mix(in srgb, var(--c) 20%, #fff); transform: translateY(1px); }
.vfpbtn.vfpbtn-ico:disabled { color: #b5b0a7; background: #f1efea; box-shadow: none; }
.vfpbtn img.vico { width: 22px; height: 22px; max-height: calc(100% - 4px); object-fit: contain; pointer-events: none; }
.vfpbtn.vfpbtn-ico:disabled img.vico { filter: grayscale(1); opacity: .4; }
.vfpbtn .vtx { font-size: 12px; font-weight: 600; pointer-events: none; }
.vfpbtn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.vfpcheck input { margin: 0; }
.vfpopt label { cursor: pointer; }
.vfppageframe { display: flex; flex-direction: column; }
.vfptabs { display: flex; gap: 2px; height: 26px; flex: none; }
.vfptab { padding: 3px 14px; border: 1px solid #8e8f8f; border-bottom: 0; background: #e8e8e8; border-radius: 4px 4px 0 0; cursor: pointer; }
.vfptab.act { background: #fff; }
.vfppages { position: relative; flex: 1; border: 1px solid #8e8f8f; }
.vfppage { position: absolute; inset: 0; overflow: hidden; }
.vfpgrid { background: #fff; border: 1px solid #7f9db9; overflow: auto; }
.vfptable { border-collapse: collapse; table-layout: fixed; width: max-content; }
.vfptable th { position: sticky; top: 0; background: linear-gradient(#fff, #e5e5e5); border: 1px solid #c0c0c0; padding: 1px 4px; font-weight: normal; white-space: nowrap; overflow: hidden; z-index: 1; }
.vfptable td { border: 1px solid #c0c0c0; padding: 0 4px; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vfptable td input { border: 0; background: #fffbd6; font: inherit; padding: 0 2px; height: 18px; }
.vfptable tbody tr.sel td { background: var(--sb, #0a246a) !important; color: var(--sf, #fff) !important; }
.vfptab:empty { padding: 3px 5px; }
/* Confirma con el foco: bien visible (se llega con Enter al terminar de completar la pestaña de pago) */
.vfpbtn.vfpbtn-confirma:focus { outline: 3px solid rgb(255,255,128); outline-offset: 1px; }
/* Facturación: celda Cantidad de Detalle por Talle como el Text1 del original (fila rosa; en edición blanco con selección azul) */
.vfpgrid.vtalle .vfptable td input { background: transparent; color: inherit; text-align: right; }
.vfpgrid.vtalle .vfptable td input:focus { background: #fff; color: #000; outline: 0; }
.vfpgrid.vtalle .vfptable td input::selection { background: rgb(0,120,215); color: #fff; }
.vfpcal { font-size: 13px !important; }
.vfpphoto { background-color: #fff; background-repeat: no-repeat; background-position: center; background-size: contain; cursor: zoom-in; }
/* ListBox de detalle de stock (detastock): filas de 15 px como en VFP */
.vfplistbox { background: rgb(207,201,186); border: 1px solid #7f9db9; overflow: hidden; font: bold 9pt "Courier New", Courier, monospace; color: #000; }
.vfplistbox .lbrow { height: 15px; line-height: 15px; display: flex; white-space: pre; }
.vfplistbox .lbc0 { width: 108px; flex: none; padding-left: 2px; }
.vfplistbox .lbc { width: 52px; flex: none; text-align: right; padding-right: 8px; }
.vfptable tbody tr.vacio td { background: transparent; }
/* Búsqueda interactiva (JV.autocompletar) */
.autoc { position: fixed; z-index: 150; max-height: 300px; overflow: auto; background: #fff; border: 1px solid #7f9db9; box-shadow: 0 6px 18px rgba(0,0,0,.25); font: 13px Arial, sans-serif; color: #000; }
.autoc table { border-collapse: collapse; width: 100%; table-layout: auto; }
.autoc th { position: sticky; top: 0; background: linear-gradient(#fff, #e5e5e5); border: 1px solid #c0c0c0; padding: 2px 5px; font-weight: normal; white-space: nowrap; }
.autoc td { border: 1px solid #e0e0e0; padding: 2px 5px; white-space: nowrap; cursor: pointer; }
.autoc tr:hover td { background: #ffffcc; }
.autoc tr.sel td { background: #0a246a; color: #fff; }
/* Búsqueda interactiva: más contraste */
.autoc { border: 2px solid #8b0000; border-radius: 4px; font: 14px Arial, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.autoc th { background: #8b0000; color: #fff; border-color: #6d0000; font-weight: bold; padding: 4px 6px; }
.autoc td { padding: 4px 6px; border-color: #ddd; color: #000; }
.autoc tbody tr:nth-child(even) td { background: #fff0f0; }
.autoc tr:hover td { background: #ffef9e; }
.autoc mark { background: #ffe14d; color: #000; font-weight: bold; padding: 0; }
.autoc tr.sel td { background: #0a246a !important; color: #fff; font-weight: bold; }
.autoc tr.sel mark { background: #ffe14d; color: #000; }
/* Detalle de Stock (detastock): líneas verticales entre columnas de talles, como la grilla del original */
.vfplistbox .lbc0 { box-sizing: border-box; border-right: 1px solid #808080; }
.vfplistbox .lbc { box-sizing: border-box; border-right: 1px solid #a0a0a0; }
/* Planillas de stock: Detalle por Talle con más contraste (fondo y celda en edición) */
.vfpgrid.gtalle { background: rgb(228,228,228); }
.vfpgrid.gtalle .vfptable td { font-weight: bold; color: #000; border-color: #a08080; }
.vfpgrid.gtalle .vfptable tbody tr.vacio td { background: rgb(228,228,228); }
.vfpgrid.gtalle .vfptable td input { background: transparent; font-weight: bold; text-align: right; }
.vfpgrid.gtalle .vfptable td input:focus { background: #ffff00; outline: 2px solid #0a246a; outline-offset: -2px; }
/* Planillas de stock: columna "✖" para borrar un renglón cargado */
.vfpgrid.conborrar tbody tr:not(.vacio) td:first-child { color: #c00000; font-weight: bold; text-align: center; cursor: pointer; }
.vfpgrid.conborrar tbody tr:not(.vacio) td:first-child:hover { background: #c00000 !important; color: #fff; }

/* ---------- Relieve 3D en menús y controles interactivos (mismos colores y distribución) ---------- */
/* Menú principal: botones tipo tecla con canto inferior; se hunden al hacer clic */
.menubar { perspective: 900px; }
.menubar > .mi > .ml { border-bottom-width: 1px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.3), 0 4px 0 #0e0d0b, 0 6px 10px rgba(0,0,0,.55); transform: translateY(-2px); }
.menubar > .mi:hover > .ml { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.25), 0 5px 0 #5e120e, 0 9px 14px rgba(0,0,0,.55); transform: translateY(-3px) rotateX(8deg); }
.menubar > .mi.open > .ml, .menubar > .mi > .ml:active { box-shadow: inset 0 2px 5px rgba(0,0,0,.45), 0 1px 0 #5e120e, 0 2px 4px rgba(0,0,0,.4); transform: translateY(1px); }
/* Desplegables: panel flotante que se abre girando en 3D */
.dd { box-shadow: 0 2px 0 #c9c3b6, 0 4px 0 #b3ac9e, 0 18px 40px rgba(0,0,0,.4), 0 4px 10px rgba(0,0,0,.25), inset 0 1px 0 #fff; }
@keyframes ddIn { from { opacity: 0; transform: perspective(700px) rotateX(-28deg) translateY(-8px) scale(.96); } to { opacity: 1; transform: perspective(700px) rotateX(0) translateY(0) scale(1); } }
.dd .dd { transform-origin: left center; }
.dd .mi:hover > .dd { animation-name: ddSub; }
@keyframes ddSub { from { opacity: 0; transform: perspective(700px) rotateY(-30deg) translateX(-6px); } to { opacity: 1; transform: none; } }
.dd .mi:hover > .ml { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.25), 0 3px 0 #5e120e, 0 6px 12px rgba(168,0,47,.4); transform: translateX(3px) translateY(-1px); }
.dd .ml:active { transform: translateX(3px) translateY(2px); box-shadow: inset 0 3px 6px rgba(0,0,0,.4), 0 0 0 #5e120e; }
/* Accesos rápidos: tarjetas con canto del color oscuro e inclinación al pasar el mouse */
.barra { perspective: 800px; }
.acc { transform-style: preserve-3d; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.18), 0 5px 0 var(--c2, #333), 0 9px 16px rgba(0,0,0,.45); transform: translateY(-2px); transition: transform .18s, box-shadow .18s, filter .15s; }
.acc:hover { transform: translateY(-4px) translateX(4px) rotateY(10deg) rotateX(4deg); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -3px 0 rgba(0,0,0,.18), -4px 7px 0 var(--c2, #333), -6px 14px 22px rgba(0,0,0,.5); }
.acc:active { transform: translateY(3px) scale(.99); box-shadow: inset 0 3px 8px rgba(0,0,0,.35), 0 1px 0 var(--c2, #333), 0 2px 5px rgba(0,0,0,.4); }
.acc .ico { transform: translateZ(20px); }
.acc:hover .ico { transform: translateZ(30px) scale(1.12) rotate(-4deg); }
/* Botones generales */
.btn { background: linear-gradient(180deg, #ffffff 0%, #f3f0e9 100%); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #bdb6a8, 0 3px 5px rgba(0,0,0,.15); transform: translateY(-1px); transition: transform .08s, box-shadow .08s, background .12s; }
.btn:hover:not(:disabled) { background: linear-gradient(180deg, #fff 0%, var(--sel) 100%); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #d79a93, 0 5px 8px rgba(0,0,0,.18); transform: translateY(-2px); }
.btn:active:not(:disabled) { box-shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 0 0 #bdb6a8; transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #F2195C 0%, var(--accent) 55%, var(--accent2) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 0 #5e120e, 0 3px 6px rgba(0,0,0,.25); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #F43A6E 0%, #CC003C 55%, var(--accent2) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 #5e120e, 0 5px 9px rgba(0,0,0,.3); }
.btn:disabled { box-shadow: none; transform: none; }
/* Botones de los formularios (barra de navegación, Grabar, Salir, etc.) */
.vfpbtn { box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0,0,0,.08), 0 2px 0 #9a9a9a, 0 3px 5px rgba(0,0,0,.2); transition: transform .08s, box-shadow .08s, background .12s; }
.vfpbtn:hover:not(:disabled) { box-shadow: inset 0 1px 0 #fff, 0 3px 0 #3c7fb1, 0 5px 8px rgba(0,0,0,.22); transform: translateY(-1px); }
.vfpbtn:active:not(:disabled) { box-shadow: inset 0 2px 4px rgba(0,0,0,.3); transform: translateY(2px); }
.vfpbtn.vfpbtn-ico { background: linear-gradient(180deg, #ffffff 0%, #f1eee8 100%); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c2bdb2, 0 3px 6px rgba(0,0,0,.15); }
.vfpbtn.vfpbtn-ico:hover:not(:disabled) { background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--c) 14%, #fff) 100%); box-shadow: inset 0 1px 0 #fff, 0 3px 0 var(--c), 0 6px 9px rgba(0,0,0,.18); transform: translateY(-1px); }
.vfpbtn.vfpbtn-ico:active:not(:disabled) { box-shadow: inset 0 2px 5px rgba(0,0,0,.25); transform: translateY(2px); }
.vfpbtn:disabled, .vfpbtn.vfpbtn-ico:disabled { box-shadow: none; transform: none; }
/* Pestañas de los formularios: la activa sobresale */
.vfptab { background: linear-gradient(180deg, #f2f2f2, #dcdcdc); box-shadow: inset 0 1px 0 #fff; transition: transform .1s; }
.vfptab:hover { transform: translateY(-1px); }
.vfptab.act { background: #fff; box-shadow: inset 0 1px 0 #fff, 0 -3px 6px rgba(0,0,0,.12); transform: translateY(-2px); position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .acc, .acc:hover, .menubar > .mi > .ml, .menubar > .mi:hover > .ml { transform: none; } .mi.open > .dd, .dd .mi:hover > .dd { animation: none; } }

/* ---------- Formularios: look moderno con profundidad (respeta colores y posiciones del original) ---------- */
/* Campos de texto y combos: hundidos, esquinas suaves, brillo superior; el color de fondo sigue siendo el del SCX */
.vfpinput:not([style*="transparent"]) { border-radius: 6px !important; border-color: rgba(0,0,0,.35) !important; background-image: linear-gradient(180deg, rgba(0,0,0,.07) 0%, rgba(255,255,255,0) 35%, rgba(255,255,255,.12) 100%) !important; box-shadow: inset 0 2px 3px rgba(0,0,0,.28), inset 0 -1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(255,255,255,.45); transition: box-shadow .15s, transform .15s; }
.vfpinput:not([style*="transparent"]):focus { outline: 0; border-color: #3a6ea5 !important; box-shadow: inset 0 2px 3px rgba(0,0,0,.2), 0 0 0 3px rgba(255,255,160,.85), 0 4px 12px rgba(0,0,0,.35); transform: translateY(-1px); }
.vfpinput:disabled { box-shadow: inset 0 2px 3px rgba(0,0,0,.18) !important; }
/* Combos: además un relieve tipo botón en la flecha */
select.vfpinput:not([style*="transparent"]):not(:disabled) { cursor: pointer; background-image: linear-gradient(180deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,.06) 100%) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 rgba(0,0,0,.28), 0 3px 6px rgba(0,0,0,.25); }
select.vfpinput:not([style*="transparent"]):not(:disabled):hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 rgba(0,0,0,.3), 0 6px 10px rgba(0,0,0,.28); transform: translateY(-1px); }
/* Paneles redondeados (Shape): flotan sobre el fondo con sombra y brillo en el borde */
.vfpshape:not([style*="height: 0"]):not([style*="width: 0"]) { box-shadow: 0 6px 16px rgba(0,0,0,.28), 0 2px 4px rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.22), inset 0 -3px 6px rgba(0,0,0,.15); }
/* Contenedores (barra de navegación, etc.) */
.vfpcontainer { border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.4); }
/* Botones de los formularios: esquinas suaves y brillo */
.vfpbtn { border-radius: 8px; background-image: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,.05) 100%); }
.vfpbtn.vfpbtn-confirma:focus { outline-offset: 2px; border-radius: 8px; }
/* Grillas: hundidas, redondeadas, encabezado en relieve, fila seleccionada con brillo */
.vfpgrid { border-radius: 8px; border-color: rgba(0,0,0,.35); box-shadow: inset 0 3px 8px rgba(0,0,0,.22), 0 1px 0 rgba(255,255,255,.4), 0 4px 12px rgba(0,0,0,.2); }
.vfptable th { background-image: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 55%, rgba(0,0,0,.08) 100%) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 3px rgba(0,0,0,.15); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.vfptable tbody tr:not(.vacio):hover td { filter: brightness(1.06); }
.vfptable tbody tr.sel td { background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%) !important; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.vfplistbox { border-radius: 8px; box-shadow: inset 0 3px 8px rgba(0,0,0,.22), 0 4px 12px rgba(0,0,0,.2); }
/* Casillas y opciones: un poco más grandes y con color del sistema */
.vfpcheck input, .vfpopt input { accent-color: var(--accent); transform: scale(1.15); cursor: pointer; }
/* Pestañas (DETALLE, etc.): esquinas suaves con relieve */
.vfptab { border-radius: 8px 8px 0 0; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.vfpform { box-shadow: 0 10px 30px rgba(0,0,0,.35); }

/* ---------- Formularios: refuerzo del efecto 3D (más notorio) ---------- */
/* Campos: más hundidos, canto inferior claro y reflejo tipo vidrio */
.vfpinput:not([style*="transparent"]) { border-radius: 8px !important; border: 1px solid rgba(0,0,0,.55) !important; background-image: linear-gradient(180deg, rgba(0,0,0,.16) 0%, rgba(0,0,0,0) 40%, rgba(255,255,255,.18) 100%) !important; box-shadow: inset 0 3px 5px rgba(0,0,0,.45), inset 0 -2px 0 rgba(255,255,255,.55), 0 2px 0 rgba(255,255,255,.55), 0 -1px 0 rgba(0,0,0,.25); }
.vfpinput:not([style*="transparent"]):hover:not(:disabled):not(:focus) { box-shadow: inset 0 3px 5px rgba(0,0,0,.45), inset 0 -2px 0 rgba(255,255,255,.55), 0 0 0 2px rgba(255,255,255,.5), 0 4px 10px rgba(0,0,0,.3); }
.vfpinput:not([style*="transparent"]):focus { border-color: #1d4f91 !important; box-shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 0 0 3px #ffff80, 0 0 16px 4px rgba(255,255,128,.65), 0 8px 18px rgba(0,0,0,.45); transform: translateY(-2px) scale(1.01); }
/* Combos: botón grueso y brillante con canto inferior */
select.vfpinput:not([style*="transparent"]):not(:disabled) { border-radius: 10px !important; background-image: linear-gradient(180deg, rgba(255,255,255,.75) 0%, rgba(255,255,255,.15) 48%, rgba(0,0,0,.04) 52%, rgba(0,0,0,.12) 100%) !important; box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0,0,0,.15), 0 4px 0 rgba(0,0,0,.4), 0 7px 12px rgba(0,0,0,.4); transform: translateY(-2px); }
select.vfpinput:not([style*="transparent"]):not(:disabled):hover { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0,0,0,.15), 0 6px 0 rgba(0,0,0,.4), 0 11px 18px rgba(0,0,0,.45); transform: translateY(-4px); }
select.vfpinput:not([style*="transparent"]):not(:disabled):active { box-shadow: inset 0 3px 6px rgba(0,0,0,.35), 0 1px 0 rgba(0,0,0,.4); transform: translateY(1px); }
/* Paneles: borde con bisel, brillo superior y sombra profunda */
.vfpshape:not([style*="height: 0"]):not([style*="width: 0"]) { background-image: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,.14) 100%); box-shadow: 0 12px 28px rgba(0,0,0,.45), 0 4px 8px rgba(0,0,0,.3), inset 0 3px 0 rgba(255,255,255,.35), inset 0 -5px 10px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.15); }
/* Barra de navegación */
.vfpcontainer { border-radius: 14px; background-image: linear-gradient(180deg, rgba(255,255,255,.35), rgba(0,0,0,.08)); box-shadow: 0 8px 20px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(0,0,0,.2); }
/* Botones: tipo gema, canto grueso, se elevan al pasar el mouse y se hunden al apretar */
.vfpbtn, .vfpbtn.vfpbtn-ico { border-radius: 10px; border: 1px solid rgba(0,0,0,.45); background-image: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.35) 48%, rgba(0,0,0,.03) 52%, rgba(0,0,0,.1) 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0,0,0,.12), 0 4px 0 #8a857c, 0 7px 12px rgba(0,0,0,.4); transform: translateY(-2px); transition: transform .1s, box-shadow .1s, background .12s; }
.vfpbtn:hover:not(:disabled), .vfpbtn.vfpbtn-ico:hover:not(:disabled) { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0,0,0,.12), 0 6px 0 var(--c, #3c7fb1), 0 12px 20px rgba(0,0,0,.45); transform: translateY(-4px); }
.vfpbtn:hover:not(:disabled) img { transform: scale(1.12); transition: transform .15s; }
.vfpbtn:active:not(:disabled), .vfpbtn.vfpbtn-ico:active:not(:disabled) { box-shadow: inset 0 4px 8px rgba(0,0,0,.4), 0 0 0 transparent; transform: translateY(2px); }
.vfpbtn:disabled, .vfpbtn.vfpbtn-ico:disabled { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 #b8b3aa; transform: none; }
/* Grilla: bien hundida, encabezado tipo botón */
.vfpgrid { border-radius: 12px; border: 2px solid rgba(0,0,0,.45); box-shadow: inset 0 5px 12px rgba(0,0,0,.35), 0 2px 0 rgba(255,255,255,.5), 0 10px 22px rgba(0,0,0,.35); }
.vfptable th { background-image: linear-gradient(180deg, rgba(255,255,255,.8) 0%, rgba(255,255,255,.2) 48%, rgba(0,0,0,.04) 52%, rgba(0,0,0,.14) 100%) !important; box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0,0,0,.18), 0 3px 5px rgba(0,0,0,.25); font-weight: 600; }
.vfptable tbody tr.sel td { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(0,0,0,.3); }
/* Pestañas */
.vfptab { border-radius: 10px 10px 0 0; background-image: linear-gradient(180deg, #fff, #d0d0d0); box-shadow: inset 0 1px 0 #fff, 0 -2px 6px rgba(0,0,0,.25); }
.vfptab.act { background-image: linear-gradient(180deg, #fff, #f3f3f3); box-shadow: inset 0 2px 0 #fff, 0 -5px 12px rgba(0,0,0,.3); transform: translateY(-3px); font-weight: 700; }

/* ---------- Formularios: 3D bien visible (nivel máximo) ---------- */
.vfpinput:not([style*="transparent"]) { border: 2px solid rgba(0,0,0,.6) !important; box-shadow: inset 0 4px 7px rgba(0,0,0,.55), inset 0 -3px 0 rgba(255,255,255,.6), 0 3px 0 rgba(255,255,255,.7), 0 -2px 0 rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.25); }
.vfpinput:not([style*="transparent"]):focus { box-shadow: inset 0 2px 4px rgba(0,0,0,.3), 0 0 0 4px #ffff80, 0 0 22px 8px rgba(255,255,128,.75), 0 12px 24px rgba(0,0,0,.5); transform: translateY(-3px) scale(1.02); }
select.vfpinput:not([style*="transparent"]):not(:disabled) { border: 2px solid rgba(0,0,0,.55) !important; box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.2), 0 6px 0 rgba(0,0,0,.5), 0 10px 16px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.3); transform: translateY(-3px); }
select.vfpinput:not([style*="transparent"]):not(:disabled):hover { box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.2), 0 8px 0 rgba(0,0,0,.5), 0 16px 24px rgba(0,0,0,.55), 0 0 0 2px rgba(255,255,255,.6); transform: translateY(-5px); }
.vfpshape:not([style*="height: 0"]):not([style*="width: 0"]) { background-image: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,.22) 100%); box-shadow: 0 18px 38px rgba(0,0,0,.55), 0 6px 12px rgba(0,0,0,.35), inset 0 4px 0 rgba(255,255,255,.5), inset 0 -8px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.25), 0 0 0 1px rgba(0,0,0,.3); }
.vfpcontainer { box-shadow: 0 12px 26px rgba(0,0,0,.55), inset 0 3px 0 rgba(255,255,255,.7), inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 2px rgba(255,255,255,.35); }
.vfpbtn, .vfpbtn.vfpbtn-ico { border: 2px solid rgba(0,0,0,.5); box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.15), 0 6px 0 #6f6a62, 0 10px 16px rgba(0,0,0,.5); transform: translateY(-3px); }
.vfpbtn:hover:not(:disabled), .vfpbtn.vfpbtn-ico:hover:not(:disabled) { box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.15), 0 8px 0 var(--c, #3c7fb1), 0 16px 26px rgba(0,0,0,.55), 0 0 12px 2px rgba(255,255,255,.6); transform: translateY(-6px); }
.vfpbtn:hover:not(:disabled) img { transform: scale(1.2); }
.vfpbtn:active:not(:disabled), .vfpbtn.vfpbtn-ico:active:not(:disabled) { box-shadow: inset 0 5px 10px rgba(0,0,0,.5); transform: translateY(3px); }
.vfpgrid { border: 3px solid rgba(0,0,0,.5); box-shadow: inset 0 7px 16px rgba(0,0,0,.45), 0 3px 0 rgba(255,255,255,.6), 0 14px 30px rgba(0,0,0,.45); }
.vfptable th { box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.22), 0 4px 7px rgba(0,0,0,.3); }
.vfptab.act { box-shadow: inset 0 3px 0 #fff, 0 -7px 16px rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.5); transform: translateY(-4px); }

/* ---------- Legibilidad y botones sólidos ---------- */
/* Botones: fondo sólido (antes quedaban transparentes y se veía el rojo de atrás) */
.vfpbtn { background-color: #f7f5f1; color: #111; font-weight: 700; }
.vfpbtn.vfpbtn-ico { background-color: #ffffff; }
.vfpbtn.vfpbtn-ico:hover:not(:disabled) { background-color: color-mix(in srgb, var(--c) 18%, #fff); }
.vfpbtn span { text-shadow: 0 1px 0 #fff; }
/* Deshabilitados: se distinguen (más grises) pero siguen siendo sólidos */
.vfpbtn:disabled, .vfpbtn.vfpbtn-ico:disabled { background-color: #d8d4cc; background-image: linear-gradient(180deg, rgba(255,255,255,.5), rgba(0,0,0,.06)); color: #8a857c; border-color: rgba(0,0,0,.3); }
/* Barra de navegación: fondo oscuro propio para que resalte sobre el rojo */
.vfpcontainer:has(.vfpbtn) { background-color: #1B1717 !important; background-image: linear-gradient(180deg, #4a4540 0%, #1B1717 55%, #1a1816 100%) !important; border: 2px solid #fff !important; box-shadow: 0 10px 24px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.25), 0 0 0 3px rgba(0,0,0,.35), 0 0 18px 3px rgba(255,255,255,.35); }
.vfpcontainer:has(.vfpbtn) .vfpbtn:not(:disabled) { box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.15), 0 5px 0 #000, 0 8px 12px rgba(0,0,0,.6); }
.vfpcontainer:has(.vfpbtn) .vfpbtn:not(:disabled):hover { box-shadow: inset 0 2px 0 #fff, 0 7px 0 var(--c, #3c7fb1), 0 0 14px 4px rgba(255,255,160,.8); }
.vfpcontainer:has(.vfpbtn) .vfpbtn:disabled { opacity: .55; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
/* Campos: sombra interna más liviana para que no ensucie el texto, letra más oscura y nítida */
.vfpinput:not([style*="transparent"]) { background-image: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,0) 30%) !important; box-shadow: inset 0 3px 4px rgba(0,0,0,.35), inset 0 -2px 0 rgba(255,255,255,.6), 0 2px 0 rgba(255,255,255,.65), 0 -1px 0 rgba(0,0,0,.3); font-weight: 700; }
select.vfpinput:not([style*="transparent"]):disabled { background-color: #ebe7de !important; background-image: none !important; box-shadow: inset 0 2px 4px rgba(0,0,0,.3), 0 2px 0 rgba(255,255,255,.6); transform: none; }
/* Etiquetas claras sobre fondo rojo: sombra oscura para que se lean */
.vfplabel.vfpclaro { text-shadow: 0 1px 0 #000, 0 2px 4px rgba(0,0,0,.85), 0 0 1px #000; }

/* ---------- Dónde estoy parado: el control con el foco se ilumina (todos los formularios) ---------- */
@keyframes focoPulso {
  0%, 100% { box-shadow: 0 0 0 3px #ffeb3b, 0 0 0 6px rgba(0,0,0,.55), 0 0 18px 6px rgba(255,235,59,.75), 0 10px 22px rgba(0,0,0,.5); }
  50%      { box-shadow: 0 0 0 4px #fff59d, 0 0 0 7px rgba(0,0,0,.55), 0 0 30px 12px rgba(255,235,59,.95), 0 12px 26px rgba(0,0,0,.5); }
}
/* Campos y combos: fondo amarillo claro, letra negra, aro amarillo que late y se adelanta a los vecinos */
.vfpform .vfpinput:focus, .vfpform select.vfpinput:not(:disabled):focus, .vfpform .vfpinput:not([style*="transparent"]):focus {
  background-color: #fffbcc !important; background-image: none !important; color: #000 !important; -webkit-text-fill-color: #000;
  border-color: #000 !important; outline: 0; z-index: 30; transform: translateY(-2px) scale(1.03);
  animation: focoPulso 1.2s ease-in-out infinite;
}
/* Botones (Confirma, Cancela, barra de navegación, etc.) */
.vfpform .vfpbtn:focus { outline: 0; z-index: 30; animation: focoPulso 1.2s ease-in-out infinite; transform: translateY(-4px) scale(1.06); }
.vfpbtn.vfpbtn-confirma:focus { outline: 0; }
/* Celdas editables de las grillas */
.vfptable td input:focus { background: #fffbcc !important; color: #000 !important; -webkit-text-fill-color: #000; outline: 3px solid #ffeb3b !important; outline-offset: -1px; box-shadow: 0 0 12px 3px rgba(255,235,59,.9); position: relative; z-index: 2; }
.vfptable tbody tr:has(input:focus) td { background-color: #fff3a0 !important; }
/* Casillas y opciones */
.vfpcheck:has(input:focus), .vfpopt label:has(input:focus) { z-index: 30; border-radius: 6px; background-color: rgba(255,235,59,.35) !important; animation: focoPulso 1.2s ease-in-out infinite; }
/* Pestañas y grillas que reciben el foco */
.vfpgrid:focus-within { box-shadow: 0 0 0 3px #ffeb3b, 0 0 20px 6px rgba(255,235,59,.6), inset 0 5px 12px rgba(0,0,0,.35); }
@media (prefers-reduced-motion: reduce) { .vfpform .vfpinput:focus, .vfpform .vfpbtn:focus, .vfpcheck:has(input:focus) { animation: none; box-shadow: 0 0 0 4px #ffeb3b, 0 0 0 7px rgba(0,0,0,.55), 0 0 22px 8px rgba(255,235,59,.85); } }

/* ---------- Listas desplegables: la opción donde estás parado se ve bien marcada ---------- */
select.vfpinput option { padding: 3px 8px; }
/* Opción elegida / donde se mueve con las flechas: rojo LATE SPORT, letra blanca (el gradiente pisa el gris del navegador) */
select.vfpinput option:checked,
select.vfpinput:focus option:checked { background: linear-gradient(90deg, #F2195C, #A8002F) !important; background-color: #E40044 !important; color: #fff !important; -webkit-text-fill-color: #fff; font-weight: 700; }
/* Opción bajo el mouse (listas abiertas tipo ListBox) */
select.vfpinput option:hover:not(:checked):not(:disabled) { background: linear-gradient(90deg, #ffe14d, #ffd000) !important; color: #000 !important; -webkit-text-fill-color: #000; font-weight: 700; }
select.vfpinput option:checked::before { content: "▶ "; }

/* Botones deshabilitados */
.vfpform .vfpbtn:disabled { background-color: #c9c9c9 !important; background-image: none !important; color: #7a7a7a !important; border-color: #9a9a9a !important; box-shadow: inset 0 1px 2px rgba(0,0,0,.15) !important; transform: none !important; cursor: not-allowed; filter: grayscale(1); }
.vfpform .vfpbtn:disabled img { opacity: .4; }
/* Casillas y opciones deshabilitadas */
.vfpcheck:has(input:disabled), .vfpopt label:has(input:disabled) { opacity: .5; filter: grayscale(1); cursor: not-allowed; }
/* Opciones de listas que no se pueden elegir */
select.vfpinput option:disabled { background: #d6d6d6 !important; color: #8a8a8a !important; -webkit-text-fill-color: #8a8a8a; font-style: italic; }

/* ---------- Opciones no habilitadas (ej. Modalidad de Pago: Club / Credimundo / Cta Cte que el cliente no tiene) ----------
   El foco pone -webkit-text-fill-color negro en el select y las opciones lo heredan: acá se pisa explícitamente */
select.vfpinput option:disabled,
.vfpform select.vfpinput:focus option:disabled {
  background: #bdbdbd !important; color: #6e6e6e !important; -webkit-text-fill-color: #6e6e6e !important;
  font-style: italic; font-weight: 400; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.35); cursor: not-allowed;
}
.vfpform select.vfpinput:focus option:not(:disabled):not(:checked) { -webkit-text-fill-color: #000; }

/* ---------- Animaciones ---------- */
/* (se animan las propiedades opacity/translate/scale, que no pisan los transform de hover/foco) */
@keyframes aparecer { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes aparecerIzq { from { opacity: 0; translate: -30px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes formIn { from { opacity: 0; scale: .96; translate: 0 18px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes paginaIn { from { opacity: 0; translate: 22px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes popIn { 0% { opacity: 0; scale: .85; } 70% { opacity: 1; scale: 1.03; } 100% { scale: 1; } }
@keyframes fundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes brilloPasa { from { left: -60%; } to { left: 130%; } }
@keyframes toastIn { from { opacity: 0; translate: 40px 0; } to { opacity: 1; translate: 0 0; } }

.vfptab { transition: transform .2s, box-shadow .2s, background .2s; }
/* Transiciones suaves en campos y combos */
.vfpinput { transition: box-shadow .08s, transform .08s; }
/* Botones: destello de luz que cruza al pasar el mouse */
.vfpbtn { overflow: hidden; }
.vfpbtn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.75), transparent); transform: skewX(-20deg); pointer-events: none; opacity: 0; }
.vfpbtn:hover:not(:disabled)::after { opacity: 1; animation: brilloPasa .6s ease-out; }
.vfpbtn img, .vfpbtn .vico { transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
/* Mensajes, confirmaciones y avisos */
.modal-bg { animation: fundido .12s ease-out; }
.modal { animation: popIn .15s cubic-bezier(.2,.8,.2,1); }
.toast { animation: toastIn .2s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { .vfpform, .vfpform > *, .vfppage, .menubar > .mi, .barra > *, .dd .mi, .modal, .modal-bg, .toast, .autoc, .login-box { animation: none !important; } .vfpbtn::after { display: none; } }

/* ---------- Facturación (VENTAS / VENTAS2 / VENTAS_ESPECIAL): vidrio esmerilado en lugar del rojo ---------- */
.vfpform.esmerilado { border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(ellipse 55% 60% at 12% 8%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(ellipse 50% 55% at 92% 95%, rgba(9,106,181,.28), transparent 60%),
    linear-gradient(150deg, #3a4250 0%, #262c36 45%, #171b22 100%) !important; }
/* Textura de grano fino (esmerilado) */
.vfpform.esmerilado::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* Paneles: vidrio */
.vfpform.esmerilado .vfpshape:not([style*="height: 0"]) {
  background: linear-gradient(160deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 55%, rgba(255,255,255,.03) 100%) !important;
  border-color: rgba(255,255,255,.28) !important;
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.35) !important; }
.vfpform.esmerilado .vfppageframe { background: transparent; }

/* ---------- Franja de marca LATE SPORT sobre cada pantalla ---------- */
.marca-bar { position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 6; display: flex; align-items: center; gap: 16px; padding: 0 18px; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, rgba(58,66,80,.92) 0%, rgba(26,30,38,.94) 100%);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.35); }
.marca-bar.hidden { display: none; }
/* Brillo que recorre la franja */
.marca-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 22%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28) 45%, rgba(255,255,255,.5) 50%, rgba(255,255,255,.28) 55%, transparent);
  transform: skewX(-20deg); animation: mbBrillo 5s ease-in-out infinite; }
@keyframes mbBrillo { 0% { left: -30%; } 45%, 100% { left: 130%; } }
.marca-bar .ls-logo { font-size: 20px; filter: drop-shadow(0 0 8px rgba(228,0,68,.55)); }
.marca-bar .ls-logo .ls-txt b { background: linear-gradient(180deg, #fff 30%, #cfd3da); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mb-sep { width: 1px; align-self: stretch; margin: 10px 0; background: linear-gradient(180deg, transparent, rgba(255,255,255,.4), transparent); }
.mb-tit { flex: 1; min-width: 0; font: 600 15px/1 var(--head); letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-der { display: flex; align-items: center; gap: 12px; }
.mb-emp { font: 700 17px/1 var(--head); letter-spacing: .28em; background: linear-gradient(90deg, #fff 0%, #fff 40%, #ff7aa0 50%, #fff 60%, #fff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: mbTexto 5s linear infinite; text-shadow: 0 0 14px rgba(255,255,255,.25); }
@keyframes mbTexto { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.mb-suc { font: 600 11px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; padding: 5px 9px; border-radius: 6px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.15); border-left: 3px solid var(--accent); }
.work.con-marca > .win { top: 46px; }
/* Fondo de las pantallas abiertas: grafito esmerilado (también en las que no son formularios del original) */
.work.con-marca > .win:has(.vfpform) { background:
  radial-gradient(ellipse 55% 60% at 10% 0%, rgba(255,255,255,.10), transparent 60%),
  radial-gradient(ellipse 50% 55% at 95% 100%, rgba(9,106,181,.22), transparent 60%),
  linear-gradient(150deg, #4a5262 0%, #333a46 45%, #23272f 100%); }
@media (prefers-reduced-motion: reduce) { .marca-bar::after, .mb-emp { animation: none; } }

/* ---------- Menús desplegables esmerilados ---------- */
.dd { background: linear-gradient(170deg, rgba(255,255,255,.82) 0%, rgba(240,242,246,.72) 100%) !important;
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.6) !important; }

/* ---------- Logo LATE SPORT gris brillante sobre el vidrio esmerilado y debajo de textos y campos (late lento) ---------- */
.vfpform.esmerilado { isolation: isolate; }
/* Capas: paneles (0) < logo (1) < textos y campos (2). Los contenedores no forman capa propia para que sus paneles internos queden debajo del logo */
.vfpform.esmerilado .vfpshape { z-index: 0; }
.vfpform.esmerilado :is(.vfppageframe, .vfppages, .vfppage, .vfpcontainer) { z-index: auto; }
.vfpform.esmerilado :not(.vfpshape, .vfppageframe, .vfppages, .vfppage, .vfpcontainer):is(.vfppageframe *, .vfpcontainer *, .vfpform > *) { z-index: 2; }
.vfpform.esmerilado::after { content: ""; position: absolute; inset: 8% 10%; z-index: 1; pointer-events: none;
  background: url(/img/latesport/marca_gris.png) center/contain no-repeat;
  animation: marcaLate 4.2s ease-in-out infinite; will-change: opacity, filter; }
/* Late: se apaga rápido y después va subiendo el brillo hasta un destello fuerte (rojo en el isotipo, blanco en las letras) */
@keyframes marcaLate {
  0%   { opacity: .62; filter: brightness(1.35) drop-shadow(0 0 16px rgba(255,255,255,.75)) drop-shadow(0 0 30px rgba(228,0,68,.75)); transform: scale(1.012); }
  22%  { opacity: .2;  filter: brightness(.85) drop-shadow(0 0 0 rgba(255,255,255,0)) drop-shadow(0 0 0 rgba(228,0,68,0)); transform: scale(1); }
  70%  { opacity: .45; filter: brightness(1.1) drop-shadow(0 0 8px rgba(255,255,255,.4)) drop-shadow(0 0 16px rgba(228,0,68,.4)); transform: scale(1.005); }
  100% { opacity: .62; filter: brightness(1.35) drop-shadow(0 0 16px rgba(255,255,255,.75)) drop-shadow(0 0 30px rgba(228,0,68,.75)); transform: scale(1.012); } }
@media (prefers-reduced-motion: reduce) { .vfpform.esmerilado::after { animation: none; opacity: .4; } }

/* ======================================================================
   TELÉFONO (hasta 820px de ancho): todo el sistema usable con el dedo
   ====================================================================== */
.mham { display: none; }
.dd .mi.open > .dd { display: block; }

/* ---------- Formularios reacomodados en filas (vfp.js -> reflujo) ---------- */
.vfpform.movil { position: relative; width: 100% !important; height: auto !important; min-height: 100%; transform: none !important;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 28px; border-radius: 16px; }
.vfpform.movil .vdeco { display: none !important; }
.vfpform.movil .vm { position: relative !important; left: auto !important; top: auto !important; }
.vfpform.movil .vfila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; width: 100%; }
.vfpform.movil .vpar { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex: 1 1 150px; min-width: 0; }
.vfpform.movil .vpar:not(:has(> .vm:not([style*="display: none"]))) { display: none; }
/* Etiquetas */
.vfpform.movil .vfplabel.vm { width: auto !important; height: auto !important; font-size: 13px !important; line-height: 1.25; white-space: normal !important; text-align: left !important; }
.vfpform.movil .vfplabel.vtit { width: 100% !important; font-size: 19px !important; text-align: center !important; margin: 2px 0 4px; }
/* Campos: altos para el dedo y letra de 16px (el teléfono no hace zoom al escribir) */
.vfpform.movil :is(input, select, textarea).vm { width: auto !important; flex: 1 1 140px; min-width: 0; max-width: 100%; height: 42px !important; font-size: 16px !important; border-radius: 10px !important; padding: 0 10px !important; }
.vfpform.movil .vpar > :is(input, select, textarea).vm { flex: none; width: 100% !important; }
.vfpform.movil select.vm[size] { height: auto !important; min-height: 120px; padding: 6px !important; }
.vfpform.movil textarea.vm { height: 96px !important; padding: 8px 10px !important; width: 100% !important; flex-basis: 100%; }
.vfpform.movil .vfpcheck.vm { width: auto !important; height: auto !important; min-height: 40px; font-size: 15px !important; gap: 10px !important; }
.vfpform.movil .vfpcheck input { width: 22px; height: 22px; }
.vfpform.movil .vfpopt.vm { width: 100% !important; height: auto !important; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 10px; border-radius: 10px; }
.vfpform.movil .vfpopt label { position: static !important; font-size: 15px !important; min-height: 36px; }
.vfpform.movil .vfpopt input { width: 20px; height: 20px; }
/* Botones */
.vfpform.movil .vfpbtn.vm { width: auto !important; height: auto !important; min-width: 48px; min-height: 46px; padding: 6px 12px !important; font-size: 15px !important; flex: 0 1 auto; }
.vfpform.movil .vfila:has(> .vfpbtn) { justify-content: center; }
/* Grillas: ancho completo con desplazamiento lateral */
.vfpform.movil .vfpgrid.vm { width: 100% !important; height: auto !important; max-height: 55vh; overflow: auto; -webkit-overflow-scrolling: touch; flex-basis: 100%; border-radius: 10px; }
.vfpform.movil .vfpgrid tr.vacio { display: none; }
.vfpform.movil .vfptable td, .vfpform.movil .vfptable th { padding: 8px; font-size: 14px; }
/* Pestañas y contenedores */
.vfpform.movil .vfppageframe.vm { width: 100% !important; height: auto !important; flex-basis: 100%; }
.vfpform.movil .vfptabs { display: flex; overflow-x: auto; gap: 4px; position: static; height: auto; padding-bottom: 4px; }
.vfpform.movil .vfptab { flex: none; padding: 9px 14px; font-size: 14px !important; }
.vfpform.movil .vfppages, .vfpform.movil .vfppage { position: relative !important; inset: auto !important; width: 100% !important; height: auto !important; }
.vfpform.movil .vfppage { flex-direction: column; gap: 10px; padding: 10px 4px; }
.vfpform.movil .vfppage:not([style*="display: none"]) { display: flex; }
.vfpform.movil .vfpcontainer.vm { width: 100% !important; height: auto !important; flex-basis: 100%; display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 12px; }
.vfpform.movil .vfpcontainer.vm[style*="display: none"] { display: none; }
.vfpform.movil.esmerilado::after { position: fixed; inset: 30% 6%; }

@media (max-width: 820px) {
  body { font-size: 15px; }
  .desk { height: 100dvh; }

  /* ---------- Menú: botón de 3 rayas y menú vertical desplegable ---------- */
  .menubar { padding: 6px 10px; gap: 8px; flex-wrap: nowrap; }
  .mham { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 42px; padding: 0 11px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; background: linear-gradient(180deg, #3a3535, #1B1717); cursor: pointer; }
  .mham span { display: block; height: 3px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  .menubar.abierto .mham span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menubar.abierto .mham span:nth-child(2) { opacity: 0; }
  .menubar.abierto .mham span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .menubar.bloq .mham { display: none; }
  .menubar > .mi { display: none; }
  .menubar .brand { font-size: 20px; }
  .menubar.abierto { flex-wrap: wrap; max-height: 100dvh; overflow-y: auto; align-content: flex-start; }
  .menubar.abierto > .mi { display: block; order: 2; width: 100%; }
  .menubar > .mi > .ml { padding: 12px 16px; font-size: 16px; transform: none !important; }
  .dd, .dd .dd { position: static; min-width: 0; width: 100%; margin: 6px 0 4px; box-shadow: none !important; animation: none !important; }
  .dd .dd { margin-left: 10px; width: calc(100% - 10px); }
  .dd .ml { padding: 12px 14px; font-size: 15px; white-space: normal; transform: none !important; }
  .dd .mi:hover > .dd { display: none; }
  .dd .mi.open > .dd { display: block; }
  .dd .mi.open > .sub::after { transform: rotate(90deg); }

  /* ---------- Inicio: panel compacto y accesos en grilla ---------- */
  .cuerpo { display: flex; flex-direction: column; overflow-y: auto; }
  .cuerpo .work { order: 0; flex: 0 0 auto; min-height: 340px; overflow: visible; }
  .cuerpo:has(.work.con-marca) .work { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .barra { order: 1; position: static; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; overflow: visible; background: #15181e; }
  .btit { grid-column: 1 / -1; }
  .acc { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 104px; }
  .acc:hover { transform: none; }
  .acc .ico { flex-basis: 40px; width: 40px; height: 40px; }
  .acc .tx small { white-space: normal; }
  .fondo .slide { left: 0 !important; }
  .fondo::after { background: linear-gradient(0deg, var(--accent) 0, var(--accent) 4px, transparent 4px) !important; }
  .fondo::before { display: none; }
  .hud { left: 0 !important; }
  .hud-centro { padding: 18px 16px 16px; width: calc(100% - 24px); max-width: 420px; }
  .hud-iso { width: 96px; height: 96px; }
  .hud-iso img { width: 58px; height: 58px; }
  .hud-marca b { font-size: 40px; }
  .hud-marca i { font-size: 26px; }
  .hud-kick { font-size: 11px; letter-spacing: .35em; margin-bottom: 6px; }
  .hud-reloj { font-size: 40px; }
  .hud-fecha { font-size: 13px; margin-bottom: 10px; }
  .hud-chips span { min-width: 0; flex: 1 1 90px; padding: 6px 10px; }
  .hud-chips b { font-size: 13px; }

  /* ---------- Pantallas abiertas ---------- */
  .marca-bar { height: 44px; padding: 0 10px; gap: 10px; }
  .marca-bar .ls-logo { font-size: 16px; }
  .mb-emp { display: none; }
  .mb-tit { font-size: 13px; }
  .mb-suc { font-size: 10px; padding: 4px 7px; }
  .work.con-marca > .win { top: 44px; }
  .win { padding: 8px 8px 20px; -webkit-overflow-scrolling: touch; }
  .status { gap: 4px 12px; padding: 4px 8px; font-size: 11px; }

  /* ---------- Pantallas propias (fichas, listados, consultas) ---------- */
  .fld { grid-template-columns: 1fr; gap: 3px; }
  .fld > span { text-align: left; }
  .grid-form { grid-template-columns: 1fr; }
  .inp, .fld input, .fld select, .fld textarea { min-height: 42px; font-size: 16px; }
  .btn { min-height: 42px; padding: 8px 14px; font-size: 15px; }
  .toolbar { gap: 6px; }
  .toolbar .btn { min-width: 46px; justify-content: center; }
  .gridwrap { max-height: 60dvh; -webkit-overflow-scrolling: touch; }
  table.grid { font-size: 14px; }
  table.grid td, table.grid th { padding: 8px; }
  .photo { width: 100%; }

  /* ---------- Login, ventanas emergentes y avisos ---------- */
  .login-box input, .login-box select { min-height: 44px; font-size: 16px; }
  .login-box .btn { width: 100%; justify-content: center; min-height: 46px; }
  .modal-bg { padding: 8px; align-items: end; }
  .modal { width: 100% !important; max-width: 100% !important; min-width: 0; max-height: calc(100dvh - 16px); border-radius: 16px; }
  .cuerpo { background: #15181e; }
  .modal footer { flex-wrap: wrap; }
  .modal footer .btn { flex: 1 1 120px; justify-content: center; }
  .toast { left: 12px; right: 12px; bottom: 16px; max-width: none; }
}
.vfpform.movil .vfplabel.vtit { flex: 0 0 100%; }
.vfpform.movil .vgrilla { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 2px 8px; display: flex; flex-direction: column; gap: 6px; border-radius: 10px; background: rgba(0,0,0,.18); }
.vfpform.movil .vfila.vtab { flex-wrap: nowrap; gap: 0; width: max-content; align-items: center; }
.vfpform.movil .vtab > .vm { flex: none !important; width: var(--w) !important; margin-left: var(--ml); }
.vfpform.movil .vtab > :is(input, select).vm { height: 38px !important; font-size: 15px !important; padding: 0 6px !important; }
.vfpform.movil .vtab > .vfplabel.vm { white-space: nowrap !important; font-size: 12px !important; }
