*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand — extracted from Summit Group Marketing identity */
  --charcoal:     #1A1918;
  --charcoal-90:  #232220;
  --charcoal-80:  #2D2C2A;
  --charcoal-60:  #4A4947;
  --charcoal-40:  #706F6D;
  --charcoal-20:  #A8A7A5;
  --charcoal-10:  #D4D3D1;
  --charcoal-05:  #ECEAE7;

  --cream:        #E9E7E2;
  --cream-dark:   #DEDAD4;
  --cream-light:  #F2F1EE;
  --off-white:    #FAFAF8;
  --white:        #FFFFFF;

  /* Status — muted to stay on-brand */
  --green:        #3D7A5A;
  --green-bg:     #E6F2EC;
  --green-text:   #1E5C3A;
  --amber:        #8A6A2A;
  --amber-bg:     #F5EDD8;
  --amber-text:   #6B4E1A;
  --red:          #C0392B;

  /* Aliases for readability */
  --bg:           var(--cream);
  --card:         var(--off-white);
  --border:       var(--charcoal-10);
  --border-soft:  var(--charcoal-05);
  --text:         var(--charcoal);
  --text-muted:   var(--charcoal-40);
  --text-subtle:  var(--charcoal-20);

  /* Shape */
  --radius:       10px;
  --radius-sm:    7px;
  --shadow-sm:    0 1px 3px rgba(26,25,24,.06), 0 1px 2px rgba(26,25,24,.04);
  --shadow:       0 2px 8px rgba(26,25,24,.07), 0 1px 3px rgba(26,25,24,.05);
  --shadow-md:    0 8px 24px rgba(26,25,24,.10), 0 2px 6px rgba(26,25,24,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ───────────────────────────────── */
.header {
  background: var(--charcoal);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(26,25,24,.25);
}
.header-logo {
  display: flex;
  align-items: center;
  height: 36px;
}
/* blend-mode on wrapper, filter on img — must be separate elements or it won't composite */
.logo-blend-wrapper {
  mix-blend-mode: screen;
  display: flex;
  align-items: center;
}
.header-logo-img {
  height: 36px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: invert(1);
  display: block;
}
#logo-text {
  align-items: center;
  gap: 4px;
  color: var(--off-white);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.logo-accent { color: var(--cream-light); opacity: .7; }

.header-badge {
  background: var(--charcoal-80);
  border: 1px solid var(--charcoal-60);
  color: var(--charcoal-20);
  font-size: 11.5px;
  padding: 4px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--charcoal-40);
  flex-shrink: 0;
}
.status-dot.connected {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(61,122,90,.3);
}

/* ── TABS ─────────────────────────────────── */
.tab-nav {
  background: var(--charcoal-90);
  border-bottom: 1px solid var(--charcoal-80);
  padding: 0 28px;
  display: flex;
}
.tab-btn {
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--charcoal-20);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
  letter-spacing: .1px;
}
.tab-btn:hover { color: var(--off-white); }
.tab-btn.active {
  color: var(--off-white);
  border-bottom-color: var(--cream);
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal-60);
  color: var(--cream-light);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 5px;
}

/* ── LAYOUT ───────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

/* ── CARD ─────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.card-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: .8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cream-light);
}
.card-body { padding: 18px; }

/* ── FORM ─────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
input[type="text"], input[type="number"], input[type="url"], textarea, select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--charcoal-60);
  box-shadow: 0 0 0 3px rgba(26,25,24,.08);
}
textarea { resize: vertical; min-height: 80px; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--charcoal);
  color: var(--off-white);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  justify-content: center;
  border: 1px solid var(--charcoal-80);
}
.store-flag { font-size: 16px; }

/* ── BUTTONS ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .15s;
  white-space: nowrap;
  letter-spacing: .1px;
}
.btn-primary {
  background: var(--charcoal);
  color: var(--cream-light);
  width: 100%;
  padding: 12px;
  font-size: 14px;
  margin-top: 6px;
  box-shadow: var(--shadow);
  border: 1px solid var(--charcoal-80);
}
.btn-primary:hover {
  background: var(--charcoal-80);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-push {
  background: var(--charcoal);
  color: var(--off-white);
  width: 100%;
  padding: 14px;
  font-size: 14px;
  border-radius: 9px;
  margin-top: 4px;
  border: 1px solid var(--charcoal-80);
  box-shadow: var(--shadow);
}
.btn-push:hover {
  background: var(--charcoal-80);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-push:active { transform: translateY(0); }
.btn-push:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 5px;
  background: var(--cream-light);
  color: var(--charcoal-60);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  transition: all .15s;
}
.btn-sm:hover { background: var(--cream-dark); color: var(--charcoal); }

/* ── SPINNER ──────────────────────────────── */
.spinner {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 70px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.spinner.active { display: flex; }
.spin {
  width: 38px; height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--charcoal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LISTING PREVIEW ──────────────────────── */
.listing-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--charcoal-10);
  gap: 10px;
  font-size: 13px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}
.listing-empty-icon { font-size: 32px; opacity: .3; }

.listing-content { display: none; }
.listing-content.active { display: block; }

.section { margin-bottom: 10px; }

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.field-row:last-child { border-bottom: none; }
.field-label {
  width: 160px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.field-value { flex: 1; }
.field-value input[type="text"],
.field-value input[type="number"],
.field-value textarea {
  border-color: transparent;
  background: transparent;
  padding: 4px 6px;
  font-size: 13.5px;
  box-shadow: none;
}
.field-value input:hover,
.field-value textarea:hover {
  border-color: var(--border);
  background: var(--cream-light);
}
.field-value input:focus,
.field-value textarea:focus {
  border-color: var(--charcoal-60);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,25,24,.07);
}

/* Description */
.desc-preview {
  padding: 12px 14px;
  background: var(--cream-light);
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-size: 13.5px;
  line-height: 1.65;
  cursor: text;
  transition: border-color .15s;
}
.desc-preview:hover { border-color: var(--border); }
.desc-preview p { margin-bottom: 10px; }
.desc-preview ul { padding-left: 18px; margin-bottom: 10px; }
.desc-preview li { margin-bottom: 5px; }
.desc-textarea {
  display: none;
  width: 100%;
  min-height: 200px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  line-height: 1.55;
  background: var(--charcoal);
  color: var(--cream-light);
  border-color: var(--charcoal-80);
  padding: 12px;
}
.desc-textarea:focus { border-color: var(--charcoal-60); box-shadow: none; }
.desc-textarea.active { display: block; }
.desc-preview.hidden { display: none; }

/* Tags */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--charcoal-60);
  font-weight: 500;
}
.tag-chip.product-code {
  background: var(--charcoal);
  color: var(--cream-light);
  border-color: var(--charcoal-80);
  font-weight: 700;
}
.tag-chip .remove {
  cursor: pointer;
  color: var(--charcoal-20);
  font-size: 14px;
  line-height: 1;
  padding: 0 1px;
  transition: color .1s;
}
.tag-chip .remove:hover { color: var(--red); }
.tag-add-input {
  border: 1px dashed var(--border) !important;
  background: transparent !important;
  width: 90px !important;
  padding: 3px 7px !important;
  font-size: 12px !important;
  border-radius: 5px !important;
  min-height: unset !important;
  box-shadow: none !important;
}

/* Variant chips */
.color-chip {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--charcoal-60);
  transition: border-color .15s;
}
.color-chip:hover { border-color: var(--charcoal-60); }
.size-chip {
  display: inline-flex;
  align-items: center;
  background: var(--cream-light);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--charcoal);
}

/* Char counter */
.char-counter {
  font-size: 11px;
  color: var(--text-subtle);
  text-align: right;
  margin-top: 3px;
}
.char-counter.over { color: var(--red); font-weight: 700; }

/* Metafields grid */
.metafields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mf-item label {
  font-size: 11px;
  margin-bottom: 3px;
  color: var(--text-subtle);
}
.mf-item input {
  font-size: 12.5px;
  padding: 7px 10px;
}

/* Pricing */
.compare-price {
  font-size: 13px;
  color: var(--text-subtle);
  text-decoration: line-through;
}

/* ── LOG ──────────────────────────────────── */
/* ── MODAL ────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,25,24,.55);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--cream-light);
}
.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
}
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--charcoal-40);
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.modal-close:hover { color: var(--charcoal); }
.modal-body { padding: 20px; }
.modal-body .form-group { margin-bottom: 14px; }
.modal-body .form-group:last-child { margin-bottom: 0; }
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  padding: 0 20px;
  background: var(--cream-light);
}
.modal-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--charcoal-40);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}
.modal-tab:hover { color: var(--charcoal); }
.modal-tab.active { color: var(--charcoal); border-bottom-color: var(--charcoal); }
.modal-hint {
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--charcoal-60);
  margin-bottom: 14px;
  line-height: 1.5;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--cream-light);
}

/* ── STORE DROPDOWN ───────────────────────── */
.store-dropdown {
  position: relative;
}
.store-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  background: var(--charcoal);
  border: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cream-light);
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 2px 8px rgba(26,25,24,.20), 0 1px 3px rgba(26,25,24,.12);
  white-space: nowrap;
}
.store-dropdown-trigger:hover {
  background: var(--charcoal-80);
  box-shadow: 0 4px 14px rgba(26,25,24,.25), 0 2px 5px rgba(26,25,24,.15);
  transform: translateY(-1px);
}
.store-dropdown-trigger.open {
  background: var(--charcoal-80);
  box-shadow: 0 4px 14px rgba(26,25,24,.25);
}
.store-dropdown-chevron {
  font-size: 9px;
  opacity: .6;
  transition: transform .2s;
  margin-left: 2px;
}
.store-dropdown-trigger.open .store-dropdown-chevron { transform: rotate(180deg); }

.store-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  z-index: 50;
  box-shadow: 0 8px 30px rgba(26,25,24,.14), 0 2px 8px rgba(26,25,24,.08);
  overflow: hidden;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.store-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal-60);
  transition: background .1s;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}
.store-dropdown-item:last-of-type { border-bottom: none; }
.store-dropdown-item:hover { background: var(--cream-light); color: var(--charcoal); }
.store-dropdown-item.active {
  color: var(--charcoal);
  background: var(--cream);
}
.store-item-label { flex: 1; }
.store-item-active-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  opacity: 0;
}
.store-dropdown-item.active .store-item-active-dot { opacity: 1; }

.store-item-delete {
  background: none;
  border: none;
  color: var(--charcoal-10);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 4px;
  transition: all .15s;
  opacity: 0;
  flex-shrink: 0;
}
.store-dropdown-item:hover .store-item-delete { opacity: 1; color: var(--charcoal-20); }
.store-item-delete:hover { background: #fee2e2; color: var(--red) !important; opacity: 1 !important; }

.store-dropdown-add {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--charcoal-40);
  cursor: pointer;
  transition: all .15s;
  border-top: 1px solid var(--border-soft);
}
.store-dropdown-add:hover { background: var(--cream-light); color: var(--charcoal); }

/* ── LANGUAGE TABS ────────────────────────── */
.lang-tab-bar {
  display: flex;
  gap: 4px;
}
.lang-tab {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--charcoal-40);
  cursor: pointer;
  transition: all .15s;
}
.lang-tab:hover { color: var(--charcoal); border-color: var(--charcoal-20); }
.lang-tab.active {
  background: var(--charcoal);
  color: var(--cream-light);
  border-color: var(--charcoal);
}
.lang-notice {
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--charcoal-60);
  margin-bottom: 10px;
  font-weight: 500;
}

.label-hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--charcoal-20);
  text-transform: none;
  letter-spacing: 0;
}
.log-search-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 0;
}
.log-search-bar input {
  max-width: 320px;
  background: var(--white);
}
.log-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.log-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -.3px;
}
.log-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}
.btn-refresh {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--charcoal-60);
  cursor: pointer;
  transition: all .15s;
}
.btn-refresh:hover { border-color: var(--charcoal-60); color: var(--charcoal); }
.btn-refresh.spinning #refresh_icon { display: inline-block; animation: spin .7s linear infinite; }

.log-empty {
  background: var(--card);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}
.log-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.log-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-subtle);
  background: var(--cream-light);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
/* Fixed column widths keep headers aligned with data regardless of content */
.log-table th:nth-child(1), .log-table td:nth-child(1) { width: 120px; }
.log-table th:nth-child(3), .log-table td:nth-child(3) { width: 170px; }
.log-table th:nth-child(4), .log-table td:nth-child(4) { width: 140px; }
.log-table th:nth-child(5), .log-table td:nth-child(5) { width: 100px; }
.log-table th:nth-child(6), .log-table td:nth-child(6) { width: 180px; }
.log-table th:nth-child(7), .log-table td:nth-child(7) { width: 80px; }
.log-table th:nth-child(8), .log-table td:nth-child(8) { width: 44px; text-align: center; }
.log-table tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background .1s;
}
.log-table tbody tr:last-child { border-bottom: none; }
.log-table tbody tr:hover { background: var(--cream-light); }
.log-table td { padding: 13px 16px; vertical-align: middle; }

.log-code {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--charcoal);
  background: var(--charcoal-05);
  padding: 3px 9px;
  border-radius: 5px;
  white-space: nowrap;
  border: 1px solid var(--border);
}
.log-title-cell {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--charcoal);
  font-weight: 500;
}
.log-type { color: var(--charcoal-60); white-space: nowrap; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.status-badge.active   { background: var(--green-bg);  color: var(--green-text); }
.status-badge.draft    { background: var(--amber-bg);  color: var(--amber-text); }
.status-badge.archived { background: var(--cream-dark); color: var(--charcoal-40); }
.status-badge.deleted  { background: #fee2e2; color: #991b1b; text-decoration: line-through; }
.status-dot-sm {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.log-date  { color: var(--charcoal-60); white-space: nowrap; font-size: 12.5px; }
.log-time  { color: var(--text-muted);  font-size: 12.5px; white-space: nowrap; }
.log-link  { color: var(--charcoal-20); text-decoration: none; font-size: 15px; transition: color .15s; }
.log-link:hover { color: var(--charcoal); }
.log-delete-btn {
  background: none;
  border: none;
  color: var(--charcoal-10);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: all .15s;
}
.log-table tbody tr:hover .log-delete-btn { opacity: 1; color: var(--charcoal-20); }
.log-delete-btn:hover { background: #fee2e2; color: var(--red) !important; opacity: 1 !important; }

/* ── TOAST ────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 13px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateY(80px);
  opacity: 0;
  transition: all .25s cubic-bezier(.34,1.3,.64,1);
  max-width: 360px;
}
.toast.success { background: var(--green-bg);  color: var(--green-text); border: 1px solid #b6d9c8; }
.toast.error   { background: #fce8e6; color: #8b2316; border: 1px solid #f5c6c2; }
.toast.show    { transform: translateY(0); opacity: 1; }

/* ── SHEET LOOKUP ──────────────────────────────── */
.lookup-row {
  display: flex;
  gap: 8px;
}
.lookup-row input { flex: 1; }
.btn-lookup {
  padding: 9px 14px;
  background: var(--charcoal);
  color: var(--cream-light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}
.btn-lookup:hover    { background: var(--charcoal-80); }
.btn-lookup:disabled { opacity: .5; cursor: not-allowed; }

.product-notes-box {
  background: var(--amber-bg);
  border: 1px solid #e8d5a3;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.product-notes-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--amber-text);
  margin-bottom: 4px;
}
.product-notes-box div:last-child {
  font-size: 12.5px;
  color: var(--amber-text);
  line-height: 1.5;
}

/* ── STEP PROGRESS ────────────────────────────── */
.steps-progress {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 340px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.step-dot-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--cream-dark);
  border: 2px solid var(--border);
  transition: all .3s;
}
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--charcoal-20);
  transition: all .3s;
}
.step-info { display: flex; flex-direction: column; gap: 2px; }
.step-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--charcoal-20);
  transition: color .3s;
}
.step-sub {
  font-size: 11.5px;
  color: var(--charcoal-10);
  transition: color .3s;
}
.step-connector {
  width: 2px;
  height: 18px;
  background: var(--border);
  margin-left: 13px;
}

/* Active step */
.step-item.active .step-dot-wrap {
  background: var(--charcoal);
  border-color: var(--charcoal);
}
.step-item.active .step-dot {
  background: var(--cream);
  animation: pulse 1s ease-in-out infinite;
}
.step-item.active .step-label { color: var(--charcoal); }
.step-item.active .step-sub   { color: var(--charcoal-60); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: .7; }
}

/* Done step */
.step-item.done .step-dot-wrap {
  background: var(--green);
  border-color: var(--green);
}
.step-item.done .step-dot {
  background: transparent;
  width: 12px;
  height: 8px;
  border-radius: 0;
  border-left: 2.5px solid white;
  border-bottom: 2.5px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
.step-item.done .step-label { color: var(--charcoal-60); }
.step-item.done .step-sub   { color: var(--charcoal-20); }

/* Pending step */
.step-item.pending .step-label { color: var(--charcoal-10); }
.step-item.pending .step-sub   { color: var(--charcoal-05); }

/* ── SUPPLIER CARD ─────────────────────────────── */
.supplier-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.supplier-gallery-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: zoom-in;
  transition: border-color .15s, transform .15s;
}
.supplier-gallery-img:hover {
  border-color: var(--charcoal-40);
  transform: scale(1.03);
}
.supplier-variants {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.supplier-spec-block { display: flex; flex-direction: column; gap: 7px; }
.supplier-spec-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-subtle);
}
.supplier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.supplier-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--charcoal-60);
}
.supplier-chip.size {
  background: var(--cream-light);
  font-weight: 700;
  color: var(--charcoal);
}
.supplier-spec-note {
  font-size: 11.5px;
  color: var(--charcoal-20);
  line-height: 1.5;
}

/* ── COMPETITOR IMAGES ─────────────────────────── */
.card-header-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--charcoal-20);
  text-transform: none;
  letter-spacing: 0;
}
.competitor-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.comp-img-wrap {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 2.5px solid var(--green);
  transition: border-color .15s, opacity .15s;
  flex-shrink: 0;
}
.comp-img-wrap:has(.comp-img-check:not(:checked)) {
  border-color: var(--border);
  opacity: .45;
}
.comp-img-wrap input[type="checkbox"] {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 16px;
  height: 16px;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
}
.comp-img {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
}
.comp-img-tick {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  pointer-events: none;
  transition: opacity .15s;
}
.comp-img-wrap:has(.comp-img-check:not(:checked)) .comp-img-tick {
  opacity: 0;
}
.comp-img-wrap { cursor: grab; }
.comp-img-wrap:active { cursor: grabbing; }
.comp-img-wrap.dragging {
  opacity: .35;
  border-style: dashed;
}
.comp-img-drag {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ── LISTING SCORE ─────────────────────────────── */
.score-badge {
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--cream-dark);
  color: var(--charcoal-40);
}
.score-badge.good { background: var(--green-bg);  color: var(--green-text); }
.score-badge.ok   { background: var(--amber-bg);  color: var(--amber-text); }
.score-badge.low  { background: #fce8e6;           color: #8b2316; }

.score-loading {
  font-size: 13px;
  color: var(--charcoal-40);
  padding: 6px 0;
  animation: bpulse 1.4s ease-in-out infinite;
}

.score-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.score-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.score-bar-label {
  width: 90px;
  font-size: 12px;
  font-weight: 700;
  color: var(--charcoal-60);
  flex-shrink: 0;
}
.score-bar-track {
  flex: 1;
  height: 8px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
  background: var(--charcoal-20);
}
.score-bar-fill.good { background: var(--green); }
.score-bar-fill.ok   { background: #c9a227; }
.score-bar-fill.low  { background: var(--red); }
.score-bar-num {
  width: 30px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--charcoal-60);
  flex-shrink: 0;
}

.score-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-subtle);
  margin-bottom: 9px;
}
.score-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.kw-chip {
  display: inline-flex;
  padding: 4px 12px;
  background: var(--charcoal);
  color: var(--cream-light);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
  transition: background .15s;
}
.kw-chip:hover { background: var(--charcoal-80); }

.score-suggestions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
}
.score-suggestions li {
  font-size: 13px;
  color: var(--charcoal-60);
  padding: 8px 12px;
  background: var(--cream-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--amber);
  line-height: 1.5;
}

/* ── PUSH ACTIONS ──────────────────────────────── */
.push-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.btn-push.pushed {
  background: var(--green);
  border-color: var(--green);
  cursor: default;
  opacity: 1;
}
.btn-push.pushed:hover { transform: none; box-shadow: var(--shadow); }
.btn-shopify-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
  transition: all .15s;
  gap: 6px;
}
.btn-shopify-link:hover {
  border-color: var(--charcoal-60);
  background: var(--cream-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ── LOG CONTROLS ──────────────────────────────── */
.log-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.log-select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23706F6D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  width: auto;
  min-width: 110px;
  transition: border-color .15s;
}
.log-select:hover  { border-color: var(--charcoal-40); }
.log-select:focus  { border-color: var(--charcoal-60); box-shadow: 0 0 0 3px rgba(26,25,24,.07); }
.log-search-input {
  width: 180px !important;
  padding: 8px 12px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
  background: var(--white) !important;
}

/* Clickable log rows */
.log-row-clickable { cursor: pointer; }
.log-row-clickable:hover { background: var(--cream) !important; }

/* Store badge in log */
.log-store-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--charcoal);
  font-weight: 600;
  white-space: nowrap;
}

/* ── STORES TAB ────────────────────────────────── */
.stores-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.stores-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.stores-empty {
  background: var(--card);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  grid-column: 1 / -1;
}
.store-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.store-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--cream-light);
  border-bottom: 1px solid var(--border-soft);
}
.store-card-flag { font-size: 26px; flex-shrink: 0; }
.store-card-name { flex: 1; }
.store-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -.2px;
}
.store-card-domain {
  font-size: 11.5px;
  color: var(--charcoal-40);
  margin-top: 2px;
}
.store-card-status { flex-shrink: 0; }

/* Connection status dot */
.conn-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: background .3s;
}
.conn-dot.unknown  { background: var(--charcoal-20); }
.conn-dot.testing  { background: var(--amber); animation: spin .7s linear infinite; }
.conn-dot.ok       { background: var(--green); box-shadow: 0 0 0 3px rgba(61,122,90,.2); }
.conn-dot.error    { background: var(--red); }

.store-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.store-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
}
.store-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--charcoal-20);
}
.store-meta-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
}
.store-card-actions {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  align-items: center;
}
.btn-danger { color: var(--red) !important; }
.btn-danger:hover { background: #fee2e2 !important; border-color: #f5c6c2 !important; }

/* ── ANALYTICS TAB ─────────────────────────────── */
.analytics-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.stat-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-subtle);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -1px;
  line-height: 1;
}
.analytics-charts {
  display: flex;
  gap: 14px;
  margin-bottom: 0;
}
.analytics-chart-card .card-body { padding: 16px 18px; }

.an-types { display: flex; flex-direction: column; gap: 10px; }
.an-type-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.an-type-label {
  width: 200px;
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--charcoal-60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.an-type-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--cream-dark);
  border-radius: 5px;
  overflow: hidden;
}
.an-type-bar {
  height: 100%;
  background: var(--charcoal);
  border-radius: 5px;
  transition: width .5s ease;
}
.an-type-count {
  width: 32px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--charcoal-60);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .analytics-cards  { grid-template-columns: 1fr 1fr; }
  .analytics-charts { flex-direction: column; }
}

/* ── BATCH TAB ─────────────────────────────────── */
.batch-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px;
}
.batch-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.batch-aside {}
.batch-main {}
.batch-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.batch-option input[type="checkbox"] { width: auto; flex-shrink: 0; }
.batch-option label {
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal-60);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.batch-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.batch-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-subtle);
  background: var(--cream-light);
  border-bottom: 1px solid var(--border-soft);
}
.batch-table tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background .1s;
}
.batch-table tbody tr:last-child { border-bottom: none; }
.batch-table td { padding: 12px 16px; vertical-align: middle; }
.batch-msg { color: var(--charcoal-60); font-size: 12.5px; }

.batch-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.batch-status.pending   { background: var(--cream-dark);  color: var(--charcoal-40); }
.batch-status.active    { background: var(--amber-bg);    color: var(--amber-text);  animation: bpulse 1.2s ease-in-out infinite; }
.batch-status.done      { background: var(--green-bg);    color: var(--green-text);  }
.batch-status.error     { background: #fce8e6;            color: #8b2316;            }
.batch-status.skipped   { background: var(--cream-dark);  color: var(--charcoal-20); }
@keyframes bpulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

.batch-summary {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 14px;
}
.batch-summary.success { background: var(--green-bg);  color: var(--green-text); border: 1px solid #b6d9c8; }
.batch-summary.partial { background: var(--amber-bg);  color: var(--amber-text); border: 1px solid #e8d5a3; }

.batch-sheet-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--green-bg);
  border: 1px solid #b6d9c8;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.bsa-count {
  font-size: 32px;
  font-weight: 800;
  color: var(--green-text);
  min-width: 36px;
  text-align: center;
}
.bsa-info { flex: 1; }
.bsa-title { font-weight: 700; font-size: 14px; color: var(--green-text); }
.bsa-sub   { font-size: 12px; color: var(--green-text); opacity: .75; margin-top: 2px; }
.bsa-btn {
  background: var(--green-text);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.bsa-btn:hover { opacity: .85; }

@media (max-width: 900px) {
  .batch-layout { grid-template-columns: 1fr; }
}

/* ── SETTINGS TAB ──────────────────────────────── */
.settings-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.settings-card .card-body { padding: 20px; }
.settings-desc {
  font-size: 13px;
  color: var(--charcoal-60);
  margin-bottom: 14px;
  line-height: 1.55;
}
.settings-hint {
  font-size: 11.5px;
  color: var(--charcoal-20);
  margin-top: 10px;
  line-height: 1.5;
}
.settings-readonly-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--charcoal-20);
  background: var(--cream-dark);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.prompt-preview {
  background: var(--charcoal);
  color: var(--cream-light);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11.5px;
  line-height: 1.6;
  padding: 14px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--charcoal-80);
}
.settings-footer {
  display: flex;
  justify-content: flex-end;
}
.settings-card textarea {
  min-height: 200px;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .metafields-grid { grid-template-columns: 1fr; }
  .stores-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .log-controls { flex-wrap: wrap; }
}
