@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lilita-one-400-latin.9a95c766f3e1.woff2") format('woff2');
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/nunito-latin.166202cc391c.woff2") format('woff2');
}

:root {
  --cream: #F6EFE3;
  --paper: #FFFCF7;
  --ink: #1C140E;
  --muted: #6E5646;
  --line: #E4D3C0;
  --red: #D62828;
  --chili: #ED5145;
  --yolk: #F8D517;
  --green: #2E7D32;
  --placeholder: #B3A292;
  --font-display: 'Lilita One', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; }
button, input { font: inherit; color: inherit; }

.icon { width: 18px; height: 18px; flex: none; }

.label { font-weight: 700; font-size: 14px; }
.muted { color: var(--muted); }

.input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 16px;
}
.input::placeholder { color: var(--placeholder); }
.input:focus { outline: none; border-color: var(--ink); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.button .icon { width: 16px; height: 16px; }

.errorlist { margin: 0; padding: 0; list-style: none; color: var(--red); font-size: 13px; font-weight: 700; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.only-desktop { display: none; }

.notice {
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 14px;
  background: var(--paper);
  font-weight: 700;
}
.confirm {
  width: min(420px, calc(100% - 32px));
  margin: auto;
  padding: 28px 24px 24px;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 16px 40px rgb(28 20 14 / 0.18);
}
.confirm::backdrop { background: rgb(28 20 14 / 0.55); }
.confirm-text {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.2;
  text-align: center;
}
.confirm-ok {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
}

/* Order page */

.order-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 24px 32px;
}

.logo { width: 188px; height: auto; }
.product { width: 260px; text-align: center; }

.order, .order-column, .details { width: 100%; }
.order-column { display: flex; flex-direction: column; gap: 22px; }

.heading { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.title { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 37px; }
.subtitle { font-size: 14px; }

.order-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }

.field-quantity { gap: 10px; }
.field-quantity > .label { text-align: center; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
.step {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.step[hidden] { display: none; }
.step-plus { border-color: var(--red); background: var(--red); color: #fff; }
.count { display: flex; flex-direction: column; align-items: center; }
.count-input {
  width: 2.2ch;
  min-width: 39px;
  height: 41px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 36px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.count-input::-webkit-inner-spin-button,
.count-input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.count-input:focus { outline: none; }
.unit { font-size: 12px; line-height: 16px; }

.package-note, .receipt-note { font-size: 13px; line-height: 1.4; }
.package-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.package-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
}
.package-option input { position: absolute; opacity: 0; }
.package-option:has(input:checked) { border-color: var(--red); }
.package-option:has(input:checked) .package-name { color: var(--red); }
.package-name { font-weight: 700; }
.package-price { font-family: var(--font-display); font-size: 22px; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.order-total strong { font-family: var(--font-display); font-size: 28px; font-weight: 400; }
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.receipt-pick { width: 100%; height: 48px; border-radius: 16px; font-family: var(--font-display); font-weight: 400; font-size: 16px; }
.receipt-paste {
  min-height: 64px;
  padding: 14px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: var(--paper);
  text-align: center;
}
.receipt-paste:focus { outline: none; border-color: var(--ink); }
.receipt-paste:empty::before {
  content: 'Mantén presionado y pega la captura';
  color: var(--placeholder);
}
.receipt-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.receipt-preview[hidden], .receipt-hint[hidden] { display: none !important; }
.receipt-hint.is-error { color: var(--red); font-weight: 700; }

.field-heat { gap: 10px; }
.heat-header { display: flex; justify-content: space-between; align-items: center; }
.heat-value { color: var(--red); font-weight: 700; font-size: 13px; }
.heat-row { display: flex; justify-content: center; gap: 48px; }
.heat-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.heat-option input { position: absolute; opacity: 0; pointer-events: none; }
.heat-name { font-size: 13px; line-height: 16px; color: var(--muted); }
.heat-option input:checked ~ .heat-name { color: var(--red); font-weight: 700; }
.face {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
}
.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.face::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 3px solid var(--cream);
  border-radius: 50%;
}
.heat-option input:checked + .face { background: var(--red); box-shadow: 0 0 0 8px rgb(214 40 40 / 0.18); }
.heat-option input:checked + .face img { inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; }
.heat-option input:checked + .face::after { border-color: var(--red); border-width: 4px; }
.heat-option input:focus-visible + .face { outline: 2px solid var(--ink); outline-offset: 2px; }

.submit { height: 54px; border-radius: 16px; font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.submit.is-sending,
.submit:disabled { opacity: 0.72; cursor: progress; }
.details { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.details .label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 30px;
  text-align: center;
  color: #fff;
}
.note { display: flex; flex-direction: column; gap: 6px; }
.note:last-child { gap: 10px; }
.note-body { font-size: 13px; line-height: 1.45; }
.tips { display: flex; flex-direction: column; gap: 10px; }
.tips li { position: relative; padding-left: 16px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.tips .tip-strong { color: var(--ink); font-weight: 700; }

/* Order page on the logo red. Text and selected controls are tuned for that field. */
.order-body { background: var(--chili); font-weight: 600; }
.order-body .title,
.order-body .count-input,
.order-body .package-price,
.order-body .order-total strong,
.order-body .submit,
.order-body .confirm-text { font-weight: 400; }
.order-body .title { color: #fff; }
.order-body .count-input { color: var(--yolk); }
.order-body .order-total strong {
  color: var(--yolk);
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
}
.order-body .muted,
.order-body .heat-name { color: var(--ink); }
.order-body .button { background: var(--ink); color: var(--paper); }
.order-body .confirm .button { background: var(--red); color: #fff; }
.order-body .step-plus { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.order-body .package-option:has(input:checked) {
  background: var(--yolk);
  border-color: var(--yolk);
}
.order-body .package-option:has(input:checked) .package-name,
.order-body .package-option:has(input:checked) .package-price { color: var(--ink); }
.order-body .heat-value,
.order-body .heat-option input:checked ~ .heat-name {
  color: var(--ink);
  font-weight: 700;
  background: var(--yolk);
  border-radius: 999px;
  padding: 3px 10px;
}
.order-body .face::after { border-color: var(--chili); }
.order-body .heat-option input:checked + .face {
  background: var(--yolk);
  box-shadow: 0 0 0 3px var(--yolk);
}
.order-body .heat-option input:checked + .face img {
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
}
.order-body .heat-option input:checked + .face::after { border-color: var(--yolk); border-width: 3px; }
.order-body .details,
.order-body .details .muted,
.order-body .details .tips li,
.order-body .details .tip-strong { color: #2A2A2A; }
.order-body .details .tips li::before { background: #2A2A2A; }
.order-body .errorlist,
.order-body .receipt-hint.is-error {
  color: var(--red);
  background: var(--paper);
  border-radius: 8px;
  padding: 4px 8px;
}

/* Panel */

.panel-body { background: var(--paper); }
.panel { display: flex; flex-direction: column; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 72px;
  padding: 0 20px;
  background: var(--cream);
}
.panel-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.panel-logo { width: auto; height: 44px; }
.panel-title { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 30px; }
.panel-actions { display: flex; align-items: center; gap: 16px; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.panel-main { display: flex; flex-direction: column; gap: 22px; padding: 20px 20px 28px; }

.section-title { font-weight: 700; font-size: 14px; }

.summary-header { display: flex; justify-content: space-between; align-items: center; }
.summary-inline-total { color: var(--red); font-weight: 700; font-size: 13px; }
.summary-table, .summary-table > ul { display: flex; flex-direction: column; gap: 22px; }
.columns {
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  border-bottom: 1px solid var(--line);
}
.summary-level { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.summary-face { width: 36px; height: 36px; border-radius: 50%; }
.summary-qty { font-family: var(--font-display); font-size: 22px; }

.add-button-wide { height: 48px; }

.order-lists { display: flex; flex-direction: column; gap: 32px; }
.orders-list { display: flex; flex-direction: column; gap: 22px; }
.orders > .section-title { margin-bottom: 22px; }
.order-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.order-row > span, .order-row > time { grid-column: 1; }
.o-name { font-weight: 700; font-size: 15px; }
.o-meta { font-size: 13px; }
.o-phone { color: var(--muted); font-size: 13px; }
.o-date { color: var(--muted); font-size: 12px; }
.o-total { font-weight: 700; }
.o-fulfilled { color: var(--green); font-weight: 700; font-size: 12px; }
.receipt-text { color: var(--red); font-weight: 700; font-size: 13px; }
.o-receipt img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.o-actions { grid-column: 2; grid-row: 1 / span 8; display: flex; gap: 8px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  cursor: pointer;
}
.icon-button .icon { width: 16px; height: 16px; }
.icon-button.is-delete { color: var(--red); }
.icon-button.is-fulfill { color: var(--green); }
.icon-button.is-undo { color: var(--muted); }
.orders-empty { padding: 12px 0; }

.prices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
}
.prices label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.price-input { width: 140px; height: 40px; }
.price-save { height: 40px; padding: 0 14px; border-radius: 12px; }

.add-card { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 460px; margin: 0 auto; }
.cancel-link { align-self: center; font-weight: 700; }

.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 400px;
  margin: 0 auto;
  padding: 48px 24px;
}
.login-logo { width: 120px; height: auto; }
.login-form { display: flex; flex-direction: column; gap: 20px; width: 100%; }

/* Desktop. The min-height keeps short laptop screens on the stacked layout,
   where the page can scroll, instead of clipping a fixed 100vh screen. */
@media (min-width: 1024px) and (min-height: 720px) {
  body { height: 100vh; overflow: hidden; }

  .only-desktop { display: block; }
  .only-phone { display: none; }

  .order-page {
    display: grid;
    grid-template-columns: 620fr 820fr;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    gap: 0;
    max-width: none;
    height: 100%;
    padding: 0;
  }
  .brand, .details { background: var(--chili); padding-left: 48px; padding-right: 48px; }
  .brand {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 40px;
    padding-bottom: 16px;
  }
  .logo { width: 232px; }
  .details { grid-column: 1; grid-row: 2; padding-top: 8px; padding-bottom: 40px; }

  .order {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow-y: auto;
    padding: 28px 56px;
    border-left: 1px solid #000;
    background: var(--chili);
  }
  .order-column { width: 460px; gap: 14px; margin-block: auto; }
  .order-form { gap: 14px; }
  .heading { gap: 8px; text-align: center; }
  .subtitle { font-size: 15px; }
  .field-quantity > .label { text-align: center; }
  .panel { height: 100%; }
  .panel-header { flex: none; padding: 0 40px; }
  .panel-title { font-size: 28px; line-height: 32px; }
  .add-button { display: inline-flex; height: 44px; padding: 0 16px; border-radius: 12px; }

  .panel-main { flex: 1; min-height: 0; gap: 28px; padding: 32px 48px 40px; }
  .section-title { font-size: 16px; }

  .summary { display: flex; justify-content: space-between; align-items: center; flex: none; }
  .summary-table { width: 560px; }
  .summary-table, .summary-table > ul { gap: 0; }
  .columns { padding-top: 14px; }
  .summary-row { height: 48px; }
  .summary-face { width: 32px; height: 32px; }
  .summary-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .summary-total-number { font-family: var(--font-display); font-size: 64px; line-height: 73px; }

  .order-lists { flex: 1; min-height: 0; overflow-y: auto; gap: 28px; }
  .orders > .section-title { margin-bottom: 4px; }
  .orders-head, .order-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.6fr) 52px 92px 108px 118px 96px 112px 40px 68px;
    column-gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .orders-head.is-fulfilled, .order-row.is-fulfilled {
    grid-template-columns: minmax(120px, 1.3fr) 52px 88px 100px 112px 92px 104px 136px 40px 68px;
  }
  .orders-head { height: 36px; color: var(--muted); font-weight: 700; font-size: 12px; }
  .num { text-align: right; }
  .orders-list { gap: 0; }
  .order-row { min-height: 52px; height: auto; padding: 8px 0; font-size: 15px; }
  .order-row > span, .order-row > time { grid-column: auto; }
  .o-name { font-weight: 400; }
  .o-phone, .o-date { color: var(--ink); font-size: 15px; }
  .o-fulfilled { font-size: 15px; }
  .o-actions { grid-column: auto; grid-row: auto; justify-content: flex-end; }
  .o-total { font-weight: 400; }
  .icon-button { background: transparent; }
}
