/* YumPOS — design system comun tuturor paginilor-device */

:root {
  --brand:      #ff7a1a;   /* portocaliu apetisant */
  --brand-600:  #e5670c;
  --brand-050:  #fff2e6;
  --accent:     #ff3d71;
  --ink:        #1c1712;
  --muted:      #7a7168;
  --line:       #ece7e1;
  --bg:         #faf8f5;
  --card:       #ffffff;

  --pending:    #f5a623;
  --preparing:  #2f80ed;
  --ready:      #27ae60;
  --completed:  #9aa0a6;
  --cancelled:  #eb5757;

  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 8px 24px rgba(28,23,18,.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Umple containerul (iframe sau tab) */
.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app__scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---- Header ---- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.topbar__title { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.topbar__sub { color: var(--muted); font-size: 12px; }
.brand-dot { width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 14px; }
.spacer { flex: 1; }

/* ---- Butoane ---- */
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: 15px; border-radius: var(--radius-sm);
  padding: 12px 16px; transition: transform .06s ease, filter .15s ease, background .15s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 20px; font-size: 17px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Meniu / produse ---- */
.cat-title { font-weight: 800; font-size: 14px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); margin: 18px 16px 8px; }
.product {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--card);
}
.product__mono { width: 46px; height: 46px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 12px; font-weight: 800; font-size: 16px; letter-spacing: .02em; color: #fff;
  background: var(--mono, var(--brand)); box-shadow: inset 0 -2px 6px rgba(0,0,0,.15); }
.product__info { flex: 1; min-width: 0; }
.product__name { font-weight: 700; font-size: 15px; }
.product__desc { color: var(--muted); font-size: 12px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product__price { font-weight: 800; font-size: 14px; margin-top: 4px; color: var(--brand-600); }
.add-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 20px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0; transition: transform .08s;
}
.add-btn:active { transform: scale(.85); }

/* ---- Coș / footer ---- */
.cart-bar {
  flex-shrink: 0; border-top: 1px solid var(--line); background: var(--card);
  padding: 12px 16px; display: flex; flex-direction: column; gap: 10px;
}
.cart-line { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.cart-line--total { font-weight: 800; font-size: 17px; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 16px; line-height: 1; }

/* ---- Metode de plată ---- */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 4px 0; }
.pay-opt {
  border: 2px solid var(--line); border-radius: 14px; padding: 14px 8px; cursor: pointer;
  text-align: center; background: #fff; transition: border-color .15s, background .15s;
}
.pay-opt__emoji { color: var(--muted); display: grid; place-items: center; }
.pay-opt.is-active .pay-opt__emoji { color: var(--brand-600); }
.pay-opt__label { font-weight: 700; font-size: 13px; margin-top: 4px; }
.pay-opt__note { color: var(--muted); font-size: 10px; }
.pay-opt.is-active { border-color: var(--brand); background: var(--brand-050); }

/* ---- Badge status ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px;
  padding: 5px 10px; border-radius: 999px; color: #fff;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.85); }
.badge--pending    { background: var(--pending); }
.badge--preparing  { background: var(--preparing); }
.badge--ready      { background: var(--ready); }
.badge--completed  { background: var(--completed); }
.badge--cancelled  { background: var(--cancelled); }

/* ---- Diverse ---- */
.center-col { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 24px; gap: 14px; }
.big-emoji { font-size: 64px; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-050); color: var(--brand-600); font-weight: 700; font-size: 12px; }

/* ---- Animații ---- */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255,122,26,.55); }
  70%  { box-shadow: 0 0 0 22px rgba(255,122,26,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,122,26,0); }
}
/* Mișcare ușoară (nu jiggle agresiv): un mic „nudge" periodic. */
@keyframes shake {
  0%, 82%, 100% { transform: translateX(0); }
  88% { transform: translateX(-3px); }
  94% { transform: translateX(3px); }
}
.ringing { animation: shake 1.7s ease-in-out infinite; }
@keyframes pop-in { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pop-in { animation: pop-in .28s cubic-bezier(.2,1.4,.5,1); }

/* Iconițe inline */
.icn { display: inline-flex; align-items: center; justify-content: center; vertical-align: -.15em; }
.icn svg { display: block; }
.btn .icn { vertical-align: -.2em; }

/* Bifă desenată în CSS (fără emoji) */
.tick { width: 20px; height: 20px; position: relative; display: inline-block; }
.tick::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 12px;
  border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* Scrollbar discret */
.app__scroll::-webkit-scrollbar { width: 8px; }
.app__scroll::-webkit-scrollbar-thumb { background: #e2ddd6; border-radius: 8px; }
