@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  font-family: Manrope, system-ui, sans-serif;
  color: #24332b;
  background: #f4f3ed;
  font-synthesis: none;
  --green: #244f3d;
  --muted: #737d75;
  --line: #e2e5dc;
  --paper: #fffefa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow-wrap: anywhere;
}
.shell, main, .edit-layout > *, .grid > *, .line-grid > *,
.heading > *, .top > *, .upload-file > *, .employee-controls > * {
  min-width: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--green);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b4d089;
  outline-offset: 3px;
}
input:focus,
select:focus {
  outline: 2px solid #78917b;
  outline-offset: 1px;
}
[aria-invalid="true"] {
  outline: 2px solid #b83c34;
  outline-offset: 2px;
  background-color: #fff0ee;
}
.field-error {
  display: block;
  color: #a52b25;
  font-size: 12px;
  line-height: 1.5;
  margin: 6px 0 12px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.2px;
  line-height: 1.2;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 16px;
}
small,
.muted {
  color: var(--muted);
}
.shell {
  max-width: 1120px;
  margin: auto;
  padding: 0 32px 110px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.mark {
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-weight: 800;
  font-size: 22px;
}
.brand strong {
  display: block;
  letter-spacing: 2px;
  font-size: 15px;
}
.brand small {
  font-size: 11px;
}
.identity {
  text-align: right;
  font-size: 12px;
}
.identity strong {
  display: block;
}
.identity small {
  display: block;
  line-height: 1.4;
}
.access-restricted {
  display: grid;
  gap: 14px;
  max-width: 620px;
}
.tabs {
  display: flex;
  gap: 6px;
  margin: 25px 0 32px;
}
.tabs button,
.ghost {
  border: 0;
  background: transparent;
  padding: 11px 18px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
}
.tabs button.active {
  background: var(--green);
  color: white;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 10px;
}
.sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.6;
}
.primary,
.secondary,
.danger {
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 700;
  line-height: 1.4;
}
.primary {
  background: var(--green);
  color: white;
}
.secondary {
  background: #e7eadf;
  color: var(--green);
}
.danger {
  background: #fbeee8;
  color: #9a4037;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 22px;
}
.stat small {
  display: block;
  font-size: 11px;
  margin-bottom: 10px;
}
.stat strong {
  font-size: 25px;
  letter-spacing: -1px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.filters select,
.filters input {
  width: auto;
  min-width: 140px;
  max-width: 100%;
}
.receipt-list {
  display: grid;
  gap: 10px;
}
.receipt {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 18px;
  color: inherit;
}
.receipt:hover {
  border-color: #8faaa0;
}
.receipt-icon {
  width: 44px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #edf0e6;
  color: var(--green);
  font-size: 22px;
}
.receipt-main {
  flex: 1;
  min-width: 0;
}
.receipt-main strong {
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.receipt-main small {
  display: block;
  font-size: 11px;
  margin-top: 7px;
}
.receipt-end {
  text-align: right;
  flex: none;
}
.receipt-end strong {
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
}
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  padding: 5px 8px;
  background: #edf0e8;
  color: #5b6b5e;
}
.badge.review {
  background: #fff0d1;
  color: #936823;
}
.badge.confirmed {
  background: #e5efdf;
  color: #3b663f;
}
.badge.rejected,
.badge.failed {
  background: #f9e6df;
  color: #a24d3e;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
}
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  line-height: 1.8;
}
.empty h2 {
  color: #34493b;
  margin-bottom: 12px;
}
.upload-box {
  border: 1.5px dashed #aabca5;
  border-radius: 16px;
  padding: 48px 18px;
  text-align: center;
  background: #f0f3e9;
  margin: 20px 0;
}
.upload-box .upload-icon {
  font-size: 38px;
  color: var(--green);
  margin-bottom: 12px;
}
.upload-box label {
  display: inline-block;
  margin: 20px 0 8px;
  cursor: pointer;
}
.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.upload-files {
  margin: 16px 0;
  display: grid;
  gap: 8px;
}
.upload-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}
.original {
  width: 100%;
  min-width: 0;
  position: sticky;
  top: 20px;
  align-self: start;
}
.original img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 10px;
  margin-top: 15px;
  cursor: zoom-in;
}
.original object {
  width: 100%;
  height: 450px;
  margin-top: 15px;
}
.original .secondary {
  margin-top: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #657264;
}
.field.full {
  grid-column: 1/-1;
}
input,
select {
  width: 100%;
  min-width: 0;
  background: white;
  border: 1px solid #dce1d6;
  border-radius: 9px;
  padding: 11px 12px;
  color: #283b2c;
  font-size: 14px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--green);
}
.line-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.line-item:last-child {
  border-bottom: 0;
}
.line-item:first-child {
  padding-top: 10px;
}
.line-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.line-number {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
}
.line-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.line-grid .wide {
  grid-column: span 2;
}
.line-item details {
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
}
.line-item details .grid {
  margin-top: 12px;
}
.warning {
  border: 1px solid #e6d4a4;
  background: #fff6df;
  border-radius: 12px;
  padding: 14px 16px;
  color: #87612a;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.warning ul {
  margin: 5px 0;
  padding-left: 18px;
}
.notice {
  padding: 14px 16px;
  border-radius: 12px;
  background: #eaf0e3;
  color: #466242;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.7;
  margin: 15px 0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
}
.total input {
  max-width: 160px;
  font-size: 20px;
  font-weight: 800;
}
.section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.back {
  padding-left: 0;
  margin-bottom: 12px;
}
.employee {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.employee:last-child {
  border: 0;
}
.employee-info {
  flex: 1;
  min-width: 0;
}
.employee-info strong,
.employee-info small {
  display: block;
}
.employee-info small {
  font-size: 11px;
  margin-top: 5px;
}
.employee-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.employee-controls select {
  width: 160px;
}
.employee-controls button {
  padding: 10px;
  font-size: 11px;
}
.loading {
  padding: 100px 20px;
  text-align: center;
  color: var(--muted);
}
#toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 600px);
  padding: 12px 12px 12px 18px;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  border-radius: 14px;
  background: #263c30;
  color: white;
  box-shadow: 0 8px 30px #0002;
  font-size: 13px;
  z-index: 10;
  display: none;
}
#toast span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.toast-close {
  pointer-events: auto;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: #ffffff20;
  font-size: 26px;
}
.login {
  max-width: 440px;
  margin: 12vh auto;
  padding: 30px;
}
.login .mark {
  margin-bottom: 30px;
}
.login h1 {
  margin-bottom: 18px;
}
.login p {
  line-height: 1.7;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 25px;
}
.error-text {
  color: #9a4037;
  font-size: 12px;
  white-space: pre-line;
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 22px;
  line-height: 1.7;
}
.price-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.price-row strong {
  display: block;
  margin-bottom: 8px;
}
.price-row small {
  display: block;
  font-size: 11px;
  line-height: 1.8;
}
.price-value {
  float: right;
  font-weight: 800;
  color: var(--green);
}
@media (max-width: 760px) {
  .shell {
    padding: 0 18px 80px;
  }
  .top {
    padding: 19px 0;
  }
  .tabs {
    margin: 18px 0 25px;
    gap: 3px;
    flex-wrap: wrap;
  }
  .tabs button {
    padding: 10px 13px;
    font-size: 12px;
    white-space: nowrap;
  }
  h1 {
    font-size: 27px;
  }
  .heading {
    align-items: flex-start;
    gap: 10px;
  }
  .heading > .primary {
    padding: 12px;
    font-size: 12px;
  }
  .stats {
    gap: 7px;
  }
  .stat {
    padding: 15px 12px;
    border-radius: 12px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat small {
    font-size: 10px;
  }
  .receipt {
    padding: 14px 12px;
    gap: 10px;
  }
  .receipt-icon {
    width: 34px;
    height: 40px;
    font-size: 18px;
  }
  .receipt-main strong {
    font-size: 12px;
  }
  .receipt-main small {
    font-size: 10px;
  }
  .receipt-end strong {
    font-size: 14px;
  }
  .badge {
    font-size: 9px;
  }
  .edit-layout {
    display: flex;
    flex-direction: column;
  }
  .original {
    position: static;
    order: -1;
  }
  .original img {
    max-height: 220px;
  }
  .panel {
    padding: 18px;
    border-radius: 14px;
  }
  .original object {
    height: 220px;
  }
  .employee {
    flex-wrap: wrap;
  }
  .employee-controls {
    width: 100%;
    padding-left: 0;
  }
  .employee-controls select {
    flex: 1;
  }
  .actions {
    position: sticky;
    bottom: 0;
    background: #f4f3edee;
    padding: 12px 0;
    backdrop-filter: blur(8px);
  }
  .actions button {
    flex: 1;
    font-size: 12px;
    padding: 12px 10px;
  }
  .line-grid {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .line-grid input {
    padding: 10px 8px;
  }
  .identity {
    font-size: 10px;
    max-width: 150px;
  }
  .upload-box {
    padding: 30px 12px;
  }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .heading { flex-wrap: wrap; }
  .receipt { flex-wrap: wrap; }
  .receipt-main { flex-basis: 50%; }
  .receipt-end { margin-left: auto; max-width: 100%; }
  .price-value { float: none; display: block; margin-bottom: 8px; }
}

#image-zoom {
  width: 96vw;
  max-width: 1200px;
  height: 94vh;
  max-height: 94vh;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  background: #f4f3ed;
}
#image-zoom::backdrop {
  background: #10291ee0;
}
.zoom-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.zoom-body {
  overflow: auto;
  height: calc(100% - 65px);
}
.zoom-body img {
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
}
#image-zoom.enlarged img {
  width: 200%;
}
.supplier-dialog {
  border: 0;
  border-radius: 18px;
  padding: 24px;
  width: min(440px, 92vw);
  background: var(--paper);
  color: inherit;
}
.supplier-dialog::backdrop {
  background: #10291ea0;
}
#app[aria-busy="true"] {
  cursor: progress;
  opacity: 0.8;
}

.confirm-dialog {
  border: 0;
  border-radius: 18px;
  padding: 24px;
  width: min(440px, 92vw);
  background: var(--paper);
  color: inherit;
}
.confirm-dialog::backdrop {
  background: #10291ea0;
}
