:root {
  color-scheme: light;
  --teal-950: #075d5a;
  --teal-900: #08736e;
  --teal-800: #078b80;
  --teal-700: #119b8b;
  --teal-100: #dff5f0;
  --teal-50: #eefaf7;
  --gold: #e2bd53;
  --ink: #172427;
  --muted: #78888a;
  --line: #e3edeb;
  --paper: #ffffff;
  --surface: #f0fbf8;
  --red: #bb4e4e;
  --shadow: 0 8px 24px rgba(24, 77, 70, .06);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { color: var(--ink); background: var(--surface); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 10% 10%, #d8f4ee 0, transparent 38%), var(--surface); }
.auth-card { width: min(100%, 470px); background: var(--paper); padding: 36px; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 80px rgba(9, 76, 68, .12); }
.brand-lockup { display: flex; align-items: center; gap: 13px; margin-bottom: 34px; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; color: #fff7d3; background: var(--teal-900); font-family: Georgia, serif; font-size: 26px; font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0,0,0,.09); }
.brand-lockup strong, .brand-lockup span { display: block; }
.brand-lockup strong { font-size: 15px; }
.brand-lockup span { color: var(--muted); margin-top: 4px; font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.auth-card h1 { font-size: 25px; letter-spacing: -.04em; margin: 0 0 8px; }
.auth-description { color: var(--muted); line-height: 1.55; margin: 0 0 23px; }
.auth-footnote { margin: 27px 0 0; color: #95a4a3; font-size: 12px; }
.auth-card .form-stack { gap: 16px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.app-shell.is-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar { height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; overflow: hidden; background: #087f7c; color: #fff; z-index: 20; }
.sidebar-brand { min-height: 76px; padding: 14px 15px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.13); }
.sidebar-brand .brand-mark { width: 39px; height: 39px; background: transparent; border: 1px solid rgba(255,255,255,.24); color: #ffdc69; font-size: 28px; }
.brand-copy { min-width: 0; flex: 1; }
.brand-copy strong, .brand-copy span { display: block; white-space: nowrap; }
.brand-copy strong { font-size: 13px; font-weight: 650; }
.brand-copy span { opacity: .68; font-size: 9px; letter-spacing: .17em; margin-top: 5px; }
.sidebar-toggle, .icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; color: inherit; background: transparent; }
.sidebar-toggle:hover, .icon-button:hover { background: rgba(255,255,255,.12); }
.sidebar-toggle svg, .icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-caption { padding: 23px 19px 9px; color: rgba(255,255,255,.56); font-size: 9px; letter-spacing: .15em; font-weight: 700; }
.main-nav { flex: 1; overflow-y: auto; padding: 0 9px 12px; scrollbar-color: rgba(255,255,255,.25) transparent; }
.nav-item { position: relative; width: 100%; display: flex; align-items: center; gap: 13px; min-height: 43px; border: 0; border-radius: 11px; padding: 0 11px; color: rgba(255,255,255,.82); background: transparent; text-align: left; margin: 2px 0; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.09); }
.nav-item.active { color: #fff; background: rgba(8, 90, 85, .58); box-shadow: inset 3px 0 var(--gold); }
.nav-icon { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; }
.nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { flex: 1; white-space: nowrap; font-size: 13px; }
.nav-chevron { opacity: .66; font-size: 17px; line-height: 1; transition: transform .18s ease; }
.nav-parent[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-children { display: none; padding: 1px 0 6px 44px; }
.nav-children.expanded { display: grid; }
.nav-child { text-align: left; min-height: 34px; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.69); padding: 0 9px; font-size: 12px; }
.nav-child:hover, .nav-child.active { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-bottom { border-top: 1px solid rgba(255,255,255,.15); min-height: 68px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; }
.user-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 39px; height: 39px; border-radius: 50%; color: var(--teal-950); background: #f5d65f; font-weight: 800; font-size: 12px; }
.user-summary { min-width: 0; flex: 1; }
.user-summary strong, .user-summary span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-summary strong { font-size: 12px; font-weight: 650; }
.user-summary span { margin-top: 4px; color: rgba(255,255,255,.65); font-size: 10px; }
.signout-button { color: rgba(255,255,255,.8); }
.app-shell.is-collapsed .sidebar-brand { justify-content: center; padding-inline: 8px; }
.app-shell.is-collapsed .brand-copy, .app-shell.is-collapsed .sidebar-toggle, .app-shell.is-collapsed .nav-caption, .app-shell.is-collapsed .nav-label, .app-shell.is-collapsed .nav-chevron, .app-shell.is-collapsed .nav-children, .app-shell.is-collapsed .user-summary, .app-shell.is-collapsed .signout-button { display: none; }
.app-shell.is-collapsed .main-nav { padding-inline: 9px; }
.app-shell.is-collapsed .nav-item { justify-content: center; padding: 0; }
.app-shell.is-collapsed .sidebar-bottom { justify-content: center; padding-inline: 8px; }

.workspace { min-width: 0; min-height: 100vh; }
.topbar { height: 63px; position: sticky; top: 0; z-index: 10; padding: 0 27px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #7e8d8e; font-size: 12px; white-space: nowrap; overflow: hidden; }
.breadcrumb b { color: #bdc9c7; font-weight: 400; }
.breadcrumb strong { color: var(--teal-900); font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.role-chip { display: flex; align-items: center; gap: 7px; color: #6e8280; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; background: var(--teal-700); border-radius: 50%; box-shadow: 0 0 0 3px #e6f7f3; }
.refresh-button { color: #63817e; border: 1px solid transparent; }
.refresh-button:hover { background: var(--teal-50); }
.mobile-nav-toggle { display: none; color: var(--teal-900); }
.page-main { max-width: 1800px; margin: 0 auto; padding: 25px 27px 34px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 21px; }
.eyebrow { color: #8ca09e; font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.page-heading h1 { margin: 5px 0 0; font-size: 25px; letter-spacing: -.04em; font-weight: 680; }
.page-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.page-content { min-width: 0; }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: #314345; background: #fff; font-size: 12px; font-weight: 650; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { border-color: #bddfd8; background: #f8fdfb; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; border-color: var(--teal-800); background: var(--teal-800); box-shadow: 0 3px 8px rgba(7,139,128,.13); }
.button-primary:hover { color: #fff; border-color: var(--teal-900); background: var(--teal-900); }
.button-quiet { border-color: transparent; color: var(--teal-900); background: #e8f7f3; }
.button-danger { color: var(--red); border-color: #f1d9d8; background: #fff8f8; }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-icon { font-size: 17px; line-height: 1; font-weight: 400; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.stat-card { min-width: 0; padding: 16px 17px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.stat-label { color: #738482; font-size: 11px; font-weight: 550; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--teal-800); border-radius: 9px; background: var(--teal-50); font-size: 15px; }
.stat-value { margin-top: 17px; font-size: clamp(19px, 2vw, 25px); font-weight: 720; letter-spacing: -.045em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-foot { color: #91a19f; margin-top: 7px; font-size: 10px; }
.stat-warn .stat-icon { color: #ba791a; background: #fff5e3; }
.stat-danger .stat-icon { color: var(--red); background: #fff0ef; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: 15px; }
.panel, .table-card { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 14px; font-weight: 680; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 17px 18px; }
.empty-state { min-height: 180px; display: grid; place-content: center; justify-items: center; text-align: center; color: #92a19f; padding: 22px; }
.empty-state strong { color: #4b5b5b; font-size: 13px; margin-bottom: 6px; }
.empty-state p { max-width: 360px; line-height: 1.55; margin: 0; font-size: 12px; }
.empty-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border-radius: 13px; color: var(--teal-800); background: var(--teal-50); font-size: 19px; }
.bar-list { display: grid; gap: 15px; }
.bar-item { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; align-items: center; gap: 12px; font-size: 11px; }
.bar-item-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #506261; }
.bar-track { height: 8px; overflow: hidden; border-radius: 9px; background: #edf5f3; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #65c5ae, #0a9485); }
.bar-fill.level-10 { width: 10%; }
.bar-fill.level-20 { width: 20%; }
.bar-fill.level-30 { width: 30%; }
.bar-fill.level-40 { width: 40%; }
.bar-fill.level-50 { width: 50%; }
.bar-fill.level-60 { width: 60%; }
.bar-fill.level-70 { width: 70%; }
.bar-fill.level-80 { width: 80%; }
.bar-fill.level-90 { width: 90%; }
.bar-fill.level-100 { width: 100%; }
.bar-item-value { color: #6c817e; font-variant-numeric: tabular-nums; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shortcut { text-align: left; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.shortcut:hover { border-color: #aedbd1; background: #f7fcfa; }
.shortcut-icon { display: grid; place-items: center; width: 29px; height: 29px; margin-bottom: 10px; border-radius: 9px; color: var(--teal-800); background: var(--teal-50); font-size: 15px; }
.shortcut strong, .shortcut span:last-child { display: block; }
.shortcut strong { font-size: 11px; }
.shortcut span:last-child { color: var(--muted); font-size: 10px; margin-top: 4px; }

.table-card { display: flex; flex-direction: column; overflow: hidden; }
.table-heading { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.table-heading h2 { margin: 0; font-size: 14px; font-weight: 680; }
.table-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.table-toolbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fcfefd; }
.search-field { width: min(100%, 360px); height: 35px; position: relative; }
.search-field svg { width: 15px; height: 15px; position: absolute; left: 11px; top: 10px; fill: none; stroke: #98a9a7; stroke-width: 1.8; }
.search-input, .field input, .field select, .field textarea, .pos-search input { width: 100%; min-height: 38px; border: 1px solid #dfe9e7; border-radius: 9px; outline: none; color: var(--ink); background: #fff; padding: 0 11px; transition: border .15s, box-shadow .15s; }
.search-input { height: 35px; min-height: 35px; padding-left: 34px; font-size: 11px; }
.search-input:focus, .field input:focus, .field select:focus, .field textarea:focus, .pos-search input:focus { border-color: #6dbeb1; box-shadow: 0 0 0 3px rgba(8,139,128,.1); }
.table-hint { color: #93a19f; font-size: 10px; }
.table-scroll { width: 100%; max-height: min(60vh, 620px); overflow: auto; scrollbar-color: #bfd9d3 #f6faf9; scrollbar-width: thin; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; }
thead { position: sticky; top: 0; z-index: 2; }
th { height: 39px; padding: 0 12px; text-align: left; color: #596b69; background: #f8fbfa; border-bottom: 1px solid #dce8e5; white-space: nowrap; font-weight: 650; }
th[data-column] { position: relative; }
.column-grip { position: absolute; z-index: 4; top: 0; right: -2px; width: 7px; height: 100%; cursor: col-resize; touch-action: none; }
.column-grip:hover::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: 3px; width: 1px; background: #7abeb2; }
th:first-child, td:first-child { padding-left: 16px; }
td { min-height: 48px; padding: 11px 12px; border-bottom: 1px solid #eef2f1; color: #415252; vertical-align: middle; }
tbody tr:hover td { background: #f9fdfb; }
tbody tr:last-child td { border-bottom: 0; }
th button.sort-button { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 0; color: inherit; font-size: inherit; font-weight: inherit; background: transparent; white-space: nowrap; }
.sort-mark { color: #a8b7b5; font-size: 11px; }
.checkbox { width: 15px; height: 15px; accent-color: var(--teal-800); vertical-align: middle; cursor: pointer; }
.table-footer { min-height: 53px; position: sticky; bottom: 0; z-index: 3; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); background: #fff; color: #71817f; font-size: 10px; }
.pagination { display: flex; align-items: center; gap: 7px; }
.page-size { height: 31px; min-width: 56px; border: 1px solid var(--line); border-radius: 8px; color: #40514f; background: #fff; padding: 0 8px; font-size: 10px; }
.page-button { height: 30px; min-width: 30px; border: 1px solid var(--line); border-radius: 8px; color: #526361; background: #fff; font-size: 10px; }
.page-button:disabled { color: #b8c2c0; cursor: default; }
.page-button:not(:disabled):hover { border-color: #aedbd1; background: #f4fbf8; }
.table-link { color: var(--teal-900); font-weight: 650; }
.text-button { padding: 0; border: 0; background: transparent; font: inherit; }
.text-button:hover { text-decoration: underline; }
.status-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 20px; background: #e8f7ef; color: #39815d; font-size: 10px; white-space: nowrap; }
.status-pill.low { color: #976714; background: #fff5df; }
.status-pill.out { color: #aa4e4e; background: #fff0ef; }
.muted { color: #95a3a1; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.selection-bar { padding: 8px 14px; background: #eaf8f4; color: var(--teal-900); font-size: 11px; border-bottom: 1px solid #d5eee8; }

.form-stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { color: #536462; font-size: 11px; font-weight: 630; }
.field input, .field select, .field textarea { min-height: 39px; padding-inline: 11px; font-size: 12px; }
.field textarea { min-height: 82px; padding-block: 9px; resize: vertical; }
.field-hint { margin: 0; color: #94a19f; font-size: 10px; line-height: 1.5; }
.check-field { display: block; color: #536462; font-size: 11px; }
.check-field input { width: 15px; height: 15px; accent-color: var(--teal-800); vertical-align: middle; margin-right: 7px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.form-divider { height: 1px; background: var(--line); margin: 2px 0; }
.form-error { color: #ad4747; font-size: 11px; margin: 0; }
.modal { width: min(650px, calc(100vw - 24px)); max-height: min(88vh, 850px); padding: 0; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 26px 90px rgba(20, 49, 46, .24); }
.modal::backdrop { background: rgba(16, 46, 43, .38); backdrop-filter: blur(2px); }
.modal-frame { display: flex; flex-direction: column; max-height: inherit; }
.modal-header { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.02em; }
.modal-header .icon-button { color: #667875; font-size: 23px; }
.modal-body { overflow-y: auto; padding: 20px 21px 21px; }
.toast-region { position: fixed; right: 20px; bottom: 19px; z-index: 50; display: grid; gap: 8px; }
.toast { max-width: min(400px, calc(100vw - 40px)); padding: 12px 15px; border: 1px solid #cfe6df; border-radius: 11px; background: #fff; color: #35504b; box-shadow: 0 9px 35px rgba(9,65,57,.15); font-size: 12px; animation: toast-in .18s ease-out; }
.toast.error { border-color: #f0d3d1; color: #a84141; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.pos-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 15px; align-items: start; }
.pos-products, .pos-cart { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.pos-search { padding: 14px; border-bottom: 1px solid var(--line); }
.pos-search label { display: block; margin-bottom: 7px; color: #5d706d; font-size: 11px; font-weight: 650; }
.pos-search input { min-height: 43px; padding: 0 13px; font-size: 13px; }
.search-results { display: none; max-height: 250px; overflow-y: auto; padding: 4px 10px 10px; }
.search-results.visible { display: grid; gap: 5px; }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; padding: 10px 11px; border: 1px solid #edf2f0; border-radius: 10px; background: #fff; color: var(--ink); }
.result-row:hover { border-color: #bee2d8; background: #f7fcfa; }
.result-row strong, .result-row small { display: block; }
.result-row strong { font-size: 11px; }
.result-row small { margin-top: 4px; color: #8a9997; font-size: 10px; }
.result-price { text-align: right; color: var(--teal-900); font-weight: 700; white-space: nowrap; }
.pos-empty { min-height: 270px; }
.pos-cart-head { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.pos-cart-head h2 { margin: 0; font-size: 14px; }
.pos-cart-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.cart-items { display: grid; gap: 0; max-height: 345px; overflow-y: auto; }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 76px 26px; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid #edf2f0; }
.cart-item-name { min-width: 0; }
.cart-item-name strong, .cart-item-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-name strong { font-size: 11px; }
.cart-item-name span { margin-top: 4px; color: #8b9997; font-size: 10px; }
.cart-qty, .cart-price { width: 100%; height: 30px; border: 1px solid #e0eae7; border-radius: 7px; text-align: center; color: #435552; font-size: 11px; }
.cart-remove { border: 0; background: transparent; color: #a77878; font-size: 17px; }
.cart-summary { display: grid; gap: 10px; padding: 14px 15px; border-top: 1px solid var(--line); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; color: #687977; font-size: 11px; }
.summary-total { margin-top: 2px; padding-top: 11px; border-top: 1px dashed #dce8e5; color: var(--ink); font-size: 15px; font-weight: 750; }
.cart-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cart-controls .field { grid-column: span 1; }
.cart-controls .button { grid-column: 1 / -1; }
.ticket-preview { display: none; }

.loading-state { min-height: 150px; display: grid; place-items: center; color: #859693; font-size: 12px; }
.notice-panel { padding: 21px; border: 1px solid #dcebe7; border-radius: 14px; color: #617572; background: #fff; line-height: 1.6; }
.notice-panel strong { color: #314643; }
.date-filter { min-height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; background: #fff; color: #5b6c69; font-size: 10px; }
.inventory-tools { display: grid; gap: 10px; margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.inventory-tools p { margin: 0; }
.inventory-scan { display: flex; gap: 8px; }
.inventory-scan input { flex: 1; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; }
.inventory-table { max-height: 52vh; border: 1px solid var(--line); border-radius: 9px; }
.inventory-count-input { width: 92px; height: 30px; padding: 0 7px; border: 1px solid #dbe7e4; border-radius: 6px; }
.ticket-detail { display: grid; gap: 13px; color: var(--ink); font-size: 12px; }
.ticket-detail p { margin: 0; line-height: 1.6; }
.ticket-detail table { width: 100%; }
.ticket-detail td, .ticket-detail th { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.ticket-detail .form-actions { flex-wrap: wrap; }
.ticket-detail .summary-line { padding: 0 3px; }
.ean-barcode { display: block; width: 100%; max-width: 200px; height: 37px; fill: #111; }
.print-labels #labels-print { display: grid !important; }
#labels-print { display: none; }
.print-label { width: 52mm; min-height: 34mm; padding: 2mm 3mm; display: flex; flex-direction: column; align-items: flex-start; gap: 1mm; overflow: hidden; border: 1px dashed #bbb; color: #111; font: 8pt/1.15 Arial, sans-serif; }
.print-label strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9pt; }
.print-label span, .print-label small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.print-label code { align-self: center; font: 8pt monospace; letter-spacing: .5px; }

@media (max-width: 1120px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .pos-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); }
}
@media (max-width: 820px) {
  .app-shell, .app-shell.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { width: 246px; position: fixed; inset: 0 auto 0 0; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.12); }
  .app-shell.mobile-open .sidebar { transform: translateX(0); }
  .app-shell.is-collapsed .brand-copy, .app-shell.is-collapsed .sidebar-toggle, .app-shell.is-collapsed .nav-caption, .app-shell.is-collapsed .nav-label, .app-shell.is-collapsed .nav-chevron, .app-shell.is-collapsed .user-summary, .app-shell.is-collapsed .signout-button { display: initial; }
  .app-shell.is-collapsed .nav-item { justify-content: flex-start; padding-inline: 11px; }
  .app-shell.is-collapsed .sidebar-bottom { justify-content: flex-start; padding-inline: 13px; }
  .sidebar-toggle { display: none !important; }
  .mobile-nav-toggle { display: inline-grid; }
  .topbar { padding-inline: 15px; gap: 10px; }
  .page-main { padding: 21px 15px 28px; }
  .nav-caption { padding-top: 15px; }
  .pos-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { height: 56px; }
  .breadcrumb { gap: 7px; font-size: 10px; }
  .breadcrumb span { display: none; }
  .role-chip { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .page-heading h1 { font-size: 23px; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-value { margin-top: 13px; font-size: 19px; }
  .table-heading { align-items: flex-start; flex-direction: column; }
  .table-actions { width: 100%; }
  .table-toolbar { align-items: flex-start; flex-direction: column; }
  .search-field { width: 100%; }
  .table-hint { display: none; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .pagination { width: 100%; justify-content: space-between; }
  .form-grid, .form-grid-three { grid-template-columns: 1fr; }
  .auth-card { padding: 27px 22px; }
  .shortcut-grid { grid-template-columns: 1fr; }
}

@media print {
  body.print-labels * { visibility: hidden !important; }
  body.print-labels #labels-print, body.print-labels #labels-print * { visibility: visible !important; }
  body.print-labels #labels-print { display: grid !important; position: absolute; inset: 0; grid-template-columns: repeat(3, 52mm); align-content: start; gap: 0; width: 100%; }
  body.print-labels .print-label { break-inside: avoid; }
  body.print-ticket * { visibility: hidden !important; }
  body.print-ticket #receipt-print, body.print-ticket #receipt-print * { visibility: visible !important; }
  body.print-ticket #receipt-print { display: block !important; position: absolute; inset: 0; width: 78mm; padding: 4mm; color: #000; background: #fff; font: 11px/1.4 monospace; }
  body.print-ticket #receipt-print h1 { font: 700 15px/1.2 Arial, sans-serif; text-align: center; margin: 0 0 4mm; }
  body.print-ticket #receipt-print p { margin: 1mm 0; }
  body.print-ticket #receipt-print .receipt-rule { border-top: 1px dashed #000; margin: 2mm 0; }
}
