:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #657189;
  --line: #dfe4ee;
  --rose: #b63f6d;
  --teal: #0f766e;
  --green: #187736;
  --green-dark: #003f20;
  --gold: #b7791f;
  --blue: #2563eb;
  --danger: #c2410c;
  --good-bg: #e7f6ef;
  --warn-bg: #fff4d6;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px 1fr;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-locked {
  display: block;
  background: linear-gradient(180deg, #f6f7fb 0%, #e7f6ef 100%);
}

.login-screen {
  display: none;
}

body.auth-locked .login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

body.auth-locked .sidebar,
body.auth-locked .shell {
  display: none;
}

.login-card {
  width: min(100%, 390px);
  display: grid;
  gap: 13px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(23, 32, 51, .12);
}

.login-card img,
.login-card .app-logo {
  width: min(100%, 260px);
  height: 116px;
  justify-self: center;
  object-fit: contain;
  border-radius: 8px;
  background: #050505;
}

.login-card h1,
.login-card p {
  margin: 0;
  text-align: center;
}

.login-card small {
  min-height: 18px;
  color: var(--danger);
  font-weight: 800;
  text-align: center;
}

button,
input,
select,
a {
  font: inherit;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
  color: #fff;
  background: linear-gradient(180deg, #006029 0%, #003a1f 72%, #002d19 100%);
  overflow-y: auto;
}

.brand {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 8px;
  text-align: center;
}

.brand img,
.brand .app-logo {
  width: 176px;
  height: 86px;
  border-radius: 12px;
  object-fit: contain;
  border: 3px solid rgba(255,255,255,.85);
  background: #050505;
}

.brand strong,
.brand span,
.account strong,
.account span {
  display: block;
}

.brand strong {
  font-size: 14px;
  line-height: 1.15;
  text-transform: uppercase;
}

.brand span,
.account span {
  color: rgba(255,255,255,.76);
  font-size: 12px;
  margin-top: 4px;
}

.cloud-sync-status {
  min-width: 104px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.cloud-sync-status.online {
  border-color: #b9e8ca;
  color: var(--green);
  background: var(--good-bg);
}

.cloud-sync-status.connecting {
  border-color: #f4d58d;
  color: var(--gold);
  background: var(--warn-bg);
}

.cloud-sync-status.error,
.cloud-sync-status.offline {
  border-color: #fed7aa;
  color: var(--danger);
  background: #fff7ed;
}

nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: rgba(255,255,255,.9);
  background: transparent;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.nav-item span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.13);
}

.nav-item:hover,
.nav-item.active {
  color: #04391d;
  background: #fff;
}

.nav-item:hover span,
.nav-item.active span {
  color: #fff;
  background: var(--green);
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-group summary {
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-sub {
  display: grid;
  gap: 4px;
  padding-left: 42px;
}

.nav-sub-item {
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  text-decoration: none;
}

.nav-sub-item:hover,
.nav-sub-item.active {
  color: #04391d;
  background: #fff;
}

.account {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 8px 2px;
  border-top: 1px solid rgba(255,255,255,.2);
}

.logout-btn {
  margin-left: auto;
  padding: 7px 8px;
  font-size: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #41213a;
  font-weight: 900;
}

.shell {
  min-width: 0;
  padding: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0 18px;
  background: var(--bg);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

button,
.restore-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

button[type="submit"],
#approvePayrollBtn {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 800;
}

.icon-btn {
  display: none;
}

select,
input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  min-width: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.kpi,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(32, 44, 74, .05);
}

.kpi {
  padding: 16px;
  display: grid;
  gap: 6px;
}

.kpi span,
.kpi small {
  color: var(--muted);
}

.kpi strong {
  font-size: 24px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 12px;
}

.wide {
  grid-column: span 1;
}

.panel {
  padding: 16px;
  min-width: 0;
}

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

.panel h2 {
  margin: 0;
  font-size: 17px;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.dash-kpi {
  min-height: 96px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(32, 44, 74, .05);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 20px;
  font-weight: 900;
}

.dash-kpi.blue .kpi-icon { background: #155fb7; }
.dash-kpi.violet .kpi-icon { background: #7e57c2; }
.dash-kpi.gold .kpi-icon { background: #f2a400; }
.dash-kpi.danger .kpi-icon { background: #ef4444; }
.dash-kpi.warn .kpi-icon { background: #f59e0b; }

.dash-kpi span,
.dash-kpi small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.dash-kpi span {
  text-transform: uppercase;
  font-weight: 800;
}

.dash-kpi strong {
  display: block;
  margin: 5px 0 3px;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.dash-card {
  min-height: 210px;
  padding: 14px;
  grid-column: span 4;
  overflow: hidden;
}

.dash-wide {
  grid-column: span 8;
}

.dash-card .panel-head {
  margin-bottom: 10px;
}

.dash-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.dash-head button {
  padding: 6px 10px;
  border-color: #b8dfc2;
  background: #0f7a34;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.line-chart {
  position: relative;
  min-height: 180px;
}

.line-chart svg {
  width: 100%;
  height: 184px;
}

.grid-lines line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.line-this,
.line-last {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-this { stroke: #188038; }
.line-last { stroke: #9ca3af; }
.line-dot { fill: #188038; }
.line-chart text {
  fill: var(--muted);
  font-size: 12px;
}

.chart-legend {
  position: absolute;
  top: 0;
  left: 70px;
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

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

.chart-legend i {
  width: 24px;
  height: 4px;
  border-radius: 999px;
}

.chart-legend .green { background: #188038; }
.chart-legend .gray { background: #9ca3af; }

.donut-layout {
  display: grid;
  grid-template-columns: minmax(118px, 140px) 1fr;
  gap: 14px;
  align-items: center;
}

.donut {
  width: min(140px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.donut > div {
  width: 78px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background: #fff;
  text-align: center;
}

.donut strong {
  font-size: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.donut span,
.donut-legend span {
  color: var(--muted);
  font-size: 12px;
}

.donut-legend {
  display: grid;
  gap: 12px;
}

.donut-legend > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.donut-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-tile {
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.summary-tile span {
  min-height: 0;
  color: #1d4ed8;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-tile strong {
  align-self: center;
  color: #075985;
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.summary-tile small {
  color: var(--muted);
  font-size: 11px;
}

.summary-tile.warn { background: #fffbeb; border-color: #f6d365; }
.summary-tile.warn span,
.summary-tile.warn strong { color: #b45309; }
.summary-tile.danger { background: #fff1f2; border-color: #fca5a5; }
.summary-tile.danger span,
.summary-tile.danger strong { color: #b91c1c; }
.summary-tile.good { background: #f0fdf4; border-color: #bbf7d0; }
.summary-tile.good span,
.summary-tile.good strong { color: #166534; }

.mini-table {
  overflow: auto;
}

.mini-table table {
  min-width: 0;
}

.mini-table th,
.mini-table td {
  padding: 7px 6px;
  font-size: 11px;
  line-height: 1.25;
}

.bar-chart {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  align-items: end;
  min-height: 180px;
}

.bar-chart > div {
  display: inline-grid;
  gap: 8px;
  justify-items: center;
  align-items: end;
}

.bar-chart {
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.bar-pair {
  height: 112px;
  display: flex;
  align-items: end;
  gap: 6px;
}

.bar-pair i {
  width: 16px;
  display: block;
  border-radius: 4px 4px 0 0;
}

.bar-pair .sales { background: #2f9e44; }
.bar-pair .deposits { background: #1d64c8; }

.bar-chart span,
.bar-chart aside strong {
  color: var(--muted);
  font-size: 12px;
}

.bar-chart aside {
  display: grid;
  align-self: center;
  gap: 7px;
}

.bar-chart aside b {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.expense-list {
  display: grid;
  gap: 12px;
}

.expense-list > div {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.expense-list i {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.expense-list b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #188038;
}

.expense-total {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  text-align: center;
}

.expense-total span {
  color: #166534;
  text-transform: uppercase;
  font-size: 12px;
}

.expense-total strong {
  display: block;
  margin-top: 6px;
  color: #166534;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.approval-list,
.reminder-list {
  display: grid;
  gap: 11px;
}

.approval-list > div,
.reminder-list > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.approval-list span,
.reminder-list span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #188038;
  font-weight: 900;
}

.reminder-list p {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.warn-text {
  background: #f59e0b !important;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions button {
  min-height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-color: #b8dfc2;
  color: #0f7a34;
  font-size: 12px;
  font-weight: 800;
}

.quick-actions span {
  font-size: 22px;
}

.module-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 12px;
  align-items: start;
}

.inventory-layout {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
}

.inventory-layout > .data-panel {
  grid-column: 1 / -1;
}

#inventoryForm,
#stockTransferForm {
  align-self: stretch;
}

#inventoryTable {
  min-width: 980px;
}

#inventoryTxTable {
  min-width: 1100px;
}

.inventory-history-head {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.sales-entry-layout {
  max-width: 980px;
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  align-items: start;
}

.pos-checkout,
.pos-summary {
  display: grid;
  gap: 12px;
}

.pos-search-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) 92px auto;
  gap: 10px;
  align-items: end;
}

.product-stock-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #b9e8ca;
  border-radius: 8px;
  background: #f0fdf4;
  color: #14532d;
  font-size: 12px;
}

.product-stock-strip span {
  padding-right: 8px;
  border-right: 1px solid #bbf7d0;
}

.product-stock-strip span:last-child {
  border-right: 0;
}

.pos-product-matches {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

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

.pos-product-matches button {
  min-height: 76px;
  display: grid;
  gap: 5px;
  align-content: center;
  text-align: left;
  white-space: normal;
}

.pos-product-matches strong,
.pos-product-matches span {
  overflow-wrap: anywhere;
}

.pos-product-matches span,
.receipt p,
.receipt td {
  color: var(--muted);
  font-size: 12px;
}

.pos-line-qty {
  width: 84px;
}

.pos-totals {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.pos-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pos-totals .grand {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
  font-size: 18px;
}

.pos-receipt-panel {
  margin-top: 12px;
}

.receipt {
  max-width: 360px;
  display: grid;
  gap: 7px;
  margin: 0 auto;
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.receipt h2,
.receipt p {
  margin: 0;
  text-align: center;
}

.receipt table {
  min-width: 0;
}

.receipt td {
  padding: 5px 0;
}

.receipt td:last-child {
  text-align: right;
}

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

.sales-transaction-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  align-items: end;
}

.sales-transaction-form h2 {
  grid-column: 1 / -1;
  margin: 0;
}

.sales-transaction-form button[type="submit"] {
  min-height: 38px;
}

.sales-transaction-form input[readonly] {
  background: #f8fafc;
  color: #0f766e;
  font-weight: 900;
}

.register-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.register-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.master-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 12px;
  align-items: start;
}

.master-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.master-form h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.form-panel {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.data-panel {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
}

.badge.good {
  background: var(--good-bg);
  color: var(--teal);
}

.badge.warn {
  background: var(--warn-bg);
  color: var(--gold);
}

.control-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.flow-step {
  display: grid;
  gap: 5px;
  text-align: left;
  border-color: #e8d6df;
  background: #fffafd;
  text-decoration: none;
}

.flow-step strong {
  color: var(--rose);
}

.flow-step span,
.stack-list span {
  color: var(--muted);
  font-size: 13px;
}

.stack-list {
  display: grid;
  gap: 9px;
}

.stack-list > div,
.empty-state {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.stack-list strong {
  display: block;
  margin-bottom: 3px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

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

.inline-filter {
  min-width: 220px;
  margin-left: auto;
}

.liquidation-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.liquidation-filters label {
  min-width: 150px;
}

.liquidation-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.liquidation-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.liquidation-card h3 {
  margin: 0;
  font-size: 14px;
}

.liquidation-card span,
.liquidation-card small {
  color: var(--muted);
  font-size: 12px;
}

.liquidation-card strong {
  font-size: 24px;
}

.liquidation-modern {
  display: grid;
  gap: 12px;
}

.liquidation-editor-bar {
  margin: 0;
}

.liquidation-table input {
  width: 140px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: right;
}

.liquidation-table .summary-row td {
  background: #f7fbf8;
  color: var(--green-dark);
  font-weight: 800;
}

.danger-text {
  color: var(--danger) !important;
  font-weight: 900;
}

.good-text {
  color: var(--teal) !important;
  font-weight: 900;
}

.tab {
  padding: 8px 10px;
  background: #fff;
}

.tab.active {
  color: #fff;
  border-color: var(--rose);
  background: var(--rose);
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 272px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    z-index: 20;
  }

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

  .icon-btn {
    display: inline-grid;
    place-items: center;
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .top-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .top-actions > * {
    flex: 1 1 140px;
  }

  .module-layout,
  .pos-layout,
  .sales-transaction-form,
  .workspace-grid,
  .master-grid {
    grid-template-columns: 1fr;
  }

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

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

  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dash-card,
  .dash-wide {
    grid-column: auto;
  }

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

  .kpi-grid,
  .control-map,
  .liquidation-cards,
  .inventory-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 12px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar p {
    font-size: 13px;
  }

  .kpi-grid,
  .control-map,
  .liquidation-cards,
  .dashboard-kpis,
  .inventory-summary {
    grid-template-columns: 1fr;
  }

  .dash-kpi,
  .donut-layout,
  .bar-chart,
  .pos-search-row,
  .pos-product-matches,
  .register-filters {
    grid-template-columns: 1fr;
  }

  .donut {
    justify-self: center;
  }

  .panel {
    padding: 12px;
  }

  table {
    min-width: 640px;
  }
}

@media print {
  .sidebar,
  .top-actions,
  .icon-btn,
  form,
  .pos-product-matches,
  .pos-checkout,
  .pos-summary {
    display: none !important;
  }

  body {
    display: block;
    background: #fff;
  }

  .shell {
    padding: 0;
  }

  .view:not(.active) {
    display: none;
  }

  .panel,
  .kpi {
    box-shadow: none;
  }
}
