:root {
  --ink: #19221c;
  --muted: #6b746e;
  --line: #dce3dc;
  --paper: #f2f3ed;
  --card: #fff;
  --green: #176b50;
  --lime: #dff35b;
  --orange: #ed785a;
  --shadow: 0 20px 60px #23392a17;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.pos-header {
  height: 72px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--lime);
  border-radius: 13px;
  font: 900 27px Georgia;
}
.brand div {
  display: grid;
}
.brand strong {
  font-size: 11px;
  letter-spacing: 0.15em;
}
.brand small {
  font-size: 15px;
  font-weight: 800;
}
.pos-header nav {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pos-header nav a {
  padding: 9px 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  border-radius: 10px;
}
.pos-header nav button {
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.pos-header nav a.is-active {
  background: var(--ink);
  color: #fff;
}
.user-link {
  justify-self: end;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
}
.pos-layout {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 260px minmax(540px, 1fr) 280px;
}
.pos-sidebar,
.pos-summary {
  padding: 24px;
  background: #fff;
}
.pos-sidebar {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.pos-summary {
  border-left: 1px solid var(--line);
}
.pos-sidebar h1 {
  font-size: 34px;
  letter-spacing: -0.04em;
  margin: 6px 0;
}
.pos-sidebar p,
.fiscal-note p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.eyebrow {
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 900;
}
.session-card {
  padding: 15px;
  border-radius: 16px;
  background: #e9f3ed;
  display: grid;
  gap: 8px;
}
.session-card.is-closed {
  background: #f7e9e3;
}
.session-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.sidebar-actions {
  display: grid;
  gap: 8px;
}
.primary,
.secondary {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 850;
}
.primary {
  background: var(--green);
  color: #fff;
}
.production-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}
.secondary {
  background: #edf0ec;
  color: var(--ink);
}
.compact {
  padding: 8px 10px;
  font-size: 12px;
}
.side-heading,
.pane-heading,
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.side-heading span {
  background: var(--lime);
  padding: 3px 8px;
  border-radius: 15px;
  font-size: 11px;
}
.sale-selector {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  max-height: 300px;
  overflow: auto;
}
.sale-selector button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  text-align: left;
}
.sale-selector button.is-active {
  border-color: var(--green);
  background: #eaf4ef;
}
.sale-selector small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.pos-workspace {
  padding: 24px;
  min-width: 0;
}
.empty-workspace {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.empty-workspace > span {
  font-size: 56px;
}
.empty-workspace h2 {
  color: var(--ink);
  margin-bottom: 4px;
}
.sale-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 18px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  margin-bottom: 18px;
}
.sale-heading h2 {
  margin: 4px 0 0;
}
.sale-heading > div:last-child {
  text-align: right;
  display: grid;
}
.sale-heading strong {
  font-size: 25px;
}
.sale-total-actions {
  align-items: end;
}
.danger-link {
  border: 0;
  background: transparent;
  color: #ffb9aa;
  padding: 3px 0;
  text-decoration: underline;
  font-size: 11px;
}
.sale-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 18px;
}
.catalog-pane,
.accounts-pane {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  min-width: 0;
}
.pane-heading {
  margin-bottom: 14px;
}
.pane-heading h3 {
  margin: 0;
}
.pane-heading input {
  max-width: 220px;
}
.pos-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  max-height: 65vh;
  overflow: auto;
}
.pos-product {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  text-align: left;
}
.pos-product:hover {
  border-color: var(--green);
}
.pos-product strong,
.pos-product span {
  display: block;
}
.pos-product span {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0;
}
.pos-product b {
  color: var(--green);
}
.account-tabs {
  display: flex;
  gap: 7px;
  overflow: auto;
  padding-bottom: 10px;
}
.account-tabs button {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 7px 11px;
}
.account-tabs button.is-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.account-card {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.account-customer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.account-items {
  margin: 12px 0;
}
.account-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.account-item small {
  display: block;
  color: var(--muted);
}
.account-item button {
  grid-column: 1/-1;
  border: 0;
  background: transparent;
  color: var(--green);
  text-align: left;
  font-size: 11px;
}
.account-total,
.payment-row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
}
.payment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.document-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 10px;
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
  border-radius: 11px;
  font-weight: 850;
}
.fiscal-note {
  margin-top: 25px;
  padding: 15px;
  background: #fff4dd;
  border-radius: 15px;
}
.returns-queue {
  margin-top: 24px;
}
.returns-queue > div + div {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.return-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 7px;
  font-size: 12px;
}
.return-row header,
.return-row footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.return-row p {
  margin: 0;
  color: var(--muted);
}
.return-row .decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.return-row a {
  color: var(--green);
  font-weight: 800;
}
.summary-block {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.summary-block div {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  font-size: 13px;
}
.pos-mobile-nav {
  display: none;
}
dialog {
  width: min(570px, calc(100% - 22px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #14201988;
  backdrop-filter: blur(3px);
}
.dialog-form {
  padding: 23px;
}
.dialog-heading h2 {
  margin: 4px 0;
}
.close-dialog {
  border: 0;
  background: transparent;
  font-size: 27px;
}
.dialog-form label {
  display: grid;
  gap: 6px;
  margin: 13px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.dialog-form input,
.dialog-form select,
.pane-heading input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
}
.dialog-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  resize: vertical;
  font: inherit;
}
.dialog-help {
  color: var(--muted);
  font-size: 13px;
}
.return-items {
  display: grid;
  gap: 8px;
  margin: 15px 0;
}
.return-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 80px;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px;
}
.return-item > input {
  width: 20px;
  height: 20px;
}
.return-item strong,
.return-item small {
  display: block;
}
.return-item small {
  color: var(--muted);
}
.return-item input[type="number"] {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.return-item label {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.return-item label input {
  width: 18px;
  height: 18px;
}
.reports-dialog {
  width: min(1040px, calc(100% - 22px));
  max-height: 92vh;
}
.reports-form {
  max-height: 92vh;
  overflow: auto;
}
.report-filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.report-filters label {
  margin: 0;
}
.report-filters button {
  min-height: 44px;
}
.report-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.report-card {
  padding: 15px;
  border-radius: 15px;
  background: #edf3ee;
}
.report-card span,
.report-card strong {
  display: block;
}
.report-card span {
  color: var(--muted);
  font-size: 11px;
}
.report-card strong {
  margin-top: 6px;
  font-size: 21px;
}
.report-card.accent {
  background: var(--ink);
  color: #fff;
}
.report-card.accent span {
  color: #cbd4cd;
}
.report-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.report-panel {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.report-panel h3 {
  margin: 0 0 10px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.report-table th,
.report-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}
.report-table th:last-child,
.report-table td:last-child {
  text-align: right;
}
.status-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 7px;
  background: #edf0ec;
  font-size: 10px;
  font-weight: 850;
}
.status-chip.completed {
  background: #dff4e4;
  color: #176b50;
}
.status-chip.pending {
  background: #fff1c9;
  color: #745500;
}
.status-chip.rejected {
  background: #fee2dd;
  color: #983b29;
}
.secondary.danger {
  background: #fee7e2;
  color: #9d3424;
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.check-row {
  grid-template-columns: auto 1fr !important;
  align-items: start;
}
.check-row input {
  width: 17px;
  height: 17px;
}
.dialog-form details {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 13px;
}
.dialog-form summary {
  font-weight: 800;
  cursor: pointer;
}
.full {
  width: 100%;
}
.form-error {
  min-height: 18px;
  color: #a33b29;
}
.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 25px);
  opacity: 0;
  background: var(--ink);
  color: #fff;
  padding: 11px 17px;
  border-radius: 12px;
  transition: 0.2s;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.signed-out {
  min-height: 80vh;
  display: grid;
  place-content: center;
  text-align: center;
}
.signed-out a {
  background: var(--green);
  color: #fff;
  padding: 12px;
  text-decoration: none;
  border-radius: 12px;
}
@media (max-width: 1200px) {
  .pos-layout {
    grid-template-columns: 230px 1fr;
  }
  .pos-summary {
    display: none;
  }
  .sale-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  body {
    padding-bottom: 65px;
  }
  .pos-header {
    height: 62px;
    padding: 0 14px;
    grid-template-columns: 1fr auto;
  }
  .pos-header nav {
    display: none;
  }
  .pos-layout {
    display: block;
  }
  .pos-sidebar {
    border: 0;
    padding: 16px;
  }
  .pos-sidebar > div:first-child p {
    display: none;
  }
  .pos-sidebar h1 {
    font-size: 28px;
  }
  .sidebar-actions {
    grid-template-columns: 1fr 1fr;
  }
  .pos-sidebar > section:last-child {
    display: none;
  }
  .pos-workspace {
    padding: 0 14px 25px;
  }
  .sale-heading {
    border-radius: 16px;
  }
  .sale-grid {
    display: flex;
    overflow: hidden;
  }
  .catalog-pane,
  .accounts-pane {
    flex: 0 0 100%;
    transition: transform 0.2s;
  }
  .sale-grid.show-accounts .catalog-pane,
  .sale-grid.show-accounts .accounts-pane {
    transform: translateX(-100%);
  }
  .pos-products {
    max-height: none;
  }
  .pos-mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    z-index: 30;
    padding: 6px;
  }
  .pos-mobile-nav button,
  .pos-mobile-nav a {
    border: 0;
    background: transparent;
    text-decoration: none;
    color: var(--muted);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
    min-height: 48px;
  }
  .pos-mobile-nav span {
    font-size: 19px;
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
  .sidebar-actions > :last-child {
    grid-column: 1 / -1;
  }
  .return-item {
    grid-template-columns: auto minmax(0, 1fr) 70px;
  }
  .report-filters,
  .report-columns {
    grid-template-columns: 1fr;
  }
  .report-cards {
    grid-template-columns: 1fr 1fr;
  }
  .reports-dialog,
  dialog {
    max-height: calc(100vh - 20px);
    overflow: auto;
  }
  .primary,
  .secondary,
  .close-dialog,
  .dialog-form input,
  .dialog-form select {
    min-height: 44px;
  }
}
