:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e0e8;
  --accent: #10845b;
  --accent-dark: #0b6848;
  --accent-soft: #e8f6ef;
  --accent-2: #c23b22;
  --accent-text: #ffffff;
  --danger-text: #ffffff;
  --sidebar-bg: #10231d;
  --brand-mark: #27b179;
  --focus-rgb: 16, 132, 91;
  --warn: #9a6700;
  --ok: #168044;
  --info: #1769aa;
  --shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.08);
}

button.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

button.secondary {
  background: #eef2f6;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.danger {
  background: var(--accent-2);
  color: var(--danger-text);
}

.button-link {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
}

button.icon {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 9px 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--focus-rgb), 0.12);
  outline: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login form {
  width: min(430px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.login h1,
.page-title h1 {
  margin: 0;
  letter-spacing: 0;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  background: var(--sidebar-bg);
  color: white;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  color: #9db5aa;
  font-size: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-mark);
  color: white;
  font-weight: 900;
  letter-spacing: 0;
}

.company-logo {
  object-fit: contain;
  background: white;
  border: 1px solid rgba(255,255,255,0.18);
}

.company-logo.brand {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  padding: 4px;
}

.company-logo.login {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  background: transparent;
  color: #d6e3dd;
  border: 0;
  border-radius: 6px;
  text-align: left;
  min-height: 54px;
  display: grid;
  gap: 2px;
  align-content: center;
  box-shadow: none;
}

.nav button.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav button small {
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  color: #cdd8d2;
  font-size: 13px;
}

.user-chip {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 3px;
  background: rgba(255,255,255,0.04);
}

.user-chip strong {
  color: white;
}

.user-chip span {
  color: #a9bdb4;
}

.content {
  padding: 24px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
}

.badge.ok {
  border-color: #b8ddc7;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge.warn {
  border-color: #e3bd6b;
  color: #6b4100;
  background: #fff3cf;
}

.toast {
  border: 1px solid #8fd0ad;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #e8f6ef;
  color: #0b5238;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(16, 132, 91, 0.12);
}

.toast::before {
  content: "Saved";
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 24px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 14px;
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.quick-metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.quick-metric {
  display: grid;
  gap: 5px;
}

.quick-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quick-metric strong {
  color: var(--ink);
  font-size: 22px;
}

.sales-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  align-items: start;
}

.tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(140px, 190px));
  gap: 10px;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.product {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 10px;
  display: grid;
  gap: 7px;
  text-align: left;
  min-height: 245px;
  align-content: start;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.product:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(35, 37, 32, 0.12);
}

.product strong {
  font-size: 16px;
}

.product-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.product-meta {
  color: var(--muted);
  font-size: 13px;
}

.product .price {
  font-size: 22px;
  font-weight: 800;
}

.product-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #eee7d8;
  border: 1px solid var(--line);
}

.product-photo.placeholder {
  display: grid;
  place-items: center;
  color: #35524a;
  background: linear-gradient(135deg, #dff4e9, #e7eef8);
  font-size: 30px;
  font-weight: 900;
}

.product-photo.generated {
  background: #f8fafc;
}

.product-photo.thumb {
  width: 68px;
  height: 58px;
  aspect-ratio: auto;
}

.product-photo.placeholder.thumb {
  font-size: 18px;
}

.stock-pill {
  width: fit-content;
  border-radius: 999px;
  background: #fff3cf;
  color: #6b4100;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.product.low {
  border-color: #d6a33a;
}

.product.out {
  opacity: 0.55;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

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

.checkout-panel {
  position: sticky;
  top: 18px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.section-kicker {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
  text-transform: uppercase;
}

.cart-lines {
  display: grid;
  gap: 8px;
  min-height: 120px;
}

.empty-cart,
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 254, 250, 0.7);
  padding: 18px;
  text-align: center;
}

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

.qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

.total {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 30px;
  font-weight: 900;
}

.total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.total small {
  font-size: 14px;
  color: var(--muted);
}

.payment-grid,
.form-grid,
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.expense-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-choice {
  background: #f1f5f9;
  color: var(--ink);
  padding: 0 8px;
  border: 1px solid var(--line);
}

.payment-choice.active {
  background: var(--accent-soft);
  border-color: #8fd0ad;
  color: var(--accent-dark);
}

.complete-sale {
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  font-size: 17px;
}

.hardware-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
}

.customer-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.customer-box.required {
  border-color: #e3bd6b;
  background: #fff8e6;
}

.panel-title.compact {
  align-items: flex-start;
}

.customer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.credit-payment-form {
  display: grid;
  grid-template-columns: 110px 120px auto;
  gap: 8px;
  align-items: center;
  min-width: 330px;
}

.register-count-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.register-difference {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  font-size: 18px;
  font-weight: 900;
}

.positive {
  color: var(--ok);
}

.negative {
  color: var(--accent-2);
}

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

.inventory-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.inventory-tools h2 {
  margin: 0 0 4px;
}

.stock-status {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.stock-status.ok {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.stock-status.low {
  background: #fff3cf;
  color: #6b4100;
}

.stock-status.out {
  background: #ffe5dc;
  color: #92210d;
}

.image-drop {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #faf7ef;
  padding: 12px;
}

.theme-settings {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
}

.theme-settings h3 {
  margin: 0 0 4px;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.color-field {
  align-content: start;
}

.color-field input[type="color"] {
  min-height: 46px;
  padding: 4px;
}

.theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-button {
  background: #eef2f6;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.preset-dots {
  display: inline-flex;
  gap: 4px;
  margin-right: 7px;
  vertical-align: -2px;
}

.preset-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.image-drop input,
.photo-action input {
  margin-top: 6px;
}

.image-drop span {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.logo-settings {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.hardware-settings {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
}

.hardware-settings h3 {
  margin: 0 0 4px;
}

.logo-preview {
  width: 132px;
  height: 92px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  background: white;
}

.margin-pill {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  border-radius: 999px;
  background: #e8f6ef;
  color: #0b5238;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.margin-pill.low-margin {
  background: #fff3cf;
  color: #6b4100;
}

.receive-stock {
  display: grid;
  grid-template-columns: 72px 120px minmax(140px, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 470px;
}

.receive-stock input {
  min-height: 34px;
  padding: 6px 8px;
}

.receive-stock button {
  min-height: 34px;
  padding: 0 10px;
}

.photo-action {
  margin-top: 6px;
  font-size: 12px;
}

.photo-action input {
  max-width: 150px;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

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

.action-cell {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.small-link {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.text-link {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.sellable-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.license-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: 8px;
  background: #fff3cf;
  padding: 12px;
  display: grid;
  gap: 4px;
  margin: 12px 0;
}

.license-card.active {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.license-card.expired {
  border-left-color: var(--accent-2);
  background: #ffe5dc;
}

.license-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.restore-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.user-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  margin: 14px 0;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.inline-check input {
  width: 18px;
  min-height: 18px;
}

.permission-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.permission-card h3 {
  margin: 0 0 6px;
}

.permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.permission-row input {
  width: 20px;
  min-height: 20px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: grid;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

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

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.accounting-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  background: #0f3b2d;
  color: white;
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.accounting-hero h2 {
  margin: 8px 0 4px;
  font-size: 38px;
  letter-spacing: 0;
}

.accounting-hero .hint,
.accounting-hero .section-kicker {
  color: #bfe2d2;
}

.hero-ledger {
  display: grid;
  gap: 10px;
}

.hero-ledger div {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hero-ledger span {
  color: #cfe6dc;
  font-weight: 800;
}

.eod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.eod-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.eod-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.eod-card strong {
  font-size: 22px;
}

.eod-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.eod-columns h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.report-card h3,
.report-card h4 {
  margin: 0;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-metrics div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.report-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-metrics strong {
  font-size: 17px;
}

.report-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.rate-chart {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
  margin: 10px 0 12px;
}

.rate-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.rate-chart line {
  stroke: var(--line);
  stroke-width: 2;
}

.rate-chart text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rate-area {
  fill: var(--accent-soft);
  stroke: none;
}

.rate-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rate-chart circle {
  fill: var(--panel);
  stroke: var(--accent);
  stroke-width: 3;
}

.rate-chart-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

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

th {
  background: #f8fafc;
  font-size: 13px;
  color: #52616f;
  font-weight: 900;
}

tbody tr:hover {
  background: #fbfcfe;
}

tr.row-added td {
  background: #e8f6ef;
  box-shadow: inset 4px 0 0 var(--accent);
}

tr.row-low-stock td {
  background: #fff8e6;
  box-shadow: inset 4px 0 0 #d6a33a;
}

tr.row-out-stock td {
  background: #ffe5dc;
  box-shadow: inset 4px 0 0 var(--accent-2);
}

tr.row-low-stock:hover td {
  background: #fff3cf;
}

tr.row-out-stock:hover td {
  background: #ffd7c7;
}

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

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

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  height: 220px;
  align-items: end;
  border-left: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 8px 0;
}

.bar {
  min-height: 8px;
  background: linear-gradient(180deg, #27b179, #10845b);
  border-radius: 5px 5px 0 0;
  position: relative;
}

.bar span {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.error {
  color: #92210d;
  background: #ffe5dc;
  border: 1px solid #f1b3a1;
  border-radius: 7px;
  padding: 10px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
    gap: 12px;
  }

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

  .nav button {
    text-align: center;
    padding: 0 8px;
    min-height: 50px;
  }

  .nav button small {
    display: none;
  }

  .content {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .sales-grid,
  .tools {
    grid-template-columns: 1fr;
  }

  .quick-strip,
  .sellable-grid,
  .restore-row,
  .logo-settings,
  .accounting-hero,
  .customer-fields,
  .credit-payment-form {
    grid-template-columns: 1fr;
  }

  .checkout-panel {
    position: static;
  }

  .credit-payment-form {
    min-width: 0;
  }

  .payment-options {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .product {
    min-height: 220px;
  }
}

@media print {
  body {
    background: white;
  }
}
