/* Magnet Studio M43 — editor toolbar and commerce dark-mode closeout.
   Loaded after M42. Screenshot-specific surfaces only; imagery and production previews stay untouched. */

html[data-theme='dark']{
  --m43-panel:#111a2f;
  --m43-panel-deep:#0d1528;
  --m43-panel-raised:#18233e;
  --m43-line:rgba(158,180,231,.19);
  --m43-line-strong:rgba(147,167,255,.46);
  --m43-text:#f5f8ff;
  --m43-copy:#b5c0d6;
  --m43-muted:#8d99b2;
  --m43-blue:#92a6ff;
  --m43-green:#69dfb8;
}

/* Editor toolbar and segmented controls. */
html[data-theme='dark'] .m2-studio-app.m8-studio .m2-canvas-toolbar,
html[data-theme='dark'] .m2-studio-app .m2-canvas-toolbar{
  color:var(--m43-text)!important;
  border-bottom-color:var(--m43-line)!important;
  background:linear-gradient(180deg,#111a2f,#0d1528)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme='dark'] .m2-studio-app .m2-canvas-toolbar>div:first-child b{color:#f4f7ff!important}
html[data-theme='dark'] .m2-studio-app .m2-canvas-toolbar>div:first-child span{color:#8f9bb2!important}
html[data-theme='dark'] .m2-studio-app.m8-studio :where(.m4-preview-tabs,.m2-zoom-controls),
html[data-theme='dark'] .m2-studio-app :where(.m4-preview-tabs,.m2-zoom-controls){
  border:1px solid var(--m43-line)!important;
  background:#0a1223!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
html[data-theme='dark'] .m2-studio-app :where(.m4-preview-tabs,.m2-zoom-controls) button{
  color:#c8d2e7!important;
  border-color:transparent!important;
  background:transparent!important;
  box-shadow:none!important;
}
html[data-theme='dark'] .m2-studio-app :where(.m4-preview-tabs,.m2-zoom-controls) button:hover{
  color:#fff!important;
  background:#1a2743!important;
}
html[data-theme='dark'] .m2-studio-app .m4-preview-tabs button.is-active{
  color:#fff!important;
  background:linear-gradient(145deg,#6078ee,#875fe8)!important;
  box-shadow:0 8px 18px rgba(70,75,207,.28),inset 0 1px 0 rgba(255,255,255,.16)!important;
}
html[data-theme='dark'] .m2-studio-app :where(.m4-preview-tabs,.m2-zoom-controls) button:disabled{
  color:#59647b!important;
  background:rgba(255,255,255,.018)!important;
  opacity:1!important;
}
html[data-theme='dark'] .m2-studio-app .m2-zoom-controls strong{color:#dce5f7!important}
html[data-theme='dark'] .m2-studio-app :where(.m2-segmented,.m3-finish,.m7-layout-switch){
  border-color:var(--m43-line)!important;
  background:#08101f!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important;
}

/* Shared commerce shell: intro side cards and step rail. */
html[data-theme='dark'] .m25-commerce-shell{color:var(--m43-text)!important}
html[data-theme='dark'] .m25-commerce-shell .m25-intro>aside{
  color:#eaf0ff!important;
  border-color:var(--m43-line)!important;
  background:linear-gradient(145deg,#18233e,#111a2f)!important;
  box-shadow:0 18px 46px rgba(0,0,0,.27),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-intro>aside b{color:#eef3ff!important}
html[data-theme='dark'] .m25-commerce-shell .m25-intro>aside small{color:#9da9c0!important}
html[data-theme='dark'] .m25-commerce-shell .m25-steps{
  border-color:var(--m43-line)!important;
  background:rgba(13,21,40,.88)!important;
  box-shadow:0 20px 54px rgba(0,0,0,.22)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-steps article b{color:#e9eef9!important}
html[data-theme='dark'] .m25-commerce-shell .m25-steps article small{color:#8995ad!important}
html[data-theme='dark'] .m25-commerce-shell .m25-steps article>span{
  color:#9aa7bf!important;
  background:#18233e!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-steps article.is-done>span{
  color:#8defce!important;
  background:rgba(26,98,78,.5)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-steps article.is-active{
  border-radius:13px;
  background:linear-gradient(145deg,rgba(80,99,234,.24),rgba(124,73,225,.18))!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-steps article.is-active>span{
  color:#fff!important;
  background:linear-gradient(135deg,#486af1,#8a55e9)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-steps>i{background:rgba(143,163,214,.15)!important}

/* Cart: the remaining white project header and quantity controls. */
html[data-theme='dark'] .m25-commerce-shell .m25-cart-list>header{
  color:#eef3ff!important;
  border-color:var(--m43-line)!important;
  background:linear-gradient(145deg,#151f38,#0f182d)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.19)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-cart-list>header>div>span{
  color:#b9c7ff!important;
  background:#1b2947!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-cart-list>header b{color:#f2f5ff!important}
html[data-theme='dark'] .m25-commerce-shell .m25-cart-list>header small{color:#93a0b8!important}
html[data-theme='dark'] .m25-commerce-shell .m25-cart-list>header>button{color:#9fb1ff!important}
html[data-theme='dark'] .m25-commerce-shell .m25-item-config label>div>button{
  color:#c4cee1!important;
  border-color:var(--m43-line)!important;
  background:#0d1528!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-item-config label>div>button.is-selected{
  color:#fff!important;
  border-color:rgba(143,161,255,.52)!important;
  background:linear-gradient(145deg,#3e55ba,#6045a6)!important;
  box-shadow:0 9px 20px rgba(40,48,141,.27)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-qty-stepper{
  color:#edf2ff!important;
  border-color:var(--m43-line)!important;
  background:#0d1528!important;
}

/* Checkout: unselected delivery option must not become a white island. */
html[data-theme='dark'] .m25-commerce-shell .m25-shipping-choices>button{
  color:#dfe6f4!important;
  border-color:var(--m43-line)!important;
  background:#0d1528!important;
  box-shadow:none!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-shipping-choices>button b,
html[data-theme='dark'] .m25-commerce-shell .m25-shipping-choices>button strong{color:#eef3ff!important}
html[data-theme='dark'] .m25-commerce-shell .m25-shipping-choices>button small{color:#8f9bb2!important}
html[data-theme='dark'] .m25-commerce-shell .m25-shipping-choices>button>span{
  color:#8e9ab1!important;
  background:#18233e!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-shipping-choices>button.is-selected{
  color:#fff!important;
  border-color:rgba(134,155,255,.48)!important;
  background:linear-gradient(120deg,rgba(59,81,184,.62),rgba(91,57,154,.54))!important;
  box-shadow:0 12px 28px rgba(38,45,133,.24)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-shipping-choices>button.is-selected>span{
  color:#fff!important;
  background:#4167ef!important;
}

/* Confirmation and order detail. */
html[data-theme='dark'] .m25-commerce-shell .m25-order-number{
  color:#f2f5ff!important;
  border:1px solid var(--m43-line)!important;
  background:linear-gradient(145deg,#18233e,#0d1528)!important;
  box-shadow:0 15px 38px rgba(0,0,0,.23)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-order-number small{color:#93a1bb!important}
html[data-theme='dark'] .m25-commerce-shell .m25-order-number strong{color:#fff!important}
html[data-theme='dark'] .m25-commerce-shell .m25-order-number button{
  color:#aebdff!important;
  border-color:var(--m43-line)!important;
  background:#111a2f!important;
}
html[data-theme='dark'] .m25-commerce-shell :where(.m25-empty-commerce,.m25-order-loading){
  color:#eef3ff!important;
  border-color:var(--m43-line)!important;
  background:#0d1528!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-empty-commerce>span{
  color:#aebdff!important;
  background:#18233e!important;
}

/* Live customer order status: the entire panel was still using its light theme. */
html[data-theme='dark'] .m25-commerce-shell .m28-order-status{
  --m28-ink:#f4f7ff;
  --m28-muted:#a5b0c5;
  --m28-line:rgba(158,180,231,.19);
  color:#f4f7ff!important;
  border-color:var(--m43-line)!important;
  background:
    radial-gradient(circle at 7% 14%,rgba(49,92,255,.17),transparent 31%),
    radial-gradient(circle at 92% 10%,rgba(229,47,180,.12),transparent 32%),
    linear-gradient(145deg,#151f39,#0d1528 76%)!important;
  box-shadow:0 28px 72px rgba(0,0,0,.31)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status h2,
html[data-theme='dark'] .m25-commerce-shell .m28-order-status h3{color:#f7f9ff!important}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status>header p{color:#a6b1c6!important}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status>header aside{
  color:#eef3ff!important;
  border-color:var(--m43-line)!important;
  background:#111a2f!important;
}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status>header aside small{color:#8f9bb2!important}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status>header aside button,
html[data-theme='dark'] .m25-commerce-shell .m28-order-tracking>button{
  color:#d7e0f2!important;
  border-color:var(--m43-line)!important;
  background:#18233e!important;
}
html[data-theme='dark'] .m25-commerce-shell .m28-order-progress{
  border-color:var(--m43-line)!important;
  background:#0b1325!important;
}
html[data-theme='dark'] .m25-commerce-shell .m28-order-progress article b{color:#dfe6f4!important}
html[data-theme='dark'] .m25-commerce-shell .m28-order-progress article small{color:#8290a9!important}
html[data-theme='dark'] .m25-commerce-shell .m28-order-progress article>span{
  color:#8996ad!important;
  background:#18233e!important;
}
html[data-theme='dark'] .m25-commerce-shell .m28-order-progress article.is-done>span{
  color:#fff!important;
  background:linear-gradient(145deg,#526cf0,#8058df)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m28-order-progress>i{background:rgba(143,163,214,.16)!important}
html[data-theme='dark'] .m25-commerce-shell :where(.m28-order-next,.m28-order-tracking){
  color:#eef3ff!important;
  border-color:var(--m43-line)!important;
  background:#111a2f!important;
}
html[data-theme='dark'] .m25-commerce-shell :where(.m28-order-next,.m28-order-tracking)>span{
  color:#9fb1ff!important;
  background:#1a2948!important;
}
html[data-theme='dark'] .m25-commerce-shell :where(.m28-order-next,.m28-order-tracking) p{color:#9eabc1!important}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status>footer{
  color:#b9e7d8!important;
  border:1px solid rgba(89,215,175,.22)!important;
  background:rgba(19,71,58,.52)!important;
}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status>footer b{color:#e9fff7!important}
html[data-theme='dark'] .m25-commerce-shell .m28-order-status>footer small{color:#9bcabd!important}

/* Defensive closeout for commerce states not present in the screenshots. */
html[data-theme='dark'] .m25-commerce-shell .m25-primary.is-muted{
  color:#8f9bb2!important;
  border:1px solid var(--m43-line)!important;
  background:#182132!important;
  box-shadow:none!important;
  opacity:1!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-secondary{
  color:#dce4f3!important;
  border-color:var(--m43-line)!important;
  background:#0d1528!important;
}
html[data-theme='dark'] .m25-commerce-shell .m25-secondary:hover{
  color:#fff!important;
  border-color:var(--m43-line-strong)!important;
  background:#18233e!important;
}

@media(max-width:780px){
  html[data-theme='dark'] .m2-studio-app .m2-canvas-toolbar{background:#0d1528!important}
  html[data-theme='dark'] .m25-commerce-shell .m25-intro>aside{width:100%!important}
  html[data-theme='dark'] .m25-commerce-shell .m25-steps{background:#0d1528!important}
}

@media(prefers-reduced-motion:reduce){
  html[data-theme='dark'] .m25-commerce-shell button,
  html[data-theme='dark'] .m2-studio-app :where(.m4-preview-tabs,.m2-zoom-controls) button{transition:none!important}
}
