:root {
  --green: #a78bfa;
  --green-dark: #7c3aed;
  --green-soft: #f4efff;
  --teal: #8b7ad8;
  --pink: #c084fc;
  --blue: #7c83e6;
  --indigo: #9270d8;
  --amber: #b98cff;
  --brown: #8d6e63;
  --slate: #607d8b;
  --ink: #20252b;
  --muted: #66727f;
  --line: #dde3e8;
  --line-strong: #cbd5dd;
  --paper: #ffffff;
  --canvas: #f8f6fc;
  --danger: #d84343;
  --shadow: 0 2px 8px rgba(20, 26, 31, 0.14);
  --shadow-soft: 0 1px 4px rgba(20, 26, 31, 0.12);
  --sidebar: 264px;
  --topbar: 40px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.noscript {
  padding: 24px;
  color: var(--danger);
}

.svg-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: currentColor;
  vertical-align: middle;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #f4f4f4;
}

.login-card {
  width: min(480px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
  padding: 30px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-logo {
  display: grid;
  width: 42px;
  height: 42px;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.brand-logo span {
  border: 3px solid #a78bfa;
  border-radius: 4px;
}

.brand-text strong {
  display: block;
  color: #7c3aed;
  font-size: 26px;
  line-height: 1;
}

.brand-text small {
  display: block;
  color: #9b8eb8;
  font-size: 10px;
  letter-spacing: 5px;
  margin-top: 3px;
  text-transform: uppercase;
}

.login-title {
  margin: 0 0 34px;
  font-size: 24px;
  font-weight: 400;
}

.field-line {
  position: relative;
  margin: 0 0 24px;
}

.field-line label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 16px;
}

.field-line input,
.field-line textarea,
.field-line select {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid #9da6ad;
  background: transparent;
  outline: 0;
  padding: 6px 0;
}

.field-line input:focus,
.field-line textarea:focus,
.field-line select:focus {
  border-bottom-color: var(--green);
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
}

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

.remember input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.login-links {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.link-button,
a {
  color: #0879e6;
  text-decoration: none;
}

.link-button {
  border: 0;
  background: none;
  padding: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: var(--topbar);
  align-items: center;
  gap: 12px;
  background: var(--green);
  box-shadow: var(--shadow-soft);
  color: #fff;
  padding: 0 18px;
}

.topbar-title {
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-spacer {
  flex: 1;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: var(--topbar);
  bottom: 0;
  left: 0;
  width: var(--sidebar);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--paper);
  transition: transform 0.18s ease;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding-top: var(--topbar);
  transition: margin-left 0.18s ease;
}

.page {
  width: min(1180px, calc(100vw - var(--sidebar) - 40px));
  padding: 18px 20px 56px;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

body.sidebar-collapsed .main {
  margin-left: 0;
}

body.sidebar-collapsed .page {
  width: auto;
}

.page.page-wide {
  width: auto;
}

.profile-strip {
  display: grid;
  min-height: 54px;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
}

.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #9e9e9e;
  color: #fff;
}

.profile-name,
.profile-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-email {
  color: var(--muted);
  font-size: 12px;
}

.nav-section {
  border-bottom: 1px solid var(--line);
}

.nav-main,
.nav-child {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 18px;
  text-align: left;
}

.nav-main {
  font-weight: 700;
}

.nav-child {
  min-height: 30px;
  padding-left: 66px;
  font-size: 13px;
}

.nav-main:hover,
.nav-child:hover,
.nav-main.active,
.nav-child.active {
  background: #eeeeee;
}

.nav-main.active {
  box-shadow: inset 4px 0 currentColor;
}

.nav-child.active {
  color: var(--green-dark);
}

.nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  color: #737b81;
  transform: rotate(0deg);
}

.nav-section.open .chevron {
  transform: rotate(180deg);
}

.nav-children {
  display: none;
  padding: 6px 0 12px;
}

.nav-section.open .nav-children {
  display: block;
}

.tone-reports { color: var(--green); }
.tone-items { color: var(--pink); }
.tone-inventory { color: #9a78e6; }
.tone-employees { color: var(--teal); }
.tone-customers { color: var(--indigo); }
.tone-settings { color: var(--slate); }
.tone-help { color: #8b5cf6; }
.tone-pos { color: var(--amber); }

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
}

.icon-button:hover {
  background: rgba(0, 0, 0, 0.08);
}

.button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #eef2f4;
  color: var(--ink);
  font-weight: 700;
  padding: 0 13px;
  text-transform: uppercase;
}

.button.primary {
  background: var(--green);
  box-shadow: var(--shadow-soft);
  color: #fff;
}

.button.green {
  background: var(--green);
  color: #fff;
}

.button.flat {
  background: transparent;
  color: var(--green-dark);
}

.button.danger {
  background: #ffeaea;
  color: var(--danger);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.filter {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  padding: 0 10px;
}

.filter input,
.filter select,
.filter .mini-input {
  width: 150px;
  border: 0;
  background: transparent;
  outline: 0;
}

.filter-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.date-filter input {
  width: 132px;
}

.mini-input {
  min-height: 30px;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.panel-header,
.table-header {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}

.panel-header h2,
.table-header h2,
.content-title {
  margin: 0;
  font-size: 16px;
}

.content-title {
  font-size: 18px;
  font-weight: 500;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 86px;
  padding: 16px 22px 12px;
}

.metric.active {
  box-shadow: inset 0 -2px var(--green);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111;
  font-size: 12px;
}

.metric-value {
  margin-top: 8px;
  font-size: 24px;
}

.metric-sub {
  color: #111;
  font-size: 11px;
}

.chart-card {
  min-height: 260px;
  padding: 18px 20px 22px;
}

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

.chart-canvas {
  width: 100%;
  min-height: 220px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 2fr);
}

.split-line {
  border-right: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

.list-more-row {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding: 14px;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 20px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #52606d;
  font-size: 12px;
  font-weight: 500;
}

td.num,
th.num {
  text-align: left;
}

tbody tr:hover {
  background: #fafafa;
}

.table-footer {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 8px 14px;
  color: #111;
  font-size: 12px;
}

.pager {
  display: inline-flex;
  border: 1px solid var(--line);
}

.pager button {
  display: grid;
  width: 46px;
  height: 30px;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
}

.pager button:last-child {
  border-right: 0;
}

.empty-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 50%;
  background: #f1f1f1;
  color: #9e9e9e;
  margin: 0 auto 16px;
}

.empty-title {
  color: #5b6670;
  font-size: 22px;
  margin-bottom: 8px;
}

.empty-copy {
  color: var(--muted);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.kpi {
  display: flex;
  min-height: 86px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  padding: 14px 18px;
}

.kpi-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.kpi-value {
  font-size: 28px;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #edf1f3;
  color: #41505c;
  font-size: 12px;
  padding: 2px 9px;
  white-space: nowrap;
}

.badge.ok {
  background: #e2f4e4;
  color: var(--green-dark);
}

.badge.warn {
  background: #fff3dc;
  color: #a56400;
}

.badge.danger {
  background: #ffe5e5;
  color: var(--danger);
}

.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  color: #53606b;
  font-size: 12px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  padding: 8px 10px;
}

.form-field textarea {
  min-height: 86px;
  resize: vertical;
}

.import-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf8ff;
  padding: 16px;
  margin-bottom: 18px;
}

.import-box h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: start center;
  overflow-y: auto;
  background: rgba(11, 20, 28, 0.42);
  padding: 42px 20px;
}

.modal {
  width: min(620px, 100%);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(10, 20, 28, 0.3);
}

.modal.large {
  width: min(900px, 100%);
}

.modal-header,
.modal-footer {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.modal-title {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 20px;
}

.toast-stack {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  border-radius: 4px;
  background: #263238;
  box-shadow: var(--shadow);
  color: #fff;
  padding: 12px 14px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 376px minmax(420px, 1fr);
  gap: 18px;
}

.settings-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}

.settings-heading {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.settings-heading h2 {
  margin: 0;
  font-size: 18px;
}

.settings-heading span {
  color: var(--muted);
}

.settings-group-title {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.settings-group-title strong {
  display: block;
  font-size: 19px;
}

.settings-option {
  display: block;
  width: 100%;
  min-height: 43px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 50px;
  text-align: left;
}

.settings-option.active {
  background: #eeeeee;
}

.feature-list {
  padding: 18px 20px;
}

.feature-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 48px;
}

.feature-title {
  font-weight: 700;
}

.feature-copy {
  color: var(--muted);
  font-size: 13px;
}

.switch {
  position: relative;
  width: 31px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #9ea4a8;
  padding: 0;
}

.switch::after {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-soft);
  content: "";
  transition: transform 0.16s ease;
}

.switch.on {
  background: #d8ccff;
}

.switch.on::after {
  transform: translateX(14px);
  background: #8b5cf6;
}

.pos-layout {
  display: grid;
  height: calc(100vh - var(--topbar));
  min-height: 640px;
  grid-template-columns: minmax(560px, 1fr) 380px;
  margin: calc(var(--topbar) * -1) 0 0 calc(var(--sidebar) * -1);
  padding-top: var(--topbar);
}

body.sidebar-collapsed .pos-layout {
  margin: calc(var(--topbar) * -1) 0 0 0;
}

.pos-left {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  background: #f7f8f8;
}

.pos-ticket {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fff;
}

.pos-head {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 16px;
}

.pos-search {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
}

.result-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 9px 14px;
}

.tab {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #34424d;
  padding: 0 13px;
  white-space: nowrap;
}

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

.product-grid {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.product-tile {
  position: relative;
  display: grid;
  height: 126px;
  align-items: end;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--tile-bg);
  box-shadow: var(--shadow-soft);
  color: #fff;
  padding: 0;
  text-align: left;
}

.product-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-tile::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.28), transparent 18%),
    radial-gradient(circle at 30% 42%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.58));
  content: "";
  z-index: 1;
}

.product-tile::after {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.08);
  content: "";
  z-index: 1;
}

.product-tile.low-stock {
  box-shadow: inset 0 0 0 3px #ffca28, var(--shadow-soft);
}

.show-more-tile {
  min-height: 126px;
  border: 1px dashed #a78bfa;
  background: #f5f0ff;
  color: #5b21b6;
}

.show-more-tile::before,
.show-more-tile::after {
  display: none;
}

.product-info {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.product-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.product-price {
  font-size: 12px;
}

.pos-bottom-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
}

.ticket-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
}

.ticket-title {
  font-size: 18px;
  font-weight: 700;
}

.ticket-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.photo-upload {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.photo-preview,
.photo-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--green-soft);
  color: var(--green-dark);
}

.photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 6px;
}

.photo-preview img,
.photo-thumb {
  object-fit: cover;
}

.photo-preview img,
.photo-thumb:not(.empty) {
  width: 100%;
  height: 100%;
}

.photo-thumb {
  width: 42px;
  height: 42px;
  border-radius: 4px;
}

.photo-thumb.empty .svg-icon {
  width: 18px;
  height: 18px;
}

.cell-center {
  display: block;
  text-align: left;
}

.ticket-controls select,
.ticket-controls input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 8px;
}

.ticket-lines {
  overflow-y: auto;
}

.ticket-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
}

.line-name {
  font-weight: 700;
}

.line-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.line-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.qty-button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.ticket-total {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
}

.total-row {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  color: #34424d;
}

.total-row.strong {
  color: #111;
  font-size: 18px;
  font-weight: 700;
}

.payment-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.ticket-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 10px;
}

.quick-discounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.receipt-preview {
  width: min(330px, 100%);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 18px;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.receipt-preview h3 {
  margin: 0 0 12px;
  text-align: center;
}

.receipt-preview .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.subtle-banner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 16px 20px;
}

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

.stat-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.row-click {
  cursor: pointer;
}

.hide {
  display: none !important;
}

@media (max-width: 1100px) {
  .metric-row,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .pos-layout {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 0;
  }

  .pos-ticket {
    min-height: 520px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar: 264px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .page {
    width: auto;
    padding: 14px 12px 44px;
  }

  .grid-2,
  .input-row,
  .kpi-strip,
  .metric-row,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .split-line {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filter {
    width: 100%;
  }

  .filter input,
  .filter select,
  .filter .mini-input {
    width: 100%;
  }

  .subtle-banner {
    grid-template-columns: 36px 1fr;
  }

  .subtle-banner .inline-actions {
    grid-column: 1 / -1;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  }

  .ticket-controls,
  .payment-row,
  .ticket-actions {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 24px;
  }
}
