/* ============================================================
   Milbana — reserva.css
   Qüestionari de reserva (reservar.html) + panell del personal (panel.html)
   Depèn dels tokens de style.css
   ============================================================ */

:root {
  --ok:      #5B7A4E;   /* salvia — lliure / confirmada */
  --warn:    #C8871F;   /* ambre  — queden poques */
  --bad:     #B04A32;   /* terra  — complet / cancel·lada */
}

/* ============================================================
   1 · QÜESTIONARI DE RESERVA
   Una pregunta per pantalla. Tot passa dins d'una sola targeta,
   perquè el client no vegi mai un mur de camps.
   ============================================================ */

body.wz-body {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(232, 106, 51, 0.10), transparent 60%),
    var(--paper);
  /* el qüestionari és curt: així el peu queda a baix de tot i no
     penja una franja de paper buit sota seu */
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
body.wz-body main { flex: 1 0 auto; }
body.wz-body .footer { flex: none; }

/* ---------- escenari ---------- */
.wz {
  width: min(760px, 100% - 32px);
  margin-inline: auto;
  /* el nav va fix: la targeta ha d'arrencar per sota */
  padding: calc(var(--nav-h) + clamp(18px, 3vw, 34px)) 0 clamp(32px, 5vw, 60px);
}

.wz__card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-paper);
  padding: clamp(20px, 3.4vw, 34px);
  display: flex;
  flex-direction: column;
}

/* ---------- progrés ---------- */
.wz__prog { display: flex; align-items: center; gap: 14px; }
.wz__track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}
.wz__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #F0894F);
  transition: width 0.55s var(--ease-expo);
}
.wz__count {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- xips del que ja s'ha triat ---------- */
.wz__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 0;
  min-height: 0;
}
.wz__tags:empty { display: none; }
.wtag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), background 0.2s var(--ease-soft);
  animation: wtag-in 0.4s var(--ease-expo) both;
}
.wtag:hover { border-color: var(--accent); background: var(--paper); }
.wtag svg { color: var(--ink-soft); flex: none; }
.wtag:hover svg { color: var(--accent); }
@keyframes wtag-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

/* ---------- passos ---------- */
.wz__stage { margin-top: clamp(18px, 3vw, 28px); }

.pas[hidden] { display: none; }
.pas { animation: pas-in 0.5s var(--ease-expo) both; }
.pas.is-back { animation-name: pas-in-back; }
@keyframes pas-in {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pas-in-back {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pas, .wtag { animation: none; }
  .wz__fill { transition: none; }
}

.pas__eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.pas__t {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.4vw, 2.15rem);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.022em;
}
.pas__sub {
  margin-top: 9px;
  max-width: 46ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.pas__body { margin-top: clamp(20px, 3vw, 28px); }

/* ---------- 1 · quants sereu ---------- */
.nums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 10px;
}
@media (max-width: 460px) {
  .nums { grid-template-columns: repeat(3, 1fr); }
}
.pnum {
  position: relative;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 560;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.22s var(--ease-expo), background 0.22s var(--ease-soft),
              border-color 0.22s var(--ease-soft), box-shadow 0.22s var(--ease-soft);
}
.pnum small {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pnum:hover { background: var(--paper-3); transform: translateY(-2px); }
.pnum:active { transform: translateY(0) scale(0.97); }
.pnum.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  box-shadow: 0 8px 20px -8px rgba(232, 106, 51, 0.7);
}
.pnum.is-active small { color: rgba(255, 249, 240, 0.8); }
.pnum--mes {
  grid-column: 1 / -1;
  min-height: 52px;
  flex-direction: row;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 650;
  border: 1.5px dashed var(--line);
  background: transparent;
}
.pnum--mes:hover { background: var(--paper-2); border-style: solid; }
.pnum--mes.is-active { border-style: solid; }

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
  padding: 14px;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.stepper[hidden] { display: none; }
.stepper__b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft), transform 0.2s var(--ease-expo);
}
.stepper__b:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.stepper__b:active:not(:disabled) { transform: scale(0.92); }
.stepper__b:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper__v { text-align: center; min-width: 92px; }
.stepper__v strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 560;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stepper__v span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nota {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(200, 135, 31, 0.09);
  border: 1px solid rgba(200, 135, 31, 0.28);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.nota[hidden] { display: none; }
.nota svg { flex: none; margin-top: 2px; color: var(--warn); }
.nota a { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ---------- 2 · dia ---------- */
.dies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 9px;
  max-height: 292px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-3) transparent;
  overscroll-behavior: contain;
}
.dies::-webkit-scrollbar { width: 7px; }
.dies::-webkit-scrollbar-thumb { background: var(--paper-3); border-radius: 99px; }
@media (max-width: 460px) {
  .dies { grid-template-columns: repeat(3, 1fr); max-height: 258px; }
}

.dia {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 11px 6px 10px;
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s var(--ease-expo), background 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
}
.dia__setmana {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dia__num {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 560;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dia__mes {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--ink-soft);
}
.dia:hover:not(:disabled) { background: var(--paper-3); transform: translateY(-2px); }
.dia.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.dia.is-active .dia__setmana,
.dia.is-active .dia__mes { color: rgba(255, 249, 240, 0.82); }
.dia:disabled { opacity: 0.34; cursor: not-allowed; }
.dia:disabled .dia__num { text-decoration: line-through; }
.dia--destacat { border-color: var(--line); }
.dia--destacat .dia__setmana { color: var(--accent); }
.dia.is-active.dia--destacat .dia__setmana { color: rgba(255, 249, 240, 0.82); }

.altra-data {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.altra-data label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.date-input {
  flex: 1 1 170px;
  min-width: 0;
  padding: 10px 13px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.date-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }

/* ---------- 3 · hora ---------- */
.moment + .moment { margin-top: 20px; }
.moment__t {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.moment__t::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.hores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
@media (max-width: 460px) {
  .hores { grid-template-columns: repeat(3, 1fr); }
}
.hora {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 11px 6px 9px;
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-expo), background 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
}
.hora__num {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.hora__estat {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
  min-height: 13px;
}
.hora--just .hora__estat { color: var(--warn); }
.hora:disabled .hora__estat { color: var(--bad); }
.hora:hover:not(:disabled) { background: var(--paper-3); transform: translateY(-2px); }
.hora:active:not(:disabled) { transform: scale(0.97); }
.hora.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.hora.is-active .hora__estat { color: rgba(255, 249, 240, 0.85); }
.hora:disabled { opacity: 0.42; cursor: not-allowed; }
.hora:disabled .hora__num { text-decoration: line-through; }

.llegenda {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-soft);
}
.llegenda li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--ok); }
.dot--warn { background: var(--warn); }
.dot--bad { background: var(--bad); }

.buit, .carrega {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 128px;
  padding: 22px;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.buit strong { display: block; color: var(--ink); font-weight: 650; }
.buit a { color: var(--accent); font-weight: 700; white-space: nowrap; }

.spin {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

/* ---------- 4 · preferències ---------- */
.grup + .grup { margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--line); }
.grup__l {
  display: block;
  margin-bottom: 11px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink);
}

.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 9px;
}
.carta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 15px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.2s var(--ease-expo), background 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft);
}
.carta svg { color: var(--ink-soft); margin-bottom: 3px; }
.carta b { font-size: 14.5px; font-weight: 650; }
.carta small { font-size: 11.5px; line-height: 1.4; color: var(--ink-soft); }
.carta:hover { background: var(--paper-3); transform: translateY(-2px); }
.carta.is-active { border-color: var(--accent); background: rgba(232, 106, 51, 0.09); }
.carta.is-active svg { color: var(--accent); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 9px 15px;
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease-soft), border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft);
}
.pill:hover { background: var(--paper-3); }
.pill.is-active { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* Al·lergens: se'n pot triar mes d'un. Es marquen en to d'avis, no
   amb el taronja de la marca, perque no es una preferencia mes: es
   informacio que la cuina ha de mirar si o si. */
.grup__d {
  margin: -2px 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.pills--al .pill { font-size: 13px; padding: 8px 13px; }
.pills--al .pill.is-active {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
}
.alergens__avis {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border-left: 2px solid var(--warn);
  background: rgba(200, 135, 31, 0.12);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
}
.alergens__avis[hidden] { display: none; }

.area {
  width: 100%;
  min-height: 92px;
  padding: 13px 15px;
  background: var(--paper-2);
  border: 1.5px solid var(--line-soft);
  border-radius: 13px;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  resize: vertical;
}
.area::placeholder { color: var(--ink-soft); opacity: 0.75; }
.area:focus { outline: none; border-color: var(--accent); background: var(--paper); }
.compta {
  margin-top: 5px;
  text-align: right;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

/* ---------- 5 · dades ---------- */
.camps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 560px) { .camps { grid-template-columns: minmax(0, 1fr); } }
.camp--ample { grid-column: 1 / -1; }

.camp__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
}
.camp__label .opc { font-weight: 500; color: var(--ink-soft); }
.camp__input {
  width: 100%;
  padding: 13px 15px;
  background: var(--paper-2);
  border: 1.5px solid var(--line-soft);
  border-radius: 13px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease-soft), background 0.2s var(--ease-soft);
}
.camp__input::placeholder { color: var(--ink-soft); opacity: 0.7; }
.camp__input:focus { outline: none; border-color: var(--accent); background: var(--paper); }
.camp__hint { margin-top: 5px; font-size: 11.5px; color: var(--ink-soft); }
.camp__error {
  display: none;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bad);
}
.camp.has-error .camp__input { border-color: var(--bad); background: rgba(176, 74, 50, 0.05); }
.camp.has-error .camp__hint { display: none; }
.camp.has-error .camp__error { display: block; }

.resum {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--navy);
  color: var(--paper);
  border-radius: 16px;
}
.resum__t {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.resum__l { margin-top: 11px; display: grid; gap: 1px; }
.resum__l li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-light);
}
.resum__l li:last-child { border-bottom: 0; }
.resum__l span { font-size: 12.5px; color: rgba(255, 249, 240, 0.68); }
.resum__l b {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 560;
  text-align: right;
}
.resum__note {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 249, 240, 0.62);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  padding: 13px 15px;
  background: var(--paper-2);
  border: 1.5px solid transparent;
  border-radius: 13px;
}
.consent input {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent label { font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); cursor: pointer; }
.consent a { color: var(--accent); font-weight: 650; }
.consent.has-error { border-color: var(--bad); background: rgba(176, 74, 50, 0.06); }

/* ---------- avís ---------- */
.avis {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 13px 15px;
  background: rgba(176, 74, 50, 0.08);
  border: 1px solid rgba(176, 74, 50, 0.3);
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.avis[hidden] { display: none; }
.avis svg { flex: none; margin-top: 1px; color: var(--bad); }

/* ---------- navegació ---------- */
.wz__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(20px, 3vw, 30px);
  padding-top: clamp(16px, 2.4vw, 22px);
  border-top: 1px solid var(--line-soft);
}
.navb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  cursor: pointer;
}
.navb[hidden] { display: none; }
.navb--back {
  padding: 12px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  transition: border-color 0.2s var(--ease-soft), color 0.2s var(--ease-soft);
}
.navb--back:hover { border-color: var(--ink); color: var(--ink); }
.navb--skip {
  margin-left: auto;
  padding: 12px 8px;
  background: none;
  border: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.navb--skip:hover { color: var(--accent); }
.navb--go { margin-left: auto; }
.navb--skip + .navb--go { margin-left: 0; }
.navb--go[hidden] { display: none; }
.navb--go[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

@media (max-width: 460px) {
  .wz__nav { flex-wrap: wrap; }
  .navb--go { flex: 1 1 100%; justify-content: center; order: -1; margin-left: 0; }
  .navb--skip { margin-left: auto; }
}

/* ---------- garanties ---------- */
.wz__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-soft);
}
.wz__trust li { display: inline-flex; align-items: center; gap: 6px; }
.wz__trust svg { color: var(--green); flex: none; }

/* ---------- confirmació ---------- */
.fet {
  width: min(560px, 100% - 32px);
  margin-inline: auto;
  padding: calc(var(--nav-h) + clamp(24px, 4vw, 48px)) 0 clamp(36px, 6vw, 64px);
}
.fet[hidden] { display: none; }

.tiquet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-paper);
  overflow: hidden;
  animation: tiquet-in 0.6s var(--ease-expo) both;
}
@keyframes tiquet-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .tiquet { animation: none; } }

.tiquet__top {
  padding: clamp(26px, 5vw, 38px) clamp(20px, 4vw, 34px) clamp(22px, 4vw, 30px);
  text-align: center;
  background: linear-gradient(180deg, rgba(91, 122, 78, 0.10), transparent);
}
.tiquet__check {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
}
.tiquet__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.95rem);
  font-weight: 560;
  letter-spacing: -0.02em;
}
.tiquet__sub {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.tiquet__rasga {
  position: relative;
  height: 20px;
  border-top: 2px dashed var(--line);
}
.tiquet__rasga::before,
.tiquet__rasga::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.tiquet__rasga::before { left: -12px; }
.tiquet__rasga::after { right: -12px; }

.tiquet__body { padding: 6px clamp(20px, 4vw, 34px) clamp(26px, 5vw, 34px); text-align: center; }
.tiquet__codi-l {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tiquet__codi {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.tiquet__dades {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding: 16px 10px;
  background: var(--paper-2);
  border-radius: 14px;
}
.tiquet__dk {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tiquet__dv {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}
.tiquet__peu { margin-top: 18px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.tiquet__peu a { color: var(--accent); font-weight: 650; white-space: nowrap; }
.tiquet__accions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 22px; }
.tiquet__accions .btn[hidden] { display: none; }

/* ============================================================
   2 · PANELL DEL PERSONAL
   ============================================================ */

body.panel-page {
  background: var(--navy);
  color: var(--paper);
  min-height: 100vh;
}
body.panel-page::after { opacity: 0.28; }   /* menys gra sobre fons fosc */

/* ---------- porta d'entrada (PIN) ---------- */
.porta {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.porta[hidden] { display: none; }

.porta__card {
  width: min(400px, 100%);
  padding: 38px 32px 32px;
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.24);
  text-align: center;
}
.porta__logo { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; }
.porta__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.porta__title {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 90;
  font-size: 1.7rem;
  font-weight: 520;
  line-height: 1.15;
  margin-top: 5px;
}
.porta__desc { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }

.porta__form { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.porta__pin {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 540;
  text-align: center;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.porta__pin:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
.porta__err {
  font-size: 13px;
  font-weight: 600;
  color: var(--bad);
  min-height: 19px;
}

/* ---------- capçalera del panell ---------- */
.pnl { display: none; flex-direction: column; min-height: 100vh; }
.pnl.is-on { display: flex; }

.pnl__top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(30, 58, 77, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-light);
}
.pnl__top-in {
  width: min(1400px, 100% - 40px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.pnl__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.pnl__brand img { width: 38px; height: 38px; border-radius: 50%; }
.pnl__name {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 90;
  font-size: 1.2rem;
  font-weight: 520;
  line-height: 1.1;
}
.pnl__role {
  display: block;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.pnl__top-dreta { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* llumeta d'estat de la connexió en directe */
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 249, 240, 0.8);
}
.live__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
}
.live__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  animation: pols 1.8s var(--ease-soft) infinite;
}
@keyframes pols {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}
.live.is-off { color: rgba(255, 249, 240, 0.55); }
.live.is-off .live__dot { background: var(--warn); }
.live.is-off .live__dot::after { border-color: var(--warn); animation-duration: 1s; }
@media (prefers-reduced-motion: reduce) { .live__dot::after { animation: none; opacity: 0; } }

.icobtn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-light);
  border-radius: var(--r-sm);
  background: transparent;
  color: rgba(255, 249, 240, 0.8);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.icobtn:hover { background: rgba(255, 249, 240, 0.1); color: var(--paper); }
.icobtn.is-on { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* ---------- xifres del dia ---------- */
.pnl__main {
  flex: 1;
  width: min(1400px, 100% - 40px);
  margin-inline: auto;
  padding: 26px 0 72px;
}

.xifres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.xifra {
  padding: 16px 18px;
  border: 1px solid var(--line-light);
  border-radius: var(--r);
  background: rgba(255, 249, 240, 0.05);
}
.xifra__k {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 249, 240, 0.6);
}
.xifra__v {
  display: block;
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 540;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.xifra--alerta .xifra__v { color: var(--accent-light); }

/* ---------- filtres ---------- */
.pnl__eines {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.fpills { display: flex; flex-wrap: wrap; gap: 7px; }
.fpill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 249, 240, 0.72);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fpill:hover { border-color: var(--paper); color: var(--paper); }
.fpill.is-active { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.fpill__n {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 249, 240, 0.14);
}
.fpill.is-active .fpill__n { background: rgba(46, 42, 36, 0.18); }

.pnl__cerca { position: relative; flex: 1 1 220px; max-width: 320px; min-width: 0; margin-left: auto; }
.pnl__cerca input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid var(--line-light);
  border-radius: var(--r-sm);
  background: rgba(255, 249, 240, 0.06);
  font: inherit;
  font-size: 14px;
  color: var(--paper);
}
.pnl__cerca input::placeholder { color: rgba(255, 249, 240, 0.45); }
.pnl__cerca input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
.pnl__cerca svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: rgba(255, 249, 240, 0.5); pointer-events: none; }
.pnl__cerca input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- dies ---------- */
.jornada + .jornada { margin-top: 34px; }
.jornada__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 11px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-light);
}
.jornada__dia {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 90;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 530;
  line-height: 1.1;
}
.jornada__dia em { font-style: normal; color: var(--accent-light); }
.jornada__meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 249, 240, 0.6);
}
.jornada__pic { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.jornada__barra {
  width: 110px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 249, 240, 0.14);
  overflow: hidden;
}
.jornada__barra i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ok);
  transition: width 0.5s var(--ease-expo);
}
.jornada__barra i.is-warn { background: var(--warn); }
.jornada__barra i.is-bad { background: var(--bad); }

/* ---------- fitxa de reserva ---------- */
.reserves { display: flex; flex-direction: column; gap: 10px; }

.fitxa {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 15px 18px;
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--warn);
  border-radius: var(--r);
  background: rgba(255, 249, 240, 0.05);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.fitxa:hover { background: rgba(255, 249, 240, 0.09); }
.fitxa.est-pendent { border-left-color: var(--warn); }
.fitxa.est-confirmada { border-left-color: var(--ok); }
.fitxa.est-cancellada { border-left-color: var(--bad); opacity: 0.5; }
.fitxa.est-cancellada .fitxa__nom { text-decoration: line-through; }
@media (max-width: 760px) {
  .fitxa { grid-template-columns: 70px minmax(0, 1fr); }
  .fitxa__accions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* entrada d'una reserva nova: destaca uns segons */
.fitxa.is-nova { animation: entra 0.55s var(--ease-expo); }
@keyframes entra {
  from { opacity: 0; transform: translateY(-10px); background: rgba(232, 106, 51, 0.32); }
  to   { opacity: 1; transform: none; }
}
/* etiqueta que cavalca la vora superior, com una pestanya */
.fitxa.is-nova::before {
  content: "NOVA";
  position: absolute;
  top: -8px;
  left: 16px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) { .fitxa.is-nova { animation: none; } }

.fitxa__temps { text-align: center; }
.fitxa__hora {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 540;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fitxa__fins {
  display: block;
  margin-top: 3px;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 249, 240, 0.5);
}

.fitxa__cos { min-width: 0; }
.fitxa__nom {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.fitxa__linia {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 5px;
  font-size: 12.5px;
  color: rgba(255, 249, 240, 0.72);
}
.fitxa__linia a { color: var(--accent-light); text-decoration: none; font-weight: 600; }
.fitxa__linia a:hover { text-decoration: underline; }
.fitxa__linia b {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 560;
  color: var(--paper);
}
/* A la fitxa del panell, els al·lergens van per davant de les notes i
   amb mes pes visual: es el que no es pot passar per alt. */
.fitxa__alerg {
  margin-top: 9px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: rgba(200, 135, 31, 0.18);
  border-left: 2px solid var(--warn);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.fitxa__alerg-t {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warn);
  margin-right: 2px;
}
.alerg {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--warn);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.fitxa__notes {
  margin-top: 9px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: rgba(232, 106, 51, 0.14);
  border-left: 2px solid var(--accent);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 249, 240, 0.92);
  overflow-wrap: anywhere;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--pendent   { border-color: var(--warn); color: #F0C070; }
.tag--confirmada{ border-color: var(--ok);   color: #A8C79A; }
.tag--cancellada{ border-color: var(--bad);  color: #E39B85; }

.fitxa__accions { display: flex; gap: 7px; flex-wrap: wrap; }
.acc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--line-light);
  border-radius: var(--r-sm);
  background: transparent;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 249, 240, 0.8);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.acc:hover { background: rgba(255, 249, 240, 0.12); color: var(--paper); }
.acc--ok:hover     { background: var(--ok);  border-color: var(--ok);  color: var(--paper); }
.acc--bad:hover    { background: var(--bad); border-color: var(--bad); color: var(--paper); }
.acc--fantasma     { border-color: transparent; color: rgba(255, 249, 240, 0.45); }
.acc--fantasma:hover { color: var(--paper); }

/* ---------- buit / carregant ---------- */
.pnl__buit {
  padding: 70px 26px;
  text-align: center;
  border: 1px dashed var(--line-light);
  border-radius: var(--r);
  color: rgba(255, 249, 240, 0.6);
}
.pnl__buit svg { opacity: 0.42; margin-bottom: 14px; }
.pnl__buit-t {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 520;
  color: var(--paper);
  margin-bottom: 6px;
}
.pnl__buit-d { font-size: 13.5px; line-height: 1.6; }

/* ---------- avisos flotants ---------- */
.brindis {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(340px, calc(100vw - 40px));
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 17px;
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  animation: toastIn 0.4s var(--ease-expo);
}
.toast.is-out { animation: toastOut 0.3s var(--ease-expo) forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(20px); } }
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-out { animation: none; }
}
.toast__ico {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.toast__t { font-weight: 700; font-size: 13.5px; }
.toast__d { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.45; }

/* tàctil: el zoom automàtic d'iOS no es dispara amb inputs >= 16px */
@media (max-width: 1024px) {
  .camp__input,
  .area,
  .date-input,
  .pnl__cerca input { font-size: 16px; }
}

/* impressió: el full de sala del dia */
@media print {
  body.panel-page { background: #fff; color: #000; }
  body.panel-page::after { display: none; }
  .pnl__top, .pnl__eines, .xifres, .fitxa__accions, .brindis, .porta { display: none !important; }
  .fitxa { border: 1px solid #999; background: none; break-inside: avoid; }
  .fitxa__linia, .fitxa__fins { color: #333; }
  .jornada__dia em { color: #000; }

  /* En paper no hi ha colors de fons que valguin: els al·lergens es
     marquen amb un requadre negre, que es el que arriba a la cuina. */
  .fitxa__alerg {
    background: none;
    border: 1.5px solid #000;
    border-left-width: 4px;
    padding: 6px 10px;
  }
  .fitxa__alerg-t { color: #000; }
  .alerg {
    background: none;
    color: #000;
    border: 1px solid #666;
    font-weight: 700;
  }
}
