:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1f2937;
  background: #f7f8fa;
  font-synthesis: none;
  /* Pulpos-inspired teal and slate palette. */
  --violet: #20b2b8;
  --violet-dark: #168f96;
  --line: #e1e5eb;
  --muted: #6b7280;
  accent-color: var(--violet);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input {
  font: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #39c2c5;
  outline-offset: 2px;
}
.boot {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7fafb;
}
.login-panel {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  padding: 38px;
  border-radius: 8px;
  box-shadow: 0 8px 30px #1f293710;
}
.login-wordmark {
  display: grid;
  place-items: center;
  width: min(260px, 100%);
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 7px;
  background: #1f2937;
  color: #fff;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: .13em;
}
.mark,
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--violet);
  color: #fff;
  font-weight: 800;
}
.mark {
  width: 48px;
  height: 48px;
  margin: auto;
  border-radius: 8px;
}
.login h1 {
  text-align: center;
  margin: 18px 0 6px;
}
.login p {
  text-align: center;
  color: var(--muted);
  margin: 0 0 28px;
}
.login label {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  font-size: 13px;
  font-weight: 650;
}
.login input {
  height: 44px;
  border: 1px solid #cbd4d8;
  border-radius: 5px;
  padding: 0 12px;
}
.login button,
.primary-nav {
  border: 0;
  background: var(--violet);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}
.login button {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border-radius: 5px;
}
.login button:disabled {
  opacity: 0.6;
}
.error {
  padding: 10px;
  border-left: 3px solid #c83c4b;
  background: #fff4f5;
  color: #912c37;
  font-size: 13px;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}
aside {
  height: 100vh;
  position: sticky;
  top: 0;
  background: #17242c;
  color: #dce5e8;
  display: flex;
  flex-direction: column;
}
.brand {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid #ffffff17;
}
.brand span {
  width: 32px;
  height: 32px;
  border-radius: 5px;
}
.primary-nav {
  margin: 14px;
  height: 40px;
  border-radius: 4px;
}
nav {
  overflow: auto;
  padding: 3px 8px;
}
aside button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px 11px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
aside nav button span {
  color: #82939d;
  font-size: 10px;
  width: 17px;
}
aside button:hover,
aside button.active {
  background: #243741;
  color: #fff;
}
aside footer {
  margin-top: auto;
  padding: 10px 8px;
  border-top: 1px solid #ffffff17;
}
.workspace {
  min-width: 0;
}
.workspace > header {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
}
.workspace header div {
  display: grid;
}
.workspace header small {
  color: var(--muted);
}
.account {
  margin-left: auto !important;
  background: #eaf8f8;
  padding: 8px 11px;
  border-radius: 4px;
}
.mobile-menu {
  display: none;
  border: 0;
  background: none;
  font-size: 22px;
}
#view {
  padding: 26px;
  max-width: 1500px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0;
  font-size: 25px;
}
.page-head p {
  margin: 5px 0 0;
  color: var(--muted);
}
.global-invoice-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: -4px 0 14px;
}
.global-invoice-toolbar .btn {
  min-width: 132px;
  text-align: left;
}
@media (max-width: 700px) {
  .global-invoice-toolbar { flex-wrap: wrap; }
  .global-invoice-toolbar .btn { flex: 1 1 140px; }
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metrics article,
.surface {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.metrics article {
  padding: 18px;
  display: grid;
  gap: 7px;
}
.metrics small,
.metrics span {
  color: var(--muted);
}
.metrics strong {
  font-size: 24px;
}
.surface {
  margin-top: 18px;
  padding: 20px;
}
.surface h2 {
  font-size: 16px;
  margin: 0 0 20px;
}
.empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  gap: 8px;
}
.empty b {
  color: #26343c;
}
@media (max-width: 600px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .shell aside {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  #view {
    padding: 18px;
  }
}
@media (max-width: 520px) {
  .metrics {
    grid-template-columns: 1fr;
  }
  .account {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .workspace > header {
    padding: 0 14px;
  }
}

.btn {
  border: 1px solid #cbd5d9;
  background: #fff;
  color: #25343c;
  border-radius: 4px;
  padding: 9px 14px;
  cursor: pointer;
}
.btn.primary,
.checkout {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  font-weight: 700;
}
.actions,
.quick,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quick {
  flex-wrap: wrap;
}
.quick button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  padding: 12px 16px;
  cursor: pointer;
}
.list {
  padding: 0;
  overflow: hidden;
}
.toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.toolbar input {
  width: min(460px, 100%);
  height: 39px;
  border: 1px solid #cbd5d9;
  border-radius: 4px;
  padding: 0 12px;
}
.toolbar span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #edf0f2;
  padding: 13px 16px;
  font-size: 13px;
}
th {
  color: #65727a;
  font-size: 11px;
  text-transform: uppercase;
  background: #fafbfb;
}
td b,
td small {
  display: block;
}
td small {
  color: var(--muted);
  margin-top: 3px;
}
.empty-cell {
  text-align: center;
  padding: 50px;
  color: var(--muted);
}
.stock,
.status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 3px;
  background: #e9f7f1;
  color: #20714f;
}
.stock.low {
  background: #fff0f1;
  color: #a52e3b;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
.backdrop {
  position: fixed;
  inset: 0;
  background: #17242c99;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 100;
}
.dialog {
  width: min(680px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 24px 70px #0004;
}
.dialog > header,
.dialog > footer {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.dialog > header h2 {
  margin: 0;
  font-size: 18px;
}
.dialog > header button {
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 24px;
}
.dialog > footer {
  justify-content: flex-end;
  gap: 9px;
  border: 0;
  border-top: 1px solid var(--line);
}
.dialog-body {
  padding: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}
.form-grid label.wide {
  grid-column: 1/-1;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid #cbd5d9;
  border-radius: 4px;
  padding: 10px;
}
.form-grid textarea {
  min-height: 90px;
}
.form-grid .check {
  display: flex;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
}
.form-grid .check input {
  width: auto;
}
.pos {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  gap: 18px;
}
.pos .surface {
  margin: 0;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.product-grid button {
  min-height: 105px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  padding: 13px;
  display: grid;
  text-align: left;
  cursor: pointer;
}
.product-grid button:hover {
  border-color: var(--violet);
}
.product-grid button:disabled {
  opacity: 0.45;
}
.product-grid span {
  font-weight: 750;
  color: var(--violet-dark);
}
.product-grid small {
  color: var(--muted);
}
.cart {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}
.cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 65px 90px 28px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}
.cart-row div {
  display: grid;
}
.cart-row small {
  color: var(--muted);
}
.cart-row input {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
}
.cart-row button {
  border: 0;
  background: none;
  font-size: 20px;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  margin-top: auto;
  padding: 20px 0;
}
.checkout {
  height: 48px;
  border: 0;
  border-radius: 4px;
}
.checkout:disabled {
  opacity: 0.45;
}
.summary {
  display: flex;
  justify-content: space-between;
  background: #eaf8f8;
  padding: 15px;
  margin-bottom: 18px;
  font-size: 20px;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #17313a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 5px;
  z-index: 200;
  /* Notifications must never block the action underneath them. */
  pointer-events: none;
}
.toast.bad {
  background: #9e3040;
}
@media (max-width: 1000px) {
  .pos {
    grid-template-columns: 1fr;
  }
  .cart {
    min-height: 420px;
  }
}
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid label.wide {
    grid-column: auto;
  }
  .page-head {
    align-items: flex-start;
    gap: 10px;
  }
  .cart-row {
    grid-template-columns: minmax(0, 1fr) 58px 75px 24px;
  }
}
