:root {
  --bg: #eef7fa;
  --panel: #fff;
  --ink: #101820;
  --muted: #65727c;
  --line: #dce4e7;
  --green: #0b875b;
  --soft: #e4f5ef;
  --orange: #d96b1d;
  --dark: #20282f;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; }
button, input, select { font: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 8px; min-height: 44px; padding: 0 14px; font-weight: 760; cursor: pointer; }
.primary { background: var(--green); color: #fff; border-color: var(--green); }
.app { min-height: 100vh; display: grid; grid-template-columns: 210px 1fr; transition: grid-template-columns .18s ease; }
.app.menu-collapsed { grid-template-columns: 0 1fr; }
.app.locked { display: none; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: #05070a; }
.login-screen.hidden { display: none; }
.login-card { position: relative; width: min(780px, 100%); min-height: 500px; background: #f7f8fa; border: 15px solid #07090d; border-radius: 32px; padding: 0 24px 16px; display: grid; grid-template-columns: 190px 1fr 150px; grid-template-rows: 58px auto auto 1fr auto; gap: 12px; box-shadow: 0 0 0 2px #2b313a, 0 24px 70px rgba(15, 28, 35, .5); }
.login-topbar { grid-column: 1 / -1; height: 58px; margin: 0 -24px; background: #0799c8; color: #fff; display: grid; place-items: center; font-size: 32px; line-height: .8; border-radius: 15px 15px 0 0; }
.login-topbar span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 2px; text-align: center; }
.refresh-button { justify-self: end; align-self: start; grid-column: 3; grid-row: 2; border-radius: 999px; min-width: 120px; margin-top: 10px; }
.login-users { grid-column: 1; grid-row: 2 / 5; align-self: start; display: grid; gap: 10px; padding-top: 18px; }
.login-users h2 { font-size: 17px; padding: 0; border: 0; color: #235980; }
.login-user-grid { display: grid; gap: 8px; }
.login-user-grid button { min-height: 48px; text-align: left; color: #235980; background: #fff; }
.login-user-grid button.active { color: #fff; background: #0799c8; border-color: #078db9; }
.pin-dots { grid-column: 2; grid-row: 2; justify-self: center; display: flex; gap: 16px; align-items: center; margin-top: 22px; }
.pin-dots span { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 8px solid #eef0f2; box-shadow: inset 0 0 0 4px #fff; }
.pin-dots span.filled { background: #1e5c8a; }
.pin-pad { grid-column: 2; grid-row: 3 / 5; justify-self: center; align-self: center; display: grid; grid-template-columns: repeat(3, 72px); gap: 12px 18px; }
.pin-pad button { height: 58px; min-height: 58px; font-size: 28px; color: #235980; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 4px rgba(0,0,0,.15); }
.pin-pad button.primary { font-size: 15px; color: #fff; background: #0698c8; border-color: #078db9; }
.pin-pad #pin-clear { font-size: 14px; }
.clock-actions { grid-column: 3; grid-row: 4; align-self: end; display: grid; gap: 10px; }
.clock-actions button { border-radius: 999px; min-height: 42px; }
.login-foot { position: absolute; left: 10px; bottom: 7px; color: #245070; font-size: 11px; }
#login-error { grid-column: 1 / -1; text-align: center; color: #b63d35; min-height: 18px; }
.side { background: #f9fbfb; border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 9px; }
.brand { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; margin-bottom: 14px; }
.brand span { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 850; }
.brand strong { font-size: 18px; }
.brand small, .top p, .muted { color: var(--muted); }
.menu-collapsed .side { padding: 0; border: 0; overflow: hidden; pointer-events: none; }
.menu-collapsed .brand { grid-template-columns: 42px; }
.menu-collapsed .brand strong, .menu-collapsed .brand small, .menu-collapsed .nav { font-size: 0; }
.menu-collapsed .nav { padding: 0; display: grid; place-items: center; }
.menu-collapsed .nav::before { content: attr(data-short); font-size: 13px; }
.nav { text-align: left; height: 48px; }
.nav.active { background: var(--dark); border-color: var(--dark); color: #fff; }
main { min-width: 0; padding: 14px; background: linear-gradient(180deg, #e8f7fb 0%, #d5eef5 100%); }
.top { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.menu-toggle { width: 46px; padding: 0; margin-right: 12px; flex: 0 0 auto; background: #0799c8; border-color: #078db9; color: #fff; font-size: 22px; }
h1, h2, p { margin: 0; }
h1 { font-size: 22px; color: #17566a; }
h2 { font-size: 18px; }
.status { display: flex; gap: 10px; align-items: center; }
.top-search { display: flex; align-items: center; gap: 8px; }
.top-search.hidden { display: none; }
.search-icon { position: relative; width: 54px; min-width: 54px; padding: 0; }
.search-icon::before { content: ""; position: absolute; left: 17px; top: 12px; width: 14px; height: 14px; border: 3px solid currentColor; border-radius: 999px; }
.search-icon::after { content: ""; position: absolute; left: 31px; top: 28px; width: 11px; height: 3px; border-radius: 999px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
.top-search input { width: 0; min-width: 0; opacity: 0; padding-left: 0; padding-right: 0; border-width: 0; transition: width .18s ease, opacity .18s ease, padding .18s ease, border-width .18s ease; }
.top-search.open input, .top-search:focus-within input { width: min(340px, 30vw); opacity: 1; padding-left: 12px; padding-right: 12px; border-width: 1px; }
.pill { padding: 9px 12px; border-radius: 999px; background: #edf2f3; font-weight: 760; }
.pill.good { background: var(--soft); color: var(--green); }
.view { display: none; }
.view.active { display: block; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pos-grid { display: grid; grid-template-columns: 390px 1fr; gap: 0; height: calc(100vh - 86px); min-height: 0; border: 1px solid rgba(7, 153, 200, .32); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 12px 36px rgba(18, 93, 118, .14); }
.catalog { order: 2; border-radius: 0; border: 0; padding: 8px; display: grid; grid-template-rows: 112px 112px minmax(0, 1fr); gap: 6px; background: linear-gradient(180deg, #bfeaf6 0%, #89cfe3 46%, #58b6d2 100%); min-width: 0; min-height: 0; }
.catalog.parent-one-line { grid-template-rows: 112px 112px minmax(0, 1fr); }
.catalog.sub-one-line { grid-template-rows: 112px 112px minmax(0, 1fr); }
.catalog.parent-one-line.sub-one-line { grid-template-rows: 112px 112px minmax(0, 1fr); }
.catalog.no-subcategories { grid-template-rows: 112px minmax(0, 1fr); }
.catalog.no-subcategories.parent-one-line { grid-template-rows: 112px minmax(0, 1fr); }
.catalog.table-mode { grid-template-rows: minmax(0, 1fr); }
.toolbar { display: none; }
input, select { height: 46px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 12px; }
select[multiple] { height: auto; padding: 8px 12px; }
.button-pager { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 14px; gap: 4px; }
.button-pager::before { grid-row: 1 / 3; grid-column: 1; width: 24px; writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center; text-align: center; color: #fff; font-size: 15px; font-weight: 900; letter-spacing: .6px; text-shadow: 0 1px 2px rgba(0, 56, 84, .35); }
#parent-categories::before { content: "CATEGORY"; }
#subcategories::before { content: "SUB"; }
#products::before { content: "PRODUCTS"; position: absolute; left: 0; top: 0; width: 24px; height: 112px; place-items: center; padding-top: 0; }
.catalog.no-subcategories .subcategories { display: none; }
.pager-track { grid-column: 2; grid-row: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; display: flex; gap: 10px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-x; }
.pager-track::-webkit-scrollbar { display: none; }
.button-page { flex: 0 0 100%; min-width: 100%; scroll-snap-align: start; display: grid; gap: 8px; justify-content: start; align-content: start; }
.category-page { grid-template-columns: repeat(auto-fill, 140px); grid-auto-rows: 112px; }
.category-page.one-line { grid-auto-rows: 112px; }
.product-page { grid-template-columns: repeat(auto-fill, 140px); grid-auto-rows: 112px; }
.product-page.product-rows-2, .product-page.product-rows-3, .product-page.product-rows-4, .product-page.product-rows-5, .product-page.product-rows-6 { grid-auto-rows: 112px; }
.catalog.no-subcategories .product-page { grid-auto-rows: 112px; }
.pager-dots { grid-column: 2; grid-row: 2; display: flex; justify-content: center; align-items: center; gap: 7px; height: 14px; }
.pager-dots button { width: 9px; height: 9px; min-height: 9px; padding: 0; border-radius: 999px; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.36); box-shadow: 0 1px 2px rgba(0, 56, 84, .2); }
.pager-dots button.active { width: 11px; height: 11px; background: #fff; }
.pager-dots:has(button:only-child) { opacity: .45; }
.empty-pager { height: 100%; min-height: 120px; display: grid; place-items: center; color: #2a6678; font-weight: 760; background: rgba(255,255,255,.3); border: 1px dashed rgba(255,255,255,.72); border-radius: 6px; }
.catalog-tile { position: relative; overflow: hidden; border-radius: 6px; padding: 6px; border: 1px solid rgba(255,255,255,.58); background-color: rgba(16, 139, 177, .68); background-image: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,0) 42%), linear-gradient(180deg, rgba(24, 167, 204, .72), rgba(7, 111, 147, .84)); background-size: cover; background-position: center; color: #fff; text-align: center; display: flex; align-items: stretch; justify-content: flex-end; box-shadow: inset 0 -34px 44px rgba(2, 56, 76, .28), 0 1px 4px rgba(0, 70, 100, .18); }
.catalog-tile::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 24%, rgba(255,255,255,.2), rgba(255,255,255,0) 42%); pointer-events: none; }
.catalog-tile.active { border-color: #fff; box-shadow: inset 0 -40px 46px rgba(2, 56, 76, .2), 0 0 0 2px rgba(255,255,255,.94), 0 2px 10px rgba(0, 80, 112, .25); }
.catalog-tile:active { transform: translateY(1px); }
.category-tile { height: 112px; min-height: 112px; flex-direction: column; justify-content: flex-end; }
.subcategory-tile { background-color: rgba(6, 151, 194, .76); }
.products { min-height: 0; }
.product { height: 112px; min-height: 112px; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 0; padding-bottom: 0; }
.tile-name { position: relative; z-index: 1; width: 100%; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; font-size: 14px; line-height: 1.08; font-weight: 820; text-shadow: 0 1px 3px rgba(0,0,0,.36); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-name-sm { font-size: 12px; line-height: 1.06; -webkit-line-clamp: 3; }
.tile-name-xs { font-size: 10.5px; line-height: 1.04; -webkit-line-clamp: 4; }
.category-tile .tile-name, .product .tile-name { min-height: 0; display: -webkit-box; text-align: center; padding: 4px 5px 5px; margin-bottom: 10px; border-radius: 4px 4px 0 0; background: rgba(5, 67, 91, .58); backdrop-filter: blur(1px); }
.category-tile .tile-name { border-radius: 4px; margin-bottom: 13px; }
.tile-price { position: relative; z-index: 1; align-self: stretch; min-width: 0; padding: 4px 7px; border-radius: 0 0 5px 5px; background: rgba(226,230,233,.94); color: #17566a; font-size: 12px; font-weight: 850; box-shadow: 0 -1px 2px rgba(0, 42, 60, .08); }
.cart { order: 1; border-radius: 0; border: 0; border-right: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr auto auto; background: #fff; }
.cart-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; background: #fbfeff; }
.ticket-tools { display: flex; gap: 8px; align-items: center; }
.icon-button { min-width: 62px; }
#table-picker-toggle.active { background: #0799c8; border-color: #078db9; color: #fff; }
#ticket-type { width: 74px; flex: 0 0 auto; }
.cart-lines { padding: 12px 16px; overflow: auto; }
.cart-line { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid #edf1f2; padding: 11px 0; touch-action: pan-y; transition: transform .14s ease, background .14s ease; }
.cart-line.swipe-add { background: #e8f7ef; transform: translateX(8px); }
.cart-line.swipe-remove { background: #fff0ed; transform: translateX(-8px); }
.cart-line small { display: block; color: var(--muted); margin-top: 3px; }
.cart-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.kod-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.kod-badges em { display: inline-flex; align-items: center; min-height: 18px; padding: 1px 6px; border-radius: 999px; background: #e6f5fb; color: #08769c; font-size: 10px; font-style: normal; font-weight: 850; }
.qty { width: 34px; height: 34px; border-radius: 8px; background: #eef4f5; display: grid; place-items: center; font-weight: 780; }
.totals { border-top: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .grand { color: var(--ink); font-size: 24px; }
.totals .adjustments { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.totals .adjustments input { width: 100%; }
.actions { padding: 0 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .primary { grid-column: 1 / -1; height: 56px; font-size: 18px; }
.kod-filter { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kod-filter label { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #18576b; }
.kod-filter select { min-width: 220px; }
.kod-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #1d252b; border-radius: 8px; }
.kod-tabs button { min-height: 38px; color: #fff; background: transparent; border-color: transparent; }
.kod-tabs button.active { background: #fff; color: #111; }
.kod-board { column-width: 265px; column-gap: 6px; background: #071c35; border-radius: 8px; padding: 6px; min-height: calc(100vh - 130px); }
.kod-board.empty { display: grid; place-items: center; column-width: auto; }
.kod-empty { width: min(420px, 90%); min-height: 150px; border: 3px solid #20a937; border-radius: 8px; background: rgba(255,255,255,.96); color: #0b5f1d; display: grid; place-items: center; text-align: center; padding: 24px; box-shadow: 0 18px 44px rgba(0,0,0,.18); }
.kod-empty strong { display: block; font-size: 26px; line-height: 1.1; }
.kod-empty span { display: block; margin-top: 12px; font-size: 20px; font-weight: 900; }
.kod-ticket { --kod-edge: #d80032; --kod-edge-dark: #5a0010; break-inside: avoid-column; display: grid; background: #fff; border: 1px solid #07111d; border-left: 8px solid var(--kod-edge); border-radius: 0; padding: 0; overflow: hidden; margin: 0 0 6px; }
.kod-ticket.stage-preparing { --kod-edge: #ff9f2a; --kod-edge-dark: #8a4600; }
.kod-ticket.stage-ready { --kod-edge: #20a937; --kod-edge-dark: #075d18; }
.kod-ticket.stage-closing, .kod-ticket.served, .kod-ticket.cancelled { --kod-edge: #8a98a4; --kod-edge-dark: #343b42; }
.kod-ticket.late { --kod-edge: #d80032; --kod-edge-dark: #650014; animation: kodLateBlink .75s linear infinite; }
.kod-ticket.stage-preparing.late { --kod-edge: #ff9f2a; --kod-edge-dark: #8a4600; }
.kod-ticket.stage-ready.late { --kod-edge: #20a937; --kod-edge-dark: #075d18; }
@keyframes kodLateBlink { 50% { border-left-color: var(--kod-edge-dark); box-shadow: inset 8px 0 0 var(--kod-edge-dark); } }
.kod-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; background: #d80032; color: #fff; }
.kod-ticket.stage-preparing .kod-head { background: #ff9f2a; }
.kod-ticket.stage-ready .kod-head { background: #20a937; }
.kod-ticket.stage-closing .kod-head, .kod-ticket.served .kod-head, .kod-ticket.cancelled .kod-head { background: #5f6971; }
.kod-head h2 { margin: 0; font-size: 17px; }
.kod-head small { color: rgba(255,255,255,.82); }
.kod-ticket ul { list-style: none; margin: 0; padding: 8px 10px; display: grid; gap: 5px; background: #fff; color: #111827; border-radius: 0; }
.kod-ticket li { display: grid; grid-template-columns: 18px 1fr; column-gap: 5px; font-weight: 800; }
.kod-ticket li small { grid-column: 2; color: #5f6971; font-weight: 600; }
.kod-ticket li .kod-line-options { display: block; margin-top: 4px; color: #334155; font-size: 13px; line-height: 1.25; font-weight: 650; }
.kod-actions { display: grid; grid-template-columns: 1fr; gap: 0; }
.kod-ticket .kod-actions { padding: 0; }
.stage-action { position: relative; overflow: hidden; min-height: 46px; border-radius: 0; border: 0; color: #fff; font-weight: 900; }
.stage-action::after { content: ""; position: absolute; left: 0; bottom: 0; width: var(--progress, 0%); height: 5px; transition: width .3s linear; }
.stage-action.stage-start { background: #d80032; }
.stage-action.stage-start::after { background: #650014; }
.stage-action.stage-preparing { background: #ff9f2a; color: #1f1500; }
.stage-action.stage-preparing::after { background: #ad5b00; }
.stage-action.stage-ready { background: #20a937; }
.stage-action.stage-ready::after { background: #075d18; }
.stage-action.stage-ready.late { background: #20a937 !important; animation: none !important; }
.stage-action.stage-ready.late::after { background: #075d18; }
.stage-action.stage-closing, .stage-action.stage-closed { background: #6d7780; }
.stage-action.stage-closing::after, .stage-action.stage-closed::after { background: #343b42; }
.tables { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
#floors { padding: 12px; display: grid; gap: 10px; align-content: start; }
.floor { height: 54px; display: flex; align-items: center; justify-content: space-between; background-size: cover; background-position: center; }
.floor.active { background: var(--dark); border-color: var(--dark); color: #fff; }
.table-map { padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); grid-auto-rows: 94px; gap: 12px; align-content: start; min-height: calc(100vh - 230px); }
.table-card { border: 1px solid var(--line); border-radius: 8px; background: #f9fffb; padding: 10px; display: grid; align-content: space-between; cursor: pointer; }
.table-card.busy, .table-card.has-draft { background: #fff4e7; border-color: #ecc28a; }
.table-card.selected { box-shadow: inset 0 0 0 2px #0799c8; }
.table-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.table-badges em { border-radius: 999px; background: rgba(7,153,200,.12); color: #08769c; padding: 2px 6px; font-size: 10px; font-style: normal; font-weight: 850; }
.table-tools { overflow: visible; }
.table-admin-form { margin-bottom: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.table-picker-panel { min-height: 0; overflow: hidden; display: grid; grid-template-rows: 84px minmax(0, 1fr); gap: 8px; }
.table-picker-panel.hidden { display: none; }
.catalog.table-mode .toolbar, .catalog.table-mode .category-pager, .catalog.table-mode .products { display: none; }
.pos-floor-list, .pos-table-list { min-height: 0; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) 14px; gap: 4px; align-content: start; }
.pos-floor-list .pager-track, .pos-table-list .pager-track { grid-column: 1; }
.pos-floor-list .pager-dots, .pos-table-list .pager-dots { grid-column: 1; }
.floor-page { grid-template-columns: repeat(auto-fill, 140px); grid-auto-rows: 58px; }
.table-page { grid-template-columns: repeat(auto-fill, 140px); grid-auto-rows: 112px; }
.pos-floor-list button, .pos-table-button { min-height: 0; height: 100%; border-color: rgba(255,255,255,.58); background: rgba(255,255,255,.86); color: #17566a; }
.pos-floor-list button.active { background: #0799c8; border-color: #078db9; color: #fff; }
.pos-table-button { display: grid; align-content: center; justify-items: center; gap: 6px; text-align: center; }
.pos-table-button .table-badges { justify-content: center; }
.pos-table-button .table-badges em { background: rgba(7,153,200,.16); }
.pos-table-button.busy, .pos-table-button.has-draft { background: #fff4e7; border-color: #ecc28a; }
.pos-table-button.active { background: #0b875b; border-color: #0b875b; color: #fff; }
.cart-line.kod-sent .qty { background: #0b875b; color: #fff; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.metric span { color: var(--muted); font-weight: 760; }
.metric strong { display: block; margin-top: 10px; font-size: 30px; }
.manager-grid { display: grid; grid-template-columns: 1fr 370px; gap: 16px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 16px; }
.admin-single { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.setup-two-col { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); gap: 16px; align-items: start; }
.options-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel h2 { padding: 16px; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-title h2 { border-bottom: 0; }
.panel-title button { width: 42px; min-width: 42px; margin-right: 12px; font-size: 24px; line-height: 1; color: #0799c8; }
.panel-title .title-filter { width: min(240px, 48%); margin-right: 12px; height: 40px; }
table { width: 100%; border-collapse: collapse; }
td { padding: 12px 16px; border-bottom: 1px solid #edf1f2; }
#recent, #devices, .api-list { padding: 12px; display: grid; gap: 10px; }
.row, .api-list code { background: #f7faf9; border-radius: 8px; padding: 12px; display: flex; justify-content: space-between; gap: 12px; }
.edit-form { padding: 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-form label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.edit-form input[type="checkbox"] { width: 18px; height: 18px; }
.switch-field { justify-content: space-between; min-height: 44px; padding: 6px 0; }
.switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 54px; height: 30px; border-radius: 999px; background: #cfd8dc; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: background .18s ease; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); transition: transform .18s ease; }
.switch-field input:checked + .switch { background: #0b875b; }
.switch-field input:checked + .switch::after { transform: translateX(24px); }
.switch-field strong { margin-right: auto; color: #31464f; }
.kod-select-row { display: grid; grid-template-columns: minmax(150px, 190px) 1fr; gap: 10px; align-items: stretch; }
.kod-select-row .switch-field { align-self: start; }
.kod-select-row select { min-height: 116px; }
.kod-select-row select:disabled { opacity: .45; background: #eef1f2; }
.file-input { min-height: 46px; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; background: #f9fbfb; justify-content: space-between; }
.file-input input { height: auto; border: 0; padding: 0; background: transparent; }
.image-preview { display: none; width: 96px; height: 72px; border-radius: 6px; border: 1px solid var(--line); background: transparent center/cover no-repeat; }
.image-preview.has-image { display: block; }
.image-preview.hidden { display: none !important; width: 0; height: 0; border: 0; margin: 0; padding: 0; background-image: none !important; }
.image-preview-row { display: flex; align-items: center; gap: 8px; min-height: 0; }
.image-preview-row:has(.image-preview.hidden) { display: none; }
.image-delete { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 999px; font-size: 24px; line-height: 1; display: grid; place-items: center; }
.image-delete.hidden { display: none !important; }
.color-swatches { display: grid; grid-template-columns: repeat(10, 28px); gap: 7px; align-items: center; }
.color-swatches button { width: 28px; height: 28px; min-height: 28px; padding: 0; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.color-swatches button.active { box-shadow: 0 0 0 3px #0799c8; }
.form-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.danger { background: #c93434; border-color: #b72828; color: #fff; }
.hidden { display: none !important; }
.admin-list { padding: 12px; display: grid; gap: 8px; max-height: min(76vh, 1160px); overflow: auto; align-content: start; }
#admin-products, #admin-categories { max-height: 1120px; }
#admin-products .admin-row, #admin-categories .admin-row { min-height: 48px; padding: 8px 10px; }
#admin-products .admin-row button, #admin-categories .admin-row button { min-height: 36px; }
.admin-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: #fff; }
.admin-row.inactive { background: #eef1f2; color: #73818a; }
.admin-row.inactive strong { color: #667780; }
.admin-row small { color: var(--muted); display: block; margin-top: 3px; }
.admin-title-line { display: inline-flex; align-items: center; gap: 8px; }
.admin-color-dot { width: 15px; height: 15px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); display: inline-block; flex: 0 0 auto; }
.detail-box { padding: 16px; color: var(--muted); }
.closecash-totals { padding: 0 16px 16px; display: grid; gap: 8px; }
.closecash-totals div, .closecash-difference { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfc; }
.closecash-totals span { color: var(--muted); font-weight: 700; }
.closecash-difference { margin: 0 16px 16px; background: #eef9f1; border-color: #b9e2c2; font-size: 18px; }
.admin-row.active-row { border-color: #2f80ed; background: #eef6ff; }
button:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(12, 21, 28, .48); display: grid; place-items: center; padding: 18px; }
.modal.hidden { display: none; }
.modal-card { width: min(520px, 100%); background: #fff; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.28); overflow: hidden; }
.modal-head { height: 66px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.payment-summary { padding: 16px; display: grid; gap: 10px; }
.payment-summary div, .payment-summary label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.payment-summary input { width: 170px; }
.payment-summary .grand { color: var(--ink); font-size: 24px; }
.payment-types { padding: 0 16px 16px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.payment-types button { min-height: 60px; font-size: 18px; }
.options-body { padding: 16px; display: grid; gap: 14px; max-height: 60vh; overflow: auto; background: #eef8fb; }
.option-group { display: grid; gap: 10px; }
.option-group strong { font-size: 16px; color: #17566a; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.option-group strong small { color: var(--muted); font-size: 12px; font-weight: 800; }
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.option-choice { position: relative; min-height: 74px; display: grid; place-items: center; border: 1px solid rgba(14, 137, 173, .28); border-radius: 6px; padding: 12px 9px 9px; background: linear-gradient(180deg, #fff 0%, #d6f1f8 100%); color: #17566a; text-align: center; overflow: hidden; }
.option-choice .tile-name { color: #17566a; text-shadow: none; max-width: 100%; }
.option-choice .tile-name-sm, .option-choice .tile-name-xs { line-height: 1.08; }
.option-choice input { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; accent-color: #0799c8; }
.option-choice small { display: block; margin-top: 3px; color: #0b875b; font-size: 12px; font-weight: 850; }
.option-choice:has(input:checked) { border-color: #0799c8; box-shadow: inset 0 0 0 2px #0799c8; background: #fff; }
.option-title { border-top: 1px solid var(--line); }
.option-assignment-list { display: grid; gap: 8px; max-height: 430px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbfb; }
.option-assignment { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(140px, 1fr); gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.option-assignment.active { border-color: rgba(7,153,200,.48); background: #eef9fc; }
.option-assignment-check { display: flex; align-items: center; gap: 8px; min-width: 0; }
.option-assignment-check input { width: 18px; height: 18px; flex: 0 0 auto; }
.option-assignment strong { color: #17566a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option-assignment input { width: 100%; min-width: 0; }
.option-assignment-meta { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(54px, 1fr)); gap: 8px; }
.option-assignment-empty { padding: 10px; border: 1px dashed var(--line); border-radius: 8px; background: #f9fbfb; }
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow: auto; }
  .brand { min-width: 210px; }
  .pos-grid, .manager-grid, .admin-grid, .setup-two-col, .options-admin-grid, .tables { grid-template-columns: 1fr; height: auto; }
  .category-page, .product-page, .catalog.no-subcategories .product-page { grid-template-columns: repeat(4, 140px); grid-auto-rows: 112px; }
  .form-row { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-assignment { grid-template-columns: 1fr 1fr; }
  .option-assignment strong { grid-column: 1 / -1; }
  .option-assignment-meta { grid-template-columns: repeat(4, minmax(48px, 1fr)); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .top-search.open input, .top-search:focus-within input { width: min(280px, 42vw); }
}

@media (max-width: 520px) {
  main { padding: 8px; }
  .top { height: 52px; }
  .pos-grid { height: calc(100vh - 68px); grid-template-columns: 1fr; }
  .status { gap: 6px; }
  .pill { padding: 8px 9px; }
  .top-search { position: relative; }
  .top-search.open input, .top-search:focus-within input { position: absolute; right: 0; top: 48px; z-index: 5; width: min(320px, calc(100vw - 24px)); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
  .catalog { grid-template-rows: 102px 102px minmax(0, 1fr); padding: 6px; gap: 5px; }
  .catalog.parent-one-line, .catalog.sub-one-line, .catalog.parent-one-line.sub-one-line { grid-template-rows: 102px 102px minmax(0, 1fr); }
  .catalog.no-subcategories, .catalog.no-subcategories.parent-one-line { grid-template-rows: 102px minmax(0, 1fr); }
  .button-pager { grid-template-columns: 20px minmax(0, 1fr); }
#products::before { width: 20px; height: 84px; }
  .category-page, .product-page, .catalog.no-subcategories .product-page { grid-template-columns: repeat(3, 98px); grid-auto-rows: 84px; gap: 6px; }
  .table-page { grid-template-columns: repeat(3, 98px); grid-auto-rows: 84px; gap: 6px; }
  .floor-page { grid-template-columns: repeat(3, 98px); grid-auto-rows: 58px; gap: 6px; }
  .category-tile, .product { width: 98px; height: 84px; min-height: 84px; }
  .tile-name { font-size: 12px; }
  .tile-price { font-size: 11px; padding: 3px 5px; }
}
