/* تطبيق الويتر: شاشات لمس (آيباد أولًا ثم الجوال) - أزرار كبيرة، بلا تكبير بالنقر المزدوج */
html, body { margin: 0; padding: 0; background: #f1f5f9; font-family: Tahoma, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
* { box-sizing: border-box; }
button { font-family: inherit; touch-action: manipulation; }
.waiter-shell { min-height: 100vh; min-height: 100dvh; }
.waiter-muted { color: #94a3b8; font-size: .8rem; }

.waiter-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 12px; color: #475569; }
.waiter-spinner { width: 40px; height: 40px; border: 4px solid #c7d2fe; border-top-color: #4f46e5; border-radius: 50%; animation: waiter-spin 1s linear infinite; }
@keyframes waiter-spin { to { transform: rotate(360deg); } }

#blazor-error-ui { display: none; position: fixed; bottom: 0; inset-inline: 0; padding: 12px; background: #fef2f2; color: #991b1b; z-index: 2000; text-align: center; }
#blazor-error-ui .reload { margin-inline-start: 12px; color: #4f46e5; }

.waiter-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 16px; }
.waiter-center-inline { display: flex; justify-content: center; padding: 32px 16px; }
.waiter-card { width: min(420px, 100%); border-radius: 18px !important; }
.waiter-card-wide { width: min(620px, 100%); }
.waiter-logo { font-size: 48px; text-align: center; }

.waiter-install { width: min(620px, 100%); background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; color: #3730a3; }
.waiter-install .row { display: flex; align-items: center; gap: 10px; }
.waiter-install .txt { flex: 1; font-size: .85rem; line-height: 1.6; }
.waiter-install .steps { margin: 8px 0 0; padding-inline-start: 20px; font-size: .85rem; line-height: 1.9; }

.waiter-code-input { width: 100%; font-size: 2rem; letter-spacing: .3em; text-align: center; padding: 12px; border: 2px solid #c7d2fe; border-radius: 12px; text-transform: uppercase; font-family: Consolas, monospace; outline: none; }
.waiter-code-input:focus { border-color: #4f46e5; }

.waiter-staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.waiter-staff-btn { padding: 18px 8px; border-radius: 14px; border: 2px solid #e2e8f0; background: white; font-size: 1.05rem; font-weight: bold; cursor: pointer; }
.waiter-staff-btn:active { background: #eef2ff; border-color: #4f46e5; }

.waiter-pin-dots { display: flex; justify-content: center; gap: 12px; margin: 8px 0 16px; }
.waiter-pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #4f46e5; }
.waiter-pin-dots span.on { background: #4f46e5; }
.waiter-pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; direction: ltr; }
.waiter-pinpad button { height: 64px; font-size: 1.6rem; border-radius: 14px; border: 1px solid #e2e8f0; background: white; cursor: pointer; }
.waiter-pinpad button:active { background: #e0e7ff; }
.waiter-pinpad button.ok { background: #4f46e5; color: white; border-color: #4f46e5; }
.waiter-pinpad button.del { background: #f8fafc; }

.waiter-topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); background: #4f46e5; color: white; }
.waiter-topbar-title { display: flex; flex-direction: column; line-height: 1.2; }
.waiter-topbar-title .waiter-muted { color: #c7d2fe; }
.waiter-page { padding: 12px 16px 32px; }

.waiter-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.waiter-table, .waiter-order-card { border-radius: 16px; padding: 14px 10px; min-height: 120px; text-align: center; border: 2px solid #e2e8f0; background: white; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.waiter-table .name, .waiter-order-card .name { font-size: 1.25rem; font-weight: bold; }
.waiter-table .sub, .waiter-order-card .sub { color: #64748b; font-size: .8rem; }
.waiter-table .amount, .waiter-order-card .amount { font-weight: bold; font-size: 1.05rem; }
.waiter-table.busy, .waiter-order-card.busy { border-color: #f59e0b; background: #fffbeb; }
.waiter-table.bill, .waiter-order-card.bill { border-color: #8b5cf6; background: #f5f3ff; }
.waiter-table.locked, .waiter-order-card.locked { border-color: #ef4444; background: #fef2f2; }
.waiter-orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.waiter-order-card { min-height: 100px; border-color: #c7d2fe; background: #eef2ff; }

.waiter-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }
.waiter-badges .badge { font-size: .7rem; border-radius: 8px; padding: 1px 6px; }
.waiter-badges .badge.locked { background: #fee2e2; color: #b91c1c; }
.waiter-badges .badge.bill { background: #ede9fe; color: #6d28d9; }
.waiter-badges .badge.prep { background: #fef3c7; color: #b45309; }

.waiter-order-layout { display: flex; gap: 12px; padding: 12px; align-items: flex-start; flex-wrap: wrap; }
.waiter-menu { flex: 1 1 420px; min-width: 0; }
.waiter-cart { flex: 0 1 380px; width: 100%; background: white; border-radius: 16px; padding: 12px; border: 1px solid #e2e8f0; position: sticky; top: 64px; max-height: calc(100dvh - 80px); display: flex; flex-direction: column; }
@media (max-width: 820px) { .waiter-cart { position: static; max-height: none; flex-basis: 100%; } }

.waiter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.waiter-chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.waiter-chips .chip { white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1px solid #c7d2fe; background: white; color: #3730a3; font-size: .9rem; cursor: pointer; }
.waiter-chips .chip.on { background: #4f46e5; color: white; border-color: #4f46e5; }
.waiter-chips .chip.on.alt { background: #f59e0b; border-color: #f59e0b; }
.waiter-chips .chip:disabled { opacity: .4; }
.waiter-chips .chip .num { margin-inline-start: 6px; font-weight: bold; }

.waiter-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.waiter-product { min-height: 92px; border-radius: 14px; border: 1px solid #e2e8f0; background: white; padding: 10px 8px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; text-align: center; }
.waiter-product:active { background: #eef2ff; }
.waiter-product:disabled { opacity: .5; }
.waiter-product .name { font-weight: bold; font-size: .95rem; }
.waiter-product .price { color: #4f46e5; font-weight: bold; }

.waiter-lines { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.waiter-empty { color: #94a3b8; text-align: center; padding: 24px 8px; }
.waiter-line { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 6px; }
.waiter-line.new { background: #f0fdf4; border-radius: 10px; padding: 6px; border-bottom: none; }
.waiter-line .main { flex: 1; min-width: 0; }
.waiter-line .name { font-weight: bold; }
.waiter-line .addon { color: #475569; font-size: .85rem; margin-inline-start: 10px; }
.waiter-line .note { color: #b45309; font-size: .85rem; }
.waiter-line .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.waiter-line .status { font-size: .75rem; border-radius: 8px; padding: 1px 6px; white-space: nowrap; }
.waiter-line .status.draft { background: #f1f5f9; color: #475569; }
.waiter-line .status.prep { background: #fef3c7; color: #b45309; }
.waiter-line .status.sent { background: #dcfce7; color: #15803d; }
.waiter-line .status.new { background: #dbeafe; color: #1d4ed8; }

.waiter-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.15rem; padding: 10px 0; border-top: 2px solid #e2e8f0; margin-top: 8px; }
.waiter-actions { padding-bottom: env(safe-area-inset-bottom); }

.waiter-qty { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0; direction: ltr; }
.waiter-qty button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid #c7d2fe; background: white; font-size: 1.5rem; cursor: pointer; }
.waiter-qty span { font-size: 1.6rem; font-weight: bold; min-width: 40px; text-align: center; }
.waiter-qty.small { gap: 6px; margin: 0; }
.waiter-qty.small button { width: 32px; height: 32px; font-size: 1.1rem; border-radius: 8px; }
.waiter-qty.small span { font-size: 1rem; min-width: 24px; }

.waiter-dialog { display: flex; flex-direction: column; gap: 12px; }
.waiter-dialog-section .title { font-weight: bold; margin-bottom: 6px; }
.waiter-price-big { color: #4f46e5; font-size: 1.4rem; font-weight: bold; }
