:root {
  font-family: var(
    --font-sans,
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif
  );
  color: var(--text);
  background: var(--canvas);
  font-size: var(--font-text-md-size, 15px);
  line-height: 1.5;
  font-synthesis: none;
  color-scheme: light;
  --text: #24322c;
  --canvas: #f6f7f3;
  --surface: #fff;
  --subtle: #f6f7f3;
  --hover: #eaf0e8;
  --line: #dde3da;
  --muted: #66736b;
  --sage: #365c49;
  --focus: var(--sage);
  --primary-fill: var(--sage);
  --primary-text: #fff;
  --notice-fill: #f5f0df;
  --error-fill: #fbede7;
  --error-text: #8a3f2d;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button[aria-busy="true"] {
  cursor: wait;
}
button[aria-busy="true"]::before,
.loading::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.05em;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  button[aria-busy="true"]::before,
  .loading::before {
    animation: none;
  }
}
button,
input,
select,
textarea,
summary {
  outline-offset: 4px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.25px;
}
p {
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
}
.fine {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.empty {
  padding: 28px 0;
  color: var(--muted);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.primary,
.secondary,
.quiet,
.tab {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 15px;
  background: var(--surface);
  color: inherit;
  line-height: 1.4;
}
.primary {
  background: var(--primary-fill);
  color: var(--primary-text);
  border-color: var(--primary-fill);
}
.secondary:hover,
.quiet:hover {
  background: var(--hover);
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.badge {
  font-size: 12px;
  background: var(--hover);
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field-label {
  font-size: 13px;
  color: var(--muted);
}
input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: inherit;
  padding: 10px 12px;
  min-width: 0;
}
input[type="checkbox"] {
  accent-color: var(--sage);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.full-width {
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.admin-shell .form-actions > button {
  max-width: 100%;
}
.admin-shell button {
  overflow-wrap: anywhere;
}
.admin-shell .toolbar > * {
  min-width: 0;
}
.admin-shell strong {
  overflow-wrap: anywhere;
}
.admin-shell details > :not(summary) + :not(summary) {
  margin-top: 18px;
}
.tmapi-capability {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}
.tmapi-capability button {
  max-width: 100%;
}
.tmapi-products {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.admin-shell .badge {
  white-space: normal;
  overflow-wrap: anywhere;
}
.badge.success {
  background: #e5f1e7;
  color: #235237;
}
.badge.error {
  background: #fbede7;
  color: #8a3f2d;
}
.badge.pending {
  background: #edf1fa;
  color: #3e5481;
}
.badge.neutral {
  background: #f0f1ee;
  color: #66736b;
}
.status-copy {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.live-note {
  font-size: 12px;
  color: var(--muted);
}
.live-note.error {
  color: #8a3f2d;
}
.import-progress {
  width: 100%;
  height: 5px;
  accent-color: var(--sage);
}
.source-list {
  display: flex;
  flex-direction: column;
}
.admin-shell .tabs {
  flex-wrap: wrap;
  overflow: visible;
}
.notice:empty {
  display: none;
}
.notice {
  padding: 12px 14px;
  background: var(--notice-fill);
  border-radius: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.notice.error {
  background: var(--error-fill);
  color: var(--error-text);
}
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.admin-shell {
  max-width: 1100px;
  margin: auto;
  padding: 32px 28px 64px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--sage);
  color: #fff;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 4px;
}
.tab {
  background: transparent;
  border-color: transparent;
  white-space: nowrap;
}
.tab.active {
  background: #e5ecdf;
  color: #2a4b37;
  border-color: #d6e0ce;
}
.admin-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stat {
  border: 1px solid var(--line);
  background: #fff;
  padding: 22px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat strong {
  font-size: 24px;
  letter-spacing: -0.6px;
}
.stat .muted {
  font-size: 13px;
}
.list-row {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login {
  max-width: 410px;
  width: 100%;
}
details > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
details[open] > summary {
  margin-bottom: 16px;
}
textarea {
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
:root:has(> .app-surface) {
  --app-text: #24322c;
  --app-canvas: #f8f9f6;
  --app-surface: #fdfefa;
  --app-subtle: #eff2eb;
  --app-hover: #e8eee6;
  --app-border: #d9e0d8;
  --app-muted: #58675f;
  --app-accent: #365c49;
  --app-on-accent: #f7faf6;
  --app-notice: #f5f0df;
  --app-error: #fbede7;
  --app-error-text: #8a3f2d;
  --text: var(--color-text-primary, var(--app-text));
  --canvas: var(--color-background-primary, var(--app-canvas));
  --surface: var(--color-background-secondary, var(--app-surface));
  --subtle: var(--color-background-tertiary, var(--app-subtle));
  --hover: var(--color-background-tertiary, var(--app-hover));
  --line: var(--color-border-primary, var(--app-border));
  --muted: var(--color-text-secondary, var(--app-muted));
  --sage: var(--color-text-info, var(--app-accent));
  --focus: var(--color-ring-primary, var(--app-accent));
  --primary-fill: var(--color-background-inverse, var(--app-accent));
  --primary-text: var(--color-text-inverse, var(--app-on-accent));
  --notice-fill: var(--color-background-warning, var(--app-notice));
  --error-fill: var(--color-background-danger, var(--app-error));
  --error-text: var(--color-text-danger, var(--app-error-text));
  --radius: var(--border-radius-lg, 16px);
  overflow: hidden;
}
:root[data-theme="dark"]:has(> .app-surface) {
  color-scheme: dark;
  --app-text: #edf2ec;
  --app-canvas: #171c19;
  --app-surface: #212824;
  --app-subtle: #2a322d;
  --app-hover: #323b35;
  --app-border: #3d4840;
  --app-muted: #b3c0b6;
  --app-accent: #add5bd;
  --app-on-accent: #17291f;
  --app-notice: #393222;
  --app-error: #3d2925;
  --app-error-text: #ffd1c2;
}
.app-surface {
  overflow: hidden;
}
.app-surface > #app {
  container-type: inline-size;
  inline-size: 100%;
  max-inline-size: var(--app-max-width, 100%);
  max-block-size: min(var(--app-max-height, 100dvh), 100dvh);
  margin-inline: auto;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}
.app-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-wrap: anywhere;
}
.search-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.search-bar > .field {
  flex: 1;
}
.filters {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 18px;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  background: var(--surface);
}
.selection-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.currency-totals {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 12px;
}
.currency-values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  overflow-wrap: anywhere;
}
.currency-values > div {
  flex: 1 1 100px;
  min-width: 0;
}
.currency-values dd {
  margin: 0;
  font-weight: 600;
}
.procurement-card .price,
.procurement-detail h2,
.procurement-detail .price,
.procurement-card .muted,
.procurement-variant {
  overflow-wrap: anywhere;
}
.procurement-variant {
  font-size: 13px;
  font-weight: 600;
}
.procurement-factory {
  align-self: flex-start;
  white-space: normal;
  overflow-wrap: anywhere;
}
.procurement-card .quiet {
  padding-inline: 6px;
  text-align: left;
  color: var(--sage);
}
.cover-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}
.picture {
  background: var(--subtle);
  border-radius: 8px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
}
.picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.picture span {
  font-size: 12px;
}
.product-title {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  font-weight: 600;
  color: inherit;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.product-card .product-title {
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .muted {
  font-size: 12px;
}
.price {
  font-size: 19px;
  letter-spacing: -0.4px;
}
.product-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.gallery {
  display: grid;
  gap: 12px;
  align-content: start;
}
.gallery .picture {
  aspect-ratio: 1;
}
.detail-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
.detail-copy > p {
  white-space: pre-wrap;
}
.facts {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 1.5fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 13px;
}
.facts dt {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.retail-variant-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.retail-variant-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  overflow-wrap: anywhere;
}
.retail-variant-list .picture {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.admin-body .panel > div:has(> .search-bar) {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 640px) {
  .admin-shell {
    padding: 20px 16px 40px;
  }
  .admin-header {
    margin-bottom: 22px;
  }
  .panel {
    padding: 18px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .stat {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .stat strong {
    font-size: 19px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery > .picture:first-child {
    grid-column: 1/-1;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .product-card {
    padding: 9px;
  }
  .product-card .product-title {
    font-size: 13px;
  }
  .product-card .price {
    font-size: 17px;
  }
  .search-bar {
    gap: 8px;
  }
  .tmapi-lookup .search-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .tmapi-lookup .search-bar button {
    align-self: flex-start;
  }
  .search-bar button {
    padding: 10px;
  }
  .tabs {
    gap: 2px;
  }
  .tab {
    padding: 8px 11px;
  }
  .toolbar {
    gap: 10px;
  }
}
@container (max-width: 640px) {
  .app-body {
    padding: 14px;
  }
  .product-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery > .picture:first-child {
    grid-column: 1/-1;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .product-card {
    padding: 9px;
  }
  .product-card .product-title {
    font-size: 13px;
  }
  .product-card .price {
    font-size: 17px;
  }
}
@container (max-width: 320px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.12s ease;
  }
}
