/* =========================================================
   VALE DO POTY · Componentes
   Requer tokens.css antes deste arquivo.
   ========================================================= */

/* ---------- Superfícies ---------- */
.vp-shell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-shell); box-shadow: var(--sh-shell); }
.vp-card  { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); }

/* ---------- Botões ---------- */
.vp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r-pill); border: 0; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; }
.vp-btn--primary { background: var(--accent-gradient); color: #FFFFFF; box-shadow: var(--sh-accent); font-weight: 800; }
.vp-btn--secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.vp-btn--lg { height: 56px; font-size: 17px; }
.vp-btn--icon { width: 46px; padding: 0; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--text); }

/* ---------- Pílulas de status ---------- */
.vp-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; white-space: nowrap; }
.vp-pill--crit { background: var(--crit-soft); color: var(--crit-text); }
.vp-pill--pay  { background: var(--pay-soft);  color: var(--pay-text); }
.vp-pill--ok   { background: var(--ok-soft);   color: var(--ok-text); }
.vp-pill--warn { background: var(--warn-soft); color: var(--warn-text); }
.vp-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Menu lateral ---------- */
.vp-nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px 0 8px; border-radius: var(--r-pill); color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 700; }
.vp-nav-item__icon { width: 32px; height: 32px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--soft2); color: var(--muted); flex-shrink: 0; }
.vp-nav-item.is-active { background: var(--accent-gradient); color: #FFFFFF; box-shadow: 0 10px 22px -12px var(--accent); }
.vp-nav-item.is-active .vp-nav-item__icon { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; }
.vp-nav--collapsed { width: 92px; }
.vp-nav--collapsed .vp-nav-item { justify-content: center; width: 52px; height: 52px; padding: 0; border-radius: 18px; align-self: center; }
.vp-nav--collapsed .vp-nav-item__label, .vp-nav--collapsed .vp-nav__section-title { display: none; }

/* ---------- Contadores (filtros) ---------- */
.vp-counter { display: flex; align-items: center; gap: 12px; height: 74px; padding: 0 14px; border-radius: 20px; border: 0; cursor: pointer; font: inherit; text-align: left; color: var(--counter-fg); background: linear-gradient(135deg, var(--counter-soft) 0%, var(--surface) 85%); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 var(--hl); }
.vp-counter__icon { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--counter-solid); color: #FFFFFF; opacity: .88; box-shadow: 0 8px 14px -9px var(--counter-solid); flex-shrink: 0; }
.vp-counter__num { font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.vp-counter__label { font-size: 13px; font-weight: 700; opacity: .9; }
.vp-counter.is-empty { opacity: .7; }
.vp-counter.is-active { background: var(--accent-gradient); color: #FFFFFF; box-shadow: var(--sh-accent); }
.vp-counter.is-active .vp-counter__icon { background: rgba(255, 255, 255, 0.22); box-shadow: none; opacity: 1; }
.vp-counter--all  { --counter-soft: var(--chip);      --counter-fg: var(--text2);     --counter-solid: #6E655E; }
.vp-counter--ok   { --counter-soft: var(--ok-soft);   --counter-fg: var(--ok-text);   --counter-solid: var(--ok); }
.vp-counter--warn { --counter-soft: var(--warn-soft); --counter-fg: var(--warn-text); --counter-solid: var(--warn); }
.vp-counter--crit { --counter-soft: var(--crit-soft); --counter-fg: var(--crit-text); --counter-solid: var(--crit); }
.vp-counter--pay  { --counter-soft: var(--pay-soft);  --counter-fg: var(--pay-text);  --counter-solid: var(--pay); }

/* ---------- Card do turno (brasa) ---------- */
.vp-hero { position: relative; overflow: hidden; border-radius: var(--r-shell); padding: 22px 24px; color: #FFFFFF; background: linear-gradient(135deg, var(--accent) 0%, #DC470E 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 26px 46px -26px var(--accent); }
.vp-hero > * { position: relative; }
.vp-hero__texture { position: absolute !important; inset: 0; pointer-events: none; opacity: .09; background-size: 260px 260px; background-position: 12px -20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22260%22 height=%22260%22 viewBox=%220 0 260 260%22><g fill=%22none%22 stroke=%22white%22 stroke-opacity=%221%22 stroke-width=%221.5%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22><g transform=%22translate(14 48) rotate(-38) scale(0.95)%22><path d=%22M0 0 L56 0%22/><circle cx=%2260%22 cy=%220%22 r=%223%22/><rect x=%228%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2223%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2238%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/></g><g transform=%22translate(132 30) rotate(17) scale(0.72)%22><path d=%22M0 0 L56 0%22/><circle cx=%2260%22 cy=%220%22 r=%223%22/><rect x=%228%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2223%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2238%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/></g><g transform=%22translate(168 196) rotate(-71) scale(0.85)%22><path d=%22M0 0 L56 0%22/><circle cx=%2260%22 cy=%220%22 r=%223%22/><rect x=%228%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2223%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2238%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/></g><g transform=%22translate(22 214) rotate(8) scale(0.62)%22><path d=%22M0 0 L56 0%22/><circle cx=%2260%22 cy=%220%22 r=%223%22/><rect x=%228%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2223%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2238%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/></g><g transform=%22translate(196 118) rotate(-24) scale(0.55)%22><path d=%22M0 0 L56 0%22/><circle cx=%2260%22 cy=%220%22 r=%223%22/><rect x=%228%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2223%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/><rect x=%2238%22 y=%22-5%22 width=%2212%22 height=%2210%22 rx=%223%22/></g><path transform=%22translate(104 112) rotate(-9) scale(1.0)%22 d=%22M-6 10 Q-8 4 -5 -1 Q-4 3 -1.5 3.5 Q-3 -4 2 -11 Q3 -4 6 -2 Q7 -6 6.5 -8 Q12 -2 10 5 Q8.5 10 3 11 Z%22/><path transform=%22translate(222 64) rotate(14) scale(0.7)%22 d=%22M-6 10 Q-8 4 -5 -1 Q-4 3 -1.5 3.5 Q-3 -4 2 -11 Q3 -4 6 -2 Q7 -6 6.5 -8 Q12 -2 10 5 Q8.5 10 3 11 Z%22/><path transform=%22translate(86 236) rotate(4) scale(0.82)%22 d=%22M-6 10 Q-8 4 -5 -1 Q-4 3 -1.5 3.5 Q-3 -4 2 -11 Q3 -4 6 -2 Q7 -6 6.5 -8 Q12 -2 10 5 Q8.5 10 3 11 Z%22/><path transform=%22translate(238 232) rotate(-12) scale(0.6)%22 d=%22M-6 10 Q-8 4 -5 -1 Q-4 3 -1.5 3.5 Q-3 -4 2 -11 Q3 -4 6 -2 Q7 -6 6.5 -8 Q12 -2 10 5 Q8.5 10 3 11 Z%22/><path transform=%22translate(52 146) rotate(20) scale(0.55)%22 d=%22M-6 10 Q-8 4 -5 -1 Q-4 3 -1.5 3.5 Q-3 -4 2 -11 Q3 -4 6 -2 Q7 -6 6.5 -8 Q12 -2 10 5 Q8.5 10 3 11 Z%22/><path transform=%22translate(150 86) rotate(-18) scale(0.48)%22 d=%22M-6 10 Q-8 4 -5 -1 Q-4 3 -1.5 3.5 Q-3 -4 2 -11 Q3 -4 6 -2 Q7 -6 6.5 -8 Q12 -2 10 5 Q8.5 10 3 11 Z%22/></g><g fill=%22white%22 fill-opacity=%221%22><circle cx=%2286%22 cy=%22246%22 r=%221%22/><circle cx=%22105%22 cy=%22170%22 r=%220.8%22/><circle cx=%2222%22 cy=%22214%22 r=%220.8%22/><circle cx=%2297%22 cy=%22153%22 r=%220.8%22/><circle cx=%22236%22 cy=%22133%22 r=%221%22/><circle cx=%2213%22 cy=%2226%22 r=%221.5%22/><circle cx=%22111%22 cy=%2221%22 r=%221%22/><circle cx=%2227%22 cy=%22145%22 r=%221.5%22/><circle cx=%2219%22 cy=%22215%22 r=%220.8%22/><circle cx=%22246%22 cy=%2261%22 r=%220.8%22/><circle cx=%22151%22 cy=%22153%22 r=%221.5%22/><circle cx=%2216%22 cy=%22253%22 r=%221%22/><circle cx=%2215%22 cy=%22146%22 r=%221%22/><circle cx=%2278%22 cy=%22111%22 r=%221%22/></g></svg>'); }
.vp-brasa, .vp-brasa2 { position: absolute !important; left: 0; right: 0; bottom: 0; height: 90px; pointer-events: none; transform-origin: 50% 100%; }
.vp-brasa  { animation: vp-brasa 8s ease-in-out infinite; background: radial-gradient(ellipse 28% 85% at 18% 135%, rgba(255,226,140,.60), transparent 70%), radial-gradient(ellipse 22% 75% at 48% 140%, rgba(255,200,100,.50), transparent 70%), radial-gradient(ellipse 26% 85% at 80% 135%, rgba(255,226,140,.55), transparent 70%), radial-gradient(ellipse 60% 60% at 50% 160%, rgba(255,120,40,.45), transparent 75%); }
.vp-brasa2 { animation: vp-brasa2 6.5s ease-in-out infinite; background: radial-gradient(ellipse 18% 70% at 33% 140%, rgba(255,236,170,.45), transparent 70%), radial-gradient(ellipse 18% 70% at 66% 140%, rgba(255,236,170,.40), transparent 70%); }
.vp-faisca { position: absolute !important; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: #FFE9AE; box-shadow: 0 0 6px 2px rgba(255,200,90,.8); opacity: 0; pointer-events: none; animation: vp-faisca 2.6s ease-out infinite; }

/* ---------- Card da mesa (mesa desenhada) ---------- */
.vp-table-card { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 10px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--sh-card); border: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.vp-table-card.is-selected { background: var(--sel-bg); transform: translateY(-4px); box-shadow: var(--sh-selected); }
.vp-table { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.vp-table__top { position: absolute; left: 20px; top: 20px; width: 68px; height: 68px; box-sizing: border-box; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: var(--fs-table); font-weight: 800; letter-spacing: -0.04em; }
.vp-table--crit .vp-table__top { background: linear-gradient(145deg, var(--surface), var(--crit-soft)); border: 3px solid var(--crit); color: var(--crit-text); box-shadow: 0 0 0 6px rgba(229,40,27,.10), 0 8px 18px -8px rgba(229,40,27,.5); }
.vp-table--pay  .vp-table__top { background: linear-gradient(145deg, var(--surface), var(--pay-soft)); border: 3px solid var(--pay); color: var(--pay-text); box-shadow: 0 6px 14px -8px rgba(43,33,28,.3); }
.vp-table--ok   .vp-table__top { background: linear-gradient(145deg, var(--surface), var(--ok-soft)); border: 3px solid var(--ok); color: var(--ok-text); box-shadow: 0 6px 14px -8px rgba(43,33,28,.3); }
.vp-table--free .vp-table__top { background: var(--surface); border: 2px dashed var(--ok-dash); color: var(--ok-text); }
.is-selected .vp-table__top { background: linear-gradient(145deg, var(--accent-light), var(--accent-deep)); border: 0; color: #FFFFFF; box-shadow: 0 10px 22px -10px var(--accent); }

/* Cadeiras: o encosto é a borda grossa do lado de fora */
.vp-chair { position: absolute; box-sizing: border-box; border-radius: 6px; }
.vp-chair--t, .vp-chair--b { width: 20px; height: 13px; }
.vp-chair--l, .vp-chair--r { width: 13px; height: 20px; }
.vp-chair.is-taken { background: var(--chair); box-shadow: 0 3px 8px -3px rgba(58,46,39,.55); }
.vp-chair.is-taken.vp-chair--t { border-top: 5px solid var(--chair-back); }
.vp-chair.is-taken.vp-chair--b { border-bottom: 5px solid var(--chair-back); }
.vp-chair.is-taken.vp-chair--l { border-left: 5px solid var(--chair-back); }
.vp-chair.is-taken.vp-chair--r { border-right: 5px solid var(--chair-back); }
.vp-chair:not(.is-taken) { border: 2px dashed var(--line2); }
.vp-table--free .vp-chair:not(.is-taken) { border-color: var(--ok-dash); }
.vp-chair--t:not(.is-taken) { border-top-width: 4px; }
.vp-chair--b:not(.is-taken) { border-bottom-width: 4px; }
.vp-chair--l:not(.is-taken) { border-left-width: 4px; }
.vp-chair--r:not(.is-taken) { border-right-width: 4px; }
/* Posições: mesa de 4 lugares */
.vp-seat-t  { left: 40px; top: 3px; }   .vp-seat-b  { left: 40px; top: 92px; }
.vp-seat-l  { left: 3px;  top: 40px; }  .vp-seat-r  { left: 92px; top: 40px; }
/* Mesa de 6 lugares: duas em cima, duas embaixo, uma de cada lado */
.vp-seat-t1 { left: 27px; top: 3px; }   .vp-seat-t2 { left: 53px; top: 3px; }
.vp-seat-b1 { left: 27px; top: 92px; }  .vp-seat-b2 { left: 53px; top: 92px; }

/* Barrinha do pedido */
.vp-progress { display: flex; gap: 3px; height: 5px; }
.vp-progress > span { border-radius: 4px; }
.vp-progress .is-done { background: var(--ok); }
.vp-progress .is-cooking { background: var(--pay); }
.vp-progress .is-waiting { background: var(--warn); }

/* Prévia ao passar o mouse */
.vp-peek { position: absolute; left: 50%; bottom: calc(100% + 10px); width: 250px; transform: translate(-50%, 8px) scale(.98); opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s var(--ease); z-index: 30; }
.vp-table-card:hover .vp-peek, .vp-table-card:focus-visible .vp-peek { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- Anel de tempo ---------- */
.vp-ring { position: relative; width: 58px; height: 58px; flex-shrink: 0; }
.vp-ring svg { display: block; }
.vp-ring__track { stroke: var(--line2); }
.vp-ring__bar { transition: stroke-dasharray .6s var(--ease); }
.vp-ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; font-weight: 800; }

/* ---------- Painel da comanda ---------- */
.vp-panel { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-shell); overflow: hidden; display: flex; flex-direction: column; }
.vp-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hl), 0 8px 18px -14px rgba(43,33,28,.3); }
.vp-item__icon { position: relative; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vp-item__icon--carne  { background: var(--orange-soft); color: var(--orange-text); }
.vp-item__icon--bebida { background: var(--pay-soft);    color: var(--pay-text); }
.vp-item__icon--porcao { background: var(--warn-soft);   color: var(--warn-text); }
.vp-item__qty { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--accent); color: #FFFFFF; border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
/* Totais em formato de comanda de papel (borda serrilhada) */
.vp-receipt { position: relative; background: var(--surface); border-radius: 0 0 20px 20px; padding: 14px 16px 16px; box-shadow: 0 14px 26px -20px rgba(43,33,28,.35); }
.vp-receipt::before { content: ""; position: absolute; left: 2px; right: 2px; top: -10px; height: 10px; background: radial-gradient(circle at 8px 0, transparent 6px, var(--surface) 6.5px) repeat-x; background-size: 16px 10px; }
.vp-receipt__sep { border-top: 1.5px dashed var(--line2); margin: 4px 0 2px; }

/* ---------- Valores com centavos menores ---------- */
.vp-money { display: inline-flex; align-items: baseline; gap: 2px; }
.vp-money__cur, .vp-money__cents { font-weight: 700; color: var(--muted); font-size: .55em; }
.vp-money__int { font-weight: 800; letter-spacing: -0.03em; }
