:root {
  --bg: #f2f6f4;
  --card: #ffffff;
  --ink: #0b1c16;
  --muted: #5c746d;
  --faint: #8aa39b;
  --line: #e2eae7;
  --line-soft: #eef4f2;
  --brand: #0f9d6e;
  --brand-dark: #0a7d57;
  --brand-soft: #e6f7ef;
  --sidebar: #08201a;
  --side-line: rgba(255, 255, 255, 0.07);
  --side-ink: #a9c6bd;
  --amber: #b45309;
  --amber-soft: #fdf2e3;
  --red: #b42318;
  --red-soft: #fdecea;
  --blue: #1d5fb8;
  --blue-soft: #eaf1fc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 28, 22, 0.04), 0 10px 30px -22px rgba(11, 28, 22, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.ic {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- shell ---------- */
.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px 14px;
  background: linear-gradient(180deg, #09221b 0%, #061711 100%);
  color: var(--side-ink);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 6px 16px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #1ecf9a, #0a7d57);
  color: #04150f;
  box-shadow: 0 8px 18px -10px rgba(30, 207, 154, 0.9);
}

.brand-name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.15;
  color: #ecf9f4;
}

.brand-sub {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6ea393;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-sec {
  padding: 14px 10px 6px;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5b8578;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--side-ink);
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e9f7f2;
}

.nav-item.active {
  background: rgba(30, 205, 150, 0.14);
  color: #8ff0c9;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 3px;
  background: #23d69b;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
}

.nav-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(244, 183, 91, 0.16);
  color: #f3c078;
  font-size: 10.5px;
  font-weight: 600;
}

.side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--side-line);
  font-size: 11.5px;
  color: #6f9489;
  line-height: 1.6;
}

.side-foot strong {
  color: #a9c6bd;
  font-weight: 600;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
}

.crumb {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 157, 110, 0.14);
}

.chip .ic {
  width: 14px;
  height: 14px;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  border: 1px solid #f3ddbd;
  color: var(--amber);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(140deg, #1ecf9a, #0a7d57);
  color: #04150f;
  font-size: 11px;
  font-weight: 700;
}

.user-meta {
  display: grid;
  line-height: 1.2;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
}

.user-role {
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.content {
  flex: 1;
  padding: 22px 22px 40px;
  overflow-y: auto;
  outline: none;
}

/* ---------- page furniture ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.split2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.split2.even {
  grid-template-columns: 1fr 1fr;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card-head h2 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.card-sub {
  color: var(--faint);
  font-size: 12px;
}

.stat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.stat-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.stat-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.stat-value {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-trend {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.stat-trend.up {
  color: var(--brand-dark);
}

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.12s ease;
}

.table tbody tr:hover {
  background: #f8fbfa;
}

.table tbody tr.clickable {
  cursor: pointer;
}

.table tr:last-child td {
  border-bottom: 0;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-strong {
  font-weight: 600;
}

.cell-sub {
  display: block;
  color: var(--faint);
  font-size: 11.5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-ok {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.pill-low,
.pill-soon {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill-out,
.pill-expired {
  background: var(--red-soft);
  color: var(--red);
}

.pill-neutral {
  background: #f1f5f4;
  color: var(--muted);
}

.pill-pos {
  background: var(--blue-soft);
  color: var(--blue);
}

.pill-phone {
  background: #f3ecfd;
  color: #6d3fb8;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: var(--ink);
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(15, 157, 110, 0.9);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: #cfddd8;
  color: var(--ink);
  background: #fbfdfc;
}

.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-soft:hover {
  background: #d9f2e7;
}

.btn-sm {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* ---------- inputs ---------- */
.field {
  display: grid;
  gap: 5px;
}

.field label,
.lbl {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.input,
.select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.input:focus,
.select:focus {
  border-color: #8dd9bd;
  box-shadow: 0 0 0 3px rgba(15, 157, 110, 0.12);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.search .ic {
  color: var(--faint);
}

.search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  padding: 10px 0;
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid #d9e3df;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f7faf9;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10.5px;
  white-space: nowrap;
}

/* ---------- dashboard ---------- */
.chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-label {
  fill: #93a8a1;
  font-size: 10px;
}

.list {
  display: grid;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.list-row:last-child {
  border-bottom: 0;
}

.list-main {
  min-width: 0;
}

.list-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta {
  color: var(--faint);
  font-size: 11.5px;
}

.list-right {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.empty {
  padding: 26px 10px;
  text-align: center;
  color: var(--faint);
  font-size: 12.5px;
}

/* ---------- POS ---------- */
.pos {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.pos-list {
  max-height: 520px;
  overflow-y: auto;
  margin: 0 -4px;
}

.pos-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line-soft);
}

.pos-item:last-child {
  border-bottom: 0;
}

.pos-item.out {
  opacity: 0.55;
}

.pos-item-name {
  font-weight: 600;
}

.pos-item-meta {
  color: var(--faint);
  font-size: 11.5px;
}

.pos-price {
  margin-left: auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.add-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #cfe8de;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.add-btn:hover {
  background: #d7f1e6;
}

.add-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cart-list {
  display: grid;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.cart-name {
  font-weight: 600;
  font-size: 13px;
}

.cart-meta {
  color: var(--faint);
  font-size: 11px;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.qty-btn {
  width: 26px;
  height: 27px;
  border: 0;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.qty-btn:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.qty-val {
  min-width: 26px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.line-total {
  min-width: 78px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.remove-btn {
  border: 0;
  background: none;
  color: #b9c8c3;
  display: grid;
  place-items: center;
}

.remove-btn:hover {
  color: var(--red);
}

.totals {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.total-row b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.total-row.grand {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}

.total-row.grand b {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.inline-input {
  width: 92px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: right;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.inline-input:focus {
  border-color: #8dd9bd;
  box-shadow: 0 0 0 3px rgba(15, 157, 110, 0.12);
}

.change-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f6faf8;
  font-size: 12.5px;
  color: var(--muted);
}

.change-row b {
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.shortcut-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px dashed #d8e5e0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
  color: var(--muted);
}

.shortcut-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- tabs / filters ---------- */
.tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  gap: 2px;
}

.tab {
  border: 0;
  border-radius: 7px;
  padding: 6px 11px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.tab.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

/* ---------- chat ---------- */
.chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chat-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, #16b985, #0a7d57);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 30px -12px rgba(10, 125, 87, 0.65);
}

.chat-bubble:hover {
  filter: brightness(1.05);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  width: 348px;
  max-width: calc(100vw - 32px);
  height: 470px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px -24px rgba(11, 28, 22, 0.5);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fcfa, #fff);
}

.chat-head .avatar {
  width: 32px;
  height: 32px;
}

.chat-title {
  font-size: 13px;
  font-weight: 700;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}

.chat-close {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--faint);
  display: grid;
  place-items: center;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  gap: 9px;
  align-content: start;
  background: #fbfdfc;
}

.msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.msg.bot {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: #22352f;
}

.msg.user {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 8px;
  background: #fbfdfc;
}

.chat-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  padding: 4px 9px;
}

.chat-chip:hover {
  border-color: #bfe3d6;
  color: var(--brand-dark);
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  outline: none;
}

.chat-form input:focus {
  border-color: #8dd9bd;
  box-shadow: 0 0 0 3px rgba(15, 157, 110, 0.12);
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 11px;
  background: #0f2a22;
  color: #eafaf4;
  font-size: 12.5px;
  box-shadow: 0 18px 40px -18px rgba(9, 30, 24, 0.8);
  animation: toast-in 0.18s ease;
}

.toast.warn {
  background: #4a2c0c;
  color: #ffe9cd;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- modal ---------- */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 22, 17, 0.45);
  backdrop-filter: blur(3px);
}

.modal {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  margin: 6vh auto 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px -30px rgba(6, 22, 17, 0.6);
  overflow: hidden;
  animation: modal-in 0.16s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 15px;
}

.modal-close {
  margin-left: auto;
  border: 0;
  background: #f4f8f6;
  border-radius: 9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.receipt {
  font-variant-numeric: tabular-nums;
}

.receipt-head {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.receipt-head h4 {
  margin: 0 0 2px;
  font-size: 15px;
}

.receipt-head p {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}

.receipt-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.receipt-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 6px 0;
  font-size: 12.5px;
}

.receipt-line span:nth-child(2) {
  color: var(--faint);
}

.receipt-line span:last-child {
  min-width: 70px;
  text-align: right;
  font-weight: 600;
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  font-weight: 700;
}

.receipt-thanks {
  margin-top: 12px;
  text-align: center;
  font-size: 11.5px;
  color: var(--faint);
}

.notice {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f0e0c6;
  border-radius: 10px;
  background: #fffaf3;
  color: #7a4c12;
  font-size: 12.5px;
  line-height: 1.5;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ---------- command palette ---------- */
.palette-root {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(6, 22, 17, 0.42);
  backdrop-filter: blur(3px);
  padding-top: 12vh;
}

.palette {
  width: min(600px, calc(100vw - 32px));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 80px -30px rgba(6, 22, 17, 0.6);
  overflow: hidden;
}

.palette-input {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.palette-input input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 14px;
  background: none;
}

.palette-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
}

.palette-item .ic {
  color: var(--faint);
}

.palette-item.active,
.palette-item:hover {
  background: var(--brand-soft);
}

.palette-kind {
  margin-left: auto;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.palette-item.active .palette-kind {
  color: var(--brand-dark);
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .app {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 10px;
    align-items: center;
  }

  .brand {
    justify-content: center;
    padding-bottom: 12px;
  }

  .brand-text,
  .nav-label,
  .nav-badge,
  .nav-sec,
  .side-foot {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
  }

  .nav-item.active::before {
    left: -10px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .pos,
  .split2,
  .split2.even {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-meta {
    display: none;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 16px 14px 90px;
  }

  .topbar {
    padding: 0 14px;
    height: 56px;
  }

  .demo-pill {
    display: none;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid2,
  .grid3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat {
    right: 14px;
    bottom: 14px;
  }

  .chat-panel {
    height: 60vh;
  }
}

@media print {
  body.printing .app,
  body.printing #chatRoot,
  body.printing .toasts,
  body.printing .palette-root {
    display: none !important;
  }

  body.printing .modal-root {
    position: static;
    display: block;
  }

  body.printing .modal-backdrop,
  body.printing .modal-close,
  body.printing .modal-foot {
    display: none !important;
  }

  body.printing .modal {
    box-shadow: none;
    border: 0;
    margin: 0;
    width: 100%;
    max-height: none;
  }
}
