/* ORKO — pantallas de gestión (modo claro). Usa los tokens de orko-tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--fuente-ui); background: var(--fondo); color: var(--texto); line-height: 1.5; }
.g-cabecera { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--esp-2) var(--esp-4); padding: var(--esp-3) var(--esp-5); background: #fff; border-bottom: 1px solid var(--borde); padding-top: max(var(--esp-3), env(safe-area-inset-top)); }
.g-logo img { height: 36px; display: block; }
.g-version { font-family: var(--fuente-ticket); font-size: var(--txt-12); color: var(--texto-suave); }
.g-main { max-width: 1080px; margin: 0 auto; padding: var(--esp-5) var(--esp-5) var(--esp-7); }
.g-main h1 { font-size: var(--txt-28); line-height: 1.2; margin: 0 0 var(--esp-4); }
.g-main h2 { font-size: var(--txt-18); margin: 0 0 var(--esp-2); }

.g-resumen { border-radius: var(--radio-l); padding: var(--esp-4) var(--esp-5); margin-bottom: var(--esp-5); background: #fff; box-shadow: inset 6px 0 0 var(--c, var(--orko-teal-profundo)), 0 0 0 1px var(--borde); }
.g-resumen b { display: block; font-size: var(--txt-22); }
.g-resumen span { color: var(--texto-suave); }
.g-resumen.g-ok { --c: var(--orko-teal-profundo); }
.g-resumen.g-aviso { --c: var(--orko-aviso); }
.g-resumen.g-error { --c: var(--orko-peligro); }

.g-bloque { margin-bottom: var(--esp-5); }
.g-lista { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: var(--radio-l); box-shadow: 0 0 0 1px var(--borde); overflow: hidden; }
.g-lista li { display: grid; grid-template-columns: 96px minmax(160px, 240px) 1fr; gap: var(--esp-3); align-items: baseline; padding: var(--esp-3) var(--esp-4); border-bottom: 1px solid var(--borde); }
.g-lista li:last-child { border-bottom: 0; }
.g-estado { font-size: var(--txt-12); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; justify-self: start; padding: 2px 8px; border-radius: var(--radio-s); }
.g-ok .g-estado { background: var(--orko-menta); color: var(--orko-carbon); }
.g-aviso .g-estado { background: var(--orko-aviso); color: var(--orko-carbon); }
.g-error .g-estado { background: var(--orko-peligro); color: #fff; }
.g-nombre { font-weight: 700; }
.g-detalle { color: var(--texto-suave); font-size: var(--txt-14); overflow-wrap: anywhere; }
.g-nota { font-size: var(--txt-14); color: var(--texto-suave); }

@media (max-width: 640px) {
  .g-main { padding: var(--esp-4) var(--esp-3) var(--esp-6); }
  .g-lista li { grid-template-columns: auto 1fr; }
  .g-detalle { grid-column: 1 / -1; }
}

/* ---------- Menú ---------- */
.g-menu { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.g-menu a { color: var(--texto-suave); text-decoration: none; font-weight: 700; font-size: var(--txt-14); padding: 10px 12px; border-radius: var(--radio-m); min-height: 44px; display: inline-flex; align-items: center; }
.g-menu a:hover { background: var(--superficie-2); color: var(--texto); }
.g-menu a[aria-current="page"] { background: var(--orko-carbon); color: var(--orko-papel); }

/* ---------- Mensajes ---------- */
.g-mensaje { border-radius: var(--radio-m); padding: var(--esp-3) var(--esp-4); margin-bottom: var(--esp-4); font-weight: 700; transition: opacity .4s; }
.g-mensaje-ok { background: var(--orko-menta); color: var(--orko-carbon); }
.g-mensaje-error { background: var(--orko-peligro); color: #fff; }
.g-saliendo { opacity: 0; }
.g-intro { color: var(--texto-suave); max-width: 72ch; margin: 0 0 var(--esp-5); }

/* ---------- Formularios ---------- */
.g-form fieldset { border: 0; margin: 0 0 var(--esp-4); padding: var(--esp-4) var(--esp-5); background: #fff; border-radius: var(--radio-l); box-shadow: 0 0 0 1px var(--borde); }
.g-form legend { font-weight: 800; font-size: var(--txt-18); padding: 0; margin-bottom: var(--esp-3); float: left; width: 100%; }
.g-form legend + * { clear: both; }
.g-fila { display: flex; flex-wrap: wrap; gap: 0 var(--esp-4); }
.g-fila > .g-campo { flex: 1 1 180px; }
.g-fila > .g-ancho { flex: 3 1 280px; }
.g-fila > .g-corto { flex: 0 1 130px; }
.g-medio { max-width: 360px; }
.g-campo { margin-bottom: var(--esp-4); }
.g-campo label, .g-etiqueta { display: block; font-weight: 700; font-size: var(--txt-14); margin-bottom: 6px; }
.g-campo label small { font-weight: 500; color: var(--texto-suave); }
.g-campo input[type="text"], .g-campo input[type="email"], .g-campo input[type="tel"], .g-campo textarea,
.g-zona-nombre input, .g-en-linea input {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--radio-m); border: 2px solid var(--borde);
  background: #fff; color: var(--texto); font: 500 var(--txt-16)/1.3 var(--fuente-ui);
}
.g-campo textarea { resize: vertical; }
.g-campo input:focus, .g-campo textarea:focus, .g-zona-nombre input:focus, .g-en-linea input:focus { outline: none; border-color: var(--orko-teal-profundo); box-shadow: 0 0 0 3px rgba(1,122,106,.2); }
.g-con-error input, .g-con-error textarea { border-color: var(--orko-peligro); }
.g-ayuda { margin: 6px 0 0; font-size: var(--txt-12); color: var(--texto-suave); }
.g-error { margin: 6px 0 0; font-size: var(--txt-14); color: var(--orko-peligro); font-weight: 700; }
.g-opciones { display: flex; flex-wrap: wrap; gap: var(--esp-3); }
.g-opcion { display: flex; gap: 10px; align-items: flex-start; padding: var(--esp-3); border-radius: var(--radio-m); border: 2px solid var(--borde); cursor: pointer; flex: 1 1 240px; font-weight: 500 !important; }
.g-opcion:has(input:checked) { border-color: var(--orko-teal-profundo); background: rgba(162,222,196,.25); }
.g-opcion input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orko-teal-profundo); }
.g-opcion small { display: block; color: var(--texto-suave); font-size: var(--txt-12); }
.g-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600 !important; }
.g-check input { width: 20px; height: 20px; accent-color: var(--orko-peligro); }
.g-logo-actual { display: flex; align-items: center; gap: var(--esp-4); margin-bottom: var(--esp-2); flex-wrap: wrap; }
.g-logo-actual img { max-height: 64px; max-width: 200px; border-radius: 6px; box-shadow: 0 0 0 1px var(--borde); background: #fff; padding: 4px; }
.g-acciones { display: flex; gap: var(--esp-3); justify-content: flex-end; }
.g-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Botones ---------- */
.g-boton { min-height: 48px; padding: 0 var(--esp-4); border-radius: var(--radio-m); border: 0; cursor: pointer; font: 700 var(--txt-16)/1 var(--fuente-ui); white-space: nowrap; }
.g-primario { background: var(--orko-teal-profundo); color: #fff; }
.g-primario:hover { background: #016356; }
.g-secundario { background: transparent; color: var(--texto); box-shadow: inset 0 0 0 2px var(--borde); }
.g-secundario:hover { box-shadow: inset 0 0 0 2px var(--orko-carbon); }
.g-icono { width: 48px; padding: 0; background: var(--superficie-2); color: var(--texto); font-size: var(--txt-18); }
.g-boton:disabled { opacity: .35; cursor: default; }
.g-boton:focus-visible { outline: 3px solid var(--orko-aviso); outline-offset: 2px; }

/* ---------- Tarjetas de inicio ---------- */
.g-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--esp-3); }
.g-tarjeta { display: flex; flex-direction: column; gap: 4px; padding: var(--esp-4); border-radius: var(--radio-l); background: #fff; color: var(--texto); text-decoration: none; box-shadow: inset 6px 0 0 var(--c, var(--borde)), 0 0 0 1px var(--borde); min-height: 120px; }
.g-tarjeta b { font-size: var(--txt-18); }
.g-tarjeta span { color: var(--texto-suave); font-size: var(--txt-14); }
.g-tarjeta em { margin-top: auto; font-style: normal; font-size: var(--txt-12); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.g-tarjeta-ok { --c: var(--orko-teal-profundo); }
.g-tarjeta-ok em { color: var(--orko-teal-profundo); }
.g-tarjeta-pendiente { --c: var(--orko-aviso); }
.g-tarjeta-pendiente em { color: #8A5A00; }
a.g-tarjeta:hover { box-shadow: inset 6px 0 0 var(--c), 0 0 0 2px var(--orko-carbon); }
.g-tarjeta-proxima { background: transparent; box-shadow: inset 0 0 0 2px var(--borde); opacity: .7; }

/* ---------- Local + vista previa del ticket ---------- */
.g-dos-columnas { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--esp-5); align-items: start; }
.g-previa { position: sticky; top: var(--esp-4); }
.g-previa h2 { font-size: var(--txt-16); }
.g-papel { width: 100%; max-width: 360px; background: #fff; padding: var(--esp-4) var(--esp-3) var(--esp-5); font-family: var(--fuente-ticket); font-size: 12px; line-height: 1.35; color: #111; text-align: center; box-shadow: 0 2px 10px rgba(53,72,79,.18); -webkit-mask: radial-gradient(circle 6px at 8px 100%, transparent 5.5px, #000 6px) bottom / 16px 100% repeat-x; mask: radial-gradient(circle 6px at 8px 100%, transparent 5.5px, #000 6px) bottom / 16px 100% repeat-x; overflow-wrap: anywhere; }
.g-papel-logo { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.4); margin: 0 0 2px; }
.g-papel-titulo { font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.g-papel-sep { border-top: 1px dashed #999; margin: 8px 0; }
.g-papel-linea { display: flex; justify-content: space-between; text-align: left; }
.g-papel-total { font-weight: 800; font-size: 14px; }
.g-papel-pie { margin-top: 10px; white-space: pre-line; }

/* ---------- Zonas ---------- */
.g-zonas { list-style: none; margin: 0 0 var(--esp-5); padding: 0; background: #fff; border-radius: var(--radio-l); box-shadow: 0 0 0 1px var(--borde); }
.g-zonas li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--esp-3); padding: var(--esp-3) var(--esp-4); border-bottom: 1px solid var(--borde); }
.g-zonas li:last-child { border-bottom: 0; }
.g-zona-nombre { display: flex; gap: var(--esp-2); flex: 1 1 320px; }
.g-zona-acciones { display: flex; gap: var(--esp-2); }
.g-inactiva .g-zona-nombre input { color: var(--texto-suave); text-decoration: line-through; }
.g-etiqueta-inactiva { font-size: var(--txt-12); font-weight: 800; text-transform: uppercase; color: #8A5A00; }
.g-nueva-zona { background: #fff; border-radius: var(--radio-l); padding: var(--esp-4) var(--esp-5); box-shadow: 0 0 0 1px var(--borde); }
.g-nueva-zona label { display: block; font-weight: 800; margin-bottom: 6px; }
.g-en-linea { display: flex; gap: var(--esp-2); flex-wrap: wrap; }
.g-en-linea input { flex: 1 1 240px; }

@media (max-width: 900px) {
  .g-dos-columnas { grid-template-columns: 1fr; }
  .g-previa { position: static; }
}
@media (max-width: 640px) {
  .g-form fieldset { padding: var(--esp-3); }
  .g-acciones .g-boton { width: 100%; }
  .g-menu { order: 3; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; }
  .g-cabecera { padding-left: var(--esp-3); padding-right: var(--esp-3); }
}

/* ---------- Paso 2.3: sesión, usuarios ---------- */
.g-quien { display: flex; align-items: center; gap: var(--esp-3); }
.g-quien span { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.g-quien small { color: var(--texto-suave); font-size: var(--txt-12); }
.g-pie { text-align: center; font-size: var(--txt-12); color: var(--texto-suave); padding: 0 var(--esp-4) var(--esp-5); }
.g-mensaje-aviso { background: var(--orko-aviso); color: var(--orko-carbon); }
.g-campo input[type="password"] { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--radio-m); border: 2px solid var(--borde); background: #fff; color: var(--texto); font: 600 var(--txt-18)/1.3 var(--fuente-ui); letter-spacing: .2em; }
.g-campo input[type="password"]:focus { outline: none; border-color: var(--orko-teal-profundo); box-shadow: 0 0 0 3px rgba(1,122,106,.2); }
.g-con-error input[type="password"] { border-color: var(--orko-peligro); }
.g-entrar { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--esp-4); align-items: start; }
.g-codigo { font-family: var(--fuente-ticket); background: var(--orko-noche); color: var(--orko-papel); padding: var(--esp-3) var(--esp-4); border-radius: var(--radio-m); overflow-x: auto; }
.g-elegir-usuario { display: flex; flex-wrap: wrap; gap: var(--esp-2); margin-bottom: var(--esp-4); }
.g-usuario-opcion { position: relative; cursor: pointer; }
.g-usuario-opcion input { position: absolute; opacity: 0; }
.g-usuario-opcion span { display: flex; align-items: center; min-height: 56px; padding: 0 var(--esp-4); border-radius: var(--radio-m); background: #fff; box-shadow: inset 0 5px 0 var(--c), 0 0 0 2px var(--borde); font-weight: 800; }
.g-usuario-opcion input:checked + span { box-shadow: inset 0 5px 0 var(--c), 0 0 0 3px var(--orko-teal-profundo); }
.g-usuario-opcion input:focus-visible + span { outline: 3px solid var(--orko-aviso); outline-offset: 2px; }
.g-barra-lista { display: flex; gap: var(--esp-3); flex-wrap: wrap; margin-bottom: var(--esp-4); }
a.g-boton { display: inline-flex; align-items: center; text-decoration: none; }
.g-peligro-texto { background: transparent; color: var(--orko-peligro); box-shadow: inset 0 0 0 2px var(--borde); }
.g-usuarios { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: var(--radio-l); box-shadow: 0 0 0 1px var(--borde); }
.g-usuarios li { display: flex; align-items: center; gap: var(--esp-3); padding: var(--esp-3) var(--esp-4); border-bottom: 1px solid var(--borde); box-shadow: inset 5px 0 0 var(--c); flex-wrap: wrap; }
.g-usuarios li:last-child { border-bottom: 0; }
.g-usuarios li.g-baja { opacity: .55; }
.g-num { font-family: var(--fuente-ticket); color: var(--texto-suave); min-width: 36px; }
.g-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--c); overflow: hidden; flex: 0 0 auto; }
.g-avatar img { width: 100%; height: 100%; object-fit: cover; }
.g-usuario-datos { flex: 1 1 200px; display: flex; flex-direction: column; }
.g-usuario-datos small { color: var(--texto-suave); }
.g-en-turno { color: var(--orko-teal-profundo); font-weight: 700; }
.g-usuario-acciones { display: flex; gap: var(--esp-2); }
.g-colores { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--esp-2); }
.g-color { position: relative; cursor: pointer; }
.g-color input { position: absolute; opacity: 0; }
.g-color span { display: flex; align-items: flex-end; min-height: 56px; padding: 6px 10px; border-radius: var(--radio-m); background: var(--c); color: #fff; font-weight: 700; font-size: var(--txt-14); }
.g-color input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--orko-carbon); }
.g-color input:focus-visible + span { outline: 3px solid var(--orko-aviso); outline-offset: 4px; }
.g-bloque-check { margin-bottom: var(--esp-3); }
@media (max-width: 640px) {
  .g-quien small { display: none; }
}
.g-nota a, .g-intro a { color: var(--orko-teal-profundo); font-weight: 700; }

/* ---------- Paso 2.4: terminales y licencia ---------- */
.g-campo select, .g-campo input[type="time"] { width: 100%; min-height: 48px; padding: 8px 10px; border-radius: var(--radio-m); border: 2px solid var(--borde); background: #fff; color: var(--texto); font: 600 var(--txt-16)/1.2 var(--fuente-ui); }
.g-campo input:not([type]) { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--radio-m); border: 2px solid var(--borde); background: #fff; color: var(--texto); font: 500 var(--txt-16)/1.3 var(--fuente-ui); }
.g-terminal { background: #fff; border-radius: var(--radio-l); padding: var(--esp-4) var(--esp-5); box-shadow: inset 6px 0 0 var(--orko-teal-profundo), 0 0 0 1px var(--borde); margin-bottom: var(--esp-3); }
.g-terminal.g-pendiente { box-shadow: inset 6px 0 0 var(--orko-aviso), 0 0 0 1px var(--borde); }
.g-terminal-cab { display: flex; align-items: center; gap: var(--esp-4); flex-wrap: wrap; margin-bottom: var(--esp-3); }
.g-terminal-cab b { font-size: var(--txt-18); }
.g-terminal-info { color: var(--texto-suave); font-size: var(--txt-14); }
.g-codigo-grande { font-family: var(--fuente-ticket); font-size: 30px; font-weight: 800; letter-spacing: .06em; padding: 4px 14px; border-radius: var(--radio-m); background: var(--orko-noche); color: var(--orko-papel); }
.g-main h2 { margin-top: var(--esp-5); }
.g-licencia { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: var(--esp-4); }
.g-form textarea { width: 100%; font-family: var(--fuente-ticket); font-size: 12px; padding: 10px; border-radius: var(--radio-m); border: 2px solid var(--borde); }
.g-lista { margin-bottom: var(--esp-4); }

/* ---------- PIN del camarero: con / sin ---------- */
.g-pin[data-rol="encargado"] .g-solo-camarero,
.g-pin[data-rol="camarero"] .g-solo-encargado,
.g-pin[data-rol="camarero"][data-pin="0"] .g-campos-pin { display: none; }
.g-interruptor { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--texto-suave); box-shadow: inset 0 0 0 2px var(--borde); }
.g-interruptor-pista { position: relative; width: 36px; height: 20px; border-radius: 10px; background: #C9CCC2; transition: background .15s; }
.g-interruptor-pista::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.g-interruptor.g-encendido { color: var(--texto); }
.g-interruptor.g-encendido .g-interruptor-pista { background: var(--orko-teal-profundo); }
.g-interruptor.g-encendido .g-interruptor-pista::after { left: 18px; }
.g-recomendado { color: #8A5A00 !important; font-weight: 700 !important; }
.g-nombre-completo { font-weight: 500; color: var(--texto-suave); font-size: var(--txt-14); }
.g-faltan { color: #8A5A00; font-weight: 600; }
/* Ordenar usuarios arrastrando */
.g-asa { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: var(--radio-m); background: transparent; color: var(--texto-suave); font-size: 22px; cursor: grab; touch-action: none; }
.g-asa:hover { background: var(--superficie-2); color: var(--texto); }
.g-asa:active { cursor: grabbing; }
.g-usuarios li.g-arrastrando { opacity: .25; }
.g-fantasma { position: fixed; z-index: 50; list-style: none; display: flex; align-items: center; gap: var(--esp-3); padding: var(--esp-3) var(--esp-4); background: #fff; border-radius: var(--radio-m); box-shadow: inset 5px 0 0 var(--c), 0 12px 30px rgba(53,72,79,.3); pointer-events: none; }

/* ---------- Paso 2.5: impresoras ---------- */
.g-check-ok input { accent-color: var(--orko-teal-profundo); }
.g-casillas { margin-bottom: var(--esp-3); gap: var(--esp-4); }
.g-inactiva-bloque { opacity: .6; }
.g-windows .g-detalle { display: flex; flex-direction: column; gap: var(--esp-2); }
.g-anadir-windows input { flex: 1 1 200px; min-height: 44px; padding: 8px 10px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 500 var(--txt-14)/1.2 var(--fuente-ui); }
.g-terminal-info a { color: var(--orko-teal-profundo); font-weight: 700; }
.g-casillas input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; min-height: 0; padding: 0; }

/* ---------- Paso 2.6: auditoría y copias ---------- */
.g-campo input[type="date"] { width: 100%; min-height: 48px; padding: 8px 10px; border-radius: var(--radio-m); border: 2px solid var(--borde); background: #fff; color: var(--texto); font: 600 var(--txt-16)/1.2 var(--fuente-ui); }
.g-filtros fieldset { padding-bottom: var(--esp-4); }
.g-tabla-scroll { overflow-x: auto; background: #fff; border-radius: var(--radio-l); box-shadow: 0 0 0 1px var(--borde); }
.g-tabla { width: 100%; border-collapse: collapse; font-size: var(--txt-14); }
.g-tabla th, .g-tabla td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--borde); }
.g-tabla th { background: #F3F3EC; font-weight: 800; position: sticky; top: 0; }
.g-tabla small { color: var(--texto-suave); overflow-wrap: anywhere; }
.g-tabla code { font-family: var(--fuente-ticket); font-size: 12px; }
.g-nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-paginas { display: flex; gap: var(--esp-3); justify-content: center; margin-top: var(--esp-4); }

/* ---------- Fase 3: IVA y familias ---------- */
.g-iva-grande { font-size: var(--txt-22); font-weight: 800; color: var(--orko-teal-profundo); }
.g-iva-cambio label, .g-tamano label, .g-franja label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--txt-14); }
.g-iva-cambio input, .g-tamano input, .g-franja input[type="time"] { min-height: 44px; padding: 6px 8px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-16)/1.2 var(--fuente-ui); width: auto; flex: 0 0 auto; }
.g-iva-cambio input[name="porcentaje"] { width: 80px; }
.g-tamano input { width: 70px; }
.g-muestra-familia { flex: 0 0 auto; min-width: 120px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: var(--radio-m); background: var(--c); color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: var(--txt-14); }
.g-tamanos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--esp-4); }
.g-tamano { display: flex; flex-direction: column; gap: var(--esp-2); }
.g-rejilla-muestra { display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--filas), 1fr); gap: 3px; height: 150px; padding: 6px; border-radius: var(--radio-m); background: var(--orko-noche); }
.g-rejilla-muestra i { border-radius: 3px; background: #3A4A50; box-shadow: inset 0 3px 0 var(--c); }
.g-horario[data-horario="siempre"] ~ .g-franjas { display: none; }
.g-franjas { margin-top: var(--esp-3); display: flex; flex-direction: column; gap: var(--esp-2); }
.g-franja { display: flex; flex-wrap: wrap; align-items: center; gap: var(--esp-3); padding: var(--esp-2) var(--esp-3); border-radius: var(--radio-m); background: var(--superficie-2); }
.g-dias { display: inline-flex; gap: 4px; }
.g-dias label { position: relative; cursor: pointer; }
.g-dias input { position: absolute; opacity: 0; }
.g-dias span { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--borde); font-weight: 800; }
.g-dias input:checked + span { background: var(--orko-teal-profundo); color: #fff; box-shadow: none; }
.g-dias input:focus-visible + span { outline: 3px solid var(--orko-aviso); outline-offset: 2px; }

/* Ticket de muestra: desglose de IVA */
.g-papel-iva { margin-top: 8px; }
.g-papel-iva .g-papel-linea span { flex: 1; text-align: right; }
.g-papel-iva .g-papel-linea span:first-child { text-align: left; flex: .7; }
.g-papel-cab { border-bottom: 1px dashed #999; margin-bottom: 2px; font-weight: 800; }

/* ---------- Fase 4: existencias ---------- */
.g-buscador { display: flex; align-items: center; gap: var(--esp-3); margin-bottom: var(--esp-3); }
.g-buscador input { flex: 1 1 auto; max-width: 520px; min-height: 52px; padding: 10px 14px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-18)/1.2 var(--fuente-ui); background: #fff; }
.g-buscador input:focus { outline: none; border-color: var(--orko-teal-profundo); }
.g-tabla tr.g-baja { opacity: .55; }
.g-tabla .g-boton { min-height: 40px; font-size: var(--txt-14); padding: 0 12px; }
.g-coste-previo { margin: 0; font-weight: 800; color: var(--orko-teal-profundo); min-height: 1.4em; }
.g-campo select { width: 100%; }
.g-tabla-alta { max-height: 460px; overflow-y: auto; }
.g-fila-error td { background: #FBE9E7; }
.g-fila-ok td:last-child { color: var(--orko-teal-profundo); font-weight: 700; }
.g-fila-aviso td:last-child { color: #8A5A00; font-weight: 700; }
.g-texto-error { color: var(--orko-peligro); }

/* ---------- Menú agrupado ---------- */
.g-menu { align-items: center; }
.g-grupo { position: relative; }
.g-grupo summary { list-style: none; cursor: pointer; color: var(--texto-suave); font-weight: 700; font-size: var(--txt-14); padding: 10px 12px; border-radius: var(--radio-m); min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.g-grupo summary::-webkit-details-marker { display: none; }
.g-grupo summary::after { content: "▾"; font-size: 11px; }
.g-grupo summary:hover { background: var(--superficie-2); color: var(--texto); }
.g-grupo[data-activo] > summary { background: var(--orko-carbon); color: var(--orko-papel); }
.g-submenu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; min-width: 200px; background: #fff; border-radius: var(--radio-m); box-shadow: 0 12px 30px rgba(53,72,79,.2), 0 0 0 1px var(--borde); padding: 6px; display: flex; flex-direction: column; }
.g-submenu a { color: var(--texto); text-decoration: none; font-weight: 700; font-size: var(--txt-14); padding: 10px 12px; border-radius: var(--radio-s); min-height: 44px; display: flex; align-items: center; }
.g-submenu a:hover { background: var(--superficie-2); }
.g-submenu a[aria-current="page"] { background: rgba(162,222,196,.4); }

/* ---------- Fase 5: artículos ---------- */
.g-pestanas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--esp-4); }
.g-pestanas a { text-decoration: none; color: var(--texto); font-weight: 700; font-size: var(--txt-14); padding: 10px 14px; border-radius: var(--radio-m); background: #fff; box-shadow: inset 0 4px 0 var(--c, var(--borde)), 0 0 0 1px var(--borde); min-height: 44px; display: inline-flex; align-items: center; }
.g-pestanas a[aria-current="page"] { background: var(--orko-carbon); color: var(--orko-papel); }
.g-barra-lista .g-buscador { margin: 0; flex: 1 1 280px; }
.g-miniatura { width: 56px; height: 56px; flex: 0 0 auto; border-radius: var(--radio-s); background: var(--c); overflow: hidden; }
.g-miniatura img { width: 100%; height: 100%; object-fit: cover; }
.g-formatos td { vertical-align: middle; }
.g-formatos input:not([type="radio"]), .g-formatos select { min-height: 44px; padding: 6px 8px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-14)/1.2 var(--fuente-ui); background: #fff; }
.g-formatos input[type="radio"] { width: 22px; height: 22px; accent-color: var(--orko-teal-profundo); }
.g-num { width: 84px; text-align: right; }
.g-unidad, .g-unidad-ex { margin-left: 4px; color: var(--texto-suave); font-size: var(--txt-12); }
.g-coste-fila { font-weight: 700; color: var(--orko-teal-profundo); }
.g-formato-comun { display: flex; flex-wrap: wrap; gap: var(--esp-2); align-items: center; background: #fff; padding: var(--esp-2) var(--esp-3); border-radius: var(--radio-m); box-shadow: 0 0 0 1px var(--borde); margin-bottom: var(--esp-2); }
.g-formato-comun input, .g-formato-comun select { min-height: 44px; padding: 6px 8px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-14)/1.2 var(--fuente-ui); }
.g-formato-comun small { color: var(--texto-suave); }

/* ---------- Menú en el móvil: botón de tres líneas ---------- */
.g-hamburguesa { display: none; width: 48px; height: 48px; border: 0; border-radius: var(--radio-m); background: var(--superficie-2); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; order: 2; }
.g-hamburguesa span { display: block; width: 24px; height: 3px; border-radius: 2px; background: var(--orko-carbon); transition: transform .2s, opacity .2s; }
.g-hamburguesa[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.g-hamburguesa[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.g-hamburguesa[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 900px) {
  .g-hamburguesa { display: inline-flex; margin-left: auto; }
  .g-cabecera .g-quien { order: 1; margin-left: auto; }
  .g-cabecera .g-menu { display: none; order: 3; flex: 1 1 100%; flex-direction: column; align-items: stretch; overflow: visible; padding: var(--esp-2) 0; }
  .g-cabecera.g-menu-abierto .g-menu { display: flex; }
  .g-menu > a, .g-grupo summary { font-size: var(--txt-18); min-height: 52px; width: 100%; }
  .g-grupo[open] > summary { background: var(--superficie-2); }
  .g-submenu { position: static; box-shadow: none; padding: 0 0 var(--esp-2) var(--esp-4); min-width: 0; }
  .g-submenu a { font-size: var(--txt-18); min-height: 52px; }
}

/* ---------- Ticket de muestra: letra legible ---------- */
.g-dos-columnas { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); }
.g-papel { max-width: 440px; font-size: 13.5px; line-height: 1.4; padding: var(--esp-4) var(--esp-4) var(--esp-5); }
.g-papel-titulo { font-size: 17px; }
.g-papel-total { font-size: 16px; }
@media (max-width: 900px) { .g-papel { font-size: 13px; } }

/* ---------- Importación de TecnoSnack ---------- */
.g-ts-formatos { display: flex; flex-wrap: wrap; gap: var(--esp-2) var(--esp-3); }
.g-ts-formatos label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: var(--txt-12); }
.g-ts-formatos select, .g-ts td > select { min-height: 44px; padding: 6px 8px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-14)/1.2 var(--fuente-ui); }
.g-ts-formatos small { font-weight: 500; color: var(--texto-suave); max-width: 200px; }
.g-fila-aviso td { background: #FFF6E0; }
.g-revisar { background: #FFF6E0; border-radius: var(--radio-m); padding: var(--esp-3) var(--esp-4); margin-bottom: var(--esp-4); box-shadow: inset 6px 0 0 var(--orko-aviso); }
.g-revisar ul { margin: var(--esp-2) 0 0; padding-left: 1.2em; max-height: 300px; overflow-y: auto; font-size: var(--txt-14); }

/* ---------- Fase 6: tarifas ---------- */
.g-activa-ahora { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: var(--radio-s); background: var(--orko-aviso); color: var(--orko-carbon); font-size: var(--txt-12); letter-spacing: .04em; vertical-align: middle; }
.g-probar { margin-bottom: var(--esp-4); }
.g-probar label, .g-manual label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--txt-14); }
.g-probar input, .g-manual select, .g-suplemento select, .g-suplemento input, .g-relleno select, .g-relleno input, .g-precios-tarifa input { min-height: 44px; padding: 6px 8px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-14)/1.2 var(--fuente-ui); background: #fff; }
.g-campo input[type="datetime-local"], .g-campo input[type="number"] { width: 100%; min-height: 48px; padding: 8px 10px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-16)/1.2 var(--fuente-ui); }
.g-suplemento { flex: 1 1 100%; gap: var(--esp-2); }
.g-suplemento label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--txt-14); }
.g-suplemento input.g-num, .g-relleno input.g-num { flex: 0 0 90px; width: 90px; }
.g-precios-tarifa input::placeholder { color: #B5B9AF; }

/* ---------- Fase 7: combinados y modificadores ---------- */
.g-modificador[data-tipo="observacion"] .g-solo-extra { display: none; }
.g-solo-extra { flex: 1 1 auto; }
.g-detalles { margin-top: var(--esp-4); background: #fff; border-radius: var(--radio-m); padding: var(--esp-3) var(--esp-4); box-shadow: 0 0 0 1px var(--borde); }
.g-detalles summary { cursor: pointer; font-weight: 700; }
.g-progreso-barra { height: 12px; border-radius: 6px; background: var(--superficie-2); overflow: hidden; margin: var(--esp-3) 0 var(--esp-2); }
.g-progreso-barra i { display: block; height: 100%; width: 0; background: var(--orko-teal-profundo); transition: width .2s; }
.g-progreso-texto { font-weight: 700; margin: 0; }
/* El seleccionado del submenú se lee bien (texto oscuro sobre menta) */
.g-menu .g-submenu a[aria-current="page"] { background: var(--orko-menta); color: var(--orko-carbon); box-shadow: inset 4px 0 0 var(--orko-teal-profundo); }
/* ---------- Fase 8: escandallos ---------- */
.g-ingrediente { min-width: 280px; }
.g-objetivo label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--txt-14); }
.g-objetivo input { min-height: 44px; padding: 6px 8px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 600 var(--txt-14)/1.2 var(--fuente-ui); width: 70px; }
.g-venta-receta { font-size: var(--txt-14); }
.g-texto-ok { color: var(--orko-teal-profundo); }
.g-tabla tfoot th { border-top: 2px solid var(--borde); }
.g-formato-barra { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.g-formato-barra .g-boton { min-height: 40px; padding: 0 12px; }
.g-pie-grande { font-size: 1.6em; font-weight: 800; line-height: 1.2; }
.g-pie-linea { min-height: 1em; }
/* VeriFactu: contadores */
.g-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--esp-3); margin: var(--esp-4) 0; }
.g-tarjeta { background: #fff; border-radius: var(--radio-m); padding: var(--esp-3) var(--esp-4); box-shadow: 0 0 0 1px var(--borde); display: flex; flex-direction: column; gap: 4px; }
.g-tarjeta b { font-size: 28px; }
.g-tarjeta span { font-size: var(--txt-14); color: var(--texto-suave); font-weight: 700; }

/* ---------- Editor del plano (Fase 12.1) ---------- */
.g-main:has(#plano-editor) { max-width: none; }
.g-plano-barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.g-plano-barra label { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: var(--txt-14); }
.g-plano-barra input { min-height: 40px; border-radius: var(--radio-m); border: 2px solid var(--borde); padding: 0 8px; font: 600 var(--txt-14)/1 var(--fuente-ui); width: 90px; }
.g-plano-barra #pl-nombre { width: 180px; }
.g-plano-espacio { flex: 1; }
.g-plano-trabajo { display: grid; grid-template-columns: 170px minmax(0, 1fr) 240px; gap: 12px; align-items: start; }
.g-plano-herramientas, .g-plano-props { background: #fff; border-radius: var(--radio-m); padding: 10px; box-shadow: 0 0 0 1px var(--borde); display: flex; flex-direction: column; gap: 6px; }
.g-plano-herramientas b, .g-plano-props b { font-size: var(--txt-14); margin-top: 4px; }
.g-plano-herramientas button { min-height: 40px; border: 0; border-radius: var(--radio-s); background: var(--superficie-2); font: 700 var(--txt-14)/1 var(--fuente-ui); cursor: pointer; text-align: left; padding: 0 10px; }
.g-plano-props label { display: flex; flex-direction: column; gap: 3px; font-weight: 700; font-size: var(--txt-12); }
.g-plano-props input, .g-plano-props select { min-height: 40px; border-radius: var(--radio-s); border: 2px solid var(--borde); padding: 0 8px; font: 600 var(--txt-14)/1 var(--fuente-ui); }
.g-plano-marco { overflow: hidden; background: #fff; border-radius: var(--radio-m); box-shadow: 0 0 0 1px var(--borde); padding: 4px; }
.g-plano { position: relative; transform-origin: 0 0; background-color: #FAFAF6; background-image: linear-gradient(#ECEDE6 1px, transparent 1px), linear-gradient(90deg, #ECEDE6 1px, transparent 1px); background-size: 50px 50px; touch-action: none; user-select: none; }
.g-pl-el { position: absolute; cursor: grab; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-pl-el:active { cursor: grabbing; }
.g-pl-mesa { background: #fff; border: 3px solid var(--orko-carbon); border-radius: 10px; color: var(--orko-carbon); }
.g-pl-mesa b { font-size: 22px; }
.g-pl-mesa small { font-size: 12px; color: var(--texto-suave); }
.g-mesa-redonda { border-radius: 50%; }
.g-mesa-barra { border-style: dashed; background: #F3EFE6; }
.g-pl-deco { background: #9AA5A0; color: #fff; font-weight: 700; font-size: 14px; }
.g-deco-columna { border-radius: 4px; background: #6E7A75; }
.g-deco-barra { background: #8B6A45; border-radius: 6px; }
.g-deco-zona { background: rgba(162,222,196,.25); border: 2px dashed var(--orko-teal); color: var(--orko-teal-profundo); align-items: flex-start; justify-content: flex-start; padding: 6px; }
.g-deco-texto { background: transparent; color: var(--orko-carbon); font-size: 18px; }
.g-pl-sel { outline: 3px solid var(--orko-aviso); outline-offset: 2px; z-index: 2; }
.g-pl-tam { position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px; border-radius: 4px; background: var(--orko-aviso); cursor: nwse-resize; display: none; }
.g-pl-sel .g-pl-tam { display: block; }
@media (max-width: 1000px) { .g-plano-trabajo { grid-template-columns: 1fr; } .g-plano-herramientas { flex-direction: row; flex-wrap: wrap; } }
/* Contactos y compras */
.g-repetible { gap: 6px; align-items: center; margin-bottom: 6px; }
.g-repetible input, .g-repetible select { min-height: 44px; border-radius: var(--radio-s); border: 2px solid var(--borde); padding: 0 8px; font: 600 var(--txt-14)/1 var(--fuente-ui); flex: 1; min-width: 120px; }
.g-repetible .g-corto { flex: 0 0 90px; min-width: 90px; }
.g-compra-lineas input, .g-compra-lineas select { min-height: 40px; border-radius: var(--radio-s); border: 2px solid var(--borde); padding: 0 6px; font: 600 var(--txt-14)/1 var(--fuente-ui); width: 100%; }
.g-compra-lineas .cl-cant, .g-compra-lineas .cl-precio, .g-compra-lineas .cl-dto { width: 90px; text-align: right; }
.g-compra-lineas td:first-child { min-width: 260px; }
.g-compra-lineas small { display: block; color: var(--texto-suave); font-size: 12px; margin-top: 2px; }
.g-compra-totales { margin-top: 10px; text-align: right; line-height: 1.6; }
/* Stock */
.g-stock-num { width: 90px; min-height: 40px; border-radius: var(--radio-s); border: 2px solid var(--borde); padding: 0 6px; text-align: right; font: 700 var(--txt-14)/1 var(--fuente-ui); }
.g-tabla select, .g-tabla input:not([type=checkbox]) { min-height: 40px; }
.g-merma { display: inline-block; }
.g-merma[open] form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.g-merma summary { list-style: none; display: inline-flex; }
.g-texto-aviso { color: #B7791F; font-weight: 700; }
.g-tabla td small { display: block; color: var(--texto-suave); }
/* Menús */
.g-menu-ficha { background: #fff; border-radius: var(--radio-m); box-shadow: 0 0 0 1px var(--borde); padding: 10px 14px; margin-bottom: 8px; }
.g-menu-ficha summary { cursor: pointer; font-size: var(--txt-16); }
.g-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 10px; }
.g-multi { width: 100%; max-width: 560px; border-radius: var(--radio-s); border: 2px solid var(--borde); padding: 4px; font: 600 var(--txt-14)/1.4 var(--fuente-ui); }
.g-menu-form:has(input[value=cerrado]:checked) .g-menu-dia, .g-menu-form:has(input[value=no]:checked) .g-menu-dia { display: none; }
/* Consumos en bloque */
.g-tarjeta-enlace { text-decoration: none; color: inherit; box-shadow: inset 4px 0 0 var(--c), 0 0 0 1px var(--borde); }
.g-tarjeta-enlace.g-activa { box-shadow: inset 4px 0 0 var(--c), 0 0 0 3px var(--orko-teal); }
.g-consumo-receta { display: none; margin-top: 4px; }
tr:has(.g-consumo-modo option[value=receta]:checked) .g-consumo-receta { display: block; }
/* Informes */
.g-kpis .g-tarjeta b { font-size: 24px; }
.g-sube { color: #1E7A4C; font-weight: 800; }
.g-baja-v { color: #B03A2E; font-weight: 800; }
.g-grafica { width: 100%; height: 220px; background: #fff; border-radius: var(--radio-m); box-shadow: 0 0 0 1px var(--borde); padding: 6px; }
.g-grafica rect { fill: var(--orko-teal); }
.g-grafica g:hover rect { fill: var(--orko-teal-profundo); }
.g-grafica text { font: 600 11px var(--fuente-ui); fill: var(--texto-suave); }
.g-csv { min-height: 34px; padding: 0 10px; font-size: var(--txt-12); margin-left: 8px; vertical-align: middle; }
.g-informe td small { display: inline; }
/* ORKO Central: panel de locales (pensado para el móvil) */
.c-locales { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.c-local { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: var(--radio-m); padding: 14px 16px; box-shadow: inset 5px 0 0 var(--orko-teal), 0 0 0 1px var(--borde); text-decoration: none; color: inherit; }
.c-local header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.c-local header b { font-size: 18px; }
.c-local strong { font-size: 32px; }
.c-local ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--txt-14); }
.c-vivo { color: #1E7A4C; font-weight: 800; }
.c-parado { color: #B7791F; font-weight: 800; }
/* Registro de jornada */
.g-fichaje { padding: 2px 0; }
.g-corregir { display: inline-block; margin-left: 6px; }
.g-corregir summary { cursor: pointer; color: var(--orko-teal-profundo); font-size: var(--txt-12); font-weight: 700; }
.g-corregir form { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.g-firmas { display: flex; justify-content: space-around; margin-top: 60px; }
.g-firmas div { border-top: 1px solid #000; padding-top: 6px; min-width: 220px; text-align: center; }
@media print { .g-menu, .g-cabecera, .g-pie, nav, header { display: none !important; } .g-registro { font-size: 12px; } }
/* Cuadrante */
.g-cuadrante td, .g-cuadrante th { text-align: center; vertical-align: top; min-width: 110px; }
.g-cq-persona { text-align: left !important; box-shadow: inset 4px 0 0 var(--c); }
.g-cq-turno { background: #EAF6F1; font-weight: 700; }
.g-cq-libre { color: var(--texto-suave); }
.g-cq-ausencia { background: #FDF0DC; color: #8A5A0E; font-weight: 700; }
.g-cq-cambio { box-shadow: inset 0 0 0 2px var(--orko-aviso); }
.g-cuadrante .g-corregir form { flex-direction: column; align-items: stretch; text-align: left; min-width: 180px; }
.g-fijo input[type=time] { min-height: 40px; }
@media print { .g-corregir { display: none !important; } .g-cuadrante { font-size: 11px; } }
/* Roles y permisos */
.g-permisos td:first-child { min-width: 260px; }
.g-permisos-grupo td { background: var(--superficie-2, #EEF2F0); font-weight: 800; }
.g-perm { min-height: 36px; border-radius: 6px; border: 2px solid var(--borde); font: 700 13px/1 var(--fuente-ui); padding: 0 4px; }
.g-perm-si { background: #E3F4EC; } .g-perm-encargado { background: #FFF4D6; } .g-perm-no { background: #FBE3E0; }
/* Cabecera: el menú en una sola línea; lo que no cabe, en «Más» (decisión 457) */
@media (min-width: 761px) {
  .g-cabecera { flex-wrap: nowrap; }
  .g-menu { flex-wrap: nowrap; min-width: 0; flex: 1 1 auto; }
  .g-menu > a, .g-menu > .g-grupo { flex: 0 0 auto; }
  .g-quien { flex: 0 0 auto; }
}
.g-grupo-mas .g-submenu { right: 0; left: auto; min-width: 240px; max-height: 70vh; overflow-y: auto; }
.g-mas-grupo { display: flex; flex-direction: column; padding: 4px 0 8px; border-bottom: 1px solid var(--borde); }
.g-mas-grupo:last-child { border-bottom: 0; }
.g-mas-grupo > b { font-size: var(--txt-12); text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); padding: 6px 12px 2px; }
/* Inicio: los 16 accesos más usados, en 4 × 4 (decisión 459) */
.g-accesos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.g-acceso { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 92px; padding: 14px 16px 14px 20px; border-radius: var(--radio-m); background: #fff; color: var(--texto); text-decoration: none; box-shadow: inset 5px 0 0 var(--c, var(--orko-teal)), 0 0 0 1px var(--borde); overflow-wrap: anywhere; transition: transform .08s ease, box-shadow .08s ease; }
.g-acceso b { font-size: 18px; line-height: 1.2; }
.g-acceso small { color: var(--texto-suave); font-weight: 700; font-size: var(--txt-12); text-transform: uppercase; letter-spacing: .05em; }
.g-acceso:hover { transform: translateY(-1px); box-shadow: inset 5px 0 0 var(--c, var(--orko-teal)), 0 4px 12px rgba(0,0,0,.08), 0 0 0 1px var(--borde); }
.g-acceso:focus-visible { outline: 3px solid var(--orko-teal); outline-offset: 2px; }
@media (max-width: 900px) { .g-accesos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g-accesos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-acceso { min-height: 78px; } .g-acceso b { font-size: 16px; } }

/* Barra con las opciones del grupo en el que estás (decisión 457) */
.g-subbar { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; padding: 6px 16px; background: #fff; border-bottom: 1px solid var(--borde); min-width: 0; }
.g-subbar > a { flex: 0 0 auto; color: var(--texto-suave); text-decoration: none; font-weight: 700; font-size: var(--txt-14); padding: 8px 12px; border-radius: var(--radio-m); min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
.g-subbar > a:hover { background: var(--superficie-2); color: var(--texto); }
.g-subbar > a[aria-current="page"] { background: var(--orko-teal-profundo); color: #fff; }
.g-subbar .g-grupo-mas { margin-left: auto; flex: 0 0 auto; }
.g-subbar .g-grupo-mas[data-activo] > summary { background: var(--orko-teal-profundo); color: #fff; }
.g-subbar .g-grupo-mas { position: relative; }
.g-subbar .g-grupo-mas > summary { min-height: 40px; padding: 8px 12px; font-size: var(--txt-14); }
.g-subbar .g-grupo-mas > .g-submenu { position: absolute !important; right: 0; left: auto; top: calc(100% + 6px); z-index: 40; display: flex; flex-direction: column; min-width: 220px; padding: 6px; background: #fff; border-radius: var(--radio-m); box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 1px var(--borde); }
.g-subbar .g-grupo-mas > .g-submenu a { font-size: var(--txt-14) !important; font-weight: 700; color: var(--texto); text-decoration: none; padding: 10px 12px; min-height: 40px; border-radius: 8px; display: flex; align-items: center; }
.g-subbar .g-grupo-mas > .g-submenu a:hover { background: var(--superficie-2); }
.g-subbar .g-grupo-mas > .g-submenu a[aria-current="page"] { background: var(--orko-teal-profundo); color: #fff; }

.g-saldo { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #E6DDF7; color: #3E2A66; font-size: var(--txt-12); font-weight: 800; }
.g-saldo-grande { font-size: 22px; padding: 4px 12px; }

/* Dashboard de hoy en directo (decisiones 479-484) */
.db-reloj { margin-left: auto; font: 800 22px/1 var(--fuente-ticket); }
.db-prox { color: var(--texto-suave); font-weight: 700; }
.db-prox b { color: var(--orko-teal-profundo); }
.db { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.db-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.db-c { background: #fff; border-radius: var(--radio-m); box-shadow: 0 0 0 1px var(--borde); padding: 12px 14px; min-width: 0; }
.db-c h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); }
.db-c > small { display: block; text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .05em; color: var(--texto-suave); text-align: center; }
.db-c > b { display: block; text-align: center; font: 800 22px/1.3 var(--fuente-ticket); }
.db-total { box-shadow: inset 4px 0 0 #2FBF71, 0 0 0 1px var(--borde); }
.db-total > b { font-size: 40px; color: #1E7A4C; }
.db-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.db-ancho { grid-column: 1 / -1; }
.db-dato { background: var(--superficie-2, #F1F4F2); border-radius: 10px; padding: 8px; text-align: center; }
.db-dato small { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--texto-suave); }
.db-dato b { font: 800 22px/1.3 var(--fuente-ticket); }
.db-lila b { color: #6B4FA0; } .db-oro b { color: #A77514; }
.db-medio { border-radius: 10px; padding: 8px 10px; background: var(--superficie-2, #F1F4F2); border-top: 4px solid #7D8A85; }
.db-medio small { display: block; font-size: 12px; font-weight: 800; }
.db-medio b { font: 700 15px/1.4 var(--fuente-ticket); }
.db-m-tarjeta { border-color: #3B6FB6; } .db-m-saldo { border-color: #7A4FA0; } .db-m-efectivo { border-color: #2FBF71; } .db-m-pendiente { border-color: #E0862A; }
.db-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.db-tabla th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--texto-suave); border-bottom: 1px solid var(--borde); padding: 4px; }
.db-tabla td { padding: 5px 4px; border-bottom: 1px dashed var(--borde); vertical-align: top; }
.db-tabla td small { color: var(--texto-suave); }
.db-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-pos { color: var(--texto-suave); width: 22px; }
.db-vacio { text-align: center; color: var(--texto-suave); padding: 10px; }
.db-filtro { display: flex; gap: 6px; margin-bottom: 8px; }
.db-filtro button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--borde); background: #fff; font: 700 13px/1 var(--fuente-ui); cursor: pointer; }
.db-filtro button[aria-pressed="true"] { background: var(--orko-teal-profundo); color: #fff; border-color: transparent; }
.db-barras { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.db-barra { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.db-barra i { display: block; background: var(--orko-teal); border-radius: 3px 3px 0 0; min-height: 1px; }
.db-barra small { font-size: 9px; color: var(--texto-suave); }
.db-cv { height: 14px; border-radius: 7px; background: #3B6FB6; overflow: hidden; margin-bottom: 8px; }
.db-cv i { display: block; height: 100%; background: #E0862A; }
.db-tickets td { font-size: 13px; }
@media (max-width: 1300px) { .db { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .db { grid-template-columns: 1fr; } }
/* El dashboard usa todo el ancho y las cifras no se parten */
.g-main:has(#db) { max-width: none; padding-left: 20px; padding-right: 20px; }
.db-c > b, .db-dato b, .db-medio b, .db-num { white-space: nowrap; }
.db-dato b, .db-c > b { font-size: clamp(16px, 1.5vw, 22px); }
.db-total > b { font-size: clamp(28px, 2.8vw, 42px); }
.db-medio b { font-size: clamp(12px, 1vw, 15px); }

.g-cuadrante th.g-cq-festivo { background: #FDF0DC; color: #8A5A0E; }

/* Mesas con dibujo en el editor del plano (decisiones 525-530) */
.g-pl-mesa.g-pl-dib { background: transparent; border: 0; border-radius: 6px; }
.g-pl-dib > .o-mesa-dib { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.g-pl-info { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; color: var(--orko-carbon); line-height: 1; }
.g-pl-info b { font-size: 1em; }
.g-pl-info small { font-size: 11px; }
.g-dibujos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 360px; overflow-y: auto; }
.g-dib { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border: 2px solid transparent; border-radius: var(--radio-s); background: #2A3431; color: #E6ECE9; cursor: pointer; font: 600 10px/1.1 var(--fuente-ui); min-height: 64px; }
.g-dib svg { width: 100%; height: 40px; }
.g-dib span { text-align: center; }
.g-dib-sel { border-color: var(--orko-aviso); }
.g-dib-auto { font: 800 22px/40px var(--fuente-ui); height: 40px; }
#pl-girar { min-height: 36px; }

/* Avisos por Telegram (0.43) */
.g-pasos { margin: 0 0 var(--esp-3); padding-left: 22px; }
.g-pasos li { margin-bottom: 4px; }
.g-error-texto { color: var(--orko-peligro); font-weight: 700; }
.g-avisos-botones { margin: 0 0 var(--esp-5); }
.g-aviso-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-bottom: 1px solid var(--borde); }
.g-aviso-fila:last-child { border-bottom: 0; }
.g-aviso-fila .g-check { flex: 1 1 320px; }
.g-aviso-emoji { width: 24px; text-align: center; }
.g-aviso-valor { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--txt-14); color: var(--texto-suave); }
.g-aviso-valor input { width: 84px; min-height: 44px; padding: 6px 8px; border-radius: var(--radio-m); border: 2px solid var(--borde); font: 700 var(--txt-16)/1.2 var(--fuente-ui); text-align: right; background: #fff; }
.g-aviso-valor input[type=time] { width: 140px; text-align: left; }

/* ORKO Central multiempresa (0.45) */
.p-qr { display: flex; justify-content: center; margin: 8px 0 12px; }
.p-qr svg { width: min(240px, 70vw); height: auto; border-radius: 8px; box-shadow: 0 0 0 1px var(--borde); }
.p-secreto { font-size: 15px; letter-spacing: .5px; word-break: break-all; }
.g-pasos-lista { margin: 0 0 6px; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.p-empresa { margin: 0 0 22px; }
.p-empresa > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.p-empresa > header h2 { margin: 0; font-size: 20px; }
.p-empresa > header a { font-weight: 700; }
.c-local.p-sin { box-shadow: inset 5px 0 0 #B7B7B7, 0 0 0 1px var(--borde); }
.c-local.p-error { box-shadow: inset 5px 0 0 #B03A2E, 0 0 0 1px var(--borde); }
.c-local small.p-lic { color: #555; }
.p-estado { display: inline-block; font-size: var(--txt-12); font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #E6F2F2; color: var(--orko-teal-profundo); }
.p-estado.p-baja { background: #FBE9E7; color: #B03A2E; }
.p-codigo-grande { font-size: 30px; font-weight: 800; letter-spacing: 3px; }
