@font-face {
  font-family: Angels;
  src: url("/assets/fonts/font-0.ttf");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f6f6f1;
  color: #22271e;
  font:
    15px Angels,
    system-ui,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid #d4d8ce;
  background: white;
  padding: 11px 17px;
  border-radius: 9px;
  color: inherit;
}
.button-link {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid #d4d8ce;
  border-radius: 9px;
  background: white;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.button-link:hover {
  background: #e9eddf;
}
.table-link {
  border: 0;
  padding: 0;
  background: none;
  color: #496032;
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.order-source-tabs {
  margin: 20px 0;
}
.payment-proof-card {
  padding: 18px;
  margin: 18px 0;
  border: 1px solid #ddd4eb;
  border-radius: 12px;
  background: #faf7fd;
}
.payment-proof-card p {
  line-height: 1.7;
}
.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) {
  .inline-fields {
    grid-template-columns: 1fr;
  }
}
a {
  color: inherit;
}
button:hover {
  background: #e9eddf;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: #263020;
  color: white;
  border: 0;
}
.primary:hover {
  background: #47533b;
}
.danger {
  color: #952d25;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cdd2c5;
  border-radius: 8px;
  background: white;
  color: #20261c;
}
input[type="checkbox"] {
  width: auto;
}
label {
  display: block;
  font-size: 13px;
  margin: 12px 0 7px;
}
textarea {
  min-height: 90px;
}
.muted,
small {
  color: #697160;
}
.eyebrow {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #727c61;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 38px;
  letter-spacing: -1.5px;
}
h2 {
  font-size: 25px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.65;
}
.top {
  background: #1d241b;
  color: #e3e8d9;
  text-align: center;
  font-size: 11px;
  padding: 9px;
  letter-spacing: 0.08em;
}
.header {
  padding: 22px 4%;
  background: white;
  border-bottom: 1px solid #e0e3d9;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.brand {
  width: 140px;
  height: 50px;
  object-fit: contain;
}
.header .search {
  flex: 1;
  min-width: 200px;
}
.header select {
  width: 85px;
}
.header .company {
  margin-left: auto;
}
.layout {
  display: grid;
  grid-template-columns: 190px 1fr 300px;
  gap: 25px;
  max-width: 1600px;
  margin: auto;
  padding: 35px 3%;
}
.sidebar button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 6px 0;
  background: transparent;
  border: 0;
}
.sidebar button.active {
  background: #e0e7d1;
}
.sidebar .note {
  margin-top: 40px;
  border-top: 1px solid #d8ddcf;
  padding-top: 25px;
  font-size: 26px;
  line-height: 1.15;
}
.welcome {
  background: #e8eddc;
  border: 1px solid #d7dfc6;
  border-radius: 20px;
  padding: 34px;
  margin-bottom: 25px;
}
.welcome h1 {
  max-width: 470px;
  font-size: 42px;
  margin: 14px 0;
}
.welcome p {
  margin: 0;
  max-width: 540px;
}
.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 20px;
  gap: 20px;
}
.catalog-heading select {
  width: 180px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.product {
  background: white;
  border: 1px solid #e0e4d8;
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product .photo {
  background: #fafbf7;
  border: 0;
  border-radius: 0;
  height: 200px;
  width: 100%;
  padding: 15px;
}
.photo img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.product-body {
  padding: 16px;
  flex: 1;
}
.product h3 {
  min-height: 40px;
  line-height: 1.4;
  font-size: 14px;
  margin: 8px 0;
}
.product .bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}
.product .bottom strong {
  font-size: 21px;
}
.reason {
  font-size: 10px;
  padding: 9px 16px;
  background: #eff3e8;
  color: #65734d;
}
.cart {
  background: white;
  border: 1px solid #e0e4d8;
  border-radius: 16px;
  padding: 23px;
  position: sticky;
  top: 20px;
  align-self: start;
}
.cart h2 {
  font-size: 23px;
}
.cart-item {
  padding: 13px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 12px;
}
.cart-item img {
  width: 44px;
  height: 65px;
  object-fit: contain;
}
.cart-item .info {
  flex: 1;
  font-size: 12px;
}
.quantity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.quantity button {
  padding: 3px 9px;
}
.summary {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
}
.cart .primary {
  width: 100%;
}
.empty {
  padding: 35px 12px;
  text-align: center;
  color: #7b846f;
}
.auth {
  max-width: 920px;
  margin: 6vh auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border: 1px solid #dce1d2;
  border-radius: 24px;
  overflow: hidden;
}
.auth-story {
  background: #263020;
  color: white;
  padding: 45px;
}
.auth-story h1 {
  font-size: 46px;
  margin-top: 55px;
}
.auth-story .eyebrow {
  color: #d1dfb3;
}
.auth-form {
  padding: 38px;
}
.auth-form > select {
  width: 130px;
  margin-left: auto;
  display: block;
}
.auth-form form button {
  width: 100%;
  margin-top: 18px;
}
.auth .brand {
  filter: brightness(0) invert(1);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 15px;
}
.wide {
  grid-column: 1/-1;
}
.error {
  color: #a33930;
  background: #fff1ec;
  padding: 12px;
  border-radius: 8px;
}
.banner {
  background: #fff3d1;
  border: 1px solid #e1d29f;
  padding: 14px 20px;
  border-radius: 10px;
  margin: 15px 0;
}
.admin {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 30px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.tabs .active {
  background: #293621;
  color: white;
}
.panel {
  padding: 25px;
  background: white;
  border: 1px solid #dee3d4;
  border-radius: 15px;
  margin-bottom: 20px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input {
  max-width: 360px;
}
.catalog-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.zoho-customer-controls { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.zoho-customer-controls > div { flex: 1 1 180px; max-width: 300px; }
#history-import-form .zoho-customer-controls > label { flex: 1 1 240px; min-width: 0; }
#history-import-form input[type="file"] { width: 100%; max-width: 100%; box-sizing: border-box; }
.history-upload-step { padding: 18px; margin: 16px 0; border: 1px solid var(--line, #dce2d4); border-radius: 12px; }
.history-upload-step h3 { margin-top: 0; }
.history-file-picker { display: block; max-width: 100%; }
.complement-editor { border: 1px solid #dce2d4; border-radius: 12px; padding: 16px; margin-bottom: 20px; min-width: 0; }
.complement-editor legend { font-weight: 700; }
#complement-results, #complement-selected { max-height: 300px; overflow-y: auto; }
.complement-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #dce2d4; }
.complement-item img { width: 44px; height: 56px; object-fit: contain; flex-shrink: 0; }
.complement-item > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.complement-item small { display: block; }
.complement-item button { flex-shrink: 0; }
#complement-pagination { flex-wrap: wrap; align-items: center; }
@media (max-width: 520px) {
  .complement-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; }
  .complement-item img { width: 36px; grid-column: 1; grid-row: 1; }
  .complement-item > div { grid-column: 2; grid-row: 1; }
  .complement-item button { grid-column: 2; grid-row: 2; justify-self: start; }
}
#history-import-files, #history-import-preview li { overflow-wrap: anywhere; }
.catalog-filter-panel { margin-bottom: 18px; padding: 12px 16px; border: 1px solid #dce2d2; border-radius: 12px; background: #f8faf5; }
.catalog-filter-panel summary { cursor: pointer; font-weight: 600; }
.catalog-filter-panel[open] summary { margin-bottom: 16px; }
.catalog-filters label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #566147; }
.catalog-filter-panel > button { font-size: 12px; padding: 8px 14px; }
.catalog-filters select {
  width: 100%;
}
#catalog-classifications { display: contents; }
.classification-needs { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; border: 1px solid #dce2d2; border-radius: 10px; }
.classification-needs label { display: flex; align-items: center; gap: 6px; }
.classification-needs input { width: auto; }
.catalog-count {
  margin: 0 0 8px;
  color: #6c765f;
  font-size: 12px;
}
.catalog-bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 13px;
  margin-bottom: 12px;
  border: 1px solid #e2e7da;
  border-radius: 9px;
  background: #f7f8f4;
  font-size: 12px;
}
.catalog-bulk label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.catalog-bulk select {
  margin-left: auto;
}
.catalog-product-select {
  width: 17px;
  height: 17px;
}
.status-toggle {
  padding: 0;
  border: 0;
  background: transparent;
}
.admin-product-photo {
  display: block;
  width: 48px;
  height: 48px;
  padding: 3px;
  object-fit: contain;
  border: 1px solid #e2e7da;
  border-radius: 8px;
  background: #f7f8f4;
}
.photo-placeholder {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #f2f4ed;
  color: #8b9380;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  font-size: 12px;
}
@media (max-width: 700px) {
  .catalog-filters {
    grid-template-columns: 1fr;
  }
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
td,
th {
  padding: 13px 12px;
  border-bottom: 1px solid #e7ebdf;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  color: #6c765f;
}
td small {
  display: block;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 6px;
  background: #edf0e6;
  font-size: 11px;
}
.badge.pending,
.badge.error,
.badge.failed,
.badge.awaiting_zelle_receipt,
.badge.zelle_under_review,
.badge.unpaid {
  background: #fff0d5;
  color: #8a5f20;
}
.badge.zelle_rejected {
  background: #f8dfda;
  color: #8b3026;
}
.badge.approved,
.badge.paid,
.badge.done,
.badge.synced,
.badge.active {
  background: #e2eed5;
  color: #486c27;
}
.badge.inactive {
  background: #eceee8;
  color: #62695b;
}
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f5e8e5;
  color: #8b4338;
  font-size: 12px;
  font-weight: 700;
}
.connection-status.connected {
  background: #e2eed5;
  color: #486c27;
}
.connection-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}
.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.inventory-location-settings {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e3e7dc;
}
.inventory-location-settings h3 {
  margin: 0 0 7px;
  font-size: 15px;
}
.inventory-location-settings .inline {
  flex-wrap: wrap;
  margin: 14px 0;
}
.inventory-location-settings select {
  min-width: min(320px, 100%);
  flex: 1;
}
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.settings .panel {
  margin: 0;
}
.inline {
  display: flex;
  gap: 12px;
  align-items: center;
}
.inline label {
  margin: 12px 0;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
dialog {
  border: 1px solid #d9dfcf;
  border-radius: 18px;
  padding: 30px;
  width: min(720px, 94vw);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #17211199;
}
dialog .detail-photo {
  width: 180px;
  height: 220px;
  object-fit: contain;
  float: left;
  margin: 0 24px 20px 0;
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #283322;
  color: white;
  border-radius: 10px;
  padding: 16px 24px;
  z-index: 100;
  display: none;
}
#notice.visible {
  display: block;
}
.admin-test {
  border: 1px dashed #a59147;
  padding: 15px;
  border-radius: 8px;
  background: #fff8df;
  margin-bottom: 20px;
}
.order-page {
  max-width: 850px;
  margin: 40px auto;
  padding: 30px;
}
.footer {
  text-align: center;
  font-size: 12px;
  color: #7a826d;
  padding: 35px;
}
@media (min-width: 1550px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 150px 1fr;
  }
  .cart {
    position: static;
    grid-column: 2;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .auth {
    display: block;
    margin: 15px;
  }
  .auth-story {
    padding: 22px;
  }
  .auth-story h1 {
    font-size: 30px;
    margin-top: 20px;
  }
  .auth-form {
    padding: 25px;
  }
  .layout {
    display: block;
    padding: 20px;
  }
  .sidebar {
    display: flex;
    overflow: auto;
    gap: 8px;
    margin-bottom: 18px;
  }
  .sidebar button {
    width: auto;
    white-space: nowrap;
  }
  .sidebar .note,
  .sidebar > .eyebrow {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .product .photo {
    height: 155px;
  }
  .product-body {
    padding: 12px;
  }
  .cart {
    margin-top: 25px;
  }
  .welcome {
    padding: 25px;
  }
  .welcome h1 {
    font-size: 31px;
  }
  .settings {
    grid-template-columns: 1fr;
  }
  .header {
    gap: 12px;
  }
  .brand {
    width: 100px;
  }
  .header .search {
    order: 4;
    width: 100%;
  }
  .admin {
    padding: 0 15px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .product .bottom strong {
    font-size: 17px;
  }
}
