html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;position:relative;background:#f5f5f7;}
/* Merchant-wide policy: focus does not add outlines, including framework pseudo-elements. */
html[data-portal-app="merchant"] *,
html[data-portal-app="merchant"] *::before,
html[data-portal-app="merchant"] *::after{outline:0!important;}
html[data-portal-app="merchant"] :is(button,a,input,[role="button"],[role="tab"],[tabindex]):focus-visible{outline:2px solid #147ea3!important;outline-offset:-2px;}
html[data-portal-app="merchant"] :is(.x-ui-viewport-header,.x-ui-navigation-panel) :focus-visible{outline-color:#fff!important;}
/* Merchant startup is independent of Ext and the shared portal skin. */
#appLoadingIndicator{
    --startup-bg:#191b1e;--startup-text:#f4f2ee;--startup-muted:#b0b0ac;
    --startup-accent:#eeb575;--startup-border:#393a3c;--startup-error:#ffb2a8;
    position:fixed;inset:0;z-index:100000;isolation:isolate;display:flex;
    align-items:center;justify-content:center;box-sizing:border-box;overflow:auto;
    padding:max(48px,env(safe-area-inset-top)) max(32px,env(safe-area-inset-right)) max(48px,env(safe-area-inset-bottom)) max(32px,env(safe-area-inset-left));
    background:var(--startup-bg);color:var(--startup-text);
    font:400 14px/1.5 Inter,Arial,"Microsoft YaHei",sans-serif;
    opacity:1;transition:opacity .18s ease-out;
}
#appLoadingIndicator::before{
    content:"";position:fixed;z-index:-1;pointer-events:none;right:-160px;bottom:-240px;
    width:600px;height:600px;border:1px solid #32302d;transform:rotate(35deg);
    box-shadow:0 0 0 72px #1c1d1f,0 0 0 73px #2b2b2b,0 0 0 145px #1b1c1e,0 0 0 146px #252628;
}
#appLoadingIndicator.portal-startup-leaving{opacity:0;pointer-events:none;}
#appLoadingIndicator *,#appLoadingIndicator *::before,#appLoadingIndicator *::after{box-sizing:border-box;}
#appLoadingIndicator .portal-startup{
    position:relative;width:100%;max-width:440px;margin:auto;padding:28px;
    border:1px solid rgba(255,255,255,.055);border-radius:16px;
    background:linear-gradient(135deg,rgba(255,255,255,.024),rgba(255,255,255,.006));
    box-shadow:0 16px 48px rgba(0,0,0,.1),inset 0 1px 0 rgba(255,255,255,.018);
    -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
}
#appLoadingIndicator .portal-startup-brand{
    display:flex;align-items:center;justify-content:space-between;gap:20px;
    min-height:48px;padding:0 0 18px;border-bottom:1px solid var(--startup-border);
}
#appLoadingIndicator .portal-startup-logo{display:block;width:120px;max-width:45%;height:auto;max-height:48px;object-fit:contain;}
#appLoadingIndicator #name{
    margin:0 0 0 auto;max-width:100%;color:var(--startup-muted);
    font:500 11px/1.6 Inter,Arial,sans-serif;letter-spacing:2px;overflow-wrap:anywhere;
}
#appLoadingIndicator .portal-startup-content{padding:32px 0 28px;}
#appLoadingIndicator .portal-startup-copy{min-width:0;}
#appLoadingIndicator .portal-startup-eyebrow{
    display:flex;align-items:center;gap:10px;margin-bottom:16px;color:var(--startup-accent);
    font:500 10px/1.6 Inter,Arial,sans-serif;letter-spacing:2.8px;
}
#appLoadingIndicator .portal-startup-eyebrow::before{content:"";width:6px;height:6px;background:var(--startup-accent);}
#appLoadingIndicator .portal-startup-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px;}
#appLoadingIndicator .portal-startup-title{
    min-width:0;margin:0;color:var(--startup-text);font-size:28px;line-height:1.3;font-weight:500;letter-spacing:.2px;overflow-wrap:anywhere;
}
#appLoadingIndicator .portal-startup-title>span{display:block;color:var(--startup-text);font-weight:600;}
#appLoadingIndicator .portal-startup-icon{display:block;flex:0 0 76px;width:76px;height:76px;color:var(--startup-accent);opacity:.72;}
#appLoadingIndicator .portal-startup-state{display:flex;align-items:center;gap:10px;min-height:24px;}
#appLoadingIndicator .portal-startup-spinner{position:relative;flex:0 0 6px;width:6px;height:6px;}
#appLoadingIndicator .portal-startup-spinner::before{content:"";position:absolute;inset:0;background:var(--startup-accent);border-radius:50%;}
#appLoadingIndicator #portalStartupStatus{margin:0;min-width:0;font-size:13px;line-height:1.8;font-weight:400;color:var(--startup-muted);overflow-wrap:anywhere;}
#appLoadingIndicator .portal-startup-track{height:4px;margin-top:14px;overflow:hidden;border-radius:4px;background:rgba(255,255,255,.055);box-shadow:inset 0 1px 1px rgba(0,0,0,.14);}
#appLoadingIndicator .portal-startup-track>span{
    display:block;width:40%;height:100%;border-radius:inherit;
    background:linear-gradient(90deg,rgba(238,181,117,0),rgba(238,181,117,.65) 28%,#f6c996 70%,rgba(238,181,117,0));
    box-shadow:0 0 10px rgba(238,181,117,.24);
    animation:portalStartupLoading 2.2s ease-in-out infinite;
}
#appLoadingIndicator .portal-startup-footer{
    display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:16px;
    border-top:1px solid var(--startup-border);color:var(--startup-muted);
    font:400 10px/1.6 Inter,Arial,sans-serif;letter-spacing:1.7px;
}
#appLoadingIndicator #version{min-height:1.6em;margin:0;font:400 12px/1.6 Inter,Arial,sans-serif;letter-spacing:.4px;text-align:right;}
#appLoadingIndicator #version:empty{display:none;}
#appLoadingIndicator #portalStartupError{
    margin:18px 0 0;padding:12px 14px;border-left:2px solid var(--startup-error);
    background:#302321;font-size:14px;line-height:1.7;color:var(--startup-error);overflow-wrap:anywhere;
}
#appLoadingIndicator #portalStartupReload{
    margin-top:20px;min-height:44px;padding:10px 24px;border:1px solid var(--startup-accent);border-radius:6px;
    background:var(--startup-accent);color:#251c12;font:600 14px/1.5 Inter,Arial,"Microsoft YaHei",sans-serif;
    cursor:pointer;touch-action:manipulation;transition:background-color .2s,border-color .2s;
}
#appLoadingIndicator #portalStartupReload:hover{background:#f6c994;border-color:#f6c994;}
#appLoadingIndicator #portalStartupReload:active{background:#daa062;border-color:#daa062;}
#appLoadingIndicator [hidden]{display:none!important;}
#appLoadingIndicator.portal-startup-failed .portal-startup-spinner,
#appLoadingIndicator.portal-startup-failed .portal-startup-track{display:none;}
#appLoadingIndicator.portal-startup-failed #portalStartupStatus{color:var(--startup-error);}
@keyframes portalStartupLoading{0%{transform:translateX(-105%);}100%{transform:translateX(255%);}}
@media(max-width:600px){
    #appLoadingIndicator{padding:max(32px,env(safe-area-inset-top)) max(28px,env(safe-area-inset-right)) max(32px,env(safe-area-inset-bottom)) max(28px,env(safe-area-inset-left));}
    #appLoadingIndicator::before{right:-380px;bottom:-360px;}
    #appLoadingIndicator .portal-startup{padding:22px;border-radius:14px;}
    #appLoadingIndicator .portal-startup-logo{width:112px;}
    #appLoadingIndicator #name{font-size:10px;letter-spacing:1.2px;}
    #appLoadingIndicator .portal-startup-content{padding:28px 0;}
    #appLoadingIndicator .portal-startup-heading{gap:16px;margin-bottom:24px;}
    #appLoadingIndicator .portal-startup-title{font-size:26px;letter-spacing:.2px;}
    #appLoadingIndicator .portal-startup-icon{flex-basis:64px;width:64px;height:64px;}
    #appLoadingIndicator .portal-startup-footer{flex-wrap:wrap;gap:10px 16px;}
    #appLoadingIndicator .portal-startup-footer>span{font-size:9px;letter-spacing:1.2px;}
}
@media(max-height:540px){
    #appLoadingIndicator{padding-top:24px;padding-bottom:24px;}
    #appLoadingIndicator .portal-startup-brand{min-height:48px;padding-bottom:16px;}
    #appLoadingIndicator .portal-startup-content{padding:24px 0;}
    #appLoadingIndicator .portal-startup-eyebrow{margin-bottom:12px;}
    #appLoadingIndicator .portal-startup-heading{margin-bottom:20px;}
    #appLoadingIndicator .portal-startup-title{font-size:26px;}
    #appLoadingIndicator .portal-startup-footer{padding-top:16px;}
}
@media(max-width:360px){
    #appLoadingIndicator .portal-startup-heading{gap:12px;}
    #appLoadingIndicator .portal-startup-title{font-size:22px;}
    #appLoadingIndicator .portal-startup-icon{flex-basis:48px;width:48px;height:48px;}
}
@media(prefers-reduced-motion:reduce){
    #appLoadingIndicator,#appLoadingIndicator #portalStartupReload{transition:none;}
    #appLoadingIndicator .portal-startup-track>span{animation:none;transform:none;}
}
#portalResourceError{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:2147483647;max-width:90vw;padding:12px 16px;background:#fff5f2;border:1px solid #b42318;color:#84221b;}
