/* BESA POS primitives — tokens and behaviour only, built on the app's palette. */
.pri-overlay {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(30, 20, 12, 0.55);
  backdrop-filter: blur(2px); animation: pri-fade 120ms ease-out;
}
.pri-dialog {
  background: var(--paper, #fff); color: var(--espresso, #2B1D14);
  border-radius: 16px; padding: 24px 26px; width: 100%; max-width: 380px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); outline: none;
  animation: pri-rise 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pri-dialog.pri-wide { max-width: 560px; }
.pri-title { font-size: 17px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.pri-msg { font-size: 13.5px; line-height: 1.55; margin: 0 0 16px; color: var(--mocha, #6b5a4a); }
.pri-field { margin-bottom: 18px; }
.pri-input {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: var(--sans, inherit);
  border: 1px solid var(--line, #ddd); border-radius: 10px; background: var(--cream, #F6F1E7);
  color: inherit;
}
.pri-input:focus-visible, .pri-btn:focus-visible, .pri-pin-box:focus-visible, .pri-menu-item:focus-visible {
  outline: 2px solid var(--rust, #B34F1F); outline-offset: 2px;
}
.pri-actions { display: flex; gap: 10px; justify-content: flex-end; }
.pri-btn {
  font: inherit; font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; background: transparent; color: inherit;
}
.pri-btn.pri-primary { background: var(--rust, #B34F1F); color: #fff; }
.pri-btn.pri-primary:hover { filter: brightness(1.06); }
.pri-btn.pri-ghost { border-color: var(--line, #ddd); }
.pri-btn.pri-danger { background: #b3261e; color: #fff; }
.pri-menu {
  position: fixed; z-index: 420; min-width: 190px; padding: 6px; border-radius: 12px;
  background: var(--paper, #fff); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line, #eee); animation: pri-fade 100ms ease-out;
}
.pri-menu-item {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 14px;
  padding: 10px 12px; border: 0; border-radius: 8px; background: transparent;
  cursor: pointer; color: inherit;
}
.pri-menu-item:hover { background: var(--cream, #F6F1E7); }
.pri-menu-item.pri-danger { color: #b3261e; }
#pri-toasts {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 500;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.pri-toast {
  background: var(--espresso, #2B1D14); color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 11px 18px; border-radius: 999px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  animation: pri-toast-in 180ms ease-out;
}
.pri-toast.pri-out { opacity: 0; transform: translateY(6px); transition: all 200ms ease-in; }
.pri-pin { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.pri-pin-box {
  width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 600;
  border: 1px solid var(--line, #ddd); border-radius: 10px; background: var(--cream, #F6F1E7);
  color: inherit; font-family: var(--sans, inherit);
}
@keyframes pri-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pri-rise { from { opacity: 0; transform: translateY(10px) scale(0.985) } to { opacity: 1; transform: none } }
@keyframes pri-toast-in { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) {
  .pri-overlay, .pri-dialog, .pri-menu, .pri-toast { animation: none; }
}

/* Generic button system. The app only ever had .btn-primary, so every page that
   used class="btn ghost" (Settings, About) rendered as a raw browser button. */
.btn {
  font: inherit; font-size: 14px; font-weight: 600; padding: 11px 16px;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  background: var(--espresso, #2B1D14); color: #fff; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--line, #ddd); color: var(--espresso, #2B1D14); }
.btn.ghost:hover { background: var(--cream, #F6F1E7); filter: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
a.btn { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--rust, #B34F1F); outline-offset: 2px; }

/* Settings rows: keep label+input+buttons on one line until it truly doesn't fit */
.field-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.field-row label { font-size: 12.5px; color: var(--mocha, #6b5a4a); }
.field-row input { display: block; margin-top: 4px; padding: 9px 11px; font-size: 15px;
  border: 1px solid var(--line, #ddd); border-radius: 8px; background: var(--cream, #F6F1E7); color: inherit; }
