/* Keep the product editor on the same workspace grid as the other panel tabs. */
body[data-supplier-page="panel"] .sp-editor-view { width: 100%; padding: 0 0 30px; }
body[data-supplier-page="panel"] .sp-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 132px;
  margin: 0 0 18px;
  padding: 24px 28px;
  border: 1px solid #dce6f0;
  border-radius: 21px;
  background: linear-gradient(115deg, #fff 58%, #f4f8fc);
  box-shadow: 0 10px 28px rgba(22, 48, 77, .055);
}
body[data-supplier-page="panel"] .sp-editor-heading { max-width: none; margin: 0; }
body[data-supplier-page="panel"] .sp-editor-heading h2 {
  margin: 7px 0 5px;
  color: #182e4a;
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.12;
}
body[data-supplier-page="panel"] .sp-editor-heading p { max-width: 760px; }
body[data-supplier-page="panel"] .sp-editor-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid #d9e4ee;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(23, 48, 76, .045);
  color: #a9183a;
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
}
body[data-supplier-page="panel"] .sp-editor-back .sp-icon { width: 15px; height: 15px; transform: rotate(180deg); }
body[data-supplier-page="panel"] .sp-editor-back:hover {
  border-color: #e5a9b9;
  background: #fff6f8;
  box-shadow: 0 9px 20px rgba(125, 30, 57, .09);
  text-decoration: none;
  transform: translateY(-2px);
}
body[data-supplier-page="panel"] .sp-product-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: none;
  width: 100%;
}
body[data-supplier-page="panel"] .sp-editor-card {
  min-width: 0;
  padding: 28px;
  border-color: #dce6f0;
  border-radius: 21px;
  box-shadow: 0 12px 29px rgba(22, 48, 77, .055);
  transition: border-color .23s ease, box-shadow .23s ease, transform .23s ease;
}
body[data-supplier-page="panel"] .sp-editor-card:hover,
body[data-supplier-page="panel"] .sp-editor-card:focus-within {
  border-color: #b8cadc;
  box-shadow: 0 17px 35px rgba(22, 48, 77, .09);
}
body[data-supplier-page="panel"] .sp-editor-card-head { align-items: center; min-height: 66px; margin-bottom: 22px; padding-bottom: 19px; }
body[data-supplier-page="panel"] .sp-editor-step {
  width: 42px;
  height: 42px;
  border-color: #e9bdca;
  border-radius: 12px;
  background: #fff3f6;
  box-shadow: inset 0 1px #fff;
  font-size: 12px;
}
body[data-supplier-page="panel"] .sp-editor-card:nth-of-type(2) .sp-editor-step {
  border-color: #cbddec;
  background: #edf5fc;
  color: #2a5c83;
}
body[data-supplier-page="panel"] .sp-editor-card-head h3 { color: #1c3451; font-size: 20px; }
body[data-supplier-page="panel"] .sp-editor-card-head p { font-size: 12px; }
body[data-supplier-page="panel"] .sp-editor-fields { gap: 18px; }
body[data-supplier-page="panel"] .sp-editor-fields label { gap: 9px; color: #304b69; font-size: 12px; }
body[data-supplier-page="panel"] .sp-editor-fields :is(input, select, textarea) {
  min-height: 50px;
  border-radius: 11px;
  background: #fbfdff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
body[data-supplier-page="panel"] .sp-editor-fields textarea { min-height: 175px; background: #fff; }
body[data-supplier-page="panel"] .sp-editor-fields :is(input, select, textarea):focus {
  border-color: #5b7fa2;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(65, 107, 151, .13);
}
body[data-supplier-page="panel"] .sp-editor-actions {
  grid-column: 1 / -1;
  gap: 20px;
  padding: 19px 22px;
  border-radius: 18px;
  background: linear-gradient(115deg, #f8fbfe, #fff);
}
body[data-supplier-page="panel"] .sp-editor-actions p { max-width: 680px; font-size: 12px; }
body[data-supplier-page="panel"] .sp-editor-actions > div { gap: 9px; }
body[data-supplier-page="panel"] .sp-editor-actions .sp-primary { min-width: 230px; }

/* Shared motion and button feedback across the workspace. */
body[data-supplier-page="panel"] :is(.sp-primary, .sp-secondary, .sp-editor-back, .sp-side nav button, .sp-row-actions button, .sp-panel-head button, .sp-overview-hero button) {
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), box-shadow .22s ease, background .22s ease, border-color .22s ease, color .22s ease;
}
body[data-supplier-page="panel"] :is(.sp-primary, .sp-secondary, .sp-editor-back, .sp-side nav button, .sp-row-actions button, .sp-panel-head button, .sp-overview-hero button):focus-visible {
  outline: 3px solid #d5395a;
  outline-offset: 3px;
}
body[data-supplier-page="panel"] .sp-primary { position: relative; isolation: isolate; overflow: hidden; }
body[data-supplier-page="panel"] .sp-primary::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(110deg, transparent 15%, rgba(255,255,255,.24) 50%, transparent 85%);
  content: '';
  transform: translateX(-120%);
  transition: transform .55s ease;
  pointer-events: none;
}
body[data-supplier-page="panel"] .sp-primary:hover:not(:disabled)::before { transform: translateX(120%); }
body[data-supplier-page="panel"] :is(.sp-primary, .sp-secondary, .sp-editor-back, .sp-side nav button, .sp-row-actions button):active:not(:disabled) { transform: translateY(0) scale(.985); }
body[data-supplier-page="panel"] .sp-side nav button:hover:not(.is-active) { background: #f1f6fb; color: #244e77; transform: translateX(3px); }
body[data-supplier-page="panel"] .sp-side nav button.is-active { box-shadow: inset 3px 0 #c51941, 0 6px 15px rgba(147, 32, 63, .055); }
body[data-supplier-page="panel"] .sp-view:not([hidden]) { animation: sp-view-enter .3s ease both; }
body[data-supplier-page="panel"] .sp-editor-view:not([hidden]) .sp-editor-card:nth-of-type(2) { animation: sp-view-enter .38s .045s ease both; }
@keyframes sp-view-enter { from { opacity: .65; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  body[data-supplier-page="panel"] .sp-product-editor { grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); align-items: stretch; }
  body[data-supplier-page="panel"] .sp-editor-card { height: 100%; }
  body[data-supplier-page="panel"] .sp-editor-card:first-of-type .sp-editor-fields textarea { min-height: 260px; }
  body[data-supplier-page="panel"] .sp-editor-card:nth-of-type(2) .sp-editor-fields .sp-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body[data-supplier-page="panel"] .sp-editor-topbar { align-items: stretch; flex-direction: column; gap: 17px; min-height: 0; padding: 20px; }
  body[data-supplier-page="panel"] .sp-editor-heading h2 { font-size: 29px; }
  body[data-supplier-page="panel"] .sp-editor-back { align-self: flex-start; }
  body[data-supplier-page="panel"] .sp-editor-card { padding: 21px; }
  body[data-supplier-page="panel"] .sp-editor-card-head { align-items: flex-start; }
  body[data-supplier-page="panel"] .sp-editor-actions { padding: 18px; }
  body[data-supplier-page="panel"] .sp-editor-actions > div { width: 100%; }
  body[data-supplier-page="panel"] .sp-editor-actions .sp-primary { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-supplier-page="panel"] .sp-view:not([hidden]),
  body[data-supplier-page="panel"] .sp-editor-view:not([hidden]) .sp-editor-card:nth-of-type(2) { animation: none; }
  body[data-supplier-page="panel"] .sp-primary::before { display: none; }
}
