/* AvaClik editor palette. Keep tool layout and payment logic unchanged. */
#fotor-root .editor-shell{accent-color:#e779b1}
#fotor-root .esg-topbar{background:#130e16!important;border-bottom:1px solid #503047!important}
#fotor-root .esg-topbar .esg-auth--primary{background:linear-gradient(110deg,#933578,#d44c95)!important;border-color:#e779b1!important;color:#fff!important}
#fotor-root .esg-topbar .esg-balance__icon{color:#ed85bb!important}
#fotor-root .esg-topbar :is(.esg-nav__dropdown,.esg-lang__menu,.esg-mobile-menu){background:#1c111e!important;border-color:#65374e!important}
#fotor-root .editor-shell .rail-btn.active,
#fotor-root .editor-shell .rail-btn.sg299-tools-active{background:#3b1c33!important;border-color:#db70ac!important;box-shadow:inset 2px 0 0 #e779b1!important;color:#f9c1e0!important}
#fotor-root .editor-shell .rail-btn.active :is(.rail-ico,.rail-label),
#fotor-root .editor-shell .rail-btn.sg299-tools-active :is(.rail-ico,.rail-label){color:#f9c1e0!important}
#fotor-root .editor-shell :is(.rail-btn,.rail-toggle){background-color:#1c141f!important;border-color:#503047!important;color:#e9d5e3!important}
#fotor-root .editor-shell :is(.rail-btn,.rail-toggle):hover{border-color:#b45a8b!important}
#fotor-root .editor-shell .left-panel{background:linear-gradient(155deg,#21101c,#0f0b13 75%)!important;border-color:#65374e!important}
#fotor-root .editor-shell .left-panel .left-panel-header{background:linear-gradient(110deg,#24121f,#1a111b)!important;border-color:rgba(238,141,191,.2)!important}
#fotor-root .editor-shell .left-panel .left-panel-body{background:transparent!important;scrollbar-color:#9d4879 transparent!important}
#fotor-root .editor-shell .left-panel .lp-title{color:#f593c6!important}
#fotor-root .editor-shell .left-panel .lp-subtitle{color:#bca2b5!important}
#fotor-root .editor-shell .left-panel :is(.lp-back,.lp-close){background:#2a1827!important;border-color:#71405c!important;color:#f2a4cf!important}
#fotor-root .editor-shell .left-panel :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),textarea,select){background:#211321!important;border-color:#78415f!important;color:#fff1f8!important;accent-color:#e779b1}
#fotor-root .editor-shell .left-panel :is(input,textarea)::placeholder{color:#bda2b4!important}
#fotor-root .editor-shell .left-panel select option{background:#241421!important;color:#fff1f8!important}
#fotor-root .editor-shell .left-panel :is(.lp-cat-card,.ai-hair-tile){border-color:#633650!important;background-color:#211522!important}
#fotor-root .editor-shell .left-panel :is(.ai-styles-tab,.sg-agent-mode-tab,.ai-agent__mode){border-color:#633650!important;color:#e9cce0!important}
#fotor-root .editor-shell .left-panel :is(.ai-styles-tab,.sg-agent-mode-tab,.ai-agent__mode):is(.active,.is-active){background:#4a2440!important;border-color:#e779b1!important;color:#fff!important}
#fotor-root .editor-shell :is(.left-panel,.agent-popup) :is(.ai-hair-run,.ai-correction-run,.m-ai-apply,.mobile-apply-btn,.ai-agent__run,.mtool-top-btn--apply,.m-native-primary,.sg-add-person-prompt__run,.hair-reference-editor__run){background:linear-gradient(110deg,#933578,#d44c95)!important;border-color:#e779b1!important;color:#fff!important}
#fotor-root .editor-shell :is(.left-panel,.agent-popup) :is(.ai-hair-run,.ai-correction-run,.m-ai-apply,.mobile-apply-btn,.ai-agent__run,.mtool-top-btn--apply,.m-native-primary,.sg-add-person-prompt__run,.hair-reference-editor__run):disabled{opacity:.48!important}
#fotor-root .editor-shell :is(.ai-hair-footer,.ai-correction-footer,.mobile-tool-footer){background:#1a111b!important;border-color:#503047!important}
#fotor-root .editor-shell :is(.qt-btn,.ws-action,.fc-btn,.rg-add){background:#201520!important;border-color:#503047!important;color:#efd7e7!important}
#fotor-root .editor-shell .rg-item.active{border-color:#e779b1!important;box-shadow:0 0 0 1px #e779b1!important}
#fotor-root .editor-shell .agent-popup{background:linear-gradient(155deg,#21101c,#0f0b13 75%)!important;border-color:#65374e!important}
#fotor-root .editor-shell :is(button,input,select,textarea):focus-visible{outline-color:#f5a4d0!important}
/* Older desktop and mobile layers use more specific blue selectors. */
#fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-btn.active,
#fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-btn.sg299-tools-active,
#fotor-root .editor-shell.is-mobile .rail-btn.active{background:#3b1c33!important;border-color:#db70ac!important;box-shadow:inset 2px 0 0 #e779b1!important;color:#f9c1e0!important}
#fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-btn.active :is(.rail-ico,.rail-label),
#fotor-root .editor-shell.is-mobile .rail-btn.active :is(.rail-ico,.rail-label){color:#f9c1e0!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .left-panel-body{background:#170f18!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel :is(.mobile-tool-page,.ai-agent-page,.ai-styles-page){background:transparent!important}
#fotor-root .editor-shell :is(.upload-zone,.dropzone){border-color:#75415e!important;background-color:#160f17!important}
#fotor-root .editor-shell :is(.upload-icon,.ws-action,.rg-add){color:#eaa0c9!important;border-color:#75415e!important}
body .fp-auth-popup{background:linear-gradient(155deg,#21101c,#0f0b13 75%)!important;border-color:#65374e!important}
body .fp-auth-popup :is(.fp-auth-popup__benefit,.fp-auth-popup__promo-item,.fp-auth-popup__close){background:#241622!important;border-color:#633650!important;color:#f9eaf4!important}
body .fp-auth-popup .fp-auth-popup__eyebrow{color:#f29ac9!important;border-color:#75415e!important}
body .fp-auth-popup .fp-auth-popup__btn{background:linear-gradient(110deg,#933578,#d44c95)!important;border-color:#e779b1!important;color:#fff!important}

/* Explicitly override the legacy shell rules, including their blue gradients. */
#fotor-root .editor-shell:not(.is-mobile),
#fotor-root .editor-shell.is-mobile{background:#140e16!important;color:#f7eaf2!important}
#fotor-root .editor-shell:not(.is-mobile) .workspace,
#fotor-root .editor-shell.is-mobile .workspace{background:radial-gradient(ellipse at 50% 35%,#291522 0%,#160e19 50%,#100b13 100%)!important}
#fotor-root .editor-shell:not(.is-mobile) .left-rail,
#fotor-root .editor-shell.is-mobile .left-rail,
#fotor-root .editor-shell:not(.is-mobile) .right-gallery{background:#1b111c!important;border-color:#633650!important}
#fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-btn:not(.active):not(.sg299-tools-active),
#fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-toggle,
#fotor-root .editor-shell.is-mobile .left-rail .rail-btn:not(.active){background:#2a1828!important;border:1px solid #673a56!important;color:#ebd1e2!important}
#fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-btn:not(.active) :is(.rail-label,.rail-ico),
#fotor-root .editor-shell.is-mobile .left-rail .rail-btn:not(.active) :is(.rail-label,.rail-ico){color:#dfb9d0!important}
#fotor-root .editor-shell:not(.is-mobile) .left-rail .rail-btn:hover:not(.active),
#fotor-root .editor-shell.is-mobile .left-rail .rail-btn:hover:not(.active){background:#48253c!important;border-color:#d475a8!important}
#fotor-root .editor-shell:not(.is-mobile) .workspace .qt-btn,
#fotor-root .editor-shell:not(.is-mobile) .workspace .ws-action,
#fotor-root .editor-shell:not(.is-mobile) .workspace .fc-btn,
#fotor-root .editor-shell:not(.is-mobile) .right-gallery .rg-add,
#fotor-root .editor-shell.is-mobile .workspace .ws-action,
#fotor-root .editor-shell.is-mobile .mtool-top-btn{background:#2a1828!important;border-color:#75415e!important;color:#f5dbea!important}
#fotor-root .editor-shell:not(.is-mobile) .workspace .ws-action.primary,
#fotor-root .editor-shell.is-mobile .workspace .ws-action.primary{background:#51223e!important;border-color:#d46ea6!important;color:#ffcae5!important}
#fotor-root .editor-shell:not(.is-mobile) .workspace .qt-btn__price{background:#4b2940!important;color:#f6d6e9!important}
#fotor-root .editor-shell :is(.workspace,.right-gallery) :is(.ws-action,.qt-btn,.fc-btn,.rg-add):disabled{opacity:.52!important}
#fotor-root .editor-shell:not(.is-mobile) .workspace .ws-float-controls,
#fotor-root .editor-shell.is-mobile .workspace .ws-float-controls{background:#20121f!important;border-color:#75415e!important}
#fotor-root .esg-topbar .esg-auth--account{background:#291b29!important;border-color:#71405c!important;color:#f9eaf4!important}
#fotor-root .editor-shell .left-panel .ti-generate:disabled{opacity:1!important;background:#4d263e!important;border-color:#824b6a!important;color:#d7a8c2!important}
#fotor-root .editor-shell:not(.is-mobile) .workspace .ws-top-actions .ws-action.danger{background:#2a1828!important;border-color:#75415e!important;color:#e7b0cd!important}
#fotor-root .editor-shell.is-mobile .mtool-top-btn.mtool-top-btn--tab.active{background:#51243f!important;border-color:#e779b1!important;color:#ffd1e9!important}
#fotor-root .editor-shell.is-mobile .mobile-preset-card{background-color:#211522!important;border-color:#75415e!important}
#fotor-root .editor-shell:not(.is-mobile) .workspace .qt-btn .qt-btn__icon{color:#e994c2!important}

/* Shared tool controls: override the older blue desktop and mobile layers. */
#fotor-root .editor-shell:not(.is-mobile) .left-panel :is(.tool-remove-bg .remove-bg-btn,.tool-upscale .upscale-btn),
#fotor-root .editor-shell.is-mobile .left-panel :is(.m-native-primary,.remove-bg-btn,.upscale-btn){background:linear-gradient(110deg,#933578,#d44c95)!important;border-color:#e779b1!important;color:#fff!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel :is(.ai-hair-footer,.ai-correction-footer,.mobile-tool-footer,.product-creative-footer),
#fotor-root .editor-shell.is-mobile .left-panel :is(.ai-hair-footer,.ai-correction-footer,.mobile-tool-footer){background:#21121f!important;border-color:#633650!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel :is(.ai-hair-footer,.ai-correction-footer,.mobile-tool-footer) :is(.ai-hair-run,.ai-correction-run,.mobile-apply-btn):disabled,
#fotor-root .editor-shell.is-mobile .left-panel :is(.ai-hair-run,.ai-correction-run,.mobile-apply-btn):disabled{background:#4d263e!important;border-color:#824b6a!important;color:#e1b7ce!important;opacity:1!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-top .ai-hair-tabs .ai-hair-tab.active,
#fotor-root .editor-shell.is-mobile .left-panel .ai-hair-tabs .ai-hair-tab.active{color:#f6a4cf!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-top .ai-hair-tabs .ai-hair-tab.active::after,
#fotor-root .editor-shell.is-mobile .left-panel .ai-hair-tabs .ai-hair-tab.active::after{background:#e779b1!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-grid .sg-action-card .sg-action-card__icon,
#fotor-root .editor-shell.is-mobile .left-panel .sg-action-card .sg-action-card__icon{color:#ee94c4!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-grid .ai-hair-tile{background-color:#241622!important;border-color:#633650!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-grid .ai-hair-tile:is(.active,.selected,.is-selected),
#fotor-root .editor-shell.is-mobile .left-panel .ai-hair-tile:is(.active,.selected,.is-selected){border-color:#e779b1!important;box-shadow:0 0 0 1px #e779b1!important}
#fotor-root .editor-shell .left-panel :is(.color-dd-trigger,.hair-color-open){background:#291828!important;border-color:#78415f!important;color:#ffedf7!important}
#fotor-root .editor-shell .left-panel :is(.color-dd-menu,.color-dd-list){background:#211321!important;border-color:#78415f!important}
#fotor-root .editor-shell .left-panel .color-dd-item{background:#301c2d!important;border-color:#633650!important;color:#fff1f8!important}
#fotor-root .editor-shell .left-panel .color-dd-item:is(.active,.selected,.is-selected){background:#51243f!important;border-color:#e779b1!important}
body .hair-color-modal-backdrop .hair-color-modal{background:#211321!important;border-color:#78415f!important;color:#fff1f8!important}
body .hair-color-modal-backdrop .hair-color-modal .hair-color-modal__swatch{background:#301c2d!important;border-color:#633650!important;color:#fff1f8!important}
body .hair-color-modal-backdrop .hair-color-modal .hair-color-modal__swatch.active{background:#51243f!important;border-color:#e779b1!important}
body .hair-color-modal-backdrop .hair-color-modal .hair-color-modal__rgb{background:#1b111d!important;border-color:#633650!important}
body .hair-color-modal-backdrop .hair-color-modal .hair-color-modal__apply{background:linear-gradient(110deg,#933578,#d44c95)!important;border-color:#e779b1!important;color:#fff!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .sg296-tool-search{background:#170f18!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .sg296-tool-search__field{background:#291828!important;border-color:#78415f!important;color:#e5bcd5!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .sg296-tool-search__field:focus-within{border-color:#e779b1!important;box-shadow:0 0 0 2px rgba(231,121,177,.18)!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .sg296-tool-search__field input{background:transparent!important;border:0!important}
#fotor-root .editor-shell .left-panel :is(.sg-add-person-reference,.sg-face-swap-upload-card,.sg-face-swap-consent,.hair-reference-editor){background:#241622!important;border-color:#633650!important}
#fotor-root .editor-shell .left-panel :is(.sg-add-person-reference button,.sg-face-swap-upload-card button,.hair-reference-editor button){border-color:#b65d90!important;color:#f5bddb!important}
/* The picker may be rendered inside the editor or directly under body. */
#fotor-root .editor-shell:not(.is-mobile) .hair-color-modal-backdrop .hair-color-modal,
#fotor-root .editor-shell.is-mobile .hair-color-modal-backdrop .hair-color-modal,
body > .hair-color-modal-backdrop .hair-color-modal{background:#211321!important;border-color:#78415f!important;color:#fff1f8!important}
#fotor-root .editor-shell:not(.is-mobile) .hair-color-modal .hair-color-modal__swatch,
#fotor-root .editor-shell.is-mobile .hair-color-modal .hair-color-modal__swatch,
body > .hair-color-modal-backdrop .hair-color-modal__swatch{background:#301c2d!important;border-color:#633650!important;color:#fff1f8!important}
#fotor-root .editor-shell:not(.is-mobile) .hair-color-modal .hair-color-modal__swatch.active,
#fotor-root .editor-shell.is-mobile .hair-color-modal .hair-color-modal__swatch.active,
body > .hair-color-modal-backdrop .hair-color-modal__swatch.active{background:#51243f!important;border-color:#e779b1!important}
#fotor-root .editor-shell:not(.is-mobile) .hair-color-modal .hair-color-modal__apply,
#fotor-root .editor-shell.is-mobile .hair-color-modal .hair-color-modal__apply,
body > .hair-color-modal-backdrop .hair-color-modal__apply{background:linear-gradient(110deg,#933578,#d44c95)!important;border-color:#e779b1!important;color:#fff!important}
#fotor-root .editor-shell:not(.is-mobile) .hair-color-modal .hair-color-modal__rgb,
#fotor-root .editor-shell.is-mobile .hair-color-modal .hair-color-modal__rgb,
body > .hair-color-modal-backdrop .hair-color-modal__rgb{background:#1b111d!important;border-color:#633650!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-grid > .sg-action-card.sg-desktop-preset-choice .sg-action-card__icon{color:#ee94c4!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-footer .ai-hair-run:disabled{color:#e1b7ce!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-top,
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-scroll{background:#170f18!important;scrollbar-color:#ae568a #211321!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-top .ai-styles-tabs{background:#211321!important;border-color:#633650!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-top .ai-styles-tab{background:#2a1828!important;border-color:#75415e!important;color:#e9cce0!important}
#fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-top .ai-styles-tab.active{background:#51243f!important;border-color:#e779b1!important;color:#fff!important}
/* Registration dialog: scope to the provider buttons so other confirmation dialogs keep their own layout. */
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) {
  position:relative!important; width:min(420px,calc(100vw - 24px))!important; max-width:100%!important;
  padding:24px!important; border:1px solid #71405e!important; border-radius:18px!important;
  background:linear-gradient(145deg,#241321,#110d16)!important; color:#f9eaf4!important;
  box-shadow:0 24px 70px rgba(0,0,0,.6)!important; text-align:left!important;
}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__eyebrow {color:#ee91c5!important;background:#351b30!important;border:1px solid #77435f!important;margin:0 45px 10px 0!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__title {color:#fff1fa!important;text-align:left!important;font-size:21px!important;padding-right:38px!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__text {color:#d8bfce!important;text-align:left!important;font-size:13px!important;line-height:1.45!important;margin:8px 0 14px!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__promo {display:none!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__benefits {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin:0 0 12px!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__benefit {display:flex!important;align-items:center!important;min-width:0!important;min-height:38px!important;height:auto!important;padding:7px 9px!important;font-size:11px!important;line-height:1.25!important;background:#241622!important;border:1px solid #633650!important;border-radius:9px!important;color:#f5deec!important;text-align:left!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__note {color:#c7aabe!important;text-align:left!important;font-size:11px!important;line-height:1.4!important;margin:0 0 14px!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__actions {display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;width:100%!important;margin:0!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__actions > :is(a,button,.sg-telegram-login-button) {display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:45px!important;height:auto!important;box-sizing:border-box!important;margin:0!important;padding:10px 12px!important;border-radius:10px!important;font-size:14px!important;line-height:1.25!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important;text-decoration:none!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__actions > :is(.fp-auth-popup__google-btn,.fp-auth-popup__telegram-btn,.fp-auth-popup__yandex-btn,.sg-telegram-login-button) {background:#2a1827!important;border:1px solid #804b6b!important;color:#fff1fa!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__actions > .fp-auth-popup__btn {background:linear-gradient(110deg,#9c3479,#d44c95)!important;border:1px solid #e779b1!important;color:#fff!important;}
body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__close {position:absolute!important;top:16px!important;right:16px!important;display:grid!important;place-items:center!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;margin:0!important;border:1px solid #81516d!important;border-radius:9px!important;background:#2a1827!important;color:#f0a5ce!important;}
@media(max-width:370px){body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn){padding:18px!important;}body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__benefits{grid-template-columns:1fr!important;gap:4px!important;}body .fp-auth-popup:not([data-sg-payment-paywall="1"]):has(.fp-auth-popup__google-btn) .fp-auth-popup__benefit{min-height:30px!important;}}
body .fp-auth-popup__backdrop:has(> .fp-auth-popup:not([data-sg-payment-paywall="1"]) .fp-auth-popup__google-btn) { z-index:100100!important; align-items:safe center!important; }
