/* Panel del personal (personal.html). Lenguaje de la tienda: banner azul con el logo, círculos con aro, títulos con barra rosa,
   botones en píldora y color lleno donde hay algo que hacer. Todas las clases empiezan con pp- para no chocar con otras pantallas. */
.hidden { display: none !important; }
.pp { max-width: 1080px; margin: 0 auto; padding: 14px 0 30px; display: flex; flex-direction: column; gap: 14px; }
.pp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pp-estado { color: #6f6a5c; font-size: .9rem; text-align: center; padding: 48px 0; }
#panel:not(.hidden) { display: flex; flex-direction: column; gap: 14px; }
.pp a:focus-visible, .pp button:focus-visible { outline: 3px solid #d81e8f; outline-offset: 2px; }

/* ---------- banner de bienvenida (como el de la tienda) ---------- */
.pp-hero { position: relative; overflow: hidden; color: #fff; border-radius: 18px; padding: 22px 24px; min-height: 168px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(110deg, #0a2a5e 0%, #0a4aa0 62%, #3b78d6 100%); box-shadow: 0 1px 3px rgba(60,45,20,.1), 0 8px 24px rgba(60,45,20,.12); }
.pp-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.14) 1.6px, transparent 1.8px) 0 0 / 20px 20px; -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000); mask-image: linear-gradient(90deg, transparent 35%, #000); pointer-events: none; }
.pp-hero::after { content: ""; position: absolute; right: -50px; bottom: -110px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(216,30,143,.6), transparent 68%); pointer-events: none; }
.pp-hero > * { position: relative; z-index: 1; }
.pp-hero-tx { min-width: 0; }
.pp-fecha { display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.5); border-radius: 99px; padding: 3px 12px; font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.pp-hero .pp-saludo { font-size: clamp(1.7rem, 5vw, 2.7rem); font-weight: 700; line-height: 1.04; letter-spacing: -.03em; margin: 10px 0 4px; color: #fff; border: 0; padding: 0; }
.pp-rol { display: block; font-size: .84rem; color: #dbe6fb; margin-bottom: 14px; }
.pp-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 99px; background: #fff; color: #0a2a5e; font-weight: 700; font-size: .95rem; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: transform .15s, background .15s, color .15s; }
.pp-cta:hover { background: #fde7f3; color: #b0156f; transform: translateY(-1px); } .pp-cta:active { transform: scale(.97); }
.pp-cta svg { width: 20px; height: 20px; color: #d81e8f; }
.pp-logo { width: 128px; height: 128px; border-radius: 50%; flex: none; border: 4px solid #fff; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 12px 30px rgba(0,0,0,.35); transform: rotate(-6deg); }

/* ---------- distribución ---------- */
.pp-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "hoy ped" "hoy aju" "acc acc"; grid-template-rows: auto 1fr auto; gap: 14px; align-items: start; }
.pp-hoy { grid-area: hoy; } .pp-ped { grid-area: ped; } .pp-aju { grid-area: aju; } .pp-acc { grid-area: acc; }
.pp-card { background: #fffaf0; border: 1px solid #e2d2b2; border-radius: 16px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(60,45,20,.1), 0 8px 24px rgba(60,45,20,.08); }
/* título de sección, igual que en la tienda: barra rosa a la izquierda */
.pp-t { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; color: #0a2a5e; letter-spacing: -.01em; margin: 0 0 10px; }
.pp-t::before { content: ""; width: 5px; height: 18px; border-radius: 3px; background: #d81e8f; flex: none; }
.pp-ver { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; margin-left: auto; background: #fffaf0; border: 1px solid #e2d2b2; border-radius: 99px; color: #0a4aa0; font-weight: 600; font-size: .72rem; padding: 6px 14px; text-decoration: none; white-space: nowrap; }
.pp-ver:hover { border-color: #d81e8f; color: #d81e8f; }

/* ---------- pedidos: se llenan de color cuando hay algo que hacer ---------- */
.pp-ped { display: flex; flex-direction: column; gap: 10px; }
.pp-pa { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 84px; padding: 12px 16px; border-radius: 16px; text-decoration: none; background: #fffaf0; border: 1px solid #e2d2b2; color: #0a2a5e; box-shadow: 0 1px 3px rgba(60,45,20,.1), 0 8px 24px rgba(60,45,20,.08); transition: transform .15s, box-shadow .15s; }
.pp-pa:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(60,45,20,.18); }
.pp-pa .ic { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #e2d2b2; color: #6f6a5c; }
.pp-pa .ic svg { width: 26px; height: 26px; }
.pp-pa .n { font-size: 2.1rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pp-pa .t { display: block; font-size: .76rem; font-weight: 500; line-height: 1.25; margin-top: 3px; color: #6f6a5c; }
.pp-pa .go { font-style: normal; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 6px 12px; background: #fff; border: 1px solid #e2d2b2; color: #6f6a5c; white-space: nowrap; }
.pp-pa.alerta.rev { background: linear-gradient(110deg, #a3126a 0%, #d81e8f 62%, #f26cb7 100%); border-color: transparent; color: #fff; box-shadow: 0 10px 26px rgba(216,30,143,.35); }
.pp-pa.alerta.ent { background: linear-gradient(110deg, #0a2a5e 0%, #0a4aa0 62%, #3b78d6 100%); border-color: transparent; color: #fff; box-shadow: 0 10px 26px rgba(10,74,160,.3); }
.pp-pa.alerta .ic { background: rgba(255,255,255,.22); color: #fff; } .pp-pa.alerta .t { color: #ffe3f2; } .pp-pa.alerta.ent .t { color: #dbe6fb; }
.pp-pa.alerta .go { background: #fff; border-color: #fff; color: #0a2a5e; }
.pp-pa.cargando .n { color: transparent; width: 42px; border-radius: 8px; background: linear-gradient(90deg, #efe3c9 25%, #f8f1e0 50%, #efe3c9 75%); background-size: 200% 100%; animation: ppSk 1.2s linear infinite; }
@keyframes ppSk { to { background-position: -200% 0; } }
.pp-err { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fef2f2; color: #b91c1c; border: 1px solid #f4b3b3; border-radius: 12px; padding: 8px 14px; font-size: .84rem; font-weight: 600; }
.pp-err button { border: 0; border-radius: 99px; background: #b91c1c; color: #fff; font: 600 .8rem/1 inherit; font-family: inherit; padding: 8px 16px; min-height: 36px; cursor: pointer; }

/* ---------- hoy: total, horas fuertes y últimas ventas ---------- */
.pp-hoy-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pp-hoy-top small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6f6a5c; }
.pp-hoy .n { display: block; font-size: 2.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; color: #0a2a5e; font-variant-numeric: tabular-nums; }
.pp-hoy .sub { font-size: .8rem; color: #6f6a5c; }
.pp-hoy.cargando .n { color: transparent; width: 150px; border-radius: 10px; background: linear-gradient(90deg, #efe3c9 25%, #f8f1e0 50%, #efe3c9 75%); background-size: 200% 100%; animation: ppSk 1.2s linear infinite; }
.pp-graf { margin: 12px 0 14px; }
.pp-lista { list-style: none; margin: 0; padding: 0; }
.pp-v { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 9px 0; border-top: 1px solid #f1e6d0; }
.pp-v .av { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .95rem; background: var(--c, #0a4aa0); }
.pp-v .d b { display: block; font-size: .86rem; color: #0a2a5e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-v .d small { font-size: .72rem; color: #6f6a5c; }
.pp-v .m { text-align: right; font-weight: 700; color: #0c7f3f; font-variant-numeric: tabular-nums; } .pp-v .m small { display: block; font-size: .68rem; font-weight: 500; color: #6f6a5c; }
.pp-vacio { text-align: center; padding: 14px 6px 6px; color: #6f6a5c; font-size: .86rem; border-top: 1px solid #f1e6d0; }
.pp-vacio b { display: block; color: #0a2a5e; font-size: .95rem; margin: 2px 0 4px; } .pp-vacio .pp-cta { margin-top: 10px; min-height: 44px; font-size: .86rem; background: #d81e8f; color: #fff; }
.pp-sk-fila { height: 40px; margin: 8px 0; border-radius: 12px; background: linear-gradient(90deg, #efe3c9 25%, #f8f1e0 50%, #efe3c9 75%); background-size: 200% 100%; animation: ppSk 1.2s linear infinite; }

/* ---------- accesos: círculos con aro, como las categorías de la tienda ---------- */
.pp-circ { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px 8px; }
.pp-c { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; text-decoration: none; color: #0a2a5e; padding: 4px 2px; min-width: 0; }
.pp-c .circ { position: relative; width: 74px; height: 74px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 3px solid #fffaf0; box-shadow: 0 0 0 2.5px var(--c, #d81e8f), 0 6px 14px rgba(60,45,20,.18); color: var(--c, #d81e8f); transition: transform .15s, background .15s, color .15s; }
.pp-c .circ svg { width: 32px; height: 32px; }
.pp-c:hover .circ { background: var(--c, #d81e8f); color: #fff; transform: translateY(-3px) scale(1.04); }
.pp-c b { font-size: .8rem; font-weight: 600; line-height: 1.2; } .pp-c small { display: block; font-size: .66rem; font-weight: 400; color: #6f6a5c; margin-top: 2px; line-height: 1.25; }
.pp-c .pp-n { position: absolute; top: 0; right: calc(50% - 46px); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #d81e8f; color: #fff; border: 2px solid #fffaf0; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; font-style: normal; }
.pp-acc .pp-card { padding: 16px 12px 12px; }
.pp-acc .pp-t { padding: 0 6px; }

/* ---------- ajustes ---------- */
.pp-aju { display: flex; flex-direction: column; gap: 8px; }
.pp-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 0 16px; background: #fffaf0; border: 1.5px solid #e2d2b2; border-radius: 99px; font-family: inherit; font-weight: 600; font-size: .84rem; color: #0a2a5e; cursor: pointer; transition: border-color .15s; }
.pp-btn:hover { border-color: #d81e8f; } .pp-btn em { font-style: normal; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 2px 10px; background: #d9f2e2; color: #0c6f36; } .pp-btn em.no { background: #f3e8d3; color: #6f6a5c; }
.pp-btn.salir { justify-content: center; color: #b91c1c; border-color: #f4b3b3; background: transparent; } .pp-btn.salir:hover { background: #b91c1c; color: #fff; border-color: #b91c1c; }

/* ---------- acceso denegado ---------- */
.pp-no { text-align: center; padding: 34px 20px; max-width: 460px; margin: 30px auto; }
.pp-no .e { font-size: 2.4rem; } .pp-no b { display: block; font-size: 1.05rem; color: #0a2a5e; margin: 6px 0 4px; } .pp-no p { color: #6f6a5c; font-size: .88rem; margin-bottom: 14px; }
.pp-no .pp-cta { background: #d81e8f; color: #fff; }

@media (max-width: 900px) {
  .pp-main { grid-template-columns: 1fr; grid-template-areas: "ped" "hoy" "acc" "aju"; grid-template-rows: none; }
  .pp-ped { flex-direction: row; } .pp-ped .pp-pa { flex: 1; min-width: 0; }
  .pp-circ { grid-template-columns: repeat(3, 1fr); gap: 14px 6px; }
}
@media (max-width: 760px) {
  .pp, #panel:not(.hidden) { gap: 12px; } .pp { padding-top: 8px; }
  .pp-hero { padding: 18px; min-height: 150px; }
  .pp-logo { width: 78px; height: 78px; border-width: 3px; align-self: flex-start; }
  .pp-hero .pp-saludo { font-size: 1.7rem; } .pp-rol { margin-bottom: 12px; }
  .pp-cta { min-height: 46px; padding: 0 22px; }
  /* en el celular los dos cuadros de pedidos van lado a lado: número grande arriba */
  .pp-pa { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; min-height: 0; align-items: start; }
  .pp-pa .ic { width: 38px; height: 38px; } .pp-pa .ic svg { width: 20px; height: 20px; } .pp-pa .n { font-size: 2rem; } .pp-pa .go { display: none; }
  .pp-hoy .n { font-size: 2.2rem; } .pp-card { padding: 14px; }
  .pp-c .circ { width: 68px; height: 68px; } .pp-c .pp-n { right: calc(50% - 42px); }
}
@media (prefers-reduced-motion: reduce) { .pp * { animation: none !important; transition: none !important; } }
