:root {
  font-family: "DM Sans", sans-serif;
  color: #20262c;
  background: #f6f7f9;
  font-synthesis: none;
  --accent: #334ee8;
  --muted: #6e7683;
  --border: #e4e7ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
}
.sidebar {
  width: 230px;
  background: white;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--border);
  padding: 30px 17px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 12px 48px;
  color: #20262c;
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.7px;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 43px;
  border-radius: 12px 12px 12px 3px;
  background: var(--accent);
  color: white;
  font-size: 29px;
  font-weight: 700;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: -4px;
}
.nav-item {
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  color: #606978;
  margin-bottom: 6px;
  font-weight: 500;
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav-item span {
  font-size: 23px;
  line-height: 20px;
}
.nav-item.selected {
  background: #edf0ff;
  color: var(--accent);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-bottom a {
  color: var(--muted);
  font-size: 12px;
}
.workspace {
  margin-left: 230px;
}
.topbar {
  height: 72px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: #687180;
}
.store-label {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 13px;
  color: #45505d;
}
main {
  max-width: 1260px;
  margin: auto;
  padding: 36px 42px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 12px 0 30px;
}
h1 {
  font-size: 31px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -1.1px;
  margin: 0 0 9px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 15px;
  margin: 15px 0 8px;
  font-weight: 600;
}
p {
  margin: 0;
  color: var(--muted);
}
.draft-label {
  background: #edf0f4;
  color: #667080;
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 11px;
  white-space: nowrap;
}
.card {
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 3px #202b3b03;
}
.source-card {
  padding: 25px 27px;
}
.field-title {
  font-size: 15px;
  font-weight: 600;
}
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 14px;
}
textarea,
input {
  width: 100%;
  border: 1px solid #d9dee7;
  border-radius: 7px;
  background: white;
  color: #222d3a;
  padding: 10px 13px;
}
textarea {
  resize: vertical;
  min-height: 85px;
}
input:focus,
textarea:focus {
  outline: 2px solid #dbe0ff;
  border-color: #8c9aef;
}
textarea::placeholder {
  color: #98a1af;
}
#urls {
  font-size: 13px;
  background: #fcfcfe;
}
.source-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 17px;
}
.source-actions > span {
  font-size: 12px;
  color: var(--muted);
}
.primary,
.secondary {
  border-radius: 7px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 3px #334ee819;
}
.primary:hover:not(:disabled) {
  background: #243ccc;
}
.primary span {
  margin-left: 17px;
}
.secondary {
  border: 1px solid #dbe0e8;
  background: white;
  color: #435064;
}
.secondary:hover:not(:disabled) {
  background: #f5f6fa;
}
.queue-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 34px 0 18px;
}
.queue-heading h2 {
  display: flex;
  gap: 10px;
  align-items: center;
}
.queue-heading p {
  font-size: 12px;
  margin-top: 5px;
}
.count {
  background: #e9ecf2;
  color: #677182;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11px;
}
.empty-state {
  min-height: 276px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}
.empty-icon {
  background: #eef1ff;
  border-radius: 13px;
  width: 48px;
  height: 48px;
  color: var(--accent);
  font-size: 27px;
  display: grid;
  place-items: center;
}
.empty-state p {
  font-size: 12px;
  line-height: 1.9;
}
.product-queue {
  display: grid;
  gap: 14px;
}
.product-row {
  padding: 20px;
  display: grid;
  grid-template-columns: 85px 1fr auto;
  gap: 20px;
  align-items: center;
}
.product-photo {
  width: 85px;
  height: 100px;
  object-fit: contain;
  border-radius: 7px;
  background: #f4f5f7;
}
.product-photo.missing {
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.product-details h3 {
  margin: 0 0 4px;
  max-width: 550px;
}
.product-details a {
  font-size: 11px;
  color: #7a8290;
  overflow-wrap: anywhere;
}
.product-meta {
  font-size: 12px;
  margin-top: 9px;
  color: #4e5b6d;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-footer {
  grid-column: 2/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #f0f1f5;
  padding-top: 12px;
  font-size: 12px;
}
.permission {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: #707987;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
  margin-top: 3px;
}
.badge {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  background: #edf0ff;
  color: var(--accent);
  display: inline-block;
}
.badge.success {
  background: #e7f5ee;
  color: #20754d;
}
.badge.error {
  background: #fff0ec;
  color: #b34b30;
}
.row-error {
  grid-column: 1/-1;
  font-size: 12px;
  color: #b34b30;
}
.notice {
  border: 1px solid #d8e1ff;
  background: #edf2ff;
  color: #3d5697;
  padding: 12px 15px;
  margin-bottom: 22px;
  border-radius: 8px;
  font-size: 12px;
}
.notice.error {
  border-color: #f4d9d1;
  color: #a44831;
  background: #fff5f2;
}
.history-content {
  padding: 24px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
td,
th {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 500;
}
.history-error {
  color: #ae4930;
  font-size: 11px;
  margin-top: 5px;
}
footer {
  margin-top: 55px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: #9aa1ad;
  font-size: 11px;
  display: flex;
  gap: 20px;
}
footer a:first-of-type {
  margin-left: auto;
}
footer a {
  color: #7a8492;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 25px 28px;
  width: min(680px, calc(100vw - 30px));
  max-height: 90vh;
  color: #20262c;
}
dialog::backdrop {
  background: #17223b60;
  backdrop-filter: blur(2px);
}
.editor-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.close {
  background: none;
  border: 0;
  font-size: 26px;
  color: #7a8492;
}
#edit-form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin: 12px 0;
}
#edit-form input,
#edit-form textarea {
  display: block;
  margin-top: 5px;
  font-weight: 400;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.variant-row {
  display: grid;
  grid-template-columns: 1fr 100px 140px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
}
.image-choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.image-choice img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: block;
}
.editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  position: sticky;
  bottom: -25px;
  padding: 12px 0;
  background: white;
}
.legal {
  max-width: 780px;
  background: white;
  margin: 50px auto;
  border-radius: 12px;
}
.legal h1 {
  text-transform: capitalize;
  margin-top: 30px;
}
.legal p {
  line-height: 2;
}
[hidden] {
  display: none !important;
}
.usage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  margin-bottom: 25px;
  font-size: 12px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 3px;
  font: inherit;
  cursor: pointer;
}
.source-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}
.source-tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 9px 16px;
  border-radius: 7px;
}
.source-tab.active {
  color: var(--accent);
  background: #edf0ff;
  border-color: #dae0ff;
}
.catalog-fields {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 18px;
}
.catalog-fields label {
  font-size: 12px;
  color: #4e5b6d;
}
.catalog-fields input {
  display: block;
  margin-top: 5px;
}
.catalog-permission {
  margin: 22px 0 15px;
}
.catalog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  font-size: 12px;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.plan-card {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.plan-card.current {
  border-color: var(--accent);
}
.plan-card h2 {
  font-size: 17px;
}
.plan-price {
  font-size: 33px;
  font-weight: 600;
  letter-spacing: -1px;
}
.plan-price small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.plan-card p {
  font-size: 12px;
  min-height: 45px;
}
.plan-card button {
  margin-top: auto;
  width: 100%;
}
.plan-details {
  padding: 25px;
  margin-top: 25px;
}
.plan-details h2 {
  margin-bottom: 12px;
}
.plan-details p {
  font-size: 13px;
  margin-top: 10px;
}
@media (max-width: 1100px) {
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .catalog-fields {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .sidebar nav {
    flex-wrap: wrap;
  }
  .nav-item {
    width: auto;
    flex: 1;
    white-space: nowrap;
  }
  .usage-bar {
    font-size: 11px;
  }
}
@media (max-width: 1000px) {
  .sidebar {
    width: 190px;
  }
  .workspace {
    margin-left: 190px;
  }
  main {
    padding: 25px;
  }
  .brand {
    font-size: 20px;
    margin-left: 5px;
  }
  .product-row {
    grid-template-columns: 65px 1fr;
  }
  .product-photo {
    width: 65px;
    height: 80px;
  }
  .row-actions {
    grid-column: 2;
  }
  .row-footer {
    grid-column: 1/-1;
  }
  .draft-label {
    display: none;
  }
}
@media (max-width: 650px) {
  .sidebar {
    position: relative;
    width: 100%;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand {
    margin: 0 0 15px;
  }
  .sidebar nav {
    display: flex;
    gap: 10px;
  }
  .nav-item {
    margin: 0;
    font-size: 12px;
    padding: 9px;
  }
  .sidebar-bottom {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 48px;
    padding: 0 20px;
    font-size: 11px;
  }
  .topbar > span:first-child {
    display: none;
  }
  main {
    padding: 25px 16px;
  }
  h1 {
    font-size: 26px;
  }
  .source-card {
    padding: 19px;
  }
  .source-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .source-actions button {
    width: 100%;
  }
  .queue-heading {
    align-items: flex-start;
  }
  .queue-heading .primary {
    font-size: 11px;
    padding: 9px;
  }
  .product-row {
    padding: 15px;
    gap: 12px;
  }
  .row-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .variant-row {
    grid-template-columns: 1fr 80px 90px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    margin-top: 5px;
  }
  footer {
    gap: 10px;
    font-size: 10px;
  }
}
