html {
  font-size: 15px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f4f6f3;
  color: #17211c;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.app-shell {
  display: flex;
}

.app-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 280px;
  padding: 18px;
  background: #17211c;
  color: #fff;
  overflow-y: auto;
}

.sidebar-toggle,
.sidebar-close,
.sidebar-backdrop {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  padding: 10px 8px 20px;
}

.brand small {
  display: block;
  color: #a9b8af;
  margin-top: 4px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f5a524;
  color: #1d1d1b;
  font-weight: 800;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav__home {
  color: #dfe8e2;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 800;
}

/* Groups collapse with <details>, so the markers below replace the browser's default triangle. */
.side-nav__group {
  border-radius: 10px;
}

.side-nav__group[open] {
  background: rgba(255, 255, 255, 0.03);
  padding-bottom: 6px;
}

.side-nav__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  border-radius: 8px;
  color: #a9bcb1;
  font-size: 0.82rem;
  font-weight: 800;
  user-select: none;
}

.side-nav__summary::-webkit-details-marker {
  display: none;
}

.side-nav__summary:hover,
.side-nav__summary:focus-visible {
  background: #26352e;
  color: #fff;
}

.side-nav__chevron {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  opacity: 0.7;
}

.side-nav__group[open] .side-nav__chevron {
  transform: rotate(-135deg);
}

/* The daily action, sitting directly under its group heading. */
.side-nav__quick {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 8px 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(31, 185, 120, 0.14);
  border: 1px solid rgba(31, 185, 120, 0.32);
  color: #7ce0b0;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
}

.side-nav__quick:hover,
.side-nav__quick:focus {
  background: rgba(31, 185, 120, 0.24);
  color: #fff;
}

.side-nav__quick-plus {
  font-size: 1.05rem;
  line-height: 1;
}

.side-nav__links {
  display: grid;
  gap: 3px;
  padding: 0 6px;
}

.side-nav a {
  color: #dfe8e2;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
}

.side-nav__links a {
  padding-inline-start: 20px;
}

.side-nav a:hover,
.side-nav a:focus,
.side-nav a.active {
  background: #26352e;
  color: #fff;
}

.side-nav a.active {
  border-color: rgba(95, 191, 147, 0.32);
  box-shadow: inset 4px 0 0 #1fb978;
}

/* A group containing the current page stays visibly marked even while collapsed. */
.side-nav__group:has(a.active) > .side-nav__summary {
  color: #fff;
}

.side-nav-plan {
  margin: 14px 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 2px;
}

.side-nav-plan__label {
  color: #8da094;
  font-size: 0.72rem;
  font-weight: 700;
}

.side-nav-plan__name {
  color: #fff;
  font-size: 0.95rem;
}

.side-nav-plan__link {
  color: #7ce0b0;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.app-main {
  min-height: 100vh;
  width: 100%;
  margin-inline-start: 280px;
}

.auth-main {
  margin-inline-start: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #dde5df;
  backdrop-filter: blur(10px);
}

.topbar span {
  display: block;
  color: #66746c;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.content {
  padding: 26px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header h1,
.panel h1 {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 800;
}

.page-header p,
.login-brand p,
.panel p {
  margin: 0;
  color: #67756d;
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.panel,
.login-panel {
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 28, 0.06);
}

.metric-card {
  padding: 16px;
  border-inline-start-width: 5px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: #64736b;
}

.metric-card strong {
  display: block;
  margin: 8px 0;
  font-size: 1.7rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-grid > div {
  min-height: 72px;
  padding: 14px;
  border: 1px solid #dbe5df;
  border-radius: 8px;
  background: #f8faf8;
}

.summary-grid span {
  display: block;
  color: #64736b;
  font-size: 0.86rem;
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  color: #17211c;
  font-size: 1.15rem;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

/* Finance dashboard charts: plain divs sized by inline percentage/height, not a JS charting library -
   this renders identically every time with zero extra script weight and no CDN dependency, consistent
   with the rest of this app's server-rendered pages. */
.finance-chart-panel {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 220px;
  padding: 0 4px;
  flex: 1;
}

.trend-chart__month {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.trend-chart__bars {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.trend-chart__bar {
  width: 30%;
  max-width: 22px;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.2s ease;
}

.trend-chart__bar--revenue {
  background: #17683b;
}

.trend-chart__bar--expense {
  background: #c0392b;
}

.trend-chart__label {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #64736b;
  white-space: nowrap;
}

.composition-bar {
  display: flex;
  width: 100%;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f2f0;
  margin-top: 12px;
}

.composition-bar__segment {
  height: 100%;
  transition: width 0.2s ease;
}

.composition-bar__segment--cogs {
  background: #e0a30d;
}

.composition-bar__segment--expenses {
  background: #c0392b;
}

.composition-bar__segment--profit {
  background: #17683b;
}

.chart-legend {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: #3c463f;
  justify-content: center;
}

.chart-legend--wrap {
  flex-wrap: wrap;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-inline-end: 5px;
}

.legend-dot--revenue { background: #17683b; }
.legend-dot--expense { background: #c0392b; }
.legend-dot--cogs { background: #e0a30d; }
.legend-dot--expenses { background: #c0392b; }
.legend-dot--profit { background: #17683b; }

.loss-indicator {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  background: #fdeaea;
  color: #9d1c1c;
  text-align: center;
}

.loss-indicator strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.table {
  margin-bottom: 0;
}

.table tbody tr:hover {
  background: #fbfcfb;
}

.table thead th {
  color: #55625b;
  background: #f6f8f6;
  font-weight: 700;
}

.empty-cell {
  color: #79877f;
  text-align: center;
  padding: 24px !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e9f6ef;
  color: #17683b !important;
  font-weight: 700;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 430px);
  padding: 28px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-brand h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
}

.login-form {
  display: grid;
  gap: 10px;
}

.narrow-panel {
  max-width: 620px;
}

.pos-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  min-height: calc(100vh - 120px);
}

.pos-sale,
.pos-summary {
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(23, 33, 28, 0.06);
}

.pos-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1fr) minmax(150px, .7fr);
  gap: 10px;
  margin-bottom: 12px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.pos-status {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8f6;
  color: #56625c;
  font-weight: 700;
}

.pos-status.success {
  background: #e9f6ef;
  color: #17683b;
}

.pos-status.warning {
  background: #fff5df;
  color: #8a5b00;
}

.pos-status.danger {
  background: #fdeaea;
  color: #9d1c1c;
}

.search-item {
  min-height: 88px;
  padding: 12px;
  text-align: start;
  border: 1px solid #dbe5df;
  border-radius: 8px;
  background: #f9fbf9;
}

.search-item span,
.search-item small {
  display: block;
}

.search-item strong {
  display: block;
  margin: 4px 0;
  color: #17683b;
}

.search-empty {
  padding: 12px;
  color: #7b877f;
  background: #f7f8f7;
  border-radius: 8px;
}

.pos-cart-table td strong,
.pos-cart-table td small {
  display: block;
}

/* Category quick-filter chips above the product grid. */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.category-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #dbe5df;
  background: #f9fbf9;
  font-weight: 700;
  font-size: 0.85rem;
  color: #3c463f;
  cursor: pointer;
}

.category-chip.active {
  background: #17683b;
  border-color: #17683b;
  color: #fff;
}

/* The product grid itself: image-first tiles a cashier taps instead of typing. */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  max-height: 46vh;
  overflow-y: auto;
  padding-inline-end: 2px;
}

.catalog-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid #dbe5df;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.catalog-tile:hover,
.catalog-tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(23, 33, 28, 0.12);
}

.catalog-tile:active {
  transform: translateY(0);
}

.catalog-tile__media {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.catalog-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* No photo yet: a coloured initial tile (using the item's category colour) instead of a broken
   image icon, so the grid looks finished on day one before anyone uploads real photos. */
.catalog-tile__initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
}

.catalog-tile__name {
  padding: 6px 6px 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #17211c;
  line-height: 1.25;
  min-height: 2.4em;
}

.catalog-tile__price {
  padding: 0 6px 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #17683b;
}

.catalog-empty,
.catalog-loading {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: #7b877f;
  background: #f7f8f7;
  border-radius: 8px;
}

/* Held-sale recall panel. */
.held-sales-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 20px;
}

.held-sales-panel {
  width: min(640px, 100%);
  max-height: 80vh;
  background: #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.held-sales-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e6ece8;
}

.held-sales-list {
  overflow-y: auto;
  padding: 8px 12px 16px;
  display: grid;
  gap: 8px;
}

.held-sale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e6ece8;
  border-radius: 8px;
}

.held-sale-row__info strong {
  display: block;
}

.held-sale-row__info small {
  display: block;
  color: #7b877f;
}

/* Open-shift panel - same overlay/panel chrome as the held-sales recall, but a plain form instead of a
   native window.prompt(), which some kiosk/tablet browsers block outright and which never shows an
   inline validation message. */
.open-shift-panel {
  width: min(360px, 100%);
}

.open-shift-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.open-shift-error {
  color: #c0392b;
  font-size: 14px;
}

/* Password visibility toggle - typing a password blind is exactly how a fat-fingered character makes
   it into a saved credential unnoticed. */
.password-field {
  position: relative;
}

.password-field .form-control {
  padding-inline-end: 64px;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #17683b;
  font-size: 13px;
  padding: 4px 6px;
  cursor: pointer;
}

.password-toggle:hover {
  text-decoration: underline;
}

/* Customer/supplier statement of account - debit and credit read at a glance instead of two identical
   plain black columns the reader has to compare by hand every row. */
.statement-table .statement-debit {
  color: #c0392b;
  font-weight: 600;
}

.statement-table .statement-credit {
  color: #17683b;
  font-weight: 600;
}

.statement-table .statement-balance {
  font-weight: 700;
}

.statement-balance--debit {
  color: #c0392b;
}

.statement-balance--credit {
  color: #17683b;
}

.statement-row--opening {
  background: #f4f7f5;
}

.statement-type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2f0;
  color: #3c4a41;
  font-size: 12.5px;
  white-space: nowrap;
}

.statement-type-badge--opening {
  background: #dbe7e0;
  color: #17683b;
  font-weight: 600;
}

.held-sales-empty {
  padding: 24px;
  text-align: center;
  color: #7b877f;
}


.qty-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-stepper .qty-input {
  width: 64px;
  text-align: center;
  padding-inline: 2px;
}

.qty-stepper button {
  width: 30px;
  height: 30px;
  padding: 0;
  line-height: 1;
  font-weight: 800;
}

.qty-input {
  width: 110px;
}

.pos-summary {
  display: grid;
  align-content: start;
  gap: 12px;
}

.summary-line,
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #f6f8f6;
}

.summary-total {
  background: #17211c;
  color: #fff;
}

.summary-total strong {
  font-size: 2rem;
}

.payment-actions {
  display: grid;
  gap: 10px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.module-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #dbe5df;
  border-radius: 8px;
  background: #f9fbf9;
  color: #17211c;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.module-tile:hover {
  border-color: #17683b;
  color: #17683b;
}

.module-tile.muted {
  color: #68756e;
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.wide-toolbar {
  grid-template-columns: minmax(220px, 1fr) 180px 160px 160px auto;
}

.editor-form {
  display: grid;
  gap: 18px;
}

.procurement-section {
  margin-bottom: 18px;
}

.procurement-actions,
.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.reject-form {
  display: grid;
  grid-template-columns: minmax(130px, 190px) auto;
  gap: 6px;
}

.procurement-lines {
  display: grid;
  gap: 10px;
}

.procurement-line {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(120px, 0.7fr) minmax(180px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe5df;
  border-radius: 8px;
  background: #f8faf8;
}

.compact-number {
  min-width: 120px;
  max-width: 180px;
}

.count-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .5fr) minmax(220px, 1fr);
  gap: 10px;
}

.count-table-wrap {
  max-height: 65vh;
  border: 1px solid #dde5df;
}

.count-table-wrap thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.batch-grid {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 145px 145px;
  gap: 6px;
  min-width: 430px;
}

.simple-line {
  grid-template-columns: minmax(260px, 2fr) minmax(140px, .7fr) auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.span-2 {
  grid-column: span 2;
}

.checks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px;
  border: 1px solid #dde5df;
  border-radius: 8px;
  background: #f9fbf9;
}

.readonly-box,
.json-box {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dbe5df;
  border-radius: 8px;
  background: #f8faf8;
  color: #26352e;
}

.json-box {
  max-height: 320px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
}

.form-actions,
.pager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.actions-row form {
  margin: 0;
}

.color-swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-inline-end: .35rem;
  vertical-align: middle;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.permission-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.permission-group h2 {
  font-size: 1rem;
  margin: 0 0 12px;
}

.permission-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.permission-check small,
.permission-check code {
  display: block;
  color: var(--muted);
}

.danger-panel {
  border-color: #f1b9b9;
}

.table td small {
  display: block;
  color: #68756e;
}

.btn-primary {
  --bs-btn-bg: #17683b;
  --bs-btn-border-color: #17683b;
  --bs-btn-hover-bg: #125731;
  --bs-btn-hover-border-color: #125731;
}

.form-control:focus,
.form-check-input:focus,
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(23, 104, 59, 0.2);
}

.notification-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-inline-start: 4px solid #9aa8a0;
  border-radius: 8px;
  background: #fff;
}

.notification-item.is-unread {
  border-inline-start-color: #17683b;
  background: #f6fbf8;
}

.notification-item-head,
.notification-item-actions,
.device-status-panel,
.device-status-list,
.device-token-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-scope-fieldset {
  border: 1px solid var(--border);
  padding: 1rem;
}

.api-scope-fieldset legend {
  float: none;
  width: auto;
  margin: 0;
  padding: 0 .35rem;
  font-size: .9rem;
  font-weight: 700;
}

.api-scope-fieldset .form-check {
  min-width: min(100%, 18rem);
}

.notification-item-head,
.device-status-panel {
  justify-content: space-between;
}

.notification-item-head > div,
.notification-item-actions,
.device-token-actions {
  flex-wrap: wrap;
}

.notification-item p {
  margin: 10px 0;
}

.notification-item time,
.notification-item-actions .text-muted {
  color: var(--muted);
  font-size: .875rem;
}

.bridge-token {
  margin-top: 8px;
  padding: 10px;
  overflow-wrap: anywhere;
  border: 1px solid #e0b85f;
  border-radius: 6px;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  user-select: all;
}

.device-status-panel h2 {
  font-size: 1rem;
  margin: 0 0 8px;
}

@media (max-width: 1100px) {
  .metrics-grid,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    z-index: 50;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(320px, 88vw);
    max-height: 100vh;
    transform: translateX(105%);
    transition: transform 180ms ease;
    box-shadow: -18px 0 42px rgba(11, 21, 16, 0.24);
  }

  .sidebar-open {
    overflow: hidden;
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle,
  .sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border: 1px solid #cdd8d1;
    border-radius: 6px;
    background: #fff;
    color: #17211c;
    font-size: 1.4rem;
    line-height: 1;
  }

  .sidebar-close {
    position: absolute;
    z-index: 1;
    inset-block-start: 14px;
    inset-inline-end: 14px;
    border-color: rgba(255, 255, 255, 0.28);
    background: #26352e;
    color: #fff;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 45;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(9, 17, 13, 0.48);
  }

  .sidebar-backdrop:not([hidden]) {
    display: block;
  }

  .brand {
    padding-inline-end: 54px;
  }

  .app-main {
    margin-inline-start: 0;
  }

  .topbar,
  .page-header,
  .filters,
  .list-toolbar,
  .form-grid,
  .notification-item-head,
  .device-status-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar-heading {
    align-items: center;
  }

  .topbar-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .content {
    padding: 18px 16px;
  }

  .list-toolbar,
  .wide-toolbar,
  .form-grid,
  .procurement-line,
  .pos-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pos-screen,
  .pos-sale,
  .pos-summary,
  .pos-toolbar > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .pos-sale .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .reject-form {
    grid-template-columns: 1fr auto;
    width: 100%;
  }

  .count-toolbar,
  .batch-grid,
  .simple-line {
    grid-template-columns: 1fr;
  }

  .batch-grid {
    min-width: 260px;
  }

  .span-2 {
    grid-column: auto;
  }

  .metrics-grid,
  .dashboard-grid,
  .summary-grid,
  .module-grid,
  .pos-screen {
    grid-template-columns: 1fr;
  }

  .search-results {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    max-height: 34vh;
  }

  .held-sales-panel {
    max-height: 90vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-sidebar {
    transition: none;
  }
}
