:root {
  --bg: #f8fafc; --bg-card: #fff; --bg-sidebar: #0f172a; --bg-header: #fff;
  --text: #1e293b; --text-muted: #64748b; --text-sidebar: #cbd5e1;
  --border: #e2e8f0; --primary: #6366f1; --primary-hover: #4f46e5; --primary-light: #eef2ff;
  --success: #22c55e; --success-light: #dcfce7; --warning: #f59e0b; --warning-light: #fef3c7;
  --danger: #ef4444; --danger-light: #fee2e2; --info: #3b82f6; --info-light: #dbeafe;
  --shadow: 0 1px 3px rgba(0,0,0,.08); --shadow-lg: 0 10px 25px rgba(0,0,0,.15);
  --radius: 10px; --radius-sm: 6px; --radius-lg: 16px; --trans: .15s ease;
  --font: -apple-system,'Inter','Segoe UI',Roboto,sans-serif;
}
[data-theme="dark"] {
  --bg: #0f172a; --bg-card: #1e293b; --bg-sidebar: #020617; --bg-header: #1e293b;
  --text: #f1f5f9; --text-muted: #94a3b8; --border: #334155;
  --primary-light: #312e81; --success-light: #14532d; --warning-light: #78350f;
  --danger-light: #7f1d1d; --info-light: #1e3a8a;
  --shadow: 0 2px 6px rgba(0,0,0,.3); --shadow-lg: 0 10px 25px rgba(0,0,0,.5);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.5; min-height: 100vh;
  transition: background var(--trans), color var(--trans);
}
a { color: var(--primary); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: .5rem; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.w-full { width: 100%; }
.mt-2 { margin-top: .5rem; } .mb-2 { margin-bottom: .5rem; } .mt-4 { margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.2rem; border: none; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; white-space: nowrap; user-select: none;
  transition: background var(--trans), transform var(--trans);
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost   { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }

.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: .35rem; }
.form-control {
  width: 100%; padding: .65rem .9rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text);
  font-size: .95rem; -webkit-appearance: none; transition: border-color var(--trans);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.card-body { padding: 1.25rem; }

.badge { display: inline-flex; padding: .2rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-pending   { background: var(--warning-light); color: var(--warning); }
.badge-preparing { background: var(--info-light); color: var(--info); }
.badge-ready     { background: var(--success-light); color: var(--success); }
.badge-completed { background: var(--border); color: var(--text-muted); }
.badge-cancelled { background: var(--danger-light); color: var(--danger); }

#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .75rem 1.15rem; box-shadow: var(--shadow-lg); min-width: 240px; max-width: 380px;
  display: flex; align-items: center; gap: .65rem; font-size: .88rem;
  animation: slideIn .25s ease; pointer-events: auto;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }
.toast.warning { border-left: 4px solid var(--warning); }
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: fadeIn .15s ease; overflow-y: auto;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 500px; max-height: 92vh;
  display: flex; flex-direction: column;
  animation: scaleIn .2s ease;
}
@keyframes scaleIn { from{transform:scale(.95);opacity:0} to{transform:scale(1);opacity:1} }
.modal-header { padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.modal-body { padding: 1.25rem 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: .85rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; justify-content: flex-end; flex-shrink: 0; }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 1rem; }
[data-theme="dark"] .auth-page { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); }
.auth-card { background: var(--bg-card); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 2.25rem; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo .icon { font-size: 2.5rem; margin-bottom: .5rem; }
.auth-logo h1 { font-size: 1.4rem; color: var(--primary); }
.auth-logo p { color: var(--text-muted); font-size: .88rem; margin-top: .15rem; }

.app-layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 220px; background: var(--bg-sidebar); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo { color: #fff; font-weight: 800; font-size: 1rem; }
.sidebar-nav { flex: 1; padding: .5rem; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; margin: .15rem 0; color: var(--text-sidebar); font-size: .9rem; font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--trans), color var(--trans); }
.nav-item:hover  { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.sidebar-footer { padding: .5rem; border-top: 1px solid rgba(255,255,255,.08); }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { background: var(--bg-header); border-bottom: 1px solid var(--border); padding: .65rem 1.25rem; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.topbar-title { font-weight: 700; font-size: 1rem; }
.topbar-actions { display: flex; align-items: center; gap: .65rem; }
.page-content { flex: 1; overflow-y: auto; padding: 1.25rem; }

.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
th { font-weight: 700; color: var(--text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; background: var(--bg); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

.tva-radios { display: flex; gap: .5rem; flex-wrap: wrap; }
.tva-option { padding: .45rem 1rem; border-radius: var(--radius-sm); border: 2px solid var(--border); cursor: pointer; font-weight: 600; font-size: .85rem; user-select: none; transition: all var(--trans); }
.tva-option input { display: none; }
.tva-option:has(input:checked), .tva-option.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.tva-option:hover { border-color: var(--primary); }

.pos-layout { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }
.pos-main { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.pos-topbar { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: .6rem 1rem; display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.pos-topbar-title { font-weight: 800; font-size: 1rem; }
.pos-topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.pos-tabs { display: flex; background: var(--bg-card); border-bottom: 2px solid var(--border); flex-shrink: 0; overflow-x: auto; }
.pos-tab { flex: 1; min-width: 80px; padding: .65rem .5rem; text-align: center; font-size: .82rem; font-weight: 700; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; color: var(--text-muted); transition: all var(--trans); position: relative; white-space: nowrap; }
.pos-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-light); }
.tab-count { position: absolute; top: .2rem; right: .5rem; background: var(--danger); color: #fff; border-radius: 999px; font-size: .62rem; padding: .1rem .35rem; font-weight: 800; min-width: 16px; text-align: center; }

.pos-tab-view { flex: 1; overflow: hidden; display: flex; }
.pos-tab-view.hidden { display: none; }
.pos-tab-view.scrollable { overflow-y: auto; padding: 1rem; display: block; }

.pos-cats { width: 135px; background: var(--bg-sidebar); overflow-y: auto; flex-shrink: 0; padding: .5rem; display: flex; flex-direction: column; gap: .3rem; }
.pos-cat-btn { width: 100%; padding: .7rem .45rem; border: none; border-radius: var(--radius-sm); color: #fff; font-size: .72rem; font-weight: 700; cursor: pointer; text-align: center; min-height: 58px; line-height: 1.3; display: flex; align-items: center; justify-content: center; gap: .2rem; flex-direction: column; transition: transform var(--trans); }
.pos-cat-btn:active { transform: scale(.95); }
.pos-cat-btn.active { box-shadow: 0 0 0 3px rgba(255,255,255,.5) inset; }
.pos-cat-icon { font-size: 1.25rem; }

.pos-products { flex: 1; overflow-y: auto; padding: .65rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: .55rem; align-content: start; }
.product-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); padding: .65rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; user-select: none; position: relative; transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans); touch-action: manipulation; }
.product-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(99,102,241,.15); }
.product-card:active { transform: scale(.94); }
.product-img, .product-img-ph { width: 64px; height: 64px; border-radius: var(--radius-sm); }
.product-img { object-fit: cover; }
.product-img-ph { background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.product-name { font-size: .78rem; font-weight: 600; line-height: 1.3; }
.product-price { font-size: .92rem; font-weight: 800; color: var(--primary); }
.menu-badge { position: absolute; top: .25rem; right: .25rem; background: var(--success); color: #fff; font-size: .55rem; padding: .1rem .35rem; border-radius: 4px; font-weight: 700; }
.options-badge { position: absolute; top: .25rem; left: .25rem; background: var(--info); color: #fff; font-size: .55rem; padding: .1rem .35rem; border-radius: 4px; font-weight: 700; }

.search-bar { padding: .5rem .75rem; border-bottom: 1px solid var(--border); background: var(--bg-card); flex-shrink: 0; }
.search-bar input { width: 100%; padding: .45rem .85rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-size: .88rem; }
.search-bar input:focus { outline: none; border-color: var(--primary); }

.pos-cart { width: 320px; background: var(--bg-card); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.cart-header { padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-weight: 800; font-size: .95rem; display: flex; align-items: center; justify-content: space-between; }
.cart-items { flex: 1; overflow-y: auto; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; color: var(--text-muted); gap: .5rem; }
.cart-item { padding: .7rem .85rem; border-bottom: 1px solid var(--border); }
.cart-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .3rem; }
.cart-item-name { font-size: .85rem; font-weight: 700; flex: 1; line-height: 1.35; }
.cart-item-price { font-size: .85rem; font-weight: 800; white-space: nowrap; }
.cart-item-options { font-size: .72rem; color: var(--text-muted); line-height: 1.5; margin-bottom: .3rem; }
.cart-item-options .opt-group { font-weight: 600; color: var(--text); }
.qty-ctrl { display: flex; align-items: center; gap: .25rem; }
.qty-btn { width: 26px; height: 26px; border: 1.5px solid var(--border); border-radius: 50%; background: var(--bg); font-size: .95rem; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--trans); }
.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.qty-val { font-size: .88rem; font-weight: 700; min-width: 20px; text-align: center; }
.cart-footer { padding: .9rem; border-top: 1px solid var(--border); }
.cart-meta { display: flex; gap: .4rem; margin-bottom: .6rem; }
.cart-meta .form-control { font-size: .82rem; padding: .4rem .65rem; }
.total-row { display: flex; justify-content: space-between; font-size: .85rem; padding: .1rem 0; }
.total-row.final { font-size: 1.1rem; font-weight: 800; border-top: 2px solid var(--border); padding-top: .5rem; margin-top: .4rem; }
.cart-totals { margin-bottom: .75rem; }
.place-order-btn { width: 100%; padding: .9rem; font-size: 1rem; font-weight: 800; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; transition: background var(--trans); }
.place-order-btn:hover:not(:disabled) { background: var(--primary-hover); }
.place-order-btn:active { transform: scale(.98); }
.place-order-btn:disabled { opacity: .5; cursor: not-allowed; }

.option-modal .modal { max-width: 580px; }
.option-desc { color: var(--text-muted); font-size: .88rem; margin-bottom: 1rem; line-height: 1.5; padding: .75rem; background: var(--bg); border-radius: var(--radius-sm); }
.option-group-section { margin-bottom: 1.25rem; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.option-group-section.error { border-color: var(--danger); background: var(--danger-light); }
.option-group-title { font-weight: 700; font-size: .95rem; margin-bottom: .15rem; display: flex; justify-content: space-between; align-items: center; }
.option-group-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: .65rem; }
.option-group-required { color: var(--danger); font-weight: 700; }
.option-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: .4rem; }
.option-item { display: flex; align-items: center; gap: .55rem; padding: .55rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: .85rem; background: var(--bg-card); user-select: none; transition: all var(--trans); }
.option-item:hover { border-color: var(--primary); }
.option-item.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }
.option-item input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.option-item .opt-name { flex: 1; }
.option-item .opt-price { font-weight: 700; font-size: .78rem; white-space: nowrap; color: var(--text-muted); }
.option-item.selected .opt-price { color: var(--primary); }

.menu-upgrade-section { background: linear-gradient(135deg, var(--success-light), var(--info-light)); border: 2px solid var(--success); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .75rem; cursor: pointer; }
.menu-upgrade-section label { flex: 1; cursor: pointer; }
.menu-upgrade-title { font-weight: 700; }
.menu-upgrade-desc { font-size: .82rem; color: var(--text-muted); }
.menu-upgrade-section input { width: 20px; height: 20px; accent-color: var(--success); cursor: pointer; }

.order-card { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .6rem; cursor: pointer; transition: border-color var(--trans), box-shadow var(--trans); }
.order-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(99,102,241,.1); }
.order-card.ready { border-color: var(--success); background: var(--success-light); animation: readyPulse 2s ease-in-out infinite; }
@keyframes readyPulse { 0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.3)} 50%{box-shadow:0 0 0 8px rgba(34,197,94,0)} }
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.order-card-num { font-weight: 800; font-size: .95rem; }
.order-card-summary { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.order-card-time { font-size: .72rem; color: var(--text-muted); margin-top: .2rem; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.report-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.report-num { font-size: 1.85rem; font-weight: 900; color: var(--primary); }
.report-label { font-size: .78rem; color: var(--text-muted); margin-top: .25rem; }
.report-revenue { color: var(--success); }

.kitchen-layout { display: flex; flex-direction: column; height: 100vh; background: #0f172a; color: #f1f5f9; overflow: hidden; }
.kitchen-header { background: #1e293b; padding: .85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #334155; flex-shrink: 0; gap: 1rem; flex-wrap: wrap; }
.kitchen-title { font-size: 1.25rem; font-weight: 900; color: #fff; }
.kitchen-stats { display: flex; gap: .5rem; flex-wrap: wrap; }
.stat-pill { background: rgba(255,255,255,.08); border-radius: 6px; padding: .3rem .75rem; font-size: .78rem; color: #94a3b8; white-space: nowrap; }
.stat-pill strong { color: #fff; }
.kitchen-orders { flex: 1; overflow-y: auto; padding: 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1rem; align-content: start; }
.kitchen-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; color: #475569; gap: 1rem; }
.kitchen-card { background: #1e293b; border-radius: 14px; border: 2px solid #334155; display: flex; flex-direction: column; max-height: 520px; }
.kitchen-card.pending   { border-color: #f59e0b; }
.kitchen-card.preparing { border-color: #3b82f6; }
.kitchen-card.ready     { border-color: #22c55e; box-shadow: 0 0 20px rgba(34,197,94,.15); }
.kitchen-card-header { padding: .85rem 1rem; border-radius: 12px 12px 0 0; display: flex; justify-content: space-between; align-items: flex-start; flex-shrink: 0; }
.kitchen-card.pending .kitchen-card-header   { background: rgba(245,158,11,.12); }
.kitchen-card.preparing .kitchen-card-header { background: rgba(59,130,246,.12); }
.kitchen-card.ready .kitchen-card-header     { background: rgba(34,197,94,.12); }
.kitchen-order-num { font-size: 1.15rem; font-weight: 900; color: #fff; }
.kitchen-time { font-size: .72rem; color: #64748b; margin-top: .15rem; }
.table-badge { background: rgba(255,255,255,.1); border-radius: 4px; padding: .15rem .5rem; font-size: .72rem; color: #94a3b8; }
.kitchen-card-body { padding: .75rem 1rem; overflow-y: auto; flex: 1; }
.kitchen-card-body::-webkit-scrollbar { width: 4px; }
.kitchen-card-body::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
.kitchen-item { padding: .55rem 0; border-bottom: 1px solid #334155; }
.kitchen-item:last-child { border-bottom: none; }
.kitchen-item-name { font-size: .95rem; font-weight: 700; color: #f1f5f9; }
.kitchen-item-qty { font-size: 1.2rem; font-weight: 900; color: #818cf8; white-space: nowrap; }
.kitchen-item-opts { font-size: .78rem; color: #94a3b8; margin-top: .25rem; line-height: 1.5; }
.kitchen-item-opts .opt-group { color: #cbd5e1; font-weight: 600; }
.kitchen-note { margin-top: .5rem; background: rgba(245,158,11,.1); border-radius: 6px; padding: .4rem .6rem; font-size: .82rem; color: #f59e0b; }
.kitchen-card-footer { padding: .75rem 1rem; border-top: 1px solid #334155; flex-shrink: 0; border-radius: 0 0 12px 12px; }
.kitchen-action { width: 100%; padding: .7rem 1rem; border-radius: 8px; border: none; font-size: .95rem; font-weight: 700; cursor: pointer; transition: transform .1s; }
.kitchen-action:active { transform: scale(.97); }
.ka-prep { background: #3b82f6; color: #fff; }
.ka-prep:hover { background: #2563eb; }
.ka-ready { background: #22c55e; color: #fff; }
.ka-ready:hover { background: #16a34a; }
.ka-label { background: rgba(34,197,94,.1); color: #22c55e; text-align: center; cursor: default; }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.conn-dot.offline { background: #ef4444; animation: connPulse 1s infinite; }
@keyframes connPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.clock { font-size: 1rem; font-weight: 700; color: #94a3b8; font-variant-numeric: tabular-nums; }
.profile-trigger { display: flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: .4rem .8rem; cursor: pointer; color: #cbd5e1; font-size: .85rem; }
.profile-trigger:hover { background: rgba(255,255,255,.13); }
#profile-modal .modal { background: #1e293b; border: 1px solid #334155; color: #f1f5f9; max-width: 380px; }
#profile-modal .modal-header, #profile-modal .modal-footer { border-color: #334155; }
#profile-modal .form-control { background: #0f172a; border-color: #334155; color: #f1f5f9; }
#profile-modal .form-label { color: #94a3b8; }
.lang-pills { display: flex; gap: .5rem; }
.lang-pill { padding: .4rem .9rem; border-radius: 6px; border: 1.5px solid #334155; background: transparent; color: #94a3b8; cursor: pointer; font-weight: 600; font-size: .85rem; transition: all var(--trans); }
.lang-pill.active { border-color: var(--primary); background: #312e81; color: #a5b4fc; }
.sound-unlock { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; color: #fff; text-align: center; padding: 2rem; }

.notif-banner { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 9999; background: var(--success); color: #fff; padding: .9rem 1.5rem; border-radius: var(--radius); font-weight: 700; box-shadow: 0 8px 24px rgba(34,197,94,.4); cursor: pointer; display: flex; align-items: center; gap: .75rem; animation: notifIn .3s ease; }
@keyframes notifIn { from{transform:translateX(-50%) translateY(-60px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }

@media print {
  .no-print { display: none !important; }
  body, .modal-overlay, .modal { background: #fff !important; color: #000 !important; }
  .receipt { font-family: 'Courier New', monospace; font-size: 11px; }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; color: var(--text-muted); text-align: center; gap: .75rem; }
.empty-state .icon { font-size: 3rem; }

.color-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: middle; margin-right: .4rem; border: 1px solid var(--border); }
.actions-cell { display: flex; gap: .35rem; flex-wrap: wrap; }
.tabs-admin { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-admin-btn { padding: .65rem 1rem; border: none; background: none; color: var(--text-muted); font-weight: 600; font-size: .9rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: color var(--trans), border-color var(--trans); }
.tab-admin-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

@media (max-width: 900px) { .pos-cart { width: 280px; } }
@media (max-width: 700px) {
  .sidebar { width: 70px; }
  .pos-cats { width: 72px; }
  .pos-cat-btn { font-size: .6rem; padding: .5rem .2rem; min-height: 48px; }
  .pos-cart { width: 230px; }
  .pos-products { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .product-img, .product-img-ph { width: 52px; height: 52px; }
  .kitchen-orders { grid-template-columns: 1fr; }
}
