@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/ibm-plex-sans-400.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/ibm-plex-sans-500.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/ibm-plex-sans-600.ttf') format('truetype'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url('/barlow-condensed-500.ttf') format('truetype'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('/barlow-condensed-600.ttf') format('truetype'); }
:root {
  font-family:
    'IBM Plex Sans',
    Segoe UI,
    Arial,
    sans-serif;
  color: #20302c;
  background: #f5f7f5;
  font-size: 14px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --green: #176149;
  --border: #e0e7e1;
  --muted: #6b7b74;
  --soft: #eaf3ed;
  --red: #b93c3c;
}
.pdv-customer-results {
  display: grid;
  max-height: 340px;
  overflow-y: auto;
  margin-top: 12px;
}
.pdv-customer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 12px 10px;
  border-width: 0 0 1px;
  border-radius: 0;
}
.pdv-customer-row > span:last-child {
  font-size: 12px;
  color: var(--muted);
}
.pdv-customer-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
}
.payment-row {
  padding: 14px 0;
  margin: 12px 0;
  border-top: 1px solid var(--border);
}
.discount-control { display: flex; width: 146px; flex-shrink: 0; }
.discount-control select { width: 56px; border: 1px solid var(--border); border-radius: 5px 0 0 5px; padding: 6px; background: var(--surface-input, #fff); color: var(--text, inherit); }
.discount-control input { width: 90px; min-width: 0; border: 1px solid var(--border); border-radius: 0 5px 5px 0; border-left: 0; padding: 6px 8px; text-align: right; background: var(--surface-input, #fff); color: var(--text, inherit); }
.discount-row { gap: 12px; align-items: center; }
.discount-row label small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.cart-discount-status { margin: 7px 0; }
.payment-overview { margin-bottom: 16px; }
.payment-row-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.payment-row-footer .total-row { flex: 1; margin: 0; }
.payment-row-footer strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.payment-summary { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.payment-summary .payment-total { font-size: 24px; font-weight: 650; margin-top: 8px; }
.payment-summary .payment-change { margin-top: 8px; }
dialog[open]:has(#payment-rows) { display: flex; flex-direction: column; max-height: calc(100dvh - 60px); overflow: hidden; }
dialog:has(#payment-rows) > .modal-head { flex-shrink: 0; padding: 14px 20px; }
dialog:has(#payment-rows) > .modal-body { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.payment-editor { min-height: 0; overflow-y: auto; padding: 14px 20px 10px; }
.payment-editor .payment-overview { margin-bottom: 10px; }
.payment-editor .payment-row { padding-block: 10px; margin-block: 8px; }
.payment-editor .form-grid { gap: 12px; }
.payment-confirmation { flex-shrink: 0; border-top: 1px solid var(--border); padding: 10px 20px 16px; background: var(--surface, #fff); }
.payment-confirmation .payment-summary { margin: 0; padding: 0; border: 0; }
.payment-confirmation .form-actions { margin-top: 12px; }
.payment-account {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 14px;
}
.payment-account .field {
  max-width: 220px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: inherit;
  padding: 10px 15px;
  font-weight: 600;
}
button:hover {
  background: #f1f5f1;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover {
  background: #104e3a;
}
.danger {
  color: var(--red);
}
.quiet {
  background: transparent;
  border: none;
}
.small {
  padding: 6px 10px;
  font-size: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 28px 17px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px 27px;
}
.brand-mark {
  width: 35px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  border-radius: 9px;
  font-size: 22px;
  font-weight: 800;
}
.brand b {
  display: block;
  font-size: 17px;
  letter-spacing: -0.5px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 4px;
}
.nav-label {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  color: #93a097;
  letter-spacing: 1.5px;
  padding: 22px 12px 9px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  margin: 3px 0;
  border-radius: 8px;
  color: #65736c;
  font-weight: 500;
}
.nav-link:hover {
  background: #f4f7f4;
  text-decoration: none;
}
.nav-link.active {
  color: var(--green);
  background: var(--soft);
  font-weight: 700;
}
.nav-icon {
  font-size: 17px;
  width: 20px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 20px 12px 0;
  color: var(--muted);
  font-size: 12px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #4c9e6d;
  border-radius: 50%;
  margin-right: 7px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 73px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 35px;
}
.topbar-left {
  color: var(--muted);
  font-size: 12px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 12px;
}
.avatar {
  width: 31px;
  height: 31px;
  background: #e9eddf;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #66704a;
}
.content {
  max-width: 1500px;
  margin: auto;
  padding: 34px 35px 50px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 9px;
}
h1 {
  font-size: 28px;
  letter-spacing: -1px;
  margin: 0 0 8px;
  font-weight: 650;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.4px;
  margin: 0 0 8px;
}
h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--green);
}
.badge.pending {
  background: #f1f2f1;
  color: #778078;
}
.badge.draft {
  background: #fff2d9;
  color: #92631a;
}
.badge.development {
  background: #fff1dc;
  color: #856324;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.stat {
  border: 1px solid var(--border);
  background: white;
  border-radius: 11px;
  padding: 19px 22px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
}
.stat-number {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 650;
  margin-top: 8px;
}
.stat small {
  color: var(--muted);
  font-size: 11px;
}
.progress {
  height: 5px;
  background: #edf1ed;
  border-radius: 10px;
  margin-top: 14px;
  overflow: hidden;
}
.progress span {
  display: block;
  background: var(--green);
  height: 100%;
  transition: width 0.2s;
}
.workspace {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 21px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}
.panel-head {
  padding: 19px 21px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-body {
  padding: 23px;
}
.question-sidebar {
  padding: 16px;
}
.search {
  width: 100%;
  padding: 11px 12px;
  background: #fbfcfb;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: inherit;
}
.category-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  max-height: 440px;
  overflow: auto;
}
.category {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 12px;
  padding: 11px 10px;
  border: 0;
  font-weight: 500;
  background: transparent;
}
.category.active {
  background: var(--soft);
  color: var(--green);
}
.category-count {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.question-nav {
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.question-no {
  color: var(--muted);
  font-size: 12px;
}
.question-prompt {
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.4px;
  font-weight: 600;
  margin: 10px 0 24px;
  max-width: 810px;
}
.question-input {
  width: 100%;
  min-height: 135px;
  border: 1px solid #cdd9cf;
  border-radius: 8px;
  padding: 15px;
  resize: vertical;
  line-height: 1.75;
  background: #fff;
  outline: none;
}
.question-input:focus,
input:focus,
select:focus {
  border-color: var(--green);
  outline: 2px solid #17614915;
  outline-offset: 1px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.answer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.save-status {
  font-size: 11px;
  color: var(--muted);
}
.answer-meta {
  font-size: 11px;
  color: #8a958e;
  margin-top: 20px;
  border-top: 1px solid #edf0ed;
  padding-top: 15px;
}
.question-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}
.question-tile {
  width: 35px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}
.question-tile.confirmed {
  background: var(--soft);
  color: var(--green);
  border-color: #cfe2d4;
}
.question-tile.draft {
  background: #fff5e4;
}
.question-tile.selected {
  box-shadow: 0 0 0 2px var(--green);
}
.note {
  font-size: 12px;
  background: #f0f5f1;
  padding: 14px 16px;
  border-radius: 8px;
  color: #65766b;
  line-height: 1.6;
  margin-top: 18px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar .search {
  max-width: 360px;
}
.toolbar .push {
  margin-left: auto;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  background: #fafbf9;
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 14px 19px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 16px 19px;
  border-bottom: 1px solid #edf0ed;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table-link {
  font-weight: 600;
  color: #294936;
}
.table-link:hover {
  color: var(--green);
}
.inline-input {
  width: 95px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: right;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #ced8cf;
  background: white;
  border-radius: 7px;
  padding: 11px 12px;
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}
.empty {
  padding: 55px 20px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: #384d40;
  margin-bottom: 8px;
}
.list-card {
  padding: 20px 23px;
  border-bottom: 1px solid var(--border);
}
.list-card:last-child {
  border-bottom: 0;
}
.list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.list-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0 0;
}
.pdv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 355px;
  gap: 20px;
}
.pdv-search {
  font-size: 17px;
  padding: 15px;
}
.offer-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 17px;
}
.offer-card {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  padding: 17px;
  min-height: 114px;
  font-weight: 500;
}
.offer-card:hover {
  border-color: #75a488;
  background: #f8fcf8;
}
.offer-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.offer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
}
.offer-bottom b {
  font-size: 17px;
  color: var(--green);
}
.offer-bottom small {
  color: var(--muted);
  font-size: 10px;
}
.cart {
  position: sticky;
  top: 20px;
}
.cart-lines {
  min-height: 200px;
  max-height: 350px;
  overflow: auto;
}
.cart-line {
  padding: 15px 19px;
  border-bottom: 1px solid #edf0ed;
}
.cart-line-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
.qty-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 9px;
}
.qty-controls button {
  padding: 4px 9px;
}
.qty-controls input {
  width: 46px;
  text-align: center;
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: 4px;
}
.cart-total {
  padding: 19px;
  background: #fafcf9;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
}
.total-row.final {
  font-size: 21px;
  font-weight: 700;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.wide {
  width: 100%;
}
.cart-footer {
  padding: 14px 19px;
  display: flex;
  gap: 9px;
}
.chart-bar {
  height: 6px;
  background: #e8f0e9;
  border-radius: 6px;
  min-width: 120px;
  margin-top: 8px;
  overflow: hidden;
}
.chart-bar i {
  display: block;
  height: 100%;
  background: #408362;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: end;
}
.filters .field {
  margin: 0;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 13px;
  width: min(620px, calc(100vw - 30px));
  padding: 0;
  box-shadow: 0 24px 80px #183a2d35;
  color: inherit;
}
dialog::backdrop {
  background: #16291e66;
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  font-size: 20px;
  margin: 0;
}
.modal-body {
  padding: 23px 24px;
}
.payment-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.payment-row input,
.payment-row select {
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.error {
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}
.receipt {
  font-family: Consolas, monospace;
  max-width: 300px;
  margin: auto;
  font-size: 12px;
  color: #000;
}
.receipt h3 {
  text-align: center;
}
.receipt hr {
  border: 0;
  border-top: 1px dashed #777;
}
.receipt .total-row {
  font-size: 12px;
}
.history-json {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 11px;
  background: #f6f8f5;
  padding: 13px;
  border-radius: 6px;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 430px;
  background: #193e2e;
  color: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 7px 25px #203c3025;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  font-size: 13px;
}
#toast.visible {
  opacity: 1;
}
.operation-error {
  flex: 0 0 auto;
  margin: 0 20px 12px;
  padding: 10px 12px;
  border-left: 3px solid #e16c63;
  background: color-mix(in srgb, #e16c63 12%, transparent);
  color: var(--text, inherit);
  font-size: 14px;
  line-height: 1.4;
}
#toast.error-toast {
  background: #943d38;
}
.loading {
  padding: 40px;
}
.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.full {
  grid-column: 1/-1;
}
.print-only {
  display: none;
}
.development-note {
  border: 1px solid #e9dec3;
  border-radius: 8px;
  background: #fffaf0;
  color: #88703a;
  font-size: 11px;
  padding: 11px 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #337b5c;
  outline-offset: 3px;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 188px minmax(0, 1fr);
  }
  .content {
    padding: 25px 22px;
  }
  .workspace {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .pdv-grid {
    grid-template-columns: 1fr 300px;
  }
  .offer-results {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 22px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }
  .brand {
    padding: 0 0 12px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
    overflow: auto;
  }
  .nav-link {
    white-space: nowrap;
    font-size: 11px;
    padding: 9px;
  }
  .nav-icon {
    display: none;
  }
  .topbar {
    height: 52px;
    padding: 0 16px;
  }
  .topbar-left {
    display: none;
  }
  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .content {
    padding: 24px 16px;
  }
  .page-heading {
    align-items: start;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .cards {
    gap: 8px;
  }
  .stat {
    padding: 14px;
  }
  .stat-number {
    font-size: 22px;
  }
  .workspace,
  .pdv-grid {
    grid-template-columns: 1fr;
  }
  .question-sidebar .category-list {
    max-height: 145px;
  }
  .question-prompt {
    font-size: 18px;
  }
  .panel-body {
    padding: 19px;
  }
  .cart {
    position: static;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .offer-results {
    grid-template-columns: repeat(2, 1fr);
  }
  .answer-actions {
    align-items: start;
    flex-direction: column;
  }
  .filters {
    flex-wrap: wrap;
  }
  .payment-row {
    grid-template-columns: 1fr;
  }
}
@media print {
  @page {
    size: 80mm auto;
    margin: 4mm;
  }
  body > * {
    display: none !important;
  }
  body > #modal[open] {
    display: block !important;
    position: static;
    border: 0;
    box-shadow: none;
    width: 72mm;
    margin: 0;
    padding: 0;
  }
  #modal .modal-head,
  #modal .no-print {
    display: none !important;
  }
  #modal .modal-body {
    padding: 0;
  }
  .receipt {
    width: 100%;
    max-width: 72mm;
  }
  dialog::backdrop {
    display: none;
  }
}
