/* Magnet Studio M40 — screenshot-driven dark completion and manual-editor emphasis.
   Loaded after M39. Dark mode only; uploaded artwork and production previews keep their real colours. */

html[data-theme='dark']{
  --m40-panel:#121a30;
  --m40-panel-2:#0e1629;
  --m40-panel-3:#18213b;
  --m40-line:rgba(157,178,229,.16);
  --m40-line-strong:rgba(125,151,255,.34);
  --m40-text:#f4f7ff;
  --m40-copy:#aebbd3;
  --m40-muted:#7e8ba7;
  --m40-blue:#8196ff;
  --m40-violet:#a67cff;
  --m40-pink:#ff72c5;
  --m40-green:#52d9ac;
  --m40-amber:#ffc46b;
  --m40-shadow:0 24px 72px rgba(0,0,0,.34);
  --m40-shadow-soft:0 16px 44px rgba(0,0,0,.24);
}

/* Shared dark surfaces and text hierarchy */
html[data-theme='dark'] :where(.m16-home,.m17-page,.m23-account-shell,.m25-commerce-shell,.m2-studio-app,.m27-admin-shell,.m27-login-shell,.m30-operations){color:var(--m40-text)}
html[data-theme='dark'] :where(.m16-home,.m17-page,.m23-account-shell,.m25-commerce-shell,.m2-studio-app,.m27-admin-shell,.m27-login-shell,.m30-operations) :where(a,button){-webkit-tap-highlight-color:transparent}
html[data-theme='dark'] :where(.m16-home,.m17-page,.m23-account-shell,.m25-commerce-shell,.m2-studio-app,.m27-admin-shell,.m27-login-shell,.m30-operations) :where(code,kbd){color:#dbe3ff;background:rgba(116,139,255,.1);border-color:var(--m40-line)}
html[data-theme='dark'] :where(.m16-home,.m17-page,.m23-account-shell,.m25-commerce-shell,.m2-studio-app,.m27-admin-shell,.m27-login-shell,.m30-operations) :where(.is-disabled,[disabled]){color:#697690!important}

/* Homepage: remove the remaining white islands while keeping photo canvases colour accurate. */
html[data-theme='dark'] .m16-home :where(.m16-trust,.m16-smartcut,.m16-smartcut__flow,.m16-products__grid>article,.m16-production,.m16-sheet-story,.m16-studio-story,.m16-sheet-facts,.m16-final){
  color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,rgba(20,28,50,.97),rgba(13,20,37,.94))!important;box-shadow:var(--m40-shadow)!important
}
html[data-theme='dark'] .m16-smartcut{background:radial-gradient(circle at 91% 4%,rgba(132,91,255,.17),transparent 29%),linear-gradient(145deg,#151e37,#0e162a 70%)!important}
html[data-theme='dark'] .m16-smartcut__flow{background:linear-gradient(145deg,#10182d,#0b1223)!important}
html[data-theme='dark'] .m16-smartcut__steps article,
html[data-theme='dark'] .m16-production__points article,
html[data-theme='dark'] .m16-sheet-facts span,
html[data-theme='dark'] .m16-hero__micro span{
  color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:rgba(9,15,29,.7)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)
}
html[data-theme='dark'] .m16-smartcut__steps article:not(:last-child)::after{color:#b9c5ff!important;border-color:var(--m40-line)!important;background:#151e36!important;box-shadow:0 8px 20px rgba(0,0,0,.28)!important}
html[data-theme='dark'] .m16-smartcut__promise{color:#cbd6ed!important;border-color:rgba(78,216,171,.17)!important;background:linear-gradient(90deg,rgba(25,83,68,.28),rgba(16,35,38,.56))!important}
html[data-theme='dark'] .m16-smartcut__promise a{color:#91eccb!important;border-color:rgba(78,216,171,.2)!important;background:rgba(15,39,35,.78)!important}
html[data-theme='dark'] :where(.m16-product__visual,.m16-photo-card,.m16-sheet-story__visual,.m16-editor-canvas,.m16-hero__visual){border:1px solid rgba(170,188,230,.13)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 18px 48px rgba(0,0,0,.22)!important}
html[data-theme='dark'] .m16-editor-window{border-color:var(--m40-line)!important;background:#0d1427!important;box-shadow:0 28px 78px rgba(0,0,0,.42)!important}
html[data-theme='dark'] .m16-editor-window>header,
html[data-theme='dark'] .m16-editor-window__body>nav,
html[data-theme='dark'] .m16-editor-window__body>aside{color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:#151e35!important}
html[data-theme='dark'] .m16-editor-choice{color:#d7dff1!important;border-color:var(--m40-line)!important;background:#0f172a!important}
html[data-theme='dark'] :where(.m16-product__visual>span,.m16-sheet-story__visual>span,.m16-editor-canvas em,.m16-hero__badge){color:#243152!important;background:rgba(249,251,255,.92)!important}

/* Public menu pages: tables, calculators, process cards and support/B2B details. */
html[data-theme='dark'] .m17-page :where(.m17-compare__table,.m17-calculator__controls,.m17-calculator__summary,.m17-price-includes article,.m17-volume__tiers,.m17-volume__tiers article,.m17-help-topics article,.m17-b2b-benefits article,.m17-b2b-uses article,.m17-b2b-flow,.m17-b2b-volume__cards article,.m17-process__list article,.m17-deep-dive,.m17-photo-guide,.m17-proof-story,.m17-support-human,.m17-b2b-workspace,.m17-b2b-volume,.m17-mini-grid span,.m17-local-strip,.m18-price-included span){
  color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,rgba(20,28,50,.97),rgba(13,20,37,.94))!important;box-shadow:var(--m40-shadow-soft)!important
}
html[data-theme='dark'] .m17-compare__table :where(header,article,div,span){border-color:var(--m40-line)!important}
html[data-theme='dark'] .m17-compare__table :where(header,article:nth-child(even)){background:rgba(9,15,29,.38)!important}
html[data-theme='dark'] .m17-compare__table :where(b,strong){color:var(--m40-text)!important}
html[data-theme='dark'] .m17-calculator__controls{background:radial-gradient(circle at 10% 0,rgba(86,107,255,.14),transparent 30%),linear-gradient(145deg,#151e36,#0e1629)!important}
html[data-theme='dark'] .m17-control{border-color:var(--m40-line)!important}
html[data-theme='dark'] .m17-control button,
html[data-theme='dark'] .m17-calculator :where(button,select,input),
html[data-theme='dark'] .m17-b2b-board button,
html[data-theme='dark'] .m18-board-action{
  color:#dce4f7!important;border-color:var(--m40-line)!important;background:#10182c!important;box-shadow:none!important
}
html[data-theme='dark'] .m17-control button:hover,
html[data-theme='dark'] .m17-control button.is-selected,
html[data-theme='dark'] .m17-calculator button.is-selected{color:#fff!important;border-color:var(--m40-line-strong)!important;background:linear-gradient(145deg,rgba(73,99,255,.3),rgba(150,88,255,.2))!important}
html[data-theme='dark'] .m17-calculator__summary .ms-button{color:#fff!important;background:linear-gradient(135deg,#617cff,#9b68ff 65%,#e85aae)!important;box-shadow:0 14px 32px rgba(74,92,230,.28)!important}
html[data-theme='dark'] .m17-volume__tiers article:not(:last-child),
html[data-theme='dark'] .m17-b2b-flow article:not(:last-child){border-right-color:var(--m40-line)!important}
html[data-theme='dark'] .m17-b2b-board,
html[data-theme='dark'] .m17-human-card{color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:rgba(9,15,29,.44)!important}
html[data-theme='dark'] .m17-b2b-board article{border-color:var(--m40-line)!important;background:rgba(19,28,50,.7)!important}
html[data-theme='dark'] .m17-faq details summary{color:#dfe6f7!important}
html[data-theme='dark'] .m17-faq details p{color:var(--m40-copy)!important}
html[data-theme='dark'] :where(.m17-proof-screen,.m17-process__visual,.m17-price-preview){border-color:rgba(163,182,225,.15)!important;background:#e9edf7!important;box-shadow:0 24px 68px rgba(0,0,0,.32)!important}
html[data-theme='dark'] :where(.m17-product-row__visual>span,.m17-photo-guide__visual span,.m17-hero__badge){color:#283655!important;background:rgba(249,251,255,.93)!important}

/* Account: cards, trust rail, modals and device linking. */
html[data-theme='dark'] .m23-account-shell :where(.m23-trust-strip,.m23-kpi-grid>*,.m23-overview-columns>*,.m23-panel,.m23-profile-card,.m23-device-card,.m23-security-card,.m23-project-card,.m23-project-card__body,.m23-proof-overview,.m23-order-list article,.m23-proof-list article,.m23-account-roadmap article,.m23-settings-grid>*,.m23-empty,.m23-loading){
  color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,rgba(20,28,50,.97),rgba(13,20,37,.94))!important;box-shadow:var(--m40-shadow-soft)!important
}
html[data-theme='dark'] .m23-account-shell :where(.m23-account-nav,.m23-panel-head){border-color:var(--m40-line)!important}
html[data-theme='dark'] .m23-account-shell :where(.m23-account-nav button,.m23-account-nav a,.m23-icon-button,.m23-text-button,.m23-nav-upgrade){color:#d4ddef!important;border-color:var(--m40-line)!important;background:#10182c!important}
html[data-theme='dark'] .m23-account-shell :where(.m23-account-nav .is-active,.m23-account-nav [aria-current='page']){color:#fff!important;background:linear-gradient(145deg,rgba(76,101,255,.27),rgba(145,91,255,.18))!important}
html[data-theme='dark'] .m23-project-card__visual{border-color:var(--m40-line)!important;background:radial-gradient(circle at 50% 45%,rgba(72,91,151,.23),transparent 55%),#0d1528!important}
html[data-theme='dark'] .m23-status{border-color:var(--m40-line)!important;background:rgba(9,15,29,.56)!important}
html[data-theme='dark'] .m23-modal-backdrop{background:rgba(3,7,16,.77)!important;backdrop-filter:blur(22px) saturate(120%)}
html[data-theme='dark'] .m23-account-modal{color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,#151e36,#0d1528)!important;box-shadow:0 40px 120px rgba(0,0,0,.6)!important}
html[data-theme='dark'] .m23-account-modal :where(.m23-account-modal__form,.m23-account-modal__visual){border-color:var(--m40-line)!important;background:transparent!important}
html[data-theme='dark'] :where(.m24-pairing,.m24-device-list article,.m24-join-modal,.m24-join-modal__copy){color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,#151e36,#0e1629)!important}
html[data-theme='dark'] .m24-join-modal__copy code{color:#dce4ff!important;border-color:var(--m40-line-strong)!important;background:#0d1528!important}
html[data-theme='dark'] .m24-modal-backdrop{background:rgba(3,7,16,.78)!important}

/* Commerce and payments. */
html[data-theme='dark'] .m25-commerce-shell :where(.m25-steps,.m25-cart-item,.m25-form-card,.m25-summary-card,.m25-checkout-summary,.m25-order-detail-card,.m25-order-timeline-card,.m25-order-recap,.m25-empty-commerce,.m25-confirmation-grid>*,.m26-payment-panel){
  color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,rgba(20,28,50,.97),rgba(13,20,37,.94))!important;box-shadow:var(--m40-shadow-soft)!important
}
html[data-theme='dark'] .m25-commerce-shell :where(.m25-shipping-choices label,.m25-payment-preview,.m25-qty-stepper,.m25-summary-lines,.m25-checkout-items,.m25-order-actions button,.m25-account-order){color:#d7e0f2!important;border-color:var(--m40-line)!important;background:#10182c!important}
html[data-theme='dark'] .m25-commerce-shell :where(.m25-shipping-choices label.is-selected,.m25-payment-preview.is-selected){border-color:var(--m40-line-strong)!important;background:linear-gradient(145deg,rgba(75,100,255,.26),rgba(145,91,255,.17))!important}
html[data-theme='dark'] .m25-commerce-shell :where(.m25-progress,.m25-summary-total){border-color:var(--m40-line)!important}
html[data-theme='dark'] .m25-secondary{color:#dfe6f7!important;border-color:var(--m40-line)!important;background:#111a2f!important}
html[data-theme='dark'] .m26-payment-panel :where(.m26-payment-badge,.m26-payment-notice,.m26-payment-trust){border-color:var(--m40-line)!important;background:rgba(9,15,29,.5)!important}
html[data-theme='dark'] .m26-payment-notice>button:hover{background:#18223d!important}

/* Studio: finish every remaining light toolbar, inspector card and control. */
html[data-theme='dark'] .m2-studio-app :where(.m2-canvas-toolbar,.m2-canvas-footer,.m7-step-nav,.m3-step-nav,.m11-sheet-grabber){
  color:#aebbd2!important;border-color:var(--m40-line)!important;background:linear-gradient(180deg,#151e34,#11192c)!important
}
html[data-theme='dark'] .m2-studio-app :where(.m2-canvas-toolbar button,.m2-zoom-controls button,.m2-history-actions button,.m4-preview-tabs button,.m2-back,.m2-header-link,.m2-header-cart){color:#cfd8eb!important;border-color:var(--m40-line)!important;background:#10182c!important}
html[data-theme='dark'] .m2-studio-app :where(.m4-preview-tabs button.is-active,.m2-zoom-controls button:hover,.m2-history-actions button:hover){color:#fff!important;background:linear-gradient(145deg,rgba(75,100,255,.28),rgba(145,91,255,.18))!important;box-shadow:0 8px 20px rgba(0,0,0,.24)!important}
html[data-theme='dark'] .m2-studio-app :where(.m2-inspector-panel,.m7-art-panel){color:var(--m40-text)!important;background:transparent!important}
html[data-theme='dark'] .m2-studio-app :where(.m2-file-card,.m2-process-state,.m3-upload-tip,.m5-mask-edit-card,.m6-cut-compare,.m7-art-status,.m7-art-compare,.m7-art-advanced,.m7-quality-card,.m7-sheet-metrics article,.m7-sheet-presets button,.m7-sheet-spacing button,.m2-proof-list article,.m2-proof-note,.m2-order-summary,.m6-product-preview,.m6-price-benefit,.m39-upscale-entry){
  color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,#151e36,#0e1629)!important;box-shadow:var(--m40-shadow-soft)!important
}
html[data-theme='dark'] .m2-studio-app :where(.m2-mode-list button,.m6-cut-presets button,.m3-tool-grid button,.m3-position-grid button,.m3-preset-row button,.m3-material-cards button,.m7-art-presets button,.m7-art-actions button,.m7-layout-switch button,.m7-sheet-presets button,.m7-sheet-spacing button,.m2-segmented button,.m2-quantity,.m2-quantity button,.m2-field-grid select,.m2-select-field select,.m3-position-grid input,.m2-secondary-button){color:#d4ddef!important;border-color:var(--m40-line)!important;background:#0f172a!important}
html[data-theme='dark'] .m2-studio-app :where(.m2-mode-list button.is-selected,.m6-cut-presets button.is-selected,.m3-tool-grid button.is-selected,.m3-preset-row button.is-selected,.m3-material-cards button.is-selected,.m7-art-presets button.is-selected,.m7-layout-switch button.is-selected,.m7-sheet-presets button.is-selected,.m7-sheet-spacing button.is-selected,.m2-segmented button.is-selected){color:#fff!important;border-color:var(--m40-line-strong)!important;background:linear-gradient(145deg,rgba(73,99,255,.3),rgba(150,88,255,.2))!important;box-shadow:0 12px 28px rgba(0,0,0,.25)!important}
html[data-theme='dark'] .m2-studio-app :where(.m2-range,.m7-art-control){color:#c6d0e5!important;border-color:var(--m40-line)!important;background:rgba(9,15,29,.46)!important}
html[data-theme='dark'] .m2-studio-app :where(.m7-art-compare,.m6-cut-compare,.m6-product-preview) :where(figure,button,.m6-product-preview__copy){border-color:var(--m40-line)!important;background:#0d1528!important}
html[data-theme='dark'] .m2-studio-app .m7-art-advanced summary{color:#dce4f6!important;background:#111a2f!important}
html[data-theme='dark'] .m2-studio-app .m7-art-advanced[open] summary{border-bottom-color:var(--m40-line)!important}
html[data-theme='dark'] .m2-studio-app :where(.m2-proof-list article.is-ok,.m6-price-benefit){border-color:rgba(77,215,171,.2)!important;background:linear-gradient(145deg,rgba(24,85,68,.27),rgba(12,32,31,.66))!important}
html[data-theme='dark'] .m2-studio-app :where(.m2-proof-list article.is-warning){border-color:rgba(255,191,90,.2)!important;background:rgba(96,61,16,.26)!important}
html[data-theme='dark'] .m2-studio-app .m2-canvas-footer{border-radius:0 0 20px 20px}
html[data-theme='dark'] .m2-studio-app .m2-outline-label{color:#3158ff!important;background:rgba(249,251,255,.94)!important}
html[data-theme='dark'] .m2-studio-app .m7-proof-sheet-preview__paper{background:#f7f8fc!important;box-shadow:0 16px 38px rgba(0,0,0,.3)!important}
html[data-theme='dark'] .m2-studio-app :where(.m7-proof-sheet-preview__paper span.is-filled,.m2-artwork.is-scene){background:#fff!important}

/* Strong, impossible-to-miss post-Smart-Cut manual review. */
.m40-manual-gate{margin:14px 0;padding:15px;display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;border:1px solid rgba(116,143,255,.25);border-radius:18px;background:radial-gradient(circle at 95% 0,rgba(237,79,182,.12),transparent 34%),linear-gradient(145deg,#f8faff,#edf2ff);box-shadow:0 16px 38px rgba(49,88,255,.11)}
.m40-manual-gate>span{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;color:#fff;background:linear-gradient(145deg,#3158ff,#7953f5 65%,#e83eaa);box-shadow:0 11px 25px rgba(60,75,211,.24)}
.m40-manual-gate>span svg{width:21px}.m40-manual-gate>div{min-width:0}.m40-manual-gate em{display:block;margin-bottom:3px;color:#6352d6;font-size:9px;font-style:normal;font-weight:900;letter-spacing:.13em}.m40-manual-gate b{display:block;color:#172142;font-size:15px;line-height:1.25}.m40-manual-gate small{display:block;margin-top:4px;color:#667087;font-size:11px;line-height:1.45}.m40-manual-gate button{grid-column:1/-1;min-height:50px;display:flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:15px;color:#fff;background:linear-gradient(135deg,#3158ff,#7750f5 63%,#e73eaa);box-shadow:0 14px 30px rgba(61,76,213,.23);font-weight:850;cursor:pointer}.m40-manual-gate button svg{width:18px}.m40-manual-gate button:hover{transform:translateY(-1px)}
html[data-theme='dark'] .m40-manual-gate{border-color:rgba(130,154,255,.31);background:radial-gradient(circle at 95% 0,rgba(238,86,188,.17),transparent 35%),linear-gradient(145deg,#19233f,#11192e);box-shadow:0 18px 48px rgba(0,0,0,.28)}
html[data-theme='dark'] .m40-manual-gate em{color:#b6a5ff}html[data-theme='dark'] .m40-manual-gate b{color:#f4f7ff}html[data-theme='dark'] .m40-manual-gate small{color:#b2bdd3}
html[data-theme='dark'] .m5-mask-edit-card{border-color:rgba(130,154,255,.25)!important;background:radial-gradient(circle at 100% 0,rgba(128,91,255,.18),transparent 34%),linear-gradient(145deg,#17213b,#10182c)!important}
html[data-theme='dark'] .m5-mask-edit-action{border-color:rgba(128,151,255,.28)!important;background:linear-gradient(135deg,#607cff,#9669ff 68%,#e45aae)!important;color:#fff!important}

/* Manual mask modal itself. */
html[data-theme='dark'] .m5-mask-editor{background:rgba(2,6,15,.78)!important;backdrop-filter:blur(22px) saturate(120%)!important}
html[data-theme='dark'] .m5-mask-editor__panel{color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,#141d35,#0d1528)!important;box-shadow:0 40px 130px rgba(0,0,0,.65)!important}
html[data-theme='dark'] :where(.m5-mask-editor__header,.m5-mask-editor__toolbar,.m5-mask-editor__footer){border-color:var(--m40-line)!important;background:#111a2f!important}
html[data-theme='dark'] .m5-mask-editor__heading small,
html[data-theme='dark'] .m5-mask-editor__status{color:var(--m40-copy)!important}
html[data-theme='dark'] .m5-mask-editor__status b{color:var(--m40-text)!important}
html[data-theme='dark'] :where(.m5-mask-editor__close,.m5-mask-editor__group,.m5-mask-editor__actions button){color:#dce4f7!important;border-color:var(--m40-line)!important;background:#0d1528!important}
html[data-theme='dark'] .m5-mask-editor__toolbar button{color:#c8d2e7!important}
html[data-theme='dark'] .m5-mask-editor__toolbar button:hover:not(:disabled){color:#fff!important;background:rgba(104,127,255,.16)!important}
html[data-theme='dark'] .m5-mask-editor__stage{background-color:#121a2d!important;background-image:linear-gradient(45deg,#1c2740 25%,transparent 25%),linear-gradient(-45deg,#1c2740 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#1c2740 75%),linear-gradient(-45deg,transparent 75%,#1c2740 75%)!important}
html[data-theme='dark'] .m5-mask-editor__canvas-wrap{background:#0a1020!important;box-shadow:0 22px 60px rgba(0,0,0,.5)!important}
html[data-theme='dark'] .m5-mask-editor__hint{color:#d2dbee!important;background:rgba(13,21,40,.92)!important;box-shadow:0 10px 26px rgba(0,0,0,.36)!important}

/* Admin login: M39 missed this separate shell. */
html[data-theme='dark'] body:has(.m27-login-shell){background:radial-gradient(circle at 8% -5%,rgba(76,98,255,.21),transparent 30%),radial-gradient(circle at 94% 0,rgba(229,75,180,.15),transparent 27%),linear-gradient(180deg,#090d1a,#0d1426 62%,#090d1a)!important}
html[data-theme='dark'] .m27-login-shell{color:var(--m40-text)!important;background:transparent!important}
html[data-theme='dark'] .m27-login-shell>header :where(a,button){color:#d4ddef!important;border-color:var(--m40-line)!important;background:#111a2f!important}
html[data-theme='dark'] .m27-login-grid{border-color:var(--m40-line)!important;background:linear-gradient(145deg,#141d35,#0d1528)!important;box-shadow:0 34px 110px rgba(0,0,0,.48)!important}
html[data-theme='dark'] .m27-login-story{background:radial-gradient(circle at 85% 18%,rgba(139,96,255,.28),transparent 34%),linear-gradient(145deg,#162654,#173675 68%,#0f5d67)!important}
html[data-theme='dark'] .m27-login-card{color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,#18223d,#11192e)!important;box-shadow:0 24px 70px rgba(0,0,0,.34)!important}
html[data-theme='dark'] .m27-login-card :where(input,select,textarea),
html[data-theme='dark'] .m27-login-card label>div{color:#eef2ff!important;border-color:var(--m40-line)!important;background:#0c1427!important}
html[data-theme='dark'] .m27-login-foot{color:var(--m40-muted)!important}

/* Production Admin and Operations: darken every interactive production surface. */
html[data-theme='dark'] .m27-admin-shell :where(.m27-admin-content,.m27-admin-main,.m27-detail-scroll,.m27-order-list){background:transparent!important}
html[data-theme='dark'] .m27-admin-shell :where(.m27-kpi,.m27-queue-card,.m27-detail,.m27-detail-section,.m27-project-card,.m27-production-control,.m27-production-evidence,.m27-customer-card,.m27-payment-card,.m27-shipping-proof,.m27-setup-card,.m27-transition-block,.m27-transition-gate,.m27-transition-safety,.m27-control-setup,.m27-control-loading,.m27-control-message){color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,#151e36,#0e1629)!important;box-shadow:var(--m40-shadow-soft)!important}
html[data-theme='dark'] .m27-admin-shell :where(.m27-control-head>button,.m27-priority-row button,.m27-control-field input,.m27-control-field select,.m27-control-field textarea,.m27-production-checklist button,.m27-topbar>button:not(.m27-mobile-menu),.m27-admin-intro>button,.m27-detail-head button,.m27-workflow-steps,.m27-assets button,.m27-detail-actions button,.m27-mobile-menu,.m27-save-secondary,.m27-search,.m27-field input,.m27-field select,.m27-field textarea){color:#d7e0f2!important;border-color:var(--m40-line)!important;background:#0f172a!important}
html[data-theme='dark'] .m27-admin-shell :where(.m27-priority-row button.is-active,.m27-production-checklist button.is-complete,.m27-focus-scroll button.is-active,.m27-transition-buttons button.is-active){color:#fff!important;border-color:var(--m40-line-strong)!important;background:linear-gradient(145deg,rgba(73,99,255,.3),rgba(150,88,255,.2))!important}
html[data-theme='dark'] .m27-admin-shell .m27-control-score::after{background:#151e36!important}
html[data-theme='dark'] .m27-admin-shell .m27-transition-confirm::after{border-color:var(--m40-line)!important;background:#151e36!important}
html[data-theme='dark'] .m27-admin-shell .m27-setup-card code{color:#ffd89f!important;background:#0d1528!important}
html[data-theme='dark'] .m27-admin-shell .m27-sidebar nav button.is-active b{color:#fff!important;background:#172340!important}
html[data-theme='dark'] .m27-admin-shell .m27-sidebar>footer button:hover{background:#17213b!important}
html[data-theme='dark'] .m30-operations :where(.m30-panel,.m30-check-card,.m30-count-card,.m30-loading,.m30-architecture>*,.m30-status-rail>*){color:var(--m40-text)!important;border-color:var(--m40-line)!important;background:linear-gradient(145deg,#151e36,#0e1629)!important;box-shadow:var(--m40-shadow-soft)!important}
html[data-theme='dark'] .m30-operations :where(.m30-hero__actions button,.m30-error button){color:#dce4f7!important;border-color:var(--m40-line)!important;background:#10182c!important}

@media(max-width:780px){
  .m40-manual-gate{grid-template-columns:40px minmax(0,1fr);padding:13px;border-radius:17px}.m40-manual-gate>span{width:40px;height:40px}.m40-manual-gate button{min-height:52px}
  html[data-theme='dark'] .m16-smartcut{padding:20px!important}
  html[data-theme='dark'] .m17-page .m17-compare__table{overflow-x:auto}
  html[data-theme='dark'] .m2-studio-app :where(.m2-canvas-toolbar,.m2-canvas-footer,.m7-step-nav,.m3-step-nav){background:#11192d!important}
}
@media(prefers-reduced-motion:reduce){.m40-manual-gate button{transition:none!important}}
