/* Luxus POS – shared design system */
:root {
  --bg: #06080e;
  --bg2: #0b0f19;
  --surface: rgba(20, 26, 40, 0.72);
  --surface-solid: #121826;
  --surface-2: #19202f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3efe6;
  --muted: #9aa3b5;
  --dim: #6b7385;
  --gold: #d4af37;
  --gold-2: #f2d27a;
  --gold-soft: rgba(212, 175, 55, 0.14);
  --blue: #5fb4ff;
  --green: #3ddc97;
  --red: #ff5d6c;
  --orange: #ffad4d;
  --purple: #a78bfa;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  --font: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, -apple-system, sans-serif;
  --serif: "Playfair Display", "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.gold { color: var(--gold); }
.hidden { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- logo */
.lx-logo { text-align: center; line-height: 1; user-select: none; }
.lx-logo .word { font-family: var(--serif); font-weight: 700; letter-spacing: 0.16em; font-size: 34px; color: #fff;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.25); direction: ltr; padding-inline-start: 0.16em; }
.lx-logo .x { color: var(--blue); text-shadow: 0 0 18px rgba(95, 180, 255, 0.6); }
.lx-logo .tag { font-size: 9.5px; letter-spacing: 0.42em; color: var(--gold); margin-top: 6px; direction: ltr; padding-inline-start: 0.42em; }
.lx-logo.lg .word { font-size: 56px; }
.lx-logo.lg .tag { font-size: 11px; margin-top: 10px; }
.lx-logo.sm .word { font-size: 22px; }
.lx-logo.sm .tag { font-size: 7px; margin-top: 4px; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s; white-space: nowrap; }
.btn:hover { border-color: rgba(255, 255, 255, 0.25); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.gold { background: linear-gradient(135deg, #f6dc8a, #d4af37 45%, #a8841f); color: #1a1405; border: 0; box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.6); }
.btn.green { background: linear-gradient(135deg, #5ef0b0, #22b07a); color: #04140d; border: 0; }
.btn.danger { background: rgba(255, 93, 108, 0.14); color: #ff8b96; border-color: rgba(255, 93, 108, 0.35); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.lg { padding: 16px 22px; font-size: 17px; border-radius: 16px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--line); transition: transform 0.15s, background 0.2s; position: relative; }
.icon-btn:active { transform: scale(0.92); }
.icon-btn .ic { width: 20px; height: 20px; }
.badge { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 3px var(--bg); }
.badge:empty, .badge[data-n="0"] { display: none; }

/* ---------------------------------------------------------------- inputs */
.input { width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color 0.2s, background 0.2s; }
.input:focus { border-color: var(--gold); background: rgba(212, 175, 55, 0.05); }
textarea.input { resize: vertical; min-height: 70px; }
select.input { appearance: none; }
select.input option { background: var(--surface-solid); }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); font-size: 13px; transition: all 0.2s; }
.chip:hover, .chip.on { border-color: var(--gold); color: var(--gold-2); background: var(--gold-soft); }
.seg { display: flex; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--muted); transition: all 0.25s var(--ease); }
.seg button.on { background: var(--gold-soft); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.4); }
.switch { width: 46px; height: 26px; border-radius: 20px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background 0.25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--spring); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }
[dir="rtl"] .switch.on::after { transform: translateX(-20px); }

/* ---------------------------------------------------------------- lang switch */
.lang-switch { display: inline-flex; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.lang-switch button { padding: 6px 10px; border-radius: 9px; font-size: 12.5px; color: var(--muted); font-weight: 600; transition: all 0.2s; }
.lang-switch button.on { background: var(--gold-soft); color: var(--gold-2); }

/* ---------------------------------------------------------------- toasts */
.lx-toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.lx-toast { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: 14px; background: rgba(18, 24, 38, 0.92); backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600; transform: translateY(-20px) scale(0.95); opacity: 0; transition: all 0.4s var(--spring); }
.lx-toast.in { transform: none; opacity: 1; }
.lx-toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; box-shadow: 0 0 10px currentColor; }
.lx-toast.ok .dot { background: var(--green); } .lx-toast.err .dot { background: var(--red); } .lx-toast.warn .dot { background: var(--orange); }

/* ---------------------------------------------------------------- modal / sheet */
.lx-modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; }
.lx-modal-bg { position: absolute; inset: 0; background: rgba(2, 4, 8, 0.6); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s; }
.lx-modal-card { position: relative; width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #161d2c, #10151f);
  border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 40px 80px -20px #000; transform: translateY(24px) scale(0.96); opacity: 0;
  transition: transform 0.4s var(--spring), opacity 0.3s; overflow: hidden; }
.lx-modal.wide .lx-modal-card { width: min(980px, 100%); }
.lx-modal.in .lx-modal-bg { opacity: 1; }
.lx-modal.in .lx-modal-card { transform: none; opacity: 1; }
.lx-modal.out .lx-modal-card { transform: translateY(16px) scale(0.97); opacity: 0; transition-duration: 0.25s; }
.lx-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.lx-modal-head h3 { margin: 0; font-size: 19px; }
.lx-modal-head .icon-btn { width: 36px; height: 36px; }
.lx-modal-body { padding: 12px 20px 16px; overflow: auto; }
.lx-modal-actions { display: flex; gap: 10px; padding: 12px 20px 20px; justify-content: flex-end; }
.lx-modal-actions .btn { flex: 1; }
.lx-modal.sheet { place-items: end center; padding: 0; }
.lx-modal.sheet .lx-modal-card { width: min(640px, 100%); border-radius: 26px 26px 0 0; max-height: 92vh; transform: translateY(100%); }
.lx-modal.sheet.in .lx-modal-card { transform: none; }
.lx-modal.sheet.out .lx-modal-card { transform: translateY(100%); }
.lx-modal .grab { width: 44px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); margin: 10px auto 0; }
@media (min-width: 700px) { .lx-modal.sheet { place-items: center; padding: 16px; } .lx-modal.sheet .lx-modal-card { border-radius: 26px; transform: translateY(30px) scale(0.96); } .lx-modal.sheet .grab { display: none; } }

/* ---------------------------------------------------------------- PIN pad / login */
.pinpad { outline: none; }
.pin-dots { display: flex; justify-content: center; gap: 12px; height: 18px; margin: 6px 0 22px; direction: ltr; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); transition: all 0.2s var(--spring); }
.pin-dots span.on { background: var(--gold); border-color: var(--gold); transform: scale(1.15); box-shadow: 0 0 14px rgba(212, 175, 55, 0.7); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; direction: ltr; max-width: 300px; margin: 0 auto; }
.pin-key { height: 66px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-size: 24px; font-weight: 600; display: grid; place-items: center; transition: all 0.15s; }
.pin-key.hit, .pin-key:active { background: var(--gold-soft); border-color: var(--gold); transform: scale(0.94); }
.pin-key.ok { background: linear-gradient(135deg, #f6dc8a, #d4af37); color: #1a1405; }
.pin-key .ic { width: 26px; height: 26px; }
.pinpad.compact .pin-key { height: 56px; }
.pinpad.shake { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.login-screen { position: fixed; inset: 0; z-index: 800; display: grid; place-items: center; background: radial-gradient(circle at 50% 20%, #1a2134, var(--bg) 70%); padding: 20px; transition: opacity 0.5s, transform 0.5s var(--ease); }
.login-screen.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.login-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 65%); animation: breathe 6s ease-in-out infinite; }
.login-card { position: relative; width: min(380px, 100%); text-align: center; animation: rise 0.8s var(--ease) both; }
.login-title { margin-top: 22px; font-size: 20px; font-weight: 700; }
.login-sub { color: var(--muted); margin: 4px 0 18px; font-size: 14px; }
.login-err { min-height: 22px; color: var(--red); margin-top: 12px; font-weight: 600; }
.login-card .lang-switch { margin-top: 10px; }
@keyframes breathe { 50% { transform: scale(1.15); opacity: 0.7; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

/* ---------------------------------------------------------------- misc */
.empty { text-align: center; color: var(--dim); padding: 40px 10px; }
.empty .ic { width: 40px; height: 40px; opacity: 0.5; display: block; margin: 0 auto 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.06); }
.pill.gold { background: var(--gold-soft); color: var(--gold-2); }
.pill.green { background: rgba(61, 220, 151, 0.14); color: var(--green); }
.pill.red { background: rgba(255, 93, 108, 0.14); color: #ff8b96; }
.pill.orange { background: rgba(255, 173, 77, 0.14); color: var(--orange); }
.pill.blue { background: rgba(95, 180, 255, 0.14); color: var(--blue); }
.qty-step { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 12px; padding: 3px; direction: ltr; }
.qty-step button { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); }
.qty-step button:active { transform: scale(0.9); }
.qty-step span { min-width: 26px; text-align: center; font-weight: 700; }
.conn { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); display: inline-block; }
.conn.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
