/* my nube azul · estilos */
:root {
  --azul: #BDE2FA;
  --azul-suave: #E4F3FD;
  --azul-osc: #2F6F97;
  --mint: #A5EBDF;
  --mint-osc: #6FCFBF;
  --mint-texto: #1E4D45;
  --fondo: #F8F5F2;
  --tarjeta: #FFFFFF;
  --rosa: #FFE3DF;
  --rosa-osc: #C9544A;
  --texto: #39434B;
  --texto-suave: #6E7880;
  --linea: #E8E2DC;
  --ok: #2E8B57;
  --radio: 18px;
  --radio-s: 12px;
  --sombra: 0 2px 10px rgba(57, 67, 75, .07);
  --nav-h: 68px;
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  --seguro-arriba: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--fondo); color: var(--texto); }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--azul-osc); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; font-weight: 800; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: .3em 0 .8em; }
.suave { color: var(--texto-suave); }
.peq { font-size: .88rem; }
.centro { text-align: center; }
.oculto { display: none !important; }
.fila { display: flex; gap: 10px; align-items: center; }
.fila.entre { justify-content: space-between; }
.fila.envolver { flex-wrap: wrap; }
.crece { flex: 1; min-width: 0; }
.pila > * + * { margin-top: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* Arranque */
.arranque { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 8px; font-weight: 800; color: var(--azul-osc); }

/* Marca */
.marca { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.01em; font-size: 1.15rem; }
.marca img { width: 34px; height: 34px; }
.marca small { display: block; font-weight: 700; font-size: .78rem; color: var(--texto-suave); letter-spacing: 0; }

/* Estructura */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  background: #fff; padding: calc(8px + var(--seguro-arriba)) 16px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 1px 0 rgba(57,67,75,.06);
}
.cabecera .icono-btn { background: var(--azul-suave); }
.cabecera { border-bottom: 3px solid var(--azul); }
.marca .logo-cab { width: 78px; height: auto; }
.marca .quien { font-weight: 800; font-size: .95rem; color: var(--texto-suave); border-left: 2px solid var(--linea); padding-left: 10px; }
.demo-aviso { background: var(--rosa); color: var(--rosa-osc); text-align: center; font-weight: 800; font-size: .85rem; padding: 6px; }
.contenido { padding: 16px 16px calc(var(--nav-h) + 24px + var(--seguro-abajo)); max-width: 760px; margin: 0 auto; }
.contenido.ancho { max-width: 1100px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--linea);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 4px calc(6px + var(--seguro-abajo));
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
  text-decoration: none; color: var(--texto-suave); font-size: .72rem; font-weight: 700; border-radius: 14px; min-height: 52px;
  justify-content: center; position: relative;
}
.nav a svg { width: 26px; height: 26px; }
.nav a.activo { color: var(--texto); background: var(--azul-suave); }
.nav .globo { position: absolute; top: 2px; right: calc(50% - 22px); background: var(--rosa-osc); color: #fff; border-radius: 10px; font-size: .68rem; padding: 0 6px; min-width: 18px; text-align: center; }

@media (min-width: 900px) {
  .con-lateral { display: grid; grid-template-columns: 240px 1fr; }
  .con-lateral .nav {
    position: sticky; top: 0; height: 100dvh; grid-auto-flow: row; grid-auto-rows: min-content; align-content: start;
    border-top: 0; border-right: 1px solid var(--linea); padding: 16px 10px; gap: 4px;
  }
  .con-lateral .nav a { flex-direction: row; justify-content: flex-start; font-size: .95rem; padding: 10px 12px; gap: 10px; min-height: 0; }
  .con-lateral .nav a svg { width: 22px; height: 22px; }
  .con-lateral .nav .globo { position: static; margin-left: auto; }
  .con-lateral .contenido { padding-bottom: 40px; }
}

/* Tarjetas */
.tarjeta { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; }
.tarjeta + .tarjeta { margin-top: 12px; }
.tarjeta.rosa { background: var(--rosa); box-shadow: none; }
.tarjeta.azul { background: var(--azul-suave); box-shadow: none; }
.tarjeta.mint { background: #E3F8F4; box-shadow: none; }
.rejilla { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.rejilla.dos { grid-template-columns: 1fr 1fr; }
.dato { background: #fff; border-radius: var(--radio); padding: 14px; box-shadow: var(--sombra); }
.dato .cifra { font-size: 1.6rem; font-weight: 900; }
.dato .etq { font-size: .85rem; color: var(--texto-suave); font-weight: 700; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 20px; border: 0; border-radius: 16px; cursor: pointer;
  font-weight: 800; font-size: 1rem; text-decoration: none; background: #fff; color: var(--texto);
  box-shadow: inset 0 0 0 2px var(--linea); transition: transform .08s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn.principal { background: var(--mint); color: var(--mint-texto); box-shadow: none; }
.btn.azul { background: var(--azul); box-shadow: none; }
.btn.rosa { background: var(--rosa); color: var(--rosa-osc); box-shadow: none; }
.btn.texto { background: none; box-shadow: none; color: var(--azul-osc); min-height: 44px; padding: 8px 10px; }
.btn.bloque { width: 100%; }
.btn.peq { min-height: 40px; padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.btn[disabled], .btn.ocupado { opacity: .6; pointer-events: none; }
.btn .girando { width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.icono-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; display: grid; place-items: center; cursor: pointer; }
.icono-btn svg { width: 24px; height: 24px; }

/* Formularios */
label.campo { display: block; font-weight: 700; font-size: .92rem; }
label.campo > span.lbl { display: block; margin-bottom: 6px; }
.entrada, select.entrada, textarea.entrada {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--linea);
  background: #fff; font-size: 1.05rem; outline: none;
}
.entrada:focus { border-color: var(--azul-osc); }
textarea.entrada { min-height: 90px; resize: vertical; }
.con-ojo { position: relative; }
.con-ojo .entrada { padding-right: 56px; letter-spacing: .04em; }
.con-ojo button { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 48px; border: 0; background: none; cursor: pointer; border-radius: 12px; color: var(--texto-suave); }
.con-ojo button svg { width: 24px; height: 24px; }
.ayuda { font-size: .85rem; color: var(--texto-suave); margin-top: 6px; font-weight: 600; }
.error-campo { color: var(--rosa-osc); font-weight: 700; font-size: .9rem; margin-top: 6px; }
.aviso { border-radius: 14px; padding: 12px 14px; font-weight: 700; font-size: .95rem; }
.aviso.error { background: var(--rosa); color: var(--rosa-osc); }
.aviso.info { background: var(--azul-suave); color: var(--azul-osc); }
.aviso.ok { background: #E3F8F4; color: var(--mint-texto); }
.aviso.pendiente { background: #FFF4DA; color: #8A6412; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: #fff; font-weight: 700; font-size: .9rem; box-shadow: inset 0 0 0 2px var(--linea); cursor: pointer; }
.chip.activo { background: var(--azul); box-shadow: none; }
.etiqueta { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 800; background: var(--azul-suave); color: var(--azul-osc); white-space: nowrap; }
.etiqueta.mint { background: #E3F8F4; color: var(--mint-texto); }
.etiqueta.rosa { background: var(--rosa); color: var(--rosa-osc); }
.etiqueta.gris { background: #EEE9E4; color: var(--texto-suave); }
.etiqueta.amarilla { background: #FFF4DA; color: #8A6412; }

.buscador { position: relative; }
.buscador svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--texto-suave); }
.buscador .entrada { padding-left: 44px; }

/* Productos y estampados */
.prod-rejilla { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.prod-card { background: #fff; border: 0; border-radius: var(--radio); padding: 10px 8px 12px; text-align: center; cursor: pointer; box-shadow: var(--sombra); display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-weight: 700; font-size: .88rem; line-height: 1.15; }
.prod-card img { width: 72px; height: 72px; }
.prod-card .precio { color: var(--texto-suave); font-weight: 700; font-size: .82rem; }
.prod-card .badge { position: absolute; top: 6px; right: 6px; }
.prod-card.sin { opacity: .45; }
.dibujo { background: #fff; border-radius: 14px; }

.est-rejilla { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.est-card { background: #fff; border: 0; border-radius: var(--radio); padding: 0 0 8px; cursor: pointer; box-shadow: var(--sombra); text-align: center; overflow: hidden; font-weight: 700; font-size: .85rem; position: relative; }
.est-card .foto { aspect-ratio: 1; width: 100%; }
.est-card .nombre { padding: 6px 6px 0; line-height: 1.15; }
.est-card .quedan { font-size: .78rem; color: var(--texto-suave); font-weight: 700; }
.est-card.sel { outline: 4px solid var(--mint-osc); }
.est-card.no { opacity: .45; }
.est-card .lupa { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,.85); border: 0; display: grid; place-items: center; }
.est-card .lupa svg { width: 18px; height: 18px; }
.foto { background: #F1ECE7; object-fit: cover; }
.foto-pendiente { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #F4EFEA, #F4EFEA 8px, #EFE8E2 8px, #EFE8E2 16px); color: var(--texto-suave); font-size: .78rem; font-weight: 800; text-align: center; padding: 6px; }
.mini-foto { width: 44px; height: 44px; border-radius: 10px; flex: none; overflow: hidden; }
.mini-foto .foto, .mini-foto img { width: 100%; height: 100%; }
.mini-dibujo { width: 44px; height: 44px; flex: none; }

/* Lista */
.lista { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.lista > .item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--linea); }
.lista > .item:last-child { border-bottom: 0; }
.lista > a.item, .lista > button.item { text-decoration: none; color: inherit; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.item .tit { font-weight: 800; }
.item .sub { font-size: .86rem; color: var(--texto-suave); font-weight: 600; }
.item .cant { font-size: 1.3rem; font-weight: 900; min-width: 36px; text-align: right; }

/* Cantidad +/- */
.cantidad { display: inline-flex; align-items: center; gap: 4px; background: var(--fondo); border-radius: 16px; padding: 4px; }
.cantidad button { width: 48px; height: 48px; border-radius: 12px; border: 0; background: #fff; font-size: 1.5rem; font-weight: 900; cursor: pointer; box-shadow: var(--sombra); }
.cantidad button[disabled] { opacity: .35; }
.cantidad output { min-width: 44px; text-align: center; font-size: 1.35rem; font-weight: 900; }

/* Barra de ticket */
.barra-ticket {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + var(--seguro-abajo)); z-index: 25;
  background: var(--texto); color: #fff; border-radius: 18px; padding: 10px 10px 10px 16px;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(57,67,75,.25); max-width: 736px; margin: 0 auto;
}
.barra-ticket .btn { min-height: 46px; }
.con-barra { padding-bottom: calc(var(--nav-h) + 100px + var(--seguro-abajo)); }

/* Hoja inferior (modal) */
.velo { position: fixed; inset: 0; background: rgba(57,67,75,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s; }
.hoja { background: var(--fondo); width: 100%; max-width: 640px; max-height: 92dvh; overflow: auto; border-radius: 24px 24px 0 0; padding: 18px 16px calc(20px + var(--seguro-abajo)); animation: sube .2s ease-out; }
@media (min-width: 700px) { .velo { align-items: center; } .hoja { border-radius: 24px; } }
.hoja .asa { width: 44px; height: 5px; border-radius: 3px; background: #D9D2CB; margin: -6px auto 12px; }
@keyframes aparece { from { opacity: 0; } }
@keyframes sube { from { transform: translateY(30px); opacity: .5; } }
.visor { background: #000; }
.visor img { width: 100%; max-height: 80dvh; object-fit: contain; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(12px + var(--seguro-arriba)); z-index: 60; background: var(--texto); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: sube .2s; }
.toast.error { background: var(--rosa-osc); }

/* Justificante */
.justificante { background: #fff; border-radius: var(--radio); padding: 18px; box-shadow: var(--sombra); }
.justificante .tot { font-size: 1.6rem; font-weight: 900; }
.justificante hr { border: 0; border-top: 2px dashed var(--linea); margin: 12px 0; }
.check-grande { width: 64px; height: 64px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; margin: 0 auto 8px; }
.check-grande svg { width: 34px; height: 34px; color: var(--mint-texto); }

/* Personalización */
.pers-vista { background: #fff; border-radius: var(--radio); min-height: 110px; display: grid; place-items: center; padding: 14px; box-shadow: var(--sombra); overflow: hidden; }
.pers-vista .txt { font-size: 2.6rem; line-height: 1.1; word-break: break-word; text-align: center; }
.pers-vista.oscuro { background: var(--texto); }
.tipos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tipo { border: 0; background: #fff; border-radius: 14px; padding: 10px 4px; cursor: pointer; box-shadow: inset 0 0 0 2px var(--linea); }
.tipo .m { font-size: 1.3rem; display: block; }
.tipo .n { font-size: .78rem; font-weight: 800; color: var(--texto-suave); }
.tipo.sel { box-shadow: inset 0 0 0 3px var(--mint-osc); background: #F1FBF9; }
.colores { display: flex; flex-wrap: wrap; gap: 8px; }
.color { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--linea); cursor: pointer; position: relative; }
.color.sel { outline: 3px solid var(--texto); outline-offset: 2px; }
.color.metal { background-image: linear-gradient(135deg, rgba(255,255,255,.6), rgba(255,255,255,0) 50%, rgba(0,0,0,.15)); }
.color.purpurina { background-image: radial-gradient(rgba(255,255,255,.8) 1px, transparent 1.5px), radial-gradient(rgba(255,255,255,.6) 1px, transparent 1.5px); background-size: 6px 6px, 9px 9px; background-position: 0 0, 3px 4px; }
.grupo-color { font-size: .8rem; font-weight: 800; color: var(--texto-suave); margin: 10px 0 6px; }

/* Tablas (administración) */
.tabla-envoltura { overflow-x: auto; background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); }
table.tabla { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tabla th, .tabla td { padding: 10px 12px; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: middle; }
.tabla th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-suave); background: #FBF9F7; position: sticky; top: 0; }
.tabla td.n, .tabla th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tabla tr:last-child td { border-bottom: 0; }
.pend { color: #8A6412; font-weight: 800; }

/* Barras de estadísticas */
.barra-est { display: grid; grid-template-columns: minmax(90px, 36%) 1fr auto; gap: 8px; align-items: center; font-size: .9rem; padding: 4px 0; }
.barra-est .b { height: 12px; border-radius: 6px; background: var(--azul); }
.barra-est .b.mint { background: var(--mint-osc); }
.evol { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.evol .col { flex: 1; background: var(--azul); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }

.separador { height: 1px; background: var(--linea); margin: 14px 0; }
.titulo-seccion { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.titulo-seccion h2 { margin: 0; }
.vacio { text-align: center; padding: 28px 12px; color: var(--texto-suave); font-weight: 700; }
.vacio img { width: 72px; margin: 0 auto 8px; opacity: .6; }
.paso { font-size: .8rem; font-weight: 800; color: var(--azul-osc); text-transform: uppercase; letter-spacing: .05em; }
.volver { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--azul-osc); background: none; border: 0; padding: 8px 0; cursor: pointer; font-size: .95rem; }
.volver svg { width: 20px; height: 20px; }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, #fff 0, #fff 30%, var(--fondo) 30%); }
.login .caja { width: 100%; max-width: 420px; }
.login .logo { text-align: center; margin-bottom: 18px; }
.login .logo img { width: 210px; height: auto; margin: 0 auto 8px; }
.login .logo .nombre { font-size: 1.7rem; font-weight: 900; letter-spacing: -.02em; }
.cuentas { display: grid; gap: 10px; }
.cuenta { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 16px; border: 0; background: #fff; cursor: pointer; box-shadow: inset 0 0 0 2px var(--linea); font-weight: 800; text-align: left; font-size: 1.02rem; }
.cuenta .ini { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; background: var(--azul-suave); }
.cuenta.sel { box-shadow: inset 0 0 0 3px var(--mint-osc); }

/* Menú */
.menu-lista a, .menu-lista button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; background: #fff; border: 0; border-bottom: 1px solid var(--linea); text-decoration: none; color: inherit; font-weight: 700; cursor: pointer; text-align: left; font-size: 1rem; }
.menu-lista a:last-child, .menu-lista button:last-child { border-bottom: 0; }
.menu-lista svg { width: 22px; height: 22px; color: var(--texto-suave); }
.menu-lista { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }

.linea-ticket { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.linea-ticket:last-child { border-bottom: 0; }
.tachado { text-decoration: line-through; color: var(--texto-suave); font-weight: 600; }
.estado-pedido { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 800; }
.estado-pendiente { background: #FFF4DA; color: #8A6412; }
.estado-confirmado { background: var(--azul-suave); color: var(--azul-osc); }
.estado-en_preparacion { background: #EDE7FB; color: #5B3FA0; }
.estado-listo { background: #E3F8F4; color: var(--mint-texto); }
.estado-entregado { background: #EEE9E4; color: var(--texto-suave); }
.estado-cancelado { background: var(--rosa); color: var(--rosa-osc); }

.paso-instalar { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.paso-instalar .n { width: 30px; height: 30px; border-radius: 50%; background: var(--azul); display: grid; place-items: center; font-weight: 900; flex: none; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.grande { min-height: 92px; flex-direction: column; font-size: 1.05rem; }
.btn.grande svg { width: 32px; height: 32px; }
.mini-foto .foto-pendiente { font-size: .6rem; padding: 2px; }
