/* Shared chrome for staff apps: Restaurant, Rider, Admin */
.staff-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(circle at 15% 10%, rgba(253,210,3,.22) 0, transparent 40%),
  radial-gradient(circle at 90% 90%, rgba(253,210,3,.10) 0, transparent 40%), var(--fb-black); }
.staff-login .panel { width: 100%; max-width: 400px; background: #fff; border-radius: 26px; padding: 26px 22px; box-shadow: var(--fb-shadow-3); }
.staff-login .head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 20px; }
.staff-login .head img { width: 120px; height: auto; margin-top: -70px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.app-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--fb-black); color: var(--fb-yellow); border-radius: var(--fb-r-pill); padding: 4px 12px; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.demo-creds { margin-top: 16px; background: var(--fb-yellow-wash); border: 1.5px dashed var(--fb-amber); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.demo-creds button { background: none; border: 0; padding: 2px 0; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

.staffbar { background: var(--fb-black); color: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; }
.staffbar img { width: 38px; height: 38px; border-radius: 10px; background: var(--fb-yellow); object-fit: cover; }
.staffbar .title { font-family: var(--fb-font-display); font-weight: 800; font-size: 18px; line-height: 1.1; }
.staffbar .sub { font-size: 12px; color: rgba(255,255,255,.65); }
.staffbar .icon-btn { color: #fff; }
.staffbar .icon-btn:hover { background: rgba(255,255,255,.1); }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.7); }
.conn .dot { background: #9A958F; }
.conn.on .dot { background: var(--fb-yellow); box-shadow: 0 0 0 3px rgba(253,210,3,.25); }

.tabs { display: flex; gap: 4px; padding: 8px 12px 0; background: var(--fb-black); overflow-x: auto; scrollbar-width: none; position: sticky; top: 58px; z-index: 29; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; color: rgba(255,255,255,.65); font-weight: 800; padding: 10px 14px 12px; border-radius: 12px 12px 0 0; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.tabs button.on { background: var(--fb-bg); color: var(--fb-black); }
.tabs .count { background: var(--fb-red); color: var(--fb-yellow); border-radius: var(--fb-r-pill); padding: 0 7px; font-size: 12px; min-width: 20px; text-align: center; }
.tabs button.on .count { background: var(--fb-black); color: var(--fb-yellow); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--fb-line); border-radius: 16px; padding: 12px 14px; }
.stat .k { font-size: 12px; font-weight: 800; color: var(--fb-ink-3); text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-family: var(--fb-font-display); font-weight: 800; font-size: 24px; margin-top: 2px; }
.stat.hl { background: var(--fb-yellow); border-color: var(--fb-black); box-shadow: 0 3px 0 var(--fb-black); }
.stat.hl .k { color: rgba(19,18,19,.7); }
.stat.dark { background: var(--fb-black); color: #fff; border-color: var(--fb-black); }
.stat.dark .k { color: rgba(255,255,255,.6); }
.stat.dark .v { color: var(--fb-yellow); }

.ticket { background: #fff; border-radius: 20px; border: 1px solid var(--fb-line); box-shadow: var(--fb-shadow-1); overflow: hidden; }
.ticket.new { border: 2px solid var(--fb-red); box-shadow: 0 0 0 4px var(--fb-red-soft), var(--fb-shadow-2); animation: fbring 1.6s infinite; }
@keyframes fbring { 50% { box-shadow: 0 0 0 8px rgba(253,210,3,.35), var(--fb-shadow-2); } }
.ticket-head { padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1.5px dashed var(--fb-line-2); }
.ticket-head .code { font-family: var(--fb-font-display); font-weight: 800; font-size: 18px; }
.ticket-body { padding: 12px 14px; }
.ticket-items .it { display: flex; gap: 10px; padding: 3px 0; }
.ticket-items .q { font-weight: 800; min-width: 30px; }
.ticket-foot { padding: 12px 14px; display: flex; gap: 8px; background: #FCFBF8; border-top: 1px solid var(--fb-line); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; }
.timer.late { color: var(--fb-red); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.grid-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 400px) { .grid-tickets { grid-template-columns: 1fr; } }

/* ---------- Restaurant order ticket (full detail) ---------- */
.tk-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--fb-black); color: #fff; }
.ticket.new .tk-head { background: var(--fb-yellow); color: var(--fb-black); }
.tk-code { font-family: var(--fb-font-display); font-weight: 800; font-size: 22px; letter-spacing: .02em; line-height: 1.05; }
.tk-sub { font-size: 12px; opacity: .72; font-weight: 600; margin-top: 2px; }
.tk-head .icon-btn { color: inherit; flex: none; }
.tk-head .icon-btn:hover { background: rgba(255,255,255,.12); }
.tk-clock { text-align: center; min-width: 64px; border-radius: 14px; padding: 6px 8px; background: var(--fb-yellow); color: var(--fb-black); }
.tk-clock .v { font-family: var(--fb-font-display); font-weight: 800; font-size: 24px; line-height: 1; }
.tk-clock .k { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.tk-clock.soon { animation: fbblink 1s steps(2) infinite; }
.tk-clock.late { background: #fff; box-shadow: inset 0 0 0 3px var(--fb-yellow); animation: fbblink .8s steps(2) infinite; }
@keyframes fbblink { 50% { opacity: .55; } }

.tk-flow { list-style: none; margin: 0; padding: 10px 12px 8px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: #FCFBF8; border-bottom: 1px solid var(--fb-line); }
.tk-flow li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; position: relative; }
.tk-flow li::before { content: ''; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: var(--fb-line-2); z-index: 0; }
.tk-flow li:first-child::before { display: none; }
.tk-flow li.done::before, .tk-flow li.now::before { background: var(--fb-black); }
.tk-flow .b { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--fb-line-2); position: relative; z-index: 1; }
.tk-flow li.done .b { background: var(--fb-black); border-color: var(--fb-black); }
.tk-flow li.now .b { background: var(--fb-yellow); border-color: var(--fb-black); box-shadow: 0 0 0 3px rgba(253,210,3,.4); }
.tk-flow .l { font-size: 11px; font-weight: 800; color: var(--fb-ink-3); }
.tk-flow li.done .l, .tk-flow li.now .l { color: var(--fb-black); }
.tk-flow .t { font-size: 10px; color: var(--fb-ink-3); min-height: 12px; }

.tk-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tk-cust { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tk-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #F3F1EC; color: var(--fb-black); white-space: nowrap; }
.tk-tag.first { background: var(--fb-yellow-soft, #FFF4BF); }
.tk-tag.cash { background: var(--fb-black); color: var(--fb-yellow); }
.tk-tag.paid { background: var(--fb-yellow); color: var(--fb-black); }

.tk-items-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--fb-ink-3); padding-bottom: 6px; border-bottom: 2px solid var(--fb-black); }
.tk-items { list-style: none; margin: 0; padding: 0; }
.tk-items li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--fb-line-2); }
.tk-items .q { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--fb-yellow); border: 2px solid var(--fb-black); font-family: var(--fb-font-display); font-weight: 800; font-size: 17px; }
.tk-items .n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-items .nm { font-weight: 800; font-size: 15px; line-height: 1.25; }
.tk-items .u { font-size: 12px; color: var(--fb-ink-3); }
.tk-items .lt { font-weight: 800; white-space: nowrap; }

.tk-note { margin-top: 12px; border-radius: 14px; background: var(--fb-black); color: #fff; padding: 10px 12px; }
.tk-note .k { display: flex; align-items: center; gap: 6px; color: var(--fb-yellow); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.tk-note .v { font-weight: 700; margin-top: 4px; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }

.tk-money { margin-top: 12px; border-radius: 14px; border: 1px solid var(--fb-line); padding: 8px 12px; }
.tk-money .r { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.tk-money .r.earn { margin-top: 4px; padding-top: 8px; border-top: 1.5px dashed var(--fb-line-2); font-weight: 800; font-size: 16px; }
.tk-money .r.earn .num { background: var(--fb-yellow); padding: 0 8px; border-radius: 8px; }

.tk-deliv { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #FCFBF8; border: 1px solid var(--fb-line); font-size: 14px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Kitchen slip printing ---------- */
.print-slip { display: none; }
@media print {
  body.printing > *:not(.print-slip) { display: none !important; }
  body.printing { background: #fff !important; }
  body.printing .print-slip { display: block; width: 72mm; margin: 0 auto; font: 13px/1.35 ui-monospace, Menlo, Consolas, monospace; color: #000; }
  .print-slip hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
  .print-slip table { width: 100%; border-collapse: collapse; }
  .print-slip td { vertical-align: top; padding: 1px 0; }
  .print-slip td.q { width: 34px; font-weight: 700; }
  .print-slip td.a { text-align: right; white-space: nowrap; }
  .print-slip tr.b td { font-weight: 700; font-size: 15px; }
  .ps-brand { text-align: center; font-weight: 800; font-size: 18px; letter-spacing: .1em; }
  .ps-code { text-align: center; font-weight: 800; font-size: 26px; margin: 4px 0; }
  .ps-c { text-align: center; }
  .ps-note { margin-top: 6px; border: 1.5px solid #000; padding: 4px 6px; font-weight: 700; }
}
.size-row { display: grid; grid-template-columns: 1fr 110px 40px; gap: 8px; align-items: center; }
.size-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.size-chips span { font-size: 11.5px; background: #F3F1EC; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.size-chips b { color: var(--fb-black); }
