/* Parque Caley — POS. Paleta tomada del sitio del parque: crema, oliva, ámbar, cafés y rojo del logo. */
:root {
  --crema: #F7F2DE; --crema-2: #EFE7C8; --oliva: #9C8D3B; --oliva-osc: #7d7130; --ambar: #ECA835; --ambar-2: #FFAD0A;
  --cafe: #A97306; --cafe-2: #A87E36; --cafe-osc: #543903; --tierra: #4E461D; --rojo: #CF0202; --verde: #4D754B; --teal: #5DAAAA;
  --texto: #2f2a14; --tenue: #7a7154; --borde: #ddd3ae; --blanco: #fffdf6;
  --radio: 10px; --sombra: 0 1px 2px rgba(84,57,3,.08), 0 4px 14px rgba(84,57,3,.06);
  --fuente: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --titulos: "Berlin Sans FB Demi", "Berlin Sans FB", "Jockey One", "Trebuchet MS", var(--fuente);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fuente); background: var(--crema); color: var(--texto); font-size: 15px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--titulos); color: var(--cafe-osc); font-weight: 700; margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.2rem; margin-top: 1.2rem; } h3 { font-size: 1.05rem; margin-top: 1rem; }
a { color: var(--cafe); } a:hover { color: var(--cafe-osc); }
small, .sub, .tenue { color: var(--tenue); } .sub { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--ambar-2); outline-offset: 2px; }

/* barra superior y menú */
.barra { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .55rem 1.2rem;
  background: var(--oliva); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.marca { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-family: var(--titulos); font-size: 1.25rem; }
.marca:hover { color: #fff; } .marca b { color: var(--ambar-2); }
.barra-info { margin-left: auto; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.barra-info form { margin: 0; } .usuario small { color: #f4ecd0; }
.enlace-barra { color: #fff; font-size: .9rem; } .enlace-barra:hover { color: var(--crema); }
.btn-menu { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 56px); }
.menu { background: var(--tierra); padding: 1rem .6rem; display: flex; flex-direction: column; gap: .2rem; }
.menu a { display: flex; gap: .65rem; align-items: center; padding: .6rem .75rem; border-radius: 8px; color: #f2ead0; text-decoration: none; font-weight: 600; }
.menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu a.activo { background: var(--ambar); color: var(--cafe-osc); }
.contenido { padding: 1.5rem 1.8rem 3rem; max-width: 1400px; width: 100%; }
.chip { font-size: .78rem; padding: .2rem .6rem; border-radius: 99px; font-weight: 700; }
.chip-ok { background: var(--verde); color: #fff; } .chip-alerta { background: var(--rojo); color: #fff; }

/* elementos */
.encabezado { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.encabezado .sub { margin: 0; }
.tarjeta { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.1rem 1.2rem; box-shadow: var(--sombra); margin-bottom: 1rem; }
.tarjeta h2:first-child { margin-top: 0; }
.centro { text-align: center; padding: 2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primario { background: var(--ambar); color: var(--cafe-osc); border-color: var(--cafe-2); }
.btn-primario:hover { background: var(--ambar-2); color: var(--cafe-osc); }
.btn-borde { background: var(--blanco); color: var(--cafe-osc); border-color: var(--cafe-2); }
.btn-borde:hover { background: var(--crema-2); color: var(--cafe-osc); }
.barra .btn-borde { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.barra .btn-borde:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-peligro { background: var(--rojo); color: #fff; } .btn-peligro:hover { background: #a80000; color: #fff; }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; } .btn-bloque { width: 100%; white-space: normal; text-align: center; } .btn-grande { padding: .9rem 1.4rem; font-size: 1.1rem; margin-bottom: 1rem; }
.en-linea { display: inline; margin: 0; } .botonera { display: flex; gap: .5rem; flex-wrap: wrap; }
.etiqueta { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .5rem; border-radius: 99px; background: var(--crema-2); color: var(--tierra); }
.etq-verde { background: #dfead9; color: var(--verde); } .etq-rojo { background: #f9d6d6; color: var(--rojo); } .etq-ambar { background: #fbe6bd; color: var(--cafe-osc); }
.rol-superadmin { background: var(--cafe-osc); color: #fff; } .rol-admin { background: var(--cafe); color: #fff; }
.rol-cajero { background: #d6ecec; color: #2c6363; } .rol-mesero { background: #fbe6bd; color: var(--cafe-osc); } .rol-cocinero { background: #dfead9; color: var(--verde); }

.mensajes { margin-bottom: 1rem; }
.aviso { padding: .7rem 1rem; border-radius: 8px; margin-bottom: .6rem; border-left: 5px solid; background: var(--blanco); }
.aviso-success { border-color: var(--verde); background: #eef5ea; } .aviso-error { border-color: var(--rojo); background: #fdeeee; }
.aviso-warning { border-color: var(--ambar); background: #fdf3dc; } .aviso-info { border-color: var(--teal); background: #eaf5f5; }
.aviso-accion { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* formularios */
.formulario { max-width: 860px; } .angosto { max-width: 460px; }
.grilla-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; }
.campo { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; }
label { font-weight: 600; color: var(--tierra); } .req { color: var(--rojo); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=email], select, textarea {
  font: inherit; padding: .55rem .7rem; border: 1px solid var(--borde); border-radius: 8px; background: #fff; color: var(--texto); min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--ambar); outline: 2px solid rgba(236,168,53,.35); }
.campo ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.campo ul label { font-weight: 400; }
.con-error input, .con-error select { border-color: var(--rojo); }
.error { color: var(--rojo); font-weight: 600; } .ayuda { color: var(--tenue); font-size: .85rem; }
.acciones { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.fila-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .3rem 0; }
.fila-form input[type=text] { flex: 1 1 180px; } .fila-form label { display: flex; gap: .4rem; align-items: center; }
.bloque-form { margin: .7rem 0; } .etq-form { display: block; font-size: .9rem; margin-bottom: .2rem; }
.plegable { margin: .5rem 0; } .plegable summary { cursor: pointer; font-weight: 600; color: var(--cafe); padding: .25rem 0; }
.medios { border: 1px solid var(--borde); border-radius: 8px; margin: .6rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.medios legend { font-weight: 700; color: var(--tierra); padding: 0 .3rem; } .opcion { font-weight: 400; }

/* tablas */
.tabla-envoltura { overflow-x: auto; background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--tenue); background: var(--crema-2); padding: .6rem .8rem; }
.tabla td { padding: .55rem .8rem; border-top: 1px solid var(--borde); vertical-align: middle; }
.tabla.compacta td, .tabla.compacta th { padding: .35rem .3rem; background: none; } .tabla tfoot th { font-size: 1rem; color: var(--cafe-osc); text-transform: none; }
.der { text-align: right; } .nowrap { white-space: nowrap; } .inactivo td { opacity: .55; } .vacio { color: var(--tenue); text-align: center; padding: 1.2rem; }
.icono-celda { font-size: 1.4rem; width: 2.5rem; }

/* inicio */
.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.indicador { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: .9rem 1rem; box-shadow: var(--sombra); }
.indicador span { display: block; font-size: .82rem; color: var(--tenue); font-weight: 600; }
.indicador strong { font-family: var(--titulos); font-size: 1.6rem; color: var(--cafe-osc); }
.indicador.destacado { background: var(--ambar); border-color: var(--cafe-2); } .indicador.destacado span { color: var(--cafe-osc); }
.accesos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.acceso { display: flex; flex-direction: column; gap: .3rem; align-items: center; padding: 1.1rem; background: var(--blanco); border: 1px solid var(--borde);
  border-radius: var(--radio); text-decoration: none; color: var(--cafe-osc); font-weight: 700; box-shadow: var(--sombra); }
.acceso span { font-size: 1.8rem; } .acceso:hover { border-color: var(--ambar); background: #fffaf0; }

/* punto de venta */
.pos { display: grid; grid-template-columns: 1fr 340px; gap: 1rem; align-items: start; }
.filtros { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filtro { font: inherit; font-weight: 600; padding: .4rem .9rem; border-radius: 99px; border: 1px solid var(--cafe-2); background: var(--blanco); color: var(--cafe-osc); cursor: pointer; }
.filtro.activo { background: var(--oliva); color: #fff; border-color: var(--oliva-osc); }
.productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.producto { position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .9rem .5rem; border-radius: var(--radio);
  border: 1px solid var(--borde); background: var(--blanco); font: inherit; cursor: pointer; box-shadow: var(--sombra); text-align: center; }
.producto:hover { border-color: var(--ambar); } .producto:active { transform: scale(.98); }
.producto .icono { font-size: 2rem; } .producto .nombre { font-weight: 700; color: var(--cafe-osc); } .producto .precio { color: var(--cafe); font-weight: 700; }
.producto .mini { position: absolute; top: 6px; right: 6px; font-size: .65rem; background: #fbe6bd; padding: 0 .35rem; border-radius: 99px; color: var(--cafe-osc); }
.oculto { display: none !important; }
.carro { position: sticky; top: 70px; }
.carro-lista { list-style: none; padding: 0; margin: 0 0 .6rem; max-height: 45vh; overflow: auto; }
.carro-lista li { padding: .45rem 0; border-bottom: 1px dashed var(--borde); }
.carro-item { display: grid; grid-template-columns: 1fr auto; gap: .2rem .5rem; align-items: center; }
.carro-item .ctrl { display: flex; align-items: center; gap: .3rem; }
.carro-item .ctrl button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--cafe-2); background: var(--blanco); cursor: pointer; font-weight: 700; }
.carro-item input { grid-column: 1 / -1; font-size: .85rem; padding: .3rem .5rem; }
.carro-total { display: flex; justify-content: space-between; align-items: baseline; padding: .5rem 0; border-top: 2px solid var(--cafe-osc); }
.carro-total strong { font-family: var(--titulos); font-size: 1.6rem; color: var(--cafe-osc); }

/* mesas */
.leyenda { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .85rem; color: var(--tenue); }
.punto { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: .5rem; }
.p-libre { background: #dfead9; border: 1px solid var(--verde); } .p-ocupada { background: var(--ambar); } .p-caja { background: var(--teal); } .p-off { background: #e5e0cc; }
.serie h2 { margin-top: .8rem; }
.mesas { display: grid; grid-template-columns: repeat(7, minmax(70px, 1fr)); gap: .5rem; }
.mesa { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 70px; border-radius: var(--radio); text-decoration: none; border: 2px solid; }
.mesa b { font-family: var(--titulos); font-size: 1.3rem; } .mesa small { font-size: .75rem; color: inherit; }
.m-libre { background: #eef5ea; border-color: var(--verde); color: var(--verde); }
.m-ocupada { background: var(--ambar); border-color: var(--cafe); color: var(--cafe-osc); }
.m-caja { background: var(--teal); border-color: #3f8282; color: #fff; }
.m-off { background: #ebe6d2; border-color: #ddd6bb; color: #aaa38a; border-style: dashed; }
.mesa:hover { filter: brightness(.96); }
.grilla-mesa { display: grid; grid-template-columns: 1fr 380px; gap: 1rem; align-items: start; }
.comanda { background: var(--blanco); border: 1px solid var(--borde); border-left: 5px solid var(--ambar); border-radius: 8px; padding: .7rem .9rem; margin-bottom: .6rem; box-shadow: var(--sombra); }
.comanda header { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
.comanda ul { margin: .4rem 0; padding-left: 1.1rem; } .comanda em { color: var(--rojo); font-style: normal; font-weight: 600; }
.c-en_preparacion { border-left-color: var(--teal); } .c-listo { border-left-color: var(--verde); } .c-completado { border-left-color: #bbb; opacity: .75; }
.c-cancelada { border-left-color: var(--rojo); opacity: .8; } .motivo { color: var(--rojo); font-size: .88rem; margin: .2rem 0; }
.demorada { box-shadow: 0 0 0 2px var(--rojo); }

/* cocina */
.tablero { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: .8rem; overflow-x: auto; }
.columna { background: var(--crema-2); border-radius: var(--radio); padding: .7rem; min-height: 50vh; }
.columna h2 { margin: 0 0 .6rem; display: flex; justify-content: space-between; font-size: 1.05rem; }
.contador { background: var(--cafe-osc); color: #fff; border-radius: 99px; padding: 0 .55rem; font-size: .85rem; }
.columna form { margin-top: .4rem; }

/* cuentas */
.cuentas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.cuenta header { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; } .cuenta h2 { margin: 0; }
.cuenta-caja { border-color: var(--ambar); box-shadow: 0 0 0 2px var(--ambar); }
.lista-simple { list-style: none; padding: 0; margin: .5rem 0; } .lista-simple li { display: flex; justify-content: space-between; padding: .15rem 0; }
.total-cuenta { display: flex; justify-content: space-between; border-top: 1px solid var(--borde); padding-top: .4rem; }
.monto-recibido { width: 110px; }

/* comprobante */
.boleta { max-width: 380px; } .boleta header { display: flex; gap: .6rem; align-items: center; }
.anulada { color: var(--rojo); font-weight: 800; }

/* reportes */
.barra-dato { display: grid; grid-template-columns: 90px 1fr 100px; gap: .5rem; align-items: center; margin: .3rem 0; font-size: .9rem; }
.barra-dato b { text-align: right; } .pista { background: var(--crema-2); border-radius: 99px; height: 12px; overflow: hidden; }
.relleno { background: var(--ambar); height: 100%; border-radius: 99px; }

/* login y errores */
.login, .pagina-error { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(circle at 20% 15%, rgba(236,168,53,.25), transparent 45%), radial-gradient(circle at 85% 90%, rgba(77,117,75,.2), transparent 45%), var(--crema); }
.login-panel, .tarjeta-error { background: var(--blanco); border: 1px solid var(--borde); border-radius: 16px; box-shadow: 0 10px 40px rgba(84,57,3,.12); padding: 2rem; width: 100%; max-width: 400px; text-align: center; }
.login-panel h1 { margin: .4rem 0 0; font-size: 2rem; } .login-panel h1 b { color: var(--ambar); }
.login-panel form { text-align: left; margin-top: 1rem; } .nota { font-size: .8rem; color: var(--tenue); margin-top: 1rem; }
.tarjeta-error { max-width: 480px; } .codigo-error { font-family: var(--titulos); font-size: 4rem; color: var(--ambar); margin: .2rem 0; line-height: 1; }

@media (max-width: 1000px) {
  .pos, .grilla-mesa { grid-template-columns: 1fr; } .carro { position: static; }
  .tablero { grid-template-columns: repeat(5, 240px); }
}
@media (max-width: 760px) {
  .btn-menu { display: block; } .barra-info .usuario, .enlace-barra { display: none; }
  .layout { grid-template-columns: 1fr; } .menu { display: none; } .menu.abierto { display: flex; }
  .contenido { padding: 1rem; } .grilla-2 { grid-template-columns: 1fr; } .mesas { grid-template-columns: repeat(4, 1fr); }
}
@media print {
  .barra, .menu, .no-imprimir, .mensajes { display: none !important; } .layout { display: block; } body { background: #fff; }
  .tarjeta { box-shadow: none; border: 0; }
}
