:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17201d;
  background: #f4f6f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #17201d;
  --muted: #66736f;
  --line: #dbe3df;
  --panel: #ffffff;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --accent: #f59e0b;
  --danger: #dc2626;
  --ok: #15803d;
  --surface: #eef3f0;
  --focus: rgba(15, 118, 110, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 246, 245, 0.98)),
    #f4f6f5;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px 1fr;
}

.sidebar {
  background: #17201d;
  color: #f8fbfa;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 160ms ease, padding 160ms ease;
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.brand-block strong {
  display: block;
  letter-spacing: 0;
  font-size: 15px;
}

.brand-block span {
  color: #abc0ba;
  font-size: 12px;
}

.brand-mark,
.login-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0f766e;
  color: white;
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.28);
}

.sidebar-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.sidebar-collapsed .sidebar {
  padding: 16px 10px;
  overflow-x: hidden;
}

.sidebar-collapsed .brand-block {
  justify-content: center;
  padding: 6px 0 14px;
}

.sidebar-collapsed .brand-mark {
  width: 42px;
  height: 42px;
}

.sidebar-collapsed .brand-text {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 66px;
  left: 20px;
  width: 36px;
  height: 30px;
}

.sidebar-collapsed .nav-list {
  margin-top: 34px;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 9px;
}

.sidebar-collapsed .nav-item span {
  display: none;
}

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

.nav-item {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #dce8e5;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.11);
  color: white;
}

.main-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 68px;
  padding: 14px 22px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sync-pill,
.user-pill {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--muted);
  font-size: 13px;
}

.content-area {
  padding: 22px;
}

.view-stack {
  display: grid;
  gap: 18px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.page-header h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.page-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(23, 32, 29, 0.06);
}

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

.panel-title {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 14px;
  min-height: 112px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.metric-card span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f5f2;
  color: var(--primary);
}

.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  font-size: 23px;
  line-height: 1.05;
}

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

.pos-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(420px, 1fr) minmax(300px, 390px);
  gap: 14px;
  align-items: start;
}

.shortcut-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.shortcut-strip span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 1px solid #d7e2de;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.shortcut-strip kbd {
  min-width: 42px;
  padding: 3px 6px;
}

.pos-products,
.pos-cart,
.total-panel {
  min-height: 520px;
}

.total-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 13px;
}

.total-label {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0;
  font-size: 12px;
}

.grand-total {
  font-size: 42px;
  line-height: 1;
  color: var(--primary-strong);
  overflow-wrap: anywhere;
}

.summary-lines {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-lines span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.global-search {
  position: relative;
  flex: 1;
  max-width: 760px;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.global-search input,
.search-line input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 48px rgba(23, 32, 29, 0.16);
  z-index: 50;
}

.search-results button,
.compact-list button,
.product-pick-list button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.search-results button {
  padding: 10px;
  display: grid;
  gap: 3px;
}

.search-results button:hover,
.compact-list button:hover,
.product-pick-list button:hover,
.product-pick-list button.active {
  background: #f1f7f5;
  border-color: #cfe1dc;
}

.product-pick-list button.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.search-results span,
.compact-list small,
.product-pick-list small {
  color: var(--muted);
  font-size: 12px;
}

.search-line {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  margin-bottom: 12px;
}

.product-pick-list,
.compact-list {
  display: grid;
  gap: 7px;
  max-height: 440px;
  overflow: auto;
}

.product-pick-list button,
.compact-list button {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.product-pick-list span,
.compact-list span {
  display: grid;
  gap: 2px;
}

.cart-table {
  display: grid;
  gap: 8px;
}

.cart-head,
.cart-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) 105px 74px 90px 110px 38px;
  gap: 8px;
  align-items: center;
}

.cart-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cart-row {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-row input,
.payment-row input,
.payment-row select,
.field input,
.field select,
.field textarea,
.period-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  outline: 0;
}

.cart-row input:focus,
.payment-row input:focus,
.payment-row select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.period-select:focus,
.global-search:focus-within,
.search-line:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.payment-toolbar,
.payments-list {
  display: grid;
  gap: 8px;
}

.payment-toolbar {
  grid-template-columns: 1fr 1fr;
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr 120px 36px;
  gap: 8px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.payment-row.active {
  border-color: var(--primary);
  background: #ecfdf5;
}

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

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}

.span-2 {
  grid-column: span 2;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  background: var(--primary);
  color: white;
  padding: 0 14px;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary-button {
  background: white;
  color: var(--ink);
  border-color: var(--line);
  padding: 0 12px;
}

.secondary-button:hover,
.icon-button:hover {
  border-color: #b8cbc5;
  background: #f8fbfa;
}

.icon-button {
  width: 38px;
  padding: 0;
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.icon-button.danger {
  color: var(--danger);
}

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  background: #fbfdfc;
}

td small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.chart-box {
  width: 100%;
  min-height: 260px;
}

.report-grid {
  display: grid;
  gap: 10px;
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.hidden-file-input {
  display: none;
}

.backup-metric-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

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

.backup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.backup-row strong,
.backup-row span,
.backup-row small {
  display: block;
}

.backup-row strong {
  color: #0f172a;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.backup-row span {
  margin-top: 4px;
  color: #475569;
  font-size: 13px;
}

.backup-row small {
  margin-top: 5px;
  color: #64748b;
}

.backup-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.danger-text {
  color: #b91c1c;
}

.sales-history-metrics {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.sales-history-panel {
  display: grid;
  gap: 14px;
}

.history-toolbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.history-search {
  margin: 0;
}

.sales-history-table {
  min-width: 1280px;
}

.history-product-cell strong,
.history-product-cell span,
.history-product-cell small {
  display: block;
}

.history-product-cell strong {
  color: #0f172a;
  font-size: 12px;
}

.history-product-cell span {
  margin-top: 3px;
  color: #1f2937;
  font-weight: 900;
}

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

.shortcut-grid span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

kbd {
  min-width: 64px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 5px 7px;
  background: #fbfdfc;
  text-align: center;
  font-weight: 800;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(140deg, rgba(15, 118, 110, 0.14), rgba(245, 158, 11, 0.16)),
    #f4f6f5;
}

.login-panel {
  width: min(430px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 16px;
  box-shadow: 0 22px 70px rgba(23, 32, 29, 0.16);
}

.login-panel h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.login-panel p {
  margin: -8px 0 4px;
  color: var(--muted);
}

.login-options {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.error-box,
.success-box,
.empty-state {
  border-radius: 8px;
  padding: 12px 14px;
}

.error-box {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.success-box {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.empty-state {
  color: var(--muted);
  background: #fbfdfc;
  border: 1px dashed var(--line);
  text-align: center;
}

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

.warn-text {
  color: #b45309;
}

@media (max-width: 1320px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .pos-grid {
    grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  }

  .total-panel {
    grid-column: 1 / -1;
    position: static;
    min-height: auto;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .topbar,
  .page-header,
  .split-grid,
  .pos-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topbar {
    align-items: stretch;
  }

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

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

  .span-2 {
    grid-column: span 1;
  }

  .cart-head {
    display: none;
  }

  .cart-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .content-area {
    padding: 14px;
  }

  .metric-grid,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .grand-total {
    font-size: 34px;
  }
}

/* Visual refresh: polished desktop POS surface */
:root {
  --ink: #18211f;
  --muted: #61716d;
  --line: #d7e0dc;
  --panel: #ffffff;
  --primary: #0d7c72;
  --primary-strong: #075e56;
  --accent: #d97706;
  --danger: #c2410c;
  --ok: #15803d;
  --surface: #f3f7f5;
  --surface-strong: #e7efec;
  --focus: rgba(13, 124, 114, 0.2);
  --shadow-sm: 0 1px 2px rgba(24, 33, 31, 0.06);
  --shadow-md: 0 14px 38px rgba(24, 33, 31, 0.08);
  --shadow-lg: 0 22px 64px rgba(24, 33, 31, 0.12);
}

body {
  background:
    linear-gradient(180deg, #f8faf9 0%, #eef4f1 52%, #f7f8f5 100%);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background:
    linear-gradient(120deg, rgba(13, 124, 114, 0.07), transparent 32%),
    linear-gradient(240deg, rgba(217, 119, 6, 0.08), transparent 35%),
    #f5f7f6;
}

.sidebar {
  padding: 16px 12px;
  background:
    linear-gradient(180deg, #13201d 0%, #182420 48%, #111817 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 8px 0 30px rgba(24, 33, 31, 0.18);
}

.brand-block {
  padding: 10px 8px 18px;
}

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

.brand-block span {
  color: #a8bbb6;
}

.brand-mark,
.login-logo {
  background:
    linear-gradient(145deg, #0d7c72, #16a085);
  box-shadow: 0 13px 30px rgba(13, 124, 114, 0.34);
}

.nav-list {
  gap: 5px;
}

.nav-item {
  min-height: 42px;
  padding: 10px 11px;
  color: #d8e5e1;
  border: 1px solid transparent;
}

.nav-item svg {
  color: #94c9c1;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: #f9fbfa;
  color: #13201d;
  box-shadow: var(--shadow-sm);
}

.nav-item.active svg {
  color: var(--primary);
}

.topbar {
  min-height: 72px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(215, 224, 220, 0.86);
  box-shadow: 0 8px 26px rgba(24, 33, 31, 0.05);
}

.content-area {
  padding: 24px;
}

.page-header {
  min-height: 68px;
  align-items: center;
}

.page-header h2 {
  font-size: 30px;
  line-height: 1.05;
}

.page-header p {
  color: #6b7a76;
  font-size: 14px;
}

.global-search {
  height: 46px;
  border-color: #cfdbd7;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.global-search svg,
.search-line svg {
  color: var(--primary);
}

.sync-pill,
.user-pill,
.period-select {
  border-color: #cfdbd7;
  box-shadow: var(--shadow-sm);
}

.sync-pill {
  color: var(--primary-strong);
  background: #edf8f5;
}

.panel,
.metric-card {
  border-color: #d8e1dd;
  box-shadow: var(--shadow-md);
}

.panel {
  padding: 18px;
}

.panel-title {
  font-size: 15px;
  color: #22312d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card {
  min-height: 124px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #2563eb, var(--accent));
}

.metric-card span {
  background: #e8f6f3;
}

.metric-card strong {
  font-size: 25px;
}

.shortcut-strip {
  position: sticky;
  top: 86px;
  z-index: 15;
  padding: 9px;
  background: rgba(255, 255, 255, 0.92);
  border-color: #cfdbd7;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.shortcut-strip span {
  background: #f9fbfa;
  border-color: #d6e1dd;
  color: #4d5d59;
}

kbd,
.shortcut-strip kbd {
  background: #16231f;
  border-color: #16231f;
  color: #f8fbfa;
  border-bottom-color: #0b1210;
}

.pos-grid {
  grid-template-columns: minmax(225px, 0.85fr) minmax(340px, 1.25fr) minmax(260px, 0.9fr);
  gap: 14px;
}

.cart-head,
.cart-row {
  grid-template-columns: minmax(112px, 1.4fr) minmax(70px, 0.72fr) minmax(58px, 0.55fr) minmax(64px, 0.6fr) minmax(78px, 0.72fr) 34px;
  gap: 6px;
}

.pos-products,
.pos-cart,
.total-panel {
  min-height: 560px;
}

.pos-products {
  padding: 0;
  overflow: hidden;
}

.pos-products .panel-title,
.pos-products .search-line,
.pos-products .product-pick-list {
  margin-left: 16px;
  margin-right: 16px;
}

.pos-products .panel-title {
  margin-top: 16px;
}

.search-line {
  height: 46px;
  background: #ffffff;
  border-color: #cfdbd7;
  box-shadow: var(--shadow-sm);
}

.product-pick-list,
.compact-list {
  gap: 8px;
  max-height: 470px;
  padding-bottom: 16px;
}

.product-pick-list button,
.compact-list button {
  min-height: 58px;
  padding: 11px 12px;
  background: #ffffff;
  border-color: #edf2f0;
}

.product-pick-list button b {
  color: var(--primary-strong);
  white-space: nowrap;
}

.product-pick-list button:hover,
.product-pick-list button.active {
  background: #edf8f5;
  border-color: #9bd4ca;
}

.pos-cart {
  background: #fcfefd;
}

.cart-head {
  min-height: 34px;
  padding: 0 8px;
  background: #f1f6f4;
  border: 1px solid #d8e1dd;
  border-radius: 8px;
}

.cart-row {
  min-height: 58px;
  background: #ffffff;
  border-color: #dde6e2;
  box-shadow: var(--shadow-sm);
}

.cart-row strong {
  color: #1b2925;
}

.cart-row b {
  color: var(--primary-strong);
}

.total-panel {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  isolation: isolate;
}

.total-panel > .total-label,
.total-panel > .grand-total {
  margin-left: 18px;
  margin-right: 18px;
}

.total-panel > .total-label {
  margin-top: 18px;
  color: #dff8f2;
}

.total-panel > .grand-total {
  display: block;
  margin-top: -2px;
  padding: 0 0 16px;
  color: #ffffff;
}

.total-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 128px;
  background:
    linear-gradient(135deg, #0b4f49, #0d7c72 72%, #d97706);
  z-index: 0;
}

.total-panel > * {
  position: relative;
  z-index: 1;
}

.total-panel {
  position: sticky;
  top: 132px;
  grid-column: auto;
}

.summary-lines {
  margin: 0 18px;
  background: #f8fbfa;
  border-color: #d8e1dd;
}

.total-panel .field,
.payment-toolbar,
.payments-list {
  margin-left: 14px;
  margin-right: 14px;
}

.payments-list {
  margin-bottom: 18px;
}

.cart-row input,
.payment-row input,
.payment-row select,
.field input,
.field select,
.field textarea,
.period-select {
  min-height: 39px;
  border-color: #ccd9d5;
  background: #ffffff;
}

.field {
  color: #566763;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 42px;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.primary-button {
  background: linear-gradient(180deg, #0d7c72, #09685f);
  box-shadow: 0 10px 24px rgba(13, 124, 114, 0.22);
}

.primary-button:hover {
  background: linear-gradient(180deg, #11887d, #075e56);
  transform: translateY(-1px);
}

.secondary-button,
.icon-button {
  background: #ffffff;
  border-color: #ccd9d5;
  box-shadow: var(--shadow-sm);
}

.secondary-button:hover,
.icon-button:hover {
  background: #f7fbfa;
  border-color: #9fc8c0;
}

.payment-row {
  background: #f8fbfa;
}

.payment-row.active {
  border-color: #0d7c72;
  background: #e7f7f3;
  box-shadow: 0 0 0 3px rgba(13, 124, 114, 0.12);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #f2f6f4;
  color: #566763;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  background: #ffffff;
}

tbody tr:hover td {
  background: #f7fbfa;
}

.report-row {
  background: #ffffff;
  border-color: #d8e1dd;
  box-shadow: var(--shadow-sm);
}

.login-page {
  background:
    linear-gradient(135deg, rgba(13, 124, 114, 0.18), rgba(217, 119, 6, 0.12)),
    #f5f7f6;
}

.login-panel {
  border-color: #d8e1dd;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 1120px) {
  .pos-grid {
    grid-template-columns: minmax(300px, 0.85fr) minmax(440px, 1.15fr);
  }

  .total-panel {
    grid-column: 1 / -1;
    position: static;
    min-height: auto;
    top: auto;
  }
}

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

  .sidebar {
    height: auto;
    box-shadow: none;
  }

  .shortcut-strip {
    position: static;
  }
}

/* ERP/POS interaction pass */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d9e2ec;
  --panel: #ffffff;
  --primary: #155e75;
  --primary-strong: #0f3d56;
  --accent: #0f766e;
  --danger: #ef4444;
  --ok: #059669;
  --surface: #f5f7fb;
  --surface-strong: #e8eef6;
  --focus: rgba(21, 94, 117, 0.18);
}

body {
  background: #f4f7fb;
}

.app-shell {
  background: #f4f7fb;
}

.sidebar {
  background: #0f172a;
  box-shadow: none;
}

.brand-mark,
.login-logo {
  background: linear-gradient(145deg, #0f3d56, #155e75);
}

.brand-mark,
.login-logo {
  overflow: hidden;
  background: #0a0f13;
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: transparent;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.brand-mark img,
.login-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.login-logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin-bottom: 4px;
}

.nav-item {
  color: #cbd5e1;
}

.nav-item svg {
  color: #8fb4ce;
}

.nav-item:hover {
  background: #17243b;
}

.nav-item.active {
  background: #102a43;
  color: #ffffff;
  border-color: #1e3a5f;
  box-shadow: inset 3px 0 0 #38bdf8;
}

.nav-item.active svg {
  color: #67e8f9;
}

.topbar {
  min-height: 66px;
  background: rgba(255, 255, 255, 0.92);
}

.page-header {
  min-height: 74px;
}

.page-header h2 {
  color: #111827;
  font-size: 34px;
}

.page-header p {
  color: #52647d;
}

.panel,
.metric-card {
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.panel {
  border-radius: 2px;
}

.shortcut-strip {
  top: 78px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: none;
}

.shortcut-strip span {
  min-height: 30px;
  border-radius: 3px;
  color: #334155;
}

kbd,
.shortcut-strip kbd {
  min-width: auto;
  border-radius: 3px;
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  padding: 3px 8px;
}

.pos-erp-grid {
  grid-template-columns: minmax(470px, 1fr) minmax(420px, 0.62fr);
  align-items: start;
  gap: 16px;
}

.pos-side-stack {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 86px;
}

.pos-erp-grid .pos-products,
.pos-side-stack .pos-cart,
.pos-side-stack .total-panel {
  min-height: auto;
}

.pos-erp-grid .pos-products {
  border-radius: 2px;
  overflow: visible;
  position: relative;
}

.pos-command-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin: 0 16px 12px;
}

.pos-command-bar .search-line {
  margin: 0;
}

.pos-search-line kbd {
  background: #eef4fb;
  color: #31506b;
  border-color: #d7e4f0;
}

.quick-search-hint {
  grid-column: 1 / -1;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #dbe7ef;
  border-radius: 3px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.quick-search-hint.exact {
  border-color: #99f6e4;
  background: #ecfdf5;
  color: #047857;
}

.product-pick-list.collapsed {
  display: none;
}

.product-search-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 132px;
  z-index: 140;
  overflow: hidden;
  border: 1px solid #9ccfe5;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
}

.product-search-overlay-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fafc, #eff6ff);
}

.product-search-overlay-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.product-search-overlay-head span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 4px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.product-search-overlay-list {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.product-search-overlay-list button {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
}

.product-search-overlay-list button:hover,
.product-search-overlay-list button:focus-visible,
.product-search-overlay-list button.active {
  outline: 0;
  border-color: #06b6d4;
  background: #ecfeff;
  box-shadow: inset 4px 0 0 #0891b2;
}

.product-search-overlay-list button > span:not(.product-icon) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-search-overlay-list button strong {
  overflow: hidden;
  color: #0f172a;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-search-overlay-list button small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-search-overlay-list button b {
  align-self: center;
  padding: 7px 9px;
  border-radius: 4px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 14px;
  white-space: nowrap;
}

.scan-button,
.price-toggle,
.price-toggle button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
}

.scan-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.scan-button kbd {
  border-color: #334155;
  background: #111827;
}

.price-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
}

.price-toggle span {
  padding: 0 8px;
  color: #52647d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.price-toggle button {
  min-height: 36px;
  padding: 0 12px;
  border-color: transparent;
}

.price-toggle button.active {
  background: #0f172a;
  color: #ffffff;
}

.pos-products .product-pick-list {
  max-height: min(58vh, 620px);
}

.product-pick-list button {
  min-height: 64px;
  border-radius: 2px;
  border-color: #e4ebf3;
  padding: 10px 12px;
}

.product-pick-list button:hover,
.product-pick-list button:focus-visible,
.product-pick-list button.active {
  background: #f0fdfa;
  border-color: #7dd3fc;
  box-shadow: inset 3px 0 0 #0891b2;
  outline: 0;
}

.product-icon {
  width: 38px;
  height: 38px;
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 2px;
  background: #eef4fb;
  color: #31506b;
  overflow: hidden;
}

.product-icon.has-photo {
  background: #ffffff;
  border: 1px solid #dbe5ee;
}

.product-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-pick-list button > span:not(.product-icon) {
  flex: 1;
  min-width: 0;
}

.product-pick-list button strong {
  color: #111827;
}

.product-pick-list button small {
  letter-spacing: 0.08em;
}

.product-pick-list button b {
  font-size: 15px;
  color: #0f3d56;
}

.pos-side-stack .pos-cart {
  padding: 16px;
  background: #ffffff;
}

.pos-side-stack .cart-table {
  max-height: 300px;
  overflow: auto;
}

.pos-side-stack .cart-head,
.pos-side-stack .cart-row {
  grid-template-columns: minmax(92px, 1fr) 66px 54px 58px 76px 32px;
  gap: 5px;
}

.cart-row.active {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.cart-row strong small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-side-stack .cart-row input {
  min-height: 34px;
  padding: 6px 7px;
}

.pos-side-stack .total-panel {
  position: static;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 2px;
}

.pos-side-stack .total-panel::before {
  display: none;
}

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

.sale-fields .span-2 {
  grid-column: 1 / -1;
}

.field {
  color: #334155;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.payment-row input,
.payment-row select {
  border-radius: 2px;
}

.payment-toolbar {
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.payments-list {
  margin: 0;
}

.payment-row {
  border-radius: 2px;
  background: #f8fafc;
}

.payment-row.active {
  border-color: #38bdf8;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.13);
}

.sale-total-card {
  display: grid;
  gap: 12px;
  margin: 0 -16px -16px;
  padding: 18px;
  background: #0f172a;
  color: #dbeafe;
}

.sale-total-card .total-label {
  color: #c7d2fe;
  letter-spacing: 0.22em;
}

.sale-total-card .summary-lines {
  margin: 0;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid #334155;
  border-radius: 0;
  background: transparent;
  color: #cbd5e1;
}

.sale-total-card .summary-lines b {
  color: #ffffff;
}

.sale-total-card .grand-total {
  margin: 0;
  padding: 0;
  color: #ffffff;
  text-align: right;
  font-size: 40px;
}

.receipt-button {
  min-height: 46px;
  border-radius: 2px;
  background: #0f766e;
  box-shadow: none;
}

.receipt-button kbd {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.profit-metric-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.owner-profit-board {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) minmax(280px, 1fr);
  gap: 14px;
}

.owner-profit-card,
.profit-health {
  border: 1px solid #dbe6ef;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.owner-profit-card {
  padding: 16px;
}

.owner-profit-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.owner-profit-card > strong {
  display: block;
  margin-top: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

.owner-profit-card p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.profit-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profit-health {
  display: grid;
  align-content: center;
  min-height: 116px;
  padding: 14px;
}

.profit-health span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profit-health strong {
  margin-top: 8px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 950;
}

.profit-health.good {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.profit-health.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.profit-health.bad {
  border-color: #fecaca;
  background: #fff1f2;
}

.profit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profit-tabs button {
  min-height: 38px;
  border: 1px solid #cfdbe7;
  border-radius: 5px;
  background: #ffffff;
  color: #334155;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.profit-tabs button.active,
.profit-tabs button:hover {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.profit-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

.profit-insight-panel {
  padding: 0;
  overflow: hidden;
}

.profit-insight-panel .panel-title {
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.profit-insight-list {
  display: grid;
}

.profit-insight-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf2f7;
}

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

.profit-insight-row > b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
}

.profit-insight-row strong,
.profit-insight-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-insight-row strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.profit-insight-row span {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.profit-insight-row em {
  font-style: normal;
  white-space: nowrap;
}

.profit-panel {
  display: grid;
  gap: 14px;
}

.profit-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
}

.profit-panel-head span {
  color: #64748b;
  font-size: 13px;
  text-align: right;
}

.profit-panel-head small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.profit-search-line {
  margin: 0 14px 2px;
}

.profit-table {
  min-width: 1180px;
}

.profit-product-cell strong,
.profit-product-cell span,
.profit-product-cell small {
  display: block;
}

.profit-product-cell strong {
  color: #0f172a;
  font-size: 12px;
}

.profit-product-cell span {
  margin-top: 3px;
  color: #1f2937;
  font-weight: 800;
}

.inline-cost-control {
  display: inline-grid;
  grid-template-columns: auto minmax(98px, 120px);
  align-items: center;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.inline-cost-control span {
  display: grid;
  place-items: center;
  height: 100%;
  min-width: 34px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 900;
}

.inline-cost-control input {
  width: 100%;
  height: 36px;
  border: 0;
  padding: 0 9px;
  background: transparent;
  color: #0f172a;
  font-weight: 900;
  text-align: right;
}

.inline-cost-control input:focus {
  outline: 0;
}

.inline-cost-control:focus-within {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.inline-cost-control.saving {
  border-color: #f59e0b;
}

.inline-cost-control.pending {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.inline-cost-control.saved {
  border-color: #0f766e;
}

.inline-cost-control.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.cost-confirm-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin-top: 6px;
}

.cost-confirm-actions small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.cost-confirm-actions .primary-button,
.cost-confirm-actions .secondary-button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}

.cost-confirm-actions .secondary-button {
  background: #ffffff;
}

.margin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.margin-pill.good {
  background: #dcfce7;
  color: #166534;
}

.margin-pill.warn {
  background: #fef3c7;
  color: #92400e;
}

.margin-pill.bad {
  background: #fee2e2;
  color: #991b1b;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.payment-picker-modal {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.sale-lookup-modal {
  width: min(760px, 100%);
  max-height: min(760px, 92vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.payment-picker-head {
  display: grid;
  grid-template-columns: 42px 1fr 38px;
  align-items: center;
  gap: 12px;
}

.payment-picker-head > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.payment-picker-head strong,
.payment-picker-head small {
  display: block;
}

.payment-picker-head strong {
  color: #0f172a;
  font-size: 18px;
}

.payment-picker-head small {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.payment-picker-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  background: #f8fafc;
}

.payment-picker-total span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.payment-picker-total strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

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

.payment-method-card {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.payment-method-card svg {
  flex: 0 0 auto;
  color: #0f766e;
}

.payment-method-card span,
.payment-method-card strong,
.payment-method-card small {
  display: block;
}

.payment-method-card strong {
  font-size: 14px;
}

.payment-method-card small {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}

.payment-method-card:hover,
.payment-method-card:focus-visible {
  border-color: #0891b2;
  background: #ecfeff;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
  outline: 0;
}

.payment-method-card.preferred {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.sale-lookup-search {
  height: 48px;
  border-color: #bae6fd;
  background: #f8fafc;
}

.sale-lookup-search input {
  font-size: 14px;
  font-weight: 800;
}

.sale-lookup-list {
  display: grid;
  gap: 8px;
  min-height: 160px;
  max-height: 520px;
  overflow: auto;
}

.sale-lookup-list > button {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(180px, 0.9fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.sale-lookup-list > button:hover,
.sale-lookup-list > button:focus-visible {
  border-color: #0891b2;
  background: #ecfeff;
  box-shadow: inset 4px 0 0 #0891b2;
  outline: 0;
}

.sale-lookup-list span,
.sale-lookup-list strong,
.sale-lookup-list small,
.sale-lookup-list b {
  display: block;
}

.sale-lookup-list strong {
  font-size: 15px;
}

.sale-lookup-list b {
  font-size: 13px;
}

.sale-lookup-list small {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}

.toggle-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.toggle-field input {
  width: 17px;
  height: 17px;
  accent-color: #0f766e;
}

.payment-admin-list {
  display: grid;
  gap: 8px;
}

.payment-admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe3ea;
  border-radius: 4px;
  background: #ffffff;
}

.payment-admin-row strong,
.payment-admin-row small {
  display: block;
}

.payment-admin-row strong {
  color: #0f172a;
}

.payment-admin-row small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.payment-admin-row.disabled {
  opacity: 0.58;
  background: #f8fafc;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.table-action-button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 12px;
}

.compact-list button.active {
  background: #ecfeff;
  border-color: #67e8f9;
}

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

.inline-admin-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 8px;
  align-items: end;
}

.inline-admin-form .field {
  min-width: 0;
}

.inline-admin-form .toggle-field {
  min-height: 38px;
  white-space: nowrap;
}

.install-app-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 5px;
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: none;
  white-space: nowrap;
}

.install-app-button:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.sale-app-view {
  gap: 12px;
}

.pos-app-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, auto) auto;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
  border: 1px solid #143244;
  border-radius: 6px;
  background:
    linear-gradient(135deg, #0f172a 0%, #123f48 58%, #7c3f12 100%);
  color: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}

.pos-app-title {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.pos-app-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cffafe;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-app-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: 33px;
  line-height: 1.04;
}

.pos-app-title p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.pos-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(105px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.pos-hero-metrics div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
}

.pos-hero-metrics small {
  color: #dbeafe;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pos-hero-metrics strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.pos-hero-metrics .ok-text {
  color: #86efac;
}

.pos-hero-metrics .warn-text {
  color: #fde68a;
}

.pos-hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 190px;
}

.pos-hero-actions button {
  justify-content: center;
  gap: 8px;
}

.pos-hero-actions kbd {
  margin-left: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.pos-hero-actions .secondary-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  box-shadow: none;
}

.pos-hero-actions .secondary-button.sale-edit-action {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.18);
  color: #fef3c7;
}

.pos-hero-actions .primary-button {
  background: #10b981;
  color: #052e2b;
  box-shadow: none;
}

.pos-shortcut-strip {
  top: 76px;
  padding: 8px;
  border-color: #cbd5e1;
  background: #ffffff;
}

.pos-shortcut-strip span {
  min-height: 29px;
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
}

.sale-edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: #fffbeb;
  color: #78350f;
  box-shadow: 0 8px 22px rgba(146, 64, 14, 0.08);
}

.sale-edit-banner span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.sale-edit-banner strong {
  color: #0f172a;
}

.sale-edit-banner .secondary-button {
  min-height: 36px;
  background: #ffffff;
}

.sale-app-view .pos-erp-grid {
  grid-template-columns: minmax(560px, 1fr) minmax(430px, 0.66fr);
  gap: 12px;
}

.sale-app-view .panel {
  border-radius: 6px;
}

.sale-app-view .pos-products,
.sale-app-view .pos-cart,
.sale-app-view .total-panel,
.pending-sales-panel {
  border-color: #cfd8e3;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.pos-panel-head,
.checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fbfdff;
}

.pos-panel-head.compact,
.checkout-head {
  padding: 12px 14px;
}

.pos-panel-head > div,
.checkout-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pos-panel-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.checkout-head .pos-panel-icon {
  background: #dcfce7;
  color: #047857;
}

.pos-panel-head h3,
.checkout-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.1;
}

.pos-panel-head small,
.checkout-head small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.pos-panel-head > strong,
.checkout-head > strong {
  color: #0f172a;
  font-size: 16px;
  white-space: nowrap;
}

.sale-app-view .pos-command-bar {
  margin: 14px 16px 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.sale-app-view .pos-search-line {
  height: 48px;
  border-color: #bae6fd;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.sale-app-view .pos-search-line input {
  font-size: 15px;
  font-weight: 700;
}

.sale-app-view .scan-button {
  border-color: #0f172a;
  background: #0f172a;
}

.sale-app-view .price-toggle {
  background: #ffffff;
}

.sale-app-view .price-toggle button.active {
  background: #0369a1;
}

.sale-app-view .product-pick-list {
  max-height: min(62vh, 660px);
  margin: 0;
  padding: 0 16px 16px;
  gap: 7px;
}

.sale-app-view .product-pick-list button {
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  border-radius: 6px;
  border-color: #e2e8f0;
  background: #ffffff;
}

.sale-app-view .product-pick-list button:hover,
.sale-app-view .product-pick-list button:focus-visible,
.sale-app-view .product-pick-list button.active {
  background: #f0fdfa;
  border-color: #22d3ee;
  box-shadow:
    inset 4px 0 0 #0891b2,
    0 8px 18px rgba(14, 116, 144, 0.12);
}

.sale-app-view .product-icon {
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
}

.sale-app-view .product-pick-list button b {
  align-self: center;
  padding: 7px 9px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #047857;
  font-size: 14px;
}

.sale-app-view .pos-side-stack {
  top: 86px;
  gap: 12px;
}

.sale-app-view .pos-cart {
  padding: 0;
  overflow: hidden;
}

.sale-app-view .cart-table {
  max-height: 330px;
  padding: 12px;
}

.sale-app-view .cart-head {
  min-height: 31px;
  padding: 0 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #475569;
}

.sale-app-view .cart-row {
  min-height: 56px;
  border-radius: 5px;
  background: #ffffff;
}

.sale-app-view .cart-row.active {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.sale-app-view .total-panel {
  padding: 0;
  overflow: hidden;
}

.sale-app-view .sale-fields {
  padding: 12px;
  background: #ffffff;
}

.sale-app-view .field {
  gap: 5px;
  color: #475569;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.sale-app-view .field input,
.sale-app-view .field select,
.sale-app-view .field textarea,
.sale-app-view .payment-row input,
.sale-app-view .payment-row select {
  min-height: 40px;
  border-color: #d7e2ec;
  border-radius: 5px;
  background: #ffffff;
  font-size: 13px;
}

.sale-app-view .payment-toolbar,
.sale-app-view .payments-list {
  margin: 0;
  padding: 0 12px;
}

.sale-app-view .payment-toolbar {
  grid-template-columns: 1.15fr 0.85fr;
}

.sale-app-view .payment-row {
  border-radius: 5px;
}

.sale-app-view .sale-total-card {
  margin: 12px 0 0;
  padding: 16px;
  border-top: 1px solid #1f2937;
  background:
    linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

.sale-app-view .sale-total-card .total-label {
  color: #93c5fd;
}

.sale-app-view .sale-total-card .grand-total {
  font-size: 44px;
}

.sale-app-view .receipt-button {
  min-height: 50px;
  background: #10b981;
  color: #052e2b;
  font-size: 15px;
}

.sale-app-view .receipt-button:hover {
  background: #34d399;
}

.pending-sales-panel {
  padding: 0;
  overflow: hidden;
}

.pending-sales-panel .compact-list {
  max-height: 190px;
  padding: 12px;
}

@media (max-width: 1320px) {
  .sales-history-metrics {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .pos-app-hero {
    grid-template-columns: 1fr;
  }

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

  .profit-metric-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .owner-profit-board,
  .profit-insight-grid {
    grid-template-columns: 1fr;
  }

  .pos-erp-grid {
    grid-template-columns: minmax(430px, 1fr) minmax(390px, 0.72fr);
  }

  .pos-command-bar {
    grid-template-columns: 1fr auto;
  }

  .price-toggle {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 1120px) {
  .backup-metric-grid {
    grid-template-columns: 1fr;
  }

  .backup-row {
    grid-template-columns: 1fr;
  }

  .backup-row > div:last-child {
    justify-content: flex-start;
  }

  .sales-history-metrics {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .history-toolbar {
    grid-template-columns: 1fr;
  }

  .profit-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profit-panel-head span {
    text-align: left;
  }

  .profit-health-grid {
    grid-template-columns: 1fr;
  }

  .pos-erp-grid {
    grid-template-columns: 1fr;
  }

  .pos-side-stack {
    position: static;
  }

  .sale-app-view .pos-erp-grid {
    grid-template-columns: 1fr;
  }
}

/* Gestion administrativa 2026 */
.content-area > .view-stack:not(.sale-app-view) {
  gap: 16px;
}

.content-area > .view-stack:not(.sale-app-view) .page-header {
  min-height: 82px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.content-area > .view-stack:not(.sale-app-view) .page-header h2 {
  font-size: 25px;
  font-weight: 900;
  color: #0f172a;
}

.content-area > .view-stack:not(.sale-app-view) .page-header p {
  max-width: 720px;
  color: #64748b;
  font-size: 13px;
}

.content-area > .view-stack:not(.sale-app-view) .header-actions {
  min-width: min(460px, 100%);
}

.content-area > .view-stack:not(.sale-app-view) .panel,
.content-area > .view-stack:not(.sale-app-view) .metric-card {
  border-color: #dbe5ee;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.content-area > .view-stack:not(.sale-app-view) .panel {
  padding: 0;
  overflow: hidden;
}

.content-area > .view-stack:not(.sale-app-view) .panel > .search-line,
.content-area > .view-stack:not(.sale-app-view) .panel > .table-wrap,
.content-area > .view-stack:not(.sale-app-view) .panel > .compact-list,
.content-area > .view-stack:not(.sale-app-view) .panel > .shortcut-grid,
.content-area > .view-stack:not(.sale-app-view) .panel > .payment-admin-list,
.content-area > .view-stack:not(.sale-app-view) .panel > .backup-toolbar,
.content-area > .view-stack:not(.sale-app-view) .panel > .report-list,
.content-area > .view-stack:not(.sale-app-view) .panel > .history-toolbar,
.content-area > .view-stack:not(.sale-app-view) .panel > .backup-row,
.content-area > .view-stack:not(.sale-app-view) .panel > .backup-empty,
.content-area > .view-stack:not(.sale-app-view) .panel > .empty-state {
  margin-left: 14px;
  margin-right: 14px;
}

.content-area > .view-stack:not(.sale-app-view) .panel > .search-line:first-child,
.content-area > .view-stack:not(.sale-app-view) .panel > .table-wrap:first-child,
.content-area > .view-stack:not(.sale-app-view) .panel > .compact-list:first-child {
  margin-top: 14px;
}

.panel-heading {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.panel-heading .panel-title,
.panel-title {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.panel-heading-line {
  flex: 1;
  height: 1px;
  min-width: 32px;
  background: linear-gradient(90deg, rgba(14, 116, 144, 0.18), rgba(226, 232, 240, 0));
}

.record-count {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #cfe0ea;
  border-radius: 5px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.content-area > .view-stack:not(.sale-app-view) .form-grid {
  padding: 14px;
  gap: 12px;
  align-content: start;
}

.content-area > .view-stack:not(.sale-app-view) .form-grid .panel-heading {
  grid-column: 1 / -1;
  margin: -14px -14px 2px;
}

.content-area > .view-stack:not(.sale-app-view) .field {
  gap: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.content-area > .view-stack:not(.sale-app-view) .field input,
.content-area > .view-stack:not(.sale-app-view) .field select,
.content-area > .view-stack:not(.sale-app-view) .field textarea,
.content-area > .view-stack:not(.sale-app-view) .period-select {
  min-height: 42px;
  border-color: #cfdbe7;
  border-radius: 5px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.content-area > .view-stack:not(.sale-app-view) .field textarea {
  resize: vertical;
  min-height: 92px;
}

.content-area > .view-stack:not(.sale-app-view) .search-line {
  height: 46px;
  margin-top: 14px;
  margin-bottom: 12px;
  border-color: #cfdbe7;
  border-radius: 5px;
  background: #f8fafc;
}

.content-area > .view-stack:not(.sale-app-view) .search-line input {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.content-area > .view-stack:not(.sale-app-view) .table-wrap {
  max-height: min(64vh, 720px);
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

.content-area > .view-stack:not(.sale-app-view) table {
  min-width: 920px;
  font-size: 13px;
}

.content-area > .view-stack:not(.sale-app-view) th {
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid #dbe5ee;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.content-area > .view-stack:not(.sale-app-view) td {
  height: 48px;
  padding: 9px 10px;
  border-bottom: 1px solid #edf2f7;
  color: #1e293b;
  vertical-align: middle;
}

.content-area > .view-stack:not(.sale-app-view) td strong {
  color: #0f172a;
  font-weight: 900;
}

.content-area > .view-stack:not(.sale-app-view) td small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.content-area > .view-stack:not(.sale-app-view) tbody tr:hover td {
  background: #f8fbff;
}

.content-area > .view-stack:not(.sale-app-view) .compact-list {
  max-height: min(60vh, 620px);
  padding-bottom: 14px;
}

.content-area > .view-stack:not(.sale-app-view) .compact-list button,
.content-area > .view-stack:not(.sale-app-view) .payment-admin-row,
.content-area > .view-stack:not(.sale-app-view) .report-row,
.content-area > .view-stack:not(.sale-app-view) .backup-row {
  border-color: #dbe5ee;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

.content-area > .view-stack:not(.sale-app-view) .compact-list button {
  min-height: 58px;
}

.content-area > .view-stack:not(.sale-app-view) .compact-list button:hover,
.content-area > .view-stack:not(.sale-app-view) .compact-list button.active,
.content-area > .view-stack:not(.sale-app-view) .payment-admin-row:hover,
.content-area > .view-stack:not(.sale-app-view) .report-row:hover,
.content-area > .view-stack:not(.sale-app-view) .backup-row:hover {
  border-color: #7dd3fc;
  background: #f0f9ff;
}

.content-area > .view-stack:not(.sale-app-view) .compact-list button.active {
  box-shadow: inset 4px 0 0 #0ea5e9;
}

.content-area > .view-stack:not(.sale-app-view) .payment-admin-list {
  padding-bottom: 14px;
}

.content-area > .view-stack:not(.sale-app-view) .payment-admin-row {
  margin-bottom: 8px;
}

.content-area > .view-stack:not(.sale-app-view) .inline-admin-form {
  padding: 14px;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
}

.content-area > .view-stack:not(.sale-app-view) .toggle-field {
  min-height: 42px;
  border-radius: 5px;
  border-color: #cfdbe7;
  background: #f8fafc;
  color: #0f172a;
}

.content-area > .view-stack:not(.sale-app-view) .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.content-area > .view-stack:not(.sale-app-view) .metric-card {
  min-height: 96px;
  padding: 14px;
  border-radius: 8px;
  border-left: 4px solid #0ea5e9;
}

.content-area > .view-stack:not(.sale-app-view) .metric-card span {
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.content-area > .view-stack:not(.sale-app-view) .metric-card strong {
  color: #0f172a;
  font-size: 22px;
}

.content-area > .view-stack:not(.sale-app-view) .primary-button,
.content-area > .view-stack:not(.sale-app-view) .secondary-button,
.content-area > .view-stack:not(.sale-app-view) .icon-button {
  min-height: 38px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 900;
}

.content-area > .view-stack:not(.sale-app-view) .primary-button {
  background: linear-gradient(180deg, #0d7c72, #09685f);
  border-color: #0d7c72;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(13, 124, 114, 0.18);
}

.content-area > .view-stack:not(.sale-app-view) .primary-button:hover {
  background: linear-gradient(180deg, #11887d, #075e56);
}

.content-area > .view-stack:not(.sale-app-view) .secondary-button,
.content-area > .view-stack:not(.sale-app-view) .icon-button {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.content-area > .view-stack:not(.sale-app-view) .secondary-button:hover,
.content-area > .view-stack:not(.sale-app-view) .icon-button:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.content-area > .view-stack:not(.sale-app-view) .table-action-button {
  min-height: 30px;
  padding: 0 10px;
}

.content-area > .view-stack:not(.sale-app-view) .success-box,
.content-area > .view-stack:not(.sale-app-view) .error-box {
  border-radius: 6px;
  font-weight: 800;
}

@media (max-width: 940px) {
  .content-area > .view-stack:not(.sale-app-view) .page-header,
  .content-area > .view-stack:not(.sale-app-view) .split-grid {
    grid-template-columns: 1fr;
  }

  .content-area > .view-stack:not(.sale-app-view) .page-header {
    display: grid;
    align-items: start;
  }

  .content-area > .view-stack:not(.sale-app-view) .header-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .content-area > .view-stack:not(.sale-app-view) .form-grid,
  .content-area > .view-stack:not(.sale-app-view) .inline-admin-form {
    grid-template-columns: 1fr;
  }

  .content-area > .view-stack:not(.sale-app-view) .span-2 {
    grid-column: auto;
  }
}

.management-wide-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.management-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(12px);
}

.management-modal {
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96)),
    #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.management-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #dbe5ee;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.management-modal-head span {
  display: block;
  margin-bottom: 3px;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.management-modal-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  font-weight: 950;
}

.management-modal-form {
  padding: 16px;
}

.management-modal-form .panel-heading {
  display: none;
}

.management-modal-form .primary-button,
.management-modal-form .secondary-button {
  min-height: 42px;
}

.product-photo-uploader {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #cfdbe7;
  border-radius: 6px;
  background: #f8fafc;
}

.product-photo-preview {
  width: 132px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dbe5ee;
  border-radius: 6px;
  background: #ffffff;
  color: #64748b;
}

.product-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-photo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.content-area > .view-stack:not(.sale-app-view) td .product-icon {
  width: 42px;
  height: 42px;
}

.sale-app-view .pos-products {
  overflow: visible;
}

.sale-app-view .product-search-overlay {
  z-index: 260;
}

@media (max-width: 720px) {
  .management-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .management-modal {
    width: 100%;
    max-height: 92vh;
  }

  .product-photo-uploader {
    grid-template-columns: 1fr;
  }
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
  width: 76px;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
}

.sidebar-collapsed .nav-item span,
.sidebar-collapsed .brand-text {
  display: none;
}
