/* CIRKA · encima de Pico: botones grandes, barra inferior, avisos. Pensado para un celular junto a una báscula. */
:root {
  --pico-font-size: 106%;
  --cirka-verde: #1f7a4d;
  --cirka-verde-oscuro: #155c39;
  --cirka-crema: #f6f4ee;
  --cirka-tinta: #1d2a24;
  --pico-primary: var(--cirka-verde);
  --pico-primary-hover: var(--cirka-verde-oscuro);
  --pico-primary-background: var(--cirka-verde);
  --pico-primary-hover-background: var(--cirka-verde-oscuro);
  --pico-background-color: var(--cirka-crema);
  --pico-card-background-color: #fff;
  --tabbar-h: 64px;
}
html { scroll-behavior: smooth; }
body { background: var(--cirka-crema); color: var(--cirka-tinta); }
main.container { padding-top: 1rem; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 1.5rem); max-width: 720px; }
h1 { font-size: 1.55rem; margin-bottom: .75rem; }
h2 { font-size: 1.2rem; margin-bottom: .5rem; }
h3 { font-size: 1.05rem; }
.barra { background: var(--cirka-verde); color: #fff; padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.barra a { color: #fff; text-decoration: none; }
.barra .marca { font-weight: 800; letter-spacing: .12em; font-size: 1.05rem; }
.barra .quien { font-size: .8rem; opacity: .9; text-align: right; line-height: 1.2; }
.aviso { background: #e7f5ec; border-left: 5px solid var(--cirka-verde); padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 600; }
.aviso.error { background: #fdecec; border-color: #b3261e; }
.aviso.alerta { background: #fff4d6; border-color: #b7791f; }
#sin-conexion { background: #b3261e; color: #fff; text-align: center; padding: .6rem; font-weight: 700; margin-bottom: 1rem; border-radius: 8px; }
button, [role=button], input[type=submit] { min-height: 52px; font-weight: 700; font-size: 1.05rem; }
button.chico, [role=button].chico { min-height: 40px; font-size: .9rem; padding: .35rem .8rem; width: auto; margin: 0; }
button.secundario { background: #fff; color: var(--cirka-verde); border: 2px solid var(--cirka-verde); }
button.peligro { background: #b3261e; border-color: #b3261e; color: #fff; }
input, select, textarea { min-height: 50px; font-size: 1.05rem; }
input[type=checkbox] { min-height: auto; width: 1.4rem; height: 1.4rem; }
label { font-weight: 600; }
.ayuda { font-size: .88rem; color: #5b6660; margin-top: -.5rem; margin-bottom: .9rem; }
.tarjeta { background: #fff; border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.cifra { background: #fff; border-radius: 12px; padding: .8rem; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cifra b { display: block; font-size: 1.7rem; color: var(--cirka-verde); line-height: 1.1; }
.cifra span { font-size: .8rem; color: #5b6660; }
.barra-avance { background: #e3e8e5; border-radius: 999px; height: 14px; overflow: hidden; margin: .5rem 0; }
.barra-avance > div { background: var(--cirka-verde); height: 100%; }
.lista { list-style: none; padding: 0; margin: 0; }
.lista li { background: #fff; border-radius: 10px; padding: .75rem 1rem; margin-bottom: .5rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.lista li a { text-decoration: none; color: inherit; flex: 1; }
.lista .sub { font-size: .85rem; color: #5b6660; display: block; }
.etiqueta { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: #e3e8e5; color: #2f3b35; white-space: nowrap; }
.etiqueta.aprobada, .etiqueta.conciliada, .etiqueta.conciliado { background: #d9f0e2; color: #155c39; }
.etiqueta.pendiente_aprobacion, .etiqueta.solicitado { background: #fff1c9; color: #7a4f00; }
.etiqueta.rechazada, .etiqueta.cancelado { background: #fbdede; color: #8a1c15; }
.etiqueta.en_lote, .etiqueta.recogido { background: #dfe7fb; color: #23407a; }
.tickets { font-weight: 800; color: var(--cirka-verde); font-size: 1.1rem; white-space: nowrap; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid #dfe3e0; display: flex; justify-content: space-around; align-items: stretch; z-index: 20; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #5b6660; font-size: .72rem; font-weight: 600; gap: 2px; position: relative; }
.tabbar a.activo { color: var(--cirka-verde); }
.tabbar a .ico { font-size: 1.35rem; line-height: 1; }
.tabbar a.mas { color: #fff; }
.tabbar a.mas .ico { background: var(--cirka-verde); border-radius: 50%; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-top: -18px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.tabbar .badge { position: absolute; top: 6px; right: calc(50% - 22px); background: #b3261e; color: #fff; font-size: .68rem; border-radius: 999px; padding: 0 .4rem; min-width: 18px; text-align: center; }
.buscador { position: relative; }
.resultados { list-style: none; margin: 0; padding: 0; border: 1px solid #cfd6d2; border-radius: 10px; background: #fff; max-height: 260px; overflow: auto; }
.resultados li { padding: .7rem .9rem; border-bottom: 1px solid #eef1ef; cursor: pointer; display: flex; justify-content: space-between; }
.resultados li:hover, .resultados li.marcado { background: #e7f5ec; }
.resultados .folio { color: #5b6660; font-size: .85rem; }
.seleccionado { background: #e7f5ec; border: 2px solid var(--cirka-verde); border-radius: 10px; padding: .7rem .9rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.previa-tickets { font-size: 1.1rem; margin: .25rem 0 1rem; }
.previa-tickets b { color: var(--cirka-verde); font-size: 1.4rem; }
.tabla { width: 100%; font-size: .92rem; }
.tabla th, .tabla td { padding: .5rem .4rem; }
.desplazable { overflow-x: auto; }
.fila-pendiente { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; background: #fff; border-radius: 10px; padding: .7rem .9rem; margin-bottom: .5rem; }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; }
.acciones form { margin: 0; }
details summary { cursor: pointer; font-weight: 600; }
details.ayuda-contextual { background: #fff; border-radius: 10px; padding: .6rem .9rem; margin-bottom: 1rem; font-size: .92rem; }
.folio-grande { font-family: ui-monospace, monospace; font-size: 2rem; letter-spacing: .08em; text-align: center; background: #fff; border: 2px dashed var(--cirka-verde); border-radius: 12px; padding: .6rem; margin: .75rem 0; }
.codigo { font-family: ui-monospace, monospace; font-size: 1.25rem; letter-spacing: .1em; background: #fff; border: 1px solid #cfd6d2; border-radius: 8px; padding: .2rem .5rem; }
.historial { font-size: .88rem; }
.historial li { margin-bottom: .4rem; }
.pie { text-align: center; font-size: .8rem; color: #5b6660; margin-top: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }
.nav-admin { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.nav-admin a { font-size: .85rem; padding: .35rem .7rem; background: #fff; border-radius: 999px; text-decoration: none; border: 1px solid #cfd6d2; color: var(--cirka-tinta); }
.nav-admin a.activo { background: var(--cirka-verde); color: #fff; border-color: var(--cirka-verde); }
.hero { text-align: center; padding: 1.5rem 0 .5rem; }
.hero h1 { font-size: 2.2rem; letter-spacing: .15em; color: var(--cirka-verde); margin-bottom: .25rem; }
.hero p { color: #5b6660; }
.botones-hero { display: grid; gap: .6rem; margin: 1rem 0; }
