* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #0f172a; color: #e2e8f0; }
a { color: inherit; text-decoration: none; }

.auth-wrapper { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 24px; }
.auth-card-wide { max-width: 560px; }
.auth-card h1 { margin: 0 0 6px; }
.auth-card p { margin: 0 0 16px; color: #94a3b8; }
.auth-link { margin-top: 16px; text-align: center; }
.auth-link a { color: #818cf8; font-weight: 700; }
.error-text { color: #fecaca; font-size: 12px; }

.form-stack { display: grid; gap: 10px; }
label { font-size: 14px; color: #cbd5e1; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #475569; background: #0f172a; color: #e2e8f0; }
textarea { resize: vertical; min-height: 90px; }

.btn { border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.btn-small { padding: 7px 10px; font-size: 13px; }
.btn-primary { background: #4f46e5; color: #fff; }
.btn-secondary { background: #334155; color: #e2e8f0; }
.btn-danger { background: #ef4444; color: #fff; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { border-right: 1px solid #334155; padding: 16px 14px; background: #111827; }
.brand { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a,
.nav-group summary { display: block; padding: 10px 12px; border-radius: 10px; color: #cbd5e1; }
.nav-group summary { cursor: pointer; font-weight: 700; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group { display: grid; gap: 5px; }
.nav-group[open] { border-radius: 12px; background: rgba(15,23,42,.55); padding-bottom: 6px; }
.nav-group a { margin-left: 10px; padding: 8px 10px; font-size: 14px; }
.sidebar nav a:hover,
.nav-group summary:hover { background: #1f2937; color: #fff; }
.sidebar nav a.active,
.nav-group summary.active { background: linear-gradient(135deg, #4f46e5, #2563eb); color: #fff; box-shadow: 0 10px 24px rgba(79,70,229,.22); }

.topbar { height: 64px; border-bottom: 1px solid #334155; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: #0b1220; }
.page-content { padding: 18px; display: grid; gap: 16px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.page-header h1 { margin: 0 0 4px; }
.page-header p { margin: 0; color: #94a3b8; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; border: 1px solid #334155; border-radius: 12px; padding: 12px; background: #1e293b; }
.form-group { display: grid; gap: 6px; }
.grow-field { flex: 1 1 280px; }
.form-card { display: grid; gap: 14px; }
.content-grid { display: grid; gap: 14px; }
.two-columns { grid-template-columns: 1.5fr .8fr; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-header h2 { margin: 0; font-size: 18px; }

.grid-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 16px; display: grid; gap: 8px; }
.stat-card span { color: #94a3b8; }
.stat-card strong { font-size: 24px; color: #fff; }
.card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 16px; }
.muted { margin: 4px 0 0; color: #94a3b8; }
.small { font-size: 12px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: #334155; color: #cbd5e1; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-primary { background: #312e81; color: #c4b5fd; }
.badge-neutral { background: #334155; color: #cbd5e1; }
.badge-success { background: #14532d; color: #86efac; }
.badge-danger { background: #7f1d1d; color: #fecaca; }
.table-wrap, .table-responsive { overflow: auto; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab-link, .tab { border: 1px solid #334155; border-radius: 999px; padding: 8px 12px; color: #cbd5e1; background: #0f172a; }
.tab-link.active, .tab-link:hover, .tab.active, .tab:hover { border-color: #6366f1; background: #312e81; color: #fff; }
.filter-row { display: grid; grid-template-columns: 1fr 220px auto; gap: 10px; margin-bottom: 12px; }
.inline-form { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; margin-bottom: 12px; }
.table-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.table-form input, .table-form select { width: auto; min-width: 140px; }
.table-form .compact-input { min-width: 90px; max-width: 120px; }
.table-session-summary { display: grid; gap: 3px; min-width: 150px; }
.table-session-summary span,
.table-session-summary small { color: var(--muted); font-size: 12px; }
.table-session-open-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.table-session-open-form input { min-width: 90px; max-width: 130px; padding: 8px 10px; }
.compact-card { border: 1px dashed #475569; border-radius: 12px; padding: 12px; margin-bottom: 14px; background: #0f172a; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.span-2 { grid-column: span 2; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 8px; }
.checkbox-inline input { width: auto; }
.field-checks { align-content: end; gap: 10px; }
.field-checks label { display: flex; align-items: center; gap: 8px; }
.field-checks input { width: auto; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 4px 0; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
.settings-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-row { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #334155; background: #0f172a; border-radius: 10px; padding: 10px 12px; }
.check-row input { width: auto; }
.bundle-panel, .bundle-box, .modifier-panel { margin-top: 16px; border: 1px dashed #475569; border-radius: 12px; padding: 14px; background: #0f172a; }
.bundle-panel[hidden], .bundle-box[hidden] { display: none; }
.bundle-items { display: grid; gap: 10px; }
.bundle-row, .bundle-item { display: grid; grid-template-columns: 1fr 140px auto; gap: 10px; align-items: center; }
.modifier-items { display: grid; gap: 10px; }
.modifier-row { display: grid; grid-template-columns: minmax(180px, 1fr) 150px 150px 120px auto; gap: 10px; align-items: end; }
.modifier-active { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; }
.modifier-active input { width: auto; }
.action-row { display: flex; align-items: center; gap: 8px; }
.action-row form { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #334155; text-align: left; padding: 10px 8px; }
th { color: #94a3b8; font-size: 13px; }

.pos-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.pos-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.pos-branch-form { min-width: 260px; display: grid; gap: 6px; }
.shift-open-box { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; align-items: end; margin-bottom: 14px; border: 1px dashed #475569; border-radius: 12px; padding: 12px; background: #0f172a; }
.barcode-scan-box { display: grid; gap: 7px; margin-bottom: 12px; border: 1px dashed #475569; border-radius: 12px; padding: 12px; background: #0f172a; }
.barcode-scan-box label { color: #bfdbfe; font-size: 13px; font-weight: 800; }
.barcode-scan-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.pos-filter-row { grid-template-columns: 1fr 220px auto; }
.product-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.product-item { border: 1px solid #334155; background: #0f172a; border-radius: 10px; padding: 10px; color: #e2e8f0; text-align: left; cursor: pointer; display: grid; gap: 4px; }
.product-item:hover { border-color: #4f46e5; }
.restaurant-product-card strong { color: #fbbf24; }
.restaurant-product-card em { width: fit-content; border-radius: 999px; padding: 3px 7px; background: #312e81; color: #c4b5fd; font-size: 11px; font-style: normal; }
.cart-items { min-height: 240px; max-height: 50vh; overflow: auto; display: grid; gap: 8px; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; border: 1px solid #334155; border-radius: 10px; padding: 10px; }
.cart-row-main { display: grid; gap: 4px; }
.cart-row-note { grid-column: 1 / -1; color: #93c5fd; font-size: 12px; background: rgba(59,130,246,.09); border: 1px solid rgba(147,197,253,.18); border-radius: 10px; padding: 7px 9px; }
.qty-control { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #475569; border-radius: 999px; padding: 4px; }
.qty-control button, .cart-remove { border: 0; color: #fff; background: #334155; border-radius: 999px; min-width: 26px; height: 26px; cursor: pointer; }
.cart-remove { background: #7f1d1d; }
.cart-total { margin: 12px 0; }
.cart-summary { display: grid; gap: 8px; margin: 14px 0; border-top: 1px solid #334155; border-bottom: 1px solid #334155; padding: 12px 0; }
.cart-summary div, .cart-change { display: flex; justify-content: space-between; gap: 10px; }
.checkout-button { width: 100%; margin-top: 12px; }
.pos-message { min-height: 22px; margin-top: 10px; color: #cbd5e1; }
.pos-message.success { color: #86efac; }
.pos-message.error { color: #fecaca; }
.pos-receipt-link { margin-left: 8px; color: #93c5fd; font-weight: 700; }
.compact { margin-bottom: 8px; }
.compact-input { max-width: 160px; }
.empty-state { color: #94a3b8; border: 1px dashed #475569; border-radius: 10px; padding: 14px; }
.modifier-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(2,6,23,.78); }
.modifier-modal[hidden] { display: none; }
.modifier-modal-card { width: min(100%, 520px); display: grid; gap: 14px; border: 1px solid #334155; border-radius: 18px; background: #1e293b; padding: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.36); }
.modifier-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modifier-modal-head h3 { margin: 0; }
.modifier-options { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.modifier-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 1px solid #334155; border-radius: 12px; background: #0f172a; padding: 10px; cursor: pointer; }
.modifier-option input { width: auto; }
.modifier-option strong { color: #86efac; }
.modifier-note-field { display: grid; gap: 6px; }
.modifier-modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.kitchen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kitchen-card { display: grid; gap: 12px; background: #1e293b; border: 1px solid #334155; border-radius: 14px; padding: 14px; }
.kitchen-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kitchen-card-head strong { font-size: 24px; color: #fbbf24; }
.kitchen-card-head p { margin: 2px 0 0; color: #94a3b8; }
.kitchen-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.kitchen-meta span { border-radius: 999px; background: #0f172a; border: 1px solid #334155; padding: 5px 8px; color: #cbd5e1; font-size: 12px; }
.kitchen-items { display: grid; gap: 8px; border-top: 1px solid #334155; border-bottom: 1px solid #334155; padding: 10px 0; }
.kitchen-items div { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: start; }
.kitchen-items strong { color: #86efac; }
.kitchen-item-line span { display: grid; gap: 3px; }
.kitchen-item-line small { color: #93c5fd; }
.kitchen-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.kitchen-actions form { margin: 0; }

.alert { border-radius: 10px; padding: 10px 12px; }
.alert-success { background: #14532d; border: 1px solid #166534; }
.alert-danger { background: #7f1d1d; border: 1px solid #991b1b; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 10px; width: min(360px, calc(100vw - 28px)); }
.toast-item { border: 1px solid #334155; border-left: 5px solid #22c55e; border-radius: 14px; background: #0f172a; color: #e2e8f0; padding: 12px 14px; box-shadow: 0 18px 48px rgba(0,0,0,.35); transform: translateY(8px); opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.toast-item.show { transform: translateY(0); opacity: 1; }
.toast-item.error { border-left-color: #ef4444; }
.toast-item.info { border-left-color: #60a5fa; }
.modal-shell { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: rgba(2,6,23,.78); }
.modal-shell[hidden] { display: none; }
.modal-card { width: min(100%, 920px); max-height: calc(100vh - 36px); overflow: auto; border: 1px solid #334155; border-radius: 18px; background: #1e293b; box-shadow: 0 24px 80px rgba(0,0,0,.38); }
.modal-card-sm { width: min(100%, 560px); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #334155; background: #1e293b; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 18px; }
.modal-actions { position: sticky; bottom: 0; margin: 0; padding: 14px 18px; border-top: 1px solid #334155; background: #1e293b; }
.modal-close { border: 0; border-radius: 999px; width: 34px; height: 34px; color: #cbd5e1; background: #334155; cursor: pointer; font-size: 20px; line-height: 1; }
.modal-close:hover { color: #fff; background: #475569; }
.tab-panel[hidden] { display: none; }

.receipt-shell { display: flex; justify-content: center; }
.receipt-card { width: 100%; max-width: 420px; background: #f8fafc; color: #0f172a; border-radius: 14px; padding: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.receipt-center { text-align: center; border-bottom: 1px dashed #94a3b8; padding-bottom: 12px; margin-bottom: 12px; }
.receipt-center h2 { margin: 0 0 4px; }
.receipt-center p { margin: 2px 0; color: #475569; font-size: 13px; }
.receipt-meta, .receipt-total, .receipt-payments { display: grid; gap: 7px; }
.receipt-meta div, .receipt-total div, .receipt-payments div, .receipt-line { display: flex; justify-content: space-between; gap: 12px; }
.receipt-meta { border-bottom: 1px dashed #94a3b8; padding-bottom: 12px; margin-bottom: 12px; }
.receipt-meta span, .receipt-total span, .receipt-line small, .receipt-payments span { color: #64748b; }
.receipt-lines { display: grid; gap: 10px; border-bottom: 1px dashed #94a3b8; padding-bottom: 12px; margin-bottom: 12px; }
.receipt-line div { display: grid; gap: 2px; }
.receipt-line small { display: block; }
.receipt-total { border-bottom: 1px dashed #94a3b8; padding-bottom: 12px; margin-bottom: 12px; }
.receipt-total .grand { font-size: 18px; border-top: 1px solid #cbd5e1; padding-top: 8px; }
.receipt-footer { text-align: center; color: #475569; margin: 14px 0 0; }
.receipt-payment-form { display: grid; gap: 10px; margin-top: 14px; border-top: 1px dashed #94a3b8; padding-top: 12px; }
.receipt-payment-form h3 { margin: 0; font-size: 16px; }
.receipt-payment-form label { display: grid; gap: 5px; color: #475569; font-size: 13px; font-weight: 800; }
.receipt-payment-form input, .receipt-payment-form select { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #0f172a; padding: 9px 10px; }

.barcode-card { max-width: 820px; }
.barcode-label { display: grid; gap: 14px; max-width: 620px; margin: 0 auto; border: 1px solid #334155; border-radius: 18px; padding: 22px; background: #0f172a; text-align: center; }
.barcode-label-head { display: flex; justify-content: space-between; gap: 12px; color: #cbd5e1; }
.barcode-label h2 { margin: 0; font-size: 34px; }
.barcode-box { background: #fff; border-radius: 12px; padding: 12px; overflow-x: auto; }
.barcode-svg { width: 100%; min-width: 420px; height: auto; display: block; }
.copy-box { display: grid; gap: 6px; text-align: left; }

.public-menu-body { min-height: 100vh; background: linear-gradient(135deg, #0f172a, #111827 55%, #1e1b4b); color: #e2e8f0; }
.public-menu-shell { width: min(100% - 28px, 980px); margin: 0 auto; padding: 28px 0 40px; }
.public-menu-hero { border: 1px solid #334155; border-radius: 24px; padding: 28px; background: radial-gradient(circle at top right, rgba(79,70,229,.35), transparent 34%), #111827; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.public-menu-hero span { display: inline-flex; border: 1px solid #4f46e5; color: #c4b5fd; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 800; }
.public-menu-hero h1 { margin: 16px 0 8px; font-size: clamp(34px, 7vw, 64px); line-height: 1; }
.public-menu-hero p { margin: 0; color: #bfdbfe; }
.public-menu-section { margin-top: 22px; }
.public-menu-section h2 { margin: 0 0 12px; }
.public-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.public-menu-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border: 1px solid #334155; border-radius: 16px; background: rgba(30,41,59,.86); padding: 16px; }
.public-menu-item strong { font-size: 18px; }
.public-menu-item p { margin: 6px 0 0; color: #94a3b8; }
.public-menu-item > span { white-space: nowrap; color: #86efac; font-weight: 900; }
.public-menu-note { margin-top: 24px; border: 1px dashed #475569; border-radius: 16px; padding: 16px; background: rgba(15,23,42,.7); color: #cbd5e1; }
.public-menu-note p { margin: 6px 0 0; color: #94a3b8; }
.public-order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.public-order-menu, .public-order-cart { min-width: 0; }
.public-order-cart { position: sticky; top: 18px; border: 1px solid #334155; border-radius: 18px; background: rgba(15,23,42,.9); padding: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.public-menu-alert { margin: 16px 0; border-radius: 14px; padding: 12px 14px; font-weight: 800; }
.public-menu-alert-success { border: 1px solid #166534; background: rgba(20,83,45,.9); color: #bbf7d0; }
.public-menu-alert-error { border: 1px solid #991b1b; background: rgba(127,29,29,.9); color: #fecaca; }
.public-menu-order-item { width: 100%; text-align: left; border: 1px solid #334155; border-radius: 16px; background: rgba(30,41,59,.86); color: #e2e8f0; padding: 16px; cursor: pointer; display: grid; gap: 10px; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.public-menu-order-item:hover { transform: translateY(-2px); border-color: #60a5fa; box-shadow: 0 16px 34px rgba(0,0,0,.18); }
.public-menu-order-item strong { font-size: 18px; }
.public-menu-order-item p { margin: 6px 0 0; color: #94a3b8; }
.public-menu-price-action { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: #86efac; font-weight: 900; }
.public-menu-price-action small { color: #93c5fd; font-weight: 800; }
.public-cart-items { display: grid; gap: 8px; min-height: 80px; max-height: 280px; overflow: auto; margin: 12px 0; }
.public-cart-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 1px solid #334155; border-radius: 12px; padding: 10px; background: #111827; }
.public-cart-row strong { display: block; margin-bottom: 4px; }
.public-cart-row span, .public-form-note { color: #94a3b8; font-size: 13px; }
.public-cart-row em { display: block; margin-top: 4px; color: #93c5fd; font-size: 12px; font-style: normal; }
.public-cart-actions { display: flex; align-items: center; gap: 6px; }
.public-cart-actions button { border: 0; background: #334155; color: #fff; border-radius: 999px; min-width: 28px; height: 28px; cursor: pointer; font-weight: 900; }
.public-cart-actions button[data-public-remove-item] { background: #7f1d1d; }
.public-cart-total { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #334155; border-bottom: 1px solid #334155; padding: 12px 0; margin: 12px 0; font-size: 18px; }
.public-order-form { display: grid; gap: 10px; }
.public-order-form label { display: grid; gap: 6px; color: #bfdbfe; font-size: 13px; font-weight: 800; }
.public-order-form input, .public-order-form textarea { width: 100%; border: 1px solid #334155; border-radius: 12px; background: #1e293b; color: #e2e8f0; padding: 10px 12px; }
.public-order-form textarea { min-height: 86px; resize: vertical; }
.public-submit-button { border: 0; border-radius: 12px; padding: 12px 14px; background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; font-weight: 900; cursor: pointer; }
.public-submit-button:disabled { opacity: .45; cursor: not-allowed; }
.kitchen-note { border: 1px dashed #475569; border-radius: 12px; padding: 10px; color: #cbd5e1; background: rgba(15,23,42,.75); white-space: pre-line; }
.receipt-note { border-bottom: 1px dashed #94a3b8; padding-bottom: 12px; margin-bottom: 12px; white-space: pre-line; color: #475569; }

.barcode-print-body { min-height: 100vh; margin: 0; background: #e2e8f0; color: #0f172a; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.barcode-print-page { width: min(100% - 32px, 1180px); margin: 0 auto; padding: 28px 0 40px; }
.barcode-print-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; border: 1px solid #cbd5e1; border-radius: 18px; background: #fff; padding: 18px; box-shadow: 0 16px 40px rgba(15,23,42,.08); }
.barcode-print-toolbar h1 { margin: 0 0 4px; font-size: clamp(24px, 4vw, 36px); }
.barcode-print-toolbar p { margin: 0; color: #64748b; }
.barcode-print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.barcode-print-label { display: grid; gap: 8px; break-inside: avoid; page-break-inside: avoid; border: 1px solid #0f172a; border-radius: 12px; background: #fff; padding: 12px; text-align: center; }
.barcode-print-title { font-weight: 900; font-size: 17px; line-height: 1.2; }
.barcode-print-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 12px; color: #475569; font-size: 11px; font-weight: 700; }
.barcode-print-box { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px; background: #fff; }
.barcode-print-box .barcode-svg { min-width: 0; width: 100%; }
.barcode-print-code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.barcode-empty { border: 1px dashed #94a3b8; border-radius: 18px; background: #fff; padding: 28px; text-align: center; }
.barcode-empty h2 { margin: 0 0 8px; }
.barcode-empty p { margin: 0; color: #64748b; }

@media print {
    @page { margin: 10mm; }
    body { background: #fff; color: #000; }
    .sidebar, .topbar, .row-head, .alert { display: none !important; }
    .no-print { display: none !important; }
    .app-shell { display: block; }
    .page-content { padding: 0; }
    .receipt-card { box-shadow: none; border-radius: 0; max-width: none; }
    .barcode-card { box-shadow: none; border: 0; padding: 0; }
    .barcode-label { color: #000; background: #fff; border: 1px solid #000; }
    .barcode-print-page { width: 100%; padding: 0; }
    .barcode-print-grid { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
    .barcode-print-label { border: 1px solid #000; border-radius: 0; box-shadow: none; padding: 5mm; }
    .barcode-print-title { color: #000; }
    .barcode-print-meta { color: #111; }
}

@media (max-width: 1024px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; top: 0; z-index: 10; }
    .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid, .two-columns { grid-template-columns: 1fr; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .settings-switches { grid-template-columns: 1fr; }
    .kitchen-grid { grid-template-columns: 1fr; }
    .pos-layout { grid-template-columns: 1fr; }
    .filter-row, .inline-form, .form-grid, .bundle-row, .bundle-item, .modifier-row, .shift-open-box, .barcode-scan-row, .pos-filter-row { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .row-head { align-items: flex-start; flex-direction: column; }
    .pos-toolbar { align-items: stretch; flex-direction: column; }
    .pos-branch-form { min-width: 0; }
    .cart-row { grid-template-columns: 1fr; }
    .action-row { flex-wrap: wrap; }
    .table-form { align-items: stretch; flex-direction: column; }
    .table-form input, .table-form select { width: 100%; min-width: 0; }
    .table-session-open-form { align-items: stretch; flex-direction: column; }
    .table-session-open-form input { width: 100%; max-width: none; }
    .form-actions { justify-content: stretch; flex-direction: column; }
    .form-actions .btn { text-align: center; }
    .public-menu-grid { grid-template-columns: 1fr; }
    .public-menu-item { flex-direction: column; }
    .barcode-label-head { flex-direction: column; }
}
