/* Emporio La Panchita — identidad gourmet (crema / marrón) */
:root {
  --crema: #f4efe1;
  --crema-2: #efe8d6;
  --marron: #5b3a24;
  --marron-2: #7a5232;
  --marron-claro: #9a6b42;
  --dorado: #e0b252;
  --dorado-2: #d9a441;
  --verde: #6b7d4e;
  --texto: #3a2a1d;
  --gris: #8a7d6c;
  --rojo: #b5462f;
  --ok: #5c8a3a;
  --borde: #e2d8c2;
  --sombra: 0 2px 14px rgba(91, 58, 36, .10);
  --radio: 14px;
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--crema); color: var(--texto);
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px; line-height: 1.45;
}
h1, h2, h3 { font-weight: 800; color: var(--marron); letter-spacing: -.01em; margin: 0 0 .4em; }
a { color: var(--marron-2); }
.muted { color: var(--gris); }
.precio { font-weight: 800; color: var(--marron); font-variant-numeric: tabular-nums; }

/* ---- botones ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 14px;
  cursor: pointer; background: var(--marron); color: #fff; transition: .15s; font-family: inherit;
}
.btn:hover { background: var(--marron-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.dorado { background: var(--dorado-2); color: var(--marron); }
.btn.dorado:hover { background: var(--dorado); }
.btn.ghost { background: transparent; color: var(--marron-2); border: 1.5px solid var(--borde); }
.btn.ghost:hover { background: var(--crema-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: var(--rojo); }
.btn.ok { background: var(--ok); }

/* ---- inputs ---- */
input, select, textarea {
  font-family: inherit; font-size: 14px; padding: 9px 11px; border: 1.5px solid var(--borde);
  border-radius: 9px; background: #fff; color: var(--texto); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--dorado-2); }
label { font-size: 13px; font-weight: 700; color: var(--marron-2); display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }

/* ---- cards / tablas ---- */
.card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--borde); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); }
tr:hover td { background: var(--crema-2); }
.right { text-align: right; }

/* ---- chips de estado ---- */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip.pendiente { background: #f6e8c8; color: #8a6a1e; }
.chip.confirmado { background: #d7e3f0; color: #355a82; }
.chip.preparado { background: #e2dcc0; color: #6a5a22; }
.chip.entregado { background: #d8eccb; color: #41691f; }
.chip.cancelado { background: #f0d6cf; color: #8a3320; }
.chip.pagado { background: #d8eccb; color: #41691f; }
.chip.parcial { background: #f6e8c8; color: #8a6a1e; }

/* ---- toast ---- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--marron); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 700;
  opacity: 0; transition: .25s; z-index: 9999; box-shadow: var(--sombra); pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--rojo); }

/* ---- modal ---- */
.modal-bg { position: fixed; inset: 0; background: rgba(58, 42, 29, .45); display: none; align-items: center; justify-content: center; z-index: 500; padding: 16px; }
.modal-bg.show { display: flex; }
.modal { background: var(--crema); border-radius: 16px; max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--borde); position: sticky; top: 0; background: var(--crema); }
.modal .body { padding: 20px; }
.x { cursor: pointer; font-size: 22px; color: var(--gris); background: none; border: 0; }
