/* EziMobile — hand-written UI. Roboto, calm cool neutrals, one ink-blue accent. */
@font-face { font-family: Roboto; font-weight: 300; font-display: swap; src: url(../fonts/roboto-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 400; font-display: swap; src: url(../fonts/roboto-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/roboto-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 500; font-display: swap; src: url(../fonts/roboto-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 700; font-display: swap; src: url(../fonts/roboto-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Roboto Mono"; font-weight: 400; font-display: swap; src: url(../fonts/roboto-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Roboto Mono"; font-weight: 500; font-display: swap; src: url(../fonts/roboto-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e2e5eb;
  --line-2: #d0d5de;
  --text: #1b2230;
  --text-2: #4b5567;
  --muted: #7a8394;
  --side: #131b29;
  --side-2: #1c2638;
  --side-text: #b6c0d0;
  --accent: #1d4f91;
  --accent-2: #163e74;
  --accent-soft: #e6eef9;
  --blue: #1d6fa8; --blue-soft: #e4f1f9;
  --amber: #a15c07; --amber-soft: #fbf0dc;
  --red: #b42318; --red-soft: #fbe9e7;
  --violet: #5b3fa3; --violet-soft: #eeeaf8;
  --green: #1d7a4c; --green-soft: #e2f3e9;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(20, 28, 42, .06);
  --shadow-lg: 0 12px 32px rgba(20, 28, 42, .16);
  --mono: "Roboto Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14px/1.5 Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
.mono { font-family: var(--mono); font-size: .92em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 500; }
.nowrap { white-space: nowrap; }
.text-red { color: var(--red); } .text-green { color: var(--green); } .text-amber { color: var(--amber); }
.hide { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-mark { flex: none; margin-top: 1px; width: 32px; height: 32px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.brand-name { color: #fff; font-weight: 500; font-size: 15px; line-height: 1.2; }
.brand > div:last-child { min-width: 0; flex: 1; }
.brand-shop { font-size: 11.5px; color: #8b97ab; line-height: 1.35; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nav { padding: 8px 10px 18px; flex: 1; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #6c7a91; padding: 16px 10px 6px; font-weight: 500; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 5px; color: var(--side-text); font-size: 13.5px; text-decoration: none; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.on { background: #24324a; color: #fff; box-shadow: inset 3px 0 0 #5b93e0; }
.nav a .ic { color: #8b9ab2; }
.nav a.on .ic, .nav a:hover .ic { color: #d5e2f5; }
.nav .count { margin-left: auto; background: #7a3d0a; color: #ffe8c7; font-size: 11px; padding: 0 6px; border-radius: 9px; line-height: 18px; }
.side-foot { padding: 12px 18px; font-size: 11.5px; color: #69778d; border-top: 1px solid rgba(255,255,255,.06); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 58px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.top h1 { font-size: 17px; }
.crumbs { font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.today { font-size: 12.5px; color: var(--text-2); padding-right: 6px; }
.menu-btn { display: none; background: none; border: 0; padding: 6px; color: var(--text); cursor: pointer; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border-radius: 6px; cursor: pointer; position: relative; border: 1px solid transparent; background: none; font: inherit; color: inherit; }
.user-chip:hover { background: var(--surface-2); border-color: var(--line); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #dde6f3; color: var(--accent-2); display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.user-chip .u-name { font-size: 13px; line-height: 1.15; text-align: left; }
.user-chip .u-role { font-size: 11.5px; color: var(--muted); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 190px; padding: 6px; display: none; z-index: 40; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: flex; gap: 9px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 4px; color: var(--text); font: inherit; font-size: 13.5px; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); text-decoration: none; }

.content { padding: 22px 24px 40px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- elements ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 500 13.5px Roboto, sans-serif; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: #b7becb; }
.btn:focus-visible, .input:focus, .select:focus, textarea:focus { outline: 2px solid #8fb2e3; outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #f0b7b0; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #eceff3; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 30px; padding: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 14.5px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 16px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }

.stat { padding: 15px 16px; }
.stat .label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.stat .label .ic { color: var(--muted); }
.stat .value { font-size: 23px; font-weight: 500; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .foot { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.link { color: inherit; text-decoration: none; display: block; }
.stat.link:hover { border-color: var(--line-2); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 12px; border-bottom: 1px solid #eceff3; vertical-align: middle; }
.table tbody tr:hover td { background: #f9fafc; }
.table tr:last-child td { border-bottom: 0; }
.table tfoot td { font-weight: 500; background: var(--surface-2); border-top: 1px solid var(--line); }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { color: var(--text); font-weight: 500; }
.table.compact td { padding: 6px 10px; }
.table th.num, .table td.num { text-align: right; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border-radius: 10px; line-height: 19px; background: #eef1f5; color: var(--text-2); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .label-sm { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--red); }
.input, .select, textarea.input { height: 36px; width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 10px; font: 400 14px Roboto, sans-serif; color: var(--text); background: #fff; }
textarea.input { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d867f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.input.sm, .select.sm { height: 30px; font-size: 13px; }
.input.num { text-align: right; }
.input-group { display: flex; }
.input-group .addon { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line-2); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--surface-2); color: var(--muted); font-size: 13px; }
.input-group .input { border-radius: 0 var(--radius) var(--radius) 0; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input, .toolbar .select { width: auto; }
.toolbar .grow { flex: 1; min-width: 180px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 34px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--text-2); font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 500; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius); border: 1px solid; margin-bottom: 16px; font-size: 13.5px; }
.alert.ok { background: var(--green-soft); border-color: #b5dcc5; color: #145536; }
.alert.bad { background: var(--red-soft); border-color: #f3c3bd; color: #8a1c12; }
.alert.warn { background: var(--amber-soft); border-color: #efd29f; color: #7a4505; }
.alert ul { margin: 0; padding-left: 18px; }

.empty { text-align: center; padding: 42px 16px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: #b1b9c6; margin-bottom: 8px; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); gap: 10px; flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; }
.pager .pages a, .pager .pages span { min-width: 30px; height: 30px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--text-2); background: #fff; text-decoration: none; }
.pager .pages .on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager .pages .off { opacity: .45; }

.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 4px 12px; align-items: center; font-size: 13px; padding: 6px 0; }
.bar { height: 6px; background: #eceff3; border-radius: 3px; overflow: hidden; grid-column: 1 / -1; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #eceff3; font-size: 13.5px; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(14, 20, 32, .45); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 8vh 16px 16px; overflow-y: auto; }
.modal-back.open { display: flex; }
.modal { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15.5px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 18px; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-side { background: var(--side); color: #d3dae6; padding: 44px 52px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 100% 28px; pointer-events: none; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h1 { color: #fff; font-size: 30px; font-weight: 500; line-height: 1.25; max-width: 460px; margin-top: auto; }
.auth-side .lead { color: #a7b3c6; font-size: 15px; max-width: 440px; margin-top: 12px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 auto; display: grid; gap: 12px; max-width: 440px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #c7d0de; }
.auth-points .ic { color: #7fb0f0; margin-top: 1px; }
.auth-foot { font-size: 12px; color: #728097; margin-top: 30px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 22px; }
.demo-list { display: grid; gap: 8px; margin: 14px 0 6px; }
.demo-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; cursor: pointer; font: inherit; color: inherit; }
.demo-btn:hover { border-color: var(--accent); background: #f4f7fc; }
.demo-btn.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: #f1f5fc; }
.demo-btn .role { font-weight: 500; font-size: 13.5px; }
.demo-btn .what { font-size: 12px; color: var(--muted); }
.demo-btn .go { margin-left: auto; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.pos-search { position: relative; }
.pos-search .input { height: 46px; font-size: 15px; padding-left: 42px; }
.pos-search > .ic { position: absolute; left: 13px; top: 14px; color: var(--muted); }
.pos-search .kbd { position: absolute; right: 10px; top: 12px; }
.kbd { font: 500 11px var(--mono); background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; color: var(--text-2); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 30; max-height: 380px; overflow-y: auto; display: none; }
.results.open { display: block; }
.result { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 9px 14px; cursor: pointer; border-bottom: 1px solid #eef1f5; font-size: 13.5px; }
.result:last-child { border-bottom: 0; }
.result.on, .result:hover { background: #eef3fb; }
.result .r-name { font-weight: 500; }
.result .r-meta { font-size: 12px; color: var(--muted); }
.cart td { padding: 7px 10px; }
.cart .qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 5px; overflow: hidden; }
.cart .qty button { width: 28px; height: 30px; border: 0; background: var(--surface-2); cursor: pointer; color: var(--text-2); display: grid; place-items: center; }
.cart .qty button:hover { background: #e8ebf0; }
.cart .qty input { width: 46px; height: 30px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: inherit; }
.cart .input.sm { width: 86px; }
.pos-side .card-body { display: grid; gap: 12px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.sum-row .num { font-weight: 500; }
.grand { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; background: var(--side); color: #fff; border-radius: var(--radius); }
.grand .amt { font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pay-methods label { border: 1px solid var(--line-2); border-radius: 5px; text-align: center; padding: 7px 4px; font-size: 12.5px; cursor: pointer; }
.pay-methods input { display: none; }
.pay-methods input:checked + span { color: var(--accent-2); font-weight: 500; }
.pay-methods label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg label { padding: 6px 12px; font-size: 12.5px; cursor: pointer; border-right: 1px solid var(--line-2); }
.seg label:last-child { border-right: 0; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--accent); color: #fff; }
.cust-card { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; background: var(--surface-2); }
.quick-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 12px 16px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; cursor: pointer; background: #fff; text-align: left; font: inherit; color: inherit; }
.tile:hover { border-color: var(--accent); }
.tile .t-name { font-size: 13px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.tile .t-meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; }

/* ---------- documents / print ---------- */
.doc { background: #fff; max-width: 860px; margin: 0 auto; padding: 34px 38px; border: 1px solid var(--line); border-radius: var(--radius); }
.doc-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--text); }
.doc-head .shop { font-size: 20px; font-weight: 700; }
.doc-title { text-align: right; }
.doc-title .t { font-size: 22px; font-weight: 300; letter-spacing: .08em; text-transform: uppercase; }
.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 0; font-size: 13.5px; }
.doc .table th { background: #f2f4f7; }
.doc-total { margin-left: auto; width: 300px; margin-top: 10px; font-size: 13.5px; }
.doc-total .sum-row { padding: 4px 0; }
.doc-total .sum-row.big { border-top: 2px solid var(--text); margin-top: 6px; padding-top: 8px; font-size: 16px; font-weight: 700; }
.doc-foot { margin-top: 36px; display: flex; justify-content: space-between; gap: 30px; font-size: 12.5px; color: var(--text-2); }
.sign { border-top: 1px solid var(--text-2); padding-top: 6px; width: 180px; text-align: center; }

.receipt { width: 76mm; margin: 0 auto; background: #fff; padding: 10px 8px; font: 12px/1.4 Roboto, sans-serif; color: #000; }
.receipt .c { text-align: center; }
.receipt .shop { font-size: 15px; font-weight: 700; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td, .receipt th { padding: 2px 0; vertical-align: top; }
.receipt th { text-align: left; border-bottom: 1px dashed #000; font-weight: 500; }
.receipt .r { text-align: right; }
.receipt .dash { border-top: 1px dashed #000; margin: 6px 0; }
.receipt .big { font-size: 15px; font-weight: 700; }

.labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.label-card { border: 1px dashed #bbb; padding: 8px; text-align: center; font-size: 11px; break-inside: avoid; }
.label-card .ln { font-weight: 500; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-card svg { width: 100%; height: 42px; }
.label-card .lp { font-size: 14px; font-weight: 700; }

.print-bar { display: flex; gap: 8px; justify-content: center; margin: 0 auto 16px; max-width: 860px; }

@media print {
  body { background: #fff; }
  .side, .top, .print-bar, .no-print, .page-head .actions { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .doc { border: 0; padding: 0; max-width: none; }
  .card { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
  @page { margin: 12mm; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 60; transform: translateX(-100%); transition: transform .18s; }
  body.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; }
  .menu-btn { display: block; }
  .g-main, .g3, .pos { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .today { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .top { padding: 0 12px; }
  .g2, .g4, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .user-chip .u-meta { display: none; }
  .doc { padding: 18px; }
  .doc-meta { grid-template-columns: 1fr; }
  .doc-total { width: 100%; }
  .labels { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- mobile shop additions ---------- */
.branch-pick { display: flex; align-items: center; gap: 6px; }
.branch-pick .select { height: 32px; font-size: 13px; width: auto; min-width: 170px; padding-right: 28px; }
.branch-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.branch-chip .ic { width: 15px; height: 15px; }
.imei-search { position: relative; }
.imei-search .input { height: 32px; width: 190px; padding-left: 30px; font-size: 13px; font-family: var(--mono); }
.imei-search .ic { position: absolute; left: 9px; top: 8px; color: var(--muted); width: 15px; height: 15px; }
.nav .sub-count { margin-left: auto; background: #5a2420; color: #ffd9d4; font-size: 11px; padding: 0 6px; border-radius: 9px; line-height: 18px; }

.imei { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.imei-list { max-height: 380px; overflow-y: auto; }
.imei-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #eceff3; cursor: pointer; font-size: 13.5px; }
.imei-row:hover, .imei-row.on { background: #eef3fb; }
.imei-row .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kind-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }

.progress { height: 7px; background: #e6e9ef; border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.progress.late > span { background: var(--red); }
.sched td.late { color: var(--red); }
.sched tr.paid td { color: var(--muted); }
.sched tr.next td { background: #f4f7fc; }
.calc { display: grid; gap: 8px; }
.calc .sum-row { padding: 2px 0; }
.calc .big { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.calc .monthly { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: var(--radius); background: var(--side); color: #fff; }
.calc .monthly .amt { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.calc .monthly small { color: #a7b3c6; font-size: 12px; }
.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-group label { border: 1px solid var(--line-2); border-radius: 16px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; background: #fff; }
.pill-group input { display: none; }
.pill-group label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); font-weight: 500; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 4px 0 10px; }
.agree { font-size: 12.5px; line-height: 1.6; white-space: pre-line; color: var(--text-2); }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.who h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.stat .value.sm { font-size: 19px; }
.cart .imei { display: block; color: var(--text-2); }
@media (max-width: 960px) {
  .imei-search, .branch-pick .lbl { display: none; }
}
@media (max-width: 640px) {
  .who { grid-template-columns: 1fr; }
  .branch-pick .select { min-width: 0; max-width: 150px; }
}
.alert.info { background: var(--accent-soft); border-color: #c4d5ee; color: #1e3a63; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
@media (max-width: 640px) { .check-grid { grid-template-columns: 1fr; } }
