/*
 * هوية Q BUZZ «جمر المطبخ»: مطبخ داكن وتذكرة طلب ورقية وتوهّج الجمر.
 * مستقلة عن هوية Q Products الرقمية عمداً (قرار المالك 2026-10-27، كحال قوالب Q Moment):
 * هوية المطاعم تختلف عن هوية الخدمات الرقمية. لون التمييز لكل مطعم عبر --accent على body.
 */
:root {
  --char: #16110e;
  --char2: #221813;
  --char3: #32241b;
  --line-d: #4a372a;
  --ember: #f0541e;
  --saffron: #ffb627;
  --bone: #f6ede3;
  --ticket: #fffaf0;
  --ink: #2b1d14;
  --muted-d: #b9a898;
  --muted-l: #7a6552;
  --ok: #3fbf7f;
  --danger: #ff7a68;
  --accent: var(--ember);
  --r: 18px;
  --display: 'Buzz Display', 'Plex Arabic', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plex Arabic', system-ui, sans-serif;
  background: var(--char) radial-gradient(1200px 520px at 15% -12%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%) no-repeat;
  color: var(--bone);
  line-height: 1.6;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
[hidden] { display: none !important; }
a { color: var(--saffron); }
h1, h2, h3 { font-weight: 700; margin: 0; }
/* خط العرض (Reem Kufi) للأرقام والختم فقط: نصوص العناوين العربية تبقى بخط Plex لوضوحها */

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; max-width: 1040px; margin: 0 auto; flex-wrap: wrap; }
.rest { font-size: 1.35rem; letter-spacing: .01em; }
.langs { display: flex; gap: 6px; }
.langs a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-d); color: var(--muted-d); text-decoration: none; font-size: .85rem; }
.langs a.on { background: var(--bone); color: var(--char); border-color: var(--bone); }
.brand { display: block; height: auto; }

/* ———— أزرار ———— */
.btn { font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; min-height: 46px; border-radius: 12px; border: 1px solid var(--line-d); background: var(--char2); color: var(--bone); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--bone); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--danger); border-color: #6b3a32; background: transparent; }
.btn.ok { border-color: var(--ok); color: var(--ok); }
.btn.small { padding: 8px 14px; min-height: 40px; font-size: .92rem; }
.btn.big { font-size: 1.15rem; padding: 14px 26px; }
.btn:disabled { opacity: .7; cursor: default; }
.inline { display: inline; margin: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.tip { color: var(--muted-d); font-size: .92rem; margin: 6px 0; }
.tip.warn { color: var(--saffron); font-weight: 500; }

/* ———— نماذج ———— */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
input, select, textarea { font: inherit; padding: 12px; border: 1px solid var(--line-d); border-radius: 10px; background: var(--char2); color: var(--bone); width: 100%; }
textarea { min-height: 96px; resize: vertical; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ———— البطاقات العامة (دخول وطلب الخدمة) ———— */
.panelcard { background: var(--char2); border: 1px solid var(--line-d); border-radius: var(--r); padding: 24px 20px; max-width: 520px; margin: 12px auto; }
.panelcard h2 { font-size: 1.4rem; margin-bottom: 14px; }

/* ———— تذكرة الزبون ———— */
.customer .card { position: relative; background: var(--ticket); color: var(--ink); border-radius: 8px 8px 0 0; max-width: 460px; margin: 10px auto 26px; padding: 26px 22px 34px; text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.customer .card::after { content: ''; position: absolute; inset-inline: 0; bottom: -10px; height: 10px;
  background: linear-gradient(135deg, var(--ticket) 50%, transparent 50%) 0 0 / 20px 20px repeat-x, linear-gradient(45deg, transparent 50%, var(--ticket) 50%) 0 0 / 20px 20px repeat-x; }
.customer .label { margin: 0; color: var(--muted-l); font-size: .95rem; letter-spacing: .08em; }
.customer .bignum { margin: 0; font-family: var(--display); font-size: 7.5rem; line-height: 1.05; color: var(--ink); }
.customer .status { font-weight: 700; font-size: 1.55rem; margin: 6px 0 16px; padding-bottom: 16px; border-bottom: 3px dashed #d8c7ac; }
.customer .tip { color: var(--muted-l); }
.customer .tip.warn { color: #a85a00; }
.customer .btn { background: #fff; color: var(--ink); border-color: #d8c7ac; }
.customer .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.customer .btn.ok { background: #e7f6ee; border-color: var(--ok); color: #19603c; }
.stamp { display: none; position: absolute; inset-inline-end: 14px; top: 78px; transform: rotate(-12deg); font-family: var(--display); font-size: 1.5rem; color: #1c7a47; border: 4px solid #1c7a47; border-radius: 10px; padding: 2px 14px; opacity: .92; }
.st-ready .stamp { display: block; animation: stampin .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stampin { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } }
.st-preparing .status { color: #a85a00; }
.st-ready .status { color: #1c7a47; }
.st-ready { background-color: #0f2a1b; background-image: radial-gradient(900px 520px at 50% -10%, rgba(255, 182, 39, .5), transparent 65%); animation: glow 1.6s ease-in-out infinite alternate; }
@keyframes glow { to { background-color: #14391f; } }
.st-cancelled .status, .st-collected .status { color: var(--muted-l); }
@media (prefers-reduced-motion: reduce) { .st-ready, .st-ready .stamp { animation: none; } }

.steps { list-style: none; display: flex; justify-content: space-between; gap: 6px; padding: 0; margin: 0 0 18px; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted-l); }
.steps .dot { width: 16px; height: 16px; border-radius: 50%; background: #e4d6bd; }
.steps li.done { color: var(--ink); font-weight: 700; }
.steps li.done .dot { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); }

.notify { padding-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.notify h2 { font-size: 1.05rem; margin: 0 0 4px; }
.inpage .row { margin-top: 8px; }
.privacy { text-align: center; color: var(--muted-d); font-size: .8rem; max-width: 460px; margin: 8px auto; }

.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted-d); padding: 22px 0 12px; direction: ltr; }

/* ———— لوحة الكاشير (شاشة مطبخ داكنة) ———— */
.stats { max-width: 1040px; margin: 0 auto 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--char2); border: 1px solid var(--line-d); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.stat b { font-family: var(--display); font-size: 1.7rem; line-height: 1.2; color: var(--saffron); }
.stat span { color: var(--muted-d); font-size: .8rem; }
.toolbar { max-width: 1040px; margin: 0 auto 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.board { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
@media (max-width: 760px) { .board { grid-template-columns: 1fr; } }
.col { background: var(--char2); border: 1px solid var(--line-d); border-top: 5px solid var(--line-d); border-radius: var(--r); padding: 12px; }
.col-new { border-top-color: var(--saffron); }
.col-preparing { border-top-color: var(--ember); }
.col-ready { border-top-color: var(--ok); }
.col h2 { font-size: 1.1rem; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.col .count { background: var(--bone); color: var(--char); border-radius: 999px; padding: 0 12px; font-size: .9rem; font-family: 'Plex Arabic', sans-serif; font-weight: 700; }
.ocard { background: var(--char3); border: 1px solid var(--line-d); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.onum { font-family: var(--display); font-size: 2.6rem; color: var(--bone); text-decoration: none; display: block; line-height: 1.15; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted-d); font-size: .85rem; margin: 2px 0 10px; }
.meta .ok { color: var(--ok); font-weight: 500; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.col-ready .btn.primary { background: var(--ok); border-color: var(--ok); color: #06240f; }

/* ———— صفحة الرمز (تذكرة تُطبع على ورق أبيض) ———— */
.qrcard { position: relative; background: var(--ticket); color: var(--ink); max-width: 420px; margin: 14px auto; padding: 24px 20px; border-radius: 12px; text-align: center; }
.qrcard .label { margin: 0; color: var(--muted-l); }
.qrcard .bignum { margin: 0; font-family: var(--display); font-size: 6rem; line-height: 1.05; }
.qrcard .qr { width: 240px; max-width: 70%; margin: 12px auto; background: #fff; padding: 8px; border-radius: 8px; }
.qrcard .qr svg { width: 100%; height: auto; display: block; }
.qrcard .tip { color: var(--muted-l); }
.qrcard .url { font-size: .75rem; word-break: break-all; color: var(--muted-l); }
.qrcard .btn { background: #fff; color: var(--ink); border-color: #d8c7ac; }
.qrcard .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media print {
  @page { size: 80mm auto; margin: 4mm; }
  body { background: #fff !important; color: #000; padding: 0; }
  .noprint, .foot { display: none !important; }
  .qrcard { box-shadow: none; max-width: none; margin: 0; padding: 0; background: #fff; }
  .qrcard .bignum { font-size: 4rem; }
  .qrcard .qr { width: 56mm; max-width: 100%; }
  .qrcard .rest { font-size: 1rem; }
}

/* ———— شاشة العرض على الكاونتر ———— */
.display { background: #0d0a08; }
.display .top { justify-content: center; gap: 20px; }
.display .rest { font-size: 2.2rem; }
.readygrid { max-width: 1280px; margin: 24px auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.rnum { background: var(--ok); color: #05210f; font-family: var(--display); font-size: 6rem; text-align: center; border-radius: 22px; padding: 14px; line-height: 1.1; }
.rnum.fresh { background: var(--saffron); animation: pop 1.1s ease-in-out 4; }
@keyframes pop { 50% { transform: scale(1.08); } }

/* ———— الصفحة التعريفية وطلب الخدمة ———— */
.site .wrap { max-width: 1040px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; padding: 28px 0 40px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.25; }
.hero h1 em { font-style: normal; color: var(--saffron); }
.hero p.lead { font-size: 1.15rem; color: var(--muted-d); max-width: 34em; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.mock { background: var(--ticket); color: var(--ink); border-radius: 8px 8px 0 0; padding: 22px; text-align: center; transform: rotate(-3deg); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); position: relative; max-width: 300px; margin-inline: auto; }
.mock::after { content: ''; position: absolute; inset-inline: 0; bottom: -10px; height: 10px; background: linear-gradient(135deg, var(--ticket) 50%, transparent 50%) 0 0 / 20px 20px repeat-x, linear-gradient(45deg, transparent 50%, var(--ticket) 50%) 0 0 / 20px 20px repeat-x; }
.mock .n { font-family: var(--display); font-size: 5.4rem; line-height: 1.05; }
.mock .s { font-weight: 700; font-size: 1.2rem; color: #1c7a47; border-top: 3px dashed #d8c7ac; padding-top: 10px; margin-top: 8px; }
.mock small { color: var(--muted-l); }
.sec { padding: 28px 0; border-top: 1px solid var(--line-d); }
.sec h2 { font-size: 1.7rem; margin-bottom: 16px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .cols3 { grid-template-columns: 1fr; } }
.tile { background: var(--char2); border: 1px solid var(--line-d); border-radius: var(--r); padding: 18px; }
.tile h3 { font-size: 1.15rem; margin-bottom: 6px; color: var(--saffron); }
.tile p { margin: 0; color: var(--muted-d); }
.sentok { text-align: center; }
.sentok h2 { color: var(--saffron); }
